From 6544eeafee1cfc47c5dfcf858ab01b541f792a66 Mon Sep 17 00:00:00 2001 From: Maciej Krajowski-Kukiel Date: Wed, 9 Sep 2026 14:40:16 +0200 Subject: [PATCH] update dependencies --- gui/graphql/package-lock.json | 32 +- gui/graphql/package.json | 2 +- gui/graphql/public/graphql.worker.js | 209 ++-- gui/graphql/public/main.js | 952 +++++++++--------- gui/graphql/src/index.jsx | 40 +- .../build/_app/immutable/chunks/20VG2--Z.js | 1 + .../build/_app/immutable/chunks/4TnyQOX7.js | 1 + .../build/_app/immutable/chunks/6QBD3Nmg.js | 1 + .../build/_app/immutable/chunks/82frDFMt.js | 2 + .../build/_app/immutable/chunks/B306k7fR.js | 1 - .../build/_app/immutable/chunks/B4-iFp85.js | 1 - .../build/_app/immutable/chunks/B59KkOew.js | 1 + .../build/_app/immutable/chunks/B8xeEe9r.js | 2 - .../build/_app/immutable/chunks/B9aXG4CO.js | 1 - .../build/_app/immutable/chunks/BASrH3aK.js | 1 - .../build/_app/immutable/chunks/BDHngaMC.js | 1 + .../build/_app/immutable/chunks/BGFcg-Oc.js | 1 + .../build/_app/immutable/chunks/BGNiEmSa.js | 1 - .../build/_app/immutable/chunks/BJ1AlBtE.js | 1 + .../build/_app/immutable/chunks/BOO8d4wj.js | 1 - .../chunks/{BOFl4Zy3.js => BVXugk_I.js} | 2 +- .../build/_app/immutable/chunks/BYBPl7s8.js | 1 + .../build/_app/immutable/chunks/BdMJTSmw.js | 1 - .../build/_app/immutable/chunks/Bu2SWvPv.js | 1 + .../build/_app/immutable/chunks/Bv1MsDZ2.js | 1 + .../build/_app/immutable/chunks/Bx-jGKIM.js | 2 + .../build/_app/immutable/chunks/C34rfsgn.js | 1 + .../build/_app/immutable/chunks/CbR0I_LD.js | 1 - .../build/_app/immutable/chunks/CcZWmye2.js | 1 - .../build/_app/immutable/chunks/Chsg19Fy.js | 1 + .../chunks/{CsZ8ECPE.js => CrxpNQ-W.js} | 2 +- .../build/_app/immutable/chunks/CtUFk0V8.js | 1 - .../build/_app/immutable/chunks/D-TpyKsB.js | 1 - .../build/_app/immutable/chunks/D9jxSEWQ.js | 1 + .../build/_app/immutable/chunks/DIJfNIWg.js | 1 - .../chunks/{CK-7l2xp.js => DZoEr4kV.js} | 2 +- .../build/_app/immutable/chunks/D_R-bFJu.js | 2 + .../build/_app/immutable/chunks/DlwE4GDg.js | 2 - .../build/_app/immutable/chunks/Dm5vEour.js | 1 + .../build/_app/immutable/chunks/DmHk8v1S.js | 1 - .../chunks/{CzE3_phY.js => DnWIQzZ-.js} | 2 +- .../build/_app/immutable/chunks/Dtt6yCVA.js | 1 + .../build/_app/immutable/chunks/DwmzNrqd.js | 1 - .../build/_app/immutable/chunks/KeBTzEPU.js | 1 - .../build/_app/immutable/chunks/O_HxRTMx.js | 2 - .../build/_app/immutable/chunks/bjWSF3e3.js | 1 - .../build/_app/immutable/chunks/mx3WJw6q.js | 1 + .../chunks/{CuiZI4Xx.js => z344_8gO.js} | 2 +- .../_app/immutable/entry/app.BjZlsJdB.js | 2 - .../_app/immutable/entry/app.DQeSrBVn.js | 2 + .../_app/immutable/entry/start.CwNwffgY.js | 1 + .../_app/immutable/entry/start.a5OFwwO2.js | 1 - .../build/_app/immutable/nodes/0.9DeSiAms.js | 1 + .../build/_app/immutable/nodes/0.BbvyYdd6.js | 1 - .../build/_app/immutable/nodes/1.CumLezk8.js | 1 - .../build/_app/immutable/nodes/1.qTXoqfV7.js | 1 + .../build/_app/immutable/nodes/11.CgoN6s9E.js | 1 - .../build/_app/immutable/nodes/11.D5aODbaJ.js | 1 + .../build/_app/immutable/nodes/12.BuhoOMK8.js | 24 - .../build/_app/immutable/nodes/12.D5B5oGNj.js | 24 + .../nodes/{13.CNt8LSIM.js => 13.DOCrulxY.js} | 2 +- .../build/_app/immutable/nodes/14.B9nVy-yk.js | 64 -- .../build/_app/immutable/nodes/14.CXdsLVxp.js | 64 ++ .../build/_app/immutable/nodes/15.BMi9Uzgy.js | 3 - .../build/_app/immutable/nodes/15.CjVvIqfO.js | 3 + .../build/_app/immutable/nodes/17.Bh-DsByc.js | 1 + .../build/_app/immutable/nodes/17.FIOYWbPR.js | 1 - .../build/_app/immutable/nodes/19.C0KpeoU9.js | 1 - .../build/_app/immutable/nodes/19.QnXCacnO.js | 1 + .../build/_app/immutable/nodes/2.C8K-g6EE.js | 1 - .../build/_app/immutable/nodes/2.DhQoZ4dO.js | 1 + .../nodes/{20.cRYPWwmn.js => 20.CGSNSfrp.js} | 2 +- .../build/_app/immutable/nodes/21.0QARPVom.js | 2 - .../build/_app/immutable/nodes/21.ZbHxqX3W.js | 2 + .../nodes/{3.B1QF_1Yb.js => 3.DFaswiDQ.js} | 2 +- .../build/_app/immutable/nodes/4.BlUWF_xL.js | 1 + .../build/_app/immutable/nodes/4.CccZSJm0.js | 1 - .../nodes/{5.B1QF_1Yb.js => 5.DFaswiDQ.js} | 2 +- .../build/_app/immutable/nodes/6.BaU2xlr7.js | 1 + .../build/_app/immutable/nodes/6.DgEfRXRY.js | 1 - .../build/_app/immutable/nodes/7.Ccm_gepw.js | 7 + .../build/_app/immutable/nodes/7.rf7d9OSB.js | 4 - .../build/_app/immutable/nodes/8.D7oIJgD-.js | 1 + .../build/_app/immutable/nodes/8.VbJYpWvw.js | 1 - .../build/_app/immutable/nodes/9.DrsSwI1P.js | 1 + .../build/_app/immutable/nodes/9.wQ19oQQ8.js | 1 - gui/next/build/_app/version.json | 2 +- gui/next/build/index.html | 46 +- gui/next/package-lock.json | 35 +- gui/next/package.json | 2 +- mcp-min/package-lock.json | 6 +- package-lock.json | 54 +- package.json | 8 +- 93 files changed, 825 insertions(+), 848 deletions(-) create mode 100644 gui/next/build/_app/immutable/chunks/20VG2--Z.js create mode 100644 gui/next/build/_app/immutable/chunks/4TnyQOX7.js create mode 100644 gui/next/build/_app/immutable/chunks/6QBD3Nmg.js create mode 100644 gui/next/build/_app/immutable/chunks/82frDFMt.js delete mode 100644 gui/next/build/_app/immutable/chunks/B306k7fR.js delete mode 100644 gui/next/build/_app/immutable/chunks/B4-iFp85.js create mode 100644 gui/next/build/_app/immutable/chunks/B59KkOew.js delete mode 100644 gui/next/build/_app/immutable/chunks/B8xeEe9r.js delete mode 100644 gui/next/build/_app/immutable/chunks/B9aXG4CO.js delete mode 100644 gui/next/build/_app/immutable/chunks/BASrH3aK.js create mode 100644 gui/next/build/_app/immutable/chunks/BDHngaMC.js create mode 100644 gui/next/build/_app/immutable/chunks/BGFcg-Oc.js delete mode 100644 gui/next/build/_app/immutable/chunks/BGNiEmSa.js create mode 100644 gui/next/build/_app/immutable/chunks/BJ1AlBtE.js delete mode 100644 gui/next/build/_app/immutable/chunks/BOO8d4wj.js rename gui/next/build/_app/immutable/chunks/{BOFl4Zy3.js => BVXugk_I.js} (82%) create mode 100644 gui/next/build/_app/immutable/chunks/BYBPl7s8.js delete mode 100644 gui/next/build/_app/immutable/chunks/BdMJTSmw.js create mode 100644 gui/next/build/_app/immutable/chunks/Bu2SWvPv.js create mode 100644 gui/next/build/_app/immutable/chunks/Bv1MsDZ2.js create mode 100644 gui/next/build/_app/immutable/chunks/Bx-jGKIM.js create mode 100644 gui/next/build/_app/immutable/chunks/C34rfsgn.js delete mode 100644 gui/next/build/_app/immutable/chunks/CbR0I_LD.js delete mode 100644 gui/next/build/_app/immutable/chunks/CcZWmye2.js create mode 100644 gui/next/build/_app/immutable/chunks/Chsg19Fy.js rename gui/next/build/_app/immutable/chunks/{CsZ8ECPE.js => CrxpNQ-W.js} (82%) delete mode 100644 gui/next/build/_app/immutable/chunks/CtUFk0V8.js delete mode 100644 gui/next/build/_app/immutable/chunks/D-TpyKsB.js create mode 100644 gui/next/build/_app/immutable/chunks/D9jxSEWQ.js delete mode 100644 gui/next/build/_app/immutable/chunks/DIJfNIWg.js rename gui/next/build/_app/immutable/chunks/{CK-7l2xp.js => DZoEr4kV.js} (51%) create mode 100644 gui/next/build/_app/immutable/chunks/D_R-bFJu.js delete mode 100644 gui/next/build/_app/immutable/chunks/DlwE4GDg.js create mode 100644 gui/next/build/_app/immutable/chunks/Dm5vEour.js delete mode 100644 gui/next/build/_app/immutable/chunks/DmHk8v1S.js rename gui/next/build/_app/immutable/chunks/{CzE3_phY.js => DnWIQzZ-.js} (61%) create mode 100644 gui/next/build/_app/immutable/chunks/Dtt6yCVA.js delete mode 100644 gui/next/build/_app/immutable/chunks/DwmzNrqd.js delete mode 100644 gui/next/build/_app/immutable/chunks/KeBTzEPU.js delete mode 100644 gui/next/build/_app/immutable/chunks/O_HxRTMx.js delete mode 100644 gui/next/build/_app/immutable/chunks/bjWSF3e3.js create mode 100644 gui/next/build/_app/immutable/chunks/mx3WJw6q.js rename gui/next/build/_app/immutable/chunks/{CuiZI4Xx.js => z344_8gO.js} (71%) delete mode 100644 gui/next/build/_app/immutable/entry/app.BjZlsJdB.js create mode 100644 gui/next/build/_app/immutable/entry/app.DQeSrBVn.js create mode 100644 gui/next/build/_app/immutable/entry/start.CwNwffgY.js delete mode 100644 gui/next/build/_app/immutable/entry/start.a5OFwwO2.js create mode 100644 gui/next/build/_app/immutable/nodes/0.9DeSiAms.js delete mode 100644 gui/next/build/_app/immutable/nodes/0.BbvyYdd6.js delete mode 100644 gui/next/build/_app/immutable/nodes/1.CumLezk8.js create mode 100644 gui/next/build/_app/immutable/nodes/1.qTXoqfV7.js delete mode 100644 gui/next/build/_app/immutable/nodes/11.CgoN6s9E.js create mode 100644 gui/next/build/_app/immutable/nodes/11.D5aODbaJ.js delete mode 100644 gui/next/build/_app/immutable/nodes/12.BuhoOMK8.js create mode 100644 gui/next/build/_app/immutable/nodes/12.D5B5oGNj.js rename gui/next/build/_app/immutable/nodes/{13.CNt8LSIM.js => 13.DOCrulxY.js} (59%) delete mode 100644 gui/next/build/_app/immutable/nodes/14.B9nVy-yk.js create mode 100644 gui/next/build/_app/immutable/nodes/14.CXdsLVxp.js delete mode 100644 gui/next/build/_app/immutable/nodes/15.BMi9Uzgy.js create mode 100644 gui/next/build/_app/immutable/nodes/15.CjVvIqfO.js create mode 100644 gui/next/build/_app/immutable/nodes/17.Bh-DsByc.js delete mode 100644 gui/next/build/_app/immutable/nodes/17.FIOYWbPR.js delete mode 100644 gui/next/build/_app/immutable/nodes/19.C0KpeoU9.js create mode 100644 gui/next/build/_app/immutable/nodes/19.QnXCacnO.js delete mode 100644 gui/next/build/_app/immutable/nodes/2.C8K-g6EE.js create mode 100644 gui/next/build/_app/immutable/nodes/2.DhQoZ4dO.js rename gui/next/build/_app/immutable/nodes/{20.cRYPWwmn.js => 20.CGSNSfrp.js} (60%) delete mode 100644 gui/next/build/_app/immutable/nodes/21.0QARPVom.js create mode 100644 gui/next/build/_app/immutable/nodes/21.ZbHxqX3W.js rename gui/next/build/_app/immutable/nodes/{3.B1QF_1Yb.js => 3.DFaswiDQ.js} (53%) create mode 100644 gui/next/build/_app/immutable/nodes/4.BlUWF_xL.js delete mode 100644 gui/next/build/_app/immutable/nodes/4.CccZSJm0.js rename gui/next/build/_app/immutable/nodes/{5.B1QF_1Yb.js => 5.DFaswiDQ.js} (53%) create mode 100644 gui/next/build/_app/immutable/nodes/6.BaU2xlr7.js delete mode 100644 gui/next/build/_app/immutable/nodes/6.DgEfRXRY.js create mode 100644 gui/next/build/_app/immutable/nodes/7.Ccm_gepw.js delete mode 100644 gui/next/build/_app/immutable/nodes/7.rf7d9OSB.js create mode 100644 gui/next/build/_app/immutable/nodes/8.D7oIJgD-.js delete mode 100644 gui/next/build/_app/immutable/nodes/8.VbJYpWvw.js create mode 100644 gui/next/build/_app/immutable/nodes/9.DrsSwI1P.js delete mode 100644 gui/next/build/_app/immutable/nodes/9.wQ19oQQ8.js diff --git a/gui/graphql/package-lock.json b/gui/graphql/package-lock.json index 790b3854..a4a2b78f 100644 --- a/gui/graphql/package-lock.json +++ b/gui/graphql/package-lock.json @@ -12,7 +12,7 @@ "@graphiql/plugin-explorer": "^5.1.4", "assert": "^2.1.0", "graphiql": "^5.3.0", - "graphql": "^15.8.0", + "graphql": "^17.0.2", "graphql-ws": "^6.2.1", "react": "^19.2.8", "react-dom": "^19.2.8" @@ -549,6 +549,17 @@ "react-dom": "^18 || ^19" } }, + "node_modules/@graphiql/plugin-explorer/node_modules/graphiql-explorer": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/graphiql-explorer/-/graphiql-explorer-0.9.0.tgz", + "integrity": "sha512-fZC/wsuatqiQDO2otchxriFO0LaWIo/ovF/CQJ1yOudmY0P7pzDiP+l9CEHUiWbizk3e99x6DQG4XG1VxA+d6A==", + "license": "MIT", + "peerDependencies": { + "graphql": "^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0", + "react": "^15.6.0 || ^16.0.0", + "react-dom": "^15.6.0 || ^16.0.0" + } + }, "node_modules/@graphiql/plugin-history": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@graphiql/plugin-history/-/plugin-history-0.4.3.tgz", @@ -1764,24 +1775,13 @@ "react-dom": "^18 || ^19" } }, - "node_modules/graphiql-explorer": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/graphiql-explorer/-/graphiql-explorer-0.9.0.tgz", - "integrity": "sha512-fZC/wsuatqiQDO2otchxriFO0LaWIo/ovF/CQJ1yOudmY0P7pzDiP+l9CEHUiWbizk3e99x6DQG4XG1VxA+d6A==", - "license": "MIT", - "peerDependencies": { - "graphql": "^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0", - "react": "^15.6.0 || ^16.0.0", - "react-dom": "^15.6.0 || ^16.0.0" - } - }, "node_modules/graphql": { - "version": "15.10.3", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.10.3.tgz", - "integrity": "sha512-e2ut+7oOFe5/jENYc+T7GZnL5lIBd7vcWg6TlqVx1L/MFXY3CKOsEcP+jMPgL8uwcfrllJRNSmqq5psZahdKZg==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-17.0.2.tgz", + "integrity": "sha512-FRWbddMxfkjiB7z+aQDWIR+E34xo9I8c9mtK2RPv8PmMzKRvrdsreHL/Ui/TmwHJfhHChEtsFPyMHKI+xuarQQ==", "license": "MIT", "engines": { - "node": ">= 10.x" + "node": "^22.0.0 || ^24.0.0 || ^25.0.0 || >=26.0.0" } }, "node_modules/graphql-language-service": { diff --git a/gui/graphql/package.json b/gui/graphql/package.json index 788a5a74..365444c2 100644 --- a/gui/graphql/package.json +++ b/gui/graphql/package.json @@ -19,7 +19,7 @@ "@graphiql/plugin-explorer": "^5.1.4", "assert": "^2.1.0", "graphiql": "^5.3.0", - "graphql": "^15.8.0", + "graphql": "^17.0.2", "graphql-ws": "^6.2.1", "react": "^19.2.8", "react-dom": "^19.2.8" diff --git a/gui/graphql/public/graphql.worker.js b/gui/graphql/public/graphql.worker.js index 1d4927d7..0499932f 100644 --- a/gui/graphql/public/graphql.worker.js +++ b/gui/graphql/public/graphql.worker.js @@ -1,122 +1,137 @@ -(()=>{var z4=Object.create;var Zu=Object.defineProperty;var Y4=Object.getOwnPropertyDescriptor;var J4=Object.getOwnPropertyNames;var X4=Object.getPrototypeOf,K4=Object.prototype.hasOwnProperty;var H1=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Z4=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var fr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},eD=(e,t)=>{for(var n in t)Zu(e,n,{get:t[n],enumerable:!0})},tD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of J4(t))!K4.call(e,i)&&i!==n&&Zu(e,i,{get:()=>t[i],enumerable:!(r=Y4(t,i))||r.enumerable});return e};var el=(e,t,n)=>(n=e!=null?z4(X4(e)):{},tD(t||!e||!e.__esModule?Zu(n,"default",{value:e,enumerable:!0}):n,e));var km=fr((nM,xu)=>{"use strict";function Om(e,t){if(e!=null)return e;var n=new Error(t!==void 0?t:"Got unexpected "+e);throw n.framesToPop=1,n}xu.exports=Om;xu.exports.default=Om;Object.defineProperty(xu.exports,"__esModule",{value:!0})});var To=fr((KM,Wm)=>{"use strict";var Gm="[^\\\\/]",Fy="(?=.)",qm="[^/]",Pf="(?:\\/|$)",$m="(?:^|\\/)",Bf=`\\.{1,2}${Pf}`,Ay="(?!\\.)",wy=`(?!${$m}${Bf})`,Cy=`(?!\\.{0,1}${Pf})`,Ly=`(?!${Bf})`,Iy="[^.\\/]",Ry=`${qm}*?`,Oy="/",Hm={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:Fy,QMARK:qm,END_ANCHOR:Pf,DOTS_SLASH:Bf,NO_DOT:Ay,NO_DOTS:wy,NO_DOT_SLASH:Cy,NO_DOTS_SLASH:Ly,QMARK_NO_DOT:Iy,STAR:Ry,START_ANCHOR:$m,SEP:Oy},ky={...Hm,SLASH_LITERAL:"[\\\\/]",QMARK:Gm,STAR:`${Gm}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},My={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Wm.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:My,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?ky:Hm}}});var Lu=fr(Wt=>{"use strict";var{REGEX_BACKSLASH:Py,REGEX_REMOVE_BACKSLASH:By,REGEX_SPECIAL_CHARS:Vy,REGEX_SPECIAL_CHARS_GLOBAL:Uy}=To();Wt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Wt.hasRegexChars=e=>Vy.test(e);Wt.isRegexChar=e=>e.length===1&&Wt.hasRegexChars(e);Wt.escapeRegex=e=>e.replace(Uy,"\\$1");Wt.toPosixSlashes=e=>e.replace(Py,"/");Wt.removeBackslashes=e=>e.replace(By,t=>t==="\\"?"":t);Wt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Wt.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?Wt.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};Wt.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};Wt.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s};Wt.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")});var t2=fr((eP,e2)=>{"use strict";var Qm=Lu(),{CHAR_ASTERISK:Vf,CHAR_AT:jy,CHAR_BACKWARD_SLASH:No,CHAR_COMMA:Gy,CHAR_DOT:Uf,CHAR_EXCLAMATION_MARK:zm,CHAR_FORWARD_SLASH:Zm,CHAR_LEFT_CURLY_BRACE:jf,CHAR_LEFT_PARENTHESES:Gf,CHAR_LEFT_SQUARE_BRACKET:qy,CHAR_PLUS:$y,CHAR_QUESTION_MARK:Ym,CHAR_RIGHT_CURLY_BRACE:Hy,CHAR_RIGHT_PARENTHESES:Jm,CHAR_RIGHT_SQUARE_BRACKET:Wy}=To(),Xm=e=>e===Zm||e===No,Km=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Qy=(e,t)=>{let n=t||{},r=e.length-1,i=n.parts===!0||n.scanToEnd===!0,s=[],o=[],a=[],u=e,l=-1,c=0,f=0,h=!1,m=!1,g=!1,v=!1,b=!1,E=!1,A=!1,C=!1,w=!1,F=0,O,L,P={value:"",depth:0,isGlob:!1},W=()=>l>=r,k=()=>u.charCodeAt(l+1),$=()=>(O=L,u.charCodeAt(++l));for(;l0&&(J=u.slice(0,c),u=u.slice(c),f-=c),I&&g===!0&&f>0?(I=u.slice(0,f),N=u.slice(f)):g===!0?(I="",N=u):I=u,I&&I!==""&&I!=="/"&&I!==u&&Xm(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),n.unescape===!0&&(N&&(N=Qm.removeBackslashes(N)),I&&A===!0&&(I=Qm.removeBackslashes(I)));let S={prefix:J,input:e,start:c,base:I,glob:N,isBrace:h,isBracket:m,isGlob:g,isExtglob:v,isGlobstar:b,negated:C};if(n.tokens===!0&&(S.maxDepth=0,Xm(L)||o.push(P),S.tokens=o),n.parts===!0||n.tokens===!0){let Y;for(let q=0;q{"use strict";var Iu=To(),En=Lu(),{MAX_LENGTH:Ru,POSIX_REGEX_SOURCE:zy,REGEX_NON_SPECIAL_CHARS:Yy,REGEX_SPECIAL_CHARS_BACKREF:Jy,REPLACEMENTS:n2}=Iu,Xy=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(i=>En.escapeRegex(i)).join("..")}return n},vs=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,r2=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=n2[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(Ru,n.maxLength):Ru,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let s={type:"bos",value:"",output:n.prepend||""},o=[s],a=n.capture?"":"?:",u=Iu.globChars(n.windows),l=Iu.extglobChars(u),{DOT_LITERAL:c,PLUS_LITERAL:f,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:v,NO_DOT_SLASH:b,NO_DOTS_SLASH:E,QMARK:A,QMARK_NO_DOT:C,STAR:w,START_ANCHOR:F}=u,O=Q=>`(${a}(?:(?!${F}${Q.dot?g:c}).)*?)`,L=n.dot?"":v,P=n.dot?A:C,W=n.bash===!0?O(n):w;n.capture&&(W=`(${W})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let k={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=En.removePrefix(e,k),i=e.length;let $=[],I=[],J=[],N=s,S,Y=()=>k.index===i-1,q=k.peek=(Q=1)=>e[k.index+Q],ee=k.advance=()=>e[++k.index],ie=()=>e.slice(k.index+1),ce=(Q="",Ie=0)=>{k.consumed+=Q,k.index+=Ie},Oe=Q=>{k.output+=Q.output!=null?Q.output:Q.value,ce(Q.value)},Je=()=>{let Q=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)ee(),k.start++,Q++;return Q%2===0?!1:(k.negated=!0,k.start++,!0)},gt=Q=>{k[Q]++,J.push(Q)},at=Q=>{k[Q]--,J.pop()},pe=Q=>{if(N.type==="globstar"){let Ie=k.braces>0&&(Q.type==="comma"||Q.type==="brace"),z=Q.extglob===!0||$.length&&(Q.type==="pipe"||Q.type==="paren");Q.type!=="slash"&&Q.type!=="paren"&&!Ie&&!z&&(k.output=k.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=W,k.output+=N.output)}if($.length&&Q.type!=="paren"&&!l[Q.value]&&($[$.length-1].inner+=Q.value),(Q.value||Q.output)&&Oe(Q),N&&N.type==="text"&&Q.type==="text"){N.value+=Q.value,N.output=(N.output||"")+Q.value;return}Q.prev=N,o.push(Q),N=Q},kt=(Q,Ie)=>{let z={...l[Ie],conditions:1,inner:""};z.prev=N,z.parens=k.parens,z.output=k.output;let me=(n.capture?"(":"")+z.open;gt("parens"),pe({type:Q,value:Ie,output:k.output?"":m}),pe({type:"paren",extglob:!0,value:ee(),output:me}),$.push(z)},un=Q=>{let Ie=Q.close+(n.capture?")":"");if(Q.type==="negate"){let z=W;Q.inner&&Q.inner.length>1&&Q.inner.includes("/")&&(z=O(n)),(z!==W||Y()||/^\)+$/.test(ie()))&&(Ie=Q.close=`)$))${z}`),Q.prev.type==="bos"&&Y()&&(k.negatedExtglob=!0)}pe({type:"paren",extglob:!0,value:S,output:Ie}),at("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let Q=!1,Ie=e.replace(Jy,(z,me,ke,U,X,Z)=>U==="\\"?(Q=!0,z):U==="?"?me?me+U+(X?A.repeat(X.length):""):Z===0?P+(X?A.repeat(X.length):""):A.repeat(ke.length):U==="."?c.repeat(ke.length):U==="*"?me?me+U+(X?W:""):W:me?z:`\\${z}`);return Q===!0&&(n.unescape===!0?Ie=Ie.replace(/\\/g,""):Ie=Ie.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),Ie===e&&n.contains===!0?(k.output=e,k):(k.output=En.wrapOutput(Ie,k,t),k)}for(;!Y();){if(S=ee(),S==="\0")continue;if(S==="\\"){let z=q();if(z==="/"&&n.bash!==!0||z==="."||z===";")continue;if(!z){S+="\\",pe({type:"text",value:S});continue}let me=/^\\+/.exec(ie()),ke=0;if(me&&me[0].length>2&&(ke=me[0].length,k.index+=ke,ke%2!==0&&(S+="\\")),n.unescape===!0?S=ee()||"":S+=ee()||"",k.brackets===0){pe({type:"text",value:S});continue}}if(k.brackets>0&&(S!=="]"||N.value==="["||N.value==="[^")){if(n.posix!==!1&&S===":"){let z=N.value.slice(1);if(z.includes("[")&&(N.posix=!0,z.includes(":"))){let me=N.value.lastIndexOf("["),ke=N.value.slice(0,me),U=N.value.slice(me+2),X=zy[U];if(X){N.value=ke+X,k.backtrack=!0,ee(),!s.output&&o.indexOf(N)===1&&(s.output=m);continue}}}(S==="["&&q()!==":"||S==="-"&&q()==="]")&&(S=`\\${S}`),S==="]"&&(N.value==="["||N.value==="[^")&&(S=`\\${S}`),n.posix===!0&&S==="!"&&N.value==="["&&(S="^"),N.value+=S,Oe({value:S});continue}if(k.quotes===1&&S!=='"'){S=En.escapeRegex(S),N.value+=S,Oe({value:S});continue}if(S==='"'){k.quotes=k.quotes===1?0:1,n.keepQuotes===!0&&pe({type:"text",value:S});continue}if(S==="("){gt("parens"),pe({type:"paren",value:S});continue}if(S===")"){if(k.parens===0&&n.strictBrackets===!0)throw new SyntaxError(vs("opening","("));let z=$[$.length-1];if(z&&k.parens===z.parens+1){un($.pop());continue}pe({type:"paren",value:S,output:k.parens?")":"\\)"}),at("parens");continue}if(S==="["){if(n.nobracket===!0||!ie().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(vs("closing","]"));S=`\\${S}`}else gt("brackets");pe({type:"bracket",value:S});continue}if(S==="]"){if(n.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){pe({type:"text",value:S,output:`\\${S}`});continue}if(k.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(vs("opening","["));pe({type:"text",value:S,output:`\\${S}`});continue}at("brackets");let z=N.value.slice(1);if(N.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(S=`/${S}`),N.value+=S,Oe({value:S}),n.literalBrackets===!1||En.hasRegexChars(z))continue;let me=En.escapeRegex(N.value);if(k.output=k.output.slice(0,-N.value.length),n.literalBrackets===!0){k.output+=me,N.value=me;continue}N.value=`(${a}${me}|${N.value})`,k.output+=N.value;continue}if(S==="{"&&n.nobrace!==!0){gt("braces");let z={type:"brace",value:S,output:"(",outputIndex:k.output.length,tokensIndex:k.tokens.length};I.push(z),pe(z);continue}if(S==="}"){let z=I[I.length-1];if(n.nobrace===!0||!z){pe({type:"text",value:S,output:S});continue}let me=")";if(z.dots===!0){let ke=o.slice(),U=[];for(let X=ke.length-1;X>=0&&(o.pop(),ke[X].type!=="brace");X--)ke[X].type!=="dots"&&U.unshift(ke[X].value);me=Xy(U,n),k.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let ke=k.output.slice(0,z.outputIndex),U=k.tokens.slice(z.tokensIndex);z.value=z.output="\\{",S=me="\\}",k.output=ke;for(let X of U)k.output+=X.output||X.value}pe({type:"brace",value:S,output:me}),at("braces"),I.pop();continue}if(S==="|"){$.length>0&&$[$.length-1].conditions++,pe({type:"text",value:S});continue}if(S===","){let z=S,me=I[I.length-1];me&&J[J.length-1]==="braces"&&(me.comma=!0,z="|"),pe({type:"comma",value:S,output:z});continue}if(S==="/"){if(N.type==="dot"&&k.index===k.start+1){k.start=k.index+1,k.consumed="",k.output="",o.pop(),N=s;continue}pe({type:"slash",value:S,output:h});continue}if(S==="."){if(k.braces>0&&N.type==="dot"){N.value==="."&&(N.output=c);let z=I[I.length-1];N.type="dots",N.output+=S,N.value+=S,z.dots=!0;continue}if(k.braces+k.parens===0&&N.type!=="bos"&&N.type!=="slash"){pe({type:"text",value:S,output:c});continue}pe({type:"dot",value:S,output:c});continue}if(S==="?"){if(!(N&&N.value==="(")&&n.noextglob!==!0&&q()==="("&&q(2)!=="?"){kt("qmark",S);continue}if(N&&N.type==="paren"){let me=q(),ke=S;if(me==="<"&&!En.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(N.value==="("&&!/[!=<:]/.test(me)||me==="<"&&!/<([!=]|\w+>)/.test(ie()))&&(ke=`\\${S}`),pe({type:"text",value:S,output:ke});continue}if(n.dot!==!0&&(N.type==="slash"||N.type==="bos")){pe({type:"qmark",value:S,output:C});continue}pe({type:"qmark",value:S,output:A});continue}if(S==="!"){if(n.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){kt("negate",S);continue}if(n.nonegate!==!0&&k.index===0){Je();continue}}if(S==="+"){if(n.noextglob!==!0&&q()==="("&&q(2)!=="?"){kt("plus",S);continue}if(N&&N.value==="("||n.regex===!1){pe({type:"plus",value:S,output:f});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||k.parens>0){pe({type:"plus",value:S});continue}pe({type:"plus",value:f});continue}if(S==="@"){if(n.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe({type:"at",extglob:!0,value:S,output:""});continue}pe({type:"text",value:S});continue}if(S!=="*"){(S==="$"||S==="^")&&(S=`\\${S}`);let z=Yy.exec(ie());z&&(S+=z[0],k.index+=z[0].length),pe({type:"text",value:S});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=S,N.output=W,k.backtrack=!0,k.globstar=!0,ce(S);continue}let Q=ie();if(n.noextglob!==!0&&/^\([^?]/.test(Q)){kt("star",S);continue}if(N.type==="star"){if(n.noglobstar===!0){ce(S);continue}let z=N.prev,me=z.prev,ke=z.type==="slash"||z.type==="bos",U=me&&(me.type==="star"||me.type==="globstar");if(n.bash===!0&&(!ke||Q[0]&&Q[0]!=="/")){pe({type:"star",value:S,output:""});continue}let X=k.braces>0&&(z.type==="comma"||z.type==="brace"),Z=$.length&&(z.type==="pipe"||z.type==="paren");if(!ke&&z.type!=="paren"&&!X&&!Z){pe({type:"star",value:S,output:""});continue}for(;Q.slice(0,3)==="/**";){let te=e[k.index+4];if(te&&te!=="/")break;Q=Q.slice(3),ce("/**",3)}if(z.type==="bos"&&Y()){N.type="globstar",N.value+=S,N.output=O(n),k.output=N.output,k.globstar=!0,ce(S);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!U&&Y()){k.output=k.output.slice(0,-(z.output+N.output).length),z.output=`(?:${z.output}`,N.type="globstar",N.output=O(n)+(n.strictSlashes?")":"|$)"),N.value+=S,k.globstar=!0,k.output+=z.output+N.output,ce(S);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&Q[0]==="/"){let te=Q[1]!==void 0?"|$":"";k.output=k.output.slice(0,-(z.output+N.output).length),z.output=`(?:${z.output}`,N.type="globstar",N.output=`${O(n)}${h}|${h}${te})`,N.value+=S,k.output+=z.output+N.output,k.globstar=!0,ce(S+ee()),pe({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&Q[0]==="/"){N.type="globstar",N.value+=S,N.output=`(?:^|${h}|${O(n)}${h})`,k.output=N.output,k.globstar=!0,ce(S+ee()),pe({type:"slash",value:"/",output:""});continue}k.output=k.output.slice(0,-N.output.length),N.type="globstar",N.output=O(n),N.value+=S,k.output+=N.output,k.globstar=!0,ce(S);continue}let Ie={type:"star",value:S,output:W};if(n.bash===!0){Ie.output=".*?",(N.type==="bos"||N.type==="slash")&&(Ie.output=L+Ie.output),pe(Ie);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&n.regex===!0){Ie.output=S,pe(Ie);continue}(k.index===k.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(k.output+=b,N.output+=b):n.dot===!0?(k.output+=E,N.output+=E):(k.output+=L,N.output+=L),q()!=="*"&&(k.output+=m,N.output+=m)),pe(Ie)}for(;k.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(vs("closing","]"));k.output=En.escapeLast(k.output,"["),at("brackets")}for(;k.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(vs("closing",")"));k.output=En.escapeLast(k.output,"("),at("parens")}for(;k.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(vs("closing","}"));k.output=En.escapeLast(k.output,"{"),at("braces")}if(n.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&pe({type:"maybe_slash",value:"",output:`${h}?`}),k.backtrack===!0){k.output="";for(let Q of k.tokens)k.output+=Q.output!=null?Q.output:Q.value,Q.suffix&&(k.output+=Q.suffix)}return k};r2.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(Ru,n.maxLength):Ru,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=n2[e]||e;let{DOT_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:f,STAR:h,START_ANCHOR:m}=Iu.globChars(n.windows),g=n.dot?c:l,v=n.dot?f:l,b=n.capture?"":"?:",E={negated:!1,prefix:""},A=n.bash===!0?".*?":h;n.capture&&(A=`(${A})`);let C=L=>L.noglobstar===!0?A:`(${b}(?:(?!${m}${L.dot?u:s}).)*?)`,w=L=>{switch(L){case"*":return`${g}${a}${A}`;case".*":return`${s}${a}${A}`;case"*.*":return`${g}${A}${s}${a}${A}`;case"*/*":return`${g}${A}${o}${a}${v}${A}`;case"**":return g+C(n);case"**/*":return`(?:${g}${C(n)}${o})?${v}${a}${A}`;case"**/*.*":return`(?:${g}${C(n)}${o})?${v}${A}${s}${a}${A}`;case"**/.*":return`(?:${g}${C(n)}${o})?${s}${a}${A}`;default:{let P=/^(.*?)\.(\w+)$/.exec(L);if(!P)return;let W=w(P[1]);return W?W+s+P[2]:void 0}}},F=En.removePrefix(e,E),O=w(F);return O&&n.strictSlashes!==!0&&(O+=`${o}?`),O};i2.exports=r2});var u2=fr((nP,a2)=>{"use strict";var Ky=t2(),qf=s2(),o2=Lu(),Zy=To(),e8=e=>e&&typeof e=="object"&&!Array.isArray(e),ot=(e,t,n=!1)=>{if(Array.isArray(e)){let c=e.map(h=>ot(h,t,n));return h=>{for(let m of c){let g=m(h);if(g)return g}return!1}}let r=e8(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=i.windows,o=r?ot.compileRe(e,t):ot.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let c={...t,ignore:null,onMatch:null,onResult:null};u=ot(i.ignore,c,n)}let l=(c,f=!1)=>{let{isMatch:h,match:m,output:g}=ot.test(c,o,t,{glob:e,posix:s}),v={glob:e,state:a,regex:o,posix:s,input:c,output:g,match:m,isMatch:h};return typeof i.onResult=="function"&&i.onResult(v),h===!1?(v.isMatch=!1,f?v:!1):u(c)?(typeof i.onIgnore=="function"&&i.onIgnore(v),v.isMatch=!1,f?v:!1):(typeof i.onMatch=="function"&&i.onMatch(v),f?v:!0)};return n&&(l.state=a),l};ot.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=n||{},o=s.format||(i?o2.toPosixSlashes:null),a=e===r,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===r),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=ot.matchBase(e,t,n,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};ot.matchBase=(e,t,n)=>(t instanceof RegExp?t:ot.makeRe(t,n)).test(o2.basename(e));ot.isMatch=(e,t,n)=>ot(t,n)(e);ot.parse=(e,t)=>Array.isArray(e)?e.map(n=>ot.parse(n,t)):qf(e,{...t,fastpaths:!1});ot.scan=(e,t)=>Ky(e,t);ot.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=ot.toRegex(a,t);return r===!0&&(u.state=e),u};ot.makeRe=(e,t,n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i=t||{},s={negated:!1,fastpaths:!0},o="",a;return e.startsWith("./")&&(e=e.slice(2),o=s.prefix="./"),i.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(a=qf.fastpaths(e,t)),a===void 0?(s=qf(e,t),s.prefix=o+(s.prefix||"")):s.output=a,ot.compileRe(s,t,n,r)};ot.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};ot.constants=Zy;a2.exports=ot});var c2=fr((rP,l2)=>{"use strict";l2.exports=u2()});var Wg={};eD(Wg,{__debug:()=>Hg,check:()=>qg,default:()=>j2,doc:()=>v1,format:()=>T1,formatWithCursor:()=>_1,getSupportInfo:()=>$g,util:()=>D1,version:()=>Ug});function l8(e,t,n){return u8.diff(e,t,n)}function d8(e){let t=e.indexOf(i1);return t!==-1?e.charAt(t+1)===Uu?q2:G2:p8}function s1(e){return e===G2?i1:e===q2?$2:h8}function H2(e,t){let n=m8.get(t);return e.match(n)?.length??0}function v8(e){return Vu(0,e,g8,Uu)}function D8(e){return this[e<0?this.length+e:e]}function E8(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===` -`);)t--;return t`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${r}.`}function N8(e,t,n,r){let i=[e];for(;i.length>0;){let s=i.pop();if(s===d2){n(i.pop());continue}n&&i.push(s,d2);let o=hi(s);if(!o)throw new Es(s);if(t?.(s)!==!1)switch(o){case er:case Pn:{let a=o===er?s:s.parts;for(let u=a.length,l=u-1;l>=0;--l)i.push(a[l]);break}case Kt:i.push(s.flatContents,s.breakContents);break;case Qt:if(r&&s.expandedStates)for(let a=s.expandedStates.length,u=a-1;u>=0;--u)i.push(s.expandedStates[u]);else i.push(s.contents);break;case nr:case tr:case ir:case Bn:case sr:i.push(s.contents);break;case pi:case Rr:case rr:case or:case At:case an:break;default:throw new Es(s)}}}function Gu(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(s){return o1(n,s,i)}function i(s){switch(hi(s)){case er:return t(s.map(r));case Pn:return t({...s,parts:s.parts.map(r)});case Kt:return t({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case Qt:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(r),a=o[0]):a=r(a),t({...s,contents:a,expandedStates:o})}case nr:case tr:case ir:case Bn:case sr:return t({...s,contents:r(s.contents)});case pi:case Rr:case rr:case or:case At:case an:return t(s);default:throw new Es(s)}}}function u1(e,t,n){let r=n,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,r=a)}return a1(e,s),r}function S8(e){if(e.type===Qt&&e.break||e.type===At&&e.hard||e.type===an)return!0}function F8(e){return u1(e,S8,!1)}function m2(e){if(e.length>0){let t=Ft(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function A8(e){let t=new Set,n=[];function r(s){if(s.type===an&&m2(n),s.type===Qt){if(n.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===Qt&&n.pop().break&&m2(n)}a1(e,r,i,!0)}function w8(e){return e.type===At&&!e.hard?e.soft?"":" ":e.type===Kt?e.flatContents:e}function C8(e){return Gu(e,w8)}function g2(e){for(e=[...e];e.length>=2&&Ft(0,e,-2).type===At&&Ft(0,e,-1).type===an;)e.length-=2;if(e.length>0){let t=So(Ft(0,e,-1));e[e.length-1]=t}return e}function So(e){switch(hi(e)){case tr:case ir:case Qt:case sr:case Bn:{let t=So(e.contents);return{...e,contents:t}}case Kt:return{...e,breakContents:So(e.breakContents),flatContents:So(e.flatContents)};case Pn:return{...e,parts:g2(e.parts)};case er:return g2(e);case pi:return E8(e);case nr:case Rr:case rr:case or:case At:case an:break;default:throw new Es(e)}return e}function Q2(e){return So(I8(e))}function L8(e){switch(hi(e)){case Pn:{let{parts:t}=e;if(t.every(n=>n===""))return"";if(t.length===1)return t[0];break}case Qt:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Qt&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case nr:case tr:case ir:case sr:if(!e.contents)return"";break;case Kt:if(!e.flatContents&&!e.breakContents)return"";break;case er:{let t=[];for(let n of e){if(!n)continue;let[r,...i]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof Ft(0,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case pi:case Rr:case rr:case or:case At:case Bn:case an:break;default:throw new Es(e)}return e}function I8(e){return Gu(e,t=>L8(t))}function R8(e,t=tg){return Gu(e,n=>typeof n=="string"?K2(t,n.split(` -`)):n)}function O8(e){if(e.type===At)return!0}function k8(e){return u1(e,O8,!1)}function Mu(e,t){return e.type===Bn?{...e,contents:t(e.contents)}:t(e)}function Bu(e){return Mn(e),{type:tr,contents:e}}function bs(e,t){return P8(e),Mn(t),{type:nr,contents:t,n:e}}function B8(e){return bs(Number.NEGATIVE_INFINITY,e)}function Y2(e){return bs({type:"root"},e)}function V8(e){return bs(-1,e)}function J2(e,t,n){Mn(e);let r=e;if(t>0){for(let i=0;i0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${r(s.contents)}${l})`}if(s.type===Qt){let u=[];s.break&&s.break!=="propagated"&&u.push("shouldBreak: true"),s.id&&u.push(`id: ${i(s.id)}`);let l=u.length>0?`, { ${u.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(c=>r(c)).join(",")}]${l})`:`group(${r(s.contents)}${l})`}if(s.type===Pn)return`fill([${s.parts.map(u=>r(u)).join(", ")}])`;if(s.type===sr)return"lineSuffix("+r(s.contents)+")";if(s.type===or)return"lineSuffixBoundary";if(s.type===Bn)return`label(${JSON.stringify(s.label)}, ${r(s.contents)})`;if(s.type===Rr)return"cursor";throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let a=0;;a++){let u=o+(a>0?` #${a}`:"");if(!n.has(u))return n.add(u),t[s]=`Symbol.for(${JSON.stringify(u)})`}}}function rE(e){let t=e[0],n=e[1];for(let r=0;r=i&&v2<=s)return[i,s];s-i>n-t&&(t=i,n=s)}return[t,n]}function lE(e){if(!e)return 0;if(!uE.test(e))return e.length;let t=0;e=e.replace(Y8(),n=>(t+=aE(n)?1:2,""));for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(t+=iE(r)||sE(r)?2:1)}return t}function sg(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let g of r)switch(g.type){case 0:c(),n.useTabs?u(1):l(n.tabWidth);break;case 3:{let{string:v}=g;c(),i+=v,s+=v.length;break}case 2:{let{width:v}=g;o+=1,a+=v;break}default:throw new Error(`Unexpected indent comment '${g.type}'.`)}return h(),{...e,value:i,length:s,queue:r};function u(g){i+=" ".repeat(g),s+=n.tabWidth*g}function l(g){i+=" ".repeat(g),s+=g}function c(){n.useTabs?f():h()}function f(){o>0&&u(o),m()}function h(){a>0&&l(a),m()}function m(){o=0,a=0}}function pE(e,t,n){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let r;return typeof t=="number"?t<0?r=fE:r={type:2,width:t}:r={type:3,string:t},sg(e,r,n)}function hE(e,t){return sg(e,cE,t)}function dE(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===" "||r===" ")t++;else break}return t}function og(e){let t=dE(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}function ku(e,t,n,r,i,s){if(n===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=!1,u=[e],l="";for(;n>=0;){if(u.length===0){if(o===0)return!0;u.push(t[--o]);continue}let{mode:c,doc:f}=u.pop(),h=hi(f);switch(h){case pi:f&&(a&&(l+=" ",n-=1,a=!1),l+=f,n-=c1(f));break;case er:case Pn:{let m=h===er?f:f.parts,g=f[e1]??0;for(let v=m.length-1;v>=g;v--)u.push({mode:c,doc:m[v]});break}case tr:case nr:case ir:case Bn:u.push({mode:c,doc:f.contents});break;case rr:{let{text:m,count:g}=og(l);l=m,n+=g;break}case Qt:{if(s&&f.break)return!1;let m=f.break?on:c,g=f.expandedStates&&m===on?Ft(0,f.expandedStates,-1):f.contents;u.push({mode:m,doc:g});break}case Kt:{let m=(f.groupId?i[f.groupId]||On:c)===on?f.breakContents:f.flatContents;m&&u.push({mode:c,doc:m});break}case At:if(c===on||f.hard)return!0;f.soft||(a=!0);break;case sr:r=!0;break;case or:if(r)return!1;break}}return!1}function $u(e,t){let n=Object.create(null),r=t.printWidth,i=s1(t.endOfLine),s=0,o=[{indent:ig,mode:on,doc:e}],a=!1,u=[],l=new gE;for(A8(e);o.length>0;){let{indent:g,mode:v,doc:b}=o.pop();switch(hi(b)){case pi:{let E=i!==` -`?Vu(0,b,` -`,i):b;E&&(l.write(E),o.length>0&&(s+=c1(E)));break}case er:for(let E=b.length-1;E>=0;E--)o.push({indent:g,mode:v,doc:b[E]});break;case Rr:l.markPosition();break;case tr:o.push({indent:hE(g,t),mode:v,doc:b.contents});break;case nr:o.push({indent:pE(g,b.n,t),mode:v,doc:b.contents});break;case rr:s-=l.trim();break;case Qt:{let E=(function(){if(v===On&&!a)return{indent:g,mode:b.break?on:On,doc:b.contents};a=!1;let A=r-s,C=u.length>0,w={indent:g,mode:On,doc:b.contents};if(!b.break&&ku(w,o,A,C,n))return w;if(!b.expandedStates)return{indent:g,mode:on,doc:b.contents};if(!b.break)for(let F=1;F0,n,!0);if(w===1){W?o.push(L):o.push(P);break}let k={indent:g,mode:On,doc:O},$={indent:g,mode:on,doc:O};if(w===2){W?o.push(k,L):o.push($,P);break}let I=C[A+2],J={indent:g,mode:v,doc:{...b,[e1]:A+2}},N=ku({indent:g,mode:On,doc:[F,O,I]},[],E,u.length>0,n,!0);o.push(J),N?o.push(k,L):W?o.push($,L):o.push($,P);break}case Kt:case ir:{let E=b.groupId?n[b.groupId]:v;if(E===on){let A=b.type===Kt?b.breakContents:b.negate?b.contents:Bu(b.contents);A&&o.push({indent:g,mode:v,doc:A})}if(E===On){let A=b.type===Kt?b.flatContents:b.negate?Bu(b.contents):b.contents;A&&o.push({indent:g,mode:v,doc:A})}break}case sr:u.push({indent:g,mode:v,doc:b.contents});break;case or:u.length>0&&o.push({indent:g,mode:v,doc:l1});break;case At:switch(v){case On:if(!b.hard){b.soft||(l.write(" "),s+=1);break}a=!0;case on:if(u.length>0){o.push({indent:g,mode:v,doc:b},...u.reverse()),u.length=0;break}b.literal?(l.write(i),s=0,g.root&&(g.root.value&&l.write(g.root.value),s=g.root.length)):(l.trim(),l.write(i+g.value),s=g.length);break}break;case Bn:o.push({indent:g,mode:v,doc:b.contents});break;case an:break;default:throw new Es(b)}o.length===0&&u.length>0&&(o.push(...u.reverse()),u.length=0)}let{text:c,positions:f}=l.finish();if(f.length!==2)return{formatted:c};let[h,m]=f;return{formatted:c,cursorNodeStart:h,cursorNodeText:c.slice(h,m)}}function vE(e,t,n=0){let r=0;for(let i=n;i0}function bE(e){return e!==null&&typeof e=="object"}function Co(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:s}=t,o=n;for(;o>=0&&o!0}=t,i=s=>p1(s)&&r(s);for(let s of n(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*NE(e,t){let n=[e];for(let r=0;r(i??(i=[e,...t]),r(u,i)?[u]:cg(u,i,n))),{locStart:o,locEnd:a}=n;return s.sort((u,l)=>o(u)-o(l)||a(u)-a(l)),s}function cg(e,t,n){return o1(n.cache,e,r=>FE(r,t,n))}function AE(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"\u2026"),t+(n?" "+n:"")}function h1(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=AE(e)}function Fo(e,t){t.leading=!0,t.trailing=!1,h1(e,t)}function ui(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),h1(e,t)}function Ao(e,t){t.leading=!1,t.trailing=!0,h1(e,t)}function hg(e,t,n,r,i=[]){let{locStart:s,locEnd:o}=n,a=s(t),u=o(t),l=fg(e,i,{cache:pg,locStart:s,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),c,f,h=0,m=l.length;for(;h>1,v=l[g],b=s(v),E=o(v);if(b<=a&&u<=E)return hg(v,t,n,v,[v,...i]);if(E<=a){c=v,h=g+1;continue}if(u<=b){f=v,m=g;continue}throw new Error("Comment location overlaps with node location")}if(r?.type==="TemplateLiteral"){let{quasis:g}=r,v=zf(g,t,n);c&&zf(g,c,n)!==v&&(c=null),f&&zf(g,f,n)!==v&&(f=null)}return{enclosingNode:r,precedingNode:c,followingNode:f}}function wE(e,t){let{comments:n}=e;if(delete e.comments,!ag(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:s={}},originalText:o}=t,{ownLine:a=Qf,endOfLine:u=Qf,remaining:l=Qf}=s,c=n.map((h,m)=>({...hg(e,h,t),comment:h,text:o,options:t,ast:e,isLastComment:n.length-1===m,placement:void 0})),f=!i;for(let[h,m]of c.entries()){let{comment:g,precedingNode:v,enclosingNode:b,followingNode:E,text:A,options:C,ast:w,isLastComment:F}=m,O=CE(A,C,c,h)?"ownLine":LE(A,C,c,h)?"endOfLine":"remaining",L;if(i?(m.placement=O,L=[m]):L=[g,A,C,w,F],f&&(g.enclosingNode=b,g.precedingNode=v,g.followingNode=E),g.placement=O,O==="ownLine")a(...L)||(E?Fo(E,g):v?Ao(v,g):ui(b||w,g));else if(O==="endOfLine")u(...L)||(v?Ao(v,g):E?Fo(E,g):ui(b||w,g));else if(!l(...L))if(v&&E){let P=r.length;P>0&&r[P-1].followingNode!==E&&y2(r,C),r.push(m)}else v?Ao(v,g):E?Fo(E,g):ui(b||w,g)}if(y2(r,t),f)for(let h of n)delete h.precedingNode,delete h.enclosingNode,delete h.followingNode}function CE(e,t,n,r){let{comment:i,precedingNode:s}=n[r],{locStart:o,locEnd:a}=t,u=o(i);if(s)for(let l=r-1;l>=0;l--){let{comment:c,precedingNode:f}=n[l];if(f!==s||!dg(e.slice(a(c),u)))break;u=o(c)}return Cr(e,u,{backwards:!0})}function LE(e,t,n,r){let{comment:i,followingNode:s}=n[r],{locStart:o,locEnd:a}=t,u=a(i);if(s)for(let l=r+1;l0;--o){let{comment:a,precedingNode:u,followingNode:l}=e[o-1];Lr(u,r),Lr(l,i);let c=t.originalText.slice(t.locEnd(a),s);if(t.printer.isGap?.(c,t)??/^[\s(]*$/.test(c))s=t.locStart(a);else break}for(let[a,{comment:u}]of e.entries())a1&&a.comments.sort((u,l)=>t.locStart(u)-t.locStart(l));e.length=0}function zf(e,t,n){let r=n.locStart(t)-1;for(let i=1;i!r?.has(o)&&o.leading&&i(o)));return s.size===0?"":e.map(({node:o})=>s.has(o)?RE(e,t):"","comments").filter(Boolean)}function ME(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(c=>c.trailing)),s=t[Symbol.for("printedComments")],o=n?.filter??mg,a=new Set(r?.filter(c=>i.has(c)&&!s?.has(c)&&o(c)));if(a.size===0)return"";let u=[],l;return e.each(({node:c})=>{i.has(c)&&(l=OE(e,t,l),a.has(c)&&u.push(l.doc))},"comments"),u}function PE(e,t,n,r){let i=kE(e,n,r),s=ME(e,n,r);return i||s?Mu(t,o=>[i,o,s]):t}function BE(e){let{[ju]:t,[Symbol.for("printedComments")]:n}=e;for(let r of t){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}function Dg({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(i=>i.languages??[]),r=[];for(let i of qE(Object.assign({},...e.map(({options:s})=>s),jE)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...GE(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>s.defaultOptions?.[i.name]!==void 0).map(s=>[s.name,s.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*GE(e,t,n){let r=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!r.has(s)){r.add(s);let o=n.find(u=>u.parsers&&Wu(u.parsers,s)),a=i.name;o?.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function qE(e){let t=[];for(let[n,r]of Object.entries(e)){let i={name:n,...r};Array.isArray(i.default)&&(i.default=Ft(0,i.default,-1).value),t.push(i)}return t}function QE(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let n=e.Deno?.build?.os;return typeof n=="string"?n==="windows":e.navigator?.platform?.startsWith("Win")??!1}function yg(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function YE(e){return e=yg(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function JE(e){e=yg(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function XE(e){return zE?JE(e):YE(e)}function b2(e,t){if(!t)return;let n=KE(t).toLowerCase();return e.find(({filenames:r})=>r?.some(i=>i.toLowerCase()===n))??e.find(({extensions:r})=>r?.some(i=>n.endsWith(i)))}function eb(e,t){if(t)return e.find(({name:n})=>n.toLowerCase()===t)??e.find(({aliases:n})=>n?.includes(t))??e.find(({extensions:n})=>n?.includes(`.${t}`))}function x2(e,t){if(t){if(ZE(t))try{t=XE(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:n})=>n?.({filepath:t}))}}function nb(e,t){let n=WE(0,e.plugins).flatMap(r=>r.languages??[]);return(eb(n,t.language)??b2(n,t.physicalFile)??b2(n,t.file)??x2(n,t.physicalFile)??x2(n,t.file)??tb?.(n,t.physicalFile))?.parsers[0]}function T2(e,t,n,r){return[`Invalid ${kn.red(r.key(e))} value.`,`Expected ${kn.blue(n)},`,`but received ${t===xg?kn.gray("nothing"):kn.red(r.value(t))}.`].join(" ")}function _g({text:e,list:t},n){let r=[];return e&&r.push(`- ${kn.blue(e)}`),t&&r.push([`- ${kn.blue(t.title)}:`].concat(t.values.map(i=>_g(i,n-_2.length).replace(/^|\n/g,`$&${_2}`))).join(` -`)),Tg(r,n)}function Tg(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,s]=e.map(o=>o.split(` -`,1)[0].length);return i>t&&i>s?r:n}function Jf(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let s=e.length,o=t.length;for(;s>0&&e.charCodeAt(~-s)===t.charCodeAt(~-o);)s--,o--;let a=0;for(;ar)return r;if(s===0)return r!==void 0&&o>r?r:o;let u,l,c,f,h=0,m=0;for(;hl?f>l?l+1:f:f>c?c+1:f;if(r!==void 0){let g=l;for(h=0;hr)return r}}return Ds.length=s,Yf.length=s,r!==void 0&&l>r?r:l}function sb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let u of t)if(u===e)return u;if(r===0)return;let s,o=Number.POSITIVE_INFINITY,a=new Set;for(let u of t){if(a.has(u))continue;a.add(u);let l=Math.abs(u.length-i);if(l>=o||r!==void 0&&l>r)continue;let c=Number.isFinite(o)?r===void 0?o:Math.min(o,r):r,f=c===void 0?Jf(e,u):Jf(e,u,{maxDistance:c});if(r!==void 0&&f>r)continue;let h=f;if(c!==void 0&&f===c&&c===r&&(h=Jf(e,u)),hr))return s}function ab(e,t){let n=new e(t),r=Object.create(n);for(let i of ob)i in t&&(r[i]=ub(t[i],n,Or.prototype[i].length));return r}function ub(e,t,n){return typeof e=="function"?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}function N2({from:e,to:t}){return{from:[e],to:t}}function hb(e,t){let n=Object.create(null);for(let r of e){let i=r[t];if(n[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n[i]=r}return n}function db(e,t){let n=new Map;for(let r of e){let i=r[t];if(n.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n.set(i,r)}return n}function mb(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function gb(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function vb(e){return e===Math.floor(e)}function Db(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):n!=="string"?Number(e)-Number(t):e.localeCompare(t)}function yb(e){return(...t)=>{let n=e(...t);return typeof n=="string"?new Error(n):n}}function S2(e){return e===void 0?{}:e}function Sg(e){if(typeof e=="string")return{text:e};let{text:t,list:n}=e;return Eb((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(Sg)}}:{text:t}}function F2(e,t){return e===!0?!0:e===!1?{value:t}:e}function A2(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function w2(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function t1(e,t){return e===void 0?[]:Array.isArray(e)?e.map(n=>w2(n,t)):[w2(e,t)]}function C2(e,t){let n=t1(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}function Eb(e,t){if(!e)throw new Error(t)}function wb(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(r){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=ys;let a=i?Array.isArray(i)?(h,m)=>i.includes(h)?{[h]:m}:void 0:(h,m)=>({[h]:m}):(h,m,g)=>{let{_:v,...b}=g.schemas;return Ng(h,m,{...g,schemas:b})},u=Cb(t,{isCLI:r,FlagSchema:s}),l=new Ab(u,{logger:n,unknown:a,descriptor:o}),c=n!==!1;c&&Xf&&(l._hasDeprecationWarned=Xf);let f=l.normalize(e);return c&&(Xf=l._hasDeprecationWarned),f}function Cb(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(cb.create({name:"_"}));for(let i of e)r.push(Lb(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(lb.create({name:i.alias,sourceName:i.name}));return r}function Lb(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,s={name:i},o,a={};switch(e.type){case"int":o=_b,t&&(s.preprocess=Number);break;case"string":o=L2;break;case"choice":o=bb,s.choices=e.choices.map(u=>u?.redirect?{...u,redirect:{to:{key:e.name,value:u.redirect}}}:u);break;case"boolean":o=pb;break;case"flag":o=r,s.flags=n.flatMap(u=>[u.alias,u.description&&u.name,u.oppositeDescription&&`no-${u.name}`].filter(Boolean));break;case"path":o=L2;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(u,l,c)=>e.exception(u)||l.validate(u,c):s.validate=(u,l,c)=>u===void 0||l.validate(u,c),e.redirect&&(a.redirect=u=>u?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(a.deprecated=!0),t&&!e.array){let u=s.preprocess||(l=>l);s.preprocess=(l,c,f)=>c.preprocess(u(Array.isArray(l)?Ft(0,l,-1):l),f)}return e.array?fb.create({...t?{preprocess:u=>Array.isArray(u)?u:[u]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}function Pb(e){return!!e?.[kb]}async function Bb(e,t,n,r){let{node:i}=n,{language:s}=i;if(!Ag.has(s))return;let o=i.value.trim(),a;if(o){let u=s==="yaml"?s:Eg(r,{language:s});if(!u)return;a=o?await e(o,{parser:u}):""}else a=o;return Y2([i.startDelimiter,i.explicitLanguage??"",Zn,a,a?Zn:"",i.endDelimiter])}function Vb(e,t){return wg({node:e})&&(delete t.end,delete t.raw,delete t.value),t}function jb({node:e}){return e.raw}function $b(e,t){let n=e?r=>e(r,Cg):qb;return t?new Proxy(n,{apply:(r,i,s)=>m1(s[0])?Mb:Reflect.apply(r,i,s)}):n}function Lg(e,t){if(!t)throw new Error("parserName is required.");let n=Fg(0,e,i=>i.parsers&&Wu(i.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new vg(r)}function Hb(e,t){if(!t)throw new Error("astFormat is required.");let n=Fg(0,e,i=>i.printers&&Wu(i.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new vg(r)}function g1({plugins:e,parser:t}){let n=Lg(e,t);return Ig(n,t)}function Ig(e,t){let n=e.parsers[t];return typeof n=="function"?n():n}async function Wb(e,t){let n=e.printers[t],r=typeof n=="function"?await n():n;return Yb(r)}function Qb(e){let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:s,...o}=e;t=Zb(t);let a=t.experimental_frontMatterSupport;n=I2(n,a.massageAstNode||a.embed||a.print);let u=i;i&&a.massageAstNode&&(u=new Proxy(i,{apply(f,h,m){return Ub(...m),Reflect.apply(f,h,m)}}));let l=r;if(r){let f;l=new Proxy(r,{get(h,m,g){return m==="getVisitorKeys"?(f??(f=r.getVisitorKeys?I2(r.getVisitorKeys,a.massageAstNode||a.embed):n),f):Reflect.get(h,m,g)},apply:(h,m,g)=>a.embed&&wg(...g)?Bb:Reflect.apply(h,m,g)})}let c=s;return a.print&&(c=new Proxy(s,{apply(f,h,m){let[g]=m;return m1(g.node)?Gb(g):Reflect.apply(f,h,m)}})),{features:t,getVisitorKeys:n,embed:l,massageAstNode:u,print:c,...o}}function Yb(e){return o1(zb,e,Qb)}function Kb(e){return{...Xb,...e}}function Zb(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:Kb(e?.experimental_frontMatterSupport)}}async function e6(e,t={}){let n={...e};if(!n.parser){if(!n.filepath)throw new E2("No parser and no file path given, couldn't infer a parser.");if(n.parser=Eg(n,{physicalFile:n.filepath}),!n.parser)throw new E2(`No parser could be inferred for file "${n.filepath}".`)}let r=Dg({plugins:e.plugins,showDeprecated:!0}).options,i={...R2,...Object.fromEntries(r.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},s=Lg(n.plugins,n.parser),o=await Ig(s,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let a=s.printers?.[o.astFormat]?s:Hb(n.plugins,o.astFormat),u=await Wb(a,o.astFormat);n.printer=u,n.getVisitorKeys=u.getVisitorKeys;let l=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,f])=>f!==void 0)):{},c={...i,...l};for(let[f,h]of Object.entries(c))n[f]??(n[f]=h);return n.parser==="json"&&(n.trailingComma="none"),Ib(n,r,{passThrough:Object.keys(R2),...t})}function t6(e,t,n,r){let i={column:null,line:-1,...e.start},s={...i,...e.end},{linesAbove:o=2,linesBelow:a=3}=n||{},u=i.line-r,l=i.column,c=s.line-r,f=s.column,h=Math.max(u-(o+1),0),m=Math.min(t.length,c+a);u===-1&&(h=0),c===-1&&(m=t.length);let g=c-u,v={};if(g)for(let b=0;b<=g;b++){let E=b+u;if(l==null)v[E]=!0;else if(b===0){let A=t[E-1].length;v[E]=[l,A-l]}else if(b===g)v[E]=[0,f];else{let A=t[E-1].length;v[E]=[0,A]}}else if(l===f)l!=null?v[u]=[l,0]:v[u]=!0;else{let b=l??0,E=f??b;v[u]=[b,E-b]}return{start:h,end:m,markerLines:v}}function n6(e,t,n={},r){let{defs:i,highlight:s}=r||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},o=(n.startLine||1)-1,a=e.split(O2),{start:u,end:l,markerLines:c}=t6(t,a,n,o),f=t.start&&typeof t.start.column=="number",h=String(l+o).length,m=s(e).split(O2,l).slice(u,l).map((g,v)=>{let b=u+1+v,E=` ${` ${b+o}`.slice(-h)} |`,A=c[b],C=!c[b+1];if(A){let w="";if(Array.isArray(A)){let F=g.slice(0,A[0]).replace(/[^\t]/g," "),O=A[1]||1;w=[` - `,i.gutter(E.replace(/\d/g," "))," ",F,i.marker("^").repeat(O)].join(""),C&&n.message&&(w+=" "+i.message(n.message))}return[i.marker(">"),i.gutter(E),g.length>0?` ${g}`:"",w].join("")}else return` ${i.gutter(E)}${g.length>0?` ${g}`:""}`}).join(` +(()=>{var n7=Object.create;var yl=Object.defineProperty;var r7=Object.getOwnPropertyDescriptor;var i7=Object.getOwnPropertyNames;var s7=Object.getPrototypeOf,o7=Object.prototype.hasOwnProperty;var Tp=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var a7=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var or=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Sp=(e,t)=>{for(var n in t)yl(e,n,{get:t[n],enumerable:!0})},u7=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of i7(t))!o7.call(e,i)&&i!==n&&yl(e,i,{get:()=>t[i],enumerable:!(r=r7(t,i))||r.enumerable});return e};var El=(e,t,n)=>(n=e!=null?n7(s7(e)):{},u7(t||!e||!e.__esModule?yl(n,"default",{value:e,enumerable:!0}):n,e));var O2=or((eV,qu)=>{"use strict";function R2(e,t){if(e!=null)return e;var n=new Error(t!==void 0?t:"Got unexpected "+e);throw n.framesToPop=1,n}qu.exports=R2;qu.exports.default=R2;Object.defineProperty(qu.exports,"__esModule",{value:!0})});var Ho=or((JV,H2)=>{"use strict";var $2="[^\\\\/]",bb="(?=.)",j2="[^/]",h1="(?:\\/|$)",G2="(?:^|\\/)",m1=`\\.{1,2}${h1}`,xb="(?!\\.)",vb=`(?!${G2}${m1})`,_b=`(?!\\.{0,1}${h1})`,Nb=`(?!${m1})`,Tb="[^.\\/]",Sb=`${j2}*?`,Fb="/",q2={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:bb,QMARK:j2,END_ANCHOR:h1,DOTS_SLASH:m1,NO_DOT:xb,NO_DOTS:vb,NO_DOT_SLASH:_b,NO_DOTS_SLASH:Nb,QMARK_NO_DOT:Tb,STAR:Sb,START_ANCHOR:G2,SEP:Fb},Ab={...q2,SLASH_LITERAL:"[\\\\/]",QMARK:$2,STAR:`${$2}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},Cb={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};H2.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Cb,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?Ab:q2}}});var Zu=or(Vt=>{"use strict";var{REGEX_BACKSLASH:wb,REGEX_REMOVE_BACKSLASH:Lb,REGEX_SPECIAL_CHARS:Ib,REGEX_SPECIAL_CHARS_GLOBAL:Rb}=Ho();Vt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Vt.hasRegexChars=e=>Ib.test(e);Vt.isRegexChar=e=>e.length===1&&Vt.hasRegexChars(e);Vt.escapeRegex=e=>e.replace(Rb,"\\$1");Vt.toPosixSlashes=e=>e.replace(wb,"/");Vt.removeBackslashes=e=>e.replace(Lb,t=>t==="\\"?"":t);Vt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Vt.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?Vt.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};Vt.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};Vt.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s};Vt.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")});var eg=or((KV,Z2)=>{"use strict";var W2=Zu(),{CHAR_ASTERISK:g1,CHAR_AT:Ob,CHAR_BACKWARD_SLASH:Wo,CHAR_COMMA:kb,CHAR_DOT:D1,CHAR_EXCLAMATION_MARK:Q2,CHAR_FORWARD_SLASH:K2,CHAR_LEFT_CURLY_BRACE:y1,CHAR_LEFT_PARENTHESES:E1,CHAR_LEFT_SQUARE_BRACKET:Mb,CHAR_PLUS:Pb,CHAR_QUESTION_MARK:z2,CHAR_RIGHT_CURLY_BRACE:Bb,CHAR_RIGHT_PARENTHESES:Y2,CHAR_RIGHT_SQUARE_BRACKET:Vb}=Ho(),J2=e=>e===K2||e===Wo,X2=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Ub=(e,t)=>{let n=t||{},r=e.length-1,i=n.parts===!0||n.scanToEnd===!0,s=[],o=[],a=[],u=e,l=-1,c=0,f=0,h=!1,m=!1,g=!1,E=!1,v=!1,N=!1,L=!1,M=!1,w=!1,R=0,V,S,k={value:"",depth:0,isGlob:!1},T=()=>l>=r,A=()=>u.charCodeAt(l+1),j=()=>(V=S,u.charCodeAt(++l));for(;l0&&(te=u.slice(0,c),u=u.slice(c),f-=c),Q&&g===!0&&f>0?(Q=u.slice(0,f),C=u.slice(f)):g===!0?(Q="",C=u):Q=u,Q&&Q!==""&&Q!=="/"&&Q!==u&&J2(Q.charCodeAt(Q.length-1))&&(Q=Q.slice(0,-1)),n.unescape===!0&&(C&&(C=W2.removeBackslashes(C)),Q&&L===!0&&(Q=W2.removeBackslashes(Q)));let x={prefix:te,input:e,start:c,base:Q,glob:C,isBrace:h,isBracket:m,isGlob:g,isExtglob:E,isGlobstar:v,negated:M};if(n.tokens===!0&&(x.maxDepth=0,J2(S)||o.push(k),x.tokens=o),n.parts===!0||n.tokens===!0){let B;for(let P=0;P{"use strict";var el=Ho(),hn=Zu(),{MAX_LENGTH:tl,POSIX_REGEX_SOURCE:$b,REGEX_NON_SPECIAL_CHARS:jb,REGEX_SPECIAL_CHARS_BACKREF:Gb,REPLACEMENTS:tg}=el,qb=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(i=>hn.escapeRegex(i)).join("..")}return n},Fs=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,ng=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=tg[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(tl,n.maxLength):tl,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let s={type:"bos",value:"",output:n.prepend||""},o=[s],a=n.capture?"":"?:",u=el.globChars(n.windows),l=el.extglobChars(u),{DOT_LITERAL:c,PLUS_LITERAL:f,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:E,NO_DOT_SLASH:v,NO_DOTS_SLASH:N,QMARK:L,QMARK_NO_DOT:M,STAR:w,START_ANCHOR:R}=u,V=Y=>`(${a}(?:(?!${R}${Y.dot?g:c}).)*?)`,S=n.dot?"":E,k=n.dot?L:M,T=n.bash===!0?V(n):w;n.capture&&(T=`(${T})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let A={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=hn.removePrefix(e,A),i=e.length;let j=[],Q=[],te=[],C=s,x,B=()=>A.index===i-1,P=A.peek=(Y=1)=>e[A.index+Y],q=A.advance=()=>e[++A.index],J=()=>e.slice(A.index+1),se=(Y="",Ne=0)=>{A.consumed+=Y,A.index+=Ne},Oe=Y=>{A.output+=Y.output!=null?Y.output:Y.value,se(Y.value)},Ke=()=>{let Y=1;for(;P()==="!"&&(P(2)!=="("||P(3)==="?");)q(),A.start++,Y++;return Y%2===0?!1:(A.negated=!0,A.start++,!0)},$t=Y=>{A[Y]++,te.push(Y)},Rt=Y=>{A[Y]--,te.pop()},le=Y=>{if(C.type==="globstar"){let Ne=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),X=Y.extglob===!0||j.length&&(Y.type==="pipe"||Y.type==="paren");Y.type!=="slash"&&Y.type!=="paren"&&!Ne&&!X&&(A.output=A.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=T,A.output+=C.output)}if(j.length&&Y.type!=="paren"&&!l[Y.value]&&(j[j.length-1].inner+=Y.value),(Y.value||Y.output)&&Oe(Y),C&&C.type==="text"&&Y.type==="text"){C.value+=Y.value,C.output=(C.output||"")+Y.value;return}Y.prev=C,o.push(Y),C=Y},mn=(Y,Ne)=>{let X={...l[Ne],conditions:1,inner:""};X.prev=C,X.parens=A.parens,X.output=A.output;let de=(n.capture?"(":"")+X.open;$t("parens"),le({type:Y,value:Ne,output:A.output?"":m}),le({type:"paren",extglob:!0,value:q(),output:de}),j.push(X)},nr=Y=>{let Ne=Y.close+(n.capture?")":"");if(Y.type==="negate"){let X=T;Y.inner&&Y.inner.length>1&&Y.inner.includes("/")&&(X=V(n)),(X!==T||B()||/^\)+$/.test(J()))&&(Ne=Y.close=`)$))${X}`),Y.prev.type==="bos"&&B()&&(A.negatedExtglob=!0)}le({type:"paren",extglob:!0,value:x,output:Ne}),Rt("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let Y=!1,Ne=e.replace(Gb,(X,de,Ce,mt,We,Rs)=>mt==="\\"?(Y=!0,X):mt==="?"?de?de+mt+(We?L.repeat(We.length):""):Rs===0?k+(We?L.repeat(We.length):""):L.repeat(Ce.length):mt==="."?c.repeat(Ce.length):mt==="*"?de?de+mt+(We?T:""):T:de?X:`\\${X}`);return Y===!0&&(n.unescape===!0?Ne=Ne.replace(/\\/g,""):Ne=Ne.replace(/\\+/g,X=>X.length%2===0?"\\\\":X?"\\":"")),Ne===e&&n.contains===!0?(A.output=e,A):(A.output=hn.wrapOutput(Ne,A,t),A)}for(;!B();){if(x=q(),x==="\0")continue;if(x==="\\"){let X=P();if(X==="/"&&n.bash!==!0||X==="."||X===";")continue;if(!X){x+="\\",le({type:"text",value:x});continue}let de=/^\\+/.exec(J()),Ce=0;if(de&&de[0].length>2&&(Ce=de[0].length,A.index+=Ce,Ce%2!==0&&(x+="\\")),n.unescape===!0?x=q()||"":x+=q()||"",A.brackets===0){le({type:"text",value:x});continue}}if(A.brackets>0&&(x!=="]"||C.value==="["||C.value==="[^")){if(n.posix!==!1&&x===":"){let X=C.value.slice(1);if(X.includes("[")&&(C.posix=!0,X.includes(":"))){let de=C.value.lastIndexOf("["),Ce=C.value.slice(0,de),mt=C.value.slice(de+2),We=$b[mt];if(We){C.value=Ce+We,A.backtrack=!0,q(),!s.output&&o.indexOf(C)===1&&(s.output=m);continue}}}(x==="["&&P()!==":"||x==="-"&&P()==="]")&&(x=`\\${x}`),x==="]"&&(C.value==="["||C.value==="[^")&&(x=`\\${x}`),n.posix===!0&&x==="!"&&C.value==="["&&(x="^"),C.value+=x,Oe({value:x});continue}if(A.quotes===1&&x!=='"'){x=hn.escapeRegex(x),C.value+=x,Oe({value:x});continue}if(x==='"'){A.quotes=A.quotes===1?0:1,n.keepQuotes===!0&&le({type:"text",value:x});continue}if(x==="("){$t("parens"),le({type:"paren",value:x});continue}if(x===")"){if(A.parens===0&&n.strictBrackets===!0)throw new SyntaxError(Fs("opening","("));let X=j[j.length-1];if(X&&A.parens===X.parens+1){nr(j.pop());continue}le({type:"paren",value:x,output:A.parens?")":"\\)"}),Rt("parens");continue}if(x==="["){if(n.nobracket===!0||!J().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(Fs("closing","]"));x=`\\${x}`}else $t("brackets");le({type:"bracket",value:x});continue}if(x==="]"){if(n.nobracket===!0||C&&C.type==="bracket"&&C.value.length===1){le({type:"text",value:x,output:`\\${x}`});continue}if(A.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(Fs("opening","["));le({type:"text",value:x,output:`\\${x}`});continue}Rt("brackets");let X=C.value.slice(1);if(C.posix!==!0&&X[0]==="^"&&!X.includes("/")&&(x=`/${x}`),C.value+=x,Oe({value:x}),n.literalBrackets===!1||hn.hasRegexChars(X))continue;let de=hn.escapeRegex(C.value);if(A.output=A.output.slice(0,-C.value.length),n.literalBrackets===!0){A.output+=de,C.value=de;continue}C.value=`(${a}${de}|${C.value})`,A.output+=C.value;continue}if(x==="{"&&n.nobrace!==!0){$t("braces");let X={type:"brace",value:x,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};Q.push(X),le(X);continue}if(x==="}"){let X=Q[Q.length-1];if(n.nobrace===!0||!X){le({type:"text",value:x,output:x});continue}let de=")";if(X.dots===!0){let Ce=o.slice(),mt=[];for(let We=Ce.length-1;We>=0&&(o.pop(),Ce[We].type!=="brace");We--)Ce[We].type!=="dots"&&mt.unshift(Ce[We].value);de=qb(mt,n),A.backtrack=!0}if(X.comma!==!0&&X.dots!==!0){let Ce=A.output.slice(0,X.outputIndex),mt=A.tokens.slice(X.tokensIndex);X.value=X.output="\\{",x=de="\\}",A.output=Ce;for(let We of mt)A.output+=We.output||We.value}le({type:"brace",value:x,output:de}),Rt("braces"),Q.pop();continue}if(x==="|"){j.length>0&&j[j.length-1].conditions++,le({type:"text",value:x});continue}if(x===","){let X=x,de=Q[Q.length-1];de&&te[te.length-1]==="braces"&&(de.comma=!0,X="|"),le({type:"comma",value:x,output:X});continue}if(x==="/"){if(C.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",o.pop(),C=s;continue}le({type:"slash",value:x,output:h});continue}if(x==="."){if(A.braces>0&&C.type==="dot"){C.value==="."&&(C.output=c);let X=Q[Q.length-1];C.type="dots",C.output+=x,C.value+=x,X.dots=!0;continue}if(A.braces+A.parens===0&&C.type!=="bos"&&C.type!=="slash"){le({type:"text",value:x,output:c});continue}le({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(C&&C.value==="(")&&n.noextglob!==!0&&P()==="("&&P(2)!=="?"){mn("qmark",x);continue}if(C&&C.type==="paren"){let de=P(),Ce=x;if(de==="<"&&!hn.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(de)||de==="<"&&!/<([!=]|\w+>)/.test(J()))&&(Ce=`\\${x}`),le({type:"text",value:x,output:Ce});continue}if(n.dot!==!0&&(C.type==="slash"||C.type==="bos")){le({type:"qmark",value:x,output:M});continue}le({type:"qmark",value:x,output:L});continue}if(x==="!"){if(n.noextglob!==!0&&P()==="("&&(P(2)!=="?"||!/[!=<:]/.test(P(3)))){mn("negate",x);continue}if(n.nonegate!==!0&&A.index===0){Ke();continue}}if(x==="+"){if(n.noextglob!==!0&&P()==="("&&P(2)!=="?"){mn("plus",x);continue}if(C&&C.value==="("||n.regex===!1){le({type:"plus",value:x,output:f});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||A.parens>0){le({type:"plus",value:x});continue}le({type:"plus",value:f});continue}if(x==="@"){if(n.noextglob!==!0&&P()==="("&&P(2)!=="?"){le({type:"at",extglob:!0,value:x,output:""});continue}le({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let X=jb.exec(J());X&&(x+=X[0],A.index+=X[0].length),le({type:"text",value:x});continue}if(C&&(C.type==="globstar"||C.star===!0)){C.type="star",C.star=!0,C.value+=x,C.output=T,A.backtrack=!0,A.globstar=!0,se(x);continue}let Y=J();if(n.noextglob!==!0&&/^\([^?]/.test(Y)){mn("star",x);continue}if(C.type==="star"){if(n.noglobstar===!0){se(x);continue}let X=C.prev,de=X.prev,Ce=X.type==="slash"||X.type==="bos",mt=de&&(de.type==="star"||de.type==="globstar");if(n.bash===!0&&(!Ce||Y[0]&&Y[0]!=="/")){le({type:"star",value:x,output:""});continue}let We=A.braces>0&&(X.type==="comma"||X.type==="brace"),Rs=j.length&&(X.type==="pipe"||X.type==="paren");if(!Ce&&X.type!=="paren"&&!We&&!Rs){le({type:"star",value:x,output:""});continue}for(;Y.slice(0,3)==="/**";){let _i=e[A.index+4];if(_i&&_i!=="/")break;Y=Y.slice(3),se("/**",3)}if(X.type==="bos"&&B()){C.type="globstar",C.value+=x,C.output=V(n),A.output=C.output,A.globstar=!0,se(x);continue}if(X.type==="slash"&&X.prev.type!=="bos"&&!mt&&B()){A.output=A.output.slice(0,-(X.output+C.output).length),X.output=`(?:${X.output}`,C.type="globstar",C.output=V(n)+(n.strictSlashes?")":"|$)"),C.value+=x,A.globstar=!0,A.output+=X.output+C.output,se(x);continue}if(X.type==="slash"&&X.prev.type!=="bos"&&Y[0]==="/"){let _i=Y[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(X.output+C.output).length),X.output=`(?:${X.output}`,C.type="globstar",C.output=`${V(n)}${h}|${h}${_i})`,C.value+=x,A.output+=X.output+C.output,A.globstar=!0,se(x+q()),le({type:"slash",value:"/",output:""});continue}if(X.type==="bos"&&Y[0]==="/"){C.type="globstar",C.value+=x,C.output=`(?:^|${h}|${V(n)}${h})`,A.output=C.output,A.globstar=!0,se(x+q()),le({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-C.output.length),C.type="globstar",C.output=V(n),C.value+=x,A.output+=C.output,A.globstar=!0,se(x);continue}let Ne={type:"star",value:x,output:T};if(n.bash===!0){Ne.output=".*?",(C.type==="bos"||C.type==="slash")&&(Ne.output=S+Ne.output),le(Ne);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&n.regex===!0){Ne.output=x,le(Ne);continue}(A.index===A.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(A.output+=v,C.output+=v):n.dot===!0?(A.output+=N,C.output+=N):(A.output+=S,C.output+=S),P()!=="*"&&(A.output+=m,C.output+=m)),le(Ne)}for(;A.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(Fs("closing","]"));A.output=hn.escapeLast(A.output,"["),Rt("brackets")}for(;A.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(Fs("closing",")"));A.output=hn.escapeLast(A.output,"("),Rt("parens")}for(;A.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(Fs("closing","}"));A.output=hn.escapeLast(A.output,"{"),Rt("braces")}if(n.strictSlashes!==!0&&(C.type==="star"||C.type==="bracket")&&le({type:"maybe_slash",value:"",output:`${h}?`}),A.backtrack===!0){A.output="";for(let Y of A.tokens)A.output+=Y.output!=null?Y.output:Y.value,Y.suffix&&(A.output+=Y.suffix)}return A};ng.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(tl,n.maxLength):tl,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=tg[e]||e;let{DOT_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:f,STAR:h,START_ANCHOR:m}=el.globChars(n.windows),g=n.dot?c:l,E=n.dot?f:l,v=n.capture?"":"?:",N={negated:!1,prefix:""},L=n.bash===!0?".*?":h;n.capture&&(L=`(${L})`);let M=S=>S.noglobstar===!0?L:`(${v}(?:(?!${m}${S.dot?u:s}).)*?)`,w=S=>{switch(S){case"*":return`${g}${a}${L}`;case".*":return`${s}${a}${L}`;case"*.*":return`${g}${L}${s}${a}${L}`;case"*/*":return`${g}${L}${o}${a}${E}${L}`;case"**":return g+M(n);case"**/*":return`(?:${g}${M(n)}${o})?${E}${a}${L}`;case"**/*.*":return`(?:${g}${M(n)}${o})?${E}${L}${s}${a}${L}`;case"**/.*":return`(?:${g}${M(n)}${o})?${s}${a}${L}`;default:{let k=/^(.*?)\.(\w+)$/.exec(S);if(!k)return;let T=w(k[1]);return T?T+s+k[2]:void 0}}},R=hn.removePrefix(e,N),V=w(R);return V&&n.strictSlashes!==!0&&(V+=`${o}?`),V};rg.exports=ng});var ag=or((eU,og)=>{"use strict";var Hb=eg(),b1=ig(),sg=Zu(),Wb=Ho(),Qb=e=>e&&typeof e=="object"&&!Array.isArray(e),Xe=(e,t,n=!1)=>{if(Array.isArray(e)){let c=e.map(h=>Xe(h,t,n));return h=>{for(let m of c){let g=m(h);if(g)return g}return!1}}let r=Qb(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=i.windows,o=r?Xe.compileRe(e,t):Xe.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let c={...t,ignore:null,onMatch:null,onResult:null};u=Xe(i.ignore,c,n)}let l=(c,f=!1)=>{let{isMatch:h,match:m,output:g}=Xe.test(c,o,t,{glob:e,posix:s}),E={glob:e,state:a,regex:o,posix:s,input:c,output:g,match:m,isMatch:h};return typeof i.onResult=="function"&&i.onResult(E),h===!1?(E.isMatch=!1,f?E:!1):u(c)?(typeof i.onIgnore=="function"&&i.onIgnore(E),E.isMatch=!1,f?E:!1):(typeof i.onMatch=="function"&&i.onMatch(E),f?E:!0)};return n&&(l.state=a),l};Xe.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=n||{},o=s.format||(i?sg.toPosixSlashes:null),a=e===r,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===r),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Xe.matchBase(e,t,n,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};Xe.matchBase=(e,t,n)=>(t instanceof RegExp?t:Xe.makeRe(t,n)).test(sg.basename(e));Xe.isMatch=(e,t,n)=>Xe(t,n)(e);Xe.parse=(e,t)=>Array.isArray(e)?e.map(n=>Xe.parse(n,t)):b1(e,{...t,fastpaths:!1});Xe.scan=(e,t)=>Hb(e,t);Xe.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=Xe.toRegex(a,t);return r===!0&&(u.state=e),u};Xe.makeRe=(e,t,n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i=t||{},s={negated:!1,fastpaths:!0},o="",a;return e.startsWith("./")&&(e=e.slice(2),o=s.prefix="./"),i.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(a=b1.fastpaths(e,t)),a===void 0?(s=b1(e,t),s.prefix=o+(s.prefix||"")):s.output=a,Xe.compileRe(s,t,n,r)};Xe.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};Xe.constants=Wb;og.exports=Xe});var lg=or((tU,ug)=>{"use strict";ug.exports=ag()});var H4={};Sp(H4,{__debug:()=>q4,check:()=>j4,default:()=>Ug,doc:()=>z1,format:()=>tp,formatWithCursor:()=>ep,getSupportInfo:()=>G4,util:()=>Y1,version:()=>V4});function n6(e,t,n){return t6.diff(e,t,n)}function a6(e){let t=e.indexOf(k1);return t!==-1?e.charAt(t+1)===ul?jg:$g:s6}function M1(e){return e===$g?k1:e===jg?Gg:o6}function qg(e,t){let n=u6.get(t);return e.match(n)?.length??0}function c6(e){return al(0,e,l6,ul)}function f6(e){return this[e<0?this.length+e:e]}function d6(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===` +`);)t--;return t`'${i}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${r}.`}function y6(e,t,n,r){let i=[e];for(;i.length>0;){let s=i.pop();if(s===dg){n(i.pop());continue}n&&i.push(s,dg);let o=vi(s);if(!o)throw new ws(s);if(t?.(s)!==!1)switch(o){case Yn:case Rn:{let a=o===Yn?s:s.parts;for(let u=a.length,l=u-1;l>=0;--l)i.push(a[l]);break}case Qt:i.push(s.flatContents,s.breakContents);break;case Ut:if(r&&s.expandedStates)for(let a=s.expandedStates.length,u=a-1;u>=0;--u)i.push(s.expandedStates[u]);else i.push(s.contents);break;case Xn:case Jn:case Zn:case On:case er:i.push(s.contents);break;case xi:case Lr:case Kn:case tr:case _t:case nn:break;default:throw new ws(s)}}}function cl(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(s){return P1(n,s,i)}function i(s){switch(vi(s)){case Yn:return t(s.map(r));case Rn:return t({...s,parts:s.parts.map(r)});case Qt:return t({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case Ut:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(r),a=o[0]):a=r(a),t({...s,contents:a,expandedStates:o})}case Xn:case Jn:case Zn:case On:case er:return t({...s,contents:r(s.contents)});case xi:case Lr:case Kn:case tr:case _t:case nn:return t(s);default:throw new ws(s)}}}function V1(e,t,n){let r=n,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,r=a)}return B1(e,s),r}function E6(e){if(e.type===Ut&&e.break||e.type===_t&&e.hard||e.type===nn)return!0}function b6(e){return V1(e,E6,!1)}function hg(e){if(e.length>0){let t=vt(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function x6(e){let t=new Set,n=[];function r(s){if(s.type===nn&&hg(n),s.type===Ut){if(n.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===Ut&&n.pop().break&&hg(n)}B1(e,r,i,!0)}function v6(e){return e.type===_t&&!e.hard?e.soft?"":" ":e.type===Qt?e.flatContents:e}function _6(e){return cl(e,v6)}function mg(e){for(e=[...e];e.length>=2&&vt(0,e,-2).type===_t&&vt(0,e,-1).type===nn;)e.length-=2;if(e.length>0){let t=Qo(vt(0,e,-1));e[e.length-1]=t}return e}function Qo(e){switch(vi(e)){case Jn:case Zn:case Ut:case er:case On:{let t=Qo(e.contents);return{...e,contents:t}}case Qt:return{...e,breakContents:Qo(e.breakContents),flatContents:Qo(e.flatContents)};case Rn:return{...e,parts:mg(e.parts)};case Yn:return mg(e);case xi:return d6(e);case Xn:case Lr:case Kn:case tr:case _t:case nn:break;default:throw new ws(e)}return e}function Wg(e){return Qo(T6(e))}function N6(e){switch(vi(e)){case Rn:{let{parts:t}=e;if(t.every(n=>n===""))return"";if(t.length===1)return t[0];break}case Ut:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Ut&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Xn:case Jn:case Zn:case er:if(!e.contents)return"";break;case Qt:if(!e.flatContents&&!e.breakContents)return"";break;case Yn:{let t=[];for(let n of e){if(!n)continue;let[r,...i]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof vt(0,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case xi:case Lr:case Kn:case tr:case _t:case On:case nn:break;default:throw new ws(e)}return e}function T6(e){return cl(e,t=>N6(t))}function S6(e,t=e4){return cl(e,n=>typeof n=="string"?Xg(t,n.split(` +`)):n)}function F6(e){if(e.type===_t)return!0}function A6(e){return V1(e,F6,!1)}function il(e,t){return e.type===On?{...e,contents:t(e.contents)}:t(e)}function ol(e){return In(e),{type:Jn,contents:e}}function Ls(e,t){return w6(e),In(t),{type:Xn,contents:t,n:e}}function L6(e){return Ls(Number.NEGATIVE_INFINITY,e)}function zg(e){return Ls({type:"root"},e)}function I6(e){return Ls(-1,e)}function Yg(e,t,n){In(e);let r=e;if(t>0){for(let i=0;i0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${r(s.contents)}${l})`}if(s.type===Ut){let u=[];s.break&&s.break!=="propagated"&&u.push("shouldBreak: true"),s.id&&u.push(`id: ${i(s.id)}`);let l=u.length>0?`, { ${u.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(c=>r(c)).join(",")}]${l})`:`group(${r(s.contents)}${l})`}if(s.type===Rn)return`fill([${s.parts.map(u=>r(u)).join(", ")}])`;if(s.type===er)return"lineSuffix("+r(s.contents)+")";if(s.type===tr)return"lineSuffixBoundary";if(s.type===On)return`label(${JSON.stringify(s.label)}, ${r(s.contents)})`;if(s.type===Lr)return"cursor";throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let a=0;;a++){let u=o+(a>0?` #${a}`:"");if(!n.has(u))return n.add(u),t[s]=`Symbol.for(${JSON.stringify(u)})`}}}function J6(e){let t=e[0],n=e[1];for(let r=0;r=i&&gg<=s)return[i,s];s-i>n-t&&(t=i,n=s)}return[t,n]}function nx(e){if(!e)return 0;if(!tx.test(e))return e.length;let t=0;e=e.replace(j6(),n=>(t+=ex(n)?1:2,""));for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(t+=X6(r)||K6(r)?2:1)}return t}function i4(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let g of r)switch(g.type){case 0:c(),n.useTabs?u(1):l(n.tabWidth);break;case 3:{let{string:E}=g;c(),i+=E,s+=E.length;break}case 2:{let{width:E}=g;o+=1,a+=E;break}default:throw new Error(`Unexpected indent comment '${g.type}'.`)}return h(),{...e,value:i,length:s,queue:r};function u(g){i+=" ".repeat(g),s+=n.tabWidth*g}function l(g){i+=" ".repeat(g),s+=g}function c(){n.useTabs?f():h()}function f(){o>0&&u(o),m()}function h(){a>0&&l(a),m()}function m(){o=0,a=0}}function sx(e,t,n){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let r;return typeof t=="number"?t<0?r=ix:r={type:2,width:t}:r={type:3,string:t},i4(e,r,n)}function ox(e,t){return i4(e,rx,t)}function ax(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===" "||r===" ")t++;else break}return t}function s4(e){let t=ax(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}function rl(e,t,n,r,i,s){if(n===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=!1,u=[e],l="";for(;n>=0;){if(u.length===0){if(o===0)return!0;u.push(t[--o]);continue}let{mode:c,doc:f}=u.pop(),h=vi(f);switch(h){case xi:f&&(a&&(l+=" ",n-=1,a=!1),l+=f,n-=$1(f));break;case Yn:case Rn:{let m=h===Yn?f:f.parts,g=f[L1]??0;for(let E=m.length-1;E>=g;E--)u.push({mode:c,doc:m[E]});break}case Jn:case Xn:case Zn:case On:u.push({mode:c,doc:f.contents});break;case Kn:{let{text:m,count:g}=s4(l);l=m,n+=g;break}case Ut:{if(s&&f.break)return!1;let m=f.break?tn:c,g=f.expandedStates&&m===tn?vt(0,f.expandedStates,-1):f.contents;u.push({mode:m,doc:g});break}case Qt:{let m=(f.groupId?i[f.groupId]||wn:c)===tn?f.breakContents:f.flatContents;m&&u.push({mode:c,doc:m});break}case _t:if(c===tn||f.hard)return!0;f.soft||(a=!0);break;case er:r=!0;break;case tr:if(r)return!1;break}}return!1}function pl(e,t){let n=Object.create(null),r=t.printWidth,i=M1(t.endOfLine),s=0,o=[{indent:r4,mode:tn,doc:e}],a=!1,u=[],l=new lx;for(x6(e);o.length>0;){let{indent:g,mode:E,doc:v}=o.pop();switch(vi(v)){case xi:{let N=i!==` +`?al(0,v,` +`,i):v;N&&(l.write(N),o.length>0&&(s+=$1(N)));break}case Yn:for(let N=v.length-1;N>=0;N--)o.push({indent:g,mode:E,doc:v[N]});break;case Lr:l.markPosition();break;case Jn:o.push({indent:ox(g,t),mode:E,doc:v.contents});break;case Xn:o.push({indent:sx(g,v.n,t),mode:E,doc:v.contents});break;case Kn:s-=l.trim();break;case Ut:{let N=(function(){if(E===wn&&!a)return{indent:g,mode:v.break?tn:wn,doc:v.contents};a=!1;let L=r-s,M=u.length>0,w={indent:g,mode:wn,doc:v.contents};if(!v.break&&rl(w,o,L,M,n))return w;if(!v.expandedStates)return{indent:g,mode:tn,doc:v.contents};if(!v.break)for(let R=1;R0,n,!0);if(w===1){T?o.push(S):o.push(k);break}let A={indent:g,mode:wn,doc:V},j={indent:g,mode:tn,doc:V};if(w===2){T?o.push(A,S):o.push(j,k);break}let Q=M[L+2],te={indent:g,mode:E,doc:{...v,[L1]:L+2}},C=rl({indent:g,mode:wn,doc:[R,V,Q]},[],N,u.length>0,n,!0);o.push(te),C?o.push(A,S):T?o.push(j,S):o.push(j,k);break}case Qt:case Zn:{let N=v.groupId?n[v.groupId]:E;if(N===tn){let L=v.type===Qt?v.breakContents:v.negate?v.contents:ol(v.contents);L&&o.push({indent:g,mode:E,doc:L})}if(N===wn){let L=v.type===Qt?v.flatContents:v.negate?ol(v.contents):v.contents;L&&o.push({indent:g,mode:E,doc:L})}break}case er:u.push({indent:g,mode:E,doc:v.contents});break;case tr:u.length>0&&o.push({indent:g,mode:E,doc:U1});break;case _t:switch(E){case wn:if(!v.hard){v.soft||(l.write(" "),s+=1);break}a=!0;case tn:if(u.length>0){o.push({indent:g,mode:E,doc:v},...u.reverse()),u.length=0;break}v.literal?(l.write(i),s=0,g.root&&(g.root.value&&l.write(g.root.value),s=g.root.length)):(l.trim(),l.write(i+g.value),s=g.length);break}break;case On:o.push({indent:g,mode:E,doc:v.contents});break;case nn:break;default:throw new ws(v)}o.length===0&&u.length>0&&(o.push(...u.reverse()),u.length=0)}let{text:c,positions:f}=l.finish();if(f.length!==2)return{formatted:c};let[h,m]=f;return{formatted:c,cursorNodeStart:h,cursorNodeText:c.slice(h,m)}}function cx(e,t,n=0){let r=0;for(let i=n;i0}function hx(e){return e!==null&&typeof e=="object"}function Xo(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:s}=t,o=n;for(;o>=0&&o!0}=t,i=s=>G1(s)&&r(s);for(let s of n(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*yx(e,t){let n=[e];for(let r=0;r(i??(i=[e,...t]),r(u,i)?[u]:l4(u,i,n))),{locStart:o,locEnd:a}=n;return s.sort((u,l)=>o(u)-o(l)||a(u)-a(l)),s}function l4(e,t,n){return P1(n.cache,e,r=>bx(r,t,n))}function xx(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"\u2026"),t+(n?" "+n:"")}function q1(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=xx(e)}function zo(e,t){t.leading=!0,t.trailing=!1,q1(e,t)}function Di(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),q1(e,t)}function Yo(e,t){t.leading=!1,t.trailing=!0,q1(e,t)}function p4(e,t,n,r,i=[]){let{locStart:s,locEnd:o}=n,a=s(t),u=o(t),l=c4(e,i,{cache:f4,locStart:s,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),c,f,h=0,m=l.length;for(;h>1,E=l[g],v=s(E),N=o(E);if(v<=a&&u<=N)return p4(E,t,n,E,[E,...i]);if(N<=a){c=E,h=g+1;continue}if(u<=v){f=E,m=g;continue}throw new Error("Comment location overlaps with node location")}if(r?.type==="TemplateLiteral"){let{quasis:g}=r,E=T1(g,t,n);c&&T1(g,c,n)!==E&&(c=null),f&&T1(g,f,n)!==E&&(f=null)}return{enclosingNode:r,precedingNode:c,followingNode:f}}function vx(e,t){let{comments:n}=e;if(delete e.comments,!o4(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:s={}},originalText:o}=t,{ownLine:a=N1,endOfLine:u=N1,remaining:l=N1}=s,c=n.map((h,m)=>({...p4(e,h,t),comment:h,text:o,options:t,ast:e,isLastComment:n.length-1===m,placement:void 0})),f=!i;for(let[h,m]of c.entries()){let{comment:g,precedingNode:E,enclosingNode:v,followingNode:N,text:L,options:M,ast:w,isLastComment:R}=m,V=_x(L,M,c,h)?"ownLine":Nx(L,M,c,h)?"endOfLine":"remaining",S;if(i?(m.placement=V,S=[m]):S=[g,L,M,w,R],f&&(g.enclosingNode=v,g.precedingNode=E,g.followingNode=N),g.placement=V,V==="ownLine")a(...S)||(N?zo(N,g):E?Yo(E,g):Di(v||w,g));else if(V==="endOfLine")u(...S)||(E?Yo(E,g):N?zo(N,g):Di(v||w,g));else if(!l(...S))if(E&&N){let k=r.length;k>0&&r[k-1].followingNode!==N&&yg(r,M),r.push(m)}else E?Yo(E,g):N?zo(N,g):Di(v||w,g)}if(yg(r,t),f)for(let h of n)delete h.precedingNode,delete h.enclosingNode,delete h.followingNode}function _x(e,t,n,r){let{comment:i,precedingNode:s}=n[r],{locStart:o,locEnd:a}=t,u=o(i);if(s)for(let l=r-1;l>=0;l--){let{comment:c,precedingNode:f}=n[l];if(f!==s||!d4(e.slice(a(c),u)))break;u=o(c)}return Ar(e,u,{backwards:!0})}function Nx(e,t,n,r){let{comment:i,followingNode:s}=n[r],{locStart:o,locEnd:a}=t,u=a(i);if(s)for(let l=r+1;l0;--o){let{comment:a,precedingNode:u,followingNode:l}=e[o-1];Cr(u,r),Cr(l,i);let c=t.originalText.slice(t.locEnd(a),s);if(t.printer.isGap?.(c,t)??/^[\s(]*$/.test(c))s=t.locStart(a);else break}for(let[a,{comment:u}]of e.entries())a1&&a.comments.sort((u,l)=>t.locStart(u)-t.locStart(l));e.length=0}function T1(e,t,n){let r=n.locStart(t)-1;for(let i=1;i!r?.has(o)&&o.leading&&i(o)));return s.size===0?"":e.map(({node:o})=>s.has(o)?Sx(e,t):"","comments").filter(Boolean)}function Cx(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(c=>c.trailing)),s=t[Symbol.for("printedComments")],o=n?.filter??h4,a=new Set(r?.filter(c=>i.has(c)&&!s?.has(c)&&o(c)));if(a.size===0)return"";let u=[],l;return e.each(({node:c})=>{i.has(c)&&(l=Fx(e,t,l),a.has(c)&&u.push(l.doc))},"comments"),u}function wx(e,t,n,r){let i=Ax(e,n,r),s=Cx(e,n,r);return i||s?il(t,o=>[i,o,s]):t}function Lx(e){let{[ll]:t,[Symbol.for("printedComments")]:n}=e;for(let r of t){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}function D4({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(i=>i.languages??[]),r=[];for(let i of Mx(Object.assign({},...e.map(({options:s})=>s),Ox)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...kx(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>s.defaultOptions?.[i.name]!==void 0).map(s=>[s.name,s.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*kx(e,t,n){let r=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!r.has(s)){r.add(s);let o=n.find(u=>u.parsers&&hl(u.parsers,s)),a=i.name;o?.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function Mx(e){let t=[];for(let[n,r]of Object.entries(e)){let i={name:n,...r};Array.isArray(i.default)&&(i.default=vt(0,i.default,-1).value),t.push(i)}return t}function Ux(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let n=e.Deno?.build?.os;return typeof n=="string"?n==="windows":e.navigator?.platform?.startsWith("Win")??!1}function y4(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function jx(e){return e=y4(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Gx(e){e=y4(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function qx(e){return $x?Gx(e):jx(e)}function bg(e,t){if(!t)return;let n=Hx(t).toLowerCase();return e.find(({filenames:r})=>r?.some(i=>i.toLowerCase()===n))??e.find(({extensions:r})=>r?.some(i=>n.endsWith(i)))}function Qx(e,t){if(t)return e.find(({name:n})=>n.toLowerCase()===t)??e.find(({aliases:n})=>n?.includes(t))??e.find(({extensions:n})=>n?.includes(`.${t}`))}function xg(e,t){if(t){if(Wx(t))try{t=qx(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:n})=>n?.({filepath:t}))}}function Yx(e,t){let n=Vx(0,e.plugins).flatMap(r=>r.languages??[]);return(Qx(n,t.language)??bg(n,t.physicalFile)??bg(n,t.file)??xg(n,t.physicalFile)??xg(n,t.file)??zx?.(n,t.physicalFile))?.parsers[0]}function _g(e,t,n,r){return[`Invalid ${Ln.red(r.key(e))} value.`,`Expected ${Ln.blue(n)},`,`but received ${t===x4?Ln.gray("nothing"):Ln.red(r.value(t))}.`].join(" ")}function v4({text:e,list:t},n){let r=[];return e&&r.push(`- ${Ln.blue(e)}`),t&&r.push([`- ${Ln.blue(t.title)}:`].concat(t.values.map(i=>v4(i,n-vg.length).replace(/^|\n/g,`$&${vg}`))).join(` +`)),_4(r,n)}function _4(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,s]=e.map(o=>o.split(` +`,1)[0].length);return i>t&&i>s?r:n}function F1(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let s=e.length,o=t.length;for(;s>0&&e.charCodeAt(~-s)===t.charCodeAt(~-o);)s--,o--;let a=0;for(;ar)return r;if(s===0)return r!==void 0&&o>r?r:o;let u,l,c,f,h=0,m=0;for(;hl?f>l?l+1:f:f>c?c+1:f;if(r!==void 0){let g=l;for(h=0;hr)return r}}return As.length=s,S1.length=s,r!==void 0&&l>r?r:l}function Kx(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let u of t)if(u===e)return u;if(r===0)return;let s,o=Number.POSITIVE_INFINITY,a=new Set;for(let u of t){if(a.has(u))continue;a.add(u);let l=Math.abs(u.length-i);if(l>=o||r!==void 0&&l>r)continue;let c=Number.isFinite(o)?r===void 0?o:Math.min(o,r):r,f=c===void 0?F1(e,u):F1(e,u,{maxDistance:c});if(r!==void 0&&f>r)continue;let h=f;if(c!==void 0&&f===c&&c===r&&(h=F1(e,u)),hr))return s}function ev(e,t){let n=new e(t),r=Object.create(n);for(let i of Zx)i in t&&(r[i]=tv(t[i],n,Ir.prototype[i].length));return r}function tv(e,t,n){return typeof e=="function"?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}function Ng({from:e,to:t}){return{from:[e],to:t}}function ov(e,t){let n=Object.create(null);for(let r of e){let i=r[t];if(n[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n[i]=r}return n}function av(e,t){let n=new Map;for(let r of e){let i=r[t];if(n.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n.set(i,r)}return n}function uv(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function lv(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function cv(e){return e===Math.floor(e)}function fv(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):n!=="string"?Number(e)-Number(t):e.localeCompare(t)}function pv(e){return(...t)=>{let n=e(...t);return typeof n=="string"?new Error(n):n}}function Tg(e){return e===void 0?{}:e}function T4(e){if(typeof e=="string")return{text:e};let{text:t,list:n}=e;return dv((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(T4)}}:{text:t}}function Sg(e,t){return e===!0?!0:e===!1?{value:t}:e}function Fg(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function Ag(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function I1(e,t){return e===void 0?[]:Array.isArray(e)?e.map(n=>Ag(n,t)):[Ag(e,t)]}function Cg(e,t){let n=I1(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}function dv(e,t){if(!e)throw new Error(t)}function vv(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(r){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=Cs;let a=i?Array.isArray(i)?(h,m)=>i.includes(h)?{[h]:m}:void 0:(h,m)=>({[h]:m}):(h,m,g)=>{let{_:E,...v}=g.schemas;return N4(h,m,{...g,schemas:v})},u=_v(t,{isCLI:r,FlagSchema:s}),l=new xv(u,{logger:n,unknown:a,descriptor:o}),c=n!==!1;c&&A1&&(l._hasDeprecationWarned=A1);let f=l.normalize(e);return c&&(A1=l._hasDeprecationWarned),f}function _v(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(rv.create({name:"_"}));for(let i of e)r.push(Nv(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(nv.create({name:i.alias,sourceName:i.name}));return r}function Nv(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,s={name:i},o,a={};switch(e.type){case"int":o=gv,t&&(s.preprocess=Number);break;case"string":o=wg;break;case"choice":o=hv,s.choices=e.choices.map(u=>u?.redirect?{...u,redirect:{to:{key:e.name,value:u.redirect}}}:u);break;case"boolean":o=sv;break;case"flag":o=r,s.flags=n.flatMap(u=>[u.alias,u.description&&u.name,u.oppositeDescription&&`no-${u.name}`].filter(Boolean));break;case"path":o=wg;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(u,l,c)=>e.exception(u)||l.validate(u,c):s.validate=(u,l,c)=>u===void 0||l.validate(u,c),e.redirect&&(a.redirect=u=>u?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(a.deprecated=!0),t&&!e.array){let u=s.preprocess||(l=>l);s.preprocess=(l,c,f)=>c.preprocess(u(Array.isArray(l)?vt(0,l,-1):l),f)}return e.array?iv.create({...t?{preprocess:u=>Array.isArray(u)?u:[u]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}function wv(e){return!!e?.[Av]}async function Lv(e,t,n,r){let{node:i}=n,{language:s}=i;if(!F4.has(s))return;let o=i.value.trim(),a;if(o){let u=s==="yaml"?s:E4(r,{language:s});if(!u)return;a=o?await e(o,{parser:u}):""}else a=o;return zg([i.startDelimiter,i.explicitLanguage??"",zn,a,a?zn:"",i.endDelimiter])}function Iv(e,t){return A4({node:e})&&(delete t.end,delete t.raw,delete t.value),t}function Ov({node:e}){return e.raw}function Pv(e,t){let n=e?r=>e(r,C4):Mv;return t?new Proxy(n,{apply:(r,i,s)=>W1(s[0])?Cv:Reflect.apply(r,i,s)}):n}function w4(e,t){if(!t)throw new Error("parserName is required.");let n=S4(0,e,i=>i.parsers&&hl(i.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new g4(r)}function Bv(e,t){if(!t)throw new Error("astFormat is required.");let n=S4(0,e,i=>i.printers&&hl(i.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new g4(r)}function Q1({plugins:e,parser:t}){let n=w4(e,t);return L4(n,t)}function L4(e,t){let n=e.parsers[t];return typeof n=="function"?n():n}async function Vv(e,t){let n=e.printers[t],r=typeof n=="function"?await n():n;return jv(r)}function Uv(e){let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:s,...o}=e;t=Wv(t);let a=t.experimental_frontMatterSupport;n=Lg(n,a.massageAstNode||a.embed||a.print);let u=i;i&&a.massageAstNode&&(u=new Proxy(i,{apply(f,h,m){return Rv(...m),Reflect.apply(f,h,m)}}));let l=r;if(r){let f;l=new Proxy(r,{get(h,m,g){return m==="getVisitorKeys"?(f??(f=r.getVisitorKeys?Lg(r.getVisitorKeys,a.massageAstNode||a.embed):n),f):Reflect.get(h,m,g)},apply:(h,m,g)=>a.embed&&A4(...g)?Lv:Reflect.apply(h,m,g)})}let c=s;return a.print&&(c=new Proxy(s,{apply(f,h,m){let[g]=m;return W1(g.node)?kv(g):Reflect.apply(f,h,m)}})),{features:t,getVisitorKeys:n,embed:l,massageAstNode:u,print:c,...o}}function jv(e){return P1($v,e,Uv)}function Hv(e){return{...qv,...e}}function Wv(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:Hv(e?.experimental_frontMatterSupport)}}async function Qv(e,t={}){let n={...e};if(!n.parser){if(!n.filepath)throw new Eg("No parser and no file path given, couldn't infer a parser.");if(n.parser=E4(n,{physicalFile:n.filepath}),!n.parser)throw new Eg(`No parser could be inferred for file "${n.filepath}".`)}let r=D4({plugins:e.plugins,showDeprecated:!0}).options,i={...Ig,...Object.fromEntries(r.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},s=w4(n.plugins,n.parser),o=await L4(s,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let a=s.printers?.[o.astFormat]?s:Bv(n.plugins,o.astFormat),u=await Vv(a,o.astFormat);n.printer=u,n.getVisitorKeys=u.getVisitorKeys;let l=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,f])=>f!==void 0)):{},c={...i,...l};for(let[f,h]of Object.entries(c))n[f]??(n[f]=h);return n.parser==="json"&&(n.trailingComma="none"),Tv(n,r,{passThrough:Object.keys(Ig),...t})}function zv(e,t,n,r){let i={column:null,line:-1,...e.start},s={...i,...e.end},{linesAbove:o=2,linesBelow:a=3}=n||{},u=i.line-r,l=i.column,c=s.line-r,f=s.column,h=Math.max(u-(o+1),0),m=Math.min(t.length,c+a);u===-1&&(h=0),c===-1&&(m=t.length);let g=c-u,E={};if(g)for(let v=0;v<=g;v++){let N=v+u;if(l==null)E[N]=!0;else if(v===0){let L=t[N-1].length;E[N]=[l,L-l]}else if(v===g)E[N]=[0,f];else{let L=t[N-1].length;E[N]=[0,L]}}else if(l===f)l!=null?E[u]=[l,0]:E[u]=!0;else{let v=l??0,N=f??v;E[u]=[v,N-v]}return{start:h,end:m,markerLines:E}}function Yv(e,t,n={},r){let{defs:i,highlight:s}=r||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},o=(n.startLine||1)-1,a=e.split(Rg),{start:u,end:l,markerLines:c}=zv(t,a,n,o),f=t.start&&typeof t.start.column=="number",h=String(l+o).length,m=s(e).split(Rg,l).slice(u,l).map((g,E)=>{let v=u+1+E,N=` ${` ${v+o}`.slice(-h)} |`,L=c[v],M=!c[v+1];if(L){let w="";if(Array.isArray(L)){let R=g.slice(0,L[0]).replace(/[^\t]/g," "),V=L[1]||1;w=[` + `,i.gutter(N.replace(/\d/g," "))," ",R,i.marker("^").repeat(V)].join(""),M&&n.message&&(w+=" "+i.message(n.message))}return[i.marker(">"),i.gutter(N),g.length>0?` ${g}`:"",w].join("")}else return` ${i.gutter(N)}${g.length>0?` ${g}`:""}`}).join(` `);return n.message&&!f&&(m=`${" ".repeat(h+1)}${n.message} -${m}`),i.reset(m)}function r6(e,t,n={}){return n6(e,t,n)}async function i6(e,t){let n=await g1(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(s){s6(s,e)}return{text:r,ast:i}}function s6(e,t){let{loc:n}=e;if(n){let{start:r,end:i}=n;r&&(r={line:r.line,column:r.column-1}),i&&(i={line:i.line,column:i.column-1});let s=r6(t,{start:r,end:i},{highlightCode:!0});e.message+=` -`+s,e.codeFrame=s}throw e}async function o6(e,t,n,r,i){if(n.embeddedLanguageFormatting!=="auto")return;let{printer:s}=n,{embed:o}=s;if(!o)return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:a}=s,{getVisitorKeys:u}=o,l=[];h();let c=e.stack;for(let{print:m,node:g,pathStack:v}of l)try{e.stack=v;let b=await m(f,t,e,n);b&&i.set(g,b)}catch(b){if(globalThis.PRETTIER_DEBUG)throw b}e.stack=c;function f(m,g){return a6(m,g,n,r)}function h(){let{node:m}=e;if(m===null||typeof m!="object"||a?.(e))return;for(let v of u(m))Array.isArray(m[v])?e.each(h,v):e.call(h,v);let g=o(e,n);if(g){if(typeof g=="function"){l.push({print:g,node:m,pathStack:[...e.stack]});return}i.set(m,g)}}}async function a6(e,t,n,r){let i=await xs({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:s}=await Lo(e,i),o=await r(s,i);return Q2(o)}function u6(e,t,n,r){let{originalText:i,[ju]:s,locStart:o,locEnd:a,[Symbol.for("printedComments")]:u}=t,{node:l}=e,c=o(l),f=a(l);for(let m of s)o(m)>=c&&a(m)<=f&&u.add(m);let{printPrettierIgnored:h}=t.printer;return h?h(e,t,n,r):i.slice(c,f)}async function Qu(e,t){({ast:e}=await Rg(e,t));let n=new Map,r=new yE(e),i=VE(t),s=new Map;await o6(r,a,t,Qu,s);let o=await k2(r,t,a,void 0,s);if(BE(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[ci,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,ci]}return o;function a(l,c){return l===void 0||l===r?u(c):Array.isArray(l)?r.call(()=>u(c),...l):r.call(()=>u(c),l)}function u(l){i(r);let c=r.node;if(c==null)return"";let f=p1(c)&&l===void 0;if(f&&n.has(c))return n.get(c);let h=k2(r,t,a,l,s);return f&&n.set(c,h),h}}function k2(e,t,n,r,i){let{node:s}=e,{printer:o}=t,a;switch(o.hasPrettierIgnore?.(e)?a=l6(e,t,n,r):i.has(s)?a=i.get(s):a=o.print(e,t,n,r),s){case t.cursorNode:a=Mu(a,u=>[ci,u,ci]);break;case t.nodeBeforeCursor:a=Mu(a,u=>[u,ci]);break;case t.nodeAfterCursor:a=Mu(a,u=>[ci,u]);break}return o.printComment&&ag(s.comments)&&!o.willPrintOwnComments?.(e,t)&&(a=PE(e,a,t)),a}async function Rg(e,t){let n=e.comments??[];t[ju]=n,t[Symbol.for("printedComments")]=new Set,wE(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function c6(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:s}=t,o=m=>r(m)<=n&&i(m)>=n,a=e,u=[e];for(let m of NE(e,{getVisitorKeys:s,filter:o}))u.push(m),a=m;if(SE(a,{getVisitorKeys:s}))return{cursorNode:a};let l,c,f=-1,h=Number.POSITIVE_INFINITY;for(;u.length>0&&(l===void 0||c===void 0);){a=u.pop();let m=l!==void 0,g=c!==void 0;for(let v of Hu(a,{getVisitorKeys:s})){if(!m){let b=i(v);b<=n&&b>f&&(l=v,f=b)}if(!g){let b=r(v);b>=n&&bo(h,u)).filter(Boolean);let l={},c=new Set(i(a));for(let h in a)!Wu(a,h)||s?.has(h)||(c.has(h)?l[h]=o(a[h],a):l[h]=a[h]);let f=r(a,l,u);if(f!==null)return f??l}}function g6(e,t){return t=new Set(t),e.find(n=>kg.has(n.type)&&t.has(n))}function M2(e){let t=m6(0,e,n=>n.type!=="Program"&&n.type!=="File");return t===-1?e:e.slice(0,t+1)}function v6(e,t,{locStart:n,locEnd:r}){let[i,...s]=e,[o,...a]=t;if(i===o)return[i,o];let u=n(i);for(let c of M2(a))if(n(c)>=u)o=c;else break;let l=r(o);for(let c of M2(s)){if(r(c)<=l)i=c;else break;if(i===o)break}return[i,o]}function n1(e,t,n,r,i=[],s,o){let{locStart:a,locEnd:u}=o,l=a(e),c=u(e);if(t>c||tr);let s=e.slice(r,i).search(/\S/),o=s===-1;if(!o)for(r+=s;i>r&&!/\S/.test(e[i-1]);--i);let a=t.printer.features?.experimental_locForRangeFormat??t,u=n1(n,r,t,(g,v)=>P2(t,g,v),[],"rangeStart",a);if(!u)return;let l=o?u:n1(n,i,t,g=>P2(t,g),[],"rangeEnd",a);if(!l)return;let c,f;if(n.type==="JsonRoot"){let g=g6(u,l);c=g,f=g}else[c,f]=v6(u,l,t);let{locStart:h,locEnd:m}=a;return[Math.min(h(c),h(f)),Math.max(m(c),m(f))]}async function Pg(e,t,n=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:i}=await Lo(e,t);t.cursorOffset>=0&&(t={...t,...Og(r,t)});let s=await Qu(r,t,n);n>0&&(s=J2([Zn,s],n,t.tabWidth));let o=$u(s,t);if(n>0){let u=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(u),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>u.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=u+s1(t.endOfLine)}let a=t[ju];if(t.cursorOffset>=0){let u,l,c,f;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText)if(c=o.cursorNodeStart,f=o.cursorNodeText,t.cursorNode)u=t.locStart(t.cursorNode),l=i.slice(u,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");u=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let E=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;l=i.slice(u,E)}else u=0,l=i,c=0,f=o.formatted;let h=t.cursorOffset-u;if(l===f)return{formatted:o.formatted,cursorOffset:c+h,comments:a};let m=l.split("");m.splice(h,0,B2);let g=f.split(""),v=l8(m,g),b=c;for(let E of v)if(E.removed){if(E.value.includes(B2))break}else b+=E.count;return{formatted:o.formatted,cursorOffset:b,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function b6(e,t){let{ast:n,text:r}=await Lo(e,t),[i,s]=E6(r,t,n)??[0,0],o=r.slice(i,s),a=Math.min(i,r.lastIndexOf(` -`,i)+1),u=r.slice(a,i).match(/^\s*/)[0],l=f1(u,t.tabWidth),c=await Pg(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),f=c.formatted.trimEnd(),{cursorOffset:h}=t;h>s?h+=f.length-o.length:c.cursorOffset>=0&&(h=c.cursorOffset+i);let m=r.slice(0,i)+f+r.slice(s);if(t.endOfLine!=="lf"){let g=s1(t.endOfLine);h>=0&&g===`\r -`&&(h+=H2(m.slice(0,h),` -`)),m=Vu(0,m,` -`,g)}return{formatted:m,cursorOffset:h,comments:c.comments}}function Kf(e,t,n){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?n:t}function V2(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=Kf(e,n,-1),r=Kf(e,r,0),i=Kf(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function Bg(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s}=V2(e,t),o=e.charAt(0)===Mg;if(o&&(e=e.slice(1),n--,r--,i--),s==="auto"&&(s=d8(e)),e.includes("\r")){let a=u=>H2(e.slice(0,Math.max(u,0)),`\r -`);n-=a(n),r-=a(r),i-=a(i),e=v8(e)}return{hasBOM:o,text:e,options:V2(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s})}}async function U2(e,t){let n=await g1(t);return!n.hasPragma||n.hasPragma(e)}async function x6(e,t){return(await g1(t)).hasIgnorePragma?.(e)}async function Vg(e,t){let{hasBOM:n,text:r,options:i}=Bg(e,await xs(t));if(i.rangeStart>=i.rangeEnd&&r!==""||i.requirePragma&&!await U2(r,i)||i.checkIgnorePragma&&await x6(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function _6(e,t,n){let{text:r,options:i}=Bg(e,await xs(t)),s=await Lo(r,i);return n&&(n.preprocessForPrint&&(s.ast=await Rg(s.ast,i)),n.massage&&(s.ast=p6(s.ast,i))),s}async function T6(e,t){t=await xs(t);let n=await Qu(e,t);return $u(n,t)}async function N6(e,t){let n=z8(e),{formatted:r}=await Vg(n,{...t,parser:"__js_expression"});return r}async function S6(e,t){t=await xs(t);let{ast:n}=await Lo(e,t);return t.cursorOffset>=0&&(t={...t,...Og(n,t)}),Qu(n,t)}async function F6(e,t){return $u(e,await xs(t))}function L6(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;nMath.max(r,i.length),0)/t.length}function U6(e,t){let n=b1(e,t);return n===!1?"":e.charAt(n)}function $6(e,t){let{preferred:n,alternate:r}=t===!0||t==="'"?G6:q6,{length:i}=e,s=0,o=0;for(let a=0;ao?r:n).character}function H6(e,t,n){for(let r=t;ro===r?o:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}function t3(e,t){return arguments.length===2||typeof t=="number"?x1(e,t):Z6(...arguments)}function li(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},await e(...n)}}async function T1(e,t){let{formatted:n}=await _1(e,{...t,cursorOffset:-1});return n}async function qg(e,t){return await T1(e,t)===e}var r8,r1,j2,wo,i8,s8,Vu,o8,a8,u8,c8,Lr,G2,q2,f8,p8,i1,$2,Uu,h8,m8,g8,ju,y8,Ft,pi,er,Rr,tr,nr,rr,Qt,Pn,Kt,ir,sr,or,At,Bn,an,W2,hi,x8,T8,Es,d2,a1,Mn,z2,M8,P8,qu,ci,Z2,H8,l1,Zn,eg,tg,W8,Q8,Y8,J8,X8,K8,Z8,eE,ng,rg,v2,tE,nE,iE,sE,oE,aE,uE,c1,cE,fE,ig,mE,gE,on,On,e1,f1,DE,yE,ag,p1,xE,Ir,ug,lg,D2,fi,Cr,fg,pg,Qf,dg,d1,mg,VE,vg,E2,UE,Wu,jE,$E,HE,WE,zE,KE,ZE,tb,Eg,ys,bg,kn,rb,xg,Pu,_2,ib,Ds,Yf,Ng,ob,Or,lb,cb,fb,pb,bb,xb,_b,L2,Tb,Nb,Sb,Fb,Ab,Xf,Ib,Rb,Ob,Fg,kb,Mb,m1,Ag,wg,Ub,Gb,Cg,qb,I2,zb,Jb,Xb,R2,xs,O2,Lo,l6,Og,p6,h6,d6,m6,kg,y6,Mg,B2,v1,A6,w6,C6,Ug,D1,y1,E1,b1,x1,M6,V6,j6,jg,Gg,G6,q6,W6,z6,_1,$g,Hg,Qg=Z4(()=>{r8=Object.defineProperty,r1=(e,t)=>{for(var n in t)r8(e,n,{get:t[n],enumerable:!0})},j2={};r1(j2,{__debug:()=>Hg,check:()=>qg,doc:()=>v1,format:()=>T1,formatWithCursor:()=>_1,getSupportInfo:()=>$g,util:()=>D1,version:()=>Ug});wo=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),i8=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},s8=wo("replaceAll",function(){if(typeof this=="string")return i8}),Vu=s8,o8=class{diff(e,t,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);let i=this.castInput(e,n),s=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),a=this.removeEmpty(this.tokenize(s,n));return this.diffWithOptionsObj(o,a,n,r)}diffWithOptionsObj(e,t,n,r){var i;let s=E=>{if(E=this.postProcess(E,n),r){setTimeout(function(){r(E)},0);return}else return E},o=t.length,a=e.length,u=1,l=o+a;n.maxEditLength!=null&&(l=Math.min(l,n.maxEditLength));let c=(i=n.timeout)!==null&&i!==void 0?i:1/0,f=Date.now()+c,h=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(h[0],t,e,0,n);if(h[0].oldPos+1>=a&&m+1>=o)return s(this.buildValues(h[0].lastComponent,t,e));let g=-1/0,v=1/0,b=()=>{for(let E=Math.max(g,-u);E<=Math.min(v,u);E+=2){let A,C=h[E-1],w=h[E+1];C&&(h[E-1]=void 0);let F=!1;if(w){let L=w.oldPos-E;F=w&&0<=L&&L=a&&m+1>=o)return s(this.buildValues(A.lastComponent,t,e))||!0;h[E]=A,A.oldPos+1>=a&&(v=Math.min(v,E-1)),m+1>=o&&(g=Math.max(g,E+1))}u++};if(r)(function E(){setTimeout(function(){if(u>l||Date.now()>f)return r(void 0);b()||E()},0)})();else for(;u<=l&&Date.now()<=f;){let E=b();if(E)return E}}addToPath(e,t,n,r,i){let s=e.lastComponent;return s&&!i.oneChangePerToken&&s.added===t&&s.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:s.count+1,added:t,removed:n,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:s}}}extractCommon(e,t,n,r,i){let s=t.length,o=n.length,a=e.oldPos,u=a-r,l=0;for(;u+1f.length?m:f}),l.value=this.join(c)}else l.value=this.join(t.slice(a,a+l.count));a+=l.count,l.added||(u+=l.count)}}return r}},a8=class extends o8{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},u8=new a8;c8=()=>{},Lr=c8,G2="cr",q2="crlf",f8="lf",p8=f8,i1="\r",$2=`\r -`,Uu=` -`,h8=Uu;m8=new Map([[Uu,/\n/g],[i1,/\r/g],[$2,/\r\n/g]]);g8=/\r\n?/g;ju=Symbol.for("comments");y8=wo("at",function(){if(Array.isArray(this)||typeof this=="string")return D8}),Ft=y8,pi="string",er="array",Rr="cursor",tr="indent",nr="align",rr="trim",Qt="group",Pn="fill",Kt="if-break",ir="indent-if-break",sr="line-suffix",or="line-suffix-boundary",At="line",Bn="label",an="break-parent",W2=new Set([Rr,tr,nr,rr,Qt,Pn,Kt,ir,sr,or,At,Bn,an]);hi=b8,x8=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);T8=class extends Error{name="InvalidDocError";constructor(e){super(_8(e)),this.doc=e}},Es=T8,d2={};a1=N8;Mn=Lr,z2=Lr,M8=Lr,P8=Lr;qu={type:an},ci={type:Rr};Z2={type:At},H8={type:At,soft:!0},l1={type:At,hard:!0},Zn=[l1,qu],eg={type:At,hard:!0,literal:!0},tg=[eg,qu];W8={type:or},Q8={type:rr};Y8=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,J8=12288,X8=65510,K8=[12288,12288,65281,65376,65504,65510],Z8=4352,eE=262141,ng=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],rg=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),s=i*2;if(te[s+1])n=i+1;else return!0}return!1},v2=19968,[tE,nE]=rE(ng);iE=e=>eX8?!1:rg(K8,e),sE=e=>e>=tE&&e<=nE?!0:eeE?!1:rg(ng,e),oE=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,aE=e=>oE.test(e),uE=/[^\x20-\x7F]/;c1=lE,cE={type:0},fE={type:1},ig={value:"",length:0,queue:[],get root(){return ig}};mE=class{#t=[];#e="";#r=0;#i=[];#n=[];#s(){let e=this.#e;e!==""&&(this.#t.push(e),this.#r+=e.length,this.#e="");for(let t of this.#n)this.#i.push(Math.min(t,this.#r));this.#n.length=0}markPosition(){if(this.#i.length+this.#n.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#n.push(this.#r+this.#e.length)}write(e){this.#e+=e}trim(){let{text:e,count:t}=og(this.#e);return this.#e=e,this.#s(),t}finish(){return this.#s(),{text:this.#t.join(""),positions:this.#i}}},gE=mE,on=Symbol("MODE_BREAK"),On=Symbol("MODE_FLAT"),e1=Symbol("DOC_FILL_PRINTED_LENGTH");f1=vE,DE=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return Ft(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:Ft(0,this.stack,-2)}get node(){return Ft(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=Ft(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#e()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?Ft(0,e,-2):null}getValue(){return Ft(0,this.stack,-1)}getNode(e=0){let t=this.#t(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#t(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=Ft(0,n,-1);for(let s of t)i=i?.[s],n.push(s,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#t(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=Ft(0,n,-1);for(let s of t)i=i[s],n.push(s,i);try{for(let s=0;s{n[i]=e(r,i,s)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let s=null;if(typeof n=="number"&&(s=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,s))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#e())if(e(t))return t}hasAncestor(e){for(let t of this.#e())if(e(t))return!0;return!1}*#e(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}},yE=DE;ag=EE;p1=bE;xE=Co(/\s/),Ir=Co(" "),ug=Co(",; "),lg=Co(/[^\n\r]/),D2=e=>e===` -`||e==="\r"||e==="\u2028"||e==="\u2029";fi=_E;Cr=TE;fg=cg;pg=new WeakMap;Qf=()=>!1;dg=e=>!/[\S\n\u2028\u2029]/.test(e);d1=IE,mg=()=>!0;VE=()=>Lr,vg=class extends Error{name="ConfigError"},E2=class extends Error{name="UndefinedParserError"},UE=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Wu=UE,jE={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +${m}`),i.reset(m)}function Jv(e,t,n={}){return Yv(e,t,n)}async function Xv(e,t){let n=await Q1(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(s){Kv(s,e)}return{text:r,ast:i}}function Kv(e,t){let{loc:n}=e;if(n){let{start:r,end:i}=n;r&&(r={line:r.line,column:r.column-1}),i&&(i={line:i.line,column:i.column-1});let s=Jv(t,{start:r,end:i},{highlightCode:!0});e.message+=` +`+s,e.codeFrame=s}throw e}async function Zv(e,t,n,r,i){if(n.embeddedLanguageFormatting!=="auto")return;let{printer:s}=n,{embed:o}=s;if(!o)return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:a}=s,{getVisitorKeys:u}=o,l=[];h();let c=e.stack;for(let{print:m,node:g,pathStack:E}of l)try{e.stack=E;let v=await m(f,t,e,n);v&&i.set(g,v)}catch(v){if(globalThis.PRETTIER_DEBUG)throw v}e.stack=c;function f(m,g){return e_(m,g,n,r)}function h(){let{node:m}=e;if(m===null||typeof m!="object"||a?.(e))return;for(let E of u(m))Array.isArray(m[E])?e.each(h,E):e.call(h,E);let g=o(e,n);if(g){if(typeof g=="function"){l.push({print:g,node:m,pathStack:[...e.stack]});return}i.set(m,g)}}}async function e_(e,t,n,r){let i=await Is({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:s}=await Ko(e,i),o=await r(s,i);return Wg(o)}function t_(e,t,n,r){let{originalText:i,[ll]:s,locStart:o,locEnd:a,[Symbol.for("printedComments")]:u}=t,{node:l}=e,c=o(l),f=a(l);for(let m of s)o(m)>=c&&a(m)<=f&&u.add(m);let{printPrettierIgnored:h}=t.printer;return h?h(e,t,n,r):i.slice(c,f)}async function ml(e,t){({ast:e}=await I4(e,t));let n=new Map,r=new px(e),i=Ix(t),s=new Map;await Zv(r,a,t,ml,s);let o=await Og(r,t,a,void 0,s);if(Lx(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[Ei,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,Ei]}return o;function a(l,c){return l===void 0||l===r?u(c):Array.isArray(l)?r.call(()=>u(c),...l):r.call(()=>u(c),l)}function u(l){i(r);let c=r.node;if(c==null)return"";let f=G1(c)&&l===void 0;if(f&&n.has(c))return n.get(c);let h=Og(r,t,a,l,s);return f&&n.set(c,h),h}}function Og(e,t,n,r,i){let{node:s}=e,{printer:o}=t,a;switch(o.hasPrettierIgnore?.(e)?a=n_(e,t,n,r):i.has(s)?a=i.get(s):a=o.print(e,t,n,r),s){case t.cursorNode:a=il(a,u=>[Ei,u,Ei]);break;case t.nodeBeforeCursor:a=il(a,u=>[u,Ei]);break;case t.nodeAfterCursor:a=il(a,u=>[Ei,u]);break}return o.printComment&&o4(s.comments)&&!o.willPrintOwnComments?.(e,t)&&(a=wx(e,a,t)),a}async function I4(e,t){let n=e.comments??[];t[ll]=n,t[Symbol.for("printedComments")]=new Set,vx(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function r_(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:s}=t,o=m=>r(m)<=n&&i(m)>=n,a=e,u=[e];for(let m of yx(e,{getVisitorKeys:s,filter:o}))u.push(m),a=m;if(Ex(a,{getVisitorKeys:s}))return{cursorNode:a};let l,c,f=-1,h=Number.POSITIVE_INFINITY;for(;u.length>0&&(l===void 0||c===void 0);){a=u.pop();let m=l!==void 0,g=c!==void 0;for(let E of dl(a,{getVisitorKeys:s})){if(!m){let v=i(E);v<=n&&v>f&&(l=E,f=v)}if(!g){let v=r(E);v>=n&&vo(h,u)).filter(Boolean);let l={},c=new Set(i(a));for(let h in a)!hl(a,h)||s?.has(h)||(c.has(h)?l[h]=o(a[h],a):l[h]=a[h]);let f=r(a,l,u);if(f!==null)return f??l}}function l_(e,t){return t=new Set(t),e.find(n=>O4.has(n.type)&&t.has(n))}function kg(e){let t=u_(0,e,n=>n.type!=="Program"&&n.type!=="File");return t===-1?e:e.slice(0,t+1)}function c_(e,t,{locStart:n,locEnd:r}){let[i,...s]=e,[o,...a]=t;if(i===o)return[i,o];let u=n(i);for(let c of kg(a))if(n(c)>=u)o=c;else break;let l=r(o);for(let c of kg(s)){if(r(c)<=l)i=c;else break;if(i===o)break}return[i,o]}function R1(e,t,n,r,i=[],s,o){let{locStart:a,locEnd:u}=o,l=a(e),c=u(e);if(t>c||tr);let s=e.slice(r,i).search(/\S/),o=s===-1;if(!o)for(r+=s;i>r&&!/\S/.test(e[i-1]);--i);let a=t.printer.features?.experimental_locForRangeFormat??t,u=R1(n,r,t,(g,E)=>Mg(t,g,E),[],"rangeStart",a);if(!u)return;let l=o?u:R1(n,i,t,g=>Mg(t,g),[],"rangeEnd",a);if(!l)return;let c,f;if(n.type==="JsonRoot"){let g=l_(u,l);c=g,f=g}else[c,f]=c_(u,l,t);let{locStart:h,locEnd:m}=a;return[Math.min(h(c),h(f)),Math.max(m(c),m(f))]}async function M4(e,t,n=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:i}=await Ko(e,t);t.cursorOffset>=0&&(t={...t,...R4(r,t)});let s=await ml(r,t,n);n>0&&(s=Yg([zn,s],n,t.tabWidth));let o=pl(s,t);if(n>0){let u=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(u),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>u.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=u+M1(t.endOfLine)}let a=t[ll];if(t.cursorOffset>=0){let u,l,c,f;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText)if(c=o.cursorNodeStart,f=o.cursorNodeText,t.cursorNode)u=t.locStart(t.cursorNode),l=i.slice(u,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");u=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let N=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;l=i.slice(u,N)}else u=0,l=i,c=0,f=o.formatted;let h=t.cursorOffset-u;if(l===f)return{formatted:o.formatted,cursorOffset:c+h,comments:a};let m=l.split("");m.splice(h,0,Pg);let g=f.split(""),E=n6(m,g),v=c;for(let N of E)if(N.removed){if(N.value.includes(Pg))break}else v+=N.count;return{formatted:o.formatted,cursorOffset:v,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function h_(e,t){let{ast:n,text:r}=await Ko(e,t),[i,s]=d_(r,t,n)??[0,0],o=r.slice(i,s),a=Math.min(i,r.lastIndexOf(` +`,i)+1),u=r.slice(a,i).match(/^\s*/)[0],l=j1(u,t.tabWidth),c=await M4(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),f=c.formatted.trimEnd(),{cursorOffset:h}=t;h>s?h+=f.length-o.length:c.cursorOffset>=0&&(h=c.cursorOffset+i);let m=r.slice(0,i)+f+r.slice(s);if(t.endOfLine!=="lf"){let g=M1(t.endOfLine);h>=0&&g===`\r +`&&(h+=qg(m.slice(0,h),` +`)),m=al(0,m,` +`,g)}return{formatted:m,cursorOffset:h,comments:c.comments}}function C1(e,t,n){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?n:t}function Bg(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=C1(e,n,-1),r=C1(e,r,0),i=C1(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function P4(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s}=Bg(e,t),o=e.charAt(0)===k4;if(o&&(e=e.slice(1),n--,r--,i--),s==="auto"&&(s=a6(e)),e.includes("\r")){let a=u=>qg(e.slice(0,Math.max(u,0)),`\r +`);n-=a(n),r-=a(r),i-=a(i),e=c6(e)}return{hasBOM:o,text:e,options:Bg(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s})}}async function Vg(e,t){let n=await Q1(t);return!n.hasPragma||n.hasPragma(e)}async function m_(e,t){return(await Q1(t)).hasIgnorePragma?.(e)}async function B4(e,t){let{hasBOM:n,text:r,options:i}=P4(e,await Is(t));if(i.rangeStart>=i.rangeEnd&&r!==""||i.requirePragma&&!await Vg(r,i)||i.checkIgnorePragma&&await m_(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function g_(e,t,n){let{text:r,options:i}=P4(e,await Is(t)),s=await Ko(r,i);return n&&(n.preprocessForPrint&&(s.ast=await I4(s.ast,i)),n.massage&&(s.ast=s_(s.ast,i))),s}async function D_(e,t){t=await Is(t);let n=await ml(e,t);return pl(n,t)}async function y_(e,t){let n=$6(e),{formatted:r}=await B4(n,{...t,parser:"__js_expression"});return r}async function E_(e,t){t=await Is(t);let{ast:n}=await Ko(e,t);return t.cursorOffset>=0&&(t={...t,...R4(n,t)}),ml(n,t)}async function b_(e,t){return pl(e,await Is(t))}function N_(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;nMath.max(r,i.length),0)/t.length}function R_(e,t){let n=K1(e,t);return n===!1?"":e.charAt(n)}function P_(e,t){let{preferred:n,alternate:r}=t===!0||t==="'"?k_:M_,{length:i}=e,s=0,o=0;for(let a=0;ao?r:n).character}function B_(e,t,n){for(let r=t;ro===r?o:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}function z_(e,t){return arguments.length===2||typeof t=="number"?Z1(e,t):W_(...arguments)}function yi(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},await e(...n)}}async function tp(e,t){let{formatted:n}=await ep(e,{...t,cursorOffset:-1});return n}async function j4(e,t){return await tp(e,t)===e}var Jb,O1,Ug,Jo,Xb,Kb,al,Zb,e6,t6,r6,Cr,$g,jg,i6,s6,k1,Gg,ul,o6,u6,l6,ll,p6,vt,xi,Yn,Lr,Jn,Xn,Kn,Ut,Rn,Qt,Zn,er,tr,_t,On,nn,Hg,vi,m6,D6,ws,dg,B1,In,Qg,C6,w6,fl,Ei,Kg,B6,U1,zn,Zg,e4,V6,U6,j6,G6,q6,H6,W6,Q6,t4,n4,gg,z6,Y6,X6,K6,Z6,ex,tx,$1,rx,ix,r4,ux,lx,tn,wn,L1,j1,fx,px,o4,G1,mx,wr,a4,u4,Dg,bi,Ar,c4,f4,N1,d4,H1,h4,Ix,g4,Eg,Rx,hl,Ox,Px,Bx,Vx,$x,Hx,Wx,zx,E4,Cs,b4,Ln,Jx,x4,sl,vg,Xx,As,S1,N4,Zx,Ir,nv,rv,iv,sv,hv,mv,gv,wg,Dv,yv,Ev,bv,xv,A1,Tv,Sv,Fv,S4,Av,Cv,W1,F4,A4,Rv,kv,C4,Mv,Lg,$v,Gv,qv,Ig,Is,Rg,Ko,n_,R4,s_,o_,a_,u_,O4,p_,k4,Pg,z1,x_,v_,__,V4,Y1,J1,X1,K1,Z1,C_,I_,O_,U4,$4,k_,M_,V_,$_,ep,G4,q4,W4=a7(()=>{Jb=Object.defineProperty,O1=(e,t)=>{for(var n in t)Jb(e,n,{get:t[n],enumerable:!0})},Ug={};O1(Ug,{__debug:()=>q4,check:()=>j4,doc:()=>z1,format:()=>tp,formatWithCursor:()=>ep,getSupportInfo:()=>G4,util:()=>Y1,version:()=>V4});Jo=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),Xb=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Kb=Jo("replaceAll",function(){if(typeof this=="string")return Xb}),al=Kb,Zb=class{diff(e,t,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);let i=this.castInput(e,n),s=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),a=this.removeEmpty(this.tokenize(s,n));return this.diffWithOptionsObj(o,a,n,r)}diffWithOptionsObj(e,t,n,r){var i;let s=N=>{if(N=this.postProcess(N,n),r){setTimeout(function(){r(N)},0);return}else return N},o=t.length,a=e.length,u=1,l=o+a;n.maxEditLength!=null&&(l=Math.min(l,n.maxEditLength));let c=(i=n.timeout)!==null&&i!==void 0?i:1/0,f=Date.now()+c,h=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(h[0],t,e,0,n);if(h[0].oldPos+1>=a&&m+1>=o)return s(this.buildValues(h[0].lastComponent,t,e));let g=-1/0,E=1/0,v=()=>{for(let N=Math.max(g,-u);N<=Math.min(E,u);N+=2){let L,M=h[N-1],w=h[N+1];M&&(h[N-1]=void 0);let R=!1;if(w){let S=w.oldPos-N;R=w&&0<=S&&S=a&&m+1>=o)return s(this.buildValues(L.lastComponent,t,e))||!0;h[N]=L,L.oldPos+1>=a&&(E=Math.min(E,N-1)),m+1>=o&&(g=Math.max(g,N+1))}u++};if(r)(function N(){setTimeout(function(){if(u>l||Date.now()>f)return r(void 0);v()||N()},0)})();else for(;u<=l&&Date.now()<=f;){let N=v();if(N)return N}}addToPath(e,t,n,r,i){let s=e.lastComponent;return s&&!i.oneChangePerToken&&s.added===t&&s.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:s.count+1,added:t,removed:n,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:s}}}extractCommon(e,t,n,r,i){let s=t.length,o=n.length,a=e.oldPos,u=a-r,l=0;for(;u+1f.length?m:f}),l.value=this.join(c)}else l.value=this.join(t.slice(a,a+l.count));a+=l.count,l.added||(u+=l.count)}}return r}},e6=class extends Zb{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},t6=new e6;r6=()=>{},Cr=r6,$g="cr",jg="crlf",i6="lf",s6=i6,k1="\r",Gg=`\r +`,ul=` +`,o6=ul;u6=new Map([[ul,/\n/g],[k1,/\r/g],[Gg,/\r\n/g]]);l6=/\r\n?/g;ll=Symbol.for("comments");p6=Jo("at",function(){if(Array.isArray(this)||typeof this=="string")return f6}),vt=p6,xi="string",Yn="array",Lr="cursor",Jn="indent",Xn="align",Kn="trim",Ut="group",Rn="fill",Qt="if-break",Zn="indent-if-break",er="line-suffix",tr="line-suffix-boundary",_t="line",On="label",nn="break-parent",Hg=new Set([Lr,Jn,Xn,Kn,Ut,Rn,Qt,Zn,er,tr,_t,On,nn]);vi=h6,m6=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);D6=class extends Error{name="InvalidDocError";constructor(e){super(g6(e)),this.doc=e}},ws=D6,dg={};B1=y6;In=Cr,Qg=Cr,C6=Cr,w6=Cr;fl={type:nn},Ei={type:Lr};Kg={type:_t},B6={type:_t,soft:!0},U1={type:_t,hard:!0},zn=[U1,fl],Zg={type:_t,hard:!0,literal:!0},e4=[Zg,fl];V6={type:tr},U6={type:Kn};j6=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,G6=12288,q6=65510,H6=[12288,12288,65281,65376,65504,65510],W6=4352,Q6=262141,t4=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],n4=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),s=i*2;if(te[s+1])n=i+1;else return!0}return!1},gg=19968,[z6,Y6]=J6(t4);X6=e=>eq6?!1:n4(H6,e),K6=e=>e>=z6&&e<=Y6?!0:eQ6?!1:n4(t4,e),Z6=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,ex=e=>Z6.test(e),tx=/[^\x20-\x7F]/;$1=nx,rx={type:0},ix={type:1},r4={value:"",length:0,queue:[],get root(){return r4}};ux=class{#t=[];#e="";#r=0;#i=[];#n=[];#s(){let e=this.#e;e!==""&&(this.#t.push(e),this.#r+=e.length,this.#e="");for(let t of this.#n)this.#i.push(Math.min(t,this.#r));this.#n.length=0}markPosition(){if(this.#i.length+this.#n.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#n.push(this.#r+this.#e.length)}write(e){this.#e+=e}trim(){let{text:e,count:t}=s4(this.#e);return this.#e=e,this.#s(),t}finish(){return this.#s(),{text:this.#t.join(""),positions:this.#i}}},lx=ux,tn=Symbol("MODE_BREAK"),wn=Symbol("MODE_FLAT"),L1=Symbol("DOC_FILL_PRINTED_LENGTH");j1=cx,fx=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return vt(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:vt(0,this.stack,-2)}get node(){return vt(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=vt(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#e()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?vt(0,e,-2):null}getValue(){return vt(0,this.stack,-1)}getNode(e=0){let t=this.#t(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#t(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=vt(0,n,-1);for(let s of t)i=i?.[s],n.push(s,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#t(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=vt(0,n,-1);for(let s of t)i=i[s],n.push(s,i);try{for(let s=0;s{n[i]=e(r,i,s)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let s=null;if(typeof n=="number"&&(s=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,s))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#e())if(e(t))return t}hasAncestor(e){for(let t of this.#e())if(e(t))return!0;return!1}*#e(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}},px=fx;o4=dx;G1=hx;mx=Xo(/\s/),wr=Xo(" "),a4=Xo(",; "),u4=Xo(/[^\n\r]/),Dg=e=>e===` +`||e==="\r"||e==="\u2028"||e==="\u2029";bi=gx;Ar=Dx;c4=l4;f4=new WeakMap;N1=()=>!1;d4=e=>!/[\S\n\u2028\u2029]/.test(e);H1=Tx,h4=()=>!0;Ix=()=>Cr,g4=class extends Error{name="ConfigError"},Eg=class extends Error{name="UndefinedParserError"},Rx=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),hl=Rx,Ox={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};$E=Array.prototype.toReversed??function(){return[...this].reverse()},HE=wo("toReversed",function(){if(Array.isArray(this))return $E}),WE=HE;zE=QE();KE=e=>String(e).split(/[/\\]/).pop(),ZE=e=>String(e).startsWith("file:");tb=void 0;Eg=nb,ys={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>ys.value(n)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(n=>`${ys.key(n)}: ${ys.value(e[n])}`).join(", ")} }`},pair:({key:e,value:t})=>ys.value({[e]:t})},bg=new Proxy(String,{get:()=>bg}),kn=bg,rb=(e,t,{descriptor:n})=>{let r=[`${kn.yellow(typeof e=="string"?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${kn.blue(typeof t=="string"?n.key(t):n.pair(t))}`),r.join("; ")+"."},xg=Symbol.for("vnopts.VALUE_NOT_EXIST"),Pu=Symbol.for("vnopts.VALUE_UNCHANGED"),_2=" ".repeat(2),ib=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),s=[];return r&&s.push(T2(e,t,r,n.descriptor)),i&&s.push([T2(e,t,i.title,n.descriptor)].concat(i.values.map(o=>_g(o,n.loggerPrintWidth))).join(` -`)),Tg(s,n.loggerPrintWidth)};Ds=[],Yf=[];Ng=(e,t,{descriptor:n,logger:r,schemas:i})=>{let s=[`Ignored unknown option ${kn.yellow(n.pair({key:e,value:t}))}.`],o=sb(e,Object.keys(i),{maxDistance:3});o&&s.push(`Did you mean ${kn.blue(n.key(o))}?`),r.warn(s.join(" "))},ob=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];Or=class{static create(e){return ab(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return Pu}};lb=class extends Or{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},cb=class extends Or{expected(){return"anything"}validate(){return!0}},fb=class extends Or{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let i=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let i=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);i!==!1&&n.push(...i.map(({value:s})=>({value:[s]})))}return n}forward(e,t){let n=[];for(let r of e){let i=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...i.map(N2))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let s=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in s&&n.push(s.remain),r.push(...s.redirect.map(N2))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};pb=class extends Or{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};bb=class extends Or{constructor(e){super(e),this._choices=db(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(Db).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},xb=class extends Or{expected(){return"a number"}validate(e,t){return typeof e=="number"}},_b=class extends xb{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&vb(e)}},L2=class extends Or{expected(){return"a string"}validate(e){return typeof e=="string"}},Tb=ys,Nb=Ng,Sb=ib,Fb=rb,Ab=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=Tb,unknown:s=Nb,invalid:o=Sb,deprecated:a=Fb,missing:u=()=>!1,required:l=()=>!1,preprocess:c=h=>h,postprocess:f=()=>Pu}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:hb(e,"name"),normalizeDefaultResult:S2,normalizeExpectedResult:Sg,normalizeDeprecatedResult:A2,normalizeForwardResult:t1,normalizeRedirectResult:C2,normalizeValidateResult:F2},this._unknownHandler=s,this._invalidHandler=yb(o),this._deprecatedHandler=a,this._identifyMissing=(h,m)=>!(h in m)||u(h,m),this._identifyRequired=l,this._preprocess=c,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=mb()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let i=n.shift(),s=this._applyNormalization(i,t);n.push(...s)}};r();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in t)){let o=S2(s.default(this._utils));"value"in o&&n.push({[i]:o.value})}}r();for(let i of Object.keys(this._utils.schemas)){if(!(i in t))continue;let s=this._utils.schemas[i],o=t[i],a=s.postprocess(o,this._utils);a!==Pu&&(this._applyValidation(a,i,s),t[i]=a)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let s of r){let o=this._utils.schemas[s],a=o.preprocess(e[s],this._utils);this._applyValidation(a,s,o);let u=({from:f,to:h})=>{n.push(typeof h=="string"?{[h]:f}:{[h.key]:h.value})},l=({value:f,redirectTo:h})=>{let m=A2(o.deprecated(f,this._utils),a,!0);if(m!==!1)if(m===!0)this._hasDeprecationWarned(s)||this._utils.logger.warn(this._deprecatedHandler(s,h,this._utils));else for(let{value:g}of m){let v={key:s,value:g};if(!this._hasDeprecationWarned(v)){let b=typeof h=="string"?{key:h,value:g}:h;this._utils.logger.warn(this._deprecatedHandler(v,b,this._utils))}}};t1(o.forward(a,this._utils),a).forEach(u);let c=C2(o.redirect(a,this._utils),a);if(c.redirect.forEach(u),"remain"in c){let f=c.remain;t[s]=s in t?o.overlap(t[s],f,this._utils):f,l({value:f})}for(let{from:f,to:h}of c.redirect)l({value:f,redirectTo:h})}for(let s of i){let o=e[s];this._applyUnknownHandler(s,o,t,(a,u)=>{n.push({[a]:u})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,xg,this._utils)}_partitionOptionKeys(e){let[t,n]=gb(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=F2(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let s of Object.keys(i)){if(this._identifyMissing(s,i))continue;let o=i[s];s in this._utils.schemas?r(s,o):n[s]=o}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Pu){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let i of n){let s=t.override[i];this._applyValidation(s,i,this._utils.schemas[i]),e[i]=s}for(let i of r){let s=t.override[i];this._applyUnknownHandler(i,s,e,(o,a)=>{let u=this._utils.schemas[o];this._applyValidation(a,o,u),e[o]=a})}}}}};Ib=wb,Rb=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},Ob=wo("findLast",function(){if(Array.isArray(this))return Rb}),Fg=Ob,kb=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Mb=[];m1=Pb,Ag=new Set(["yaml","toml"]),wg=({node:e})=>m1(e)&&Ag.has(e.language);Ub=Vb;Gb=jb,Cg=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),qb=e=>Object.keys(e).filter(t=>!Cg.has(t));I2=$b;zb=new WeakMap;Jb=["clean","embed","print"],Xb=Object.fromEntries(Jb.map(e=>[e,!1]));R2={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};xs=e6,O2=/\r\n|[\n\r\u2028\u2029]/;Lo=i6;l6=u6;Og=c6;p6=f6,h6=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},d6=wo("findLastIndex",function(){if(Array.isArray(this))return h6}),m6=d6;kg=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),y6=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);Mg="\uFEFF",B2=Symbol("cursor");v1={};r1(v1,{builders:()=>A6,printer:()=>w6,utils:()=>C6});A6={join:K2,line:Z2,softline:H8,hardline:Zn,literalline:tg,group:X2,conditionalGroup:j8,fill:U8,lineSuffix:Zf,lineSuffixBoundary:W8,cursor:ci,breakParent:qu,ifBreak:G8,trim:Q8,indent:Bu,indentIfBreak:q8,align:bs,addAlignmentToDoc:J2,markAsRoot:Y2,dedentToRoot:B8,dedent:V8,hardlineWithoutBreakParent:l1,literallineWithoutBreakParent:eg,label:$8,concat:e=>e},w6={printDocToString:$u},C6={willBreak:F8,traverseDoc:a1,findInDoc:u1,mapDoc:Gu,removeLines:C8,stripTrailingHardline:Q2,replaceEndOfLine:R8,canBreak:k8},Ug="3.9.6",D1={};r1(D1,{addDanglingComment:()=>ui,addLeadingComment:()=>Fo,addTrailingComment:()=>Ao,getAlignmentSize:()=>f1,getIndentSize:()=>M6,getMaxContinuousCount:()=>V6,getNextNonSpaceNonCommentCharacter:()=>j6,getNextNonSpaceNonCommentCharacterIndex:()=>J6,getPreferredQuote:()=>$6,getStringWidth:()=>c1,hasNewline:()=>Cr,hasNewlineInRange:()=>W6,hasSpaces:()=>z6,isNextLineEmpty:()=>t3,isNextLineEmptyAfterIndex:()=>x1,isPreviousLineEmpty:()=>K6,makeString:()=>e3,skip:()=>Co,skipEverythingButNewLine:()=>lg,skipInlineComment:()=>y1,skipNewline:()=>fi,skipSpaces:()=>Ir,skipToLineEnd:()=>ug,skipTrailingComment:()=>E1,skipWhitespace:()=>xE});y1=L6;E1=I6;b1=R6;x1=O6;M6=k6;V6=B6;j6=U6,jg=Object.freeze({character:"'",codePoint:39}),Gg=Object.freeze({character:'"',codePoint:34}),G6=Object.freeze({preferred:jg,alternate:Gg}),q6=Object.freeze({preferred:Gg,alternate:jg});W6=H6;z6=Q6;_1=li(Vg);$g=li(Dg,0),Hg={parse:li(_6),formatAST:li(T6),formatDoc:li(N6),printToDoc:li(S6),printDocToString:li(F6)}});var Jg=fr((Yg,N1)=>{(function(e){function t(){var r=e();return r.default||r}if(typeof Yg=="object"&&typeof N1=="object")N1.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var n=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};n.prettierPlugins=n.prettierPlugins||{},n.prettierPlugins.graphql=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(d,D)=>{for(var y in D)e(d,y,{get:D[y],enumerable:!0})},s=(d,D,y,T)=>{if(D&&typeof D=="object"||typeof D=="function")for(let _ of n(D))!r.call(d,_)&&_!==y&&e(d,_,{get:()=>D[_],enumerable:!(T=t(D,_))||T.enumerable});return d},o=d=>s(e({},"__esModule",{value:!0}),d),a={};i(a,{languages:()=>lv,options:()=>pv,parsers:()=>A1,printers:()=>Q4});var u=(d,D)=>(y,T,..._)=>y|1&&T==null?void 0:(D.call(T)??T[d]).apply(T,_),l=String.prototype.replaceAll??function(d,D){return d.global?this.replace(d,D):this.split(d).join(D)},c=u("replaceAll",function(){if(typeof this=="string")return l}),f=c,h=()=>{},m=h,g="indent",v="group",b="if-break",E="line",A="break-parent",C=m,w=m;function F(d){return C(d),{type:g,contents:d}}var O={type:A};function L(d,D={}){return C(d),w(D.expandedStates,!0),{type:v,id:D.id,contents:d,break:!!D.shouldBreak,expandedStates:D.expandedStates}}function P(d,D="",y={}){return C(d),D!==""&&C(D),{type:b,breakContents:d,flatContents:D,groupId:y.groupId}}function W(d,D){C(d),w(D);let y=[];for(let T=0;T{if(y===!1)return!1;let _=!!T?.backwards,{length:B}=D,ue=y;for(;ue>=0&&ued===` -`||d==="\r"||d==="\u2028"||d==="\u2029";function ce(d,D,y){if(D===!1)return!1;let T=!!y?.backwards,_=d.charAt(D);if(T){if(d.charAt(D-1)==="\r"&&_===` -`)return D-2;if(ie(_))return D-1}else{if(_==="\r"&&d.charAt(D+1)===` -`)return D+2;if(ie(_))return D+1}return D}var Oe=ce;function Je(d,D,y={}){let T=Y(d,y.backwards?D-1:D,y),_=Oe(d,T,y);return T!==_}var gt=Je,at=()=>!0;function pe(d,D){let y=d.node;return y.printed=!0,D.printer.printComment(d,D)}function kt(d,D,y={}){let{indent:T=!1,marker:_,filter:B=at}=y,ue=new Set(d.node?.comments?.filter(vt=>!(vt.leading||vt.trailing||vt.marker!==_||!B(vt))));if(ue.size===0)return"";let Be=d.map(({node:vt})=>ue.has(vt)?pe(d,D):"","comments").filter(Boolean),ht=W(J,Be);return T?F([J,ht]):ht}function un(d){return Array.isArray(d)&&d.length>0}var Q=un,Ie=class extends Error{name="UnexpectedNodeError";constructor(d,D,y="type"){super(`Unexpected ${D} node ${y}: ${JSON.stringify(d[y])}.`),this.node=d}},z=Ie,me=null;function ke(d){if(me!==null&&typeof me.property){let D=me;return me=ke.prototype=null,D}return me=ke.prototype=d??Object.create(null),new ke}var U=10;for(let d=0;d<=U;d++)ke();function X(d){return ke(d)}function Z(d,D="type"){X(d);function y(T){let _=T[D],B=d[_];if(!Array.isArray(B))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:T});return B}return y}var te=Z,ae=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],Ne={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:ae[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:ae[1],FragmentArgument:ae[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:ae[1],Directive:["name","arguments"],NamedType:ae[0],ListType:ae[2],NonNullType:ae[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:ae[2],ScalarTypeDefinition:ae[3],ObjectTypeDefinition:ae[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:ae[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:ae[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:ae[5],ScalarTypeExtension:ae[5],ObjectTypeExtension:ae[6],InterfaceTypeExtension:ae[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Se=te(Ne,"kind"),Fe=Se,ar=d=>d.loc.start,_s=d=>d.loc.end;function Io(d,D){d.kind==="StringValue"&&d.block&&!d.value.includes(` -`)&&(D.value=d.value.trim())}Io.ignoredProperties=new Set(["loc","comments"]);var Ro="format",Yu=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,Ju=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,Oo=d=>Ju.test(d),Xu=d=>Yu.test(d),kr=d=>`# @${Ro} +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};Px=Array.prototype.toReversed??function(){return[...this].reverse()},Bx=Jo("toReversed",function(){if(Array.isArray(this))return Px}),Vx=Bx;$x=Ux();Hx=e=>String(e).split(/[/\\]/).pop(),Wx=e=>String(e).startsWith("file:");zx=void 0;E4=Yx,Cs={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>Cs.value(n)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(n=>`${Cs.key(n)}: ${Cs.value(e[n])}`).join(", ")} }`},pair:({key:e,value:t})=>Cs.value({[e]:t})},b4=new Proxy(String,{get:()=>b4}),Ln=b4,Jx=(e,t,{descriptor:n})=>{let r=[`${Ln.yellow(typeof e=="string"?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Ln.blue(typeof t=="string"?n.key(t):n.pair(t))}`),r.join("; ")+"."},x4=Symbol.for("vnopts.VALUE_NOT_EXIST"),sl=Symbol.for("vnopts.VALUE_UNCHANGED"),vg=" ".repeat(2),Xx=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),s=[];return r&&s.push(_g(e,t,r,n.descriptor)),i&&s.push([_g(e,t,i.title,n.descriptor)].concat(i.values.map(o=>v4(o,n.loggerPrintWidth))).join(` +`)),_4(s,n.loggerPrintWidth)};As=[],S1=[];N4=(e,t,{descriptor:n,logger:r,schemas:i})=>{let s=[`Ignored unknown option ${Ln.yellow(n.pair({key:e,value:t}))}.`],o=Kx(e,Object.keys(i),{maxDistance:3});o&&s.push(`Did you mean ${Ln.blue(n.key(o))}?`),r.warn(s.join(" "))},Zx=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];Ir=class{static create(e){return ev(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return sl}};nv=class extends Ir{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},rv=class extends Ir{expected(){return"anything"}validate(){return!0}},iv=class extends Ir{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let i=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let i=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);i!==!1&&n.push(...i.map(({value:s})=>({value:[s]})))}return n}forward(e,t){let n=[];for(let r of e){let i=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...i.map(Ng))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let s=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in s&&n.push(s.remain),r.push(...s.redirect.map(Ng))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};sv=class extends Ir{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};hv=class extends Ir{constructor(e){super(e),this._choices=av(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(fv).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},mv=class extends Ir{expected(){return"a number"}validate(e,t){return typeof e=="number"}},gv=class extends mv{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&cv(e)}},wg=class extends Ir{expected(){return"a string"}validate(e){return typeof e=="string"}},Dv=Cs,yv=N4,Ev=Xx,bv=Jx,xv=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=Dv,unknown:s=yv,invalid:o=Ev,deprecated:a=bv,missing:u=()=>!1,required:l=()=>!1,preprocess:c=h=>h,postprocess:f=()=>sl}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:ov(e,"name"),normalizeDefaultResult:Tg,normalizeExpectedResult:T4,normalizeDeprecatedResult:Fg,normalizeForwardResult:I1,normalizeRedirectResult:Cg,normalizeValidateResult:Sg},this._unknownHandler=s,this._invalidHandler=pv(o),this._deprecatedHandler=a,this._identifyMissing=(h,m)=>!(h in m)||u(h,m),this._identifyRequired=l,this._preprocess=c,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=uv()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let i=n.shift(),s=this._applyNormalization(i,t);n.push(...s)}};r();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in t)){let o=Tg(s.default(this._utils));"value"in o&&n.push({[i]:o.value})}}r();for(let i of Object.keys(this._utils.schemas)){if(!(i in t))continue;let s=this._utils.schemas[i],o=t[i],a=s.postprocess(o,this._utils);a!==sl&&(this._applyValidation(a,i,s),t[i]=a)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let s of r){let o=this._utils.schemas[s],a=o.preprocess(e[s],this._utils);this._applyValidation(a,s,o);let u=({from:f,to:h})=>{n.push(typeof h=="string"?{[h]:f}:{[h.key]:h.value})},l=({value:f,redirectTo:h})=>{let m=Fg(o.deprecated(f,this._utils),a,!0);if(m!==!1)if(m===!0)this._hasDeprecationWarned(s)||this._utils.logger.warn(this._deprecatedHandler(s,h,this._utils));else for(let{value:g}of m){let E={key:s,value:g};if(!this._hasDeprecationWarned(E)){let v=typeof h=="string"?{key:h,value:g}:h;this._utils.logger.warn(this._deprecatedHandler(E,v,this._utils))}}};I1(o.forward(a,this._utils),a).forEach(u);let c=Cg(o.redirect(a,this._utils),a);if(c.redirect.forEach(u),"remain"in c){let f=c.remain;t[s]=s in t?o.overlap(t[s],f,this._utils):f,l({value:f})}for(let{from:f,to:h}of c.redirect)l({value:f,redirectTo:h})}for(let s of i){let o=e[s];this._applyUnknownHandler(s,o,t,(a,u)=>{n.push({[a]:u})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,x4,this._utils)}_partitionOptionKeys(e){let[t,n]=lv(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=Sg(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let s of Object.keys(i)){if(this._identifyMissing(s,i))continue;let o=i[s];s in this._utils.schemas?r(s,o):n[s]=o}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==sl){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let i of n){let s=t.override[i];this._applyValidation(s,i,this._utils.schemas[i]),e[i]=s}for(let i of r){let s=t.override[i];this._applyUnknownHandler(i,s,e,(o,a)=>{let u=this._utils.schemas[o];this._applyValidation(a,o,u),e[o]=a})}}}}};Tv=vv,Sv=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},Fv=Jo("findLast",function(){if(Array.isArray(this))return Sv}),S4=Fv,Av=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Cv=[];W1=wv,F4=new Set(["yaml","toml"]),A4=({node:e})=>W1(e)&&F4.has(e.language);Rv=Iv;kv=Ov,C4=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Mv=e=>Object.keys(e).filter(t=>!C4.has(t));Lg=Pv;$v=new WeakMap;Gv=["clean","embed","print"],qv=Object.fromEntries(Gv.map(e=>[e,!1]));Ig={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};Is=Qv,Rg=/\r\n|[\n\r\u2028\u2029]/;Ko=Xv;n_=t_;R4=r_;s_=i_,o_=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},a_=Jo("findLastIndex",function(){if(Array.isArray(this))return o_}),u_=a_;O4=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),p_=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);k4="\uFEFF",Pg=Symbol("cursor");z1={};O1(z1,{builders:()=>x_,printer:()=>v_,utils:()=>__});x_={join:Xg,line:Kg,softline:B6,hardline:zn,literalline:e4,group:Jg,conditionalGroup:O6,fill:R6,lineSuffix:w1,lineSuffixBoundary:V6,cursor:Ei,breakParent:fl,ifBreak:k6,trim:U6,indent:ol,indentIfBreak:M6,align:Ls,addAlignmentToDoc:Yg,markAsRoot:zg,dedentToRoot:L6,dedent:I6,hardlineWithoutBreakParent:U1,literallineWithoutBreakParent:Zg,label:P6,concat:e=>e},v_={printDocToString:pl},__={willBreak:b6,traverseDoc:B1,findInDoc:V1,mapDoc:cl,removeLines:_6,stripTrailingHardline:Wg,replaceEndOfLine:S6,canBreak:A6},V4="3.9.6",Y1={};O1(Y1,{addDanglingComment:()=>Di,addLeadingComment:()=>zo,addTrailingComment:()=>Yo,getAlignmentSize:()=>j1,getIndentSize:()=>C_,getMaxContinuousCount:()=>I_,getNextNonSpaceNonCommentCharacter:()=>O_,getNextNonSpaceNonCommentCharacterIndex:()=>G_,getPreferredQuote:()=>P_,getStringWidth:()=>$1,hasNewline:()=>Ar,hasNewlineInRange:()=>V_,hasSpaces:()=>$_,isNextLineEmpty:()=>z_,isNextLineEmptyAfterIndex:()=>Z1,isPreviousLineEmpty:()=>H_,makeString:()=>Q_,skip:()=>Xo,skipEverythingButNewLine:()=>u4,skipInlineComment:()=>J1,skipNewline:()=>bi,skipSpaces:()=>wr,skipToLineEnd:()=>a4,skipTrailingComment:()=>X1,skipWhitespace:()=>mx});J1=N_;X1=T_;K1=S_;Z1=F_;C_=A_;I_=L_;O_=R_,U4=Object.freeze({character:"'",codePoint:39}),$4=Object.freeze({character:'"',codePoint:34}),k_=Object.freeze({preferred:U4,alternate:$4}),M_=Object.freeze({preferred:$4,alternate:U4});V_=B_;$_=U_;ep=yi(B4);G4=yi(D4,0),q4={parse:yi(g_),formatAST:yi(D_),formatDoc:yi(y_),printToDoc:yi(E_),printDocToString:yi(b_)}});var Y4=or((z4,np)=>{(function(e){function t(){var r=e();return r.default||r}if(typeof z4=="object"&&typeof np=="object")np.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var n=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};n.prettierPlugins=n.prettierPlugins||{},n.prettierPlugins.graphql=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(d,y)=>{for(var b in y)e(d,b,{get:y[b],enumerable:!0})},s=(d,y,b,F)=>{if(y&&typeof y=="object"||typeof y=="function")for(let _ of n(y))!r.call(d,_)&&_!==b&&e(d,_,{get:()=>y[_],enumerable:!(F=t(y,_))||F.enumerable});return d},o=d=>s(e({},"__esModule",{value:!0}),d),a={};i(a,{languages:()=>DD,options:()=>bD,parsers:()=>up,printers:()=>t7});var u=(d,y)=>(b,F,..._)=>b|1&&F==null?void 0:(y.call(F)??F[d]).apply(F,_),l=String.prototype.replaceAll??function(d,y){return d.global?this.replace(d,y):this.split(d).join(y)},c=u("replaceAll",function(){if(typeof this=="string")return l}),f=c,h=()=>{},m=h,g="indent",E="group",v="if-break",N="line",L="break-parent",M=m,w=m;function R(d){return M(d),{type:g,contents:d}}var V={type:L};function S(d,y={}){return M(d),w(y.expandedStates,!0),{type:E,id:y.id,contents:d,break:!!y.shouldBreak,expandedStates:y.expandedStates}}function k(d,y="",b={}){return M(d),y!==""&&M(y),{type:v,breakContents:d,flatContents:y,groupId:b.groupId}}function T(d,y){M(d),w(y);let b=[];for(let F=0;F{if(b===!1)return!1;let _=!!F?.backwards,{length:$}=y,re=b;for(;re>=0&&re<$;){let we=y.charAt(re);if(d instanceof RegExp){if(!d.test(we))return re}else if(!d.includes(we))return re;_?re--:re++}return re===-1||re===$?re:!1}}var x=C(/\s/),B=C(" "),P=C(",; "),q=C(/[^\n\r]/),J=d=>d===` +`||d==="\r"||d==="\u2028"||d==="\u2029";function se(d,y,b){if(y===!1)return!1;let F=!!b?.backwards,_=d.charAt(y);if(F){if(d.charAt(y-1)==="\r"&&_===` +`)return y-2;if(J(_))return y-1}else{if(_==="\r"&&d.charAt(y+1)===` +`)return y+2;if(J(_))return y+1}return y}var Oe=se;function Ke(d,y,b={}){let F=B(d,b.backwards?y-1:y,b),_=Oe(d,F,b);return F!==_}var $t=Ke,Rt=()=>!0;function le(d,y){let b=d.node;return b.printed=!0,y.printer.printComment(d,y)}function mn(d,y,b={}){let{indent:F=!1,marker:_,filter:$=Rt}=b,re=new Set(d.node?.comments?.filter(ct=>!(ct.leading||ct.trailing||ct.marker!==_||!$(ct))));if(re.size===0)return"";let we=d.map(({node:ct})=>re.has(ct)?le(d,y):"","comments").filter(Boolean),it=T(te,we);return F?R([te,it]):it}function nr(d){return Array.isArray(d)&&d.length>0}var Y=nr,Ne=class extends Error{name="UnexpectedNodeError";constructor(d,y,b="type"){super(`Unexpected ${y} node ${b}: ${JSON.stringify(d[b])}.`),this.node=d}},X=Ne,de=null;function Ce(d){if(de!==null&&typeof de.property){let y=de;return de=Ce.prototype=null,y}return de=Ce.prototype=d??Object.create(null),new Ce}var mt=10;for(let d=0;d<=mt;d++)Ce();function We(d){return Ce(d)}function Rs(d,y="type"){We(d);function b(F){let _=F[y],$=d[_];if(!Array.isArray($))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:F});return $}return b}var _i=Rs,Nt=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],J4={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:Nt[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:Nt[1],FragmentArgument:Nt[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:Nt[1],Directive:["name","arguments"],NamedType:Nt[0],ListType:Nt[2],NonNullType:Nt[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:Nt[2],ScalarTypeDefinition:Nt[3],ObjectTypeDefinition:Nt[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:Nt[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:Nt[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:Nt[5],ScalarTypeExtension:Nt[5],ObjectTypeExtension:Nt[6],InterfaceTypeExtension:Nt[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},X4=_i(J4,"kind"),K4=X4,rp=d=>d.loc.start,ip=d=>d.loc.end;function sp(d,y){d.kind==="StringValue"&&d.block&&!d.value.includes(` +`)&&(y.value=d.value.trim())}sp.ignoredProperties=new Set(["loc","comments"]);var Z4="format",eD=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,tD=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,nD=d=>tD.test(d),rD=d=>eD.test(d),iD=d=>`# @${Z4} -${d}`;function Xg(d,D){if(D===!1)return!1;if(d.charAt(D)==="/"&&d.charAt(D+1)==="*"){for(let y=D+2;y{let ue=y();return!_&&nv(D.originalText,_s(B))?[ue,J]:ue},T)}function S1(d,D,y){let{node:T}=d;return Q(T.arguments)?L(["(",F([$,W([P("",", "),$],bn(d,D,y,"arguments"))]),$,")"]):""}function Zt(d,D,y){let{node:T}=d;if(!T.description)return"";let _=[y("description")];return T.kind==="InputValueDefinition"&&!T.description.block?_.push(k):_.push(J),_}function Et(d,D){let{node:y}=d;if(!Q(y.directives))return"";let T=W(k,d.map(D,"directives"));return y.kind==="FragmentDefinition"||y.kind==="OperationDefinition"?L([k,T]):[" ",L(F([$,T]))]}function F1(d,D){let{node:y}=d;return Q(y.variableDefinitions)?L(["(",F([$,W([P("",", "),$],d.map(D,"variableDefinitions"))]),$,")"]):""}function rv(d,D,y){let{node:T}=d;switch(T.kind){case"Document":return[...W(J,bn(d,D,y,"definitions")),J];case"OperationDefinition":{let _=D.originalText[ar(T)]!=="{",B=!!T.name;return[Zt(d,D,y),_?T.operation:"",_&&B?[" ",y("name")]:"",_&&!B&&Q(T.variableDefinitions)?" ":"",F1(d,y),Et(d,y),!_&&!B?"":" ",y("selectionSet")]}case"FragmentDefinition":return[Zt(d,D,y),"fragment ",y("name"),F1(d,y)," on ",y("typeCondition"),Et(d,y)," ",y("selectionSet")];case"SelectionSet":return["{",F([J,W(J,bn(d,D,y,"selections"))]),J,"}"];case"Field":return L([T.alias?[y("alias"),": "]:"",y("name"),Q(T.arguments)?L(["(",F([$,W([P("",", "),$],bn(d,D,y,"arguments"))]),$,")"]):"",Et(d,y),T.selectionSet?" ":"",y("selectionSet")]);case"Name":return T.value;case"StringValue":if(T.block){let _=f(0,T.value,'"""','\\"""').split(` -`);return _.length===1&&(_[0]=_[0].trim()),_.every(B=>B==="")&&(_.length=0),W(J,['"""',..._,'"""'])}return['"',f(0,f(0,T.value,/["\\]/g,"\\$&"),` -`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return T.value;case"BooleanValue":return T.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",y("name")];case"ListValue":{let _=!Q(T.values);return L(["[",kt(d,D,{indent:!0}),_?"":F([$,W([P("",", "),$],d.map(y,"values"))]),$,"]"])}case"ObjectValue":{let _=!Q(T.fields),B=D.bracketSpacing&&!_?" ":"";return L(["{",B,kt(d,D,{indent:!0}),_?"":[F([$,W([P("",", "),$],d.map(y,"fields"))])],$,P("",B),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[y("name"),": ",y("value")];case"Directive":return["@",y("name"),S1(d,D,y)];case"NamedType":return y("name");case"VariableDefinition":return[Zt(d,D,y),y("variable"),": ",y("type"),T.defaultValue?[" = ",y("defaultValue")]:"",Et(d,y)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:_}=T,B=[];return _.endsWith("TypeDefinition")?B.push(Zt(d,D,y)):B.push("extend "),_.startsWith("ObjectType")?B.push("type"):_.startsWith("InputObjectType")?B.push("input"):B.push("interface"),B.push(" ",y("name")),!_.startsWith("InputObjectType")&&Q(T.interfaces)&&B.push(" implements ",F([L([W([" &",k],d.map(y,"interfaces"))])])),B.push(Et(d,y)),Q(T.fields)&&B.push([" {",F([J,W(J,bn(d,D,y,"fields"))]),J,"}"]),B}case"FieldDefinition":return[Zt(d,D,y),y("name"),Q(T.arguments)?L(["(",F([$,W([P("",", "),$],bn(d,D,y,"arguments"))]),$,")"]):"",": ",y("type"),Et(d,y)];case"DirectiveDefinition":return[Zt(d,D,y),"directive ","@",y("name"),Q(T.arguments)?L(["(",F([$,W([P("",", "),$],bn(d,D,y,"arguments"))]),$,")"]):"",Et(d,y),T.repeatable?" repeatable":""," on ",...W(" | ",d.map(y,"locations"))];case"DirectiveExtension":return["extend directive @",y("name"),Et(d,y)];case"EnumTypeExtension":case"EnumTypeDefinition":return[Zt(d,D,y),T.kind==="EnumTypeExtension"?"extend ":"","enum ",y("name"),Et(d,y),Q(T.values)?[" {",F([J,W(J,bn(d,D,y,"values"))]),J,"}"]:""];case"EnumValueDefinition":return[Zt(d,D,y),y("name"),Et(d,y)];case"InputValueDefinition":return[Zt(d,D,y),y("name"),": ",y("type"),T.defaultValue?[" = ",y("defaultValue")]:"",Et(d,y)];case"SchemaExtension":return["extend schema",Et(d,y),...Q(T.operationTypes)?[" {",F([J,W(J,bn(d,D,y,"operationTypes"))]),J,"}"]:[]];case"SchemaDefinition":return[Zt(d,D,y),"schema",Et(d,y)," {",Q(T.operationTypes)?F([J,W(J,bn(d,D,y,"operationTypes"))]):"",J,"}"];case"OperationTypeDefinition":return[T.operation,": ",y("type")];case"FragmentSpread":return["...",y("name"),S1(d,D,y),Et(d,y)];case"InlineFragment":return["...",T.typeCondition?[" on ",y("typeCondition")]:"",Et(d,y)," ",y("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return L([Zt(d,D,y),L([T.kind==="UnionTypeExtension"?"extend ":"","union ",y("name"),Et(d,y),Q(T.types)?[" =",P(""," "),F([P([k,"| "]),W([k,"| "],d.map(y,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[Zt(d,D,y),T.kind==="ScalarTypeExtension"?"extend ":"","scalar ",y("name"),Et(d,y)];case"NonNullType":return[y("type"),"!"];case"ListType":return["[",y("type"),"]"];default:throw new z(T,"Graphql","kind")}}function iv(d){return d.kind!=="Comment"}function sv({node:d}){if(d.kind==="Comment")return"#"+d.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(d))}function ov(d){let{node:D}=d;return D?.comments?.some(y=>y.value.trim()==="prettier-ignore")}var av={print:rv,massageAstNode:Io,hasPrettierIgnore:ov,insertPragma:kr,printComment:sv,canAttachComment:iv,getVisitorKeys:Fe},uv=av,lv=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],cv={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},fv={bracketSpacing:cv.bracketSpacing},pv=fv,A1={};i(A1,{graphql:()=>W4});function hv(d,D){return d?.__kind===D}var dv=hv;function mv(d){return typeof d=="object"&&d!==null}function gv(d,D){if(!d)throw new Error(D??"Unexpected invariant triggered.")}var vv=/\r\n|[\n\r]/g;function Ku(d,D){let y=0,T=1;for(let _ of d.body.matchAll(vv)){if(typeof _.index!="number"&&gv(!1),_.index>=D)break;y=_.index+_[0].length,T+=1}return{line:T,column:D+1-y}}function Dv(d){return w1(d.source,Ku(d.source,d.start))}function w1(d,D){let y=d.locationOffset.column-1,T="".padStart(y)+d.body,_=D.line-1,B=d.locationOffset.line-1,ue=D.line+B,Be=D.line===1?y:0,ht=D.column+Be,vt=`${d.name}:${ue}:${ht} -`,ur=T.split(/\r\n|[\n\r]/g),gi=ur[_];if(gi.length>120){let Vo=Math.floor(ht/80),Ns=ht%80,lr=[];for(let cr=0;cr["|",cr]),["|","^".padStart(Ns)],["|",lr[Vo+1]]])}return vt+C1([[`${ue-1} |`,ur[_-1]],[`${ue} |`,gi],["|","^".padStart(ht)],[`${ue+1} |`,ur[_+1]]])}function C1(d){let D=d.filter(([T,_])=>_!==void 0),y=Math.max(...D.map(([T])=>T.length));return D.map(([T,_])=>T.padStart(y)+(_?" "+_:"")).join(` -`)}var L1=class zg extends Error{constructor(D,y={}){let{nodes:T,source:_,positions:B,path:ue,originalError:Be,cause:ht,extensions:vt}=y,ur="cause"in y,gi=ur?ht:Be,Vo=ur||Be!=null?{cause:gi}:void 0;super(D,Vo),this.name="GraphQLError",this.path=ue??void 0;let Ns=Be??(ht instanceof Error?ht:void 0);this.originalError=Ns,this.nodes=I1(Array.isArray(T)?T:T?[T]:void 0);let lr=I1(this.nodes?.map(xn=>xn.loc).filter(xn=>xn!=null));this.source=_??lr?.[0]?.source,this.positions=B??lr?.map(xn=>xn.start),this.locations=B&&_?B.map(xn=>Ku(_,xn)):lr?.map(xn=>Ku(xn.source,xn.start));let cr=mv(Ns?.extensions)?Ns.extensions:void 0;this.extensions=vt??cr??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),Be?.stack!=null?Object.defineProperty(this,"stack",{value:Be.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,zg):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let D=this.message;if(this.nodes)for(let y of this.nodes)y.loc&&(D+=` +${d}`;function sD(d,y){if(y===!1)return!1;if(d.charAt(y)==="/"&&d.charAt(y+1)==="*"){for(let b=y+2;b{let re=b();return!_&&cD(y.originalText,ip($))?[re,te]:re},F)}function op(d,y,b){let{node:F}=d;return Y(F.arguments)?S(["(",R([j,T([k("",", "),j],gn(d,y,b,"arguments"))]),j,")"]):""}function zt(d,y,b){let{node:F}=d;if(!F.description)return"";let _=[b("description")];return F.kind==="InputValueDefinition"&&!F.description.block?_.push(A):_.push(te),_}function gt(d,y){let{node:b}=d;if(!Y(b.directives))return"";let F=T(A,d.map(y,"directives"));return b.kind==="FragmentDefinition"||b.kind==="OperationDefinition"?S([A,F]):[" ",S(R([j,F]))]}function ap(d,y){let{node:b}=d;return Y(b.variableDefinitions)?S(["(",R([j,T([k("",", "),j],d.map(y,"variableDefinitions"))]),j,")"]):""}function fD(d,y,b){let{node:F}=d;switch(F.kind){case"Document":return[...T(te,gn(d,y,b,"definitions")),te];case"OperationDefinition":{let _=y.originalText[rp(F)]!=="{",$=!!F.name;return[zt(d,y,b),_?F.operation:"",_&&$?[" ",b("name")]:"",_&&!$&&Y(F.variableDefinitions)?" ":"",ap(d,b),gt(d,b),!_&&!$?"":" ",b("selectionSet")]}case"FragmentDefinition":return[zt(d,y,b),"fragment ",b("name"),ap(d,b)," on ",b("typeCondition"),gt(d,b)," ",b("selectionSet")];case"SelectionSet":return["{",R([te,T(te,gn(d,y,b,"selections"))]),te,"}"];case"Field":return S([F.alias?[b("alias"),": "]:"",b("name"),Y(F.arguments)?S(["(",R([j,T([k("",", "),j],gn(d,y,b,"arguments"))]),j,")"]):"",gt(d,b),F.selectionSet?" ":"",b("selectionSet")]);case"Name":return F.value;case"StringValue":if(F.block){let _=f(0,F.value,'"""','\\"""').split(` +`);return _.length===1&&(_[0]=_[0].trim()),_.every($=>$==="")&&(_.length=0),T(te,['"""',..._,'"""'])}return['"',f(0,f(0,F.value,/["\\]/g,"\\$&"),` +`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return F.value;case"BooleanValue":return F.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",b("name")];case"ListValue":{let _=!Y(F.values);return S(["[",mn(d,y,{indent:!0}),_?"":R([j,T([k("",", "),j],d.map(b,"values"))]),j,"]"])}case"ObjectValue":{let _=!Y(F.fields),$=y.bracketSpacing&&!_?" ":"";return S(["{",$,mn(d,y,{indent:!0}),_?"":[R([j,T([k("",", "),j],d.map(b,"fields"))])],j,k("",$),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[b("name"),": ",b("value")];case"Directive":return["@",b("name"),op(d,y,b)];case"NamedType":return b("name");case"VariableDefinition":return[zt(d,y,b),b("variable"),": ",b("type"),F.defaultValue?[" = ",b("defaultValue")]:"",gt(d,b)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:_}=F,$=[];return _.endsWith("TypeDefinition")?$.push(zt(d,y,b)):$.push("extend "),_.startsWith("ObjectType")?$.push("type"):_.startsWith("InputObjectType")?$.push("input"):$.push("interface"),$.push(" ",b("name")),!_.startsWith("InputObjectType")&&Y(F.interfaces)&&$.push(" implements ",R([S([T([" &",A],d.map(b,"interfaces"))])])),$.push(gt(d,b)),Y(F.fields)&&$.push([" {",R([te,T(te,gn(d,y,b,"fields"))]),te,"}"]),$}case"FieldDefinition":return[zt(d,y,b),b("name"),Y(F.arguments)?S(["(",R([j,T([k("",", "),j],gn(d,y,b,"arguments"))]),j,")"]):"",": ",b("type"),gt(d,b)];case"DirectiveDefinition":return[zt(d,y,b),"directive ","@",b("name"),Y(F.arguments)?S(["(",R([j,T([k("",", "),j],gn(d,y,b,"arguments"))]),j,")"]):"",gt(d,b),F.repeatable?" repeatable":""," on ",...T(" | ",d.map(b,"locations"))];case"DirectiveExtension":return["extend directive @",b("name"),gt(d,b)];case"EnumTypeExtension":case"EnumTypeDefinition":return[zt(d,y,b),F.kind==="EnumTypeExtension"?"extend ":"","enum ",b("name"),gt(d,b),Y(F.values)?[" {",R([te,T(te,gn(d,y,b,"values"))]),te,"}"]:""];case"EnumValueDefinition":return[zt(d,y,b),b("name"),gt(d,b)];case"InputValueDefinition":return[zt(d,y,b),b("name"),": ",b("type"),F.defaultValue?[" = ",b("defaultValue")]:"",gt(d,b)];case"SchemaExtension":return["extend schema",gt(d,b),...Y(F.operationTypes)?[" {",R([te,T(te,gn(d,y,b,"operationTypes"))]),te,"}"]:[]];case"SchemaDefinition":return[zt(d,y,b),"schema",gt(d,b)," {",Y(F.operationTypes)?R([te,T(te,gn(d,y,b,"operationTypes"))]):"",te,"}"];case"OperationTypeDefinition":return[F.operation,": ",b("type")];case"FragmentSpread":return["...",b("name"),op(d,y,b),gt(d,b)];case"InlineFragment":return["...",F.typeCondition?[" on ",b("typeCondition")]:"",gt(d,b)," ",b("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return S([zt(d,y,b),S([F.kind==="UnionTypeExtension"?"extend ":"","union ",b("name"),gt(d,b),Y(F.types)?[" =",k(""," "),R([k([A,"| "]),T([A,"| "],d.map(b,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[zt(d,y,b),F.kind==="ScalarTypeExtension"?"extend ":"","scalar ",b("name"),gt(d,b)];case"NonNullType":return[b("type"),"!"];case"ListType":return["[",b("type"),"]"];default:throw new X(F,"Graphql","kind")}}function pD(d){return d.kind!=="Comment"}function dD({node:d}){if(d.kind==="Comment")return"#"+d.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(d))}function hD(d){let{node:y}=d;return y?.comments?.some(b=>b.value.trim()==="prettier-ignore")}var mD={print:fD,massageAstNode:sp,hasPrettierIgnore:hD,insertPragma:iD,printComment:dD,canAttachComment:pD,getVisitorKeys:K4},gD=mD,DD=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],yD={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},ED={bracketSpacing:yD.bracketSpacing},bD=ED,up={};i(up,{graphql:()=>e7});function xD(d,y){return d?.__kind===y}var vD=xD;function _D(d){return typeof d=="object"&&d!==null}function ND(d,y){if(!d)throw new Error(y??"Unexpected invariant triggered.")}var TD=/\r\n|[\n\r]/g;function Dl(d,y){let b=0,F=1;for(let _ of d.body.matchAll(TD)){if(typeof _.index!="number"&&ND(!1),_.index>=y)break;b=_.index+_[0].length,F+=1}return{line:F,column:y+1-b}}function SD(d){return lp(d.source,Dl(d.source,d.start))}function lp(d,y){let b=d.locationOffset.column-1,F="".padStart(b)+d.body,_=y.line-1,$=d.locationOffset.line-1,re=y.line+$,we=y.line===1?b:0,it=y.column+we,ct=`${d.name}:${re}:${it} +`,rr=F.split(/\r\n|[\n\r]/g),Si=rr[_];if(Si.length>120){let ra=Math.floor(it/80),ks=it%80,ir=[];for(let sr=0;sr["|",sr]),["|","^".padStart(ks)],["|",ir[ra+1]]])}return ct+cp([[`${re-1} |`,rr[_-1]],[`${re} |`,Si],["|","^".padStart(it)],[`${re+1} |`,rr[_+1]]])}function cp(d){let y=d.filter(([F,_])=>_!==void 0),b=Math.max(...y.map(([F])=>F.length));return y.map(([F,_])=>F.padStart(b)+(_?" "+_:"")).join(` +`)}var fp=class Q4 extends Error{constructor(y,b={}){let{nodes:F,source:_,positions:$,path:re,originalError:we,cause:it,extensions:ct}=b,rr="cause"in b,Si=rr?it:we,ra=rr||we!=null?{cause:Si}:void 0;super(y,ra),this.name="GraphQLError",this.path=re??void 0;let ks=we??(it instanceof Error?it:void 0);this.originalError=ks,this.nodes=pp(Array.isArray(F)?F:F?[F]:void 0);let ir=pp(this.nodes?.map(Dn=>Dn.loc).filter(Dn=>Dn!=null));this.source=_??ir?.[0]?.source,this.positions=$??ir?.map(Dn=>Dn.start),this.locations=$&&_?$.map(Dn=>Dl(_,Dn)):ir?.map(Dn=>Dl(Dn.source,Dn.start));let sr=_D(ks?.extensions)?ks.extensions:void 0;this.extensions=ct??sr??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),we?.stack!=null?Object.defineProperty(this,"stack",{value:we.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,Q4):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let y=this.message;if(this.nodes)for(let b of this.nodes)b.loc&&(y+=` -`+Dv(y.loc));else if(this.source&&this.locations)for(let y of this.locations)D+=` +`+SD(b.loc));else if(this.source&&this.locations)for(let b of this.locations)y+=` -`+w1(this.source,y);return D}toJSON(){let D={message:this.message};return this.locations!=null&&(D.locations=this.locations),this.path!=null&&(D.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(D.extensions=this.extensions),D}};function I1(d){return d===void 0||d.length===0?void 0:d}var yv=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Ev=yv,bv=class{constructor(d,D,y){this.start=d.start,this.end=D.end,this.startToken=d,this.endToken=D,this.source=y}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},R1=class{constructor(d,D,y,T,_,B){this.kind=d,this.start=D,this.end=y,this.line=T,this.column=_,this.value=B,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ko={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},se={};i(se,{ARGUMENT:()=>Av,ARGUMENT_COORDINATE:()=>m4,BOOLEAN:()=>Pv,DIRECTIVE:()=>qv,DIRECTIVE_ARGUMENT_COORDINATE:()=>v4,DIRECTIVE_COORDINATE:()=>g4,DIRECTIVE_DEFINITION:()=>i4,DIRECTIVE_EXTENSION:()=>o4,DOCUMENT:()=>_v,ENUM:()=>Vv,ENUM_TYPE_DEFINITION:()=>t4,ENUM_TYPE_EXTENSION:()=>f4,ENUM_VALUE_DEFINITION:()=>n4,FIELD:()=>Fv,FIELD_DEFINITION:()=>Xv,FLOAT:()=>kv,FRAGMENT_ARGUMENT:()=>wv,FRAGMENT_DEFINITION:()=>Iv,FRAGMENT_SPREAD:()=>Cv,INLINE_FRAGMENT:()=>Lv,INPUT_OBJECT_TYPE_DEFINITION:()=>r4,INPUT_OBJECT_TYPE_EXTENSION:()=>p4,INPUT_VALUE_DEFINITION:()=>Kv,INT:()=>Ov,INTERFACE_TYPE_DEFINITION:()=>Zv,INTERFACE_TYPE_EXTENSION:()=>l4,LIST:()=>Uv,LIST_TYPE:()=>Hv,MEMBER_COORDINATE:()=>d4,NAME:()=>xv,NAMED_TYPE:()=>$v,NON_NULL_TYPE:()=>Wv,NULL:()=>Bv,OBJECT:()=>jv,OBJECT_FIELD:()=>Gv,OBJECT_TYPE_DEFINITION:()=>Jv,OBJECT_TYPE_EXTENSION:()=>u4,OPERATION_DEFINITION:()=>Tv,OPERATION_TYPE_DEFINITION:()=>zv,SCALAR_TYPE_DEFINITION:()=>Yv,SCALAR_TYPE_EXTENSION:()=>a4,SCHEMA_DEFINITION:()=>Qv,SCHEMA_EXTENSION:()=>s4,SELECTION_SET:()=>Sv,STRING:()=>Mv,TYPE_COORDINATE:()=>h4,UNION_TYPE_DEFINITION:()=>e4,UNION_TYPE_EXTENSION:()=>c4,VARIABLE:()=>Rv,VARIABLE_DEFINITION:()=>Nv});var xv="Name",_v="Document",Tv="OperationDefinition",Nv="VariableDefinition",Sv="SelectionSet",Fv="Field",Av="Argument",wv="FragmentArgument",Cv="FragmentSpread",Lv="InlineFragment",Iv="FragmentDefinition",Rv="Variable",Ov="IntValue",kv="FloatValue",Mv="StringValue",Pv="BooleanValue",Bv="NullValue",Vv="EnumValue",Uv="ListValue",jv="ObjectValue",Gv="ObjectField",qv="Directive",$v="NamedType",Hv="ListType",Wv="NonNullType",Qv="SchemaDefinition",zv="OperationTypeDefinition",Yv="ScalarTypeDefinition",Jv="ObjectTypeDefinition",Xv="FieldDefinition",Kv="InputValueDefinition",Zv="InterfaceTypeDefinition",e4="UnionTypeDefinition",t4="EnumTypeDefinition",n4="EnumValueDefinition",r4="InputObjectTypeDefinition",i4="DirectiveDefinition",s4="SchemaExtension",o4="DirectiveExtension",a4="ScalarTypeExtension",u4="ObjectTypeExtension",l4="InterfaceTypeExtension",c4="UnionTypeExtension",f4="EnumTypeExtension",p4="InputObjectTypeExtension",h4="TypeCoordinate",d4="MemberCoordinate",m4="ArgumentCoordinate",g4="DirectiveCoordinate",v4="DirectiveArgumentCoordinate";function O1(d,D){if(!d)throw new Error(D)}function D4(d){return d===9||d===32}function di(d){return d>=48&&d<=57}function k1(d){return d>=97&&d<=122||d>=65&&d<=90}function M1(d){return k1(d)||d===95}function y4(d){return k1(d)||di(d)||d===95}function E4(d){let D=Number.MAX_SAFE_INTEGER,y=null,T=-1;for(let _=0;_B===0?_:_.slice(D)).slice(y??0,T+1)}function b4(d){let D=0;for(;D",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},S4=class{constructor(d){let D=new R1(V.SOF,0,0,0,0);this.source=d,this.lastToken=D,this.token=D,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let d=this.token;if(d.kind!==V.EOF)do if(d.next)d=d.next;else{let D=A4(this,d.end);d.next=D,D.prev=d,d=D}while(d.kind===V.COMMENT);return d}};function F4(d){return d===V.BANG||d===V.DOLLAR||d===V.AMP||d===V.PAREN_L||d===V.PAREN_R||d===V.DOT||d===V.SPREAD||d===V.COLON||d===V.EQUALS||d===V.AT||d===V.BRACKET_L||d===V.BRACKET_R||d===V.BRACE_L||d===V.PIPE||d===V.BRACE_R}function mi(d){return d>=0&&d<=55295||d>=57344&&d<=1114111}function Mo(d,D){return B1(d.charCodeAt(D))&&V1(d.charCodeAt(D+1))}function B1(d){return d>=55296&&d<=56319}function V1(d){return d>=56320&&d<=57343}function Pr(d,D){let y=d.source.body.codePointAt(D);if(y===void 0)return V.EOF;if(y>=32&&y<=126){let T=String.fromCodePoint(y);return T==='"'?`'"'`:`"${T}"`}return"U+"+y.toString(16).toUpperCase().padStart(4,"0")}function ut(d,D,y,T,_){let B=d.line,ue=1+y-d.lineStart;return new R1(D,y,T,B,ue,_)}function A4(d,D){let y=d.source.body,T=y.length,_=D;for(;_=48&&d<=57?d-48:d>=65&&d<=70?d-55:d>=97&&d<=102?d-87:-1}function O4(d,D){let y=d.source.body;switch(y.charCodeAt(D+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw tt(d.source,D,`Invalid character escape sequence: "${y.slice(D,D+2)}".`)}function k4(d,D){let y=d.source.body,T=y.length,_=d.lineStart,B=D+3,ue=B,Be="",ht=[];for(;B0||O1(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||O1(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function P4(d){return dv(d,j1,G1)}function B4(d,D){return N4(P1)?P1.traceSync(()=>q1(d,D),{source:d}):q1(d,D)}function q1(d,D){let y=new V4(d,D),T=y.parseDocument();return Object.defineProperty(T,"tokenCount",{enumerable:!1,value:y.tokenCount}),T}var V4=class{constructor(d,D={}){let{lexer:y,...T}=D;if(y)this._lexer=y;else{let _=P4(d)?d:new G1(d);this._lexer=new S4(_)}this._options=T,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let d=this.expectToken(V.NAME);return this.node(d,{kind:se.NAME,value:d.value})}parseDocument(){return this.node(this._lexer.token,{kind:se.DOCUMENT,definitions:this.many(V.SOF,this.parseDefinition,V.EOF)})}parseDefinition(){if(this.peek(V.BRACE_L))return this.parseOperationDefinition();let d=this.peekDescription(),D=d?this._lexer.lookahead():this._lexer.token;if(d&&D.kind===V.BRACE_L)throw tt(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(D.kind===V.NAME){switch(D.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(D.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(d)throw tt(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(D.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(D)}parseOperationDefinition(){let d=this._lexer.token;if(this.peek(V.BRACE_L))return this.node(d,{kind:se.OPERATION_DEFINITION,operation:ko.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let D=this.parseDescription(),y=this.parseOperationType(),T;return this.peek(V.NAME)&&(T=this.parseName()),this.node(d,{kind:se.OPERATION_DEFINITION,operation:y,description:D,name:T,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let d=this.expectToken(V.NAME);switch(d.value){case"query":return ko.QUERY;case"mutation":return ko.MUTATION;case"subscription":return ko.SUBSCRIPTION}throw this.unexpected(d)}parseVariableDefinitions(){return this.optionalMany(V.PAREN_L,this.parseVariableDefinition,V.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:se.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(V.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(V.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let d=this._lexer.token;return this.expectToken(V.DOLLAR),this.node(d,{kind:se.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:se.SELECTION_SET,selections:this.many(V.BRACE_L,this.parseSelection,V.BRACE_R)})}parseSelection(){return this.peek(V.SPREAD)?this.parseFragment():this.parseField()}parseField(){let d=this._lexer.token,D=this.parseName(),y,T;return this.expectOptionalToken(V.COLON)?(y=D,T=this.parseName()):T=D,this.node(d,{kind:se.FIELD,alias:y,name:T,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(V.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(d){let D=d?this.parseConstArgument:this.parseArgument;return this.optionalMany(V.PAREN_L,D,V.PAREN_R)}parseFragmentArguments(){let d=this.parseFragmentArgument;return this.optionalMany(V.PAREN_L,d,V.PAREN_R)}parseArgument(d=!1){let D=this._lexer.token,y=this.parseName();return this.expectToken(V.COLON),this.node(D,{kind:se.ARGUMENT,name:y,value:this.parseValueLiteral(d)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let d=this._lexer.token,D=this.parseName();return this.expectToken(V.COLON),this.node(d,{kind:se.FRAGMENT_ARGUMENT,name:D,value:this.parseValueLiteral(!1)})}parseFragment(){let d=this._lexer.token;this.expectToken(V.SPREAD);let D=this.expectOptionalKeyword("on");if(!D&&this.peek(V.NAME)){let y=this.parseFragmentName();return this.peek(V.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(d,{kind:se.FRAGMENT_SPREAD,name:y,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(d,{kind:se.FRAGMENT_SPREAD,name:y,directives:this.parseDirectives(!1)})}return this.node(d,{kind:se.INLINE_FRAGMENT,typeCondition:D?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let d=this._lexer.token,D=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(d,{kind:se.FRAGMENT_DEFINITION,description:D,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(d,{kind:se.FRAGMENT_DEFINITION,description:D,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(d){let D=this._lexer.token;switch(D.kind){case V.BRACKET_L:return this.parseList(d);case V.BRACE_L:return this.parseObject(d);case V.INT:return this.advanceLexer(),this.node(D,{kind:se.INT,value:D.value});case V.FLOAT:return this.advanceLexer(),this.node(D,{kind:se.FLOAT,value:D.value});case V.STRING:case V.BLOCK_STRING:return this.parseStringLiteral();case V.NAME:switch(this.advanceLexer(),D.value){case"true":return this.node(D,{kind:se.BOOLEAN,value:!0});case"false":return this.node(D,{kind:se.BOOLEAN,value:!1});case"null":return this.node(D,{kind:se.NULL});default:return this.node(D,{kind:se.ENUM,value:D.value})}case V.DOLLAR:if(d)if(this.expectToken(V.DOLLAR),this._lexer.token.kind===V.NAME){let y=this._lexer.token.value;throw tt(this._lexer.source,D.start,`Unexpected variable "$${y}" in constant value.`)}else throw this.unexpected(D);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let d=this._lexer.token;return this.advanceLexer(),this.node(d,{kind:se.STRING,value:d.value,block:d.kind===V.BLOCK_STRING})}parseList(d){let D=()=>this.parseValueLiteral(d);return this.node(this._lexer.token,{kind:se.LIST,values:this.any(V.BRACKET_L,D,V.BRACKET_R)})}parseObject(d){let D=()=>this.parseObjectField(d);return this.node(this._lexer.token,{kind:se.OBJECT,fields:this.any(V.BRACE_L,D,V.BRACE_R)})}parseObjectField(d){let D=this._lexer.token,y=this.parseName();return this.expectToken(V.COLON),this.node(D,{kind:se.OBJECT_FIELD,name:y,value:this.parseValueLiteral(d)})}parseDirectives(d){let D=[];for(;this.peek(V.AT);)D.push(this.parseDirective(d));if(D.length)return D}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(d){let D=this._lexer.token;return this.expectToken(V.AT),this.node(D,{kind:se.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(d)})}parseTypeReference(){let d=this._lexer.token,D;if(this.expectOptionalToken(V.BRACKET_L)){let y=this.parseTypeReference();this.expectToken(V.BRACKET_R),D=this.node(d,{kind:se.LIST_TYPE,type:y})}else D=this.parseNamedType();return this.expectOptionalToken(V.BANG)?this.node(d,{kind:se.NON_NULL_TYPE,type:D}):D}parseNamedType(){return this.node(this._lexer.token,{kind:se.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(V.STRING)||this.peek(V.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("schema");let y=this.parseConstDirectives(),T=this.many(V.BRACE_L,this.parseOperationTypeDefinition,V.BRACE_R);return this.node(d,{kind:se.SCHEMA_DEFINITION,description:D,directives:y,operationTypes:T})}parseOperationTypeDefinition(){let d=this._lexer.token,D=this.parseOperationType();this.expectToken(V.COLON);let y=this.parseNamedType();return this.node(d,{kind:se.OPERATION_TYPE_DEFINITION,operation:D,type:y})}parseScalarTypeDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("scalar");let y=this.parseName(),T=this.parseConstDirectives();return this.node(d,{kind:se.SCALAR_TYPE_DEFINITION,description:D,name:y,directives:T})}parseObjectTypeDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("type");let y=this.parseName(),T=this.parseImplementsInterfaces(),_=this.parseConstDirectives(),B=this.parseFieldsDefinition();return this.node(d,{kind:se.OBJECT_TYPE_DEFINITION,description:D,name:y,interfaces:T,directives:_,fields:B})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(V.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(V.BRACE_L,this.parseFieldDefinition,V.BRACE_R)}parseFieldDefinition(){let d=this._lexer.token,D=this.parseDescription(),y=this.parseName(),T=this.parseArgumentDefs();this.expectToken(V.COLON);let _=this.parseTypeReference(),B=this.parseConstDirectives();return this.node(d,{kind:se.FIELD_DEFINITION,description:D,name:y,arguments:T,type:_,directives:B})}parseArgumentDefs(){return this.optionalMany(V.PAREN_L,this.parseInputValueDef,V.PAREN_R)}parseInputValueDef(){let d=this._lexer.token,D=this.parseDescription(),y=this.parseName();this.expectToken(V.COLON);let T=this.parseTypeReference(),_;this.expectOptionalToken(V.EQUALS)&&(_=this.parseConstValueLiteral());let B=this.parseConstDirectives();return this.node(d,{kind:se.INPUT_VALUE_DEFINITION,description:D,name:y,type:T,defaultValue:_,directives:B})}parseInterfaceTypeDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("interface");let y=this.parseName(),T=this.parseImplementsInterfaces(),_=this.parseConstDirectives(),B=this.parseFieldsDefinition();return this.node(d,{kind:se.INTERFACE_TYPE_DEFINITION,description:D,name:y,interfaces:T,directives:_,fields:B})}parseUnionTypeDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("union");let y=this.parseName(),T=this.parseConstDirectives(),_=this.parseUnionMemberTypes();return this.node(d,{kind:se.UNION_TYPE_DEFINITION,description:D,name:y,directives:T,types:_})}parseUnionMemberTypes(){return this.expectOptionalToken(V.EQUALS)?this.delimitedMany(V.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("enum");let y=this.parseName(),T=this.parseConstDirectives(),_=this.parseEnumValuesDefinition();return this.node(d,{kind:se.ENUM_TYPE_DEFINITION,description:D,name:y,directives:T,values:_})}parseEnumValuesDefinition(){return this.optionalMany(V.BRACE_L,this.parseEnumValueDefinition,V.BRACE_R)}parseEnumValueDefinition(){let d=this._lexer.token,D=this.parseDescription(),y=this.parseEnumValueName(),T=this.parseConstDirectives();return this.node(d,{kind:se.ENUM_VALUE_DEFINITION,description:D,name:y,directives:T})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw tt(this._lexer.source,this._lexer.token.start,`${Bo(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("input");let y=this.parseName(),T=this.parseConstDirectives(),_=this.parseInputFieldsDefinition();return this.node(d,{kind:se.INPUT_OBJECT_TYPE_DEFINITION,description:D,name:y,directives:T,fields:_})}parseInputFieldsDefinition(){return this.optionalMany(V.BRACE_L,this.parseInputValueDef,V.BRACE_R)}parseTypeSystemExtension(){let d=this._lexer.lookahead();if(d.kind===V.NAME)switch(d.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(d)}parseSchemaExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let D=this.parseConstDirectives(),y=this.optionalMany(V.BRACE_L,this.parseOperationTypeDefinition,V.BRACE_R);if(D===void 0&&y===void 0)throw this.unexpected();return this.node(d,{kind:se.SCHEMA_EXTENSION,directives:D,operationTypes:y})}parseScalarTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let D=this.parseName(),y=this.parseConstDirectives();if(y===void 0)throw this.unexpected();return this.node(d,{kind:se.SCALAR_TYPE_EXTENSION,name:D,directives:y})}parseObjectTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let D=this.parseName(),y=this.parseImplementsInterfaces(),T=this.parseConstDirectives(),_=this.parseFieldsDefinition();if(y===void 0&&T===void 0&&_===void 0)throw this.unexpected();return this.node(d,{kind:se.OBJECT_TYPE_EXTENSION,name:D,interfaces:y,directives:T,fields:_})}parseInterfaceTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let D=this.parseName(),y=this.parseImplementsInterfaces(),T=this.parseConstDirectives(),_=this.parseFieldsDefinition();if(y===void 0&&T===void 0&&_===void 0)throw this.unexpected();return this.node(d,{kind:se.INTERFACE_TYPE_EXTENSION,name:D,interfaces:y,directives:T,fields:_})}parseUnionTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let D=this.parseName(),y=this.parseConstDirectives(),T=this.parseUnionMemberTypes();if(y===void 0&&T===void 0)throw this.unexpected();return this.node(d,{kind:se.UNION_TYPE_EXTENSION,name:D,directives:y,types:T})}parseEnumTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let D=this.parseName(),y=this.parseConstDirectives(),T=this.parseEnumValuesDefinition();if(y===void 0&&T===void 0)throw this.unexpected();return this.node(d,{kind:se.ENUM_TYPE_EXTENSION,name:D,directives:y,values:T})}parseInputObjectTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let D=this.parseName(),y=this.parseConstDirectives(),T=this.parseInputFieldsDefinition();if(y===void 0&&T===void 0)throw this.unexpected();return this.node(d,{kind:se.INPUT_OBJECT_TYPE_EXTENSION,name:D,directives:y,fields:T})}parseDirectiveExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(V.AT);let D=this.parseName(),y=this.parseConstDirectives();if(y===void 0)throw this.unexpected();return this.node(d,{kind:se.DIRECTIVE_EXTENSION,name:D,directives:y})}parseDirectiveDefinition(){let d=this._lexer.token,D=this.parseDescription();this.expectKeyword("directive"),this.expectToken(V.AT);let y=this.parseName(),T=this.parseArgumentDefs(),_=this.parseConstDirectives(),B=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let ue=this.parseDirectiveLocations();return this.node(d,{kind:se.DIRECTIVE_DEFINITION,description:D,name:y,arguments:T,directives:_,repeatable:B,locations:ue})}parseDirectiveLocations(){return this.delimitedMany(V.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let d=this._lexer.token,D=this.parseName();if(Ev(x4,D.value))return D;throw this.unexpected(d)}parseSchemaCoordinate(){let d=this._lexer.token,D=this.expectOptionalToken(V.AT),y=this.parseName(),T;!D&&this.expectOptionalToken(V.DOT)&&(T=this.parseName());let _;return(D||T)&&this.expectOptionalToken(V.PAREN_L)&&(_=this.parseName(),this.expectToken(V.COLON),this.expectToken(V.PAREN_R)),D?_?this.node(d,{kind:se.DIRECTIVE_ARGUMENT_COORDINATE,name:y,argumentName:_}):this.node(d,{kind:se.DIRECTIVE_COORDINATE,name:y}):T?_?this.node(d,{kind:se.ARGUMENT_COORDINATE,name:y,fieldName:T,argumentName:_}):this.node(d,{kind:se.MEMBER_COORDINATE,name:y,memberName:T}):this.node(d,{kind:se.TYPE_COORDINATE,name:y})}node(d,D){return this._options.noLocation!==!0&&(D.loc=new bv(d,this._lexer.lastToken,this._lexer.source)),D}peek(d){return this._lexer.token.kind===d}expectToken(d){let D=this._lexer.token;if(D.kind===d)return this.advanceLexer(),D;throw tt(this._lexer.source,D.start,`Expected ${$1(d)}, found ${Bo(D)}.`)}expectOptionalToken(d){return this._lexer.token.kind===d?(this.advanceLexer(),!0):!1}expectKeyword(d){let D=this._lexer.token;if(D.kind===V.NAME&&D.value===d)this.advanceLexer();else throw tt(this._lexer.source,D.start,`Expected "${d}", found ${Bo(D)}.`)}expectOptionalKeyword(d){let D=this._lexer.token;return D.kind===V.NAME&&D.value===d?(this.advanceLexer(),!0):!1}unexpected(d){let D=d??this._lexer.token;return tt(this._lexer.source,D.start,`Unexpected ${Bo(D)}.`)}any(d,D,y){this.expectToken(d);let T=[];for(;!this.expectOptionalToken(y);)T.push(D.call(this));return T}optionalMany(d,D,y){if(this.expectOptionalToken(d)){let T=[];do T.push(D.call(this));while(!this.expectOptionalToken(y));return T}}many(d,D,y){this.expectToken(d);let T=[];do T.push(D.call(this));while(!this.expectOptionalToken(y));return T}delimitedMany(d,D){this.expectOptionalToken(d);let y=[];do y.push(D.call(this));while(this.expectOptionalToken(d));return y}advanceLexer(){let{maxTokens:d}=this._options,D=this._lexer.advance();if(D.kind!==V.EOF&&(++this._tokenCounter,d!==void 0&&this._tokenCounter>d))throw tt(this._lexer.source,D.start,`Document contains more than ${d} tokens. Parsing aborted.`)}};function Bo(d){let D=d.value;return $1(d.kind)+(D!=null?` "${D}"`:"")}function $1(d){return F4(d)?`"${d}"`:d}function U4(d,D){let y=new SyntaxError(d+" ("+D.loc.start.line+":"+D.loc.start.column+")");return Object.assign(y,D)}var j4=U4;function G4(d){let D=[],{startToken:y,endToken:T}=d.loc;for(let _=y;_!==T;_=_.next)_.kind==="Comment"&&D.push({..._,loc:{start:_.start,end:_.end}});return D}var q4={experimentalFragmentArguments:!0};function $4(d){if(!(d instanceof L1))return d;let{message:D,locations:[y]}=d;return j4(D,{loc:{start:y},cause:d})}function H4(d){let D;try{D=B4(d,q4)}catch(y){throw $4(y)}return D.comments=G4(D),D}var W4={parse:H4,astFormat:"graphql",hasPragma:Oo,hasIgnorePragma:Xu,locStart:ar,locEnd:_s},Q4={graphql:uv};return o(a)})});var tl=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ss.isErrorNoTelemetry(t)?new Ss(t.message+` +`+lp(this.source,b);return y}toJSON(){let y={message:this.message};return this.locations!=null&&(y.locations=this.locations),this.path!=null&&(y.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(y.extensions=this.extensions),y}};function pp(d){return d===void 0||d.length===0?void 0:d}var FD=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),AD=FD,CD=class{constructor(d,y,b){this.start=d.start,this.end=y.end,this.startToken=d,this.endToken=y,this.source=b}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},dp=class{constructor(d,y,b,F,_,$){this.kind=d,this.start=y,this.end=b,this.line=F,this.column=_,this.value=$,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Zo={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},ne={};i(ne,{ARGUMENT:()=>MD,ARGUMENT_COORDINATE:()=>_5,BOOLEAN:()=>HD,DIRECTIVE:()=>XD,DIRECTIVE_ARGUMENT_COORDINATE:()=>T5,DIRECTIVE_COORDINATE:()=>N5,DIRECTIVE_DEFINITION:()=>p5,DIRECTIVE_EXTENSION:()=>h5,DOCUMENT:()=>LD,ENUM:()=>QD,ENUM_TYPE_DEFINITION:()=>l5,ENUM_TYPE_EXTENSION:()=>E5,ENUM_VALUE_DEFINITION:()=>c5,FIELD:()=>kD,FIELD_DEFINITION:()=>s5,FLOAT:()=>GD,FRAGMENT_ARGUMENT:()=>PD,FRAGMENT_DEFINITION:()=>UD,FRAGMENT_SPREAD:()=>BD,INLINE_FRAGMENT:()=>VD,INPUT_OBJECT_TYPE_DEFINITION:()=>f5,INPUT_OBJECT_TYPE_EXTENSION:()=>b5,INPUT_VALUE_DEFINITION:()=>o5,INT:()=>jD,INTERFACE_TYPE_DEFINITION:()=>a5,INTERFACE_TYPE_EXTENSION:()=>D5,LIST:()=>zD,LIST_TYPE:()=>ZD,MEMBER_COORDINATE:()=>v5,NAME:()=>wD,NAMED_TYPE:()=>KD,NON_NULL_TYPE:()=>e5,NULL:()=>WD,OBJECT:()=>YD,OBJECT_FIELD:()=>JD,OBJECT_TYPE_DEFINITION:()=>i5,OBJECT_TYPE_EXTENSION:()=>g5,OPERATION_DEFINITION:()=>ID,OPERATION_TYPE_DEFINITION:()=>n5,SCALAR_TYPE_DEFINITION:()=>r5,SCALAR_TYPE_EXTENSION:()=>m5,SCHEMA_DEFINITION:()=>t5,SCHEMA_EXTENSION:()=>d5,SELECTION_SET:()=>OD,STRING:()=>qD,TYPE_COORDINATE:()=>x5,UNION_TYPE_DEFINITION:()=>u5,UNION_TYPE_EXTENSION:()=>y5,VARIABLE:()=>$D,VARIABLE_DEFINITION:()=>RD});var wD="Name",LD="Document",ID="OperationDefinition",RD="VariableDefinition",OD="SelectionSet",kD="Field",MD="Argument",PD="FragmentArgument",BD="FragmentSpread",VD="InlineFragment",UD="FragmentDefinition",$D="Variable",jD="IntValue",GD="FloatValue",qD="StringValue",HD="BooleanValue",WD="NullValue",QD="EnumValue",zD="ListValue",YD="ObjectValue",JD="ObjectField",XD="Directive",KD="NamedType",ZD="ListType",e5="NonNullType",t5="SchemaDefinition",n5="OperationTypeDefinition",r5="ScalarTypeDefinition",i5="ObjectTypeDefinition",s5="FieldDefinition",o5="InputValueDefinition",a5="InterfaceTypeDefinition",u5="UnionTypeDefinition",l5="EnumTypeDefinition",c5="EnumValueDefinition",f5="InputObjectTypeDefinition",p5="DirectiveDefinition",d5="SchemaExtension",h5="DirectiveExtension",m5="ScalarTypeExtension",g5="ObjectTypeExtension",D5="InterfaceTypeExtension",y5="UnionTypeExtension",E5="EnumTypeExtension",b5="InputObjectTypeExtension",x5="TypeCoordinate",v5="MemberCoordinate",_5="ArgumentCoordinate",N5="DirectiveCoordinate",T5="DirectiveArgumentCoordinate";function hp(d,y){if(!d)throw new Error(y)}function S5(d){return d===9||d===32}function Ni(d){return d>=48&&d<=57}function mp(d){return d>=97&&d<=122||d>=65&&d<=90}function gp(d){return mp(d)||d===95}function F5(d){return mp(d)||Ni(d)||d===95}function A5(d){let y=Number.MAX_SAFE_INTEGER,b=null,F=-1;for(let _=0;_$===0?_:_.slice(y)).slice(b??0,F+1)}function C5(d){let y=0;for(;y",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},O5=class{constructor(d){let y=new dp(G.SOF,0,0,0,0);this.source=d,this.lastToken=y,this.token=y,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let d=this.token;if(d.kind!==G.EOF)do if(d.next)d=d.next;else{let y=M5(this,d.end);d.next=y,y.prev=d,d=y}while(d.kind===G.COMMENT);return d}};function k5(d){return d===G.BANG||d===G.DOLLAR||d===G.AMP||d===G.PAREN_L||d===G.PAREN_R||d===G.DOT||d===G.SPREAD||d===G.COLON||d===G.EQUALS||d===G.AT||d===G.BRACKET_L||d===G.BRACKET_R||d===G.BRACE_L||d===G.PIPE||d===G.BRACE_R}function Ti(d){return d>=0&&d<=55295||d>=57344&&d<=1114111}function ea(d,y){return yp(d.charCodeAt(y))&&Ep(d.charCodeAt(y+1))}function yp(d){return d>=55296&&d<=56319}function Ep(d){return d>=56320&&d<=57343}function Or(d,y){let b=d.source.body.codePointAt(y);if(b===void 0)return G.EOF;if(b>=32&&b<=126){let F=String.fromCodePoint(b);return F==='"'?`'"'`:`"${F}"`}return"U+"+b.toString(16).toUpperCase().padStart(4,"0")}function Ze(d,y,b,F,_){let $=d.line,re=1+b-d.lineStart;return new dp(y,b,F,$,re,_)}function M5(d,y){let b=d.source.body,F=b.length,_=y;for(;_=48&&d<=57?d-48:d>=65&&d<=70?d-55:d>=97&&d<=102?d-87:-1}function j5(d,y){let b=d.source.body;switch(b.charCodeAt(y+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Qe(d.source,y,`Invalid character escape sequence: "${b.slice(y,y+2)}".`)}function G5(d,y){let b=d.source.body,F=b.length,_=d.lineStart,$=y+3,re=$,we="",it=[];for(;$0||hp(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||hp(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function H5(d){return vD(d,xp,vp)}function W5(d,y){return R5(Dp)?Dp.traceSync(()=>_p(d,y),{source:d}):_p(d,y)}function _p(d,y){let b=new Q5(d,y),F=b.parseDocument();return Object.defineProperty(F,"tokenCount",{enumerable:!1,value:b.tokenCount}),F}var Q5=class{constructor(d,y={}){let{lexer:b,...F}=y;if(b)this._lexer=b;else{let _=H5(d)?d:new vp(d);this._lexer=new O5(_)}this._options=F,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let d=this.expectToken(G.NAME);return this.node(d,{kind:ne.NAME,value:d.value})}parseDocument(){return this.node(this._lexer.token,{kind:ne.DOCUMENT,definitions:this.many(G.SOF,this.parseDefinition,G.EOF)})}parseDefinition(){if(this.peek(G.BRACE_L))return this.parseOperationDefinition();let d=this.peekDescription(),y=d?this._lexer.lookahead():this._lexer.token;if(d&&y.kind===G.BRACE_L)throw Qe(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(y.kind===G.NAME){switch(y.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(y.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(d)throw Qe(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(y.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(y)}parseOperationDefinition(){let d=this._lexer.token;if(this.peek(G.BRACE_L))return this.node(d,{kind:ne.OPERATION_DEFINITION,operation:Zo.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let y=this.parseDescription(),b=this.parseOperationType(),F;return this.peek(G.NAME)&&(F=this.parseName()),this.node(d,{kind:ne.OPERATION_DEFINITION,operation:b,description:y,name:F,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let d=this.expectToken(G.NAME);switch(d.value){case"query":return Zo.QUERY;case"mutation":return Zo.MUTATION;case"subscription":return Zo.SUBSCRIPTION}throw this.unexpected(d)}parseVariableDefinitions(){return this.optionalMany(G.PAREN_L,this.parseVariableDefinition,G.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ne.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(G.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(G.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let d=this._lexer.token;return this.expectToken(G.DOLLAR),this.node(d,{kind:ne.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ne.SELECTION_SET,selections:this.many(G.BRACE_L,this.parseSelection,G.BRACE_R)})}parseSelection(){return this.peek(G.SPREAD)?this.parseFragment():this.parseField()}parseField(){let d=this._lexer.token,y=this.parseName(),b,F;return this.expectOptionalToken(G.COLON)?(b=y,F=this.parseName()):F=y,this.node(d,{kind:ne.FIELD,alias:b,name:F,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(G.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(d){let y=d?this.parseConstArgument:this.parseArgument;return this.optionalMany(G.PAREN_L,y,G.PAREN_R)}parseFragmentArguments(){let d=this.parseFragmentArgument;return this.optionalMany(G.PAREN_L,d,G.PAREN_R)}parseArgument(d=!1){let y=this._lexer.token,b=this.parseName();return this.expectToken(G.COLON),this.node(y,{kind:ne.ARGUMENT,name:b,value:this.parseValueLiteral(d)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let d=this._lexer.token,y=this.parseName();return this.expectToken(G.COLON),this.node(d,{kind:ne.FRAGMENT_ARGUMENT,name:y,value:this.parseValueLiteral(!1)})}parseFragment(){let d=this._lexer.token;this.expectToken(G.SPREAD);let y=this.expectOptionalKeyword("on");if(!y&&this.peek(G.NAME)){let b=this.parseFragmentName();return this.peek(G.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(d,{kind:ne.FRAGMENT_SPREAD,name:b,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(d,{kind:ne.FRAGMENT_SPREAD,name:b,directives:this.parseDirectives(!1)})}return this.node(d,{kind:ne.INLINE_FRAGMENT,typeCondition:y?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let d=this._lexer.token,y=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(d,{kind:ne.FRAGMENT_DEFINITION,description:y,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(d,{kind:ne.FRAGMENT_DEFINITION,description:y,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(d){let y=this._lexer.token;switch(y.kind){case G.BRACKET_L:return this.parseList(d);case G.BRACE_L:return this.parseObject(d);case G.INT:return this.advanceLexer(),this.node(y,{kind:ne.INT,value:y.value});case G.FLOAT:return this.advanceLexer(),this.node(y,{kind:ne.FLOAT,value:y.value});case G.STRING:case G.BLOCK_STRING:return this.parseStringLiteral();case G.NAME:switch(this.advanceLexer(),y.value){case"true":return this.node(y,{kind:ne.BOOLEAN,value:!0});case"false":return this.node(y,{kind:ne.BOOLEAN,value:!1});case"null":return this.node(y,{kind:ne.NULL});default:return this.node(y,{kind:ne.ENUM,value:y.value})}case G.DOLLAR:if(d)if(this.expectToken(G.DOLLAR),this._lexer.token.kind===G.NAME){let b=this._lexer.token.value;throw Qe(this._lexer.source,y.start,`Unexpected variable "$${b}" in constant value.`)}else throw this.unexpected(y);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let d=this._lexer.token;return this.advanceLexer(),this.node(d,{kind:ne.STRING,value:d.value,block:d.kind===G.BLOCK_STRING})}parseList(d){let y=()=>this.parseValueLiteral(d);return this.node(this._lexer.token,{kind:ne.LIST,values:this.any(G.BRACKET_L,y,G.BRACKET_R)})}parseObject(d){let y=()=>this.parseObjectField(d);return this.node(this._lexer.token,{kind:ne.OBJECT,fields:this.any(G.BRACE_L,y,G.BRACE_R)})}parseObjectField(d){let y=this._lexer.token,b=this.parseName();return this.expectToken(G.COLON),this.node(y,{kind:ne.OBJECT_FIELD,name:b,value:this.parseValueLiteral(d)})}parseDirectives(d){let y=[];for(;this.peek(G.AT);)y.push(this.parseDirective(d));if(y.length)return y}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(d){let y=this._lexer.token;return this.expectToken(G.AT),this.node(y,{kind:ne.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(d)})}parseTypeReference(){let d=this._lexer.token,y;if(this.expectOptionalToken(G.BRACKET_L)){let b=this.parseTypeReference();this.expectToken(G.BRACKET_R),y=this.node(d,{kind:ne.LIST_TYPE,type:b})}else y=this.parseNamedType();return this.expectOptionalToken(G.BANG)?this.node(d,{kind:ne.NON_NULL_TYPE,type:y}):y}parseNamedType(){return this.node(this._lexer.token,{kind:ne.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(G.STRING)||this.peek(G.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("schema");let b=this.parseConstDirectives(),F=this.many(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);return this.node(d,{kind:ne.SCHEMA_DEFINITION,description:y,directives:b,operationTypes:F})}parseOperationTypeDefinition(){let d=this._lexer.token,y=this.parseOperationType();this.expectToken(G.COLON);let b=this.parseNamedType();return this.node(d,{kind:ne.OPERATION_TYPE_DEFINITION,operation:y,type:b})}parseScalarTypeDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("scalar");let b=this.parseName(),F=this.parseConstDirectives();return this.node(d,{kind:ne.SCALAR_TYPE_DEFINITION,description:y,name:b,directives:F})}parseObjectTypeDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("type");let b=this.parseName(),F=this.parseImplementsInterfaces(),_=this.parseConstDirectives(),$=this.parseFieldsDefinition();return this.node(d,{kind:ne.OBJECT_TYPE_DEFINITION,description:y,name:b,interfaces:F,directives:_,fields:$})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(G.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseFieldDefinition,G.BRACE_R)}parseFieldDefinition(){let d=this._lexer.token,y=this.parseDescription(),b=this.parseName(),F=this.parseArgumentDefs();this.expectToken(G.COLON);let _=this.parseTypeReference(),$=this.parseConstDirectives();return this.node(d,{kind:ne.FIELD_DEFINITION,description:y,name:b,arguments:F,type:_,directives:$})}parseArgumentDefs(){return this.optionalMany(G.PAREN_L,this.parseInputValueDef,G.PAREN_R)}parseInputValueDef(){let d=this._lexer.token,y=this.parseDescription(),b=this.parseName();this.expectToken(G.COLON);let F=this.parseTypeReference(),_;this.expectOptionalToken(G.EQUALS)&&(_=this.parseConstValueLiteral());let $=this.parseConstDirectives();return this.node(d,{kind:ne.INPUT_VALUE_DEFINITION,description:y,name:b,type:F,defaultValue:_,directives:$})}parseInterfaceTypeDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("interface");let b=this.parseName(),F=this.parseImplementsInterfaces(),_=this.parseConstDirectives(),$=this.parseFieldsDefinition();return this.node(d,{kind:ne.INTERFACE_TYPE_DEFINITION,description:y,name:b,interfaces:F,directives:_,fields:$})}parseUnionTypeDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("union");let b=this.parseName(),F=this.parseConstDirectives(),_=this.parseUnionMemberTypes();return this.node(d,{kind:ne.UNION_TYPE_DEFINITION,description:y,name:b,directives:F,types:_})}parseUnionMemberTypes(){return this.expectOptionalToken(G.EQUALS)?this.delimitedMany(G.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("enum");let b=this.parseName(),F=this.parseConstDirectives(),_=this.parseEnumValuesDefinition();return this.node(d,{kind:ne.ENUM_TYPE_DEFINITION,description:y,name:b,directives:F,values:_})}parseEnumValuesDefinition(){return this.optionalMany(G.BRACE_L,this.parseEnumValueDefinition,G.BRACE_R)}parseEnumValueDefinition(){let d=this._lexer.token,y=this.parseDescription(),b=this.parseEnumValueName(),F=this.parseConstDirectives();return this.node(d,{kind:ne.ENUM_VALUE_DEFINITION,description:y,name:b,directives:F})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Qe(this._lexer.source,this._lexer.token.start,`${na(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("input");let b=this.parseName(),F=this.parseConstDirectives(),_=this.parseInputFieldsDefinition();return this.node(d,{kind:ne.INPUT_OBJECT_TYPE_DEFINITION,description:y,name:b,directives:F,fields:_})}parseInputFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseInputValueDef,G.BRACE_R)}parseTypeSystemExtension(){let d=this._lexer.lookahead();if(d.kind===G.NAME)switch(d.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(d)}parseSchemaExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let y=this.parseConstDirectives(),b=this.optionalMany(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);if(y===void 0&&b===void 0)throw this.unexpected();return this.node(d,{kind:ne.SCHEMA_EXTENSION,directives:y,operationTypes:b})}parseScalarTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let y=this.parseName(),b=this.parseConstDirectives();if(b===void 0)throw this.unexpected();return this.node(d,{kind:ne.SCALAR_TYPE_EXTENSION,name:y,directives:b})}parseObjectTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let y=this.parseName(),b=this.parseImplementsInterfaces(),F=this.parseConstDirectives(),_=this.parseFieldsDefinition();if(b===void 0&&F===void 0&&_===void 0)throw this.unexpected();return this.node(d,{kind:ne.OBJECT_TYPE_EXTENSION,name:y,interfaces:b,directives:F,fields:_})}parseInterfaceTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let y=this.parseName(),b=this.parseImplementsInterfaces(),F=this.parseConstDirectives(),_=this.parseFieldsDefinition();if(b===void 0&&F===void 0&&_===void 0)throw this.unexpected();return this.node(d,{kind:ne.INTERFACE_TYPE_EXTENSION,name:y,interfaces:b,directives:F,fields:_})}parseUnionTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let y=this.parseName(),b=this.parseConstDirectives(),F=this.parseUnionMemberTypes();if(b===void 0&&F===void 0)throw this.unexpected();return this.node(d,{kind:ne.UNION_TYPE_EXTENSION,name:y,directives:b,types:F})}parseEnumTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let y=this.parseName(),b=this.parseConstDirectives(),F=this.parseEnumValuesDefinition();if(b===void 0&&F===void 0)throw this.unexpected();return this.node(d,{kind:ne.ENUM_TYPE_EXTENSION,name:y,directives:b,values:F})}parseInputObjectTypeExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let y=this.parseName(),b=this.parseConstDirectives(),F=this.parseInputFieldsDefinition();if(b===void 0&&F===void 0)throw this.unexpected();return this.node(d,{kind:ne.INPUT_OBJECT_TYPE_EXTENSION,name:y,directives:b,fields:F})}parseDirectiveExtension(){let d=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(G.AT);let y=this.parseName(),b=this.parseConstDirectives();if(b===void 0)throw this.unexpected();return this.node(d,{kind:ne.DIRECTIVE_EXTENSION,name:y,directives:b})}parseDirectiveDefinition(){let d=this._lexer.token,y=this.parseDescription();this.expectKeyword("directive"),this.expectToken(G.AT);let b=this.parseName(),F=this.parseArgumentDefs(),_=this.parseConstDirectives(),$=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let re=this.parseDirectiveLocations();return this.node(d,{kind:ne.DIRECTIVE_DEFINITION,description:y,name:b,arguments:F,directives:_,repeatable:$,locations:re})}parseDirectiveLocations(){return this.delimitedMany(G.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let d=this._lexer.token,y=this.parseName();if(AD(w5,y.value))return y;throw this.unexpected(d)}parseSchemaCoordinate(){let d=this._lexer.token,y=this.expectOptionalToken(G.AT),b=this.parseName(),F;!y&&this.expectOptionalToken(G.DOT)&&(F=this.parseName());let _;return(y||F)&&this.expectOptionalToken(G.PAREN_L)&&(_=this.parseName(),this.expectToken(G.COLON),this.expectToken(G.PAREN_R)),y?_?this.node(d,{kind:ne.DIRECTIVE_ARGUMENT_COORDINATE,name:b,argumentName:_}):this.node(d,{kind:ne.DIRECTIVE_COORDINATE,name:b}):F?_?this.node(d,{kind:ne.ARGUMENT_COORDINATE,name:b,fieldName:F,argumentName:_}):this.node(d,{kind:ne.MEMBER_COORDINATE,name:b,memberName:F}):this.node(d,{kind:ne.TYPE_COORDINATE,name:b})}node(d,y){return this._options.noLocation!==!0&&(y.loc=new CD(d,this._lexer.lastToken,this._lexer.source)),y}peek(d){return this._lexer.token.kind===d}expectToken(d){let y=this._lexer.token;if(y.kind===d)return this.advanceLexer(),y;throw Qe(this._lexer.source,y.start,`Expected ${Np(d)}, found ${na(y)}.`)}expectOptionalToken(d){return this._lexer.token.kind===d?(this.advanceLexer(),!0):!1}expectKeyword(d){let y=this._lexer.token;if(y.kind===G.NAME&&y.value===d)this.advanceLexer();else throw Qe(this._lexer.source,y.start,`Expected "${d}", found ${na(y)}.`)}expectOptionalKeyword(d){let y=this._lexer.token;return y.kind===G.NAME&&y.value===d?(this.advanceLexer(),!0):!1}unexpected(d){let y=d??this._lexer.token;return Qe(this._lexer.source,y.start,`Unexpected ${na(y)}.`)}any(d,y,b){this.expectToken(d);let F=[];for(;!this.expectOptionalToken(b);)F.push(y.call(this));return F}optionalMany(d,y,b){if(this.expectOptionalToken(d)){let F=[];do F.push(y.call(this));while(!this.expectOptionalToken(b));return F}}many(d,y,b){this.expectToken(d);let F=[];do F.push(y.call(this));while(!this.expectOptionalToken(b));return F}delimitedMany(d,y){this.expectOptionalToken(d);let b=[];do b.push(y.call(this));while(this.expectOptionalToken(d));return b}advanceLexer(){let{maxTokens:d}=this._options,y=this._lexer.advance();if(y.kind!==G.EOF&&(++this._tokenCounter,d!==void 0&&this._tokenCounter>d))throw Qe(this._lexer.source,y.start,`Document contains more than ${d} tokens. Parsing aborted.`)}};function na(d){let y=d.value;return Np(d.kind)+(y!=null?` "${y}"`:"")}function Np(d){return k5(d)?`"${d}"`:d}function z5(d,y){let b=new SyntaxError(d+" ("+y.loc.start.line+":"+y.loc.start.column+")");return Object.assign(b,y)}var Y5=z5;function J5(d){let y=[],{startToken:b,endToken:F}=d.loc;for(let _=b;_!==F;_=_.next)_.kind==="Comment"&&y.push({..._,loc:{start:_.start,end:_.end}});return y}var X5={experimentalFragmentArguments:!0};function K5(d){if(!(d instanceof fp))return d;let{message:y,locations:[b]}=d;return Y5(y,{loc:{start:b},cause:d})}function Z5(d){let y;try{y=W5(d,X5)}catch(b){throw K5(b)}return y.comments=J5(y),y}var e7={parse:Z5,astFormat:"graphql",hasPragma:nD,hasIgnorePragma:rD,locStart:rp,locEnd:ip},t7={graphql:gD};return o(a)})});var bl=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ms.isErrorNoTelemetry(t)?new Ms(t.message+` `+t.stack):new Error(t.message+` -`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},nD=new tl;function Vn(e){rD(e)||nD.onUnexpectedError(e)}function rl(e){if(e instanceof Error){let{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Ss.isErrorNoTelemetry(e)}}return e}var nl="Canceled";function rD(e){return e instanceof Uo?!0:e instanceof Error&&e.name===nl&&e.message===nl}var Uo=class extends Error{constructor(){super(nl),this.name=this.message}};var Ss=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},lt=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function il(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var vi;(function(e){function t(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(w){yield w}e.single=i;function s(w){return t(w)?w:i(w)}e.wrap=s;function o(w){return w||n}e.from=o;function*a(w){for(let F=w.length-1;F>=0;F--)yield w[F]}e.reverse=a;function u(w){return!w||w[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(w){return w[Symbol.iterator]().next().value}e.first=l;function c(w,F){let O=0;for(let L of w)if(F(L,O++))return!0;return!1}e.some=c;function f(w,F){for(let O of w)if(F(O))return O}e.find=f;function*h(w,F){for(let O of w)F(O)&&(yield O)}e.filter=h;function*m(w,F){let O=0;for(let L of w)yield F(L,O++)}e.map=m;function*g(w,F){let O=0;for(let L of w)yield*F(L,O++)}e.flatMap=g;function*v(...w){for(let F of w)yield*F}e.concat=v;function b(w,F,O){let L=O;for(let P of w)L=F(L,P);return L}e.reduce=b;function*E(w,F,O=w.length){for(F<0&&(F+=w.length),O<0?O+=w.length:O>w.length&&(O=w.length);F{t[e]||console.log(n)},3e3)}setParent(t,n){if(t&&t!==en.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==en.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function ol(e){return Di?.trackDisposable(e),e}function al(e){Di?.markAsDisposed(e)}function sl(e,t){Di?.setParent(e,t)}function aD(e,t){if(Di)for(let n of e)Di.setParent(n,t)}function ul(e){if(vi.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function W1(...e){let t=pr(()=>ul(e));return aD(e,t),t}function pr(e){let t=ol({dispose:il(()=>{al(t),e()})});return t}var Br=class e{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,ol(this)}dispose(){this._isDisposed||(al(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ul(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return sl(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),sl(t,null))}},en=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new Br,ol(this),sl(this._store,this)}dispose(){al(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};var We=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},Fs=class{constructor(){this._first=We.Undefined,this._last=We.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===We.Undefined}clear(){let t=this._first;for(;t!==We.Undefined;){let n=t.next;t.prev=We.Undefined,t.next=We.Undefined,t=n}this._first=We.Undefined,this._last=We.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){let r=new We(t);if(this._first===We.Undefined)this._first=r,this._last=r;else if(n){let s=this._last;this._last=r,r.prev=s,s.next=r}else{let s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==We.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==We.Undefined){let t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==We.Undefined&&t.next!==We.Undefined){let n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===We.Undefined&&t.next===We.Undefined?(this._first=We.Undefined,this._last=We.Undefined):t.next===We.Undefined?(this._last=this._last.prev,this._last.next=We.Undefined):t.prev===We.Undefined&&(this._first=this._first.next,this._first.prev=We.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==We.Undefined;)yield t.element,t=t.next}};var uD=globalThis.performance&&typeof globalThis.performance.now=="function",yi=class e{static create(t){return new e(t)}constructor(t){this._now=uD&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var lD=!1,Q1=!1,cD=!1,bi;(function(e){e.None=()=>en.None;function t(N){if(cD){let{onDidAddListener:S}=N,Y=As.create(),q=0;N.onDidAddListener=()=>{++q===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),Y.print()),S?.()}}}function n(N,S){return m(N,()=>{},0,void 0,!0,void 0,S)}e.defer=n;function r(N){return(S,Y=null,q)=>{let ee=!1,ie;return ie=N(ce=>{if(!ee)return ie?ie.dispose():ee=!0,S.call(Y,ce)},null,q),ee&&ie.dispose(),ie}}e.once=r;function i(N,S){return e.once(e.filter(N,S))}e.onceIf=i;function s(N,S,Y){return f((q,ee=null,ie)=>N(ce=>q.call(ee,S(ce)),null,ie),Y)}e.map=s;function o(N,S,Y){return f((q,ee=null,ie)=>N(ce=>{S(ce),q.call(ee,ce)},null,ie),Y)}e.forEach=o;function a(N,S,Y){return f((q,ee=null,ie)=>N(ce=>S(ce)&&q.call(ee,ce),null,ie),Y)}e.filter=a;function u(N){return N}e.signal=u;function l(...N){return(S,Y=null,q)=>{let ee=W1(...N.map(ie=>ie(ce=>S.call(Y,ce))));return h(ee,q)}}e.any=l;function c(N,S,Y,q){let ee=Y;return s(N,ie=>(ee=S(ee,ie),ee),q)}e.reduce=c;function f(N,S){let Y,q={onWillAddFirstListener(){Y=N(ee.fire,ee)},onDidRemoveLastListener(){Y?.dispose()}};S||t(q);let ee=new dt(q);return S?.add(ee),ee.event}function h(N,S){return S instanceof Array?S.push(N):S&&S.add(N),N}function m(N,S,Y=100,q=!1,ee=!1,ie,ce){let Oe,Je,gt,at=0,pe,kt={leakWarningThreshold:ie,onWillAddFirstListener(){Oe=N(Q=>{at++,Je=S(Je,Q),q&&!gt&&(un.fire(Je),Je=void 0),pe=()=>{let Ie=Je;Je=void 0,gt=void 0,(!q||at>1)&&un.fire(Ie),at=0},typeof Y=="number"?(clearTimeout(gt),gt=setTimeout(pe,Y)):gt===void 0&&(gt=0,queueMicrotask(pe))})},onWillRemoveListener(){ee&&at>0&&pe?.()},onDidRemoveLastListener(){pe=void 0,Oe.dispose()}};ce||t(kt);let un=new dt(kt);return ce?.add(un),un.event}e.debounce=m;function g(N,S=0,Y){return e.debounce(N,(q,ee)=>q?(q.push(ee),q):[ee],S,void 0,!0,void 0,Y)}e.accumulate=g;function v(N,S=(q,ee)=>q===ee,Y){let q=!0,ee;return a(N,ie=>{let ce=q||!S(ie,ee);return q=!1,ee=ie,ce},Y)}e.latch=v;function b(N,S,Y){return[e.filter(N,S,Y),e.filter(N,q=>!S(q),Y)]}e.split=b;function E(N,S=!1,Y=[],q){let ee=Y.slice(),ie=N(Je=>{ee?ee.push(Je):Oe.fire(Je)});q&&q.add(ie);let ce=()=>{ee?.forEach(Je=>Oe.fire(Je)),ee=null},Oe=new dt({onWillAddFirstListener(){ie||(ie=N(Je=>Oe.fire(Je)),q&&q.add(ie))},onDidAddFirstListener(){ee&&(S?setTimeout(ce):ce())},onDidRemoveLastListener(){ie&&ie.dispose(),ie=null}});return q&&q.add(Oe),Oe.event}e.buffer=E;function A(N,S){return(q,ee,ie)=>{let ce=S(new w);return N(function(Oe){let Je=ce.evaluate(Oe);Je!==C&&q.call(ee,Je)},void 0,ie)}}e.chain=A;let C=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map(S){return this.steps.push(S),this}forEach(S){return this.steps.push(Y=>(S(Y),Y)),this}filter(S){return this.steps.push(Y=>S(Y)?Y:C),this}reduce(S,Y){let q=Y;return this.steps.push(ee=>(q=S(q,ee),q)),this}latch(S=(Y,q)=>Y===q){let Y=!0,q;return this.steps.push(ee=>{let ie=Y||!S(ee,q);return Y=!1,q=ee,ie?ee:C}),this}evaluate(S){for(let Y of this.steps)if(S=Y(S),S===C)break;return S}}function F(N,S,Y=q=>q){let q=(...Oe)=>ce.fire(Y(...Oe)),ee=()=>N.on(S,q),ie=()=>N.removeListener(S,q),ce=new dt({onWillAddFirstListener:ee,onDidRemoveLastListener:ie});return ce.event}e.fromNodeEventEmitter=F;function O(N,S,Y=q=>q){let q=(...Oe)=>ce.fire(Y(...Oe)),ee=()=>N.addEventListener(S,q),ie=()=>N.removeEventListener(S,q),ce=new dt({onWillAddFirstListener:ee,onDidRemoveLastListener:ie});return ce.event}e.fromDOMEventEmitter=O;function L(N){return new Promise(S=>r(N)(S))}e.toPromise=L;function P(N){let S=new dt;return N.then(Y=>{S.fire(Y)},()=>{S.fire(void 0)}).finally(()=>{S.dispose()}),S.event}e.fromPromise=P;function W(N,S){return N(Y=>S.fire(Y))}e.forward=W;function k(N,S,Y){return S(Y),N(q=>S(q))}e.runAndSubscribe=k;class ${constructor(S,Y){this._observable=S,this._counter=0,this._hasChanged=!1;let q={onWillAddFirstListener:()=>{S.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{S.removeObserver(this)}};Y||t(q),this.emitter=new dt(q),Y&&Y.add(this.emitter)}beginUpdate(S){this._counter++}handlePossibleChange(S){}handleChange(S,Y){this._hasChanged=!0}endUpdate(S){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function I(N,S){return new $(N,S).emitter.event}e.fromObservable=I;function J(N){return(S,Y,q)=>{let ee=0,ie=!1,ce={beginUpdate(){ee++},endUpdate(){ee--,ee===0&&(N.reportChanges(),ie&&(ie=!1,S.call(Y)))},handlePossibleChange(){},handleChange(){ie=!0}};N.addObserver(ce),N.reportChanges();let Oe={dispose(){N.removeObserver(ce)}};return q instanceof Br?q.add(Oe):Array.isArray(q)&&q.push(Oe),Oe}}e.fromObservableLight=J})(bi||(bi={}));var ll=class e{static{this.all=new Set}static{this._idPool=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(t){this._stopWatch=new yi,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},z1=-1,cl=class e{static{this._idPool=1}constructor(t,n,r=(e._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){let r=this.threshold;if(r<=0||n{let s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[r,i]of this._stacks)(!t||n{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},l7=new bl;function kn(e){c7(e)||l7.onUnexpectedError(e)}function vl(e){if(e instanceof Error){let{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Ms.isErrorNoTelemetry(e)}}return e}var xl="Canceled";function c7(e){return e instanceof ia?!0:e instanceof Error&&e.name===xl&&e.message===xl}var ia=class extends Error{constructor(){super(xl),this.name=this.message}};var Ms=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},et=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function _l(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var Fi;(function(e){function t(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(w){yield w}e.single=i;function s(w){return t(w)?w:i(w)}e.wrap=s;function o(w){return w||n}e.from=o;function*a(w){for(let R=w.length-1;R>=0;R--)yield w[R]}e.reverse=a;function u(w){return!w||w[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(w){return w[Symbol.iterator]().next().value}e.first=l;function c(w,R){let V=0;for(let S of w)if(R(S,V++))return!0;return!1}e.some=c;function f(w,R){for(let V of w)if(R(V))return V}e.find=f;function*h(w,R){for(let V of w)R(V)&&(yield V)}e.filter=h;function*m(w,R){let V=0;for(let S of w)yield R(S,V++)}e.map=m;function*g(w,R){let V=0;for(let S of w)yield*R(S,V++)}e.flatMap=g;function*E(...w){for(let R of w)yield*R}e.concat=E;function v(w,R,V){let S=V;for(let k of w)S=R(S,k);return S}e.reduce=v;function*N(w,R,V=w.length){for(R<0&&(R+=w.length),V<0?V+=w.length:V>w.length&&(V=w.length);R{t[e]||console.log(n)},3e3)}setParent(t,n){if(t&&t!==Yt.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Yt.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Tl(e){return Ai?.trackDisposable(e),e}function Sl(e){Ai?.markAsDisposed(e)}function Nl(e,t){Ai?.setParent(e,t)}function h7(e,t){if(Ai)for(let n of e)Ai.setParent(n,t)}function Fl(e){if(Fi.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Fp(...e){let t=ar(()=>Fl(e));return h7(e,t),t}function ar(e){let t=Tl({dispose:_l(()=>{Sl(t),e()})});return t}var kr=class e{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,Tl(this)}dispose(){this._isDisposed||(Sl(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Fl(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Nl(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Nl(t,null))}},Yt=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new kr,Tl(this),Nl(this._store,this)}dispose(){Sl(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};var Ue=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},Ps=class{constructor(){this._first=Ue.Undefined,this._last=Ue.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ue.Undefined}clear(){let t=this._first;for(;t!==Ue.Undefined;){let n=t.next;t.prev=Ue.Undefined,t.next=Ue.Undefined,t=n}this._first=Ue.Undefined,this._last=Ue.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){let r=new Ue(t);if(this._first===Ue.Undefined)this._first=r,this._last=r;else if(n){let s=this._last;this._last=r,r.prev=s,s.next=r}else{let s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==Ue.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==Ue.Undefined){let t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==Ue.Undefined&&t.next!==Ue.Undefined){let n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===Ue.Undefined&&t.next===Ue.Undefined?(this._first=Ue.Undefined,this._last=Ue.Undefined):t.next===Ue.Undefined?(this._last=this._last.prev,this._last.next=Ue.Undefined):t.prev===Ue.Undefined&&(this._first=this._first.next,this._first.prev=Ue.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==Ue.Undefined;)yield t.element,t=t.next}};var m7=globalThis.performance&&typeof globalThis.performance.now=="function",Ci=class e{static create(t){return new e(t)}constructor(t){this._now=m7&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var g7=!1,Ap=!1,D7=!1,Li;(function(e){e.None=()=>Yt.None;function t(C){if(D7){let{onDidAddListener:x}=C,B=Bs.create(),P=0;C.onDidAddListener=()=>{++P===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),B.print()),x?.()}}}function n(C,x){return m(C,()=>{},0,void 0,!0,void 0,x)}e.defer=n;function r(C){return(x,B=null,P)=>{let q=!1,J;return J=C(se=>{if(!q)return J?J.dispose():q=!0,x.call(B,se)},null,P),q&&J.dispose(),J}}e.once=r;function i(C,x){return e.once(e.filter(C,x))}e.onceIf=i;function s(C,x,B){return f((P,q=null,J)=>C(se=>P.call(q,x(se)),null,J),B)}e.map=s;function o(C,x,B){return f((P,q=null,J)=>C(se=>{x(se),P.call(q,se)},null,J),B)}e.forEach=o;function a(C,x,B){return f((P,q=null,J)=>C(se=>x(se)&&P.call(q,se),null,J),B)}e.filter=a;function u(C){return C}e.signal=u;function l(...C){return(x,B=null,P)=>{let q=Fp(...C.map(J=>J(se=>x.call(B,se))));return h(q,P)}}e.any=l;function c(C,x,B,P){let q=B;return s(C,J=>(q=x(q,J),q),P)}e.reduce=c;function f(C,x){let B,P={onWillAddFirstListener(){B=C(q.fire,q)},onDidRemoveLastListener(){B?.dispose()}};x||t(P);let q=new st(P);return x?.add(q),q.event}function h(C,x){return x instanceof Array?x.push(C):x&&x.add(C),C}function m(C,x,B=100,P=!1,q=!1,J,se){let Oe,Ke,$t,Rt=0,le,mn={leakWarningThreshold:J,onWillAddFirstListener(){Oe=C(Y=>{Rt++,Ke=x(Ke,Y),P&&!$t&&(nr.fire(Ke),Ke=void 0),le=()=>{let Ne=Ke;Ke=void 0,$t=void 0,(!P||Rt>1)&&nr.fire(Ne),Rt=0},typeof B=="number"?(clearTimeout($t),$t=setTimeout(le,B)):$t===void 0&&($t=0,queueMicrotask(le))})},onWillRemoveListener(){q&&Rt>0&&le?.()},onDidRemoveLastListener(){le=void 0,Oe.dispose()}};se||t(mn);let nr=new st(mn);return se?.add(nr),nr.event}e.debounce=m;function g(C,x=0,B){return e.debounce(C,(P,q)=>P?(P.push(q),P):[q],x,void 0,!0,void 0,B)}e.accumulate=g;function E(C,x=(P,q)=>P===q,B){let P=!0,q;return a(C,J=>{let se=P||!x(J,q);return P=!1,q=J,se},B)}e.latch=E;function v(C,x,B){return[e.filter(C,x,B),e.filter(C,P=>!x(P),B)]}e.split=v;function N(C,x=!1,B=[],P){let q=B.slice(),J=C(Ke=>{q?q.push(Ke):Oe.fire(Ke)});P&&P.add(J);let se=()=>{q?.forEach(Ke=>Oe.fire(Ke)),q=null},Oe=new st({onWillAddFirstListener(){J||(J=C(Ke=>Oe.fire(Ke)),P&&P.add(J))},onDidAddFirstListener(){q&&(x?setTimeout(se):se())},onDidRemoveLastListener(){J&&J.dispose(),J=null}});return P&&P.add(Oe),Oe.event}e.buffer=N;function L(C,x){return(P,q,J)=>{let se=x(new w);return C(function(Oe){let Ke=se.evaluate(Oe);Ke!==M&&P.call(q,Ke)},void 0,J)}}e.chain=L;let M=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map(x){return this.steps.push(x),this}forEach(x){return this.steps.push(B=>(x(B),B)),this}filter(x){return this.steps.push(B=>x(B)?B:M),this}reduce(x,B){let P=B;return this.steps.push(q=>(P=x(P,q),P)),this}latch(x=(B,P)=>B===P){let B=!0,P;return this.steps.push(q=>{let J=B||!x(q,P);return B=!1,P=q,J?q:M}),this}evaluate(x){for(let B of this.steps)if(x=B(x),x===M)break;return x}}function R(C,x,B=P=>P){let P=(...Oe)=>se.fire(B(...Oe)),q=()=>C.on(x,P),J=()=>C.removeListener(x,P),se=new st({onWillAddFirstListener:q,onDidRemoveLastListener:J});return se.event}e.fromNodeEventEmitter=R;function V(C,x,B=P=>P){let P=(...Oe)=>se.fire(B(...Oe)),q=()=>C.addEventListener(x,P),J=()=>C.removeEventListener(x,P),se=new st({onWillAddFirstListener:q,onDidRemoveLastListener:J});return se.event}e.fromDOMEventEmitter=V;function S(C){return new Promise(x=>r(C)(x))}e.toPromise=S;function k(C){let x=new st;return C.then(B=>{x.fire(B)},()=>{x.fire(void 0)}).finally(()=>{x.dispose()}),x.event}e.fromPromise=k;function T(C,x){return C(B=>x.fire(B))}e.forward=T;function A(C,x,B){return x(B),C(P=>x(P))}e.runAndSubscribe=A;class j{constructor(x,B){this._observable=x,this._counter=0,this._hasChanged=!1;let P={onWillAddFirstListener:()=>{x.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{x.removeObserver(this)}};B||t(P),this.emitter=new st(P),B&&B.add(this.emitter)}beginUpdate(x){this._counter++}handlePossibleChange(x){}handleChange(x,B){this._hasChanged=!0}endUpdate(x){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Q(C,x){return new j(C,x).emitter.event}e.fromObservable=Q;function te(C){return(x,B,P)=>{let q=0,J=!1,se={beginUpdate(){q++},endUpdate(){q--,q===0&&(C.reportChanges(),J&&(J=!1,x.call(B)))},handlePossibleChange(){},handleChange(){J=!0}};C.addObserver(se),C.reportChanges();let Oe={dispose(){C.removeObserver(se)}};return P instanceof kr?P.add(Oe):Array.isArray(P)&&P.push(Oe),Oe}}e.fromObservableLight=te})(Li||(Li={}));var Al=class e{static{this.all=new Set}static{this._idPool=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(t){this._stopWatch=new Ci,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},Cp=-1,Cl=class e{static{this._idPool=1}constructor(t,n,r=(e._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){let r=this.threshold;if(r<=0||n{let s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[r,i]of this._stacks)(!t||n{if(e instanceof Ei)t(e);else for(let n=0;n{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(` -`)),e.length=0)},3e3),jo=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var dt=class{constructor(t){this._size=0,this._options=t,this._leakageMon=z1>0||this._options?.leakWarningThreshold?new cl(t?.onListenerError??Vn,this._options?.leakWarningThreshold??z1):void 0,this._perfMon=this._options?._profName?new ll(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Q1){let t=this._listeners;queueMicrotask(()=>{pD(t,n=>n.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(t,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new pl(`${u}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Vn)(c),en.None}if(this._disposed)return en.None;n&&(t=t.bind(n));let i=new Ei(t),s,o;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=As.create(),s=this._leakageMon.check(i.stack,this._size+1)),Q1&&(i.stack=o??As.create()),this._listeners?this._listeners instanceof Ei?(this._deliveryQueue??=new hl,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=pr(()=>{jo?.unregister(a),s?.(),this._removeListener(i)});if(r instanceof Br?r.add(a):Array.isArray(r)&&r.push(a),jo){let u=new Error().stack.split(` +`))}},wl=class extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}},Ll=class extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}},wi=class{constructor(t){this.value=t}},y7=2,E7=(e,t)=>{if(e instanceof wi)t(e);else for(let n=0;n{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(` +`)),e.length=0)},3e3),sa=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var st=class{constructor(t){this._size=0,this._options=t,this._leakageMon=Cp>0||this._options?.leakWarningThreshold?new Cl(t?.onListenerError??kn,this._options?.leakWarningThreshold??Cp):void 0,this._perfMon=this._options?._profName?new Al(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Ap){let t=this._listeners;queueMicrotask(()=>{E7(t,n=>n.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(t,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Ll(`${u}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||kn)(c),Yt.None}if(this._disposed)return Yt.None;n&&(t=t.bind(n));let i=new wi(t),s,o;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Bs.create(),s=this._leakageMon.check(i.stack,this._size+1)),Ap&&(i.stack=o??Bs.create()),this._listeners?this._listeners instanceof wi?(this._deliveryQueue??=new Il,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=ar(()=>{sa?.unregister(a),s?.(),this._removeListener(i)});if(r instanceof kr?r.add(a):Array.isArray(r)&&r.push(a),sa){let u=new Error().stack.split(` `).slice(2,3).join(` -`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(u);jo.register(a,l?.[2]??u,a)}return a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(t);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;let i=this._deliveryQueue.current===this;if(this._size*fD<=n.length){let s=0;for(let o=0;o0}};var hl=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function dl(){return globalThis._VSCODE_NLS_MESSAGES}function ws(){return globalThis._VSCODE_NLS_LANGUAGE}var hD=ws()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function Y1(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=t[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),hD&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function Ve(e,t,...n){return Y1(typeof e=="number"?dD(e,t):t,n)}function dD(e,t){let n=dl()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var xi="en",$o=!1,Ho=!1,qo=!1,gD=!1,X1=!1,vl=!1,vD=!1,DD=!1,yD=!1,ED=!1,Go,ml=xi,J1=xi,bD,Un,jn=globalThis,zt;typeof jn.vscode<"u"&&typeof jn.vscode.process<"u"?zt=jn.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(zt=process);var K1=typeof zt?.versions?.electron=="string",xD=K1&&zt?.type==="renderer";if(typeof zt=="object"){$o=zt.platform==="win32",Ho=zt.platform==="darwin",qo=zt.platform==="linux",gD=qo&&!!zt.env.SNAP&&!!zt.env.SNAP_REVISION,vD=K1,yD=!!zt.env.CI||!!zt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Go=xi,ml=xi;let e=zt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Go=t.userLocale,J1=t.osLocale,ml=t.resolvedLanguage||xi,bD=t.languagePack?.translationsConfigFile}catch{}X1=!0}else typeof navigator=="object"&&!xD?(Un=navigator.userAgent,$o=Un.indexOf("Windows")>=0,Ho=Un.indexOf("Macintosh")>=0,DD=(Un.indexOf("Macintosh")>=0||Un.indexOf("iPad")>=0||Un.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,qo=Un.indexOf("Linux")>=0,ED=Un?.indexOf("Mobi")>=0,vl=!0,ml=ws()||xi,Go=navigator.language.toLowerCase(),J1=Go):console.error("Unable to resolve platform.");var gl=0;Ho?gl=1:$o?gl=3:qo&&(gl=2);var Vr=$o,Z1=Ho;var ep=X1,Dl=vl,_D=vl&&typeof jn.importScripts=="function",tp=_D?jn.origin:void 0;var _n=Un;var TD=typeof jn.postMessage=="function"&&!jn.importScripts,np=(()=>{if(TD){let e=[];jn.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{let r=++t;e.push({id:r,callback:n}),jn.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var ND=!!(_n&&_n.indexOf("Chrome")>=0),S3=!!(_n&&_n.indexOf("Firefox")>=0),F3=!!(!ND&&_n&&_n.indexOf("Safari")>=0),A3=!!(_n&&_n.indexOf("Edg/")>=0),w3=!!(_n&&_n.indexOf("Android")>=0);function FD(e){return e}var Wo=class{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=FD):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){let n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}};var Cs=class{constructor(t){this.executor=t,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function ip(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function sp(e){return e.split(/\r\n|\r|\n/)}function op(e){for(let t=0,n=e.length;t=0;n--){let r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function yl(e){return e>=65&&e<=90}function Ni(e){return 55296<=e&&e<=56319}function Qo(e){return 56320<=e&&e<=57343}function El(e,t){return(e-55296<<10)+(t-56320)+65536}function up(e,t,n){let r=e.charCodeAt(n);if(Ni(r)&&n+1n[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};function wD(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}var _i=class e{static{this.ambiguousCharacterData=new Cs(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new Wo({getCacheKey:JSON.stringify},t=>{function n(c){let f=new Map;for(let h=0;h!c.startsWith("_")&&c in s);o.length===0&&(o=["_default"]);let a;for(let c of o){let f=n(s[c]);a=i(a,f)}let u=n(s._common),l=r(u,a);return new e(l)})}static getInstance(t){return e.cache.get(Array.from(t))}static{this._locales=new Cs(()=>Object.keys(e.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return e._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},Ti=class e{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(e.getRawData())),this._data}static isInvisibleCharacter(t){return e.getData().has(t)}static get codePoints(){return e.getData()}};var Si,bl=globalThis.vscode;if(typeof bl<"u"&&typeof bl.process<"u"){let e=bl.process;Si={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Si={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Si={get platform(){return Vr?"win32":Z1?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var Is=Si.cwd,cp=Si.env,fp=Si.platform;var LD=65,ID=97,RD=90,OD=122,mr=46,Dt=47,Gt=92,hr=58,kD=63,zo=class extends Error{constructor(t,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";let s=t.indexOf(".")!==-1?"property":"argument",o=`The "${t}" ${s} ${i} of type ${n}`;o+=`. Received type ${typeof r}`,super(o),this.code="ERR_INVALID_ARG_TYPE"}};function MD(e,t){if(e===null||typeof e!="object")throw new zo(t,"Object",e)}function Ke(e,t){if(typeof e!="string")throw new zo(t,"string",e)}var Gn=fp==="win32";function ge(e){return e===Dt||e===Gt}function xl(e){return e===Dt}function dr(e){return e>=LD&&e<=RD||e>=ID&&e<=OD}function Yo(e,t,n,r){let i="",s=0,o=-1,a=0,u=0;for(let l=0;l<=e.length;++l){if(l2){let c=i.lastIndexOf(n);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(n)),o=l,a=0;continue}else if(i.length!==0){i="",s=0,o=l,a=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),s=l-o-1;o=l,a=0}else u===mr&&a!==-1?++a:a=-1}return i}function PD(e){return e?`${e[0]==="."?"":"."}${e}`:""}function pp(e,t){MD(t,"pathObject");let n=t.dir||t.root,r=t.base||`${t.name||""}${PD(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var bt={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],Ke(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=Is():(s=cp[`=${t}`]||Is(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===Gt)&&(s=`${t}\\`));let o=s.length,a=0,u="",l=!1,c=s.charCodeAt(0);if(o===1)ge(c)&&(a=1,l=!0);else if(ge(c))if(l=!0,ge(s.charCodeAt(1))){let f=2,h=f;for(;f2&&ge(s.charCodeAt(2))&&(l=!0,a=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=l,l&&t.length>0)break}return n=Yo(n,!r,"\\",ge),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){Ke(e,"path");let t=e.length;if(t===0)return".";let n=0,r,i=!1,s=e.charCodeAt(0);if(t===1)return xl(s)?"\\":e;if(ge(s))if(i=!0,ge(e.charCodeAt(1))){let a=2,u=a;for(;a2&&ge(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&ge(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){Ke(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return ge(n)||t>2&&dr(n)&&e.charCodeAt(1)===hr&&ge(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&ge(n.charCodeAt(0))){++i;let s=n.length;s>1&&ge(n.charCodeAt(1))&&(++i,s>2&&(ge(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return bt.normalize(t)},relative(e,t){if(Ke(e,"from"),Ke(t,"to"),e===t)return"";let n=bt.resolve(e),r=bt.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===Gt;)s--;let o=s-i,a=0;for(;aa&&t.charCodeAt(u-1)===Gt;)u--;let l=u-a,c=oc){if(t.charCodeAt(a+h)===Gt)return r.slice(a+h+1);if(h===2)return r.slice(a+h)}o>c&&(e.charCodeAt(i+h)===Gt?f=h:h===2&&(f=3)),f===-1&&(f=0)}let m="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===Gt)&&(m+=m.length===0?"..":"\\..");return a+=f,m.length>0?`${m}${r.slice(a,u)}`:(r.charCodeAt(a)===Gt&&++a,r.slice(a,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=bt.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Gt){if(t.charCodeAt(1)===Gt){let n=t.charCodeAt(2);if(n!==kD&&n!==mr)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(dr(t.charCodeAt(0))&&t.charCodeAt(1)===hr&&t.charCodeAt(2)===Gt)return`\\\\?\\${t}`;return e},dirname(e){Ke(e,"path");let t=e.length;if(t===0)return".";let n=-1,r=0,i=e.charCodeAt(0);if(t===1)return ge(i)?e:".";if(ge(i)){if(n=r=1,ge(e.charCodeAt(1))){let a=2,u=a;for(;a2&&ge(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let a=t-1;a>=r;--a)if(ge(e.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&Ke(t,"suffix"),Ke(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&dr(e.charCodeAt(0))&&e.charCodeAt(1)===hr&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(s=e.length-1;s>=n;--s){let u=e.charCodeAt(s);if(ge(u)){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(ge(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){Ke(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===hr&&dr(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){let u=e.charCodeAt(a);if(ge(u)){if(!s){r=a+1;break}continue}i===-1&&(s=!1,i=a+1),u===mr?n===-1?n=a:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:pp.bind(null,"\\"),parse(e){Ke(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,r=0,i=e.charCodeAt(0);if(n===1)return ge(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ge(i)){if(r=1,ge(e.charCodeAt(1))){let f=2,h=f;for(;f0&&(t.root=e.slice(0,r));let s=-1,o=r,a=-1,u=!0,l=e.length-1,c=0;for(;l>=r;--l){if(i=e.charCodeAt(l),ge(i)){if(!u){o=l+1;break}continue}a===-1&&(u=!1,a=l+1),i===mr?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return a!==-1&&(s===-1||c===0||c===1&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},BD=(()=>{if(Gn){let e=/\\/g;return()=>{let t=Is().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Is()})(),yt={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:BD();Ke(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===Dt)}return t=Yo(t,!n,"/",xl),n?`/${t}`:t.length>0?t:"."},normalize(e){if(Ke(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===Dt,n=e.charCodeAt(e.length-1)===Dt;return e=Yo(e,!t,"/",xl),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return Ke(e,"path"),e.length>0&&e.charCodeAt(0)===Dt},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":yt.normalize(t)},relative(e,t){if(Ke(e,"from"),Ke(t,"to"),e===t||(e=yt.resolve(e),t=yt.resolve(t),e===t))return"";let n=1,r=e.length,i=r-n,s=1,o=t.length-s,a=ia){if(t.charCodeAt(s+l)===Dt)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>a&&(e.charCodeAt(n+l)===Dt?u=l:l===0&&(u=0));let c="";for(l=n+u+1;l<=r;++l)(l===r||e.charCodeAt(l)===Dt)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(Ke(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===Dt,n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===Dt){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&Ke(t,"ext"),Ke(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(s=e.length-1;s>=0;--s){let u=e.charCodeAt(s);if(u===Dt){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===Dt){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){Ke(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){let a=e.charCodeAt(o);if(a===Dt){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),a===mr?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:pp.bind(null,"/"),parse(e){Ke(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===Dt,r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,u=e.length-1,l=0;for(;u>=r;--u){let c=e.charCodeAt(u);if(c===Dt){if(!a){s=u+1;break}continue}o===-1&&(a=!1,o=u+1),c===mr?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){let c=s===0&&n?1:s;i===-1||l===0||l===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(c,o):(t.name=e.slice(c,i),t.base=e.slice(c,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};yt.win32=bt.win32=bt;yt.posix=bt.posix=yt;var k3=Gn?bt.normalize:yt.normalize,hp=Gn?bt.join:yt.join,M3=Gn?bt.resolve:yt.resolve,P3=Gn?bt.relative:yt.relative,B3=Gn?bt.dirname:yt.dirname,V3=Gn?bt.basename:yt.basename,U3=Gn?bt.extname:yt.extname,j3=Gn?bt.sep:yt.sep;var VD=/^\w[\w\d+.-]*$/,UD=/^\//,jD=/^\/\//;function GD(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!VD.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!UD.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(jD.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function qD(e,t){return!e&&!t?"file":e}function $D(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ln&&(t=ln+t):t=ln;break}return t}var Ue="",ln="/",HD=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,wt=class e{static isUri(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||Ue,this.authority=t.authority||Ue,this.path=t.path||Ue,this.query=t.query||Ue,this.fragment=t.fragment||Ue):(this.scheme=qD(t,o),this.authority=n||Ue,this.path=$D(this.scheme,r||Ue),this.query=i||Ue,this.fragment=s||Ue,GD(this,o))}get fsPath(){return _l(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Ue),r===void 0?r=this.authority:r===null&&(r=Ue),i===void 0?i=this.path:i===null&&(i=Ue),s===void 0?s=this.query:s===null&&(s=Ue),o===void 0?o=this.fragment:o===null&&(o=Ue),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new gr(n,r,i,s,o)}static parse(t,n=!1){let r=HD.exec(t);return r?new gr(r[2]||Ue,Jo(r[4]||Ue),Jo(r[5]||Ue),Jo(r[7]||Ue),Jo(r[9]||Ue),n):new gr(Ue,Ue,Ue,Ue,Ue)}static file(t){let n=Ue;if(Vr&&(t=t.replace(/\\/g,ln)),t[0]===ln&&t[1]===ln){let r=t.indexOf(ln,2);r===-1?(n=t.substring(2),t=ln):(n=t.substring(2,r),t=t.substring(r)||ln)}return new gr("file",n,t,Ue,Ue)}static from(t,n){return new gr(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Vr&&t.scheme==="file"?r=e.file(bt.join(_l(t,!0),...n)).path:r=yt.join(t.path,...n),t.with({path:r})}toString(t=!1){return Tl(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let n=new gr(t);return n._formatted=t.external??null,n._fsPath=t._sep===vp?t.fsPath??null:null,n}}else return t}},vp=Vr?1:void 0,gr=class extends wt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_l(this,!1)),this._fsPath}toString(t=!1){return t?Tl(this,!0):(this._formatted||(this._formatted=Tl(this,!1)),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=vp),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}},Dp={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function mp(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));let a=Dp[o];a!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=a):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function WD(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Vr&&(n=n.replace(/\//g,"\\")),n}function Tl(e,t){let n=t?WD:mp,r="",{scheme:i,authority:s,path:o,query:a,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=ln,r+=ln),s){let l=s.indexOf("@");if(l!==-1){let c=s.substr(0,l);s=s.substr(l+1),l=c.lastIndexOf(":"),l===-1?r+=n(c,!1,!1):(r+=n(c.substr(0,l),!1,!1),r+=":",r+=n(c.substr(l+1),!1,!0)),r+="@"}s=s.toLowerCase(),l=s.lastIndexOf(":"),l===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,l),!1,!0),r+=s.substr(l))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let l=o.charCodeAt(1);l>=65&&l<=90&&(o=`/${String.fromCharCode(l+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let l=o.charCodeAt(0);l>=65&&l<=90&&(o=`${String.fromCharCode(l+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:mp(u,!1,!1)),r}function yp(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+yp(e.substr(3)):e}}var gp=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Jo(e){return e.match(gp)?e.replace(gp,t=>yp(t)):e}var vr;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(vr||(vr={}));var QD="tkn",Nl=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(t){this._preferredWebSchema=t}get _remoteResourcesPath(){return yt.join(this._serverRootPath,vr.vscodeRemoteResource)}rewrite(t){if(this._delegate)try{return this._delegate(t)}catch(a){return Vn(a),t}let n=t.authority,r=this._hosts[n];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);let i=this._ports[n],s=this._connectionTokens[n],o=`path=${encodeURIComponent(t.path)}`;return typeof s=="string"&&(o+=`&${QD}=${encodeURIComponent(s)}`),wt.from({scheme:Dl?this._preferredWebSchema:vr.vscodeRemoteResource,authority:`${r}:${i}`,path:this._remoteResourcesPath,query:o})}},zD=new Nl,YD="vscode-app",Sl=class e{static{this.FALLBACK_AUTHORITY=YD}asBrowserUri(t){let n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===vr.vscodeRemote?zD.rewrite(t):t.scheme===vr.file&&(ep||tp===`${vr.vscodeFileResource}://${e.FALLBACK_AUTHORITY}`)?t.with({scheme:vr.vscodeFileResource,authority:t.authority||e.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if(wt.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){let r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return wt.joinPath(wt.parse(r,!0),t);let i=hp(r,t);return wt.file(i)}return wt.parse(n.toUrl(t))}},Xo=new Sl,Ep;(function(e){let t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));let n="vscode-coi";function r(s){let o;typeof s=="string"?o=new URL(s).searchParams:s instanceof URL?o=s.searchParams:wt.isUri(s)&&(o=new URL(s.toString(!0)).searchParams);let a=o?.get(n);if(a)return t.get(a)}e.getHeadersFromQuery=r;function i(s,o,a){if(!globalThis.crossOriginIsolated)return;let u=o&&a?"3":a?"2":"1";s instanceof URLSearchParams?s.set(n,u):s[n]=u}e.addSearchParam=i})(Ep||(Ep={}));var JD=!0,Fl="default",XD="$initialize";var Al=class{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}},Ko=class{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}},wl=class{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}},Cl=class{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}},Ll=class{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}},Il=class{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}sendMessage(t,n,r){let i=String(++this._lastSentReq);return new Promise((s,o)=>{this._pendingReplies[i]={resolve:s,reject:o},this._send(new Al(this._workerId,i,t,n,r))})}listen(t,n,r){let i=null,s=new dt({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new wl(this._workerId,i,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Ll(this._workerId,i)),i=null}});return s.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){let r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(xp(s)?i[s]=o=>this.listen(t,s,o):bp(s)?i[s]=this.listen(t,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...o)=>(await n?.(),this.sendMessage(t,s,o)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;t.err.$isError&&(r=new Error,r.name=t.err.name,r.message=t.err.message,r.stack=t.err.stack),n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){let n=t.req;this._handler.handleMessage(t.channel,t.method,t.args).then(i=>{this._send(new Ko(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=rl(i.detail)),this._send(new Ko(this._workerId,n,void 0,rl(i)))})}_handleSubscribeEventMessage(t){let n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(i=>{this._send(new Cl(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){let n=[];if(t.type===0)for(let r=0;r{t(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===Fl&&n===XD)return this.initialize(r[0],r[1],r[2]);let i=t===Fl?this._requestHandler:this._localChannels.get(t);if(!i)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));if(typeof i[n]!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(i[n].apply(i,r))}catch(s){return Promise.reject(s)}}_handleEvent(t,n,r){let i=t===Fl?this._requestHandler:this._localChannels.get(t);if(!i)throw new Error(`Missing channel ${t} on worker thread`);if(xp(n)){let s=i[n].call(i,r);if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return s}if(bp(n)){let s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){let n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t,n,r){if(this._protocol.setWorkerId(t),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),JD?import(`${Xo.asBrowserUri(`${r}.js`).toString(!0)}`).then(s=>{if(this._requestHandler=s.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}):new Promise((i,s)=>{let o=globalThis.require;o([r],a=>{if(this._requestHandler=a.create(this),!this._requestHandler){s(new Error("No RequestHandler!"));return}i()},s)})}};var cn=class{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function _p(e,t){return(t<<5)-t+e|0}function Sp(e,t){t=_p(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function Tp(e,t=0,n=e.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):KD((e>>>0).toString(16),t/4)}var Np=class e{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let n=t.length;if(n===0)return;let r=this._buff,i=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=t.charCodeAt(0),a=0);;){let u=o;if(Ni(o))if(a+1>>6,t[n++]=128|(r&63)>>>0):r<65536?(t[n++]=224|(r&61440)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0):(t[n++]=240|(r&1835008)>>>18,t[n++]=128|(r&258048)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Rs(this._h0)+Rs(this._h1)+Rs(this._h2)+Rs(this._h3)+Rs(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Tp(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Tp(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let f=0;f<64;f+=4)t.setUint32(f,n.getUint32(f,!1),!1);for(let f=64;f<320;f+=4)t.setUint32(f,Rl(t.getUint32(f-12,!1)^t.getUint32(f-32,!1)^t.getUint32(f-56,!1)^t.getUint32(f-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,o=this._h3,a=this._h4,u,l,c;for(let f=0;f<80;f++)f<20?(u=i&s|~i&o,l=1518500249):f<40?(u=i^s^o,l=1859775393):f<60?(u=i&s|i&o|s&o,l=2400959708):(u=i^s^o,l=3395469782),c=Rl(r,5)+u+a+l+t.getUint32(f*4,!1)&4294967295,a=o,o=s,s=Rl(i,30),i=r,r=c;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};var ea=class{constructor(t){this.source=t}getElements(){let t=this.source,n=new Int32Array(t.length);for(let r=0,i=t.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new cn(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Os=class e{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;let[i,s,o]=e._getElements(t),[a,u,l]=e._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){let n=t.getElements();if(e._isStringArray(n)){let r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let f;return r<=i?(Dr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new cn(t,0,r,i-r+1)]):t<=n?(Dr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new cn(t,n-t+1,r,0)]):(Dr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),Dr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}let o=[0],a=[0],u=this.ComputeRecursionPoint(t,n,r,i,o,a,s),l=o[0],c=a[0];if(u!==null)return u;if(!s[0]){let f=this.ComputeDiffRecursive(t,l,r,c,s),h=[];return s[0]?h=[new cn(l+1,n-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,n,c+1,i,s),this.ConcatenateChanges(f,h)}return[new cn(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,o,a,u,l,c,f,h,m,g,v,b,E,A){let C=null,w=null,F=new ta,O=n,L=r,P=m[0]-b[0]-i,W=-1073741824,k=this.m_forwardHistory.length-1;do{let $=P+t;$===O||$=0&&(l=this.m_forwardHistory[k],t=l[0],O=1,L=l.length-1)}while(--k>=-1);if(C=F.getReverseChanges(),A[0]){let $=m[0]+1,I=b[0]+1;if(C!==null&&C.length>0){let J=C[C.length-1];$=Math.max($,J.getOriginalEnd()),I=Math.max(I,J.getModifiedEnd())}w=[new cn($,h-$+1,I,v-I+1)]}else{F=new ta,O=o,L=a,P=m[0]-b[0]-u,W=1073741824,k=E?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let $=P+s;$===O||$=c[$+1]?(f=c[$+1]-1,g=f-P-u,f>W&&F.MarkNextChange(),W=f+1,F.AddOriginalElement(f+1,g+1),P=$+1-s):(f=c[$-1],g=f-P-u,f>W&&F.MarkNextChange(),W=f,F.AddModifiedElement(f+1,g+1),P=$-1-s),k>=0&&(c=this.m_reverseHistory[k],s=c[0],O=1,L=c.length-1)}while(--k>=-1);w=F.getChanges()}return this.ConcatenateChanges(C,w)}ComputeRecursionPoint(t,n,r,i,s,o,a){let u=0,l=0,c=0,f=0,h=0,m=0;t--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let g=n-t+(i-r),v=g+1,b=new Int32Array(v),E=new Int32Array(v),A=i-r,C=n-t,w=t-r,F=n-i,L=(C-A)%2===0;b[A]=t,E[C]=n,a[0]=!1;for(let P=1;P<=g/2+1;P++){let W=0,k=0;c=this.ClipDiagonalBound(A-P,P,A,v),f=this.ClipDiagonalBound(A+P,P,A,v);for(let I=c;I<=f;I+=2){I===c||IW+k&&(W=u,k=l),!L&&Math.abs(I-C)<=P-1&&u>=E[I])return s[0]=u,o[0]=l,J<=E[I]&&P<=1448?this.WALKTRACE(A,c,f,w,C,h,m,F,b,E,u,n,s,l,i,o,L,a):null}let $=(W-t+(k-r)-P)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(W,$))return a[0]=!0,s[0]=W,o[0]=k,$>0&&P<=1448?this.WALKTRACE(A,c,f,w,C,h,m,F,b,E,u,n,s,l,i,o,L,a):(t++,r++,[new cn(t,n-t+1,r,i-r+1)]);h=this.ClipDiagonalBound(C-P,P,C,v),m=this.ClipDiagonalBound(C+P,P,C,v);for(let I=h;I<=m;I+=2){I===h||I=E[I+1]?u=E[I+1]-1:u=E[I-1],l=u-(I-C)-F;let J=u;for(;u>t&&l>r&&this.ElementsAreEqual(u,l);)u--,l--;if(E[I]=u,L&&Math.abs(I-A)<=P&&u<=b[I])return s[0]=u,o[0]=l,J>=b[I]&&P<=1448?this.WALKTRACE(A,c,f,w,C,h,m,F,b,E,u,n,s,l,i,o,L,a):null}if(P<=1447){let I=new Int32Array(f-c+2);I[0]=A-c+1,yr.Copy2(b,c,I,1,f-c+1),this.m_forwardHistory.push(I),I=new Int32Array(m-h+2),I[0]=C-h+1,yr.Copy2(E,h,I,1,m-h+1),this.m_reverseHistory.push(I)}}return this.WALKTRACE(A,c,f,w,C,h,m,F,b,E,u,n,s,l,i,o,L,a)}PrettifyChanges(t){for(let n=0;n0,a=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=t[n],i=0,s=0;if(n>0){let f=t[n-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}let o=r.originalLength>0,a=r.modifiedLength>0,u=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){let h=r.originalStart-f,m=r.modifiedStart-f;if(hl&&(l=v,u=f)}r.originalStart-=u,r.modifiedStart-=u;let c=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],c)){t[n-1]=c[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>u&&(u=m,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){let s=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){let i=new Array(t.length+n.length-1);return yr.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],yr.Copy(n,1,i,t.length,n.length-1),i}else{let i=new Array(t.length+n.length);return yr.Copy(t,0,i,0,t.length),yr.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(Dr.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Dr.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){let i=t.originalStart,s=t.originalLength,o=t.modifiedStart,a=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(a=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new cn(i,s,o,a),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return e.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return e.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return e.plusRange(this,t)}static plusRange(t,n){let r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new e(r,i,s,o)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(s=l,o=c):s===l&&(o=Math.min(o,c)),r>s||r===s&&i>o?null:new e(r,i,s,o)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(t){return new Te(t.endLineNumber,t.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(t){return new Te(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function Ol(e){return e<0?0:e>255?255:e|0}function Ur(e){return e<0?0:e>4294967295?4294967295:e|0}var ks=class e{constructor(t){let n=Ol(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);return n.fill(t),n}set(t,n){let r=Ol(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var Ml=class{constructor(t,n,r){let i=new Uint8Array(t*n);for(let s=0,o=t*n;sn&&(n=u),a>r&&(r=a),l>r&&(r=l)}n++,r++;let i=new Ml(r,n,0);for(let s=0,o=t.length;s=this._maxCharCode?0:this._states.get(t,n)}},kl=null;function ZD(){return kl===null&&(kl=new Pl([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),kl}var Ms=null;function e5(){if(Ms===null){Ms=new ks(0);let e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;ni);if(i>0){let a=n.charCodeAt(i-1),u=n.charCodeAt(o);(a===40&&u===41||a===91&&u===93||a===123&&u===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=ZD()){let r=e5(),i=[];for(let s=1,o=t.getLineCount();s<=o;s++){let a=t.getLineContent(s),u=a.length,l=0,c=0,f=0,h=1,m=!1,g=!1,v=!1,b=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}};var wp=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),ra;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Fi?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:bi.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:wp})})(ra||(ra={}));var Fi=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?wp:(this._emitter||(this._emitter=new dt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Ps=class{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Fi),this._token}cancel(){this._token?this._token instanceof Fi&&this._token.cancel():this._token=ra.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Fi&&this._token.dispose():this._token=ra.None}};var Bs=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},ia=new Bs,Vl=new Bs,Ul=new Bs,t5=new Array(230),n5={},r5=[],i5=Object.create(null),s5=Object.create(null),Lp=[],jl=[];for(let e=0;e<=193;e++)Lp[e]=-1;for(let e=0;e<=132;e++)jl[e]=-1;(function(){let t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(let i of t){let[s,o,a,u,l,c,f,h,m]=i;if(r[o]||(r[o]=!0,r5[o]=a,i5[a]=o,s5[a.toLowerCase()]=o,s&&(Lp[o]=u,u!==0&&u!==3&&u!==5&&u!==4&&u!==6&&u!==57&&(jl[u]=o))),!n[u]){if(n[u]=!0,!l)throw new Error(`String representation missing for key code ${u} around scan code ${a}`);ia.define(u,l),Vl.define(u,h||l),Ul.define(u,m||h||l)}c&&(t5[c]=u),f&&(n5[f]=u)}jl[3]=46})();var Cp;(function(e){function t(a){return ia.keyCodeToStr(a)}e.toString=t;function n(a){return ia.strToKeyCode(a)}e.fromString=n;function r(a){return Vl.keyCodeToStr(a)}e.toUserSettingsUS=r;function i(a){return Ul.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return Vl.strToKeyCode(a)||Ul.strToKeyCode(a)}e.fromUserSettings=s;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return ia.keyCodeToStr(a)}e.toElectronAccelerator=o})(Cp||(Cp={}));function Ip(e,t){let n=(t&65535)<<16>>>0;return(e|n)>>>0}var sa=class e extends le{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return e.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new e(this.startLineNumber,this.startColumn,t,n):new e(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new Te(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Te(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new e(t,n,this.endLineNumber,this.endColumn):new e(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new e(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new e(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){this._factories.get(t)?.dispose();let r=new Gl(this,t,n);return this._factories.set(t,r),pr(()=>{let i=this._factories.get(t);!i||i!==r||(this._factories.delete(t),i.dispose())})}async getOrCreate(t){let n=this.get(t);if(n)return n;let r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;let r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Gl=class extends en{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}};var oa=class{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var Mp;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Mp||(Mp={}));var Pp;(function(e){let t=new Map;t.set(0,re.symbolMethod),t.set(1,re.symbolFunction),t.set(2,re.symbolConstructor),t.set(3,re.symbolField),t.set(4,re.symbolVariable),t.set(5,re.symbolClass),t.set(6,re.symbolStruct),t.set(7,re.symbolInterface),t.set(8,re.symbolModule),t.set(9,re.symbolProperty),t.set(10,re.symbolEvent),t.set(11,re.symbolOperator),t.set(12,re.symbolUnit),t.set(13,re.symbolValue),t.set(15,re.symbolEnum),t.set(14,re.symbolConstant),t.set(15,re.symbolEnum),t.set(16,re.symbolEnumMember),t.set(17,re.symbolKeyword),t.set(27,re.symbolSnippet),t.set(18,re.symbolText),t.set(19,re.symbolColor),t.set(20,re.symbolFile),t.set(21,re.symbolReference),t.set(22,re.symbolCustomColor),t.set(23,re.symbolFolder),t.set(24,re.symbolTypeParameter),t.set(25,re.account),t.set(26,re.issues);function n(s){let o=t.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=re.symbolProperty),o}e.toIcon=n;let r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,o){let a=r.get(s);return typeof a>"u"&&!o&&(a=9),a}e.fromString=i})(Pp||(Pp={}));var Bp;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Bp||(Bp={}));var Vp;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(Vp||(Vp={}));var Up;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Up||(Up={}));var jp;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(jp||(jp={}));var Px={17:Ve("Array","array"),16:Ve("Boolean","boolean"),4:Ve("Class","class"),13:Ve("Constant","constant"),8:Ve("Constructor","constructor"),9:Ve("Enum","enumeration"),21:Ve("EnumMember","enumeration member"),23:Ve("Event","event"),7:Ve("Field","field"),0:Ve("File","file"),11:Ve("Function","function"),10:Ve("Interface","interface"),19:Ve("Key","key"),5:Ve("Method","method"),1:Ve("Module","module"),2:Ve("Namespace","namespace"),20:Ve("Null","null"),15:Ve("Number","number"),18:Ve("Object","object"),24:Ve("Operator","operator"),3:Ve("Package","package"),6:Ve("Property","property"),14:Ve("String","string"),22:Ve("Struct","struct"),25:Ve("TypeParameter","type parameter"),12:Ve("Variable","variable")};var Gp;(function(e){let t=new Map;t.set(0,re.symbolFile),t.set(1,re.symbolModule),t.set(2,re.symbolNamespace),t.set(3,re.symbolPackage),t.set(4,re.symbolClass),t.set(5,re.symbolMethod),t.set(6,re.symbolProperty),t.set(7,re.symbolField),t.set(8,re.symbolConstructor),t.set(9,re.symbolEnum),t.set(10,re.symbolInterface),t.set(11,re.symbolFunction),t.set(12,re.symbolVariable),t.set(13,re.symbolConstant),t.set(14,re.symbolString),t.set(15,re.symbolNumber),t.set(16,re.symbolBoolean),t.set(17,re.symbolArray),t.set(18,re.symbolObject),t.set(19,re.symbolKey),t.set(20,re.symbolNull),t.set(21,re.symbolEnumMember),t.set(22,re.symbolStruct),t.set(23,re.symbolEvent),t.set(24,re.symbolOperator),t.set(25,re.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=re.symbolProperty),i}e.toIcon=n})(Gp||(Gp={}));var qp=class e{static{this.Comment=new e("comment")}static{this.Imports=new e("imports")}static{this.Region=new e("region")}static fromValue(t){switch(t){case"comment":return e.Comment;case"imports":return e.Imports;case"region":return e.Region}return new e(t)}constructor(t){this.value=t}},$p;(function(e){e[e.AIGenerated=1]="AIGenerated"})($p||($p={}));var Hp;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Hp||(Hp={}));var Wp;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Wp||(Wp={}));var Qp;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Qp||(Qp={}));var Bx=new Vs,Vx=new Vs,zp;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(zp||(zp={}));var Yp;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Yp||(Yp={}));var Jp;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(Jp||(Jp={}));var Xp;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Xp||(Xp={}));var Kp;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(Kp||(Kp={}));var Zp;(function(e){e[e.Deprecated=1]="Deprecated"})(Zp||(Zp={}));var eh;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(eh||(eh={}));var th;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(th||(th={}));var nh;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(nh||(nh={}));var rh;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(rh||(rh={}));var ih;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(ih||(ih={}));var sh;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(sh||(sh={}));var oh;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(oh||(oh={}));var ah;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ah||(ah={}));var uh;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(uh||(uh={}));var lh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(lh||(lh={}));var ch;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(ch||(ch={}));var fh;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(fh||(fh={}));var ph;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(ph||(ph={}));var hh;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(hh||(hh={}));var dh;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(dh||(dh={}));var mh;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(mh||(mh={}));var aa;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(aa||(aa={}));var qn;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(qn||(qn={}));var ua;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(ua||(ua={}));var gh;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(gh||(gh={}));var vh;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(vh||(vh={}));var Dh;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Dh||(Dh={}));var yh;(function(e){e[e.AIGenerated=1]="AIGenerated"})(yh||(yh={}));var Eh;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Eh||(Eh={}));var bh;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(bh||(bh={}));var xh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(xh||(xh={}));var _h;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(_h||(_h={}));var Th;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(Th||(Th={}));var Nh;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(Nh||(Nh={}));var Sh;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Sh||(Sh={}));var Fh;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Fh||(Fh={}));var Ah;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Ah||(Ah={}));var la;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(la||(la={}));var wh;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(wh||(wh={}));var Ch;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Ch||(Ch={}));var Lh;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(Lh||(Lh={}));var Ih;(function(e){e[e.Deprecated=1]="Deprecated"})(Ih||(Ih={}));var Rh;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(Rh||(Rh={}));var Oh;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Oh||(Oh={}));var kh;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(kh||(kh={}));var Mh;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Mh||(Mh={}));var ql=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(t,n){return Ip(t,n)}};function Ph(){return{editor:void 0,languages:void 0,CancellationTokenSource:Ps,Emitter:dt,KeyCode:aa,KeyMod:ql,Position:Te,Range:le,Selection:sa,SelectionDirection:la,MarkerSeverity:qn,MarkerTag:ua,Uri:wt,Token:oa}}var Us=class e{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(t){return t.getChannel(e.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(e.CHANNEL_NAME,n)}};var Bh,Vh,$l=class{constructor(t,n){this.uri=t,this.value=n}};function u5(e){return Array.isArray(e)}var Uh=class e{static{this.defaultToKey=t=>t.toString()}constructor(t,n){if(this[Bh]="ResourceMap",t instanceof e)this.map=new Map(t.map),this.toKey=n??e.defaultToKey;else if(u5(t)){this.map=new Map,this.toKey=n??e.defaultToKey;for(let[r,i]of t)this.set(r,i)}else this.map=new Map,this.toKey=t??e.defaultToKey}set(t,n){return this.map.set(this.toKey(t),new $l(t,n)),this}get(t){return this.map.get(this.toKey(t))?.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,n){typeof n<"u"&&(t=t.bind(n));for(let[r,i]of this.map)t(i.value,i.uri,this)}*values(){for(let t of this.map.values())yield t.value}*keys(){for(let t of this.map.values())yield t.uri}*entries(){for(let t of this.map.values())yield[t.uri,t.value]}*[(Bh=Symbol.toStringTag,Symbol.iterator)](){for(let[,t]of this.map)yield[t.uri,t.value]}},Hl=class{constructor(){this[Vh]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,n=0){let r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(Vh=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}},Wl=class extends Hl{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},ca=class extends Wl{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}};var fa=class{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){let r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){let r=this.map.get(t);r&&r.forEach(n)}get(t){let n=this.map.get(t);return n||new Set}};var e_=new ca(10);function l5(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function Ql(e){let t=[];for(let n of l5(e))typeof e[n]=="function"&&t.push(n);return t}function jh(e,t){let n=i=>function(){let s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(let i of e)r[i]=n(i);return r}var Gh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Gh||(Gh={}));var qh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(qh||(qh={}));var $h;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})($h||($h={}));function c5(e,t,n,r,i){if(r===0)return!0;let s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r);if(e.get(o)!==0)return!0}return!1}function f5(e,t,n,r,i){if(r+i===n)return!0;let s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r+i-1);if(e.get(o)!==0)return!0}return!1}function p5(e,t,n,r,i){return c5(e,t,n,r,i)&&f5(e,t,n,r,i)}var pa=class{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){let n=t.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;let i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){up(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||p5(this._wordSeparators,t,n,i,s))return r}while(r);return null}};function Hh(e,t="Unreachable"){throw new Error(t)}function jr(e){if(!e()){debugger;e(),Vn(new lt("Assertion Failed"))}}function js(e,t){let n=0;for(;n/?";function d5(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let n of h5)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var zl=d5();function Yl(e){let t=zl;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var Wh=new Fs;Wh.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Gs(e,t,n,r,i){if(t=Yl(t),i||(i=vi.first(Wh)),n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),Gs(e,t,n,r,i)}let s=Date.now(),o=e-1-r,a=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){let c=o-i.windowSize*l;t.lastIndex=Math.max(0,c);let f=m5(t,n,o,a);if(!f&&u||(u=f,c<=0))break;a=c}if(u){let l={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function m5(e,t,n,r){let i;for(;i=e.exec(t);){let s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var ha=class{static computeUnicodeHighlights(t,n,r){let i=r?r.startLineNumber:1,s=r?r.endLineNumber:t.getLineCount(),o=new da(n),a=o.getCandidateCodePoints(),u;a==="allNonBasicAscii"?u=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):u=new RegExp(`${g5(Array.from(a))}`,"g");let l=new pa(null,u),c=[],f=!1,h,m=0,g=0,v=0;e:for(let b=i,E=s;b<=E;b++){let A=t.getLineContent(b),C=A.length;l.reset(0);do if(h=l.next(A),h){let w=h.index,F=h.index+h[0].length;if(w>0){let W=A.charCodeAt(w-1);Ni(W)&&w--}if(F+1=1e3){f=!0;break e}c.push(new le(b,w+1,b,F+1))}}while(h)}return{ranges:c,hasMore:f,ambiguousCharacterCount:m,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:v}}static computeUnicodeHighlightReason(t,n){let r=new da(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{let s=t.codePointAt(0),o=r.ambiguousCharacters.getPrimaryConfusable(s),a=_i.getLocales().filter(u=>!_i.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function g5(e,t){return`[${ip(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var da=class{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=_i.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let t=new Set;if(this.options.invisibleCharacters)for(let n of Ti.codePoints)Qh(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(let n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){let r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(let o of n){let a=o.codePointAt(0),u=lp(o);i=i||u,!u&&!this.ambiguousCharacters.isAmbiguous(a)&&!Ti.isInvisibleCharacter(a)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Qh(t)&&Ti.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function Qh(e){return e===" "||e===` -`||e===" "}var Er=class{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}},ma=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};var be=class e{static addRange(t,n){let r=0;for(;rn))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new lt(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new lt(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new lt(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new lt(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=Gr(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){let i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{let i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){let n=$n(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){let n=$n(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;let n=[],r=0,i=0,s=null;for(;r=o.startLineNumber?s=new De(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new e(n)}subtractFrom(t){let n=ga(this._normalizedRanges,o=>o.endLineNumberExclusive>=t.startLineNumber),r=Gr(this._normalizedRanges,o=>o.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new e([t]);let i=[],s=t.startLineNumber;for(let o=n;os&&i.push(new De(s,a.startLineNumber)),s=a.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){let n=[],r=0,i=0;for(;rn.delta(t)))}};var va=class e{static{this.zero=new e(0,0)}static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new e(0,n.column-t.column):new e(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return e.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(let i of t)i===` -`?(n++,r=0):r++;return new e(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new le(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new le(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new Te(t.lineNumber,t.column+this.columnCount):new Te(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var Da=class{constructor(t,n){this.range=t,this.text=n}toSingleEditOperation(){return{range:this.range,text:this.text}}};var Tn=class e{static inverse(t,n,r){let i=[],s=1,o=1;for(let u of t){let l=new e(new De(s,u.original.startLineNumber),new De(o,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}let a=new e(new De(s,n+1),new De(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(t,n,r){let i=[];for(let s of t){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new e(o,a))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new qt(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new lt("not a valid diff");return new qt(new le(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new le(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new qt(new le(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new le(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Yh(this.original.endLineNumberExclusive,t)&&Yh(this.modified.endLineNumberExclusive,n))return new qt(new le(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new le(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new qt(le.fromPositions(new Te(this.original.startLineNumber,1),Ai(new Te(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),le.fromPositions(new Te(this.modified.startLineNumber,1),Ai(new Te(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new qt(le.fromPositions(Ai(new Te(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Ai(new Te(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),le.fromPositions(Ai(new Te(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Ai(new Te(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new lt}};function Ai(e,t){if(e.lineNumber<1)return new Te(1,1);if(e.lineNumber>t.length)return new Te(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new Te(e.lineNumber,n.length+1):e}function Yh(e,t){return e>=1&&e<=t.length}var Hn=class e extends Tn{static fromRangeMappings(t){let n=De.join(t.map(i=>De.fromRangeInclusive(i.originalRange))),r=De.join(t.map(i=>De.fromRangeInclusive(i.modifiedRange)));return new e(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},qt=class e{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let n=t.getValueOfRange(this.modifiedRange);return new Da(this.originalRange,n)}};var v5=3,ya=class{computeDiff(t,n,r){let s=new Xl(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[],a=null;for(let u of s.changes){let l;u.originalEndLineNumber===0?l=new De(u.originalStartLineNumber+1,u.originalStartLineNumber+1):l=new De(u.originalStartLineNumber,u.originalEndLineNumber+1);let c;u.modifiedEndLineNumber===0?c=new De(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):c=new De(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let f=new Hn(l,c,u.charChanges?.map(h=>new qt(new le(h.originalStartLineNumber,h.originalStartColumn,h.originalEndLineNumber,h.originalEndColumn),new le(h.modifiedStartLineNumber,h.modifiedStartColumn,h.modifiedEndLineNumber,h.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===f.modified.startLineNumber||a.original.endLineNumberExclusive===f.original.startLineNumber)&&(f=new Hn(a.original.join(f.original),a.modified.join(f.modified),a.innerChanges&&f.innerChanges?a.innerChanges.concat(f.innerChanges):void 0),o.pop()),o.push(f),a=f}return jr(()=>js(o,(u,l)=>l.original.startLineNumber-u.original.endLineNumberExclusive===l.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}},wi=class e{constructor(t,n,r,i,s,o,a,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){let i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),a=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new e(i,s,o,a,u,l,c,f)}};function D5(e){if(e.length<=1)return e;let t=[e[0]],n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){let m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let v=Xh(m,g,s,!0).changes;a&&(v=D5(v)),h=[];for(let b=0,E=v.length;b1&&v>1;){let b=h.charCodeAt(g-2),E=m.charCodeAt(v-2);if(b!==E)break;g--,v--}(g>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,o+1,1,v)}{let g=Zl(h,1),v=Zl(m,1),b=h.length+1,E=m.length+1;for(;g!0;let t=Date.now();return()=>Date.now()-tr===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(ec||(ec={}));function Hs(e,t){return(n,r)=>t(e(n),e(r))}var Ws=(e,t)=>e-t;function id(e){return(t,n)=>-e(t,n)}var Kh=class e{static{this.empty=new e(t=>{})}constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new e(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||ec.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}};var Sn=class e{static trivial(t,n){return new e([new je(be.ofLength(t.length),be.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new e([new je(be.ofLength(t.length),be.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}},je=class e{static invert(t,n){let r=[];return td(t,(i,s)=>{r.push(e.fromOffsetPairs(i?i.getEndExclusives():Nn.zero,s?s.getStarts():new Nn(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new e(new be(t.offset1,n.offset1),new be(t.offset2,n.offset2))}static assertSorted(t){let n;for(let r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new lt("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new e(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){let n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new e(n,r)}getStarts(){return new Nn(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Nn(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Nn=class e{static{this.zero=new e(0,0)}static{this.max=new e(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new e(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},br=class e{static{this.instance=new e}isValid(){return!0}},ba=class{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new lt("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&v>0&&o.get(g-1,v-1)===3&&(A+=a.get(g-1,v-1)),A+=i?i(g,v):1):A=-1;let C=Math.max(b,E,A);if(C===A){let w=g>0&&v>0?a.get(g-1,v-1):0;a.set(g,v,w+1),o.set(g,v,3)}else C===b?(a.set(g,v,0),o.set(g,v,1)):C===E&&(a.set(g,v,0),o.set(g,v,2));s.set(g,v,C)}let u=[],l=t.length,c=n.length;function f(g,v){(g+1!==l||v+1!==c)&&u.push(new je(new be(g+1,l),new be(v+1,c))),l=g,c=v}let h=t.length-1,m=n.length-1;for(;h>=0&&m>=0;)o.get(h,m)===3?(f(h,m),h--,m--):o.get(h,m)===1?h--:m--;return f(-1,-1),u.reverse(),new Sn(u,!1)}};var Li=class{compute(t,n,r=br.instance){if(t.length===0||n.length===0)return Sn.trivial(t,n);let i=t,s=n;function o(v,b){for(;vi.length||F>s.length)continue;let O=o(w,F);u.set(c,O);let L=w===A?l.get(c+1):l.get(c-1);if(l.set(c,O!==w?new _a(L,w,F,O-w):L),u.get(c)===i.length&&u.get(c)-c===s.length)break e}}let f=l.get(c),h=[],m=i.length,g=s.length;for(;;){let v=f?f.x+f.length:0,b=f?f.y+f.length:0;if((v!==m||b!==g)&&h.push(new je(new be(v,m),new be(b,g))),!f)break;m=f.x,g=f.y,f=f.prev}return h.reverse(),new Sn(h,!1)}},_a=class{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}},tc=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}},nc=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var xr=class{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=t[i-1],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,s=s.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!r){let l=s.trimStart();a=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,s.length):s.length;for(let l=0;lString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=od(t>0?this.elements[t-1]:-1),r=od(ts<=t),i=t-this.firstElementOffsetByLineIdx[r];return new Te(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){let n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?le.fromPositions(r,r):le.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!rc(this.elements[t]))return;let n=t;for(;n>0&&rc(this.elements[n-1]);)n--;let r=t;for(;ri<=t.start)??0,r=zh(this.firstElementOffsetByLineIdx,i=>t.endExclusive<=i)??this.elements.length;return new be(n,r)}};function rc(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var y5={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function sd(e){return y5[e]}function od(e){return e===10?8:e===13?7:zs(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function ud(e,t,n,r,i,s){let{moves:o,excludedChanges:a}=b5(e,t,n,s);if(!s.isValid())return[];let u=e.filter(c=>!a.has(c)),l=x5(u,r,i,t,n,s);return rd(o,l),o=_5(o),o=o.filter(c=>{let f=c.original.toOffsetRange().slice(t).map(m=>m.trim());return f.join(` -`).length>=15&&E5(f,m=>m.length>=2)>=2}),o=T5(e,o),o}function E5(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function b5(e,t,n,r){let i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Qs(u.original,t,u)),o=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Qs(u.modified,n,u))),a=new Set;for(let u of s){let l=-1,c;for(let f of o){let h=u.computeSimilarity(f);h>l&&(l=h,c=f)}if(l>.9&&c&&(o.delete(c),i.push(new Tn(u.range,c.range)),a.add(u.source),a.add(c.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function x5(e,t,n,r,i,s){let o=[],a=new fa;for(let h of e)for(let m=h.original.startLineNumber;mh.modified.startLineNumber,Ws));for(let h of e){let m=[];for(let g=h.modified.startLineNumber;g{for(let w of m)if(w.originalLineRange.endLineNumberExclusive+1===A.endLineNumberExclusive&&w.modifiedLineRange.endLineNumberExclusive+1===b.endLineNumberExclusive){w.originalLineRange=new De(w.originalLineRange.startLineNumber,A.endLineNumberExclusive),w.modifiedLineRange=new De(w.modifiedLineRange.startLineNumber,b.endLineNumberExclusive),E.push(w);return}let C={modifiedLineRange:b,originalLineRange:A};u.push(C),E.push(C)}),m=E}if(!s.isValid())return[]}u.sort(id(Hs(h=>h.modifiedLineRange.length,Ws)));let l=new qr,c=new qr;for(let h of u){let m=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,g=l.subtractFrom(h.modifiedLineRange),v=c.subtractFrom(h.originalLineRange).getWithDelta(m),b=g.getIntersection(v);for(let E of b.ranges){if(E.length<3)continue;let A=E,C=E.delta(-m);o.push(new Tn(C,A)),l.addRange(A),c.addRange(C)}}o.sort(Hs(h=>h.original.startLineNumber,Ws));let f=new qs(e);for(let h=0;hO.original.startLineNumber<=m.original.startLineNumber),v=$n(e,O=>O.modified.startLineNumber<=m.modified.startLineNumber),b=Math.max(m.original.startLineNumber-g.original.startLineNumber,m.modified.startLineNumber-v.modified.startLineNumber),E=f.findLastMonotonous(O=>O.original.startLineNumberO.modified.startLineNumberr.length||L>i.length||l.contains(L)||c.contains(O)||!ad(r[O-1],i[L-1],s))break}w>0&&(c.addRange(new De(m.original.startLineNumber-w,m.original.startLineNumber)),l.addRange(new De(m.modified.startLineNumber-w,m.modified.startLineNumber)));let F;for(F=0;Fr.length||L>i.length||l.contains(L)||c.contains(O)||!ad(r[O-1],i[L-1],s))break}F>0&&(c.addRange(new De(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+F)),l.addRange(new De(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+F))),(w>0||F>0)&&(o[h]=new Tn(new De(m.original.startLineNumber-w,m.original.endLineNumberExclusive+F),new De(m.modified.startLineNumber-w,m.modified.endLineNumberExclusive+F)))}return o}function ad(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let i=new Li().compute(new xr([e],new le(1,1,1,e.length),!1),new xr([t],new le(1,1,1,t.length),!1),n),s=0,o=je.invert(i.diffs,e.length);for(let c of o)c.seq1Range.forEach(f=>{zs(e.charCodeAt(f))||s++});function a(c){let f=0;for(let h=0;ht.length?e:t);return s/u>.6&&u>10}function _5(e){if(e.length===0)return e;e.sort(Hs(n=>n.original.startLineNumber,Ws));let t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function T5(e,t){let n=new qs(e);return t=t.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(l))}i.push(a)}return r.length>0&&i.push(r[r.length-1]),i}function N5(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&e.seq2Range.start-o>=i.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let a=0;for(;e.seq1Range.start+al&&(l=g,u=c)}return e.delta(u)}function fd(e,t,n){let r=[];for(let i of n){let s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new je(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function pd(e,t,n){let r=je.invert(n,e.length),i=[],s=new Nn(0,0);function o(u,l){if(u.offset10;){let b=r[0];if(!(b.seq1Range.intersects(h.seq1Range)||b.seq2Range.intersects(h.seq2Range)))break;let A=e.findWordContaining(b.seq1Range.start),C=t.findWordContaining(b.seq2Range.start),w=new je(A,C),F=w.intersect(b);if(g+=F.seq1Range.length,v+=F.seq2Range.length,h=h.join(w),h.seq1Range.endExclusive>=b.seq1Range.endExclusive)r.shift();else break}g+v<(h.seq1Range.length+h.seq2Range.length)*2/3&&i.push(h),s=h.getEndExclusives()}for(;r.length>0;){let u=r.shift();u.seq1Range.isEmpty||(o(u.getStarts(),u),o(u.getEndExclusives().delta(-1),u))}return S5(n,i)}function S5(e,t){let n=[];for(;e.length>0||t.length>0;){let r=e[0],i=t[0],s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function hd(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let o=[r[0]];for(let a=1;a5||m.seq1Range.length+m.seq2Range.length>5)},u=r[a],l=o[o.length-1];c(l,u)?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(i++<10&&s);return r}function dd(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let a=[r[0]];for(let u=1;u5||v.length>500)return!1;let E=e.getText(v).trim();if(E.length>20||E.split(/\r\n|\r|\n/).length>1)return!1;let A=e.countLinesIn(m.seq1Range),C=m.seq1Range.length,w=t.countLinesIn(m.seq2Range),F=m.seq2Range.length,O=e.countLinesIn(g.seq1Range),L=g.seq1Range.length,P=t.countLinesIn(g.seq2Range),W=g.seq2Range.length,k=130;function $(I){return Math.min(I,k)}return Math.pow(Math.pow($(A*40+C),1.5)+Math.pow($(w*40+F),1.5),1.5)+Math.pow(Math.pow($(O*40+L),1.5)+Math.pow($(P*40+W),1.5),1.5)>(k**1.5)**1.5*1.3},l=r[u],c=a[a.length-1];f(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);let o=[];return nd(r,(a,u,l)=>{let c=u;function f(E){return E.length>0&&E.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}let h=e.extendToFullLines(u.seq1Range),m=e.getText(new be(h.start,u.seq1Range.start));f(m)&&(c=c.deltaStart(-m.length));let g=e.getText(new be(u.seq1Range.endExclusive,h.endExclusive));f(g)&&(c=c.deltaEnd(g.length));let v=je.fromOffsetPairs(a?a.getEndExclusives():Nn.zero,l?l.getStarts():Nn.max),b=c.intersect(v);o.length>0&&b.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(b):o.push(b)}),o}var Ys=class{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){let n=t===0?0:md(this.lines[t-1]),r=t===this.lines.length?0:md(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` -`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function md(e){let t=0;for(;tF===O))return new Er([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Er([new Hn(new De(1,t.length+1),new De(1,n.length+1),[new qt(new le(1,1,t.length,t[t.length-1].length+1),new le(1,1,n.length,n[n.length-1].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?br.instance:new ba(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(F){let O=o.get(F);return O===void 0&&(O=o.size,o.set(F,O)),O}let u=t.map(F=>a(F.trim())),l=n.map(F=>a(F.trim())),c=new Ys(u,t),f=new Ys(l,n),h=c.length+f.length<1700?this.dynamicProgrammingDiffing.compute(c,f,i,(F,O)=>t[F]===n[O]?n[O].length===0?.1:1+Math.log(1+n[O].length):.99):this.myersDiffingAlgorithm.compute(c,f,i),m=h.diffs,g=h.hitTimeout;m=ic(c,f,m),m=hd(c,f,m);let v=[],b=F=>{if(s)for(let O=0;OF.seq1Range.start-E===F.seq2Range.start-A);let O=F.seq1Range.start-E;b(O),E=F.seq1Range.endExclusive,A=F.seq2Range.endExclusive;let L=this.refineDiff(t,n,F,i,s);L.hitTimeout&&(g=!0);for(let P of L.mappings)v.push(P)}b(t.length-E);let C=gd(v,t,n),w=[];return r.computeMoves&&(w=this.computeMoves(C,t,n,u,l,i,s)),jr(()=>{function F(L,P){if(L.lineNumber<1||L.lineNumber>P.length)return!1;let W=P[L.lineNumber-1];return!(L.column<1||L.column>W.length+1)}function O(L,P){return!(L.startLineNumber<1||L.startLineNumber>P.length+1||L.endLineNumberExclusive<1||L.endLineNumberExclusive>P.length+1)}for(let L of C){if(!L.innerChanges)return!1;for(let P of L.innerChanges)if(!(F(P.modifiedRange.getStartPosition(),n)&&F(P.modifiedRange.getEndPosition(),n)&&F(P.originalRange.getStartPosition(),t)&&F(P.originalRange.getEndPosition(),t)))return!1;if(!O(L.modified,n)||!O(L.original,t))return!1}return!0}),new Er(C,w,g)}computeMoves(t,n,r,i,s,o,a){return ud(t,n,r,i,s,o).map(c=>{let f=this.refineDiff(n,r,new je(c.original.toOffsetRange(),c.modified.toOffsetRange()),o,a),h=gd(f.mappings,n,r,!0);return new ma(c,h)})}refineDiff(t,n,r,i,s){let a=A5(r).toRangeMapping2(t,n),u=new xr(t,a.originalRange,s),l=new xr(n,a.modifiedRange,s),c=u.length+l.length<500?this.dynamicProgrammingDiffing.compute(u,l,i):this.myersDiffingAlgorithm.compute(u,l,i),f=!1,h=c.diffs;f&&je.assertSorted(h),h=ic(u,l,h),f&&je.assertSorted(h),h=pd(u,l,h),f&&je.assertSorted(h),h=fd(u,l,h),f&&je.assertSorted(h),h=dd(u,l,h),f&&je.assertSorted(h);let m=h.map(g=>new qt(u.translateRange(g.seq1Range),l.translateRange(g.seq2Range)));return f&&qt.assertSorted(m),{mappings:m,hitTimeout:c.hitTimeout}}};function gd(e,t,n,r=!1){let i=[];for(let s of ed(e.map(o=>F5(o,t,n)),(o,a)=>o.original.overlapOrTouch(a.original)||o.modified.overlapOrTouch(a.modified))){let o=s[0],a=s[s.length-1];i.push(new Hn(o.original.join(a.original),o.modified.join(a.modified),s.map(u=>u.innerChanges[0])))}return jr(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:js(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);let s=new De(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new De(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Hn(s,o,[e])}function A5(e){return new Tn(new De(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new De(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var sc={getLegacy:()=>new ya,getDefault:()=>new Ta};function _r(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var nt=class{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=_r(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},Fn=class e{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=_r(Math.max(Math.min(1,n),0),3),this.l=_r(Math.max(Math.min(1,r),0),3),this.a=_r(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,o=Math.max(n,r,i),a=Math.min(n,r,i),u=0,l=0,c=(a+o)/2,f=o-a;if(f>0){switch(l=Math.min(c<=.5?f/(2*c):f/(2-2*c),1),o){case n:u=(r-i)/f+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){let n=t.h/360,{s:r,l:i,a:s}=t,o,a,u;if(r===0)o=a=u=i;else{let l=i<.5?i*(1+r):i+r-i*r,c=2*i-l;o=e._hue2rgb(c,l,n+1/3),a=e._hue2rgb(c,l,n),u=e._hue2rgb(c,l,n-1/3)}return new nt(Math.round(o*255),Math.round(a*255),Math.round(u*255),s)}},Ii=class e{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=_r(Math.max(Math.min(1,n),0),3),this.v=_r(Math.max(Math.min(1,r),0),3),this.a=_r(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,u=s===0?0:a/s,l;return a===0?l=0:s===n?l=((r-i)/a%6+6)%6:s===r?l=(i-n)/a+2:l=(n-r)/a+4,new e(Math.round(l*60),u,s,t.a)}static toRGBA(t){let{h:n,s:r,v:i,a:s}=t,o=i*r,a=o*(1-Math.abs(n/60%2-1)),u=i-o,[l,c,f]=[0,0,0];return n<60?(l=o,c=a):n<120?(l=a,c=o):n<180?(c=o,f=a):n<240?(c=a,f=o):n<300?(l=a,f=o):n<=360&&(l=o,f=a),l=Math.round((l+u)*255),c=Math.round((c+u)*255),f=Math.round((f+u)*255),new nt(l,c,f,s)}},$r=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Fn.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Ii.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof nt)this.rgba=t;else if(t instanceof Fn)this._hsla=t,this.rgba=Fn.toRGBA(t);else if(t instanceof Ii)this._hsva=t,this.rgba=Ii.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&nt.equals(this.rgba,t.rgba)&&Fn.equals(this.hsla,t.hsla)&&Ii.equals(this.hsva,t.hsva)}getRelativeLuminance(){let t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),r=e._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return _r(i,4)}static _relativeLuminanceForComponent(t){let n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(let i of r){let s=i.filter(l=>l!==void 0),o=s[1],a=s[2];if(!a)continue;let u;if(o==="rgb"){let l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=vd(Js(e,i),Xs(a,l),!1)}else if(o==="rgba"){let l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=vd(Js(e,i),Xs(a,l),!0)}else if(o==="hsl"){let l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=Dd(Js(e,i),Xs(a,l),!1)}else if(o==="hsla"){let l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Dd(Js(e,i),Xs(a,l),!0)}else o==="#"&&(u=w5(Js(e,i),o+a));u&&t.push(u)}return t}function Ed(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:C5(e)}var bd=new RegExp("\\bMARK:\\s*(.*)$","d"),L5=/^-+|-+$/g;function xd(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){let r=I5(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){let r=R5(e);n=n.concat(r)}return n}function I5(e,t){let n=[],r=e.getLineCount();for(let i=1;i<=r;i++){let s=e.getLineContent(i),o=s.match(t.foldingRules.markers.start);if(o){let a={startLineNumber:i,startColumn:o[0].length+1,endLineNumber:i,endColumn:s.length+1};if(a.endColumn>a.startColumn){let u={range:a,..._d(s.substring(o[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function R5(e){let t=[],n=e.getLineCount();for(let r=1;r<=n;r++){let i=e.getLineContent(r);O5(i,r,t)}return t}function O5(e,t,n){bd.lastIndex=0;let r=bd.exec(e);if(r){let i=r.indices[1][0]+1,s=r.indices[1][1]+1,o={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(o.endColumn>o.startColumn){let a={range:o,..._d(r[1]),shouldBeInComments:!0};(a.text||a.hasSeparatorLine)&&n.push(a)}}}function _d(e){e=e.trim();let t=e.startsWith("-");return e=e.replace(L5,""),{text:e,hasSeparatorLine:t}}var k5,ac;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?ac=(e,t)=>{np(()=>{if(n)return;let r=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,r-Date.now())}}))});let n=!1;return{dispose(){n||(n=!0)}}}:ac=(e,t,n)=>{let r=e.requestIdleCallback(t,typeof n=="number"?{timeout:n}:void 0),i=!1;return{dispose(){i||(i=!0,e.cancelIdleCallback(r))}}},k5=e=>ac(globalThis,e)})();var Td;(function(e){async function t(r){let i,s=await Promise.all(r.map(o=>o.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(o){s(o)}})}e.withAsyncBody=n})(Td||(Td={}));var Nd=class e{static fromArray(t){return new e(n=>{n.emitMany(t)})}static fromPromise(t){return new e(async n=>{n.emitMany(await t)})}static fromPromises(t){return new e(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new e(async n=>{await Promise.all(t.map(async r=>{for await(let i of r)n.emitOne(i)}))})}static{this.EMPTY=e.fromArray([])}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new dt,queueMicrotask(async()=>{let r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async r=>{for await(let i of t)r.emitOne(n(i))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async r=>{for await(let i of t)n(i)&&r.emitOne(i)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,n=>!!n)}coalesce(){return e.coalesce(this)}static async toPromise(t){let n=[];for await(let r of t)n.push(r);return n}toPromise(){return e.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};var Na=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Ur(t);let r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=Ur(t),n=Ur(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;let s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Ur(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],o=s-this.values[i],t=s)n=i+1;else break;return new uc(i,t-o)}};var uc=class{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}};var Sa=class{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);let n=t.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new Te(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;it.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new lc(wt.parse(t.url),t.lines,t.EOL,t.versionId)}$acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}$acceptRemovedModel(t){this._models[t]&&delete this._models[t]}},lc=class extends Sa{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:t}};var M5=!0,cc=class{constructor(){this._workerTextModelSyncServer=new Fa}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){let i=this._getModel(t);return i?ha.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){let r=this._getModel(t);return r?xd(r,n):[]}async $computeDiff(t,n,r,i){let s=this._getModel(t),o=this._getModel(n);return!s||!o?null:Hr.computeDiff(s,o,r,i)}static computeDiff(t,n,r,i){let s=i==="advanced"?sc.getDefault():sc.getLegacy(),o=t.getLinesContent(),a=n.getLinesContent(),u=s.computeDiff(o,a,r),l=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function c(f){return f.map(h=>[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,h.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:l,quitEarly:u.hitTimeout,changes:c(u.changes),moves:u.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,c(f.changes)])}}static _modelsAreIdentical(t,n){let r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){let o=t.getLineContent(s),a=n.getLineContent(s);if(o!==a)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let s=[],o;n=n.slice(0).sort((u,l)=>{if(u.range&&l.range)return le.compareRangesUsingStarts(u.range,l.range);let c=u.range?0:1,f=l.range?0:1;return c-f});let a=0;for(let u=1;uHr._diffLimit){s.push({range:u,text:l});continue}let h=Fp(f,l,r),m=i.offsetAt(le.lift(u).getStartPosition());for(let g of h){let v=i.positionAt(m+g.originalStart),b=i.positionAt(m+g.originalStart+g.originalLength),E={text:l.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:v.lineNumber,startColumn:v.column,endLineNumber:b.lineNumber,endColumn:b.column}};i.getValueInRange(E.range)!==E.text&&s.push(E)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){let n=this._getModel(t);return n?Ap(n):null}async $computeDefaultDocumentColors(t){let n=this._getModel(t);return n?Ed(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){let s=new yi,o=new RegExp(r,i),a=new Set;e:for(let u of t){let l=this._getModel(u);if(l){for(let c of l.words(o))if(!(c===n||!isNaN(Number(c)))&&(a.add(c),a.size>Hr._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){let s=this._getModel(t);if(!s)return Object.create(null);let o=new RegExp(r,i),a=Object.create(null);for(let u=n.startLineNumber;uthis._host.$fhr(a,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve(Ql(this._foreignModule))):new Promise((a,u)=>{let l=c=>{this._foreignModule=c.create(o,n),a(Ql(this._foreignModule))};M5?import(`${Xo.asBrowserUri(`${t}.js`).toString(!0)}`).then(l).catch(u):H1([`${t}`],l,u)})}$fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}};typeof importScripts=="function"&&(globalThis.monaco=Ph());var fc=!1;function pc(e){if(fc)return;fc=!0;let t=new Zo(n=>{globalThis.postMessage(n)},n=>new Hr(Us.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{fc||pc(null)};function fe(e,t){var n=!!e;if(!n)throw new Error(t)}function Aa(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(n){return typeof n}:Aa=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Aa(e)}function xt(e){return Aa(e)=="object"&&e!==null}var wa=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",lS=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator",_t=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function Ri(e,t){for(var n=/\r\n|[\n\r]/g,r=1,i=t+1,s;(s=n.exec(e.body))&&s.index120){for(var h=Math.floor(u/80),m=u%80,g=[],v=0;v"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function $5(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Zs(e,t){return Zs=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Zs(e,t)}function eo(e){return eo=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},eo(e)}var M=(function(e){G5(n,e);var t=q5(n);function n(r,i,s,o,a,u,l){var c,f,h,m;U5(this,n),m=t.call(this,r),m.name="GraphQLError",m.originalError=u??void 0,m.nodes=wd(Array.isArray(i)?i:i?[i]:void 0);for(var g=[],v=0,b=(E=m.nodes)!==null&&E!==void 0?E:[];v0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?(Object.defineProperty(Ks(m),"stack",{value:u.stack,writable:!0,configurable:!0}),Cd(m)):(Error.captureStackTrace?Error.captureStackTrace(Ks(m),n):Object.defineProperty(Ks(m),"stack",{value:Error().stack,writable:!0,configurable:!0}),m)}return j5(n,[{key:"toString",value:function(){return mc(this)}},{key:"toJSON",value:function(){return Id(this)}},{key:_t,get:function(){return"Object"}}]),n})(dc(Error));function wd(e){return e===void 0||e.length===0?void 0:e}function mc(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n0?{message:n,locations:r,path:i,extensions:s}:{message:n,locations:r,path:i}}function Ct(e,t,n){return new M("Syntax Error: ".concat(n),void 0,e,[t])}var x=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function Ge(e,t){var n=!!e;if(!n)throw new Error(t??"Unexpected invariant triggered.")}var H5=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,to=H5;function Mt(e){var t=e.prototype.toJSON;typeof t=="function"||Ge(0),e.prototype.inspect=t,to&&(e.prototype[to]=t)}var Oa=(function(){function e(n,r,i){this.start=n.start,this.end=r.end,this.startToken=n,this.endToken=r,this.source=i}var t=e.prototype;return t.toJSON=function(){return{start:this.start,end:this.end}},e})();Mt(Oa);var ze=(function(){function e(n,r,i,s,o,a,u){this.kind=n,this.start=r,this.end=i,this.line=s,this.column=o,this.value=u,this.prev=a,this.next=null}var t=e.prototype;return t.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e})();Mt(ze);function no(e){return e!=null&&typeof e.kind=="string"}var j=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function ka(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ka=function(n){return typeof n}:ka=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ka(e)}var W5=10,Rd=2;function G(e){return Ma(e,[])}function Ma(e,t){switch(ka(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":Q5(e,t);default:return String(e)}}function Q5(e,t){if(t.indexOf(e)!==-1)return"[Circular]";var n=[].concat(t,[e]),r=J5(e);if(r!==void 0){var i=r.call(e);if(i!==e)return typeof i=="string"?i:Ma(i,n)}else if(Array.isArray(e))return Y5(e,n);return z5(e,n)}function z5(e,t){var n=Object.keys(e);if(n.length===0)return"{}";if(t.length>Rd)return"["+X5(e)+"]";var r=n.map(function(i){var s=Ma(e[i],t);return i+": "+s});return"{ "+r.join(", ")+" }"}function Y5(e,t){if(e.length===0)return"[]";if(t.length>Rd)return"[Array]";for(var n=Math.min(W5,e.length),r=e.length-n,i=[],s=0;s1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function J5(e){var t=e[String(to)];if(typeof t=="function")return t;if(typeof e.inspect=="function")return e.inspect}function X5(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){var n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Pt=function(t,n){return t instanceof n};function Od(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof t=="string"||fe(0,"Body must be a string. Received: ".concat(G(t),".")),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||fe(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||fe(0,"column in locationOffset is 1-indexed and must be positive.")}return K5(e,[{key:_t,get:function(){return"Source"}}]),e})();function kd(e){return Pt(e,Pa)}var K=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Ba(e){var t=e.split(/\r\n|[\n\r]/g),n=Z5(e);if(n!==0)for(var r=1;ri&&Md(t[s-1]);)--s;return t.slice(i,s).join(` -`)}function Md(e){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=e.indexOf(` -`)===-1,i=e[0]===" "||e[0]===" ",s=e[e.length-1]==='"',o=e[e.length-1]==="\\",a=!r||s||o||n,u="";return a&&!(r&&i)&&(u+=` -`+t),u+=t?e.replace(/\n/g,` -`+t):e,a&&(u+=` -`),'"""'+u.replace(/"""/g,'\\"""')+'"""'}var vc=(function(){function e(n){var r=new ze(j.SOF,0,0,0,0,null);this.source=n,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){this.lastToken=this.token;var r=this.token=this.lookahead();return r},t.lookahead=function(){var r=this.token;if(r.kind!==j.EOF)do{var i;r=(i=r.next)!==null&&i!==void 0?i:r.next=e7(this,r)}while(r.kind===j.COMMENT);return r},e})();function Bd(e){return e===j.BANG||e===j.DOLLAR||e===j.AMP||e===j.PAREN_L||e===j.PAREN_R||e===j.SPREAD||e===j.COLON||e===j.EQUALS||e===j.AT||e===j.BRACKET_L||e===j.BRACKET_R||e===j.BRACE_L||e===j.PIPE||e===j.BRACE_R}function Wr(e){return isNaN(e)?j.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function e7(e,t){for(var n=e.source,r=n.body,i=r.length,s=t.end;s31||o===9));return new ze(j.COMMENT,t,a,n,r,i,s.slice(t+1,a))}function r7(e,t,n,r,i,s){var o=e.body,a=n,u=t,l=!1;if(a===45&&(a=o.charCodeAt(++u)),a===48){if(a=o.charCodeAt(++u),a>=48&&a<=57)throw Ct(e,u,"Invalid number, unexpected digit after 0: ".concat(Wr(a),"."))}else u=gc(e,u,a),a=o.charCodeAt(u);if(a===46&&(l=!0,a=o.charCodeAt(++u),u=gc(e,u,a),a=o.charCodeAt(u)),(a===69||a===101)&&(l=!0,a=o.charCodeAt(++u),(a===43||a===45)&&(a=o.charCodeAt(++u)),u=gc(e,u,a),a=o.charCodeAt(u)),a===46||u7(a))throw Ct(e,u,"Invalid number, expected digit but got: ".concat(Wr(a),"."));return new ze(l?j.FLOAT:j.INT,t,u,r,i,s,o.slice(t,u))}function gc(e,t,n){var r=e.body,i=t,s=n;if(s>=48&&s<=57){do s=r.charCodeAt(++i);while(s>=48&&s<=57);return i}throw Ct(e,i,"Invalid number, expected digit but got: ".concat(Wr(s),"."))}function i7(e,t,n,r,i){for(var s=e.body,o=t+1,a=o,u=0,l="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function a7(e,t,n,r,i){for(var s=e.body,o=s.length,a=t+1,u=0;a!==o&&!isNaN(u=s.charCodeAt(a))&&(u===95||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++a;return new ze(j.NAME,t,a,n,r,i,s.slice(t,a))}function u7(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function fn(e,t){var n=new Vd(e,t);return n.parseDocument()}function Ua(e,t){var n=new Vd(e,t);n.expectToken(j.SOF);var r=n.parseValueLiteral(!1);return n.expectToken(j.EOF),r}var Vd=(function(){function e(n,r){var i=kd(n)?n:new Pa(n);this._lexer=new vc(i),this._options=r}var t=e.prototype;return t.parseName=function(){var r=this.expectToken(j.NAME);return{kind:x.NAME,value:r.value,loc:this.loc(r)}},t.parseDocument=function(){var r=this._lexer.token;return{kind:x.DOCUMENT,definitions:this.many(j.SOF,this.parseDefinition,j.EOF),loc:this.loc(r)}},t.parseDefinition=function(){if(this.peek(j.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(j.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(j.BRACE_L))return{kind:x.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var i=this.parseOperationType(),s;return this.peek(j.NAME)&&(s=this.parseName()),{kind:x.OPERATION_DEFINITION,operation:i,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},t.parseOperationType=function(){var r=this.expectToken(j.NAME);switch(r.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(r)},t.parseVariableDefinitions=function(){return this.optionalMany(j.PAREN_L,this.parseVariableDefinition,j.PAREN_R)},t.parseVariableDefinition=function(){var r=this._lexer.token;return{kind:x.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(j.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(j.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(r)}},t.parseVariable=function(){var r=this._lexer.token;return this.expectToken(j.DOLLAR),{kind:x.VARIABLE,name:this.parseName(),loc:this.loc(r)}},t.parseSelectionSet=function(){var r=this._lexer.token;return{kind:x.SELECTION_SET,selections:this.many(j.BRACE_L,this.parseSelection,j.BRACE_R),loc:this.loc(r)}},t.parseSelection=function(){return this.peek(j.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var r=this._lexer.token,i=this.parseName(),s,o;return this.expectOptionalToken(j.COLON)?(s=i,o=this.parseName()):o=i,{kind:x.FIELD,alias:s,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(j.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(r){var i=r?this.parseConstArgument:this.parseArgument;return this.optionalMany(j.PAREN_L,i,j.PAREN_R)},t.parseArgument=function(){var r=this._lexer.token,i=this.parseName();return this.expectToken(j.COLON),{kind:x.ARGUMENT,name:i,value:this.parseValueLiteral(!1),loc:this.loc(r)}},t.parseConstArgument=function(){var r=this._lexer.token;return{kind:x.ARGUMENT,name:this.parseName(),value:(this.expectToken(j.COLON),this.parseValueLiteral(!0)),loc:this.loc(r)}},t.parseFragment=function(){var r=this._lexer.token;this.expectToken(j.SPREAD);var i=this.expectOptionalKeyword("on");return!i&&this.peek(j.NAME)?{kind:x.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(r)}:{kind:x.INLINE_FRAGMENT,typeCondition:i?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},t.parseFragmentDefinition=function(){var r,i=this._lexer.token;return this.expectKeyword("fragment"),((r=this._options)===null||r===void 0?void 0:r.experimentalFragmentVariables)===!0?{kind:x.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}:{kind:x.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}},t.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(r){var i=this._lexer.token;switch(i.kind){case j.BRACKET_L:return this.parseList(r);case j.BRACE_L:return this.parseObject(r);case j.INT:return this._lexer.advance(),{kind:x.INT,value:i.value,loc:this.loc(i)};case j.FLOAT:return this._lexer.advance(),{kind:x.FLOAT,value:i.value,loc:this.loc(i)};case j.STRING:case j.BLOCK_STRING:return this.parseStringLiteral();case j.NAME:switch(this._lexer.advance(),i.value){case"true":return{kind:x.BOOLEAN,value:!0,loc:this.loc(i)};case"false":return{kind:x.BOOLEAN,value:!1,loc:this.loc(i)};case"null":return{kind:x.NULL,loc:this.loc(i)};default:return{kind:x.ENUM,value:i.value,loc:this.loc(i)}}case j.DOLLAR:if(!r)return this.parseVariable();break}throw this.unexpected()},t.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:x.STRING,value:r.value,block:r.kind===j.BLOCK_STRING,loc:this.loc(r)}},t.parseList=function(r){var i=this,s=this._lexer.token,o=function(){return i.parseValueLiteral(r)};return{kind:x.LIST,values:this.any(j.BRACKET_L,o,j.BRACKET_R),loc:this.loc(s)}},t.parseObject=function(r){var i=this,s=this._lexer.token,o=function(){return i.parseObjectField(r)};return{kind:x.OBJECT,fields:this.any(j.BRACE_L,o,j.BRACE_R),loc:this.loc(s)}},t.parseObjectField=function(r){var i=this._lexer.token,s=this.parseName();return this.expectToken(j.COLON),{kind:x.OBJECT_FIELD,name:s,value:this.parseValueLiteral(r),loc:this.loc(i)}},t.parseDirectives=function(r){for(var i=[];this.peek(j.AT);)i.push(this.parseDirective(r));return i},t.parseDirective=function(r){var i=this._lexer.token;return this.expectToken(j.AT),{kind:x.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(i)}},t.parseTypeReference=function(){var r=this._lexer.token,i;return this.expectOptionalToken(j.BRACKET_L)?(i=this.parseTypeReference(),this.expectToken(j.BRACKET_R),i={kind:x.LIST_TYPE,type:i,loc:this.loc(r)}):i=this.parseNamedType(),this.expectOptionalToken(j.BANG)?{kind:x.NON_NULL_TYPE,type:i,loc:this.loc(r)}:i},t.parseNamedType=function(){var r=this._lexer.token;return{kind:x.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},t.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===j.NAME)switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(r)},t.peekDescription=function(){return this.peek(j.STRING)||this.peek(j.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("schema");var s=this.parseDirectives(!0),o=this.many(j.BRACE_L,this.parseOperationTypeDefinition,j.BRACE_R);return{kind:x.SCHEMA_DEFINITION,description:i,directives:s,operationTypes:o,loc:this.loc(r)}},t.parseOperationTypeDefinition=function(){var r=this._lexer.token,i=this.parseOperationType();this.expectToken(j.COLON);var s=this.parseNamedType();return{kind:x.OPERATION_TYPE_DEFINITION,operation:i,type:s,loc:this.loc(r)}},t.parseScalarTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("scalar");var s=this.parseName(),o=this.parseDirectives(!0);return{kind:x.SCALAR_TYPE_DEFINITION,description:i,name:s,directives:o,loc:this.loc(r)}},t.parseObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("type");var s=this.parseName(),o=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:x.OBJECT_TYPE_DEFINITION,description:i,name:s,interfaces:o,directives:a,fields:u,loc:this.loc(r)}},t.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return[];if(((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLImplementsInterfaces)===!0){var i=[];this.expectOptionalToken(j.AMP);do i.push(this.parseNamedType());while(this.expectOptionalToken(j.AMP)||this.peek(j.NAME));return i}return this.delimitedMany(j.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var r;return((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLEmptyFields)===!0&&this.peek(j.BRACE_L)&&this._lexer.lookahead().kind===j.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(j.BRACE_L,this.parseFieldDefinition,j.BRACE_R)},t.parseFieldDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),s=this.parseName(),o=this.parseArgumentDefs();this.expectToken(j.COLON);var a=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:x.FIELD_DEFINITION,description:i,name:s,arguments:o,type:a,directives:u,loc:this.loc(r)}},t.parseArgumentDefs=function(){return this.optionalMany(j.PAREN_L,this.parseInputValueDef,j.PAREN_R)},t.parseInputValueDef=function(){var r=this._lexer.token,i=this.parseDescription(),s=this.parseName();this.expectToken(j.COLON);var o=this.parseTypeReference(),a;this.expectOptionalToken(j.EQUALS)&&(a=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:x.INPUT_VALUE_DEFINITION,description:i,name:s,type:o,defaultValue:a,directives:u,loc:this.loc(r)}},t.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("interface");var s=this.parseName(),o=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:x.INTERFACE_TYPE_DEFINITION,description:i,name:s,interfaces:o,directives:a,fields:u,loc:this.loc(r)}},t.parseUnionTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("union");var s=this.parseName(),o=this.parseDirectives(!0),a=this.parseUnionMemberTypes();return{kind:x.UNION_TYPE_DEFINITION,description:i,name:s,directives:o,types:a,loc:this.loc(r)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(j.EQUALS)?this.delimitedMany(j.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("enum");var s=this.parseName(),o=this.parseDirectives(!0),a=this.parseEnumValuesDefinition();return{kind:x.ENUM_TYPE_DEFINITION,description:i,name:s,directives:o,values:a,loc:this.loc(r)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(j.BRACE_L,this.parseEnumValueDefinition,j.BRACE_R)},t.parseEnumValueDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),s=this.parseName(),o=this.parseDirectives(!0);return{kind:x.ENUM_VALUE_DEFINITION,description:i,name:s,directives:o,loc:this.loc(r)}},t.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("input");var s=this.parseName(),o=this.parseDirectives(!0),a=this.parseInputFieldsDefinition();return{kind:x.INPUT_OBJECT_TYPE_DEFINITION,description:i,name:s,directives:o,fields:a,loc:this.loc(r)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(j.BRACE_L,this.parseInputValueDef,j.BRACE_R)},t.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===j.NAME)switch(r.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(r)},t.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var i=this.parseDirectives(!0),s=this.optionalMany(j.BRACE_L,this.parseOperationTypeDefinition,j.BRACE_R);if(i.length===0&&s.length===0)throw this.unexpected();return{kind:x.SCHEMA_EXTENSION,directives:i,operationTypes:s,loc:this.loc(r)}},t.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var i=this.parseName(),s=this.parseDirectives(!0);if(s.length===0)throw this.unexpected();return{kind:x.SCALAR_TYPE_EXTENSION,name:i,directives:s,loc:this.loc(r)}},t.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var i=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&a.length===0)throw this.unexpected();return{kind:x.OBJECT_TYPE_EXTENSION,name:i,interfaces:s,directives:o,fields:a,loc:this.loc(r)}},t.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var i=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&a.length===0)throw this.unexpected();return{kind:x.INTERFACE_TYPE_EXTENSION,name:i,interfaces:s,directives:o,fields:a,loc:this.loc(r)}},t.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var i=this.parseName(),s=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:x.UNION_TYPE_EXTENSION,name:i,directives:s,types:o,loc:this.loc(r)}},t.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var i=this.parseName(),s=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:x.ENUM_TYPE_EXTENSION,name:i,directives:s,values:o,loc:this.loc(r)}},t.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var i=this.parseName(),s=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:x.INPUT_OBJECT_TYPE_EXTENSION,name:i,directives:s,fields:o,loc:this.loc(r)}},t.parseDirectiveDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("directive"),this.expectToken(j.AT);var s=this.parseName(),o=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:x.DIRECTIVE_DEFINITION,description:i,name:s,arguments:o,repeatable:a,locations:u,loc:this.loc(r)}},t.parseDirectiveLocations=function(){return this.delimitedMany(j.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var r=this._lexer.token,i=this.parseName();if(K[i.value]!==void 0)return i;throw this.unexpected(r)},t.loc=function(r){var i;if(((i=this._options)===null||i===void 0?void 0:i.noLocation)!==!0)return new Oa(r,this._lexer.lastToken,this._lexer.source)},t.peek=function(r){return this._lexer.token.kind===r},t.expectToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i;throw Ct(this._lexer.source,i.start,"Expected ".concat(Ud(r),", found ").concat(Dc(i),"."))},t.expectOptionalToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i},t.expectKeyword=function(r){var i=this._lexer.token;if(i.kind===j.NAME&&i.value===r)this._lexer.advance();else throw Ct(this._lexer.source,i.start,'Expected "'.concat(r,'", found ').concat(Dc(i),"."))},t.expectOptionalKeyword=function(r){var i=this._lexer.token;return i.kind===j.NAME&&i.value===r?(this._lexer.advance(),!0):!1},t.unexpected=function(r){var i=r??this._lexer.token;return Ct(this._lexer.source,i.start,"Unexpected ".concat(Dc(i),"."))},t.any=function(r,i,s){this.expectToken(r);for(var o=[];!this.expectOptionalToken(s);)o.push(i.call(this));return o},t.optionalMany=function(r,i,s){if(this.expectOptionalToken(r)){var o=[];do o.push(i.call(this));while(!this.expectOptionalToken(s));return o}return[]},t.many=function(r,i,s){this.expectToken(r);var o=[];do o.push(i.call(this));while(!this.expectOptionalToken(s));return o},t.delimitedMany=function(r,i){this.expectOptionalToken(r);var s=[];do s.push(i.call(this));while(this.expectOptionalToken(r));return s},e})();function Dc(e){var t=e.value;return Ud(e.kind)+(t!=null?' "'.concat(t,'"'):"")}function Ud(e){return Bd(e)?'"'.concat(e,'"'):e}var l7={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Wn=Object.freeze({});function Tt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l7,r=void 0,i=Array.isArray(e),s=[e],o=-1,a=[],u=void 0,l=void 0,c=void 0,f=[],h=[],m=e;do{o++;var g=o===s.length,v=g&&a.length!==0;if(g){if(l=h.length===0?void 0:f[f.length-1],u=c,c=h.pop(),v){if(i)u=u.slice();else{for(var b={},E=0,A=Object.keys(u);E1&&e[0]==="_"&&e[1]==="_")return new M('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.'));if(!p7.test(e))return new M('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'))}var h7=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})},hn=h7;function Lt(e,t){return e.reduce(function(n,r){return n[t(r)]=r,n},Object.create(null))}function tn(e,t){for(var n=Object.create(null),r=0,i=hn(e);r0);var a=0;do++r,a=a*10+s-bc,s=t.charCodeAt(r);while(Ga(s)&&a>0);if(oa)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}var bc=48,m7=57;function Ga(e){return!isNaN(e)&&bc<=e&&e<=m7}function $t(e,t){for(var n=Object.create(null),r=new g7(e),i=Math.floor(e.length*.4)+1,s=0;si)){for(var f=this._rows,h=0;h<=c;h++)f[0][h]=h;for(var m=1;m<=l;m++){for(var g=f[(m-1)%3],v=f[m%3],b=v[0]=m,E=1;E<=c;E++){var A=o[m-1]===a[E-1]?0:1,C=Math.min(g[E]+1,v[E-1]+1,g[E-1]+A);if(m>1&&E>1&&o[m-1]===a[E-2]&&o[m-2]===a[E-1]){var w=f[(m-2)%3][E-2];C=Math.min(C,w+1)}Ci)return}var F=f[l%3][c];return F<=i?F:void 0}},e})();function jd(e){for(var t=e.length,n=new Array(t),r=0;rv7&&(u=a+Xe(`( -`,qa(ne(i,` +`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(u);sa.register(a,l?.[2]??u,a)}return a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(t);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;let i=this._deliveryQueue.current===this;if(this._size*y7<=n.length){let s=0;for(let o=0;o0}};var Il=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Rl(){return globalThis._VSCODE_NLS_MESSAGES}function Vs(){return globalThis._VSCODE_NLS_LANGUAGE}var b7=Vs()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function wp(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=t[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),b7&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function Le(e,t,...n){return wp(typeof e=="number"?x7(e,t):t,n)}function x7(e,t){let n=Rl()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var Ii="en",ua=!1,la=!1,aa=!1,_7=!1,Ip=!1,Ml=!1,N7=!1,T7=!1,S7=!1,F7=!1,oa,Ol=Ii,Lp=Ii,A7,Mn,Pn=globalThis,jt;typeof Pn.vscode<"u"&&typeof Pn.vscode.process<"u"?jt=Pn.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(jt=process);var Rp=typeof jt?.versions?.electron=="string",C7=Rp&&jt?.type==="renderer";if(typeof jt=="object"){ua=jt.platform==="win32",la=jt.platform==="darwin",aa=jt.platform==="linux",_7=aa&&!!jt.env.SNAP&&!!jt.env.SNAP_REVISION,N7=Rp,S7=!!jt.env.CI||!!jt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,oa=Ii,Ol=Ii;let e=jt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);oa=t.userLocale,Lp=t.osLocale,Ol=t.resolvedLanguage||Ii,A7=t.languagePack?.translationsConfigFile}catch{}Ip=!0}else typeof navigator=="object"&&!C7?(Mn=navigator.userAgent,ua=Mn.indexOf("Windows")>=0,la=Mn.indexOf("Macintosh")>=0,T7=(Mn.indexOf("Macintosh")>=0||Mn.indexOf("iPad")>=0||Mn.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,aa=Mn.indexOf("Linux")>=0,F7=Mn?.indexOf("Mobi")>=0,Ml=!0,Ol=Vs()||Ii,oa=navigator.language.toLowerCase(),Lp=oa):console.error("Unable to resolve platform.");var kl=0;la?kl=1:ua?kl=3:aa&&(kl=2);var Mr=ua,Op=la;var kp=Ip,Pl=Ml,w7=Ml&&typeof Pn.importScripts=="function",Mp=w7?Pn.origin:void 0;var yn=Mn;var L7=typeof Pn.postMessage=="function"&&!Pn.importScripts,Pp=(()=>{if(L7){let e=[];Pn.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{let r=++t;e.push({id:r,callback:n}),Pn.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var I7=!!(yn&&yn.indexOf("Chrome")>=0),E3=!!(yn&&yn.indexOf("Firefox")>=0),b3=!!(!I7&&yn&&yn.indexOf("Safari")>=0),x3=!!(yn&&yn.indexOf("Edg/")>=0),v3=!!(yn&&yn.indexOf("Android")>=0);function O7(e){return e}var ca=class{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=O7):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){let n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}};var Us=class{constructor(t){this.executor=t,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function Vp(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Up(e){return e.split(/\r\n|\r|\n/)}function $p(e){for(let t=0,n=e.length;t=0;n--){let r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Bl(e){return e>=65&&e<=90}function ki(e){return 55296<=e&&e<=56319}function fa(e){return 56320<=e&&e<=57343}function Vl(e,t){return(e-55296<<10)+(t-56320)+65536}function Gp(e,t,n){let r=e.charCodeAt(n);if(ki(r)&&n+1n[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};function M7(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}var Ri=class e{static{this.ambiguousCharacterData=new Us(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new ca({getCacheKey:JSON.stringify},t=>{function n(c){let f=new Map;for(let h=0;h!c.startsWith("_")&&c in s);o.length===0&&(o=["_default"]);let a;for(let c of o){let f=n(s[c]);a=i(a,f)}let u=n(s._common),l=r(u,a);return new e(l)})}static getInstance(t){return e.cache.get(Array.from(t))}static{this._locales=new Us(()=>Object.keys(e.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return e._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},Oi=class e{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(e.getRawData())),this._data}static isInvisibleCharacter(t){return e.getData().has(t)}static get codePoints(){return e.getData()}};var Mi,Ul=globalThis.vscode;if(typeof Ul<"u"&&typeof Ul.process<"u"){let e=Ul.process;Mi={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Mi={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Mi={get platform(){return Mr?"win32":Op?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var js=Mi.cwd,Hp=Mi.env,Wp=Mi.platform;var B7=65,V7=97,U7=90,$7=122,cr=46,ft=47,Ot=92,ur=58,j7=63,pa=class extends Error{constructor(t,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";let s=t.indexOf(".")!==-1?"property":"argument",o=`The "${t}" ${s} ${i} of type ${n}`;o+=`. Received type ${typeof r}`,super(o),this.code="ERR_INVALID_ARG_TYPE"}};function G7(e,t){if(e===null||typeof e!="object")throw new pa(t,"Object",e)}function je(e,t){if(typeof e!="string")throw new pa(t,"string",e)}var Bn=Wp==="win32";function fe(e){return e===ft||e===Ot}function $l(e){return e===ft}function lr(e){return e>=B7&&e<=U7||e>=V7&&e<=$7}function da(e,t,n,r){let i="",s=0,o=-1,a=0,u=0;for(let l=0;l<=e.length;++l){if(l2){let c=i.lastIndexOf(n);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(n)),o=l,a=0;continue}else if(i.length!==0){i="",s=0,o=l,a=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),s=l-o-1;o=l,a=0}else u===cr&&a!==-1?++a:a=-1}return i}function q7(e){return e?`${e[0]==="."?"":"."}${e}`:""}function Qp(e,t){G7(t,"pathObject");let n=t.dir||t.root,r=t.base||`${t.name||""}${q7(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var Dt={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],je(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=js():(s=Hp[`=${t}`]||js(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===Ot)&&(s=`${t}\\`));let o=s.length,a=0,u="",l=!1,c=s.charCodeAt(0);if(o===1)fe(c)&&(a=1,l=!0);else if(fe(c))if(l=!0,fe(s.charCodeAt(1))){let f=2,h=f;for(;f2&&fe(s.charCodeAt(2))&&(l=!0,a=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=l,l&&t.length>0)break}return n=da(n,!r,"\\",fe),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){je(e,"path");let t=e.length;if(t===0)return".";let n=0,r,i=!1,s=e.charCodeAt(0);if(t===1)return $l(s)?"\\":e;if(fe(s))if(i=!0,fe(e.charCodeAt(1))){let a=2,u=a;for(;a2&&fe(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&fe(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){je(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return fe(n)||t>2&&lr(n)&&e.charCodeAt(1)===ur&&fe(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&fe(n.charCodeAt(0))){++i;let s=n.length;s>1&&fe(n.charCodeAt(1))&&(++i,s>2&&(fe(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return Dt.normalize(t)},relative(e,t){if(je(e,"from"),je(t,"to"),e===t)return"";let n=Dt.resolve(e),r=Dt.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===Ot;)s--;let o=s-i,a=0;for(;aa&&t.charCodeAt(u-1)===Ot;)u--;let l=u-a,c=oc){if(t.charCodeAt(a+h)===Ot)return r.slice(a+h+1);if(h===2)return r.slice(a+h)}o>c&&(e.charCodeAt(i+h)===Ot?f=h:h===2&&(f=3)),f===-1&&(f=0)}let m="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===Ot)&&(m+=m.length===0?"..":"\\..");return a+=f,m.length>0?`${m}${r.slice(a,u)}`:(r.charCodeAt(a)===Ot&&++a,r.slice(a,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=Dt.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Ot){if(t.charCodeAt(1)===Ot){let n=t.charCodeAt(2);if(n!==j7&&n!==cr)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(lr(t.charCodeAt(0))&&t.charCodeAt(1)===ur&&t.charCodeAt(2)===Ot)return`\\\\?\\${t}`;return e},dirname(e){je(e,"path");let t=e.length;if(t===0)return".";let n=-1,r=0,i=e.charCodeAt(0);if(t===1)return fe(i)?e:".";if(fe(i)){if(n=r=1,fe(e.charCodeAt(1))){let a=2,u=a;for(;a2&&fe(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let a=t-1;a>=r;--a)if(fe(e.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&je(t,"suffix"),je(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&lr(e.charCodeAt(0))&&e.charCodeAt(1)===ur&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(s=e.length-1;s>=n;--s){let u=e.charCodeAt(s);if(fe(u)){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(fe(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){je(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===ur&&lr(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){let u=e.charCodeAt(a);if(fe(u)){if(!s){r=a+1;break}continue}i===-1&&(s=!1,i=a+1),u===cr?n===-1?n=a:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Qp.bind(null,"\\"),parse(e){je(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,r=0,i=e.charCodeAt(0);if(n===1)return fe(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(fe(i)){if(r=1,fe(e.charCodeAt(1))){let f=2,h=f;for(;f0&&(t.root=e.slice(0,r));let s=-1,o=r,a=-1,u=!0,l=e.length-1,c=0;for(;l>=r;--l){if(i=e.charCodeAt(l),fe(i)){if(!u){o=l+1;break}continue}a===-1&&(u=!1,a=l+1),i===cr?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return a!==-1&&(s===-1||c===0||c===1&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},H7=(()=>{if(Bn){let e=/\\/g;return()=>{let t=js().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>js()})(),pt={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:H7();je(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===ft)}return t=da(t,!n,"/",$l),n?`/${t}`:t.length>0?t:"."},normalize(e){if(je(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===ft,n=e.charCodeAt(e.length-1)===ft;return e=da(e,!t,"/",$l),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return je(e,"path"),e.length>0&&e.charCodeAt(0)===ft},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":pt.normalize(t)},relative(e,t){if(je(e,"from"),je(t,"to"),e===t||(e=pt.resolve(e),t=pt.resolve(t),e===t))return"";let n=1,r=e.length,i=r-n,s=1,o=t.length-s,a=ia){if(t.charCodeAt(s+l)===ft)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>a&&(e.charCodeAt(n+l)===ft?u=l:l===0&&(u=0));let c="";for(l=n+u+1;l<=r;++l)(l===r||e.charCodeAt(l)===ft)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(je(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===ft,n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===ft){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&je(t,"ext"),je(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(s=e.length-1;s>=0;--s){let u=e.charCodeAt(s);if(u===ft){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===ft){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){je(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){let a=e.charCodeAt(o);if(a===ft){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),a===cr?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Qp.bind(null,"/"),parse(e){je(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===ft,r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,u=e.length-1,l=0;for(;u>=r;--u){let c=e.charCodeAt(u);if(c===ft){if(!a){s=u+1;break}continue}o===-1&&(a=!1,o=u+1),c===cr?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){let c=s===0&&n?1:s;i===-1||l===0||l===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(c,o):(t.name=e.slice(c,i),t.base=e.slice(c,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};pt.win32=Dt.win32=Dt;pt.posix=Dt.posix=pt;var A3=Bn?Dt.normalize:pt.normalize,zp=Bn?Dt.join:pt.join,C3=Bn?Dt.resolve:pt.resolve,w3=Bn?Dt.relative:pt.relative,L3=Bn?Dt.dirname:pt.dirname,I3=Bn?Dt.basename:pt.basename,R3=Bn?Dt.extname:pt.extname,O3=Bn?Dt.sep:pt.sep;var W7=/^\w[\w\d+.-]*$/,Q7=/^\//,z7=/^\/\//;function Y7(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!W7.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Q7.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(z7.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function J7(e,t){return!e&&!t?"file":e}function X7(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==rn&&(t=rn+t):t=rn;break}return t}var Ie="",rn="/",K7=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Tt=class e{static isUri(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||Ie,this.authority=t.authority||Ie,this.path=t.path||Ie,this.query=t.query||Ie,this.fragment=t.fragment||Ie):(this.scheme=J7(t,o),this.authority=n||Ie,this.path=X7(this.scheme,r||Ie),this.query=i||Ie,this.fragment=s||Ie,Y7(this,o))}get fsPath(){return jl(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Ie),r===void 0?r=this.authority:r===null&&(r=Ie),i===void 0?i=this.path:i===null&&(i=Ie),s===void 0?s=this.query:s===null&&(s=Ie),o===void 0?o=this.fragment:o===null&&(o=Ie),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new fr(n,r,i,s,o)}static parse(t,n=!1){let r=K7.exec(t);return r?new fr(r[2]||Ie,ha(r[4]||Ie),ha(r[5]||Ie),ha(r[7]||Ie),ha(r[9]||Ie),n):new fr(Ie,Ie,Ie,Ie,Ie)}static file(t){let n=Ie;if(Mr&&(t=t.replace(/\\/g,rn)),t[0]===rn&&t[1]===rn){let r=t.indexOf(rn,2);r===-1?(n=t.substring(2),t=rn):(n=t.substring(2,r),t=t.substring(r)||rn)}return new fr("file",n,t,Ie,Ie)}static from(t,n){return new fr(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Mr&&t.scheme==="file"?r=e.file(Dt.join(jl(t,!0),...n)).path:r=pt.join(t.path,...n),t.with({path:r})}toString(t=!1){return Gl(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let n=new fr(t);return n._formatted=t.external??null,n._fsPath=t._sep===Kp?t.fsPath??null:null,n}}else return t}},Kp=Mr?1:void 0,fr=class extends Tt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=jl(this,!1)),this._fsPath}toString(t=!1){return t?Gl(this,!0):(this._formatted||(this._formatted=Gl(this,!1)),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Kp),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}},Zp={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Jp(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));let a=Zp[o];a!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=a):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function Z7(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Mr&&(n=n.replace(/\//g,"\\")),n}function Gl(e,t){let n=t?Z7:Jp,r="",{scheme:i,authority:s,path:o,query:a,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=rn,r+=rn),s){let l=s.indexOf("@");if(l!==-1){let c=s.substr(0,l);s=s.substr(l+1),l=c.lastIndexOf(":"),l===-1?r+=n(c,!1,!1):(r+=n(c.substr(0,l),!1,!1),r+=":",r+=n(c.substr(l+1),!1,!0)),r+="@"}s=s.toLowerCase(),l=s.lastIndexOf(":"),l===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,l),!1,!0),r+=s.substr(l))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let l=o.charCodeAt(1);l>=65&&l<=90&&(o=`/${String.fromCharCode(l+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let l=o.charCodeAt(0);l>=65&&l<=90&&(o=`${String.fromCharCode(l+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:Jp(u,!1,!1)),r}function ed(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ed(e.substr(3)):e}}var Xp=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ha(e){return e.match(Xp)?e.replace(Xp,t=>ed(t)):e}var pr;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(pr||(pr={}));var e9="tkn",ql=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(t){this._preferredWebSchema=t}get _remoteResourcesPath(){return pt.join(this._serverRootPath,pr.vscodeRemoteResource)}rewrite(t){if(this._delegate)try{return this._delegate(t)}catch(a){return kn(a),t}let n=t.authority,r=this._hosts[n];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);let i=this._ports[n],s=this._connectionTokens[n],o=`path=${encodeURIComponent(t.path)}`;return typeof s=="string"&&(o+=`&${e9}=${encodeURIComponent(s)}`),Tt.from({scheme:Pl?this._preferredWebSchema:pr.vscodeRemoteResource,authority:`${r}:${i}`,path:this._remoteResourcesPath,query:o})}},t9=new ql,n9="vscode-app",Hl=class e{static{this.FALLBACK_AUTHORITY=n9}asBrowserUri(t){let n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===pr.vscodeRemote?t9.rewrite(t):t.scheme===pr.file&&(kp||Mp===`${pr.vscodeFileResource}://${e.FALLBACK_AUTHORITY}`)?t.with({scheme:pr.vscodeFileResource,authority:t.authority||e.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if(Tt.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){let r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return Tt.joinPath(Tt.parse(r,!0),t);let i=zp(r,t);return Tt.file(i)}return Tt.parse(n.toUrl(t))}},ma=new Hl,td;(function(e){let t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));let n="vscode-coi";function r(s){let o;typeof s=="string"?o=new URL(s).searchParams:s instanceof URL?o=s.searchParams:Tt.isUri(s)&&(o=new URL(s.toString(!0)).searchParams);let a=o?.get(n);if(a)return t.get(a)}e.getHeadersFromQuery=r;function i(s,o,a){if(!globalThis.crossOriginIsolated)return;let u=o&&a?"3":a?"2":"1";s instanceof URLSearchParams?s.set(n,u):s[n]=u}e.addSearchParam=i})(td||(td={}));var r9=!0,Wl="default",i9="$initialize";var Ql=class{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}},ga=class{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}},zl=class{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}},Yl=class{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}},Jl=class{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}},Xl=class{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}sendMessage(t,n,r){let i=String(++this._lastSentReq);return new Promise((s,o)=>{this._pendingReplies[i]={resolve:s,reject:o},this._send(new Ql(this._workerId,i,t,n,r))})}listen(t,n,r){let i=null,s=new st({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new zl(this._workerId,i,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Jl(this._workerId,i)),i=null}});return s.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){let r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(rd(s)?i[s]=o=>this.listen(t,s,o):nd(s)?i[s]=this.listen(t,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...o)=>(await n?.(),this.sendMessage(t,s,o)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;t.err.$isError&&(r=new Error,r.name=t.err.name,r.message=t.err.message,r.stack=t.err.stack),n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){let n=t.req;this._handler.handleMessage(t.channel,t.method,t.args).then(i=>{this._send(new ga(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=vl(i.detail)),this._send(new ga(this._workerId,n,void 0,vl(i)))})}_handleSubscribeEventMessage(t){let n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(i=>{this._send(new Yl(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){let n=[];if(t.type===0)for(let r=0;r{t(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===Wl&&n===i9)return this.initialize(r[0],r[1],r[2]);let i=t===Wl?this._requestHandler:this._localChannels.get(t);if(!i)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));if(typeof i[n]!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(i[n].apply(i,r))}catch(s){return Promise.reject(s)}}_handleEvent(t,n,r){let i=t===Wl?this._requestHandler:this._localChannels.get(t);if(!i)throw new Error(`Missing channel ${t} on worker thread`);if(rd(n)){let s=i[n].call(i,r);if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return s}if(nd(n)){let s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){let n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t,n,r){if(this._protocol.setWorkerId(t),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),r9?import(`${ma.asBrowserUri(`${r}.js`).toString(!0)}`).then(s=>{if(this._requestHandler=s.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}):new Promise((i,s)=>{let o=globalThis.require;o([r],a=>{if(this._requestHandler=a.create(this),!this._requestHandler){s(new Error("No RequestHandler!"));return}i()},s)})}};var sn=class{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function id(e,t){return(t<<5)-t+e|0}function ad(e,t){t=id(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function sd(e,t=0,n=e.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):s9((e>>>0).toString(16),t/4)}var od=class e{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let n=t.length;if(n===0)return;let r=this._buff,i=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=t.charCodeAt(0),a=0);;){let u=o;if(ki(o))if(a+1>>6,t[n++]=128|(r&63)>>>0):r<65536?(t[n++]=224|(r&61440)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0):(t[n++]=240|(r&1835008)>>>18,t[n++]=128|(r&258048)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Gs(this._h0)+Gs(this._h1)+Gs(this._h2)+Gs(this._h3)+Gs(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,sd(this._buff,this._buffLen),this._buffLen>56&&(this._step(),sd(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let f=0;f<64;f+=4)t.setUint32(f,n.getUint32(f,!1),!1);for(let f=64;f<320;f+=4)t.setUint32(f,Kl(t.getUint32(f-12,!1)^t.getUint32(f-32,!1)^t.getUint32(f-56,!1)^t.getUint32(f-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,o=this._h3,a=this._h4,u,l,c;for(let f=0;f<80;f++)f<20?(u=i&s|~i&o,l=1518500249):f<40?(u=i^s^o,l=1859775393):f<60?(u=i&s|i&o|s&o,l=2400959708):(u=i^s^o,l=3395469782),c=Kl(r,5)+u+a+l+t.getUint32(f*4,!1)&4294967295,a=o,o=s,s=Kl(i,30),i=r,r=c;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};var ya=class{constructor(t){this.source=t}getElements(){let t=this.source,n=new Int32Array(t.length);for(let r=0,i=t.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new sn(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},qs=class e{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;let[i,s,o]=e._getElements(t),[a,u,l]=e._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){let n=t.getElements();if(e._isStringArray(n)){let r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let f;return r<=i?(dr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new sn(t,0,r,i-r+1)]):t<=n?(dr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new sn(t,n-t+1,r,0)]):(dr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),dr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}let o=[0],a=[0],u=this.ComputeRecursionPoint(t,n,r,i,o,a,s),l=o[0],c=a[0];if(u!==null)return u;if(!s[0]){let f=this.ComputeDiffRecursive(t,l,r,c,s),h=[];return s[0]?h=[new sn(l+1,n-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,n,c+1,i,s),this.ConcatenateChanges(f,h)}return[new sn(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,o,a,u,l,c,f,h,m,g,E,v,N,L){let M=null,w=null,R=new Ea,V=n,S=r,k=m[0]-v[0]-i,T=-1073741824,A=this.m_forwardHistory.length-1;do{let j=k+t;j===V||j=0&&(l=this.m_forwardHistory[A],t=l[0],V=1,S=l.length-1)}while(--A>=-1);if(M=R.getReverseChanges(),L[0]){let j=m[0]+1,Q=v[0]+1;if(M!==null&&M.length>0){let te=M[M.length-1];j=Math.max(j,te.getOriginalEnd()),Q=Math.max(Q,te.getModifiedEnd())}w=[new sn(j,h-j+1,Q,E-Q+1)]}else{R=new Ea,V=o,S=a,k=m[0]-v[0]-u,T=1073741824,A=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let j=k+s;j===V||j=c[j+1]?(f=c[j+1]-1,g=f-k-u,f>T&&R.MarkNextChange(),T=f+1,R.AddOriginalElement(f+1,g+1),k=j+1-s):(f=c[j-1],g=f-k-u,f>T&&R.MarkNextChange(),T=f,R.AddModifiedElement(f+1,g+1),k=j-1-s),A>=0&&(c=this.m_reverseHistory[A],s=c[0],V=1,S=c.length-1)}while(--A>=-1);w=R.getChanges()}return this.ConcatenateChanges(M,w)}ComputeRecursionPoint(t,n,r,i,s,o,a){let u=0,l=0,c=0,f=0,h=0,m=0;t--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let g=n-t+(i-r),E=g+1,v=new Int32Array(E),N=new Int32Array(E),L=i-r,M=n-t,w=t-r,R=n-i,S=(M-L)%2===0;v[L]=t,N[M]=n,a[0]=!1;for(let k=1;k<=g/2+1;k++){let T=0,A=0;c=this.ClipDiagonalBound(L-k,k,L,E),f=this.ClipDiagonalBound(L+k,k,L,E);for(let Q=c;Q<=f;Q+=2){Q===c||QT+A&&(T=u,A=l),!S&&Math.abs(Q-M)<=k-1&&u>=N[Q])return s[0]=u,o[0]=l,te<=N[Q]&&k<=1448?this.WALKTRACE(L,c,f,w,M,h,m,R,v,N,u,n,s,l,i,o,S,a):null}let j=(T-t+(A-r)-k)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(T,j))return a[0]=!0,s[0]=T,o[0]=A,j>0&&k<=1448?this.WALKTRACE(L,c,f,w,M,h,m,R,v,N,u,n,s,l,i,o,S,a):(t++,r++,[new sn(t,n-t+1,r,i-r+1)]);h=this.ClipDiagonalBound(M-k,k,M,E),m=this.ClipDiagonalBound(M+k,k,M,E);for(let Q=h;Q<=m;Q+=2){Q===h||Q=N[Q+1]?u=N[Q+1]-1:u=N[Q-1],l=u-(Q-M)-R;let te=u;for(;u>t&&l>r&&this.ElementsAreEqual(u,l);)u--,l--;if(N[Q]=u,S&&Math.abs(Q-L)<=k&&u<=v[Q])return s[0]=u,o[0]=l,te>=v[Q]&&k<=1448?this.WALKTRACE(L,c,f,w,M,h,m,R,v,N,u,n,s,l,i,o,S,a):null}if(k<=1447){let Q=new Int32Array(f-c+2);Q[0]=L-c+1,hr.Copy2(v,c,Q,1,f-c+1),this.m_forwardHistory.push(Q),Q=new Int32Array(m-h+2),Q[0]=M-h+1,hr.Copy2(N,h,Q,1,m-h+1),this.m_reverseHistory.push(Q)}}return this.WALKTRACE(L,c,f,w,M,h,m,R,v,N,u,n,s,l,i,o,S,a)}PrettifyChanges(t){for(let n=0;n0,a=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=t[n],i=0,s=0;if(n>0){let f=t[n-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}let o=r.originalLength>0,a=r.modifiedLength>0,u=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){let h=r.originalStart-f,m=r.modifiedStart-f;if(hl&&(l=E,u=f)}r.originalStart-=u,r.modifiedStart-=u;let c=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],c)){t[n-1]=c[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>u&&(u=m,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){let s=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){let i=new Array(t.length+n.length-1);return hr.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],hr.Copy(n,1,i,t.length,n.length-1),i}else{let i=new Array(t.length+n.length);return hr.Copy(t,0,i,0,t.length),hr.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(dr.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),dr.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){let i=t.originalStart,s=t.originalLength,o=t.modifiedStart,a=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(a=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new sn(i,s,o,a),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return e.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return e.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return e.plusRange(this,t)}static plusRange(t,n){let r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new e(r,i,s,o)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(s=l,o=c):s===l&&(o=Math.min(o,c)),r>s||r===s&&i>o?null:new e(r,i,s,o)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(t){return new be(t.endLineNumber,t.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(t){return new be(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function Zl(e){return e<0?0:e>255?255:e|0}function Pr(e){return e<0?0:e>4294967295?4294967295:e|0}var Hs=class e{constructor(t){let n=Zl(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);return n.fill(t),n}set(t,n){let r=Zl(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var tc=class{constructor(t,n,r){let i=new Uint8Array(t*n);for(let s=0,o=t*n;sn&&(n=u),a>r&&(r=a),l>r&&(r=l)}n++,r++;let i=new tc(r,n,0);for(let s=0,o=t.length;s=this._maxCharCode?0:this._states.get(t,n)}},ec=null;function o9(){return ec===null&&(ec=new nc([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ec}var Ws=null;function a9(){if(Ws===null){Ws=new Hs(0);let e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;ni);if(i>0){let a=n.charCodeAt(i-1),u=n.charCodeAt(o);(a===40&&u===41||a===91&&u===93||a===123&&u===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=o9()){let r=a9(),i=[];for(let s=1,o=t.getLineCount();s<=o;s++){let a=t.getLineContent(s),u=a.length,l=0,c=0,f=0,h=1,m=!1,g=!1,E=!1,v=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}};var cd=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),xa;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Pi?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Li.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:cd})})(xa||(xa={}));var Pi=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?cd:(this._emitter||(this._emitter=new st),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Qs=class{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Pi),this._token}cancel(){this._token?this._token instanceof Pi&&this._token.cancel():this._token=xa.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Pi&&this._token.dispose():this._token=xa.None}};var zs=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},va=new zs,ic=new zs,sc=new zs,u9=new Array(230),l9={},c9=[],f9=Object.create(null),p9=Object.create(null),pd=[],oc=[];for(let e=0;e<=193;e++)pd[e]=-1;for(let e=0;e<=132;e++)oc[e]=-1;(function(){let t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(let i of t){let[s,o,a,u,l,c,f,h,m]=i;if(r[o]||(r[o]=!0,c9[o]=a,f9[a]=o,p9[a.toLowerCase()]=o,s&&(pd[o]=u,u!==0&&u!==3&&u!==5&&u!==4&&u!==6&&u!==57&&(oc[u]=o))),!n[u]){if(n[u]=!0,!l)throw new Error(`String representation missing for key code ${u} around scan code ${a}`);va.define(u,l),ic.define(u,h||l),sc.define(u,m||h||l)}c&&(u9[c]=u),f&&(l9[f]=u)}oc[3]=46})();var fd;(function(e){function t(a){return va.keyCodeToStr(a)}e.toString=t;function n(a){return va.strToKeyCode(a)}e.fromString=n;function r(a){return ic.keyCodeToStr(a)}e.toUserSettingsUS=r;function i(a){return sc.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return ic.strToKeyCode(a)||sc.strToKeyCode(a)}e.fromUserSettings=s;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return va.keyCodeToStr(a)}e.toElectronAccelerator=o})(fd||(fd={}));function dd(e,t){let n=(t&65535)<<16>>>0;return(e|n)>>>0}var _a=class e extends ie{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return e.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new e(this.startLineNumber,this.startColumn,t,n):new e(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new be(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new be(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new e(t,n,this.endLineNumber,this.endColumn):new e(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new e(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new e(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){this._factories.get(t)?.dispose();let r=new ac(this,t,n);return this._factories.set(t,r),ar(()=>{let i=this._factories.get(t);!i||i!==r||(this._factories.delete(t),i.dispose())})}async getOrCreate(t){let n=this.get(t);if(n)return n;let r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;let r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},ac=class extends Yt{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}};var Na=class{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var Dd;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Dd||(Dd={}));var yd;(function(e){let t=new Map;t.set(0,ee.symbolMethod),t.set(1,ee.symbolFunction),t.set(2,ee.symbolConstructor),t.set(3,ee.symbolField),t.set(4,ee.symbolVariable),t.set(5,ee.symbolClass),t.set(6,ee.symbolStruct),t.set(7,ee.symbolInterface),t.set(8,ee.symbolModule),t.set(9,ee.symbolProperty),t.set(10,ee.symbolEvent),t.set(11,ee.symbolOperator),t.set(12,ee.symbolUnit),t.set(13,ee.symbolValue),t.set(15,ee.symbolEnum),t.set(14,ee.symbolConstant),t.set(15,ee.symbolEnum),t.set(16,ee.symbolEnumMember),t.set(17,ee.symbolKeyword),t.set(27,ee.symbolSnippet),t.set(18,ee.symbolText),t.set(19,ee.symbolColor),t.set(20,ee.symbolFile),t.set(21,ee.symbolReference),t.set(22,ee.symbolCustomColor),t.set(23,ee.symbolFolder),t.set(24,ee.symbolTypeParameter),t.set(25,ee.account),t.set(26,ee.issues);function n(s){let o=t.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=ee.symbolProperty),o}e.toIcon=n;let r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,o){let a=r.get(s);return typeof a>"u"&&!o&&(a=9),a}e.fromString=i})(yd||(yd={}));var Ed;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Ed||(Ed={}));var bd;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(bd||(bd={}));var xd;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(xd||(xd={}));var vd;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(vd||(vd={}));var wN={17:Le("Array","array"),16:Le("Boolean","boolean"),4:Le("Class","class"),13:Le("Constant","constant"),8:Le("Constructor","constructor"),9:Le("Enum","enumeration"),21:Le("EnumMember","enumeration member"),23:Le("Event","event"),7:Le("Field","field"),0:Le("File","file"),11:Le("Function","function"),10:Le("Interface","interface"),19:Le("Key","key"),5:Le("Method","method"),1:Le("Module","module"),2:Le("Namespace","namespace"),20:Le("Null","null"),15:Le("Number","number"),18:Le("Object","object"),24:Le("Operator","operator"),3:Le("Package","package"),6:Le("Property","property"),14:Le("String","string"),22:Le("Struct","struct"),25:Le("TypeParameter","type parameter"),12:Le("Variable","variable")};var _d;(function(e){let t=new Map;t.set(0,ee.symbolFile),t.set(1,ee.symbolModule),t.set(2,ee.symbolNamespace),t.set(3,ee.symbolPackage),t.set(4,ee.symbolClass),t.set(5,ee.symbolMethod),t.set(6,ee.symbolProperty),t.set(7,ee.symbolField),t.set(8,ee.symbolConstructor),t.set(9,ee.symbolEnum),t.set(10,ee.symbolInterface),t.set(11,ee.symbolFunction),t.set(12,ee.symbolVariable),t.set(13,ee.symbolConstant),t.set(14,ee.symbolString),t.set(15,ee.symbolNumber),t.set(16,ee.symbolBoolean),t.set(17,ee.symbolArray),t.set(18,ee.symbolObject),t.set(19,ee.symbolKey),t.set(20,ee.symbolNull),t.set(21,ee.symbolEnumMember),t.set(22,ee.symbolStruct),t.set(23,ee.symbolEvent),t.set(24,ee.symbolOperator),t.set(25,ee.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=ee.symbolProperty),i}e.toIcon=n})(_d||(_d={}));var Nd=class e{static{this.Comment=new e("comment")}static{this.Imports=new e("imports")}static{this.Region=new e("region")}static fromValue(t){switch(t){case"comment":return e.Comment;case"imports":return e.Imports;case"region":return e.Region}return new e(t)}constructor(t){this.value=t}},Td;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Td||(Td={}));var Sd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Sd||(Sd={}));var Fd;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Fd||(Fd={}));var Ad;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Ad||(Ad={}));var LN=new Ys,IN=new Ys,Cd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Cd||(Cd={}));var wd;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(wd||(wd={}));var Ld;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(Ld||(Ld={}));var Id;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Id||(Id={}));var Rd;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(Rd||(Rd={}));var Od;(function(e){e[e.Deprecated=1]="Deprecated"})(Od||(Od={}));var kd;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(kd||(kd={}));var Md;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(Md||(Md={}));var Pd;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(Pd||(Pd={}));var Bd;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Bd||(Bd={}));var Vd;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Vd||(Vd={}));var Ud;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(Ud||(Ud={}));var $d;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})($d||($d={}));var jd;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(jd||(jd={}));var Gd;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(Gd||(Gd={}));var qd;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(qd||(qd={}));var Hd;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Hd||(Hd={}));var Wd;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Wd||(Wd={}));var Qd;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Qd||(Qd={}));var zd;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(zd||(zd={}));var Yd;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Yd||(Yd={}));var Jd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Jd||(Jd={}));var Ta;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(Ta||(Ta={}));var Vn;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Vn||(Vn={}));var Sa;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Sa||(Sa={}));var Xd;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(Xd||(Xd={}));var Kd;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(Kd||(Kd={}));var Zd;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Zd||(Zd={}));var eh;(function(e){e[e.AIGenerated=1]="AIGenerated"})(eh||(eh={}));var th;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(th||(th={}));var nh;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(nh||(nh={}));var rh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(rh||(rh={}));var ih;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(ih||(ih={}));var sh;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(sh||(sh={}));var oh;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(oh||(oh={}));var ah;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(ah||(ah={}));var uh;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(uh||(uh={}));var lh;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(lh||(lh={}));var Fa;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Fa||(Fa={}));var ch;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(ch||(ch={}));var fh;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(fh||(fh={}));var ph;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(ph||(ph={}));var dh;(function(e){e[e.Deprecated=1]="Deprecated"})(dh||(dh={}));var hh;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(hh||(hh={}));var mh;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(mh||(mh={}));var gh;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(gh||(gh={}));var Dh;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Dh||(Dh={}));var uc=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(t,n){return dd(t,n)}};function yh(){return{editor:void 0,languages:void 0,CancellationTokenSource:Qs,Emitter:st,KeyCode:Ta,KeyMod:uc,Position:be,Range:ie,Selection:_a,SelectionDirection:Fa,MarkerSeverity:Vn,MarkerTag:Sa,Uri:Tt,Token:Na}}var Js=class e{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(t){return t.getChannel(e.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(e.CHANNEL_NAME,n)}};var Eh,bh,lc=class{constructor(t,n){this.uri=t,this.value=n}};function m9(e){return Array.isArray(e)}var xh=class e{static{this.defaultToKey=t=>t.toString()}constructor(t,n){if(this[Eh]="ResourceMap",t instanceof e)this.map=new Map(t.map),this.toKey=n??e.defaultToKey;else if(m9(t)){this.map=new Map,this.toKey=n??e.defaultToKey;for(let[r,i]of t)this.set(r,i)}else this.map=new Map,this.toKey=t??e.defaultToKey}set(t,n){return this.map.set(this.toKey(t),new lc(t,n)),this}get(t){return this.map.get(this.toKey(t))?.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,n){typeof n<"u"&&(t=t.bind(n));for(let[r,i]of this.map)t(i.value,i.uri,this)}*values(){for(let t of this.map.values())yield t.value}*keys(){for(let t of this.map.values())yield t.uri}*entries(){for(let t of this.map.values())yield[t.uri,t.value]}*[(Eh=Symbol.toStringTag,Symbol.iterator)](){for(let[,t]of this.map)yield[t.uri,t.value]}},cc=class{constructor(){this[bh]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,n=0){let r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(bh=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}},fc=class extends cc{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},Aa=class extends fc{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}};var Ca=class{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){let r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){let r=this.map.get(t);r&&r.forEach(n)}get(t){let n=this.map.get(t);return n||new Set}};var QN=new Aa(10);function g9(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function pc(e){let t=[];for(let n of g9(e))typeof e[n]=="function"&&t.push(n);return t}function vh(e,t){let n=i=>function(){let s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(let i of e)r[i]=n(i);return r}var _h;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(_h||(_h={}));var Nh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Nh||(Nh={}));var Th;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Th||(Th={}));function D9(e,t,n,r,i){if(r===0)return!0;let s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r);if(e.get(o)!==0)return!0}return!1}function y9(e,t,n,r,i){if(r+i===n)return!0;let s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r+i-1);if(e.get(o)!==0)return!0}return!1}function E9(e,t,n,r,i){return D9(e,t,n,r,i)&&y9(e,t,n,r,i)}var wa=class{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){let n=t.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;let i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Gp(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||E9(this._wordSeparators,t,n,i,s))return r}while(r);return null}};function Sh(e,t="Unreachable"){throw new Error(t)}function Br(e){if(!e()){debugger;e(),kn(new et("Assertion Failed"))}}function Xs(e,t){let n=0;for(;n/?";function x9(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let n of b9)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var dc=x9();function hc(e){let t=dc;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var Fh=new Ps;Fh.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Ks(e,t,n,r,i){if(t=hc(t),i||(i=Fi.first(Fh)),n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),Ks(e,t,n,r,i)}let s=Date.now(),o=e-1-r,a=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){let c=o-i.windowSize*l;t.lastIndex=Math.max(0,c);let f=v9(t,n,o,a);if(!f&&u||(u=f,c<=0))break;a=c}if(u){let l={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function v9(e,t,n,r){let i;for(;i=e.exec(t);){let s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var La=class{static computeUnicodeHighlights(t,n,r){let i=r?r.startLineNumber:1,s=r?r.endLineNumber:t.getLineCount(),o=new Ia(n),a=o.getCandidateCodePoints(),u;a==="allNonBasicAscii"?u=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):u=new RegExp(`${_9(Array.from(a))}`,"g");let l=new wa(null,u),c=[],f=!1,h,m=0,g=0,E=0;e:for(let v=i,N=s;v<=N;v++){let L=t.getLineContent(v),M=L.length;l.reset(0);do if(h=l.next(L),h){let w=h.index,R=h.index+h[0].length;if(w>0){let T=L.charCodeAt(w-1);ki(T)&&w--}if(R+1=1e3){f=!0;break e}c.push(new ie(v,w+1,v,R+1))}}while(h)}return{ranges:c,hasMore:f,ambiguousCharacterCount:m,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:E}}static computeUnicodeHighlightReason(t,n){let r=new Ia(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{let s=t.codePointAt(0),o=r.ambiguousCharacters.getPrimaryConfusable(s),a=Ri.getLocales().filter(u=>!Ri.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function _9(e,t){return`[${Vp(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var Ia=class{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=Ri.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let t=new Set;if(this.options.invisibleCharacters)for(let n of Oi.codePoints)Ah(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(let n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){let r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(let o of n){let a=o.codePointAt(0),u=qp(o);i=i||u,!u&&!this.ambiguousCharacters.isAmbiguous(a)&&!Oi.isInvisibleCharacter(a)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Ah(t)&&Oi.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function Ah(e){return e===" "||e===` +`||e===" "}var mr=class{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}},Ra=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};var ye=class e{static addRange(t,n){let r=0;for(;rn))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new et(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new et(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new et(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new et(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=Vr(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){let i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{let i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){let n=Un(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){let n=Un(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;let n=[],r=0,i=0,s=null;for(;r=o.startLineNumber?s=new he(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new e(n)}subtractFrom(t){let n=Oa(this._normalizedRanges,o=>o.endLineNumberExclusive>=t.startLineNumber),r=Vr(this._normalizedRanges,o=>o.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new e([t]);let i=[],s=t.startLineNumber;for(let o=n;os&&i.push(new he(s,a.startLineNumber)),s=a.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){let n=[],r=0,i=0;for(;rn.delta(t)))}};var ka=class e{static{this.zero=new e(0,0)}static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new e(0,n.column-t.column):new e(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return e.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(let i of t)i===` +`?(n++,r=0):r++;return new e(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new ie(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new ie(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new be(t.lineNumber,t.column+this.columnCount):new be(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var Ma=class{constructor(t,n){this.range=t,this.text=n}toSingleEditOperation(){return{range:this.range,text:this.text}}};var En=class e{static inverse(t,n,r){let i=[],s=1,o=1;for(let u of t){let l=new e(new he(s,u.original.startLineNumber),new he(o,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}let a=new e(new he(s,n+1),new he(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(t,n,r){let i=[];for(let s of t){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new e(o,a))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new kt(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new et("not a valid diff");return new kt(new ie(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ie(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new kt(new ie(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new ie(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(wh(this.original.endLineNumberExclusive,t)&&wh(this.modified.endLineNumberExclusive,n))return new kt(new ie(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ie(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new kt(ie.fromPositions(new be(this.original.startLineNumber,1),Bi(new be(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),ie.fromPositions(new be(this.modified.startLineNumber,1),Bi(new be(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new kt(ie.fromPositions(Bi(new be(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Bi(new be(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),ie.fromPositions(Bi(new be(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Bi(new be(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new et}};function Bi(e,t){if(e.lineNumber<1)return new be(1,1);if(e.lineNumber>t.length)return new be(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new be(e.lineNumber,n.length+1):e}function wh(e,t){return e>=1&&e<=t.length}var $n=class e extends En{static fromRangeMappings(t){let n=he.join(t.map(i=>he.fromRangeInclusive(i.originalRange))),r=he.join(t.map(i=>he.fromRangeInclusive(i.modifiedRange)));return new e(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},kt=class e{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let n=t.getValueOfRange(this.modifiedRange);return new Ma(this.originalRange,n)}};var N9=3,Pa=class{computeDiff(t,n,r){let s=new gc(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[],a=null;for(let u of s.changes){let l;u.originalEndLineNumber===0?l=new he(u.originalStartLineNumber+1,u.originalStartLineNumber+1):l=new he(u.originalStartLineNumber,u.originalEndLineNumber+1);let c;u.modifiedEndLineNumber===0?c=new he(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):c=new he(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let f=new $n(l,c,u.charChanges?.map(h=>new kt(new ie(h.originalStartLineNumber,h.originalStartColumn,h.originalEndLineNumber,h.originalEndColumn),new ie(h.modifiedStartLineNumber,h.modifiedStartColumn,h.modifiedEndLineNumber,h.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===f.modified.startLineNumber||a.original.endLineNumberExclusive===f.original.startLineNumber)&&(f=new $n(a.original.join(f.original),a.modified.join(f.modified),a.innerChanges&&f.innerChanges?a.innerChanges.concat(f.innerChanges):void 0),o.pop()),o.push(f),a=f}return Br(()=>Xs(o,(u,l)=>l.original.startLineNumber-u.original.endLineNumberExclusive===l.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}},Vi=class e{constructor(t,n,r,i,s,o,a,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){let i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),a=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new e(i,s,o,a,u,l,c,f)}};function T9(e){if(e.length<=1)return e;let t=[e[0]],n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){let m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let E=Ih(m,g,s,!0).changes;a&&(E=T9(E)),h=[];for(let v=0,N=E.length;v1&&E>1;){let v=h.charCodeAt(g-2),N=m.charCodeAt(E-2);if(v!==N)break;g--,E--}(g>1||E>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,o+1,1,E)}{let g=yc(h,1),E=yc(m,1),v=h.length+1,N=m.length+1;for(;g!0;let t=Date.now();return()=>Date.now()-tr===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ec||(Ec={}));function to(e,t){return(n,r)=>t(e(n),e(r))}var no=(e,t)=>e-t;function Vh(e){return(t,n)=>-e(t,n)}var Rh=class e{static{this.empty=new e(t=>{})}constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new e(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||Ec.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}};var xn=class e{static trivial(t,n){return new e([new ke(ye.ofLength(t.length),ye.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new e([new ke(ye.ofLength(t.length),ye.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}},ke=class e{static invert(t,n){let r=[];return Mh(t,(i,s)=>{r.push(e.fromOffsetPairs(i?i.getEndExclusives():bn.zero,s?s.getStarts():new bn(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new e(new ye(t.offset1,n.offset1),new ye(t.offset2,n.offset2))}static assertSorted(t){let n;for(let r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new et("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new e(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){let n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new e(n,r)}getStarts(){return new bn(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new bn(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},bn=class e{static{this.zero=new e(0,0)}static{this.max=new e(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new e(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},gr=class e{static{this.instance=new e}isValid(){return!0}},Va=class{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new et("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&E>0&&o.get(g-1,E-1)===3&&(L+=a.get(g-1,E-1)),L+=i?i(g,E):1):L=-1;let M=Math.max(v,N,L);if(M===L){let w=g>0&&E>0?a.get(g-1,E-1):0;a.set(g,E,w+1),o.set(g,E,3)}else M===v?(a.set(g,E,0),o.set(g,E,1)):M===N&&(a.set(g,E,0),o.set(g,E,2));s.set(g,E,M)}let u=[],l=t.length,c=n.length;function f(g,E){(g+1!==l||E+1!==c)&&u.push(new ke(new ye(g+1,l),new ye(E+1,c))),l=g,c=E}let h=t.length-1,m=n.length-1;for(;h>=0&&m>=0;)o.get(h,m)===3?(f(h,m),h--,m--):o.get(h,m)===1?h--:m--;return f(-1,-1),u.reverse(),new xn(u,!1)}};var $i=class{compute(t,n,r=gr.instance){if(t.length===0||n.length===0)return xn.trivial(t,n);let i=t,s=n;function o(E,v){for(;Ei.length||R>s.length)continue;let V=o(w,R);u.set(c,V);let S=w===L?l.get(c+1):l.get(c-1);if(l.set(c,V!==w?new $a(S,w,R,V-w):S),u.get(c)===i.length&&u.get(c)-c===s.length)break e}}let f=l.get(c),h=[],m=i.length,g=s.length;for(;;){let E=f?f.x+f.length:0,v=f?f.y+f.length:0;if((E!==m||v!==g)&&h.push(new ke(new ye(E,m),new ye(v,g))),!f)break;m=f.x,g=f.y,f=f.prev}return h.reverse(),new xn(h,!1)}},$a=class{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}},bc=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}},xc=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var Dr=class{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=t[i-1],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,s=s.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!r){let l=s.trimStart();a=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,s.length):s.length;for(let l=0;lString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=$h(t>0?this.elements[t-1]:-1),r=$h(ts<=t),i=t-this.firstElementOffsetByLineIdx[r];return new be(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){let n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?ie.fromPositions(r,r):ie.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!vc(this.elements[t]))return;let n=t;for(;n>0&&vc(this.elements[n-1]);)n--;let r=t;for(;ri<=t.start)??0,r=Ch(this.firstElementOffsetByLineIdx,i=>t.endExclusive<=i)??this.elements.length;return new ye(n,r)}};function vc(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var S9={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Uh(e){return S9[e]}function $h(e){return e===10?8:e===13?7:io(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Gh(e,t,n,r,i,s){let{moves:o,excludedChanges:a}=A9(e,t,n,s);if(!s.isValid())return[];let u=e.filter(c=>!a.has(c)),l=C9(u,r,i,t,n,s);return Bh(o,l),o=w9(o),o=o.filter(c=>{let f=c.original.toOffsetRange().slice(t).map(m=>m.trim());return f.join(` +`).length>=15&&F9(f,m=>m.length>=2)>=2}),o=L9(e,o),o}function F9(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function A9(e,t,n,r){let i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new ro(u.original,t,u)),o=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new ro(u.modified,n,u))),a=new Set;for(let u of s){let l=-1,c;for(let f of o){let h=u.computeSimilarity(f);h>l&&(l=h,c=f)}if(l>.9&&c&&(o.delete(c),i.push(new En(u.range,c.range)),a.add(u.source),a.add(c.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function C9(e,t,n,r,i,s){let o=[],a=new Ca;for(let h of e)for(let m=h.original.startLineNumber;mh.modified.startLineNumber,no));for(let h of e){let m=[];for(let g=h.modified.startLineNumber;g{for(let w of m)if(w.originalLineRange.endLineNumberExclusive+1===L.endLineNumberExclusive&&w.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){w.originalLineRange=new he(w.originalLineRange.startLineNumber,L.endLineNumberExclusive),w.modifiedLineRange=new he(w.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),N.push(w);return}let M={modifiedLineRange:v,originalLineRange:L};u.push(M),N.push(M)}),m=N}if(!s.isValid())return[]}u.sort(Vh(to(h=>h.modifiedLineRange.length,no)));let l=new Ur,c=new Ur;for(let h of u){let m=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,g=l.subtractFrom(h.modifiedLineRange),E=c.subtractFrom(h.originalLineRange).getWithDelta(m),v=g.getIntersection(E);for(let N of v.ranges){if(N.length<3)continue;let L=N,M=N.delta(-m);o.push(new En(M,L)),l.addRange(L),c.addRange(M)}}o.sort(to(h=>h.original.startLineNumber,no));let f=new Zs(e);for(let h=0;hV.original.startLineNumber<=m.original.startLineNumber),E=Un(e,V=>V.modified.startLineNumber<=m.modified.startLineNumber),v=Math.max(m.original.startLineNumber-g.original.startLineNumber,m.modified.startLineNumber-E.modified.startLineNumber),N=f.findLastMonotonous(V=>V.original.startLineNumberV.modified.startLineNumberr.length||S>i.length||l.contains(S)||c.contains(V)||!jh(r[V-1],i[S-1],s))break}w>0&&(c.addRange(new he(m.original.startLineNumber-w,m.original.startLineNumber)),l.addRange(new he(m.modified.startLineNumber-w,m.modified.startLineNumber)));let R;for(R=0;Rr.length||S>i.length||l.contains(S)||c.contains(V)||!jh(r[V-1],i[S-1],s))break}R>0&&(c.addRange(new he(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+R)),l.addRange(new he(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+R))),(w>0||R>0)&&(o[h]=new En(new he(m.original.startLineNumber-w,m.original.endLineNumberExclusive+R),new he(m.modified.startLineNumber-w,m.modified.endLineNumberExclusive+R)))}return o}function jh(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let i=new $i().compute(new Dr([e],new ie(1,1,1,e.length),!1),new Dr([t],new ie(1,1,1,t.length),!1),n),s=0,o=ke.invert(i.diffs,e.length);for(let c of o)c.seq1Range.forEach(f=>{io(e.charCodeAt(f))||s++});function a(c){let f=0;for(let h=0;ht.length?e:t);return s/u>.6&&u>10}function w9(e){if(e.length===0)return e;e.sort(to(n=>n.original.startLineNumber,no));let t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function L9(e,t){let n=new Zs(e);return t=t.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(l))}i.push(a)}return r.length>0&&i.push(r[r.length-1]),i}function I9(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&e.seq2Range.start-o>=i.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let a=0;for(;e.seq1Range.start+al&&(l=g,u=c)}return e.delta(u)}function Wh(e,t,n){let r=[];for(let i of n){let s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new ke(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Qh(e,t,n){let r=ke.invert(n,e.length),i=[],s=new bn(0,0);function o(u,l){if(u.offset10;){let v=r[0];if(!(v.seq1Range.intersects(h.seq1Range)||v.seq2Range.intersects(h.seq2Range)))break;let L=e.findWordContaining(v.seq1Range.start),M=t.findWordContaining(v.seq2Range.start),w=new ke(L,M),R=w.intersect(v);if(g+=R.seq1Range.length,E+=R.seq2Range.length,h=h.join(w),h.seq1Range.endExclusive>=v.seq1Range.endExclusive)r.shift();else break}g+E<(h.seq1Range.length+h.seq2Range.length)*2/3&&i.push(h),s=h.getEndExclusives()}for(;r.length>0;){let u=r.shift();u.seq1Range.isEmpty||(o(u.getStarts(),u),o(u.getEndExclusives().delta(-1),u))}return R9(n,i)}function R9(e,t){let n=[];for(;e.length>0||t.length>0;){let r=e[0],i=t[0],s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function zh(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let o=[r[0]];for(let a=1;a5||m.seq1Range.length+m.seq2Range.length>5)},u=r[a],l=o[o.length-1];c(l,u)?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(i++<10&&s);return r}function Yh(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let a=[r[0]];for(let u=1;u5||E.length>500)return!1;let N=e.getText(E).trim();if(N.length>20||N.split(/\r\n|\r|\n/).length>1)return!1;let L=e.countLinesIn(m.seq1Range),M=m.seq1Range.length,w=t.countLinesIn(m.seq2Range),R=m.seq2Range.length,V=e.countLinesIn(g.seq1Range),S=g.seq1Range.length,k=t.countLinesIn(g.seq2Range),T=g.seq2Range.length,A=130;function j(Q){return Math.min(Q,A)}return Math.pow(Math.pow(j(L*40+M),1.5)+Math.pow(j(w*40+R),1.5),1.5)+Math.pow(Math.pow(j(V*40+S),1.5)+Math.pow(j(k*40+T),1.5),1.5)>(A**1.5)**1.5*1.3},l=r[u],c=a[a.length-1];f(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);let o=[];return Ph(r,(a,u,l)=>{let c=u;function f(N){return N.length>0&&N.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}let h=e.extendToFullLines(u.seq1Range),m=e.getText(new ye(h.start,u.seq1Range.start));f(m)&&(c=c.deltaStart(-m.length));let g=e.getText(new ye(u.seq1Range.endExclusive,h.endExclusive));f(g)&&(c=c.deltaEnd(g.length));let E=ke.fromOffsetPairs(a?a.getEndExclusives():bn.zero,l?l.getStarts():bn.max),v=c.intersect(E);o.length>0&&v.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(v):o.push(v)}),o}var so=class{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){let n=t===0?0:Jh(this.lines[t-1]),r=t===this.lines.length?0:Jh(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` +`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function Jh(e){let t=0;for(;tR===V))return new mr([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new mr([new $n(new he(1,t.length+1),new he(1,n.length+1),[new kt(new ie(1,1,t.length,t[t.length-1].length+1),new ie(1,1,n.length,n[n.length-1].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?gr.instance:new Va(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(R){let V=o.get(R);return V===void 0&&(V=o.size,o.set(R,V)),V}let u=t.map(R=>a(R.trim())),l=n.map(R=>a(R.trim())),c=new so(u,t),f=new so(l,n),h=c.length+f.length<1700?this.dynamicProgrammingDiffing.compute(c,f,i,(R,V)=>t[R]===n[V]?n[V].length===0?.1:1+Math.log(1+n[V].length):.99):this.myersDiffingAlgorithm.compute(c,f,i),m=h.diffs,g=h.hitTimeout;m=_c(c,f,m),m=zh(c,f,m);let E=[],v=R=>{if(s)for(let V=0;VR.seq1Range.start-N===R.seq2Range.start-L);let V=R.seq1Range.start-N;v(V),N=R.seq1Range.endExclusive,L=R.seq2Range.endExclusive;let S=this.refineDiff(t,n,R,i,s);S.hitTimeout&&(g=!0);for(let k of S.mappings)E.push(k)}v(t.length-N);let M=Xh(E,t,n),w=[];return r.computeMoves&&(w=this.computeMoves(M,t,n,u,l,i,s)),Br(()=>{function R(S,k){if(S.lineNumber<1||S.lineNumber>k.length)return!1;let T=k[S.lineNumber-1];return!(S.column<1||S.column>T.length+1)}function V(S,k){return!(S.startLineNumber<1||S.startLineNumber>k.length+1||S.endLineNumberExclusive<1||S.endLineNumberExclusive>k.length+1)}for(let S of M){if(!S.innerChanges)return!1;for(let k of S.innerChanges)if(!(R(k.modifiedRange.getStartPosition(),n)&&R(k.modifiedRange.getEndPosition(),n)&&R(k.originalRange.getStartPosition(),t)&&R(k.originalRange.getEndPosition(),t)))return!1;if(!V(S.modified,n)||!V(S.original,t))return!1}return!0}),new mr(M,w,g)}computeMoves(t,n,r,i,s,o,a){return Gh(t,n,r,i,s,o).map(c=>{let f=this.refineDiff(n,r,new ke(c.original.toOffsetRange(),c.modified.toOffsetRange()),o,a),h=Xh(f.mappings,n,r,!0);return new Ra(c,h)})}refineDiff(t,n,r,i,s){let a=k9(r).toRangeMapping2(t,n),u=new Dr(t,a.originalRange,s),l=new Dr(n,a.modifiedRange,s),c=u.length+l.length<500?this.dynamicProgrammingDiffing.compute(u,l,i):this.myersDiffingAlgorithm.compute(u,l,i),f=!1,h=c.diffs;f&&ke.assertSorted(h),h=_c(u,l,h),f&&ke.assertSorted(h),h=Qh(u,l,h),f&&ke.assertSorted(h),h=Wh(u,l,h),f&&ke.assertSorted(h),h=Yh(u,l,h),f&&ke.assertSorted(h);let m=h.map(g=>new kt(u.translateRange(g.seq1Range),l.translateRange(g.seq2Range)));return f&&kt.assertSorted(m),{mappings:m,hitTimeout:c.hitTimeout}}};function Xh(e,t,n,r=!1){let i=[];for(let s of kh(e.map(o=>O9(o,t,n)),(o,a)=>o.original.overlapOrTouch(a.original)||o.modified.overlapOrTouch(a.modified))){let o=s[0],a=s[s.length-1];i.push(new $n(o.original.join(a.original),o.modified.join(a.modified),s.map(u=>u.innerChanges[0])))}return Br(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:Xs(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);let s=new he(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new he(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new $n(s,o,[e])}function k9(e){return new En(new he(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new he(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var Nc={getLegacy:()=>new Pa,getDefault:()=>new ja};function yr(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var ze=class{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=yr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},vn=class e{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=yr(Math.max(Math.min(1,n),0),3),this.l=yr(Math.max(Math.min(1,r),0),3),this.a=yr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,o=Math.max(n,r,i),a=Math.min(n,r,i),u=0,l=0,c=(a+o)/2,f=o-a;if(f>0){switch(l=Math.min(c<=.5?f/(2*c):f/(2-2*c),1),o){case n:u=(r-i)/f+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){let n=t.h/360,{s:r,l:i,a:s}=t,o,a,u;if(r===0)o=a=u=i;else{let l=i<.5?i*(1+r):i+r-i*r,c=2*i-l;o=e._hue2rgb(c,l,n+1/3),a=e._hue2rgb(c,l,n),u=e._hue2rgb(c,l,n-1/3)}return new ze(Math.round(o*255),Math.round(a*255),Math.round(u*255),s)}},ji=class e{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=yr(Math.max(Math.min(1,n),0),3),this.v=yr(Math.max(Math.min(1,r),0),3),this.a=yr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,u=s===0?0:a/s,l;return a===0?l=0:s===n?l=((r-i)/a%6+6)%6:s===r?l=(i-n)/a+2:l=(n-r)/a+4,new e(Math.round(l*60),u,s,t.a)}static toRGBA(t){let{h:n,s:r,v:i,a:s}=t,o=i*r,a=o*(1-Math.abs(n/60%2-1)),u=i-o,[l,c,f]=[0,0,0];return n<60?(l=o,c=a):n<120?(l=a,c=o):n<180?(c=o,f=a):n<240?(c=a,f=o):n<300?(l=a,f=o):n<=360&&(l=o,f=a),l=Math.round((l+u)*255),c=Math.round((c+u)*255),f=Math.round((f+u)*255),new ze(l,c,f,s)}},$r=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:vn.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:ji.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof ze)this.rgba=t;else if(t instanceof vn)this._hsla=t,this.rgba=vn.toRGBA(t);else if(t instanceof ji)this._hsva=t,this.rgba=ji.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&ze.equals(this.rgba,t.rgba)&&vn.equals(this.hsla,t.hsla)&&ji.equals(this.hsva,t.hsva)}getRelativeLuminance(){let t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),r=e._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return yr(i,4)}static _relativeLuminanceForComponent(t){let n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(let i of r){let s=i.filter(l=>l!==void 0),o=s[1],a=s[2];if(!a)continue;let u;if(o==="rgb"){let l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=Kh(oo(e,i),ao(a,l),!1)}else if(o==="rgba"){let l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Kh(oo(e,i),ao(a,l),!0)}else if(o==="hsl"){let l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=Zh(oo(e,i),ao(a,l),!1)}else if(o==="hsla"){let l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Zh(oo(e,i),ao(a,l),!0)}else o==="#"&&(u=M9(oo(e,i),o+a));u&&t.push(u)}return t}function tm(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:P9(e)}var nm=new RegExp("\\bMARK:\\s*(.*)$","d"),B9=/^-+|-+$/g;function rm(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){let r=V9(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){let r=U9(e);n=n.concat(r)}return n}function V9(e,t){let n=[],r=e.getLineCount();for(let i=1;i<=r;i++){let s=e.getLineContent(i),o=s.match(t.foldingRules.markers.start);if(o){let a={startLineNumber:i,startColumn:o[0].length+1,endLineNumber:i,endColumn:s.length+1};if(a.endColumn>a.startColumn){let u={range:a,...im(s.substring(o[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function U9(e){let t=[],n=e.getLineCount();for(let r=1;r<=n;r++){let i=e.getLineContent(r);$9(i,r,t)}return t}function $9(e,t,n){nm.lastIndex=0;let r=nm.exec(e);if(r){let i=r.indices[1][0]+1,s=r.indices[1][1]+1,o={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(o.endColumn>o.startColumn){let a={range:o,...im(r[1]),shouldBeInComments:!0};(a.text||a.hasSeparatorLine)&&n.push(a)}}}function im(e){e=e.trim();let t=e.startsWith("-");return e=e.replace(B9,""),{text:e,hasSeparatorLine:t}}var j9,Sc;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Sc=(e,t)=>{Pp(()=>{if(n)return;let r=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,r-Date.now())}}))});let n=!1;return{dispose(){n||(n=!0)}}}:Sc=(e,t,n)=>{let r=e.requestIdleCallback(t,typeof n=="number"?{timeout:n}:void 0),i=!1;return{dispose(){i||(i=!0,e.cancelIdleCallback(r))}}},j9=e=>Sc(globalThis,e)})();var sm;(function(e){async function t(r){let i,s=await Promise.all(r.map(o=>o.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(o){s(o)}})}e.withAsyncBody=n})(sm||(sm={}));var om=class e{static fromArray(t){return new e(n=>{n.emitMany(t)})}static fromPromise(t){return new e(async n=>{n.emitMany(await t)})}static fromPromises(t){return new e(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new e(async n=>{await Promise.all(t.map(async r=>{for await(let i of r)n.emitOne(i)}))})}static{this.EMPTY=e.fromArray([])}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new st,queueMicrotask(async()=>{let r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async r=>{for await(let i of t)r.emitOne(n(i))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async r=>{for await(let i of t)n(i)&&r.emitOne(i)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,n=>!!n)}coalesce(){return e.coalesce(this)}static async toPromise(t){let n=[];for await(let r of t)n.push(r);return n}toPromise(){return e.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};var Ga=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Pr(t);let r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=Pr(t),n=Pr(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;let s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Pr(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],o=s-this.values[i],t=s)n=i+1;else break;return new Fc(i,t-o)}};var Fc=class{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}};var qa=class{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);let n=t.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new be(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;it.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new Ac(Tt.parse(t.url),t.lines,t.EOL,t.versionId)}$acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}$acceptRemovedModel(t){this._models[t]&&delete this._models[t]}},Ac=class extends qa{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:t}};var G9=!0,Cc=class{constructor(){this._workerTextModelSyncServer=new Ha}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){let i=this._getModel(t);return i?La.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){let r=this._getModel(t);return r?rm(r,n):[]}async $computeDiff(t,n,r,i){let s=this._getModel(t),o=this._getModel(n);return!s||!o?null:jr.computeDiff(s,o,r,i)}static computeDiff(t,n,r,i){let s=i==="advanced"?Nc.getDefault():Nc.getLegacy(),o=t.getLinesContent(),a=n.getLinesContent(),u=s.computeDiff(o,a,r),l=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function c(f){return f.map(h=>[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,h.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:l,quitEarly:u.hitTimeout,changes:c(u.changes),moves:u.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,c(f.changes)])}}static _modelsAreIdentical(t,n){let r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){let o=t.getLineContent(s),a=n.getLineContent(s);if(o!==a)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let s=[],o;n=n.slice(0).sort((u,l)=>{if(u.range&&l.range)return ie.compareRangesUsingStarts(u.range,l.range);let c=u.range?0:1,f=l.range?0:1;return c-f});let a=0;for(let u=1;ujr._diffLimit){s.push({range:u,text:l});continue}let h=ud(f,l,r),m=i.offsetAt(ie.lift(u).getStartPosition());for(let g of h){let E=i.positionAt(m+g.originalStart),v=i.positionAt(m+g.originalStart+g.originalLength),N={text:l.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:E.lineNumber,startColumn:E.column,endLineNumber:v.lineNumber,endColumn:v.column}};i.getValueInRange(N.range)!==N.text&&s.push(N)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){let n=this._getModel(t);return n?ld(n):null}async $computeDefaultDocumentColors(t){let n=this._getModel(t);return n?tm(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){let s=new Ci,o=new RegExp(r,i),a=new Set;e:for(let u of t){let l=this._getModel(u);if(l){for(let c of l.words(o))if(!(c===n||!isNaN(Number(c)))&&(a.add(c),a.size>jr._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){let s=this._getModel(t);if(!s)return Object.create(null);let o=new RegExp(r,i),a=Object.create(null);for(let u=n.startLineNumber;uthis._host.$fhr(a,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve(pc(this._foreignModule))):new Promise((a,u)=>{let l=c=>{this._foreignModule=c.create(o,n),a(pc(this._foreignModule))};G9?import(`${ma.asBrowserUri(`${t}.js`).toString(!0)}`).then(l).catch(u):Tp([`${t}`],l,u)})}$fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}};typeof importScripts=="function"&&(globalThis.monaco=yh());var wc=!1;function Lc(e){if(wc)return;wc=!0;let t=new Da(n=>{globalThis.postMessage(n)},n=>new jr(Js.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{wc||Lc(null)};function H(e){return Wa(e,[])}function Wa(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return q9(e,t);default:return String(e)}}function q9(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(H9(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Wa(r,n)}else if(Array.isArray(e))return Q9(e,n);return W9(e,n)}function H9(e){return typeof e.toJSON=="function"}function W9(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+z9(e)+"]":"{ "+n.map(([i,s])=>i+": "+Wa(s,t)).join(", ")+" }"}function Q9(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function z9(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}function Y9(e,t){return e?.__kind===t}var St=Y9;function am(e){return e instanceof Error?e:new Ic(e)}var Ic=class extends Error{constructor(t){super("Unexpected error value: "+H(t)),this.name="NonErrorThrown",this.thrownValue=t}};function Ge(e){return typeof e=="object"&&e!==null}function xe(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}var J9=/\r\n|[\n\r]/g;function Gi(e,t){let n=0,r=1;for(let i of e.body.matchAll(J9)){if(typeof i.index!="number"&&xe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Rc(e){return Qa(e.source,Gi(e.source,e.start))}function Qa(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,l=`${e.name}:${o}:${u} +`,c=r.split(/\r\n|[\n\r]/g),f=c[i];if(f.length>120){let h=Math.floor(u/80),m=u%80,g=[];for(let E=0;E["|",E]),["|","^".padStart(m)],["|",g[h+1]]])}return l+um([[`${o-1} |`,c[i-1]],[`${o} |`,f],["|","^".padStart(u)],[`${o+1} |`,c[i+1]]])}function um(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` +`)}var I=class e extends Error{constructor(t,n={}){let{nodes:r,source:i,positions:s,path:o,originalError:a,cause:u,extensions:l}=n,c="cause"in n,f=c?u:a,h=c||a!=null?{cause:f}:void 0;super(t,h),this.name="GraphQLError",this.path=o??void 0;let m=a??(u instanceof Error?u:void 0);this.originalError=m,this.nodes=lm(Array.isArray(r)?r:r?[r]:void 0);let g=lm(this.nodes?.map(v=>v.loc).filter(v=>v!=null));this.source=i??g?.[0]?.source,this.positions=s??g?.map(v=>v.start),this.locations=s&&i?s.map(v=>Gi(i,v)):g?.map(v=>Gi(v.source,v.start));let E=Ge(m?.extensions)?m.extensions:void 0;this.extensions=l??E??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),a?.stack!=null?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` + +`+Rc(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` + +`+Qa(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function lm(e){return e===void 0||e.length===0?void 0:e}function uo(e){if(e instanceof I)return e;let t=am(e);return new I(t.message,{originalError:t})}var Ft=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};function cm(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function fm(e){return dm("or",e)}function pm(e){return dm("and",e)}function dm(e,t){switch(t.length===0&&xe(!1),t.length){case 1:return t[0];case 2:return t[0]+" "+e+" "+t[1]}let n=t.slice(0,-1),r=t.at(-1);return n.join(", ")+", "+e+" "+r}function Jt(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function qi(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}function _n(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function lo(e){return e.length===0?"":` at ${e.map(t=>typeof t=="number"?`[${t}]`:`.${t}`).join("")}`}var co=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Hi=class{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},fo={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentArgument:["name","value"],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},X9=new Set(Object.keys(fo));function po(e){let t=e?.kind;return typeof t=="string"&&X9.has(t)}var ot={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"};var D={};Sp(D,{ARGUMENT:()=>iy,ARGUMENT_COORDINATE:()=>Hy,BOOLEAN:()=>dy,DIRECTIVE:()=>Ey,DIRECTIVE_ARGUMENT_COORDINATE:()=>Qy,DIRECTIVE_COORDINATE:()=>Wy,DIRECTIVE_DEFINITION:()=>Oy,DIRECTIVE_EXTENSION:()=>My,DOCUMENT:()=>Z9,ENUM:()=>my,ENUM_TYPE_DEFINITION:()=>Ly,ENUM_TYPE_EXTENSION:()=>$y,ENUM_VALUE_DEFINITION:()=>Iy,FIELD:()=>ry,FIELD_DEFINITION:()=>Fy,FLOAT:()=>fy,FRAGMENT_ARGUMENT:()=>sy,FRAGMENT_DEFINITION:()=>uy,FRAGMENT_SPREAD:()=>oy,INLINE_FRAGMENT:()=>ay,INPUT_OBJECT_TYPE_DEFINITION:()=>Ry,INPUT_OBJECT_TYPE_EXTENSION:()=>jy,INPUT_VALUE_DEFINITION:()=>Ay,INT:()=>cy,INTERFACE_TYPE_DEFINITION:()=>Cy,INTERFACE_TYPE_EXTENSION:()=>Vy,LIST:()=>gy,LIST_TYPE:()=>xy,MEMBER_COORDINATE:()=>qy,NAME:()=>K9,NAMED_TYPE:()=>by,NON_NULL_TYPE:()=>vy,NULL:()=>hy,OBJECT:()=>Dy,OBJECT_FIELD:()=>yy,OBJECT_TYPE_DEFINITION:()=>Sy,OBJECT_TYPE_EXTENSION:()=>By,OPERATION_DEFINITION:()=>ey,OPERATION_TYPE_DEFINITION:()=>Ny,SCALAR_TYPE_DEFINITION:()=>Ty,SCALAR_TYPE_EXTENSION:()=>Py,SCHEMA_DEFINITION:()=>_y,SCHEMA_EXTENSION:()=>ky,SELECTION_SET:()=>ny,STRING:()=>py,TYPE_COORDINATE:()=>Gy,UNION_TYPE_DEFINITION:()=>wy,UNION_TYPE_EXTENSION:()=>Uy,VARIABLE:()=>ly,VARIABLE_DEFINITION:()=>ty});var K9="Name",Z9="Document",ey="OperationDefinition",ty="VariableDefinition",ny="SelectionSet",ry="Field",iy="Argument",sy="FragmentArgument",oy="FragmentSpread",ay="InlineFragment",uy="FragmentDefinition",ly="Variable",cy="IntValue",fy="FloatValue",py="StringValue",dy="BooleanValue",hy="NullValue",my="EnumValue",gy="ListValue",Dy="ObjectValue",yy="ObjectField",Ey="Directive",by="NamedType",xy="ListType",vy="NonNullType",_y="SchemaDefinition",Ny="OperationTypeDefinition",Ty="ScalarTypeDefinition",Sy="ObjectTypeDefinition",Fy="FieldDefinition",Ay="InputValueDefinition",Cy="InterfaceTypeDefinition",wy="UnionTypeDefinition",Ly="EnumTypeDefinition",Iy="EnumValueDefinition",Ry="InputObjectTypeDefinition",Oy="DirectiveDefinition",ky="SchemaExtension",My="DirectiveExtension",Py="ScalarTypeExtension",By="ObjectTypeExtension",Vy="InterfaceTypeExtension",Uy="UnionTypeExtension",$y="EnumTypeExtension",jy="InputObjectTypeExtension",Gy="TypeCoordinate",qy="MemberCoordinate",Hy="ArgumentCoordinate",Wy="DirectiveCoordinate",Qy="DirectiveArgumentCoordinate";function Mt(e,t){if(!e)throw new Error(t)}var zy=5;function At(e,t){let[n,r]=t?[e,t]:[void 0,e];if(r.length===0)return"";let i=" Did you mean ";n!=null&&(i+=n+" ");let s=fm(r.slice(0,zy).map(o=>`"${o}"`));return i+s+"?"}function Oc(e){return e}function on(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}function Wi(e,t){let n=0,r=0;for(;n0);let a=0;do++r,a=a*10+s-kc,s=t.charCodeAt(r);while(za(s)&&a>0);if(oa)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}var kc=48,Yy=57;function za(e){return!isNaN(e)&&kc<=e&&e<=Yy}function wt(e,t){let n=Object.create(null),r=new Mc(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{let a=n[s]-n[o];return a!==0?a:Wi(s,o)})}var Mc=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=hm(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=hm(r),s=this._inputArray;if(i.lengthn)return;let u=this._rows;for(let c=0;c<=a;c++)u[0][c]=c;for(let c=1;c<=o;c++){let f=u[(c-1)%3],h=u[c%3],m=h[0]=c;for(let g=1;g<=a;g++){let E=i[c-1]===s[g-1]?0:1,v=Math.min(f[g]+1,h[g-1]+1,f[g-1]+E);if(c>1&&g>1&&i[c-1]===s[g-2]&&i[c-2]===s[g-1]){let N=u[(c-2)%3][g-2];v=Math.min(v,N+1)}vn)return}let l=u[o%3][a];return l<=n?l:void 0}};function hm(e){let t=e.length,n=new Array(t);for(let r=0;r=48&&e<=57}function mm(e){return e>=97&&e<=122||e>=65&&e<=90}function ho(e){return mm(e)||e===95}function Ja(e){return mm(e)||Gr(e)||e===95}function gm(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;is===0?i:i.slice(t)).slice(n??0,r+1)}function Jy(e){let t=0;for(;t1&&r.slice(1).every(m=>m.length===0||Ya(m.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),l=a||u,c=!t?.minimize&&(!i||e.length>70||l||s||o),f="",h=i&&Ya(e.charCodeAt(0));return(c&&!h||s)&&(f+=` +`),f+=n,(c||l)&&(f+=` +`),'"""'+f+'"""'}function ym(e){return`"${e.replace(Xy,Ky)}"`}var Xy=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Ky(e){return Zy[e.charCodeAt(0)]}var Zy=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];var jn=Object.freeze({});function yt(e,t,n=fo){let r=new Map;for(let g of Object.values(D))r.set(g,qr(t,g));let i,s=Array.isArray(e),o=[e],a=-1,u=[],l=e,c,f,h=[],m=[];do{a++;let g=a===o.length,E=g&&u.length!==0;if(g){if(c=m.length===0?void 0:h[h.length-1],l=f,f=m.pop(),E)if(s){l=l.slice();let N=0;for(let[L,M]of u){let w=L-N;M===null?(l.splice(w,1),N++):l[w]=M}}else{l={...l};for(let[N,L]of u)l[N]=L}a=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(f!=null){if(c=s?a:o[a],l=f[c],l==null)continue;h.push(c)}let v;if(!Array.isArray(l)){if(po(l)||Mt(!1,`Invalid AST Node: ${H(l)}.`),v=(g?r.get(l.kind)?.leave:r.get(l.kind)?.enter)?.call(t,l,c,f,h,m),v===jn)break;if(v===!1){if(!g){h.pop();continue}}else if(v!==void 0&&(u.push([c,v]),!g))if(po(v))l=v;else{h.pop();continue}}v===void 0&&E&&u.push([c,l]),g?h.pop():(i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(l),o=s?l:n[l.kind]??[],a=-1,u=[],f!=null&&m.push(f),f=l)}while(i!==void 0);return u.length!==0?u.at(-1)[1]:e}function mo(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(D)){let i=!1,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;ue.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>K(e.definitions,` + +`)},OperationDefinition:{leave(e){let t=Pc(e.variableDefinitions)?oe(`( +`,K(e.variableDefinitions,` +`),` +)`):oe("(",K(e.variableDefinitions,", "),")"),n=oe("",e.description,` +`)+K([e.operation,K([e.name,t]),K(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>oe("",i,` +`)+e+": "+t+oe(" = ",n)+oe(" ",K(r," "))},SelectionSet:{leave:({selections:e})=>Xt(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let s=K([oe("",e,": "),t],"");return K([Em(s,n),oe(" ",K(r," ")),oe(" ",i)])}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentArgument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,arguments:t,directives:n})=>{let r="..."+e;return Em(r,t)+oe(" ",K(n," "))}},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>K(["...",oe("on ",e),K(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:s})=>oe("",s,` +`)+`fragment ${e}${oe("(",K(n,", "),")")} on ${t} ${oe("",K(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t===!0?Dm(e):ym(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>{let t="["+K(e,", ")+"]";return t.length>Bc?`[ +`+go(K(e,` +`))+` +]`:t}},ObjectValue:{leave:({fields:e})=>{let t="{ "+K(e,", ")+" }";return t.length>Bc?Xt(e):t}},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+oe("(",K(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>oe("",e,` +`)+K(["schema",K(t," "),Xt(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>oe("",e,` +`)+K(["scalar",t,K(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>oe("",e,` +`)+K(["type",t,oe("implements ",K(n," & ")),K(r," "),Xt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>oe("",e,` +`)+t+(Pc(n)?oe(`( +`,go(K(n,` `)),` -)`)),ne([u,ne(s," "),o]," ")},Argument:function(t){var n=t.name,r=t.value;return n+": "+r},FragmentSpread:function(t){var n=t.name,r=t.directives;return"..."+n+Xe(" ",ne(r," "))},InlineFragment:function(t){var n=t.typeCondition,r=t.directives,i=t.selectionSet;return ne(["...",Xe("on ",n),ne(r," "),i]," ")},FragmentDefinition:function(t){var n=t.name,r=t.typeCondition,i=t.variableDefinitions,s=t.directives,o=t.selectionSet;return"fragment ".concat(n).concat(Xe("(",ne(i,", "),")")," ")+"on ".concat(r," ").concat(Xe("",ne(s," ")," "))+o},IntValue:function(t){var n=t.value;return n},FloatValue:function(t){var n=t.value;return n},StringValue:function(t,n){var r=t.value,i=t.block;return i?Pd(r,n==="description"?"":" "):JSON.stringify(r)},BooleanValue:function(t){var n=t.value;return n?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){var n=t.value;return n},ListValue:function(t){var n=t.values;return"["+ne(n,", ")+"]"},ObjectValue:function(t){var n=t.fields;return"{"+ne(n,", ")+"}"},ObjectField:function(t){var n=t.name,r=t.value;return n+": "+r},Directive:function(t){var n=t.name,r=t.arguments;return"@"+n+Xe("(",ne(r,", "),")")},NamedType:function(t){var n=t.name;return n},ListType:function(t){var n=t.type;return"["+n+"]"},NonNullType:function(t){var n=t.type;return n+"!"},SchemaDefinition:mn(function(e){var t=e.directives,n=e.operationTypes;return ne(["schema",ne(t," "),gn(n)]," ")}),OperationTypeDefinition:function(t){var n=t.operation,r=t.type;return n+": "+r},ScalarTypeDefinition:mn(function(e){var t=e.name,n=e.directives;return ne(["scalar",t,ne(n," ")]," ")}),ObjectTypeDefinition:mn(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return ne(["type",t,Xe("implements ",ne(n," & ")),ne(r," "),gn(i)]," ")}),FieldDefinition:mn(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(Gd(n)?Xe(`( -`,qa(ne(n,` +)`):oe("(",K(n,", "),")"))+": "+r+oe(" ",K(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>oe("",e,` +`)+K([t+": "+n,oe("= ",r),K(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>oe("",e,` +`)+K(["interface",t,oe("implements ",K(n," & ")),K(r," "),Xt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>oe("",e,` +`)+K(["union",t,K(n," "),oe("= ",K(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>oe("",e,` +`)+K(["enum",t,K(n," "),Xt(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>oe("",e,` +`)+K([t,K(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>oe("",e,` +`)+K(["input",t,K(n," "),Xt(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,directives:r,repeatable:i,locations:s})=>oe("",e,` +`)+"directive @"+t+(Pc(n)?oe(`( +`,go(K(n,` `)),` -)`):Xe("(",ne(n,", "),")"))+": "+r+Xe(" ",ne(i," "))}),InputValueDefinition:mn(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return ne([t+": "+n,Xe("= ",r),ne(i," ")]," ")}),InterfaceTypeDefinition:mn(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return ne(["interface",t,Xe("implements ",ne(n," & ")),ne(r," "),gn(i)]," ")}),UnionTypeDefinition:mn(function(e){var t=e.name,n=e.directives,r=e.types;return ne(["union",t,ne(n," "),r&&r.length!==0?"= "+ne(r," | "):""]," ")}),EnumTypeDefinition:mn(function(e){var t=e.name,n=e.directives,r=e.values;return ne(["enum",t,ne(n," "),gn(r)]," ")}),EnumValueDefinition:mn(function(e){var t=e.name,n=e.directives;return ne([t,ne(n," ")]," ")}),InputObjectTypeDefinition:mn(function(e){var t=e.name,n=e.directives,r=e.fields;return ne(["input",t,ne(n," "),gn(r)]," ")}),DirectiveDefinition:mn(function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(Gd(n)?Xe(`( -`,qa(ne(n,` +)`):oe("(",K(n,", "),")"))+oe(" ",K(r," "))+(i?" repeatable":"")+" on "+K(s," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>K(["extend schema",K(e," "),Xt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>K(["extend scalar",e,K(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>K(["extend type",e,oe("implements ",K(t," & ")),K(n," "),Xt(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>K(["extend interface",e,oe("implements ",K(t," & ")),K(n," "),Xt(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>K(["extend union",e,K(t," "),oe("= ",K(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>K(["extend enum",e,K(t," "),Xt(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>K(["extend input",e,K(t," "),Xt(n)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>K(["extend directive @"+e,K(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>K([e,oe(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>K([e,oe(".",t),oe("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>K(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>K(["@",e,oe("(",t,":)")])}};function K(e,t=""){return e?.filter(n=>n!==void 0&&n!=="").join(t)??""}function Xt(e){return oe(`{ +`,go(K(e,` `)),` -)`):Xe("(",ne(n,", "),")"))+(r?" repeatable":"")+" on "+ne(i," | ")}),SchemaExtension:function(t){var n=t.directives,r=t.operationTypes;return ne(["extend schema",ne(n," "),gn(r)]," ")},ScalarTypeExtension:function(t){var n=t.name,r=t.directives;return ne(["extend scalar",n,ne(r," ")]," ")},ObjectTypeExtension:function(t){var n=t.name,r=t.interfaces,i=t.directives,s=t.fields;return ne(["extend type",n,Xe("implements ",ne(r," & ")),ne(i," "),gn(s)]," ")},InterfaceTypeExtension:function(t){var n=t.name,r=t.interfaces,i=t.directives,s=t.fields;return ne(["extend interface",n,Xe("implements ",ne(r," & ")),ne(i," "),gn(s)]," ")},UnionTypeExtension:function(t){var n=t.name,r=t.directives,i=t.types;return ne(["extend union",n,ne(r," "),i&&i.length!==0?"= "+ne(i," | "):""]," ")},EnumTypeExtension:function(t){var n=t.name,r=t.directives,i=t.values;return ne(["extend enum",n,ne(r," "),gn(i)]," ")},InputObjectTypeExtension:function(t){var n=t.name,r=t.directives,i=t.fields;return ne(["extend input",n,ne(r," "),gn(i)]," ")}};function mn(e){return function(t){return ne([t.description,e(t)],` -`)}}function ne(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(t=e?.filter(function(r){return r}).join(n))!==null&&t!==void 0?t:""}function gn(e){return Xe(`{ -`,qa(ne(e,` +}`)}function oe(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function go(e){return oe(" ",e.replaceAll(` +`,` + `))}function Pc(e){return e?.some(t=>t.includes(` +`))??!1}function Em(e,t){let n=e+oe("(",K(t,", "),")");return n.length>Bc&&(n=e+oe(`( +`,go(K(t,` `)),` -}`)}function Xe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return t!=null&&t!==""?e+t+n:""}function qa(e){return Xe(" ",e.replace(/\n/g,` - `))}function y7(e){return e.indexOf(` -`)!==-1}function Gd(e){return e!=null&&e.some(y7)}function so(e,t){switch(e.kind){case x.NULL:return null;case x.INT:return parseInt(e.value,10);case x.FLOAT:return parseFloat(e.value);case x.STRING:case x.ENUM:case x.BOOLEAN:return e.value;case x.LIST:return e.values.map(function(n){return so(n,t)});case x.OBJECT:return dn(e.fields,function(n){return n.name.value},function(n){return so(n.value,t)});case x.VARIABLE:return t?.[e.name.value]}Ge(0,"Unexpected value node: "+G(e))}function qd(e,t){for(var n=0;n0?e:void 0}var Vt=(function(){function e(n){var r,i,s,o=(r=n.parseValue)!==null&&r!==void 0?r:ja;this.name=n.name,this.description=n.description,this.specifiedByUrl=n.specifiedByUrl,this.serialize=(i=n.serialize)!==null&&i!==void 0?i:ja,this.parseValue=o,this.parseLiteral=(s=n.parseLiteral)!==null&&s!==void 0?s:function(a,u){return o(so(a,u))},this.extensions=n.extensions&&Nt(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Pi(n.extensionASTNodes),typeof n.name=="string"||fe(0,"Must provide name."),n.specifiedByUrl==null||typeof n.specifiedByUrl=="string"||fe(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(G(n.specifiedByUrl),".")),n.serialize==null||typeof n.serialize=="function"||fe(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),n.parseLiteral&&(typeof n.parseValue=="function"&&typeof n.parseLiteral=="function"||fe(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var r;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ki(e,[{key:_t,get:function(){return"GraphQLScalarType"}}]),e})();Mt(Vt);var ft=(function(){function e(n){this.name=n.name,this.description=n.description,this.isTypeOf=n.isTypeOf,this.extensions=n.extensions&&Nt(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Pi(n.extensionASTNodes),this._fields=Hd.bind(void 0,n),this._interfaces=$d.bind(void 0,n),typeof n.name=="string"||fe(0,"Must provide name."),n.isTypeOf==null||typeof n.isTypeOf=="function"||fe(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(G(n.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Wd(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ki(e,[{key:_t,get:function(){return"GraphQLObjectType"}}]),e})();Mt(ft);function $d(e){var t,n=(t=Ya(e.interfaces))!==null&&t!==void 0?t:[];return Array.isArray(n)||fe(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function Hd(e){var t=Ya(e.fields);return Oi(t)||fe(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),tn(t,function(n,r){var i;Oi(n)||fe(0,"".concat(e.name,".").concat(r," field config must be an object.")),!("isDeprecated"in n)||fe(0,"".concat(e.name,".").concat(r,' should provide "deprecationReason" instead of "isDeprecated".')),n.resolve==null||typeof n.resolve=="function"||fe(0,"".concat(e.name,".").concat(r," field resolver must be a function if ")+"provided, but got: ".concat(G(n.resolve),"."));var s=(i=n.args)!==null&&i!==void 0?i:{};Oi(s)||fe(0,"".concat(e.name,".").concat(r," args must be an object with argument names as keys."));var o=hn(s).map(function(a){var u=a[0],l=a[1];return{name:u,description:l.description,type:l.type,defaultValue:l.defaultValue,deprecationReason:l.deprecationReason,extensions:l.extensions&&Nt(l.extensions),astNode:l.astNode}});return{name:r,description:n.description,type:n.type,args:o,resolve:n.resolve,subscribe:n.subscribe,isDeprecated:n.deprecationReason!=null,deprecationReason:n.deprecationReason,extensions:n.extensions&&Nt(n.extensions),astNode:n.astNode}})}function Oi(e){return xt(e)&&!Array.isArray(e)}function Wd(e){return tn(e,function(t){return{description:t.description,type:t.type,args:Tc(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function Tc(e){return dn(e,function(t){return t.name},function(t){return{description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function Qn(e){return he(e.type)&&e.defaultValue===void 0}var Ut=(function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&Nt(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Pi(n.extensionASTNodes),this._fields=Hd.bind(void 0,n),this._interfaces=$d.bind(void 0,n),typeof n.name=="string"||fe(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||fe(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(G(n.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var r;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Wd(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ki(e,[{key:_t,get:function(){return"GraphQLInterfaceType"}}]),e})();Mt(Ut);var zn=(function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&Nt(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Pi(n.extensionASTNodes),this._types=E7.bind(void 0,n),typeof n.name=="string"||fe(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||fe(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(G(n.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},t.toConfig=function(){var r;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ki(e,[{key:_t,get:function(){return"GraphQLUnionType"}}]),e})();Mt(zn);function E7(e){var t=Ya(e.types);return Array.isArray(t)||fe(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}var Rt=(function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&Nt(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Pi(n.extensionASTNodes),this._values=b7(this.name,n.values),this._valueLookup=new Map(this._values.map(function(r){return[r.value,r]})),this._nameLookup=Lt(this._values,function(r){return r.name}),typeof n.name=="string"||fe(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(r){return this._nameLookup[r]},t.serialize=function(r){var i=this._valueLookup.get(r);if(i===void 0)throw new M('Enum "'.concat(this.name,'" cannot represent value: ').concat(G(r)));return i.name},t.parseValue=function(r){if(typeof r!="string"){var i=G(r);throw new M('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(i,".")+$a(this,i))}var s=this.getValue(r);if(s==null)throw new M('Value "'.concat(r,'" does not exist in "').concat(this.name,'" enum.')+$a(this,r));return s.value},t.parseLiteral=function(r,i){if(r.kind!==x.ENUM){var s=Ae(r);throw new M('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(s,".")+$a(this,s),r)}var o=this.getValue(r.value);if(o==null){var a=Ae(r);throw new M('Value "'.concat(a,'" does not exist in "').concat(this.name,'" enum.')+$a(this,a),r)}return o.value},t.toConfig=function(){var r,i=dn(this.getValues(),function(s){return s.name},function(s){return{description:s.description,value:s.value,deprecationReason:s.deprecationReason,extensions:s.extensions,astNode:s.astNode}});return{name:this.name,description:this.description,values:i,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ki(e,[{key:_t,get:function(){return"GraphQLEnumType"}}]),e})();Mt(Rt);function $a(e,t){var n=e.getValues().map(function(i){return i.name}),r=$t(t,n);return Bt("the enum value",r)}function b7(e,t){return Oi(t)||fe(0,"".concat(e," values must be an object with value names as keys.")),hn(t).map(function(n){var r=n[0],i=n[1];return Oi(i)||fe(0,"".concat(e,".").concat(r,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(G(i),".")),!("isDeprecated"in i)||fe(0,"".concat(e,".").concat(r,' should provide "deprecationReason" instead of "isDeprecated".')),{name:r,description:i.description,value:i.value!==void 0?i.value:r,isDeprecated:i.deprecationReason!=null,deprecationReason:i.deprecationReason,extensions:i.extensions&&Nt(i.extensions),astNode:i.astNode}})}var vn=(function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&Nt(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Pi(n.extensionASTNodes),this._fields=x7.bind(void 0,n),typeof n.name=="string"||fe(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var r,i=tn(this.getFields(),function(s){return{description:s.description,type:s.type,defaultValue:s.defaultValue,deprecationReason:s.deprecationReason,extensions:s.extensions,astNode:s.astNode}});return{name:this.name,description:this.description,fields:i,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ki(e,[{key:_t,get:function(){return"GraphQLInputObjectType"}}]),e})();Mt(vn);function x7(e){var t=Ya(e.fields);return Oi(t)||fe(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),tn(t,function(n,r){return!("resolve"in n)||fe(0,"".concat(e.name,".").concat(r," field has a resolve property, but Input Types cannot define resolvers.")),{name:r,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&Nt(n.extensions),astNode:n.astNode}})}function Bi(e){return he(e.type)&&e.defaultValue===void 0}function Vi(e,t){return e===t?!0:he(e)&&he(t)||we(e)&&we(t)?Vi(e.ofType,t.ofType):!1}function An(e,t,n){return t===n?!0:he(n)?he(t)?An(e,t.ofType,n.ofType):!1:he(t)?An(e,t.ofType,n):we(n)?we(t)?An(e,t.ofType,n.ofType):!1:we(t)?!1:It(n)&&(ye(t)||ve(t))&&e.isSubType(n,t)}function Qr(e,t,n){return t===n?!0:It(t)?It(n)?e.getPossibleTypes(t).some(function(r){return e.isSubType(n,r)}):e.isSubType(t,n):It(n)?e.isSubType(n,t):!1}var _7=Array.from||function(e,t,n){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r=e[wa];if(typeof r=="function"){for(var i=r.call(e),s=[],o,a=0;!(o=i.next()).done;++a)if(s.push(t.call(n,o.value,a)),a>9999999)throw new TypeError("Near-infinite iteration.");return s}var u=e.length;if(typeof u=="number"&&u>=0&&u%1===0){for(var l=[],c=0;c1&&arguments[1]!==void 0?arguments[1]:function(c){return c};if(e==null||Xa(e)!=="object")return null;if(Array.isArray(e))return e.map(t);var n=e[wa];if(typeof n=="function"){for(var r=n.call(e),i=[],s,o=0;!(s=r.next()).done;++o)i.push(t(s.value,o));return i}var a=e.length;if(typeof a=="number"&&a>=0&&a%1===0){for(var u=[],l=0;lSc||nSc||eSc||nDo(n,t));case D.OBJECT:return on(e.fields,n=>n.name.value,n=>Do(n.value,t));case D.VARIABLE:return t?.[e.name.value]}}function Pt(e){if(e.length===0)throw new I("Expected name to be a non-empty string.");for(let t=1;tthis.coerceInputValue(Do(n,r))),this.coerceOutputValue=t.coerceOutputValue??this.serialize,this.coerceInputValue=t.coerceInputValue??this.parseValue,this.coerceInputLiteral=t.coerceInputLiteral,this.valueToLiteral=t.valueToLiteral,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||Mt(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)),t.coerceInputLiteral&&(typeof t.coerceInputValue=="function"&&typeof t.coerceInputLiteral=="function"||Mt(!1,`${this.name} must provide both "coerceInputValue" and "coerceInputLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,coerceOutputValue:this.coerceOutputValue,coerceInputValue:this.coerceInputValue,coerceInputLiteral:this.coerceInputLiteral,valueToLiteral:this.valueToLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},qe=class{constructor(t){this.__kind=Uc,this.__kind=Uc,this.name=Pt(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],this._fields=Cm.bind(void 0,this,t.fields),this._interfaces=Am.bind(void 0,t.interfaces)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:_n(this.getFields(),t=>t.toConfig()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function Am(e){return iu(e??[])}function Cm(e,t){let n=bo(t);return _n(n,(r,i)=>new Hr(e,i,r))}var Hr=class{constructor(t,n,r){this.__kind=tE,this.parentType=t,this.name=Pt(n),this.description=r.description,this.type=r.type;let i=r.args;this.args=i?Object.entries(i).map(([s,o])=>new Qi(this,s,o)):[],this.resolve=r.resolve,this.subscribe=r.subscribe,this.deprecationReason=r.deprecationReason,this.extensions=Lt(r.extensions),this.astNode=r.astNode}get[Symbol.toStringTag](){return"GraphQLField"}toConfig(){return{description:this.description,type:this.type,args:on(this.args,t=>t.name,t=>t.toConfig()),resolve:this.resolve,subscribe:this.subscribe,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentType??""}.${this.name}`}toJSON(){return this.toString()}},Qi=class{constructor(t,n,r){this.__kind=xm,this.parent=t,this.name=Pt(n),this.description=r.description,this.type=r.type,this.defaultValue=r.defaultValue,this.default=r.default,this._memoizedCoercedDefaultValue=void 0,this.deprecationReason=r.deprecationReason,this.extensions=Lt(r.extensions),this.astNode=r.astNode}get[Symbol.toStringTag](){return"GraphQLArgument"}toConfig(){return{description:this.description,type:this.type,defaultValue:this.defaultValue,default:this.default,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parent}(${this.name}:)`}toJSON(){return this.toString()}};function Zt(e){return ae(e.type)&&e.default===void 0&&e.defaultValue===void 0}var bt=class{constructor(t){this.__kind=vm,this.name=Pt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],this._fields=Cm.bind(void 0,this,t.fields),this._interfaces=Am.bind(void 0,t.interfaces)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:_n(this.getFields(),t=>t.toConfig()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},an=class{constructor(t){this.__kind=_m,this.name=Pt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],this._types=iE.bind(void 0,t.types)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function iE(e){return iu(e)}var dt=class{constructor(t){this.__kind=Nm,this.name=Pt(t.name),this.description=t.description,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],this._values=sE.bind(void 0,this,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=this._values()),this._values}getValue(t){return this._nameLookup??=qi(this.getValues(),n=>n.name),this._nameLookup[t]}serialize(t){return this.coerceOutputValue(t)}coerceOutputValue(t){this._valueLookup??=new Map(this.getValues().map(r=>[r.value,r]));let n=this._valueLookup.get(t);if(n===void 0)throw new I(`Enum "${this.name}" cannot represent value: ${H(t)}`);return n.name}parseValue(t,n){return this.coerceInputValue(t,n)}coerceInputValue(t,n){if(typeof t!="string"){let i=H(t);throw new I(`Enum "${this.name}" cannot represent non-string value: ${i}.`+(n?"":Xa(this,i)))}let r=this.getValue(t);if(r==null)throw new I(`Value "${t}" does not exist in "${this.name}" enum.`+(n?"":Xa(this,t)));return r.value}parseLiteral(t,n,r){return this.coerceInputLiteral(t,r)}coerceInputLiteral(t,n){if(t.kind!==D.ENUM){let i=ve(t);throw new I(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+(n?"":Xa(this,i)),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=ve(t);throw new I(`Value "${i}" does not exist in "${this.name}" enum.`+(n?"":Xa(this,i)),{nodes:t})}return r.value}valueToLiteral(t){if(typeof t=="string"&&this.getValue(t))return{kind:D.ENUM,value:t}}toConfig(){return{name:this.name,description:this.description,values:on(this.getValues(),t=>t.name,t=>t.toConfig()),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function sE(e,t){let n=bo(t);return Object.entries(n).map(([r,i])=>new $c(e,r,i))}function Xa(e,t){let n=e.getValues().map(i=>i.name),r=wt(t,n);return At("the enum value",r)}var $c=class{constructor(t,n,r){this.__kind=nE,this.parentEnum=t,this.name=Vc(n),this.description=r.description,this.value=r.value!==void 0?r.value:n,this.deprecationReason=r.deprecationReason,this.extensions=Lt(r.extensions),this.astNode=r.astNode}get[Symbol.toStringTag](){return"GraphQLEnumValue"}toConfig(){return{description:this.description,value:this.value,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentEnum.name}.${this.name}`}toJSON(){return this.toString()}},Gt=class{constructor(t){this.__kind=Tm,this.name=Pt(t.name),this.description=t.description,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],this.isOneOf=t.isOneOf??!1,this._fields=oE.bind(void 0,this,t.fields)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){return{name:this.name,description:this.description,fields:_n(this.getFields(),t=>t.toConfig()),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};function oE(e,t){let n=bo(t);return _n(n,(r,i)=>new jc(e,i,r))}var jc=class{constructor(t,n,r){"resolve"in r&&Mt(!1,`${t}.${n} field has a resolve property, but Input Types cannot define resolvers.`),this.__kind=rE,this.parentType=t,this.name=Pt(n),this.description=r.description,this.type=r.type,this.defaultValue=r.defaultValue,this.default=r.default,this._memoizedCoercedDefaultValue=void 0,this.deprecationReason=r.deprecationReason,this.extensions=Lt(r.extensions),this.astNode=r.astNode}get[Symbol.toStringTag](){return"GraphQLInputField"}toConfig(){return{description:this.description,type:this.type,defaultValue:this.defaultValue,default:this.default,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentType}.${this.name}`}toJSON(){return this.toString()}};function Ht(e){return ae(e.type)&&e.defaultValue===void 0&&e.default===void 0}function Yi(e,t){return e===t?!0:ae(e)&&ae(t)||pe(e)&&pe(t)?Yi(e.ofType,t.ofType):!1}function Tn(e,t,n){return t===n?!0:ae(n)?ae(t)?Tn(e,t.ofType,n.ofType):!1:ae(t)?Tn(e,t.ofType,n):pe(n)?pe(t)?Tn(e,t.ofType,n.ofType):!1:pe(t)?!1:ht(n)&&(De(t)||ge(t))&&e.isSubType(n,t)}function Qr(e,t,n){return t===n?!0:ht(t)?ht(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):ht(n)?e.isSubType(n,t):!1}function zr(e,t,n){return{prev:e,key:t,typename:n}}function xo(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Gn(e,t){if(ae(t))return e==null?void 0:Gn(e,t.ofType);if(e==null)return{kind:D.NULL};if(pe(t)){if(!Jt(e))return Gn(e,t.ofType);let r=[];for(let i of e){let s=Gn(i,t.ofType);if(!s)return;r.push(s)}return{kind:D.LIST,values:r}}if(ue(t)){if(!Ge(e))return;let r=[],i=t.getFields();if(Object.keys(e).some(o=>e[o]!==void 0&&!Object.hasOwn(i,o)))return;for(let o of Object.values(t.getFields()))if(e[o.name]===void 0){if(Ht(o))return}else{let u=Gn(e[o.name],o.type);if(!u)return;r.push({kind:D.OBJECT_FIELD,name:{kind:D.NAME,value:o.name},value:u})}return{kind:D.OBJECT,fields:r}}let n=Kt(t);if(n.valueToLiteral)try{return n.valueToLiteral(e)}catch{return}return Yr(e)}function Yr(e){if(e==null)return{kind:D.NULL};switch(typeof e){case"boolean":return{kind:D.BOOLEAN,value:e};case"string":return{kind:D.STRING,value:e,block:!1};case"bigint":return{kind:D.INT,value:e.toString()};case"number":{if(!Number.isFinite(e))return{kind:D.NULL};let t=String(e);return/^-?(?:0|[1-9][0-9]*)$/.test(t)?{kind:D.INT,value:t}:{kind:D.FLOAT,value:t}}case"object":{if(Jt(e))return{kind:D.LIST,values:Array.from(e,Yr)};let t=e,n=[];for(let r of Object.keys(t)){let i=t[r];i!==void 0&&n.push({kind:D.OBJECT_FIELD,name:{kind:D.NAME,value:r},value:Yr(i)})}return{kind:D.OBJECT,fields:n}}}throw new TypeError(`Cannot convert value to AST: ${H(e)}.`)}function Er(e,t,n){switch(e.kind){case D.VARIABLE:{let r=e.name.value,i=n?.sources[r];if(i){let o=i.value;if(o===void 0){let a=i.signature.default;return a!==void 0?a.literal:{kind:D.NULL}}return Er(o,t,i.fragmentVariableValues)}let s=t?.sources[r];if(s==null)return{kind:D.NULL};if(s.value===void 0){let o=s.signature.default;if(o!==void 0)return o.literal}return Gn(s.value,s.signature.type)}case D.OBJECT:{let r=[];for(let i of e.fields){if(i.value.kind===D.VARIABLE){let o=n?.sources[i.value.name.value]??t?.sources[i.value.name.value];if(o?.value===void 0&&o?.signature.default===void 0)continue}let s=Er(i.value,t,n);r.push({...i,value:s})}return{...e,fields:r}}case D.LIST:{let r=[];for(let i of e.values){let s=Er(i,t,n);r.push(s)}return{...e,values:r}}default:return e}}function No(e,t,n,r){return vo(e,t,n,r,void 0)}function vo(e,t,n,r,i){if(ae(t)){if(e===void 0){br(n,`Expected a value of non-null type "${t}" to be provided.`,i);return}if(e===null){br(n,`Expected value of non-null type "${t}" not to be null.`,i);return}return vo(e,t.ofType,n,r,i)}if(e!=null)if(pe(t))if(!Jt(e))vo(e,t.ofType,n,r,i);else{let s=0;for(let o of e)vo(o,t.ofType,n,r,zr(i,s++,void 0))}else if(ue(t)){if(!Ge(e)||Array.isArray(e)){br(n,`Expected value of type "${t}" to be an object, found: ${H(e)}.`,i);return}let s=t.getFields();for(let a of Object.values(s)){let u=e[a.name];u===void 0?Ht(a)&&br(n,`Expected value of type "${t}" to include required field "${a.name}", found: ${H(e)}.`,i):vo(u,a.type,n,r,zr(i,a.name,t.name))}let o=[];for(let a of Object.keys(e))if(e[a]!==void 0){if(!Object.hasOwn(s,a)){let u=r?"":At(wt(a,Object.keys(s)));br(n,`Expected value of type "${t}" not to include unknown field "${a}"${u?`.${u} Found`:", found"}: ${H(e)}.`,i);continue}o.push(a)}if(t.isOneOf){o.length!==1&&br(n,su(t),i);let a=o[0];e[a]===null&&br(n,su(t),zr(i,a,t.name))}}else{Kt(t);let s,o;try{s=t.coerceInputValue(e,r)}catch(a){if(a instanceof I){n(a,xo(i));return}o=a}s===void 0&&br(n,`Expected value of type "${t}"${o!=null?`, but encountered error "${Lm(o)}"; found`:", found"}: ${H(e)}.`,i,uo(o))}}function br(e,t,n,r){e(new I(t,{originalError:r}),xo(n))}function Jr(e,t,n,r,i,s){return _o({static:!r&&!i,onError:n,variables:r,fragmentVariableValues:i},e,t,s,void 0)}function _o(e,t,n,r,i){if(t.kind===D.VARIABLE){if(e.static)return;let o=wm(e,t)?.coerced[t.name.value];ae(n)&&(o===void 0?un(e.onError,`Expected variable "$${t.name.value}" provided to type "${n}" to provide a runtime value.`,t,i):o===null&&un(e.onError,`Expected variable "$${t.name.value}" provided to non-null type "${n}" not to be null.`,t,i));return}if(ae(n)){if(t.kind===D.NULL){un(e.onError,`Expected value of non-null type "${n}" not to be null.`,t,i);return}return _o(e,t,n.ofType,r,i)}if(t.kind!==D.NULL)if(pe(n))if(t.kind!==D.LIST)_o(e,t,n.ofType,r,i);else{let s=0;for(let o of t.values)_o(e,o,n.ofType,r,zr(i,s++,void 0))}else if(ue(n)){if(t.kind!==D.OBJECT){un(e.onError,`Expected value of type "${n}" to be an object, found: ${ve(t)}.`,t,i);return}let s=n.getFields(),o=qi(t.fields,l=>l.name.value);for(let l of Object.values(s)){let c=o[l.name];if(c===void 0)Ht(l)&&un(e.onError,`Expected value of type "${n}" to include required field "${l.name}", found: ${ve(t)}.`,t,i);else{let f=c.value;if(f.kind===D.VARIABLE&&!e.static){let h=wm(e,f),m=f.name.value,g=h?.coerced[m];if(n.isOneOf)g===void 0?un(e.onError,`Expected variable "$${m}" provided to field "${l.name}" for OneOf Input Object type "${n}" to provide a runtime value.`,t,i):g===null&&un(e.onError,`Expected variable "$${m}" provided to field "${l.name}" for OneOf Input Object type "${n}" not to be null.`,t,i);else if(g===void 0&&!Ht(l))continue}_o(e,f,l.type,r,zr(i,l.name,n.name))}}let a=t.fields,u=[];for(let l of a){let c=l.name.value;if(Object.hasOwn(s,c))u.push(l);else{let f=r?"":At(wt(c,Object.keys(s)));un(e.onError,`Expected value of type "${n}" not to include unknown field "${c}"${f?`.${f} Found`:", found"}: ${ve(t)}.`,l,i)}}if(n.isOneOf){if(u.length!==1){un(e.onError,su(n),t,i);return}if(u[0].value.kind===D.NULL){let f=u[0].name.value;un(e.onError,su(n),t,zr(i,f,void 0))}}}else{Kt(n);let s,o;try{s=n.coerceInputLiteral?n.coerceInputLiteral(Er(t,e.variables,e.fragmentVariableValues),r):n.parseLiteral(t,void 0,r)}catch(a){if(a instanceof I){e.onError(a,xo(i));return}o=a}s===void 0&&un(e.onError,`Expected value of type "${n}"${o!=null?`, but encountered error "${Lm(o)}"; found`:", found"}: ${ve(t)}.`,t,i,uo(o))}}function wm(e,t){let n=t.name.value,{fragmentVariableValues:r,variables:i}=e;return r?.sources[n]?r:i}function un(e,t,n,r,i){e(new I(t,{nodes:n,originalError:i}),xo(r))}function Lm(e){if(Ge(e)){let t=e.message;if(typeof t=="string"&&t!=="")return t}return String(e)}function su(e){return`Within OneOf Input Object type "${e}", exactly one field must be specified, and the value for that field must be non-null.`}var z={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};var Xr=2147483647,Kr=-2147483648,To=new Et({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",coerceOutputValue(e){let t=Ao(e);if(typeof t=="number")return Im(t);if(typeof t=="boolean")return t?1:0;if(typeof t=="string")return aE(t);if(typeof t=="bigint")return Rm(t);throw new I(`Int cannot represent non-integer value: ${H(t)}`)},coerceInputValue(e){if(typeof e=="number")return Im(e);if(typeof e=="bigint")return Rm(e);throw new I(`Int cannot represent non-integer value: ${H(e)}`)},coerceInputLiteral(e){if(e.kind!==D.INT)throw new I(`Int cannot represent non-integer value: ${ve(e)}`,{nodes:e});let t=parseInt(e.value,10);if(t>Xr||t=Kr)return{kind:D.INT,value:String(e)}}}),So=new Et({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",coerceOutputValue(e){let t=Ao(e);if(typeof t=="number")return Om(t);if(typeof t=="boolean")return t?1:0;if(typeof t=="string")return uE(t);if(typeof t=="bigint")return km(t);throw new I(`Float cannot represent non numeric value: ${H(t)}`)},coerceInputValue(e){if(typeof e=="number")return Om(e);if(typeof e=="bigint")return km(e);throw new I(`Float cannot represent non numeric value: ${H(e)}`)},coerceInputLiteral(e){if(e.kind!==D.FLOAT&&e.kind!==D.INT)throw new I(`Float cannot represent non numeric value: ${ve(e)}`,{nodes:e});return parseFloat(e.value)},valueToLiteral(e){let t=Yr(e);if(t.kind===D.FLOAT||t.kind===D.INT)return t}}),Se=new Et({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",coerceOutputValue(e){let t=Ao(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number")return lE(t);if(typeof t=="bigint")return String(t);throw new I(`String cannot represent value: ${H(e)}`)},coerceInputValue(e){if(typeof e!="string")throw new I(`String cannot represent a non string value: ${H(e)}`);return e},coerceInputLiteral(e){if(e.kind!==D.STRING)throw new I(`String cannot represent a non string value: ${ve(e)}`,{nodes:e});return e.value},valueToLiteral(e){let t=Yr(e);if(t.kind===D.STRING)return t}}),Re=new Et({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",coerceOutputValue(e){let t=Ao(e);if(typeof t=="boolean")return t;if(typeof t=="number")return cE(t);if(typeof t=="bigint")return t!==0n;throw new I(`Boolean cannot represent a non boolean value: ${H(t)}`)},coerceInputValue(e){if(typeof e!="boolean")throw new I(`Boolean cannot represent a non boolean value: ${H(e)}`);return e},coerceInputLiteral(e){if(e.kind!==D.BOOLEAN)throw new I(`Boolean cannot represent a non boolean value: ${ve(e)}`,{nodes:e});return e.value},valueToLiteral(e){let t=Yr(e);if(t.kind===D.BOOLEAN)return t}}),Fo=new Et({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',coerceOutputValue(e){let t=Ao(e);if(typeof t=="string")return t;if(typeof t=="number")return Gc(t);if(typeof t=="bigint")return String(t);throw new I(`ID cannot represent value: ${H(e)}`)},coerceInputValue(e){if(typeof e=="string")return e;if(typeof e=="number")return Gc(e);if(typeof e=="bigint")return String(e);throw new I(`ID cannot represent value: ${H(e)}`)},coerceInputLiteral(e){if(e.kind!==D.STRING&&e.kind!==D.INT)throw new I("ID cannot represent a non-string and non-integer value: "+ve(e),{nodes:e});return e.value},valueToLiteral(e){if(typeof e=="string")return/^-?(?:0|[1-9][0-9]*)$/.test(e)?{kind:D.INT,value:e}:{kind:D.STRING,value:e,block:!1};if(typeof e=="number")return{kind:D.INT,value:Gc(e)};if(typeof e=="bigint")return{kind:D.INT,value:String(e)}}}),ln=Object.freeze([Se,To,So,Re,Fo]);function ou(e){return ln.some(({name:t})=>e.name===t)}function Ao(e){if(Ge(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!Ge(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Im(e){if(!Number.isInteger(e))throw new I(`Int cannot represent non-integer value: ${H(e)}`);if(e>Xr||eXr||tXr||enew Qi(this,r,i))}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:on(this.args,t=>t.name,t=>t.toConfig()),isRepeatable:this.isRepeatable,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return"@"+this.name}toJSON(){return this.toString()}},Zr=new lt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[z.FIELD,z.FRAGMENT_SPREAD,z.INLINE_FRAGMENT],args:{if:{type:new Z(Re),description:"Included when true."}}}),ei=new lt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[z.FIELD,z.FRAGMENT_SPREAD,z.INLINE_FRAGMENT],args:{if:{type:new Z(Re),description:"Skipped when true."}}}),qn=new lt({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[z.FRAGMENT_SPREAD,z.INLINE_FRAGMENT],args:{if:{type:new Z(Re),description:"Deferred when true or undefined.",default:{value:!0}},label:{type:Se,description:"Unique name"}}}),Hn=new lt({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[z.FIELD],args:{initialCount:{default:{value:0},type:new Z(To),description:"Number of items to return immediately"},if:{type:new Z(Re),description:"Stream when true or undefined.",default:{value:!0}},label:{type:Se,description:"Unique name"}}}),Pm="No longer supported",Ji=new lt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[z.FIELD_DEFINITION,z.ARGUMENT_DEFINITION,z.INPUT_FIELD_DEFINITION,z.ENUM_VALUE,z.DIRECTIVE_DEFINITION],args:{reason:{type:new Z(Se),description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",default:{value:Pm}}}}),au=new lt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[z.SCALAR],args:{url:{type:new Z(Se),description:"The URL that specifies the behavior of this scalar."}}}),uu=new lt({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[z.INPUT_OBJECT],args:{}}),aw=new lt({name:"experimental_disableErrorPropagation",description:"Disables error propagation.",locations:[z.QUERY,z.MUTATION,z.SUBSCRIPTION]}),Bt=Object.freeze([Zr,ei,Ji,au,uu]);function qc(e){return Bt.some(({name:t})=>t===e.name)}function ti(e,t){if(ae(t)){let n=ti(e,t.ofType);return n?.kind===D.NULL?null:n}if(e===null)return{kind:D.NULL};if(e===void 0)return null;if(pe(t)){let n=t.ofType;if(Jt(e)){let r=[];for(let i of e){let s=ti(i,n);s!=null&&r.push(s)}return{kind:D.LIST,values:r}}return ti(e,n)}if(ue(t)){if(!Ge(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=ti(e[r.name],r.type);i&&n.push({kind:D.OBJECT_FIELD,name:{kind:D.NAME,value:r.name},value:i})}return{kind:D.OBJECT,fields:n}}if(Nn(t)){let n=t.coerceOutputValue(e);if(n==null)return null;if(typeof n=="boolean")return{kind:D.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return Bm.test(r)?{kind:D.INT,value:r}:{kind:D.FLOAT,value:r}}if(typeof n=="bigint")return{kind:D.INT,value:String(n)};if(typeof n=="string")return Me(t)?{kind:D.ENUM,value:n}:t===Fo&&Bm.test(n)?{kind:D.INT,value:n}:{kind:D.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${H(n)}.`)}xe(!1,"Unexpected input type: "+H(t))}var Bm=/^-?(?:0|[1-9][0-9]*)$/;function Vm(e){let t=e.type,n=e.default;if(n){let i=n.literal??Gn(n.value,t);return i==null&&xe(!1,"Invalid default value"),i}let r=e.defaultValue;if(r!==void 0){let i=ti(r,t);return i==null&&xe(!1,"Invalid default value"),i}}var Xi=new qe({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Se,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Z(new Te(new Z(Wt))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Z(Wt),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Wt,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Wt,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Z(new Te(new Z(lu))),args:{includeDeprecated:{type:new Z(Re),default:{value:!1}}},resolve:(e,{includeDeprecated:t})=>t===!0?e.getDirectives():e.getDirectives().filter(n=>n.deprecationReason==null)}})}),lu=new qe({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new oe(Qe),resolve:function(n){return n.name}},description:{type:Qe,resolve:function(n){return n.description}},isRepeatable:{type:new oe(Ze),resolve:function(n){return n.isRepeatable}},locations:{type:new oe(new Re(new oe(eu))),resolve:function(n){return n.locations}},args:{type:new oe(new Re(new oe(ji))),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;return i?n.args:n.args.filter(function(s){return s.deprecationReason==null})}}}}}),eu=new Rt({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:K.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:K.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:K.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:K.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:K.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:K.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:K.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:K.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:K.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:K.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:K.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:K.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:K.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:K.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:K.UNION,description:"Location adjacent to a union definition."},ENUM:{value:K.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:K.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:K.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:K.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Xt=new ft({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new oe(ru),resolve:function(n){if(mt(n))return Me.SCALAR;if(ve(n))return Me.OBJECT;if(ye(n))return Me.INTERFACE;if(rt(n))return Me.UNION;if(qe(n))return Me.ENUM;if(xe(n))return Me.INPUT_OBJECT;if(we(n))return Me.LIST;if(he(n))return Me.NON_NULL;Ge(0,'Unexpected type: "'.concat(G(n),'".'))}},name:{type:Qe,resolve:function(n){return n.name!==void 0?n.name:void 0}},description:{type:Qe,resolve:function(n){return n.description!==void 0?n.description:void 0}},specifiedByUrl:{type:Qe,resolve:function(n){return n.specifiedByUrl!==void 0?n.specifiedByUrl:void 0}},fields:{type:new Re(new oe(tu)),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;if(ve(n)||ye(n)){var s=Ye(n.getFields());return i?s:s.filter(function(o){return o.deprecationReason==null})}}},interfaces:{type:new Re(new oe(Xt)),resolve:function(n){if(ve(n)||ye(n))return n.getInterfaces()}},possibleTypes:{type:new Re(new oe(Xt)),resolve:function(n,r,i,s){var o=s.schema;if(It(n))return o.getPossibleTypes(n)}},enumValues:{type:new Re(new oe(nu)),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;if(qe(n)){var s=n.getValues();return i?s:s.filter(function(o){return o.deprecationReason==null})}}},inputFields:{type:new Re(new oe(ji)),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;if(xe(n)){var s=Ye(n.getFields());return i?s:s.filter(function(o){return o.deprecationReason==null})}}},ofType:{type:Xt,resolve:function(n){return n.ofType!==void 0?n.ofType:void 0}}}}}),tu=new ft({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new oe(Qe),resolve:function(n){return n.name}},description:{type:Qe,resolve:function(n){return n.description}},args:{type:new oe(new Re(new oe(ji))),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;return i?n.args:n.args.filter(function(s){return s.deprecationReason==null})}},type:{type:new oe(Xt),resolve:function(n){return n.type}},isDeprecated:{type:new oe(Ze),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:Qe,resolve:function(n){return n.deprecationReason}}}}}),ji=new ft({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new oe(Qe),resolve:function(n){return n.name}},description:{type:Qe,resolve:function(n){return n.description}},type:{type:new oe(Xt),resolve:function(n){return n.type}},defaultValue:{type:Qe,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(n){var r=n.type,i=n.defaultValue,s=Yr(i,r);return s?Ae(s):null}},isDeprecated:{type:new oe(Ze),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:Qe,resolve:function(n){return n.deprecationReason}}}}}),nu=new ft({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new oe(Qe),resolve:function(n){return n.name}},description:{type:Qe,resolve:function(n){return n.description}},isDeprecated:{type:new oe(Ze),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:Qe,resolve:function(n){return n.deprecationReason}}}}}),Me=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),ru=new Rt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Me.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Me.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Me.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Me.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Me.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Me.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Me.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Me.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),wn={name:"__schema",type:new oe(Ui),description:"Access the current type schema of this server.",args:[],resolve:function(t,n,r,i){var s=i.schema;return s},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Cn={name:"__type",type:Xt,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new oe(Qe),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(t,n,r,i){var s=n.name,o=i.schema;return o.getType(s)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Ln={name:"__typename",type:new oe(Qe),description:"The name of the current Object type at runtime.",args:[],resolve:function(t,n,r,i){var s=i.parentType;return s.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Jn=Object.freeze([Ui,Za,eu,Xt,tu,ji,nu,ru]);function Gi(e){return Jn.some(function(t){var n=t.name;return e.name===n})}function zd(e,t){for(var n=0;n({name:{type:new Z(Se),resolve:e=>e.name},description:{type:Se,resolve:e=>e.description},isRepeatable:{type:new Z(Re),resolve:e=>e.isRepeatable},locations:{type:new Z(new Te(new Z(cu))),resolve:e=>e.locations},args:{type:new Z(new Te(new Z(Ki))),args:{includeDeprecated:{type:new Z(Re),default:{value:!1}}},resolve(e,{includeDeprecated:t}){return t===!0?e.args:e.args.filter(n=>n.deprecationReason==null)}},isDeprecated:{type:new Z(Re),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Se,resolve:e=>e.deprecationReason}})}),cu=new dt({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:z.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:z.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:z.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:z.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:z.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:z.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:z.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:z.VARIABLE_DEFINITION,description:"Location adjacent to an operation variable definition."},FRAGMENT_VARIABLE_DEFINITION:{value:z.FRAGMENT_VARIABLE_DEFINITION,description:"Location adjacent to a fragment variable definition."},SCHEMA:{value:z.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:z.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:z.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:z.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:z.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:z.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:z.UNION,description:"Location adjacent to a union definition."},ENUM:{value:z.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:z.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:z.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:z.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."},DIRECTIVE_DEFINITION:{value:z.DIRECTIVE_DEFINITION,description:"Location adjacent to a directive definition."}}}),Wt=new qe({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Z(du),resolve(e){if(at(e))return Fe.SCALAR;if(ge(e))return Fe.OBJECT;if(De(e))return Fe.INTERFACE;if(Ye(e))return Fe.UNION;if(Me(e))return Fe.ENUM;if(ue(e))return Fe.INPUT_OBJECT;if(pe(e))return Fe.LIST;if(ae(e))return Fe.NON_NULL;xe(!1,`Unexpected type: "${H(e)}".`)}},name:{type:Se,resolve:e=>"name"in e?e.name:void 0},description:{type:Se,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Se,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Te(new Z(fu)),args:{includeDeprecated:{type:new Z(Re),default:{value:!1}}},resolve(e,{includeDeprecated:t}){if(ge(e)||De(e)){let n=Object.values(e.getFields());return t===!0?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Te(new Z(Wt)),resolve(e){if(ge(e)||De(e))return e.getInterfaces()}},possibleTypes:{type:new Te(new Z(Wt)),resolve(e,t,n,{schema:r}){if(ht(e))return r.getPossibleTypes(e)}},enumValues:{type:new Te(new Z(pu)),args:{includeDeprecated:{type:new Z(Re),default:{value:!1}}},resolve(e,{includeDeprecated:t}){if(Me(e)){let n=e.getValues();return t===!0?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Te(new Z(Ki)),args:{includeDeprecated:{type:new Z(Re),default:{value:!1}}},resolve(e,{includeDeprecated:t}){if(ue(e)){let n=Object.values(e.getFields());return t===!0?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Wt,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:Re,resolve:e=>{if(ue(e))return e.isOneOf}}})}),fu=new qe({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Z(Se),resolve:e=>e.name},description:{type:Se,resolve:e=>e.description},args:{type:new Z(new Te(new Z(Ki))),args:{includeDeprecated:{type:new Z(Re),default:{value:!1}}},resolve(e,{includeDeprecated:t}){return t===!0?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new Z(Wt),resolve:e=>e.type},isDeprecated:{type:new Z(Re),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Se,resolve:e=>e.deprecationReason}})}),Ki=new qe({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Z(Se),resolve:e=>e.name},description:{type:Se,resolve:e=>e.description},type:{type:new Z(Wt),resolve:e=>e.type},defaultValue:{type:Se,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let t=Vm(e);return t?ve(t):null}},isDeprecated:{type:new Z(Re),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Se,resolve:e=>e.deprecationReason}})}),pu=new qe({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Z(Se),resolve:e=>e.name},description:{type:Se,resolve:e=>e.description},isDeprecated:{type:new Z(Re),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Se,resolve:e=>e.deprecationReason}})}),Fe={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},du=new dt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Fe.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Fe.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Fe.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Fe.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Fe.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Fe.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Fe.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Fe.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Sn=new Hr(void 0,"__schema",{type:new Z(Xi),description:"Access the current type schema of this server.",resolve:(e,t,n,{schema:r})=>r}),Fn=new Hr(void 0,"__type",{type:Wt,description:"Request the type information of a single type.",args:{name:{type:new Z(Se)}},resolve:(e,{name:t},n,{schema:r})=>r.getType(t)}),An=new Hr(void 0,"__typename",{type:new Z(Se),description:"The name of the current Object type at runtime.",resolve:(e,t,n,{parentType:r})=>r.name}),cn=Object.freeze([Xi,lu,cu,Wt,fu,Ki,pu,du]);function Zi(e){return cn.some(({name:t})=>e.name===t)}function Um(e){return St(e,$m,xr)}function Hc(e){if(!Um(e))throw new Error(`Expected ${H(e)} to be a GraphQL schema.`);return e}var $m=Symbol("Schema"),xr=class{constructor(t){this.__kind=$m,this.assumeValid=t.assumeValid??!1,this.__validationErrors=t.assumeValid===!0?[]:void 0,this.description=t.description,this.extensions=Lt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes??[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=t.directives??Bt;let n=new Set(t.types);if(t.types!=null)for(let r of t.types)n.delete(r),fn(r,n);this._queryType!=null&&fn(this._queryType,n),this._mutationType!=null&&fn(this._mutationType,n),this._subscriptionType!=null&&fn(this._subscriptionType,n);for(let r of this._directives)if(Co(r))for(let i of r.args)fn(i.type,n);fn(Xi,n),this._typeMap=Object.create(null),this._subTypeMap=new Map,this._implementationsMap=Object.create(null);for(let r of n){if(r==null)continue;let i=r.name;if(this._typeMap[i]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${i}".`);if(this._typeMap[i]=r,De(r)){for(let s of r.getInterfaces())if(De(s)){let o=this._implementationsMap[s.name];o??=this._implementationsMap[s.name]={objects:[],interfaces:[]},o.interfaces.push(r)}}else if(ge(r)){for(let s of r.getInterfaces())if(De(s)){let o=this._implementationsMap[s.name];o??=this._implementationsMap[s.name]={objects:[],interfaces:[]},o.objects.push(r)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case ot.QUERY:return this.getQueryType();case ot.MUTATION:return this.getMutationType();case ot.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Ye(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){return this._implementationsMap[t.name]??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap.get(t);if(r===void 0){if(Ye(t))r=new Set(t.getTypes());else{let i=this.getImplementations(t);r=new Set([...i.objects,...i.interfaces])}this._subTypeMap.set(t,r)}return r.has(n)}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}getField(t,n){switch(n){case Sn.name:return this.getQueryType()===t?Sn:void 0;case Fn.name:return this.getQueryType()===t?Fn:void 0;case An.name:return An}if("getFields"in t)return t.getFields()[n]}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.assumeValid}}};function fn(e,t){let n=_e(e);if(!t.has(n)){if(t.add(n),Ye(n))for(let r of n.getTypes())fn(r,t);else if(ge(n)||De(n)){for(let r of n.getInterfaces())fn(r,t);for(let r of Object.values(n.getFields())){fn(r.type,t);for(let i of r.args)fn(i.type,t)}}else if(ue(n))for(let r of Object.values(n.getFields()))fn(r.type,t)}return t}function Wm(e){if(Hc(e),e.__validationErrors)return e.__validationErrors;let t=new Wc(e);fE(t),pE(t),dE(t);let n=t.getErrors();return e.__validationErrors=n,n}function Qc(e){let t=Wm(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var B7=(function(){function e(n){this._errors=[],this.schema=n}var t=e.prototype;return t.reportError=function(r,i){var s=Array.isArray(i)?i.filter(Boolean):i;this.addError(new M(r,s))},t.addError=function(r){this._errors.push(r)},t.getErrors=function(){return this._errors},e})();function V7(e){var t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!ve(n)){var r;e.reportError("Query root type must be Object type, it cannot be ".concat(G(n),"."),(r=Cc(t,"query"))!==null&&r!==void 0?r:n.astNode)}var i=t.getMutationType();if(i&&!ve(i)){var s;e.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat(G(i),"."),(s=Cc(t,"mutation"))!==null&&s!==void 0?s:i.astNode)}var o=t.getSubscriptionType();if(o&&!ve(o)){var a;e.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat(G(o),"."),(a=Cc(t,"subscription"))!==null&&a!==void 0?a:o.astNode)}}function Cc(e,t){for(var n=Ic(e,function(s){return s.operationTypes}),r=0;r0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(r){var i=this._schema;switch(r.kind){case x.SELECTION_SET:{var s=Ce(this.getType());this._parentTypeStack.push(ct(s)?s:void 0);break}case x.FIELD:{var o=this.getParentType(),a,u;o&&(a=this._getFieldDef(i,o,r),a&&(u=a.type)),this._fieldDefStack.push(a),this._typeStack.push(Yt(u)?u:void 0);break}case x.DIRECTIVE:this._directive=i.getDirective(r.name.value);break;case x.OPERATION_DEFINITION:{var l;switch(r.operation){case"query":l=i.getQueryType();break;case"mutation":l=i.getMutationType();break;case"subscription":l=i.getSubscriptionType();break}this._typeStack.push(ve(l)?l:void 0);break}case x.INLINE_FRAGMENT:case x.FRAGMENT_DEFINITION:{var c=r.typeCondition,f=c?st(i,c):Ce(this.getType());this._typeStack.push(Yt(f)?f:void 0);break}case x.VARIABLE_DEFINITION:{var h=st(i,r.type);this._inputTypeStack.push(it(h)?h:void 0);break}case x.ARGUMENT:{var m,g,v,b=(m=this.getDirective())!==null&&m!==void 0?m:this.getFieldDef();b&&(g=pn(b.args,function(P){return P.name===r.name.value}),g&&(v=g.type)),this._argument=g,this._defaultValueStack.push(g?g.defaultValue:void 0),this._inputTypeStack.push(it(v)?v:void 0);break}case x.LIST:{var E=Nr(this.getInputType()),A=we(E)?E.ofType:E;this._defaultValueStack.push(void 0),this._inputTypeStack.push(it(A)?A:void 0);break}case x.OBJECT_FIELD:{var C=Ce(this.getInputType()),w,F;xe(C)&&(F=C.getFields()[r.name.value],F&&(w=F.type)),this._defaultValueStack.push(F?F.defaultValue:void 0),this._inputTypeStack.push(it(w)?w:void 0);break}case x.ENUM:{var O=Ce(this.getInputType()),L;qe(O)&&(L=O.getValue(r.value)),this._enumValue=L;break}}},t.leave=function(r){switch(r.kind){case x.SELECTION_SET:this._parentTypeStack.pop();break;case x.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case x.DIRECTIVE:this._directive=null;break;case x.OPERATION_DEFINITION:case x.INLINE_FRAGMENT:case x.FRAGMENT_DEFINITION:this._typeStack.pop();break;case x.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case x.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case x.LIST:case x.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case x.ENUM:this._enumValue=null;break}},e})();function z7(e,t,n){var r=n.name.value;if(r===wn.name&&e.getQueryType()===t)return wn;if(r===Cn.name&&e.getQueryType()===t)return Cn;if(r===Ln.name&&ct(t))return Ln;if(ve(t)||ye(t))return t.getFields()[r]}function go(e,t){return{enter:function(r){e.enter(r);var i=Tr(t,r.kind,!1);if(i){var s=i.apply(t,arguments);return s!==void 0&&(e.leave(r),no(s)&&e.enter(s)),s}},leave:function(r){var i=Tr(t,r.kind,!0),s;return i&&(s=i.apply(t,arguments)),e.leave(r),s}}}function Oc(e){return e.kind===x.OPERATION_DEFINITION||e.kind===x.FRAGMENT_DEFINITION}function kc(e){return e.kind===x.SCHEMA_DEFINITION||In(e)||e.kind===x.DIRECTIVE_DEFINITION}function In(e){return e.kind===x.SCALAR_TYPE_DEFINITION||e.kind===x.OBJECT_TYPE_DEFINITION||e.kind===x.INTERFACE_TYPE_DEFINITION||e.kind===x.UNION_TYPE_DEFINITION||e.kind===x.ENUM_TYPE_DEFINITION||e.kind===x.INPUT_OBJECT_TYPE_DEFINITION}function Mc(e){return e.kind===x.SCHEMA_EXTENSION||Wi(e)}function Wi(e){return e.kind===x.SCALAR_TYPE_EXTENSION||e.kind===x.OBJECT_TYPE_EXTENSION||e.kind===x.INTERFACE_TYPE_EXTENSION||e.kind===x.UNION_TYPE_EXTENSION||e.kind===x.ENUM_TYPE_EXTENSION||e.kind===x.INPUT_OBJECT_TYPE_EXTENSION}function Qi(e){return{Document:function(n){for(var r=0,i=n.definitions;r1&&e.reportError(new M("This anonymous operation must be the only defined operation.",r))}}}function Vc(e){return{OperationDefinition:function(n){n.operation==="subscription"&&n.selectionSet.selections.length!==1&&e.reportError(new M(n.name?'Subscription "'.concat(n.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",n.selectionSet.selections.slice(1)))}}}function Xr(e){for(var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null),i=0,s=e.getDocument().definitions;i1)for(var c=0;c0)return[[t,e.map(function(i){var s=i[0];return s})],e.reduce(function(i,s){var o=s[1];return i.concat(o)},[n]),e.reduce(function(i,s){var o=s[2];return i.concat(o)},[r])]}var p9=(function(){function e(){this._data=Object.create(null)}var t=e.prototype;return t.has=function(r,i,s){var o=this._data[r],a=o&&o[i];return a===void 0?!1:s===!1?a===!1:!0},t.add=function(r,i,s){this._pairSetAdd(r,i,s),this._pairSetAdd(i,r,s)},t._pairSetAdd=function(r,i,s){var o=this._data[r];o||(o=Object.create(null),this._data[r]=o),o[i]=s},e})();function ni(e){var t=[],n=Object.create(null);return{ObjectValue:{enter:function(){t.push(n),n=Object.create(null)},leave:function(){n=t.pop()}},ObjectField:function(i){var s=i.name.value;n[s]?e.reportError(new M('There can be only one input field named "'.concat(s,'".'),[n[s],i.name])):n[s]=i.name}}}var h9=3;function rf(e){function t(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object.create(null),i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(n.kind===x.FRAGMENT_SPREAD){var s=n.name.value;if(r[s]===!0)return!1;var o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=null}}if(n.kind===x.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=h9))return!0;if("selectionSet"in n&&n.selectionSet)for(var a=0,u=n.selectionSet.selections;a0&&e.reportError(new M("Must provide only one schema definition.",u)),++o}}}function es(e){var 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){for(var o,a=(o=s.operationTypes)!==null&&o!==void 0?o:[],u=0;u2&&arguments[2]!==void 0?arguments[2]:as,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new mo(e),i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{maxErrors:void 0};t||fe(0,"Must provide document."),Lc(e);var s=Object.freeze({}),o=[],a=new of(e,t,r,function(l){if(i.maxErrors!=null&&o.length>=i.maxErrors)throw o.push(new M("Too many validation errors, error limit reached. Validation aborted.")),s;o.push(l)}),u=ro(n.map(function(l){return l(a)}));try{Tt(t,go(r,u))}catch(l){if(l!==s)throw l}return o}function D9(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p0,r=[],i=new m0(e,t,function(o){r.push(o)}),s=n.map(function(o){return o(i)});return Tt(e,ro(s)),r}function g0(e){var t=D9(e);if(t.length!==0)throw new Error(t.map(function(n){return n.message}).join(` +`))}var Wc=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new I(t,{nodes:r}))}getErrors(){return this._errors}};function fE(e){let t=e.schema;t.getQueryType()==null&&e.reportError("Query root type must be provided.",t.astNode);let n=new Ft;for(let r of Object.values(ot)){let i=t.getRootType(r);if(i!=null)if(ge(i))n.add(i,r);else{let s=cm(r),o=H(i);e.reportError(r===ot.QUERY?`${s} root type must be Object type, it cannot be ${o}.`:`${s} root type must be Object type if provided, it cannot be ${o}.`,jm(t,r)??i.astNode)}}for(let[r,i]of n)if(i.length>1){let s=pm(i);e.reportError(`All root types must be different, "${r}" type is used as ${s} root types.`,i.map(o=>jm(t,o)))}}function jm(e,t){return[e.astNode,...e.extensionASTNodes].flatMap(n=>n?.operationTypes??[]).find(n=>n.operation===t)?.type}function pE(e){for(let t of e.schema.getDirectives()){if(!Co(t)){e.reportError(`Expected directive but got: ${H(t)}.`,t?.astNode);continue}ni(e,t),t.locations.length===0&&e.reportError(`Directive ${t} must include 1 or more locations.`,t.astNode);for(let n of t.args)ni(e,n),Je(n.type)||e.reportError(`The type of ${n} must be Input Type but got: ${H(n.type)}.`,n.astNode),Zt(n)&&n.deprecationReason!=null&&e.reportError(`Required argument ${n} cannot be deprecated.`,[hu(n.astNode),n.astNode?.type]),zc(e,n)}}function zc(e,t){let n=t.default;if(!n)return;let r=[];if(Yc(n,t.type,(i,s)=>{r.push([i,s])}),r.length!==0){if(!n.literal)try{let i=wo(n.value,t.type),s=[];if(No(i,t.type,(o,a)=>{s.push([o,a])}),s.length===0){e.reportError(`${t} has invalid default value: ${H(n.value)}. Did you mean: ${H(i)}?`,t.astNode?.defaultValue);return}}catch{}for(let[i,s]of r)e.reportError(`${t} has invalid default value${lo(s)}: ${i.message}`,i.nodes??t.astNode?.defaultValue)}}function Yc(e,t,n,r){if(e.literal){Jr(e.literal,t,n,void 0,void 0,r);return}No(e.value,t,n,r)}function wo(e,t){if(ae(t))return wo(e,t.ofType);if(e===null)return null;if(pe(t))return Jt(e)?Array.from(e,n=>wo(n,t.ofType)):[wo(e,t.ofType)];if(ue(t)){Ge(e)||xe(!1);let n=t.getFields();return _n(e,(r,i)=>(i in n||xe(!1),wo(r,n[i].type)))}return Kt(t),t.coerceOutputValue(e)}function ni(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function dE(e){let t=vE(e),n=e.schema.getTypeMap(),r=new Map;for(let s of Object.values(n)){if(!ru(s)){e.reportError(`Expected GraphQL named type but got: ${H(s)}.`,s.astNode);continue}Zi(s)||ni(e,s),ge(s)||De(s)?(Gm(e,s),qm(e,s)):Ye(s)?gE(e,s):Me(s)?DE(e,s):ue(s)&&(yE(e,s),i(s),t(s))}bE(e,r);function i(s){r.set(s,{inputObj:s,targets:[],dependents:[],unresolvedTargetCount:0,hasFiniteValue:!1})}}function Gm(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let r of n){ni(e,r),qt(r.type)||e.reportError(`The type of ${r} must be Output Type but got: ${H(r.type)}.`,r.astNode?.type);for(let i of r.args)ni(e,i),Je(i.type)||e.reportError(`The type of ${i} must be Input Type but got: ${H(i.type)}.`,i.astNode?.type),Zt(i)&&i.deprecationReason!=null&&e.reportError(`Required argument ${i} cannot be deprecated.`,[hu(i.astNode),i.astNode?.type]),zc(e,i)}}function qm(e,t){let n=new Set;for(let r of t.getInterfaces()){if(!De(r)){e.reportError(`Type ${t} must only implement Interface types, it cannot implement ${H(r)}.`,Lo(t,r));continue}if(t===r){e.reportError(`Type ${t} cannot implement itself because it would create a circular reference.`,Lo(t,r));continue}if(n.has(r.name)){e.reportError(`Type ${t} can only implement ${r} once.`,Lo(t,r));continue}n.add(r.name),mE(e,t,r),hE(e,t,r)}}function hE(e,t,n){let r=t.getFields();for(let i of Object.values(n.getFields())){let s=r[i.name];if(s==null){e.reportError(`Interface field ${i} expected but ${t} does not provide it.`,[i.astNode,t.astNode,...t.extensionASTNodes]);continue}Tn(e.schema,s.type,i.type)||e.reportError(`Interface field ${i} expects type ${i.type} but ${s} is type ${s.type}.`,[i.astNode?.type,s.astNode?.type]);for(let o of i.args){let a=s.args.find(u=>u.name===o.name);if(!a){e.reportError(`Interface field argument ${o} expected but ${s} does not provide it.`,[o.astNode,s.astNode]);continue}Yi(o.type,a.type)||e.reportError(`Interface field argument ${o} expects type ${o.type} but ${a} is type ${a.type}.`,[o.astNode?.type,a.astNode?.type])}for(let o of s.args)Zt(o)&&(i.args.find(u=>u.name===o.name)||e.reportError(`Argument "${o}" must not be required type "${o.type}" if not provided by the Interface field "${i}".`,[o.astNode,i.astNode]));s.deprecationReason!=null&&i.deprecationReason==null&&e.reportError(`Interface field ${n.name}.${i.name} is not deprecated, so implementation field ${t.name}.${s.name} must not be deprecated.`,[hu(s.astNode),s.astNode?.type])}}function mE(e,t,n){let r=t.getInterfaces();for(let i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t} cannot implement ${n} because it would create a circular reference.`:`Type ${t} must implement ${i} because it is implemented by ${n}.`,[...Lo(n,i),...Lo(t,n)])}function gE(e,t){let n=t.getTypes();n.length===0&&e.reportError(`Union type ${t} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=new Set;for(let i of n){if(r.has(i.name)){e.reportError(`Union type ${t} can only include type ${i} once.`,Hm(t,i.name));continue}r.add(i.name),ge(i)||e.reportError(`Union type ${t} can only include Object types, it cannot include ${H(i)}.`,Hm(t,String(i)))}}function DE(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)ni(e,r)}function yE(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)ni(e,r),Je(r.type)||e.reportError(`The type of ${r} must be Input Type but got: ${H(r.type)}.`,r.astNode?.type),Ht(r)&&r.deprecationReason!=null&&e.reportError(`Required input field ${r} cannot be deprecated.`,[hu(r.astNode),r.astNode?.type]),zc(e,r),t.isOneOf&&EE(t,r,e)}function EE(e,t,n){ae(t.type)&&n.reportError(`OneOf input field ${e}.${t.name} must be nullable.`,t.astNode?.type),(t.default!==void 0||t.defaultValue!==void 0)&&n.reportError(`OneOf input field ${e}.${t.name} cannot have a default value.`,t.astNode)}function bE(e,t){let n=[];for(let l of t.values()){let c=l.inputObj,f=Object.values(c.getFields());for(let h of f){let m=xE(c,h.type);if(m===void 0)continue;l.targets.push({field:h,target:m});let g=t.get(m);g!==void 0&&g.dependents.push(l)}c.isOneOf?(f.length===0||l.targets.lengthN.fieldStr).join(", ");e.reportError(`Input Object ${h} cannot be provided a finite value because it references itself through fields: ${v}.`,E.map(N=>N.astNode))}s.pop()}o.delete(c)}}}function xE(e,t){if(e.isOneOf)return ue(t)?t:void 0;if(ae(t)&&ue(t.ofType))return t.ofType}function vE(e){let t=Object.create(null),n=[],r=Object.create(null);return function(u){return i(u,Object.create(null))};function i(a,u){if(Jt(u)){for(let l of u)i(a,l);return}else if(!Ge(u))return;for(let l of Object.values(a.getFields())){let c=_e(l.type);ue(c)&&(Object.hasOwn(u,l.name)?i(c,u[l.name]):o(l,c,`${a}.${l.name}`))}}function s(a,u){if(u.kind===D.LIST){for(let c of u.values)s(a,c);return}else if(u.kind!==D.OBJECT)return;let l=qi(u.fields,c=>c.name.value);for(let c of Object.values(a.getFields())){let f=_e(c.type);ue(f)&&(Object.hasOwn(l,c.name)?s(f,l[c.name].value):o(c,f,`${a}.${c.name}`))}}function o(a,u,l){let c=a.default;if(c===void 0)return;let f=r[l];if(f!==void 0){e.reportError(`Invalid circular reference. The default value of Input Object field ${l} references itself${fh).join(", ")}`:""}.`,n.slice(f-1).map(([,h])=>h));return}t[l]===void 0&&(t[l]=!0,r[l]=n.push([l,a.astNode?.defaultValue]),c.literal?s(u,c.literal):i(u,c.value),n.pop(),r[l]=void 0)}}function Lo(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>s.interfaces??[]).filter(s=>s.name.value===t.name)}function Hm(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>s.types??[]).filter(s=>s.name.value===t)}function hu(e){return e?.directives?.find(t=>t.name.value===Ji.name)}function $e(e,t,n){return new I(`Syntax Error: ${n}`,{source:e,positions:[t]})}function _E(){let e;try{let t=globalThis.process;typeof t?.getBuiltinModule=="function"&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}var ri=_E(),Jc=ri?.tracingChannel("graphql:parse"),Xc=ri?.tracingChannel("graphql:validate"),sL=ri?.tracingChannel("graphql:execute"),oL=ri?.tracingChannel("graphql:execute:variableCoercion"),aL=ri?.tracingChannel("graphql:execute:rootSelectionSet"),uL=ri?.tracingChannel("graphql:subscribe"),lL=ri?.tracingChannel("graphql:resolve"),NE=["start","end","asyncStart","asyncEnd","error"];function mu(e){if(e==null)return!1;let t=e.hasSubscribers;if(t!==void 0)return t;for(let n of NE)if(e[n].hasSubscribers)return!0;return!1}var U={SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"};var Ro=class{constructor(t){let n=new Hi(U.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==U.EOF)do if(t.next)t=t.next;else{let n=TE(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===U.COMMENT);return t}};function zm(e){return e===U.BANG||e===U.DOLLAR||e===U.AMP||e===U.PAREN_L||e===U.PAREN_R||e===U.DOT||e===U.SPREAD||e===U.COLON||e===U.EQUALS||e===U.AT||e===U.BRACKET_L||e===U.BRACKET_R||e===U.BRACE_L||e===U.PIPE||e===U.BRACE_R}function es(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Du(e,t){return Ym(e.charCodeAt(t))&&Jm(e.charCodeAt(t+1))}function Ym(e){return e>=55296&&e<=56319}function Jm(e){return e>=56320&&e<=57343}function ii(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return U.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function tt(e,t,n,r,i){let s=e.line,o=1+n-e.lineStart;return new Hi(t,n,r,s,o,i)}function TE(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function LE(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw $e(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function IE(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,o=s,a="",u=[];for(;s0||Mt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Mt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Km(e){return St(e,Xm,ts)}function pn(e,t){return mu(Jc)?Jc.traceSync(()=>Zm(e,t),{source:e}):Zm(e,t)}function Zm(e,t){let n=new Eu(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}function bu(e,t){let n=new Eu(e,t);n.expectToken(U.SOF);let r=n.parseConstValueLiteral();return n.expectToken(U.EOF),r}var Eu=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else{let s=Km(t)?t:new ts(t);this._lexer=new Ro(s)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(U.NAME);return this.node(t,{kind:D.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:D.DOCUMENT,definitions:this.many(U.SOF,this.parseDefinition,U.EOF)})}parseDefinition(){if(this.peek(U.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===U.BRACE_L)throw $e(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===U.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw $e(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(U.BRACE_L))return this.node(t,{kind:D.OPERATION_DEFINITION,operation:ot.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(U.NAME)&&(i=this.parseName()),this.node(t,{kind:D.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(U.NAME);switch(t.value){case"query":return ot.QUERY;case"mutation":return ot.MUTATION;case"subscription":return ot.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(U.PAREN_L,this.parseVariableDefinition,U.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:D.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(U.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(U.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(U.DOLLAR),this.node(t,{kind:D.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:D.SELECTION_SET,selections:this.many(U.BRACE_L,this.parseSelection,U.BRACE_R)})}parseSelection(){return this.peek(U.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(U.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:D.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(U.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(U.PAREN_L,n,U.PAREN_R)}parseFragmentArguments(){let t=this.parseFragmentArgument;return this.optionalMany(U.PAREN_L,t,U.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(U.COLON),this.node(n,{kind:D.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let t=this._lexer.token,n=this.parseName();return this.expectToken(U.COLON),this.node(t,{kind:D.FRAGMENT_ARGUMENT,name:n,value:this.parseValueLiteral(!1)})}parseFragment(){let t=this._lexer.token;this.expectToken(U.SPREAD);let n=this.expectOptionalKeyword("on");if(!n&&this.peek(U.NAME)){let r=this.parseFragmentName();return this.peek(U.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(t,{kind:D.FRAGMENT_SPREAD,name:r,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(t,{kind:D.FRAGMENT_SPREAD,name:r,directives:this.parseDirectives(!1)})}return this.node(t,{kind:D.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(t,{kind:D.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:D.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case U.BRACKET_L:return this.parseList(t);case U.BRACE_L:return this.parseObject(t);case U.INT:return this.advanceLexer(),this.node(n,{kind:D.INT,value:n.value});case U.FLOAT:return this.advanceLexer(),this.node(n,{kind:D.FLOAT,value:n.value});case U.STRING:case U.BLOCK_STRING:return this.parseStringLiteral();case U.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:D.BOOLEAN,value:!0});case"false":return this.node(n,{kind:D.BOOLEAN,value:!1});case"null":return this.node(n,{kind:D.NULL});default:return this.node(n,{kind:D.ENUM,value:n.value})}case U.DOLLAR:if(t)if(this.expectToken(U.DOLLAR),this._lexer.token.kind===U.NAME){let r=this._lexer.token.value;throw $e(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:D.STRING,value:t.value,block:t.kind===U.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:D.LIST,values:this.any(U.BRACKET_L,n,U.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:D.OBJECT,fields:this.any(U.BRACE_L,n,U.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(U.COLON),this.node(n,{kind:D.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(U.AT);)n.push(this.parseDirective(t));if(n.length)return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(U.AT),this.node(n,{kind:D.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(U.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(U.BRACKET_R),n=this.node(t,{kind:D.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(U.BANG)?this.node(t,{kind:D.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:D.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(U.STRING)||this.peek(U.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(U.BRACE_L,this.parseOperationTypeDefinition,U.BRACE_R);return this.node(t,{kind:D.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(U.COLON);let r=this.parseNamedType();return this.node(t,{kind:D.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:D.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:D.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(U.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(U.BRACE_L,this.parseFieldDefinition,U.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(U.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:D.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(U.PAREN_L,this.parseInputValueDef,U.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(U.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(U.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:D.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:D.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:D.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(U.EQUALS)?this.delimitedMany(U.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:D.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(U.BRACE_L,this.parseEnumValueDefinition,U.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:D.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw $e(this._lexer.source,this._lexer.token.start,`${yu(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:D.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(U.BRACE_L,this.parseInputValueDef,U.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===U.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(U.BRACE_L,this.parseOperationTypeDefinition,U.BRACE_R);if(n===void 0&&r===void 0)throw this.unexpected();return this.node(t,{kind:D.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r===void 0)throw this.unexpected();return this.node(t,{kind:D.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r===void 0&&i===void 0&&s===void 0)throw this.unexpected();return this.node(t,{kind:D.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r===void 0&&i===void 0&&s===void 0)throw this.unexpected();return this.node(t,{kind:D.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:D.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:D.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:D.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(U.AT);let n=this.parseName(),r=this.parseConstDirectives();if(r===void 0)throw this.unexpected();return this.node(t,{kind:D.DIRECTIVE_EXTENSION,name:n,directives:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(U.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.parseConstDirectives(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:D.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,directives:s,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(U.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.hasOwn(z,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(U.AT),r=this.parseName(),i;!n&&this.expectOptionalToken(U.DOT)&&(i=this.parseName());let s;return(n||i)&&this.expectOptionalToken(U.PAREN_L)&&(s=this.parseName(),this.expectToken(U.COLON),this.expectToken(U.PAREN_R)),n?s?this.node(t,{kind:D.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:s}):this.node(t,{kind:D.DIRECTIVE_COORDINATE,name:r}):i?s?this.node(t,{kind:D.ARGUMENT_COORDINATE,name:r,fieldName:i,argumentName:s}):this.node(t,{kind:D.MEMBER_COORDINATE,name:r,memberName:i}):this.node(t,{kind:D.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new co(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw $e(this._lexer.source,n.start,`Expected ${e0(t)}, found ${yu(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===U.NAME&&n.value===t)this.advanceLexer();else throw $e(this._lexer.source,n.start,`Expected "${t}", found ${yu(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===U.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return $e(this._lexer.source,n.start,`Unexpected ${yu(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==U.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw $e(this._lexer.source,n.start,`Document contains more than ${t} tokens. Parsing aborted.`)}};function yu(e){let t=e.value;return e0(e.kind)+(t!=null?` "${t}"`:"")}function e0(e){return zm(e)?`"${e}"`:e}function Pe(e,t){switch(t.kind){case D.LIST_TYPE:{let n=Pe(e,t.type);return n&&new Te(n)}case D.NON_NULL_TYPE:{let n=Pe(e,t.type);return n&&new Z(n)}case D.NAMED_TYPE:return e.getType(t.name.value)}}var si=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._fragmentSignaturesByName=r??(()=>null),this._fragmentSignature=null,this._fragmentArgument=null,n&&(Je(n)&&this._inputTypeStack.push(n),ut(n)&&this._parentTypeStack.push(n),qt(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){return this._typeStack.at(-1)}getParentType(){return this._parentTypeStack.at(-1)}getInputType(){return this._inputTypeStack.at(-1)}getParentInputType(){return this._inputTypeStack.at(-2)}getFieldDef(){return this._fieldDefStack.at(-1)}getDefaultValue(){return this._defaultValueStack.at(-1)}getDirective(){return this._directive}getArgument(){return this._argument}getFragmentSignature(){return this._fragmentSignature}getFragmentSignatureByName(){return this._fragmentSignaturesByName}getFragmentArgument(){return this._fragmentArgument}getEnumValue(){return this._enumValue}enter(t){let n=this._schema;switch(t.kind){case D.DOCUMENT:{let r=OE(t);this._fragmentSignaturesByName=i=>r.get(i);break}case D.SELECTION_SET:{let r=_e(this.getType());this._parentTypeStack.push(ut(r)?r:void 0);break}case D.FIELD:{let r=this.getParentType(),i,s;r&&(i=n.getField(r,t.name.value),i&&(s=i.type)),this._fieldDefStack.push(i),this._typeStack.push(qt(s)?s:void 0);break}case D.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case D.OPERATION_DEFINITION:{let r=n.getRootType(t.operation);this._typeStack.push(ge(r)?r:void 0);break}case D.FRAGMENT_SPREAD:{this._fragmentSignature=this.getFragmentSignatureByName()(t.name.value);break}case D.INLINE_FRAGMENT:case D.FRAGMENT_DEFINITION:{let r=t.typeCondition,i=r?Pe(n,r):_e(this.getType());this._typeStack.push(qt(i)?i:void 0);break}case D.VARIABLE_DEFINITION:{let r=Pe(n,t.type);this._inputTypeStack.push(Je(r)?r:void 0);break}case D.ARGUMENT:{let r,i,s=this.getDirective()??this.getFieldDef();s&&(r=s.args.find(o=>o.name===t.name.value),r&&(i=r.type)),this._argument=r,this._defaultValueStack.push(r?.default??r?.defaultValue??void 0),this._inputTypeStack.push(Je(i)?i:void 0);break}case D.FRAGMENT_ARGUMENT:{let i=this.getFragmentSignature()?.variableDefinitions.get(t.name.value);this._fragmentArgument=i;let s;i&&(s=Pe(this._schema,i.type)),this._inputTypeStack.push(Je(s)?s:void 0);break}case D.LIST:{let r=zi(this.getInputType()),i=pe(r)?r.ofType:void 0;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Je(i)?i:void 0);break}case D.OBJECT_FIELD:{let r=_e(this.getInputType()),i,s;ue(r)&&(s=r.getFields()[t.name.value],s!=null&&(i=s.type)),this._defaultValueStack.push(s?.default??s?.defaultValue??void 0),this._inputTypeStack.push(Je(i)?i:void 0);break}case D.ENUM:{let r=_e(this.getInputType()),i;Me(r)&&(i=r.getValue(t.value)),this._enumValue=i;break}default:}}leave(t){switch(t.kind){case D.DOCUMENT:this._fragmentSignaturesByName=()=>null;break;case D.SELECTION_SET:this._parentTypeStack.pop();break;case D.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case D.DIRECTIVE:this._directive=null;break;case D.FRAGMENT_SPREAD:this._fragmentSignature=null;break;case D.OPERATION_DEFINITION:case D.INLINE_FRAGMENT:case D.FRAGMENT_DEFINITION:this._typeStack.pop();break;case D.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case D.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case D.FRAGMENT_ARGUMENT:{this._fragmentArgument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break}case D.LIST:case D.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case D.ENUM:this._enumValue=null;break;default:}}};function OE(e){let t=new Map;for(let n of e.definitions)if(n.kind===D.FRAGMENT_DEFINITION){let r=new Map;if(n.variableDefinitions)for(let s of n.variableDefinitions)r.set(s.variable.name.value,s);let i={definition:n,variableDefinitions:r};t.set(n.name.value,i)}return t}function Oo(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=qr(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),po(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=qr(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function Kc(e){let t=new Map;return{Directive(n){if(n.name.value===qn.name||n.name.value===Hn.name){let i=n.arguments?.find(o=>o.name.value==="label")?.value;if(!i||i.kind===D.NULL)return;if(i.kind!==D.STRING){e.reportError(new I(`Argument "@${n.name.value}(label:)" must be a static string.`,{nodes:n}));return}let s=t.get(i.value);s!=null?e.reportError(new I('Value for arguments "defer(label:)" and "stream(label:)" must be unique across all Defer/Stream directive usages.',{nodes:[s,n]})):t.set(i.value,n)}}}}function ef(e){return{OperationDefinition(t){let n=e.getDocument(),r=new Map;for(let o of n.definitions)o.kind===D.FRAGMENT_DEFINITION&&r.set(o.name.value,o);if(t.operation!=="subscription"&&t.operation!=="mutation")return;let s=e.getSchema().getRootType(t.operation);s&&Zc({context:e,operationType:t.operation,rootType:s,fragments:r,selectionSet:t.selectionSet,visitedFragments:new Set})}}}function Zc({context:e,operationType:t,rootType:n,fragments:r,selectionSet:i,visitedFragments:s}){for(let o of i.selections)if(o.kind==="Field"){let a=o.directives?.find(u=>u.name.value===Hn.name);a&&e.reportError(new I(`Stream directive cannot be used on root ${t} type "${n}".`,{nodes:a}))}else if(o.kind==="FragmentSpread"){let a=o.name.value;if(s.has(a))continue;let u=r.get(a);if(u){let l=t0(o);l!==void 0&&e.reportError(new I(`Defer directive cannot be used on root ${t} type "${n}".`,{nodes:l})),Zc({context:e,operationType:t,rootType:n,fragments:r,selectionSet:u.selectionSet,visitedFragments:s})}s.add(a)}else if(o.kind==="InlineFragment"){let a=t0(o);a!==void 0&&e.reportError(new I(`Defer directive cannot be used on root ${t} type "${n}".`,{nodes:a})),Zc({context:e,operationType:t,rootType:n,fragments:r,selectionSet:o.selectionSet,visitedFragments:s})}}function t0(e){return e.directives?.find(t=>t.name.value===qn.name)}function n0(e){let t=e.arguments?.find(n=>n.name.value==="if");if(!t)return!1;if(t.value.kind===D.BOOLEAN){if(t.value.value)return!1}else if(t.value.kind!==D.VARIABLE)return!1;return!0}function kE(e){let t=e.arguments?.find(n=>n.name.value==="if");return t&&t.value.kind===D.BOOLEAN?!!t.value.value:!0}function ME(e){let t=e.arguments?.find(n=>n.name.value==="if");return t?t?.value.kind===D.BOOLEAN?!t.value.value:!0:!1}function nf(e){return{OperationDefinition(t){if(t.operation!==ot.SUBSCRIPTION)return;let n=e.getDocument(),r=new Map;for(let s of n.definitions)s.kind===D.FRAGMENT_DEFINITION&&r.set(s.name.value,s);let i=new Set;tf({context:e,fragments:r,selectionSet:t.selectionSet,parentNodes:[],visitedFragments:i})}}}function tf({context:e,fragments:t,selectionSet:n,parentNodes:r,visitedFragments:i}){for(let s of n.selections){let o=s.directives?.find(u=>u.name.value===ei.name);if(o&&kE(o))continue;let a=s.directives?.find(u=>u.name.value===Zr.name);if(!(a&&ME(a))){for(let u of s.directives??[])u.name.value===qn.name?n0(u)||e.reportError(new I("Defer directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.",{nodes:[u,...r]})):u.name.value===Hn.name&&(n0(u)||e.reportError(new I("Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.",{nodes:[u,...r]})));if(s.kind==="FragmentSpread"){let u=s.name.value;if(i.has(u))continue;i.add(u);let l=t.get(u);l&&tf({context:e,fragments:t,parentNodes:[s,...r],selectionSet:l?.selectionSet,visitedFragments:i})}else s.selectionSet&&tf({context:e,fragments:t,selectionSet:s.selectionSet,parentNodes:r,visitedFragments:i})}}}function rf(e){return e.kind===D.OPERATION_DEFINITION||e.kind===D.FRAGMENT_DEFINITION}function sf(e){return e.kind===D.SCHEMA_DEFINITION||vr(e)||e.kind===D.DIRECTIVE_DEFINITION}function vr(e){return e.kind===D.SCALAR_TYPE_DEFINITION||e.kind===D.OBJECT_TYPE_DEFINITION||e.kind===D.INTERFACE_TYPE_DEFINITION||e.kind===D.UNION_TYPE_DEFINITION||e.kind===D.ENUM_TYPE_DEFINITION||e.kind===D.INPUT_OBJECT_TYPE_DEFINITION}function of(e){return e.kind===D.SCHEMA_EXTENSION||e.kind===D.DIRECTIVE_EXTENSION||xu(e)}function xu(e){return e.kind===D.SCALAR_TYPE_EXTENSION||e.kind===D.OBJECT_TYPE_EXTENSION||e.kind===D.INTERFACE_TYPE_EXTENSION||e.kind===D.UNION_TYPE_EXTENSION||e.kind===D.ENUM_TYPE_EXTENSION||e.kind===D.INPUT_OBJECT_TYPE_EXTENSION}function ns(e){return{Document(t){for(let n of t.definitions)if(!rf(n)){let r=n.kind===D.SCHEMA_DEFINITION||n.kind===D.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new I(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function af(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=At("to use an inline fragment on",e.hideSuggestions?[]:PE(i,n,s));o===""&&(o=At(e.hideSuggestions?[]:BE(n,s))),e.reportError(new I(`Cannot query field "${s}" on type "${n}".`+o,{nodes:t}))}}}}function PE(e,t,n){if(!ht(t))return[];let r=new Set,i=Object.create(null);for(let s of e.getPossibleTypes(t))if(s.getFields()[n]!=null){r.add(s),i[s.name]=1;for(let o of s.getInterfaces())o.getFields()[n]!=null&&(r.add(o),i[o.name]=(i[o.name]??0)+1)}return[...r].sort((s,o)=>{let a=i[o.name]-i[s.name];return a!==0?a:De(s)&&e.isSubType(s,o)?-1:De(o)&&e.isSubType(o,s)?1:Wi(s.name,o.name)}).map(s=>s.name)}function BE(e,t){if(ge(e)||De(e)){let n=Object.keys(e.getFields());return wt(t,n)}return[]}function rs(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=Pe(e.getSchema(),n);if(r&&!ut(r)){let i=ve(n);e.reportError(new I(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=Pe(e.getSchema(),t.typeCondition);if(n&&!ut(n)){let r=ve(t.typeCondition);e.reportError(new I(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function uf(e){return{...lf(e),FragmentArgument(t){let n=e.getFragmentSignature();if(n&&!n.variableDefinitions.get(t.name.value)){let i=t.name.value,s=e.hideSuggestions?[]:wt(i,Array.from(n.variableDefinitions.values()).map(o=>o.variable.name.value));e.reportError(new I(`Unknown argument "${i}" on fragment "${n.definition.name.value}".`+At(s),{nodes:t}))}},Argument(t){let n=e.getArgument(),r=e.getFieldDef();if(!n&&r){let i=t.name.value,s=e.hideSuggestions?[]:wt(i,r.args.map(o=>o.name));e.reportError(new I(`Unknown argument "${i}" on field "${r}".`+At(s),{nodes:t}))}}}}function lf(e){let t=new Map,n=e.getSchema(),r=n?n.getDirectives():Bt;for(let s of r)t.set(s.name,s.args.map(o=>o.name));let i=e.getDocument().definitions;for(let s of i)if(s.kind===D.DIRECTIVE_DEFINITION){let o=s.arguments??[];t.set(s.name.value,o.map(a=>a.name.value))}return{Directive(s){let o=s.name.value,a=t.get(o);if(s.arguments!=null&&a!=null)for(let u of s.arguments){let l=u.name.value;if(!a.includes(l)){let c=wt(l,a);e.reportError(new I(`Unknown argument "${l}" on directive "@${o}".`+(e.hideSuggestions?"":At(c)),{nodes:u}))}}return!1}}}function oi(e){let t=new Map,n=e.getSchema(),r=n?n.getDirectives():Bt;for(let s of r)t.set(s.name,s.locations);let i=e.getDocument().definitions;for(let s of i)s.kind===D.DIRECTIVE_DEFINITION&&t.set(s.name.value,s.locations.map(o=>o.value));return{Directive(s,o,a,u,l){let c=s.name.value,f=t.get(c);if(f==null){e.reportError(new I(`Unknown directive "@${c}".`,{nodes:s}));return}let h=VE(l);h!=null&&!f.includes(h)&&e.reportError(new I(`Directive "@${c}" may not be used on ${h}.`,{nodes:s}))}}}function VE(e){let t=e.at(-1);switch(t!=null&&"kind"in t||xe(!1),t.kind){case D.OPERATION_DEFINITION:return UE(t.operation);case D.FIELD:return z.FIELD;case D.FRAGMENT_SPREAD:return z.FRAGMENT_SPREAD;case D.INLINE_FRAGMENT:return z.INLINE_FRAGMENT;case D.FRAGMENT_DEFINITION:return z.FRAGMENT_DEFINITION;case D.VARIABLE_DEFINITION:{let n=e[e.length-3];return"kind"in n||xe(!1),n.kind===D.OPERATION_DEFINITION?z.VARIABLE_DEFINITION:z.FRAGMENT_VARIABLE_DEFINITION}case D.SCHEMA_DEFINITION:case D.SCHEMA_EXTENSION:return z.SCHEMA;case D.SCALAR_TYPE_DEFINITION:case D.SCALAR_TYPE_EXTENSION:return z.SCALAR;case D.OBJECT_TYPE_DEFINITION:case D.OBJECT_TYPE_EXTENSION:return z.OBJECT;case D.FIELD_DEFINITION:return z.FIELD_DEFINITION;case D.INTERFACE_TYPE_DEFINITION:case D.INTERFACE_TYPE_EXTENSION:return z.INTERFACE;case D.UNION_TYPE_DEFINITION:case D.UNION_TYPE_EXTENSION:return z.UNION;case D.ENUM_TYPE_DEFINITION:case D.ENUM_TYPE_EXTENSION:return z.ENUM;case D.ENUM_VALUE_DEFINITION:return z.ENUM_VALUE;case D.INPUT_OBJECT_TYPE_DEFINITION:case D.INPUT_OBJECT_TYPE_EXTENSION:return z.INPUT_OBJECT;case D.INPUT_VALUE_DEFINITION:{let n=e.at(-3);return n!=null&&"kind"in n||xe(!1),n.kind===D.INPUT_OBJECT_TYPE_DEFINITION||n.kind===D.INPUT_OBJECT_TYPE_EXTENSION?z.INPUT_FIELD_DEFINITION:z.ARGUMENT_DEFINITION}case D.DIRECTIVE_DEFINITION:case D.DIRECTIVE_EXTENSION:return z.DIRECTIVE_DEFINITION;default:xe(!1,"Unexpected kind: "+H(t.kind))}}function UE(e){switch(e){case ot.QUERY:return z.QUERY;case ot.MUTATION:return z.MUTATION;case ot.SUBSCRIPTION:return z.SUBSCRIPTION}}function is(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new I(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function cf(e){let t=e.getSchema();return{OperationDefinition(n){let r=n.operation;t.getRootType(r)||e.reportError(new I(`The ${r} operation is not supported by the schema.`,{nodes:n}))}}}function ai(e){let{definitions:t}=e.getDocument(),n=e.getSchema()?.getTypeMap()??{},r=new Set([...Object.keys(n),...t.filter(vr).map(i=>i.name.value)]);return{NamedType(i,s,o,a,u){let l=i.name.value;if(!r.has(l)){let c=u[2]??o,f=c!=null&&$E(c);if(f&&r0.has(l))return;let h=e.hideSuggestions?[]:wt(l,f?[...r0,...r]:[...r]);e.reportError(new I(`Unknown type "${l}".`+At(h),{nodes:i}))}}}}var r0=new Set([...ln,...cn].map(e=>e.name));function $E(e){return"kind"in e&&(sf(e)||of(e))}function ff(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===D.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new I("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function ss(e){let t=e.getSchema(),n=t?.astNode??t?.getQueryType()??t?.getMutationType()??t?.getSubscriptionType(),r=0;return{SchemaDefinition(i){if(n){e.reportError(new I("Cannot define a new schema within a schema extension.",{nodes:i}));return}r>0&&e.reportError(new I("Must provide only one schema definition.",{nodes:i})),++r}}}var jE=3;function pf(e){function t(n,r=Object.create(null),i=0){if(n.kind===D.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===!0)return!1;let o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0}}if(n.kind===D.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=jE))return!0;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new I("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function df(e){let t=new Set,n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t.has(s.name.value))return;let o=s.name.value;t.add(o);let a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(let u of a){let l=u.name.value,c=r[l];if(n.push(u),c===void 0){let f=e.getFragment(l);f&&i(f)}else{let f=n.slice(c),h=f.slice(0,-1).map(m=>'"'+m.name.value+'"').join(", ");e.reportError(new I(`Cannot spread fragment "${l}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:f}))}n.pop()}r[o]=void 0}}}function hf(e){return{OperationDefinition(t){let n=new Set(t.variableDefinitions?.map(i=>i.variable.name.value)),r=e.getRecursiveVariableUsages(t);for(let{node:i,fragmentVariableDefinition:s}of r){if(s)continue;let o=i.name.value;n.has(o)||e.reportError(new I(t.name?`Variable "$${o}" is not defined by operation "${t.name.value}".`:`Variable "$${o}" is not defined.`,{nodes:[i,t]}))}}}}function os(e){let t=new Set,n=[];return{OperationDefinition(r){for(let i of e.getRecursivelyReferencedFragments(r))t.add(i.name.value);return!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){for(let r of n){let i=r.name.value;t.has(i)||e.reportError(new I(`Fragment "${i}" is never used.`,{nodes:r}))}}}}}function mf(e){return{FragmentDefinition(t){let n=e.getVariableUsages(t),r=new Set(n.map(({node:s})=>s.name.value)),i=t.variableDefinitions??[];for(let s of i){let o=s.variable.name.value;r.has(o)||e.reportError(new I(`Variable "$${o}" is never used in fragment "${t.name.value}".`,{nodes:s}))}},OperationDefinition(t){let n=e.getRecursiveVariableUsages(t),r=new Set;for(let{node:s,fragmentVariableDefinition:o}of n){let a=s.name.value;o||r.add(a)}let i=t.variableDefinitions??[];for(let s of i){let o=s.variable.name.value;r.has(o)||e.reportError(new I(t.name?`Variable "$${o}" is never used in operation "${t.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}}}function ko(e){switch(e.kind){case D.OBJECT:return{...e,fields:GE(e.fields)};case D.LIST:return{...e,values:e.values.map(ko)};case D.INT:case D.FLOAT:case D.STRING:case D.BOOLEAN:case D.NULL:case D.ENUM:case D.VARIABLE:return e}}function GE(e){return e.map(t=>({...t,value:ko(t.value)})).sort((t,n)=>Wi(t.name.value,n.name.value))}function o0(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+o0(n)).join(" and "):e}function Ef(e){let t=new Tu,n=new yf,r=new Map;return{SelectionSet(i){let s=qE(e,r,t,n,e.getParentType(),i);for(let[[o,a],u,l]of s){let c=o0(a);e.reportError(new I(`Fields "${o}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function qE(e,t,n,r,i,s){let o=[],[a,u]=Nu(e,t,i,s,void 0);if(WE(e,o,t,n,r,a),u.length!==0)for(let l=0;l1)for(let u=0;u[s.value,r===void 0?o:Mo(o,r)]));return e.every(s=>{let o=s.value;t&&(o=Mo(o,t));let a=i.get(s.name.value);return a===void 0?!1:i0(o)===i0(a)})}function Mo(e,t){switch(e.kind){case D.VARIABLE:return t.get(e.name.value)??e;case D.LIST:return{...e,values:e.values.map(n=>Mo(n,t))};case D.OBJECT:return{...e,fields:e.fields.map(n=>({...n,value:Mo(n.value,t)}))};default:return e}}function i0(e){return ve(ko(e))}function s0(e){return e?.find(t=>t.name.value==="stream")}function QE(e,t,n,r){let i=s0(e),s=s0(n);if(!(!i&&!s))return i&&s&&xf(i.arguments,t,s.arguments,r)?"they have overlapping stream directives. See https://github.com/graphql/defer-stream-wg/discussions/100":"they have overlapping stream directives"}function gf(e,t){return pe(e)?pe(t)?gf(e.ofType,t.ofType):!0:pe(t)?!0:ae(e)?ae(t)?gf(e.ofType,t.ofType):!0:ae(t)?!0:Nn(e)||Nn(t)?e!==t:!1}function Nu(e,t,n,r,i){let s=t.get(r);if(s)return s;let o=new Map,a=new Map;u0(e,n,r,o,a,i);let u=[o,Array.from(a.values())];return t.set(r,u),u}function Df(e,t,n,r){let i=t.get(n.selectionSet);if(i)return i;let s=Pe(e.getSchema(),n.typeCondition);return Nu(e,t,s,n.selectionSet,r)}function u0(e,t,n,r,i,s){for(let o of n.selections)switch(o.kind){case D.FIELD:{let a=o.name.value,u;(ge(t)||De(t))&&(u=t.getFields()[a]);let l=o.alias?o.alias.value:a,c=r.get(l);c==null&&(c=[],r.set(l,c)),c.push([t,o,u]);break}case D.FRAGMENT_SPREAD:{let a=zE(e,o,s);i.set(a.key,a);break}case D.INLINE_FRAGMENT:{let a=o.typeCondition,u=a?Pe(e.getSchema(),a):t;u0(e,u,o.selectionSet,r,i,s);break}}}function zE(e,t,n){let r="",i=new Map,s=e.getFragmentSignatureByName()(t.name.value),o=new Map;if(t.arguments)for(let a of t.arguments)o.set(a.name.value,a.value);if(s?.variableDefinitions){r+=t.name.value+"(";for(let[a,u]of s.variableDefinitions){let l=o.get(a);l&&(r+=a+": "+ve(ko(l)));let c=o.get(a);c!==void 0?i.set(a,n!==void 0?Mo(c,n):c):u.defaultValue&&i.set(a,u.defaultValue)}r+=")"}return{key:r,node:t,varMap:i.size>0?i:void 0}}function YE(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var Tu=class{constructor(){this._data=new Map}has(t,n,r){let i=this._data.get(t)?.get(n);return i===void 0?!1:r?!0:r===i}add(t,n,r){let i=this._data.get(t);i===void 0?this._data.set(t,new Map([[n,r]])):i.set(n,r)}},yf=class{constructor(){this._orderedPairSet=new Tu}has(t,n,r){return ti.name.value));for(let i of n.args)!r.has(i.name)&&Zt(i)&&e.reportError(new I(`Argument "${i}" of type "${i.type}" is required, but it was not provided.`,{nodes:t}))}},FragmentSpread:{leave(t){let n=e.getFragmentSignature();if(!n)return!1;let r=new Set(t.arguments?.map(i=>i.name.value));for(let[i,s]of n.variableDefinitions)if(!r.has(i)&&l0(s)){let o=Pe(e.getSchema(),s.type),a=H(o);e.reportError(new I(`Fragment "${t.name.value}" argument "${i}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function _f(e){let t=new Map,r=e.getSchema()?.getDirectives()??Bt;for(let s of r)t.set(s.name,new Map(s.args.filter(Zt).map(o=>[o.name,o])));let i=e.getDocument().definitions;for(let s of i)if(s.kind===D.DIRECTIVE_DEFINITION){let o=s.arguments??[];t.set(s.name.value,new Map(o.filter(l0).map(a=>[a.name.value,a])))}return{Directive:{leave(s){let o=s.name.value,a=t.get(o);if(a!=null){let u=s.arguments??[],l=new Set(u.map(c=>c.name.value));for(let[c,f]of a.entries())if(!l.has(c)){let h=yo(f.type)?H(f.type):ve(f.type);e.reportError(new I(`Argument "@${o}(${c}:)" of type "${h}" is required, but it was not provided.`,{nodes:s}))}}}}}}function l0(e){return e.type.kind===D.NON_NULL_TYPE&&e.defaultValue==null}function Nf(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n)if(Nn(_e(n))){if(r){let i=t.name.value,s=H(n);e.reportError(new I(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(r){if(r.selections.length===0){let i=t.name.value,s=H(n);e.reportError(new I(`Field "${i}" of type "${s}" must have at least one field selected.`,{nodes:t}))}}else{let i=t.name.value,s=H(n);e.reportError(new I(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}function ui(e,t){if(ae(t))return e==null?void 0:ui(e,t.ofType);if(e==null)return null;if(pe(t)){if(!Jt(e)){let i=ui(e,t.ofType);return i===void 0?void 0:[i]}let r=[];for(let i of e){let s=ui(i,t.ofType);if(s===void 0)return;r.push(s)}return r}if(ue(t)){if(!Ge(e)||Array.isArray(e))return;let r=Object.create(null),i=t.getFields(),s=0;for(let o of Object.keys(e))if(e[o]!==void 0&&(s++,!Object.hasOwn(i,o)))return;for(let o of Object.values(i)){let a=e[o.name];if(a===void 0){if(Ht(o))return;let u=Su(o);u!==void 0&&(r[o.name]=u)}else{let u=ui(a,o.type);if(u===void 0)return;r[o.name]=u}}if(t.isOneOf){let o=Object.keys(r);if(s!==1||o.length!==1)return;let a=o[0];if(r[a]===null)return}return r}let n=Kt(t);try{return n.coerceInputValue(e)}catch{}}function _r(e,t,n,r){if(e.kind===D.VARIABLE){let s=c0(e,n,r);return s==null&&ae(t)?void 0:s}if(ae(t))return e.kind===D.NULL?void 0:_r(e,t.ofType,n,r);if(e.kind===D.NULL)return null;if(pe(t)){if(e.kind!==D.LIST){let o=_r(e,t.ofType,n,r);return o===void 0?void 0:[o]}let s=[];for(let o of e.values){let a=_r(o,t.ofType,n,r);if(a===void 0)if(o.kind===D.VARIABLE&&c0(o,n,r)==null&&!ae(t.ofType))a=null;else return;s.push(a)}return s}if(ue(t)){if(e.kind!==D.OBJECT)return;let s=Object.create(null),o=t.getFields();if(e.fields.some(l=>!Object.hasOwn(o,l.name.value)))return;let u=new Map(e.fields.map(l=>[l.name.value,l]));for(let l of Object.values(o)){let c=u.get(l.name);if(!c||c.value.kind===D.VARIABLE&&e8(c.value,n,r)){if(Ht(l))return;let f=Su(l);f!==void 0&&(s[l.name]=f)}else{let f=_r(c.value,l.type,n,r);if(f===void 0)return;s[l.name]=f}}if(t.isOneOf){let l=Object.keys(s);if(u.size!==1||l.length!==1)return;for(let[c,f]of u)if(f.value.kind===D.NULL||s[c]===null)return}return s}let i=Kt(t);try{return i.coerceInputLiteral?i.coerceInputLiteral(Er(e,n,r)):i.parseLiteral(e,n?.coerced)}catch{}}function c0(e,t,n){let r=e.name.value;return n?.sources[r]!==void 0?n.coerced[r]:t?.coerced[r]}function e8(e,t,n){let r=e.name.value;return(n?.sources[r]!==void 0?n.coerced:t?.coerced)?.[r]===void 0}function Su(e){let t=e._memoizedCoercedDefaultValue;if(t!==void 0)return t;let n=e.default;if(n!==void 0)return t=n.literal?_r(n.literal,e.type):ui(n.value,e.type),t===void 0&&xe(!1,`Expected value of type "${e.type}" to be valid, found: ${H(n.literal??n.value)}.`),e._memoizedCoercedDefaultValue=t,t;let r=e.defaultValue;return r!==void 0&&(e._memoizedCoercedDefaultValue=r),r}function f0(e,t,n,r,i){try{let s=Su(n);s!==void 0&&(e[t]=s)}catch(s){let o=n.default;if(o===void 0)throw s;let a=!1;Yc(o,n.type,(u,l)=>{a=!0,r(u,l)},i),a||r(uo(s),[])}}function p0(e,t,n,r,i){let s=e.arguments??[],o=new Map(s.map(l=>[l.name.value,l])),a=Object.create(null),u=Object.create(null);for(let[l,c]of Object.entries(t)){let f=o.get(l);f!==void 0?a[l]=r==null?{signature:c,value:f.value}:{signature:c,value:f.value,fragmentVariableValues:r}:a[l]={signature:c},d0(u,e,l,c,f,n,r,i)}return{sources:a,coerced:u}}function Fu(e,t,n,r,i){let s=Object.create(null),o=t.arguments??[],a=new Map(o.map(u=>[u.name.value,u]));for(let u of e.args){let l=u.name;d0(s,t,l,u,a.get(u.name),n,r,i)}return s}function d0(e,t,n,r,i,s,o,a){let u=r.type,l=(h,m)=>{throw new I(`${Tf(r,t)} has invalid default value${lo(m)}: ${h.message}`,{nodes:t})};if(!i){if(Zt(r))throw new I(`${Tf(r,t)} of required type "${u}" was not provided.`,{nodes:t});f0(e,n,r,l,a);return}let c=i.value;if(c.kind===D.VARIABLE){let h=c.name.value,m=o?.sources[h]?o:s;if((m==null||!Object.hasOwn(m.coerced,h))&&!Zt(r)){f0(e,n,r,l,a);return}}let f=_r(c,u,s,o);f===void 0&&(Jr(c,u,(h,m)=>{throw h.message=`${Tf(r,t)} has invalid value${lo(m)}: ${h.message}`,h},s,o,a),xe(!1,"Invalid argument")),e[n]=f}function Tf(e,t){return Za(e)?`Argument "${e}"`:`Variable "$${e.name}" defined by fragment "${t.name.value}"`}function ls(e,t,n,r,i){let s=t.directives?.find(o=>o.name.value===e.name);if(s)return Fu(e,s,n,r,i)}function g0(e,t,n,r,i,s,o=!1){let a=new Ft,u=[],l={schema:e,fragments:t,variableValues:n,runtimeType:r,visitedFragmentNames:new Map,hideSuggestions:s,forbiddenDirectiveInstances:[],forbidSkipAndInclude:o};return Au(l,i,a,u),{groupedFieldSet:a,newDeferUsages:u,forbiddenDirectiveInstances:l.forbiddenDirectiveInstances}}function Au(e,t,n,r,i,s){let{schema:o,fragments:a,variableValues:u,runtimeType:l,visitedFragmentNames:c,hideSuggestions:f}=e;for(let h of t.selections)switch(h.kind){case D.FIELD:{if(!Sf(e,h,u,s))continue;n.add(t8(h),{node:h,deferUsage:i,fragmentVariableValues:s});break}case D.INLINE_FRAGMENT:{if(!Sf(e,h,u,s)||!m0(o,h,l))continue;let m=h0(u,s,h,i);m?(r.push(m),Au(e,h.selectionSet,n,r,m,s)):Au(e,h.selectionSet,n,r,i,s);break}case D.FRAGMENT_SPREAD:{let m=h.name.value;if(!Sf(e,h,u,s))continue;let g=a[m];if(g==null||!m0(o,g.definition,l))continue;let E=h0(u,s,h,i),v=c.get(m),N;if(E){if(v!==void 0)continue;c.set(m,!0),r.push(E),N=E}else{if(v===!1)continue;c.set(m,!1),N=i}let L=g.variableSignatures,M;L&&(M=p0(h,L,u,s,f)),Au(e,g.definition.selectionSet,n,r,N,M);break}}}function h0(e,t,n,r){let i=ls(qn,n,e,t);if(i&&i.if!==!1)return{label:typeof i.label=="string"?i.label:void 0,parentDeferUsage:r}}function Sf(e,t,n,r){let i=t.directives?.find(u=>u.name.value===ei.name);if(i&&e.forbidSkipAndInclude)return e.forbiddenDirectiveInstances.push(i),!1;if((i?Fu(ei,i,n,r,e.hideSuggestions):void 0)?.if===!0)return!1;let o=t.directives?.find(u=>u.name.value===Zr.name);return o&&e.forbidSkipAndInclude?(e.forbiddenDirectiveInstances.push(o),!1):(o?Fu(Zr,o,n,r,e.hideSuggestions):void 0)?.if!==!1}function m0(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=Pe(e,r);return i===n?!0:ht(i)?e.isSubType(i,n):!1}function t8(e){return e.alias?e.alias.value:e.name.value}function Ff(e){return e.map(t=>t.node)}function Af(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(let c of o.definitions)c.kind===D.FRAGMENT_DEFINITION&&(a[c.name.value]={definition:c});let{groupedFieldSet:u,forbiddenDirectiveInstances:l}=g0(n,a,s,r,t.selectionSet,e.hideSuggestions,!0);if(l.length>0){e.reportError(new I(i!=null?`Subscription "${i}" must not use \`@skip\` or \`@include\` directives in the top level selection.`:"Anonymous Subscription must not use `@skip` or `@include` directives in the top level selection.",{nodes:l}));return}if(u.size>1){let h=[...u.values()].slice(1).flatMap(m=>Ff(m));e.reportError(new I(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:h}))}for(let c of u.values())Ff(c)[0].name.value.startsWith("__")&&e.reportError(new I(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:Ff(c)}))}}}}}function Cf(e){return{Directive(t){let n=e.getFieldDef(),r=e.getParentType();n&&r&&t.name.value===Hn.name&&!(pe(n.type)||Wr(n.type)&&pe(n.type.ofType))&&e.reportError(new I(`Directive "@stream" cannot be used on non-list field "${r}.${n.name}".`,{nodes:t}))}}}function cs(e,t){let n=new Ft;for(let r of e)n.add(t(r),r);return n}function wf(e){return{DirectiveDefinition(r){let i=r.arguments??[];return n(`@${r.name.value}`,i)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){let i=r.name.value,s=r.fields??[];for(let o of s){let a=o.name.value,u=o.arguments??[];n(`${i}.${a}`,u)}return!1}function n(r,i){let s=cs(i,o=>o.name.value);for(let[o,a]of s)a.length>1&&e.reportError(new I(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function li(e){return{Field:t,Directive:t};function t(n){let r=n.arguments??[],i=cs(r,s=>s.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new I(`There can be only one argument named "${s}".`,{nodes:o.map(a=>a.name)}))}}function fs(e){let t=new Map,n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n?.getDirective(i)){e.reportError(new I(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}let s=t.get(i);return s?e.reportError(new I(`There can be only one directive named "@${i}".`,{nodes:[s,r.name]})):t.set(i,r.name),!1}}}function ci(e){let t=new Map,n=e.getSchema(),r=n?n.getDirectives():Bt;for(let u of r)t.set(u.name,!u.isRepeatable);let i=e.getDocument().definitions;for(let u of i)u.kind===D.DIRECTIVE_DEFINITION&&t.set(u.name.value,!u.repeatable);let s=new Map,o=new Map,a=new Map;return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===D.SCHEMA_DEFINITION||u.kind===D.SCHEMA_EXTENSION)l=s;else if(vr(u)||xu(u)){let c=u.name.value;l=o.get(c),l===void 0&&(l=new Map,o.set(c,l))}else if(u.kind===D.DIRECTIVE_DEFINITION||u.kind===D.DIRECTIVE_EXTENSION){let c=u.name.value;l=a.get(c),l===void 0&&(l=new Map,a.set(c,l))}else l=new Map;for(let c of u.directives){let f=c.name.value;if(t.get(f)===!0){let h=l.get(f);h!=null?e.reportError(new I(`The directive "@${f}" can only be used once at this location.`,{nodes:[h,c]})):l.set(f,c)}}}}}function ps(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=new Map;return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){let o=s.name.value,a=r.get(o);a==null&&(a=new Map,r.set(o,a));let u=s.values??[];for(let l of u){let c=l.name.value,f=n[o];if(Me(f)&&f.getValue(c)){e.reportError(new I(`Enum value "${o}.${c}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:l.name}));continue}let h=a.get(c);h!=null?e.reportError(new I(`Enum value "${o}.${c}" can only be defined once.`,{nodes:[h,l.name]})):a.set(c,l.name)}return!1}}function ds(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=new Map;return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){let o=s.name.value,a=r.get(o);a==null&&(a=new Map,r.set(o,a));let u=s.fields??[];for(let l of u){let c=l.name.value;if(n8(n[o],c)){e.reportError(new I(`Field "${o}.${c}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:l.name}));continue}let f=a.get(c);f!=null?e.reportError(new I(`Field "${o}.${c}" can only be defined once.`,{nodes:[f,l.name]})):a.set(c,l.name)}return!1}}function n8(e,t){return ge(e)||De(e)||ue(e)?e.getFields()[t]!=null:!1}function Lf(e){let t=new Map;return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value,i=t.get(r);return i!=null?e.reportError(new I(`There can be only one fragment named "${r}".`,{nodes:[i,n.name]})):t.set(r,n.name),!1}}}function fi(e){let t=[],n=new Map;return{ObjectValue:{enter(){t.push(n),n=new Map},leave(){let r=t.pop();r==null&&xe(!1),n=r}},ObjectField(r){let i=r.name.value,s=n.get(i);s!=null?e.reportError(new I(`There can be only one input field named "${i}".`,{nodes:[s,r.name]})):n.set(i,r.name)}}}function If(e){let t=new Map;return{OperationDefinition(n){let r=n.name;if(r!=null){let i=t.get(r.value);i!=null?e.reportError(new I(`There can be only one operation named "${r.value}".`,{nodes:[i,r]})):t.set(r.value,r)}return!1},FragmentDefinition:()=>!1}}function hs(e){let t=e.getSchema(),n=new Map,r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){let o=s.operationTypes??[];for(let a of o){let u=a.operation,l=n.get(u);r[u]?e.reportError(new I(`Type for ${u} already defined in the schema. It cannot be redefined.`,{nodes:a})):l?e.reportError(new I(`There can be only one ${u} type in schema.`,{nodes:[l,a]})):n.set(u,a)}return!1}}function ms(e){let t=new Map,n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let s=i.name.value;if(n?.getType(s)){e.reportError(new I(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}let o=t.get(s);return o!=null?e.reportError(new I(`There can be only one type named "${s}".`,{nodes:[o,i.name]})):t.set(s,i.name),!1}}function gs(e){return{OperationDefinition(t){let n=t.variableDefinitions??[],r=cs(n,i=>i.variable.name.value);for(let[i,s]of r)s.length>1&&e.reportError(new I(`There can be only one variable named "$${i}".`,{nodes:s.map(o=>o.variable.name)}))}}}function Rf(e){return{NullValue:t=>Nr(e,t,e.getInputType()),ListValue:t=>Nr(e,t,e.getParentInputType()),ObjectValue:t=>Nr(e,t,e.getInputType()),EnumValue:t=>Nr(e,t,e.getInputType()),IntValue:t=>Nr(e,t,e.getInputType()),FloatValue:t=>Nr(e,t,e.getInputType()),StringValue:t=>Nr(e,t,e.getInputType()),BooleanValue:t=>Nr(e,t,e.getInputType())}}function Nr(e,t,n){return n&&Jr(t,n,r=>{e.reportError(r)},void 0,void 0,e.hideSuggestions),!1}function Of(e){return{VariableDefinition(t){let n=Pe(e.getSchema(),t.type);if(n!==void 0&&!Je(n)){let r=t.variable.name.value,i=ve(t.type);e.reportError(new I(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function kf(e){let t;return{OperationDefinition:{enter(){t=new Map},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:s,parentType:o,defaultValue:a,fragmentVariableDefinition:u}of r){let l=i.name.value,c=u;if(c??=t.get(l),c&&s){let f=e.getSchema(),h=Pe(f,c.type);h&&!r8(f,h,c.defaultValue,s,a)&&e.reportError(new I(`Variable "$${l}" of type "${h}" used in position expecting type "${s}".`,{nodes:[c,i]})),ue(o)&&o.isOneOf&&Eo(h)&&e.reportError(new I(`Variable "$${l}" is of type "${h}" but must be non-nullable to be used for OneOf Input Object "${o}".`,{nodes:[c,i]}))}}}},VariableDefinition(n){t.set(n.variable.name.value,n)}}}function r8(e,t,n,r,i){if(ae(r)&&!ae(t)){if(!(n!=null&&n.kind!==D.NULL)&&!(i!==void 0))return!1;let a=r.ofType;return Tn(e,t,a)}return Tn(e,t,r)}var Mf=Object.freeze([pf]),Ds=Object.freeze([ns,cf,If,ff,Af,ai,rs,Of,Nf,af,Lf,is,os,vf,df,gs,hf,mf,oi,ci,ef,nf,Kc,Cf,uf,li,Rf,us,kf,Ef,fi,...Mf]),D0=Object.freeze([ss,hs,ms,ps,ds,wf,fs,ai,oi,ci,as,lf,li,fi,_f]);var Cu=class{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(let r of this.getDocument().definitions)r.kind===D.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let s of i.selections)s.kind===D.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=[];let r=new Set,i=[t.selectionSet],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){let a=o.name.value;if(!r.has(a)){r.add(a);let u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}},wu=class extends Cu{constructor(t,n,r){super(t,r),this._schema=n}get hideSuggestions(){return!1}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}},Po=class extends Cu{constructor(t,n,r,i,s){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map,this._hideSuggestions=s??!1}get[Symbol.toStringTag](){return"ValidationContext"}get hideSuggestions(){return this._hideSuggestions}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new si(this._schema,void 0,this._typeInfo.getFragmentSignatureByName()),s=t.kind===D.FRAGMENT_DEFINITION?t:void 0;yt(t,Oo(i,{VariableDefinition:()=>!1,Variable(o){let a;s?(a=i.getFragmentSignatureByName()(s.name.value)?.variableDefinitions.get(o.name.value),r.push({node:o,type:i.getInputType(),parentType:i.getParentInputType(),defaultValue:void 0,fragmentVariableDefinition:a})):r.push({node:o,type:i.getInputType(),parentType:i.getParentInputType(),defaultValue:i.getDefaultValue(),fragmentVariableDefinition:void 0})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let 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()}getFragmentSignature(){return this._typeInfo.getFragmentSignature()}getFragmentSignatureByName(){return this._typeInfo.getFragmentSignatureByName()}getEnumValue(){return this._typeInfo.getEnumValue()}};var i8=_n(fo,e=>e.filter(t=>t!=="description")),Pf=new I("Too many validation errors, error limit reached. Validation aborted.");function ys(e,t,n=Ds,r){return mu(Xc)?Xc.traceSync(()=>y0(e,t,n,r),{schema:e,document:t}):y0(e,t,n,r)}function y0(e,t,n,r){let i=r?.maxErrors??100,s=r?.hideSuggestions??!1;Qc(e);let o=[],a=new si(e),u=new Po(e,t,a,c=>{if(o.length>=i)throw Pf;o.push(c)},s),l=mo(n.map(c=>c(u)));try{yt(t,Oo(a,l),i8)}catch(c){if(c===Pf)o.push(Pf);else throw c}return o}function s8(e,t,n=D0){let r=[],i=new wu(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return yt(e,mo(s)),r}function E0(e){let t=s8(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}function rn(e,t,n){if(e){if(e.kind===x.VARIABLE){var r=e.name.value;if(n==null||n[r]===void 0)return;var i=n[r];return i===null&&he(t)?void 0:i}if(he(t))return e.kind===x.NULL?void 0:rn(e,t.ofType,n);if(e.kind===x.NULL)return null;if(we(t)){var s=t.ofType;if(e.kind===x.LIST){for(var o=[],a=0,u=e.values;a0?n.reverse().join(` -`):void 0}}function Do(e,t){e!=null&&e.kind===x.DOCUMENT||fe(0,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&g0(e);var n={description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},r=x0(n,e,t);if(r.astNode==null)for(var i=0,s=r.types;i!r.isDeprecated);let n=e.map(r=>({proximity:U9(_0(r.label),t),entry:r}));return uf(uf(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,i)=>(r.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||r.proximity-i.proximity||r.entry.label.length-i.entry.label.length).map(r=>r.entry)}function uf(e,t){let n=e.filter(t);return n.length===0?e:n}function _0(e){return e.toLowerCase().replaceAll(/\W/g,"")}function U9(e,t){let n=j9(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function j9(e,t){let n,r,i=[],s=e.length,o=t.length;for(n=0;n<=s;n++)i[n]=[n];for(r=1;r<=o;r++)i[0][r]=r;for(n=1;n<=s;n++)for(r=1;r<=o;r++){let a=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+a),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+a))}return i[s][o]}var G9=e=>` { +`))}function Lu(e){return{Field(t){let n=e.getFieldDef(),r=n?.deprecationReason;n&&r!=null&&e.reportError(new I(`The field ${n} is deprecated. ${r}`,{nodes:t}))},Argument(t){let n=e.getArgument(),r=n?.deprecationReason;n&&r!=null&&e.reportError(new I(`The argument "${n}" is deprecated. ${r}`,{nodes:t}))},ObjectField(t){let n=_e(e.getParentInputType());if(ue(n)){let r=n.getFields()[t.name.value],i=r?.deprecationReason;i!=null&&e.reportError(new I(`The input field ${r} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n?.deprecationReason;n&&r!=null&&e.reportError(new I(`The enum value "${n}" is deprecated. ${r}`,{nodes:t}))}}}function Bo(e,t){Ge(e)&&Ge(e.__schema)||Mt(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${H(e)}.`);let n=e.__schema,r=new Map(n.types.map(T=>[T.name,h(T)]));for(let T of[...ln,...cn])r.has(T.name)&&r.set(T.name,T);let i=n.queryType!=null?c(n.queryType):null,s=n.mutationType!=null?c(n.mutationType):null,o=n.subscriptionType!=null?c(n.subscriptionType):null,a=n.directives!=null?n.directives.map(k):[];return new xr({description:n.description,query:i,mutation:s,subscription:o,types:[...r.values()],directives:a,assumeValid:t?.assumeValid});function u(T){if(T.kind===Fe.LIST){let A=T.ofType;if(A==null)throw new Error("Decorated type deeper than introspection query.");return new Te(u(A))}if(T.kind===Fe.NON_NULL){let A=T.ofType;if(A==null)throw new Error("Decorated type deeper than introspection query.");let j=u(A);return new Z(nu(j))}return l(T)}function l(T){let A=T.name;if(!A)throw new Error(`Unknown type reference: ${H(T)}.`);let j=r.get(A);if(j==null)throw new Error(`Invalid or incomplete schema, unknown type: ${A}. Ensure that a full introspection query is used in order to build a client schema.`);return j}function c(T){return Ka(l(T))}function f(T){return eu(l(T))}function h(T){switch(T.kind){case Fe.SCALAR:return m(T);case Fe.OBJECT:return E(T);case Fe.INTERFACE:return v(T);case Fe.UNION:return N(T);case Fe.ENUM:return L(T);case Fe.INPUT_OBJECT:return M(T);default:throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${H(T)}.`)}}function m(T){return new Et({name:T.name,description:T.description,specifiedByURL:T.specifiedByURL})}function g(T){if(T.interfaces===null&&T.kind===Fe.INTERFACE)return[];if(T.interfaces==null){let A=H(T);throw new Error(`Introspection result missing interfaces: ${A}.`)}return T.interfaces.map(f)}function E(T){return new qe({name:T.name,description:T.description,interfaces:()=>g(T),fields:()=>w(T)})}function v(T){return new bt({name:T.name,description:T.description,interfaces:()=>g(T),fields:()=>w(T)})}function N(T){if(T.possibleTypes==null){let A=H(T);throw new Error(`Introspection result missing possibleTypes: ${A}.`)}return new an({name:T.name,description:T.description,types:()=>T.possibleTypes.map(c)})}function L(T){if(T.enumValues==null){let A=H(T);throw new Error(`Introspection result missing enumValues: ${A}.`)}return new dt({name:T.name,description:T.description,values:on(T.enumValues,A=>A.name,A=>({description:A.description,deprecationReason:A.deprecationReason}))})}function M(T){if(T.inputFields==null){let A=H(T);throw new Error(`Introspection result missing inputFields: ${A}.`)}return new Gt({name:T.name,description:T.description,fields:()=>V(T.inputFields),isOneOf:T.isOneOf})}function w(T){if(T.fields==null)throw new Error(`Introspection result missing fields: ${H(T)}.`);return on(T.fields,A=>A.name,R)}function R(T){let A=u(T.type);if(!qt(A)){let j=H(A);throw new Error(`Introspection must provide output type for fields, but received: ${j}.`)}if(T.args==null){let j=H(T);throw new Error(`Introspection result missing field args: ${j}.`)}return{description:T.description,deprecationReason:T.deprecationReason,type:A,args:V(T.args)}}function V(T){return on(T,A=>A.name,S)}function S(T){let A=u(T.type);if(!Je(A)){let j=H(A);throw new Error(`Introspection must provide input type for arguments, but received: ${j}.`)}return{description:T.description,type:A,default:T.defaultValue!=null?{literal:bu(T.defaultValue)}:void 0,deprecationReason:T.deprecationReason}}function k(T){if(T.args==null){let A=H(T);throw new Error(`Introspection result missing directive args: ${A}.`)}if(T.locations==null){let A=H(T);throw new Error(`Introspection result missing directive locations: ${A}.`)}return new lt({name:T.name,description:T.description,isRepeatable:T.isRepeatable,deprecationReason:T.deprecationReason,locations:T.locations.slice(),args:V(T.args)})}}var nt={SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD:"FIELD",ARGUMENT:"ARGUMENT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD:"INPUT_FIELD",DIRECTIVE:"DIRECTIVE"};function b0(e,t){let n=t({getNamedType:u,setNamedType:l,getNamedTypes:c}),r=new Map;for(let S of e.types){let k=S.name,T=f(S);T&&r.set(k,T)}let i=[];for(let S of e.directives){if(qc(S)){i.push(S);continue}let k=V(S.toConfig());k&&i.push(new lt(k))}let s={...e,query:e.query&&u(e.query.name),mutation:e.mutation&&u(e.mutation.name),subscription:e.subscription&&u(e.subscription.name),types:Array.from(r.values()),directives:i},o=n[nt.SCHEMA];return o==null?s:o(s);function a(S){return pe(S)?new Te(a(S.ofType)):ae(S)?new Z(a(S.ofType)):u(S.name)}function u(S){let k=A8.get(S)??r.get(S);return k===void 0&&xe(!1,`Unknown type: "${S}".`),k}function l(S){r.set(S.name,S)}function c(){return Array.from(r.values())}function f(S){if(Zi(S)||ou(S))return S;if(at(S))return h(S);if(ge(S))return m(S);if(De(S))return v(S);if(Ye(S))return N(S);if(Me(S))return L(S);if(ue(S))return w(S);xe(!1,"Unexpected type: "+H(S))}function h(S){let k=S.toConfig(),T=n[nt.SCALAR];return k=T==null?k:T(k),new Et(k)}function m(S){let k=S.toConfig(),T={...k,interfaces:()=>k.interfaces.map(j=>u(j.name)),fields:()=>g(k.fields,S.name)},A=n[nt.OBJECT];return T=A==null?T:A(T),new qe(T)}function g(S,k){let T=Object.create(null);for(let[A,j]of Object.entries(S)){let Q={...j,type:a(j.type),args:E(j.args,A,k)},te=n[nt.FIELD];te&&(Q=te(Q,k)),T[A]=Q}return T}function E(S,k,T){let A=Object.create(null);for(let[j,Q]of Object.entries(S)){let te={...Q,type:a(Q.type)},C=n[nt.ARGUMENT];C&&(te=C(te,k,T)),A[j]=te}return A}function v(S){let k=S.toConfig(),T={...k,interfaces:()=>k.interfaces.map(j=>u(j.name)),fields:()=>g(k.fields,S.name)},A=n[nt.INTERFACE];return T=A==null?T:A(T),new bt(T)}function N(S){let k=S.toConfig(),T={...k,types:()=>k.types.map(j=>u(j.name))},A=n[nt.UNION];return T=A==null?T:A(T),new an(T)}function L(S){let k=S.toConfig(),T={...k,values:()=>{let j=Object.create(null);for(let[Q,te]of Object.entries(k.values)){let C=M(te,Q,S.name);j[Q]=C}return j}},A=n[nt.ENUM];return T=A==null?T:A(T),new dt(T)}function M(S,k,T){let A={...S},j=n[nt.ENUM_VALUE];return j==null?A:j(A,k,T)}function w(S){let k=S.toConfig(),T={...k,fields:()=>{let j=Object.create(null);for(let[Q,te]of Object.entries(k.fields)){let C=R(te,Q,S.name);j[Q]=C}return j}},A=n[nt.INPUT_OBJECT];return T=A==null?T:A(T),new Gt(T)}function R(S,k,T){let A={...S,type:a(S.type)},j=n[nt.INPUT_FIELD];return j==null?A:j(A,k,T)}function V(S){let k={...S,args:E(S.args,S.name,void 0)},T=n[nt.DIRECTIVE];return T==null?k:T(k)}}var A8=new Map([...ln,...cn].map(e=>[e.name,e]));function x0(e,t,n){let r=[],i=new Ft,s=new Ft,o=new Ft,a=new Ft,u=new Ft,l=new Ft,c=new Ft,f=[],h,m=[],g=!1;for(let E of t.definitions){switch(E.kind){case D.SCHEMA_DEFINITION:h=E;break;case D.SCHEMA_EXTENSION:m.push(E);break;case D.DIRECTIVE_DEFINITION:f.push(E);break;case D.DIRECTIVE_EXTENSION:c.add(E.name.value,E);break;case D.SCALAR_TYPE_DEFINITION:case D.OBJECT_TYPE_DEFINITION:case D.INTERFACE_TYPE_DEFINITION:case D.UNION_TYPE_DEFINITION:case D.ENUM_TYPE_DEFINITION:case D.INPUT_OBJECT_TYPE_DEFINITION:r.push(E);break;case D.SCALAR_TYPE_EXTENSION:i.add(E.name.value,E);break;case D.OBJECT_TYPE_EXTENSION:s.add(E.name.value,E);break;case D.INTERFACE_TYPE_EXTENSION:o.add(E.name.value,E);break;case D.UNION_TYPE_EXTENSION:a.add(E.name.value,E);break;case D.ENUM_TYPE_EXTENSION:u.add(E.name.value,E);break;case D.INPUT_OBJECT_TYPE_EXTENSION:l.add(E.name.value,E);break;default:continue}g=!0}return g?b0(e,E=>{let{getNamedType:v,setNamedType:N,getNamedTypes:L}=E;return{[nt.SCHEMA]:x=>{for(let P of r){let q=C8.get(P.name.value)??C(P);N(q)}let B={query:x.query&&v(x.query.name),mutation:x.mutation&&v(x.mutation.name),subscription:x.subscription&&v(x.subscription.name),...h&&M([h]),...M(m)};return{description:h?.description?.value??x.description,...B,types:L(),directives:[...x.directives.map(S),...f.map(V)],extensions:x.extensions,astNode:h??x.astNode,extensionASTNodes:x.extensionASTNodes.concat(m),assumeValid:n?.assumeValid??!1}},[nt.INPUT_OBJECT]:x=>{let B=l.get(x.name)??[];return{...x,fields:()=>({...x.fields(),...A(B)}),extensionASTNodes:x.extensionASTNodes.concat(B)}},[nt.ENUM]:x=>{let B=u.get(x.name)??[];return{...x,values:()=>({...x.values(),...j(B)}),extensionASTNodes:x.extensionASTNodes.concat(B)}},[nt.SCALAR]:x=>{let B=i.get(x.name)??[],P=x.specifiedByURL;for(let q of B)P=Bf(q)??P;return{...x,specifiedByURL:P,extensionASTNodes:x.extensionASTNodes.concat(B)}},[nt.OBJECT]:x=>{let B=s.get(x.name)??[];return{...x,interfaces:()=>[...x.interfaces(),...Q(B)],fields:()=>({...x.fields(),...k(B)}),extensionASTNodes:x.extensionASTNodes.concat(B)}},[nt.INTERFACE]:x=>{let B=o.get(x.name)??[];return{...x,interfaces:()=>[...x.interfaces(),...Q(B)],fields:()=>({...x.fields(),...k(B)}),extensionASTNodes:x.extensionASTNodes.concat(B)}},[nt.UNION]:x=>{let B=a.get(x.name)??[];return{...x,types:()=>[...x.types(),...te(B)],extensionASTNodes:x.extensionASTNodes.concat(B)}}};function M(x){let B={};for(let P of x){let q=P.operationTypes??[];for(let J of q)B[J.operation]=w(J.type)}return B}function w(x){let B=x.name.value,P=v(B);return P===void 0&&xe(!1,`Unknown type: "${B}".`),P}function R(x){return x.kind===D.LIST_TYPE?new Te(R(x.type)):x.kind===D.NON_NULL_TYPE?new Z(R(x.type)):w(x)}function V(x){let B=c.get(x.name.value)??[],P=pi(x)??B.map(q=>pi(q)).find(q=>q!=null);return new lt({name:x.name.value,description:x.description?.value,locations:x.locations.map(({value:q})=>q),isRepeatable:x.repeatable,args:T(x.arguments),deprecationReason:P,astNode:x,extensionASTNodes:B})}function S(x){let B=c.get(x.name)??[];if(B.length===0)return x;let P=x.deprecationReason??B.map(q=>pi(q)).find(q=>q!=null);return new lt({...x.toConfig(),deprecationReason:P,extensionASTNodes:x.extensionASTNodes.concat(B)})}function k(x){let B=Object.create(null);for(let P of x){let q=P.fields??[];for(let J of q)B[J.name.value]={type:R(J.type),description:J.description?.value,args:T(J.arguments),deprecationReason:pi(J),astNode:J}}return B}function T(x){let B=x??[],P=Object.create(null);for(let q of B){let J=R(q.type);P[q.name.value]={type:J,description:q.description?.value,default:q.defaultValue&&{literal:q.defaultValue},deprecationReason:pi(q),astNode:q}}return P}function A(x){let B=Object.create(null);for(let P of x){let q=P.fields??[];for(let J of q){let se=R(J.type);B[J.name.value]={type:se,description:J.description?.value,default:J.defaultValue&&{literal:J.defaultValue},deprecationReason:pi(J),astNode:J}}}return B}function j(x){let B=Object.create(null);for(let P of x){let q=P.values??[];for(let J of q)B[J.name.value]={description:J.description?.value,deprecationReason:pi(J),astNode:J}}return B}function Q(x){return x.flatMap(B=>B.interfaces?.map(w)??[])}function te(x){return x.flatMap(B=>B.types?.map(w)??[])}function C(x){let B=x.name.value;switch(x.kind){case D.OBJECT_TYPE_DEFINITION:{let P=s.get(B)??[],q=[x,...P];return new qe({name:B,description:x.description?.value,interfaces:()=>Q(q),fields:()=>k(q),astNode:x,extensionASTNodes:P})}case D.INTERFACE_TYPE_DEFINITION:{let P=o.get(B)??[],q=[x,...P];return new bt({name:B,description:x.description?.value,interfaces:()=>Q(q),fields:()=>k(q),astNode:x,extensionASTNodes:P})}case D.ENUM_TYPE_DEFINITION:{let P=u.get(B)??[],q=[x,...P];return new dt({name:B,description:x.description?.value,values:()=>j(q),astNode:x,extensionASTNodes:P})}case D.UNION_TYPE_DEFINITION:{let P=a.get(B)??[],q=[x,...P];return new an({name:B,description:x.description?.value,types:()=>te(q),astNode:x,extensionASTNodes:P})}case D.SCALAR_TYPE_DEFINITION:{let P=i.get(B)??[],q=Bf(x);for(let J of P)q=Bf(J)??q;return new Et({name:B,description:x.description?.value,specifiedByURL:q,astNode:x,extensionASTNodes:P})}case D.INPUT_OBJECT_TYPE_DEFINITION:{let P=l.get(B)??[],q=[x,...P];return new Gt({name:B,description:x.description?.value,fields:()=>A(q),astNode:x,extensionASTNodes:P,isOneOf:w8(x)})}}}}):e}var C8=new Map([...ln,...cn].map(e=>[e.name,e]));function pi(e){return ls(Ji,e)?.reason}function Bf(e){return ls(au,e)?.url}function w8(e){return!!ls(uu,e)}function Vo(e,t){t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&E0(e);let r=x0({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...Bt.filter(s=>r.directives.every(o=>o.name!==s.name))];return new xr({...r,directives:i})}function Tr(e){let t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i!r.isDeprecated);let n=e.map(r=>({proximity:R8(v0(r.label),t),entry:r}));return Vf(Vf(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,i)=>(r.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||r.proximity-i.proximity||r.entry.label.length-i.entry.label.length).map(r=>r.entry)}function Vf(e,t){let n=e.filter(t);return n.length===0?e:n}function v0(e){return e.toLowerCase().replaceAll(/\W/g,"")}function R8(e,t){let n=O8(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function O8(e,t){let n,r,i=[],s=e.length,o=t.length;for(n=0;n<=s;n++)i[n]=[n];for(r=1;r<=o;r++)i[0][r]=r;for(n=1;n<=s;n++)for(r=1;r<=o;r++){let a=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+a),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+a))}return i[s][o]}var k8=e=>` { $${e??1} -}`,yo=(e,t,n)=>{if(!t)return n??e;let r=Ce(t);return ve(r)||xe(r)||we(r)||It(r)?e+G9():n??e},lf=(e,t,n)=>{if(we(t)){let r=Ce(t.ofType);return e+`[${yo("",r,"$1")}]`}return yo(e,t,n)},T0=e=>{let t=e.args.filter(n=>n.type.toString().endsWith("!"));if(t.length)return e.name+`(${t.map((n,r)=>`${n.name}: $${r+1}`)}) ${yo("",e.type,` -`)}`};var N0;(function(e){function t(n){return typeof n=="string"}e.is=t})(N0||(N0={}));var cf;(function(e){function t(n){return typeof n=="string"}e.is=t})(cf||(cf={}));var S0;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(S0||(S0={}));var cu;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(cu||(cu={}));var yn;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=cu.MAX_VALUE),i===Number.MAX_VALUE&&(i=cu.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.uinteger(i.line)&&R.uinteger(i.character)}e.is=n})(yn||(yn={}));var et;(function(e){function t(r,i,s,o){if(R.uinteger(r)&&R.uinteger(i)&&R.uinteger(s)&&R.uinteger(o))return{start:yn.create(r,i),end:yn.create(s,o)};if(yn.is(r)&&yn.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&yn.is(i.start)&&yn.is(i.end)}e.is=n})(et||(et={}));var fu;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&et.is(i.range)&&(R.string(i.uri)||R.undefined(i.uri))}e.is=n})(fu||(fu={}));var F0;(function(e){function t(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&et.is(i.targetRange)&&R.string(i.targetUri)&&et.is(i.targetSelectionRange)&&(et.is(i.originSelectionRange)||R.undefined(i.originSelectionRange))}e.is=n})(F0||(F0={}));var ff;(function(e){function t(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.numberRange(i.red,0,1)&&R.numberRange(i.green,0,1)&&R.numberRange(i.blue,0,1)&&R.numberRange(i.alpha,0,1)}e.is=n})(ff||(ff={}));var A0;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&et.is(i.range)&&ff.is(i.color)}e.is=n})(A0||(A0={}));var w0;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.undefined(i.textEdit)||cs.is(i))&&(R.undefined(i.additionalTextEdits)||R.typedArray(i.additionalTextEdits,cs.is))}e.is=n})(w0||(w0={}));var C0;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(C0||(C0={}));var L0;(function(e){function t(r,i,s,o,a,u){let l={startLine:r,endLine:i};return R.defined(s)&&(l.startCharacter=s),R.defined(o)&&(l.endCharacter=o),R.defined(a)&&(l.kind=a),R.defined(u)&&(l.collapsedText=u),l}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.uinteger(i.startLine)&&R.uinteger(i.startLine)&&(R.undefined(i.startCharacter)||R.uinteger(i.startCharacter))&&(R.undefined(i.endCharacter)||R.uinteger(i.endCharacter))&&(R.undefined(i.kind)||R.string(i.kind))}e.is=n})(L0||(L0={}));var pf;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&fu.is(i.location)&&R.string(i.message)}e.is=n})(pf||(pf={}));var I0;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(I0||(I0={}));var R0;(function(e){e.Unnecessary=1,e.Deprecated=2})(R0||(R0={}));var O0;(function(e){function t(n){let r=n;return R.objectLiteral(r)&&R.string(r.href)}e.is=t})(O0||(O0={}));var pu;(function(e){function t(s,o,a,u,l,c){let f={range:s,message:o};return R.defined(a)&&(f.severity=a),R.defined(u)&&(f.code=u),R.defined(l)&&(f.source=l),R.defined(c)&&(f.relatedInformation=c),f}e.create=t;function n(s){var o;let a=s;return R.defined(a)&&et.is(a.range)&&(R.string(a.message)||si.is(a.message))&&(R.number(a.severity)||R.undefined(a.severity))&&(R.integer(a.code)||R.string(a.code)||R.undefined(a.code))&&(R.undefined(a.codeDescription)||R.string((o=a.codeDescription)===null||o===void 0?void 0:o.href))&&(R.string(a.source)||R.undefined(a.source))&&(R.undefined(a.relatedInformation)||R.typedArray(a.relatedInformation,pf.is))}e.is=n;function r(s){return R.string(s.message)}e.is3_17=r;function i(s){if(R.string(s.message))return s.message;if(si.is(s.message))return s.message.value;throw new Error(`Unknown message type ${typeof s.message}`)}e.getMessageString=i})(pu||(pu={}));var ls;(function(e){function t(r,i,...s){let o={title:r,command:i};return R.defined(s)&&s.length>0&&(o.arguments=s),o}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.title)&&(i.tooltip===void 0||R.string(i.tooltip))&&R.string(i.command)}e.is=n})(ls||(ls={}));var cs;(function(e){function t(s,o){return{range:s,newText:o}}e.replace=t;function n(s,o){return{range:{start:s,end:s},newText:o}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){let o=s;return R.objectLiteral(o)&&R.string(o.newText)&&et.is(o.range)}e.is=i})(cs||(cs={}));var hu;(function(e){function t(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(R.string(i.description)||i.description===void 0)}e.is=n})(hu||(hu={}));var ii;(function(e){function t(n){let r=n;return R.string(r)}e.is=t})(ii||(ii={}));var k0;(function(e){function t(s,o,a){return{range:s,newText:o,annotationId:a}}e.replace=t;function n(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}e.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}e.del=r;function i(s){let o=s;return cs.is(o)&&(hu.is(o.annotationId)||ii.is(o.annotationId))}e.is=i})(k0||(k0={}));var hf;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&Df.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(hf||(hf={}));var df;(function(e){function t(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&R.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ii.is(i.annotationId))}e.is=n})(df||(df={}));var mf;(function(e){function t(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&R.string(i.oldUri)&&R.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ii.is(i.annotationId))}e.is=n})(mf||(mf={}));var gf;(function(e){function t(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&R.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||R.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||R.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ii.is(i.annotationId))}e.is=n})(gf||(gf={}));var vf;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>R.string(i.kind)?df.is(i)||mf.is(i)||gf.is(i):hf.is(i)))}e.is=t})(vf||(vf={}));var M0;(function(e){function t(n){let r=n;return R.objectLiteral(r)&&et.is(r.range)&&_f.isSnippet(r.snippet)&&(r.annotationId===void 0||hu.is(r.annotationId)||ii.is(r.annotationId))}e.is=t})(M0||(M0={}));var P0;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)}e.is=n})(P0||(P0={}));var B0;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.integer(i.version)}e.is=n})(B0||(B0={}));var Df;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&(i.version===null||R.integer(i.version))}e.is=n})(Df||(Df={}));var V0;(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(V0||(V0={}));var U0;(function(e){function t(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.string(i.languageId)&&R.integer(i.version)&&R.string(i.text)}e.is=n})(U0||(U0={}));var yf;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(yf||(yf={}));var si;(function(e){function t(n){let r=n;return R.objectLiteral(n)&&yf.is(r.kind)&&R.string(r.value)}e.is=t})(si||(si={}));var j0;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(j0||(j0={}));var Ar;(function(e){e.PlainText=1,e.Snippet=2})(Ar||(Ar={}));var G0;(function(e){e.Deprecated=1})(G0||(G0={}));var q0;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){let i=r;return i&&R.string(i.newText)&&et.is(i.insert)&&et.is(i.replace)}e.is=n})(q0||(q0={}));var wr;(function(e){e.asIs=1,e.adjustIndentation=2})(wr||(wr={}));var $0;(function(e){e.Replace=1,e.Merge=2})($0||($0={}));var H0;(function(e){function t(n){let r=n;return r&&(R.string(r.detail)||r.detail===void 0)&&(R.string(r.description)||r.description===void 0)}e.is=t})(H0||(H0={}));var W0;(function(e){function t(n){return{label:n}}e.create=t})(W0||(W0={}));var Q0;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Q0||(Q0={}));var du;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return R.string(i)||R.objectLiteral(i)&&R.string(i.language)&&R.string(i.value)}e.is=n})(du||(du={}));var z0;(function(e){function t(n){let r=n;return!!r&&R.objectLiteral(r)&&(si.is(r.contents)||du.is(r.contents)||R.typedArray(r.contents,du.is))&&(n.range===void 0||et.is(n.range))}e.is=t})(z0||(z0={}));var Y0;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Y0||(Y0={}));var J0;(function(e){function t(n,r,...i){let s={label:n};return R.defined(r)&&(s.documentation=r),R.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(J0||(J0={}));var X0;(function(e){e.Text=1,e.Read=2,e.Write=3})(X0||(X0={}));var K0;(function(e){function t(n,r){let i={range:n};return R.number(r)&&(i.kind=r),i}e.create=t})(K0||(K0={}));var Z0;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Z0||(Z0={}));var em;(function(e){e.Deprecated=1})(em||(em={}));var tm;(function(e){function t(n,r,i,s,o){let a={name:n,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}e.create=t})(tm||(tm={}));var nm;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(nm||(nm={}));var rm;(function(e){function t(r,i,s,o,a,u){let l={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(l.children=u),l}e.create=t;function n(r){let i=r;return i&&R.string(i.name)&&R.number(i.kind)&&et.is(i.range)&&et.is(i.selectionRange)&&(i.detail===void 0||R.string(i.detail))&&(i.deprecated===void 0||R.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(rm||(rm={}));var im;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(im||(im={}));var mu;(function(e){e.Invoked=1,e.Automatic=2})(mu||(mu={}));var sm;(function(e){function t(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}e.create=t;function n(r){let i=r;return R.defined(i)&&R.typedArray(i.diagnostics,pu.is)&&(i.only===void 0||R.typedArray(i.only,R.string))&&(i.triggerKind===void 0||i.triggerKind===mu.Invoked||i.triggerKind===mu.Automatic)}e.is=n})(sm||(sm={}));var Ef;(function(e){e.LLMGenerated=1;function t(n){return R.defined(n)&&n===e.LLMGenerated}e.is=t})(Ef||(Ef={}));var om;(function(e){function t(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):ls.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}e.create=t;function n(r){let i=r;return i&&R.string(i.title)&&(i.diagnostics===void 0||R.typedArray(i.diagnostics,pu.is))&&(i.kind===void 0||R.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ls.is(i.command))&&(i.isPreferred===void 0||R.boolean(i.isPreferred))&&(i.edit===void 0||vf.is(i.edit))&&(i.tags===void 0||R.typedArray(i.tags,Ef.is))}e.is=n})(om||(om={}));var am;(function(e){function t(r,i){let s={range:r};return R.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return R.defined(i)&&et.is(i.range)&&(R.undefined(i.command)||ls.is(i.command))}e.is=n})(am||(am={}));var um;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.uinteger(i.tabSize)&&R.boolean(i.insertSpaces)}e.is=n})(um||(um={}));var lm;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return R.defined(i)&&et.is(i.range)&&(R.undefined(i.target)||R.string(i.target))}e.is=n})(lm||(lm={}));var cm;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&et.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(cm||(cm={}));var fm;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(fm||(fm={}));var pm;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(pm||(pm={}));var hm;(function(e){function t(n){let r=n;return R.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(hm||(hm={}));var dm;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&et.is(i.range)&&R.string(i.text)}e.is=n})(dm||(dm={}));var mm;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){let i=r;return i!=null&&et.is(i.range)&&R.boolean(i.caseSensitiveLookup)&&(R.string(i.variableName)||i.variableName===void 0)}e.is=n})(mm||(mm={}));var gm;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&et.is(i.range)&&(R.string(i.expression)||i.expression===void 0)}e.is=n})(gm||(gm={}));var vm;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&et.is(r.stoppedLocation)}e.is=n})(vm||(vm={}));var bf;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(bf||(bf={}));var xf;(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&(i.tooltip===void 0||R.string(i.tooltip)||si.is(i.tooltip))&&(i.location===void 0||fu.is(i.location))&&(i.command===void 0||ls.is(i.command))}e.is=n})(xf||(xf={}));var Dm;(function(e){function t(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&yn.is(i.position)&&(R.string(i.label)||R.typedArray(i.label,xf.is))&&(i.kind===void 0||bf.is(i.kind))&&i.textEdits===void 0||R.typedArray(i.textEdits,cs.is)&&(i.tooltip===void 0||R.string(i.tooltip)||si.is(i.tooltip))&&(i.paddingLeft===void 0||R.boolean(i.paddingLeft))&&(i.paddingRight===void 0||R.boolean(i.paddingRight))}e.is=n})(Dm||(Dm={}));var _f;(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let i=r;return R.objectLiteral(i)&&i.kind==="snippet"&&R.string(i.value)}e.isSnippet=n})(_f||(_f={}));var ym;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(ym||(ym={}));var Em;(function(e){function t(n){return{items:n}}e.create=t})(Em||(Em={}));var bm;(function(e){e.Invoked=1,e.Automatic=2})(bm||(bm={}));var xm;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(xm||(xm={}));var _m;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(_m||(_m={}));var Tm;(function(e){function t(n){let r=n;return R.objectLiteral(r)&&cf.is(r.uri)&&R.string(r.name)}e.is=t})(Tm||(Tm={}));var Nm;(function(e){function t(s,o,a,u){return new Tf(s,o,a,u)}e.create=t;function n(s){let o=s;return!!(R.defined(o)&&R.string(o.uri)&&(R.undefined(o.languageId)||R.string(o.languageId))&&R.uinteger(o.lineCount)&&R.func(o.getText)&&R.func(o.positionAt)&&R.func(o.offsetAt))}e.is=n;function r(s,o){let a=s.getText(),u=i(o,(c,f)=>{let h=c.range.start.line-f.range.start.line;return h===0?c.range.start.character-f.range.start.character:h}),l=a.length;for(let c=u.length-1;c>=0;c--){let f=u[c],h=s.offsetAt(f.range.start),m=s.offsetAt(f.range.end);if(m<=l)a=a.substring(0,h)+f.newText+a.substring(m,a.length);else throw new Error("Overlapping edit");l=h}return a}e.applyEdits=r;function i(s,o){if(s.length<=1)return s;let a=s.length/2|0,u=s.slice(0,a),l=s.slice(a);i(u,o),i(l,o);let c=0,f=0,h=0;for(;c{if(!t)return n??e;let r=_e(t);return ge(r)||ue(r)||pe(r)||ht(r)?e+k8():n??e},Uf=(e,t,n)=>{if(pe(t)){let r=_e(t.ofType);return e+`[${Uo("",r,"$1")}]`}return Uo(e,t,n)},_0=e=>{let t=e.args.filter(n=>n.type.toString().endsWith("!"));if(t.length)return e.name+`(${t.map((n,r)=>`${n.name}: $${r+1}`)}) ${Uo("",e.type,` +`)}`};var N0;(function(e){function t(n){return typeof n=="string"}e.is=t})(N0||(N0={}));var $f;(function(e){function t(n){return typeof n=="string"}e.is=t})($f||($f={}));var T0;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(T0||(T0={}));var Iu;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Iu||(Iu={}));var dn;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=Iu.MAX_VALUE),i===Number.MAX_VALUE&&(i=Iu.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.uinteger(i.line)&&O.uinteger(i.character)}e.is=n})(dn||(dn={}));var He;(function(e){function t(r,i,s,o){if(O.uinteger(r)&&O.uinteger(i)&&O.uinteger(s)&&O.uinteger(o))return{start:dn.create(r,i),end:dn.create(s,o)};if(dn.is(r)&&dn.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&dn.is(i.start)&&dn.is(i.end)}e.is=n})(He||(He={}));var Ru;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&He.is(i.range)&&(O.string(i.uri)||O.undefined(i.uri))}e.is=n})(Ru||(Ru={}));var S0;(function(e){function t(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&He.is(i.targetRange)&&O.string(i.targetUri)&&He.is(i.targetSelectionRange)&&(He.is(i.originSelectionRange)||O.undefined(i.originSelectionRange))}e.is=n})(S0||(S0={}));var jf;(function(e){function t(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.numberRange(i.red,0,1)&&O.numberRange(i.green,0,1)&&O.numberRange(i.blue,0,1)&&O.numberRange(i.alpha,0,1)}e.is=n})(jf||(jf={}));var F0;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&He.is(i.range)&&jf.is(i.color)}e.is=n})(F0||(F0={}));var A0;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.string(i.label)&&(O.undefined(i.textEdit)||bs.is(i))&&(O.undefined(i.additionalTextEdits)||O.typedArray(i.additionalTextEdits,bs.is))}e.is=n})(A0||(A0={}));var C0;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(C0||(C0={}));var w0;(function(e){function t(r,i,s,o,a,u){let l={startLine:r,endLine:i};return O.defined(s)&&(l.startCharacter=s),O.defined(o)&&(l.endCharacter=o),O.defined(a)&&(l.kind=a),O.defined(u)&&(l.collapsedText=u),l}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.uinteger(i.startLine)&&O.uinteger(i.startLine)&&(O.undefined(i.startCharacter)||O.uinteger(i.startCharacter))&&(O.undefined(i.endCharacter)||O.uinteger(i.endCharacter))&&(O.undefined(i.kind)||O.string(i.kind))}e.is=n})(w0||(w0={}));var Gf;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&Ru.is(i.location)&&O.string(i.message)}e.is=n})(Gf||(Gf={}));var L0;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(L0||(L0={}));var I0;(function(e){e.Unnecessary=1,e.Deprecated=2})(I0||(I0={}));var R0;(function(e){function t(n){let r=n;return O.objectLiteral(r)&&O.string(r.href)}e.is=t})(R0||(R0={}));var Ou;(function(e){function t(s,o,a,u,l,c){let f={range:s,message:o};return O.defined(a)&&(f.severity=a),O.defined(u)&&(f.code=u),O.defined(l)&&(f.source=l),O.defined(c)&&(f.relatedInformation=c),f}e.create=t;function n(s){var o;let a=s;return O.defined(a)&&He.is(a.range)&&(O.string(a.message)||hi.is(a.message))&&(O.number(a.severity)||O.undefined(a.severity))&&(O.integer(a.code)||O.string(a.code)||O.undefined(a.code))&&(O.undefined(a.codeDescription)||O.string((o=a.codeDescription)===null||o===void 0?void 0:o.href))&&(O.string(a.source)||O.undefined(a.source))&&(O.undefined(a.relatedInformation)||O.typedArray(a.relatedInformation,Gf.is))}e.is=n;function r(s){return O.string(s.message)}e.is3_17=r;function i(s){if(O.string(s.message))return s.message;if(hi.is(s.message))return s.message.value;throw new Error(`Unknown message type ${typeof s.message}`)}e.getMessageString=i})(Ou||(Ou={}));var Es;(function(e){function t(r,i,...s){let o={title:r,command:i};return O.defined(s)&&s.length>0&&(o.arguments=s),o}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.title)&&(i.tooltip===void 0||O.string(i.tooltip))&&O.string(i.command)}e.is=n})(Es||(Es={}));var bs;(function(e){function t(s,o){return{range:s,newText:o}}e.replace=t;function n(s,o){return{range:{start:s,end:s},newText:o}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){let o=s;return O.objectLiteral(o)&&O.string(o.newText)&&He.is(o.range)}e.is=i})(bs||(bs={}));var ku;(function(e){function t(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.string(i.label)&&(O.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(O.string(i.description)||i.description===void 0)}e.is=n})(ku||(ku={}));var di;(function(e){function t(n){let r=n;return O.string(r)}e.is=t})(di||(di={}));var O0;(function(e){function t(s,o,a){return{range:s,newText:o,annotationId:a}}e.replace=t;function n(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}e.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}e.del=r;function i(s){let o=s;return bs.is(o)&&(ku.is(o.annotationId)||di.is(o.annotationId))}e.is=i})(O0||(O0={}));var qf;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&Yf.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(qf||(qf={}));var Hf;(function(e){function t(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&O.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||O.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||O.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||di.is(i.annotationId))}e.is=n})(Hf||(Hf={}));var Wf;(function(e){function t(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&O.string(i.oldUri)&&O.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||O.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||O.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||di.is(i.annotationId))}e.is=n})(Wf||(Wf={}));var Qf;(function(e){function t(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&O.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||O.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||O.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||di.is(i.annotationId))}e.is=n})(Qf||(Qf={}));var zf;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>O.string(i.kind)?Hf.is(i)||Wf.is(i)||Qf.is(i):qf.is(i)))}e.is=t})(zf||(zf={}));var k0;(function(e){function t(n){let r=n;return O.objectLiteral(r)&&He.is(r.range)&&e1.isSnippet(r.snippet)&&(r.annotationId===void 0||ku.is(r.annotationId)||di.is(r.annotationId))}e.is=t})(k0||(k0={}));var M0;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)}e.is=n})(M0||(M0={}));var P0;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)&&O.integer(i.version)}e.is=n})(P0||(P0={}));var Yf;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)&&(i.version===null||O.integer(i.version))}e.is=n})(Yf||(Yf={}));var B0;(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(B0||(B0={}));var V0;(function(e){function t(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)&&O.string(i.languageId)&&O.integer(i.version)&&O.string(i.text)}e.is=n})(V0||(V0={}));var Jf;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Jf||(Jf={}));var hi;(function(e){function t(n){let r=n;return O.objectLiteral(n)&&Jf.is(r.kind)&&O.string(r.value)}e.is=t})(hi||(hi={}));var U0;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(U0||(U0={}));var Sr;(function(e){e.PlainText=1,e.Snippet=2})(Sr||(Sr={}));var $0;(function(e){e.Deprecated=1})($0||($0={}));var j0;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){let i=r;return i&&O.string(i.newText)&&He.is(i.insert)&&He.is(i.replace)}e.is=n})(j0||(j0={}));var Fr;(function(e){e.asIs=1,e.adjustIndentation=2})(Fr||(Fr={}));var G0;(function(e){e.Replace=1,e.Merge=2})(G0||(G0={}));var q0;(function(e){function t(n){let r=n;return r&&(O.string(r.detail)||r.detail===void 0)&&(O.string(r.description)||r.description===void 0)}e.is=t})(q0||(q0={}));var H0;(function(e){function t(n){return{label:n}}e.create=t})(H0||(H0={}));var W0;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(W0||(W0={}));var Mu;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return O.string(i)||O.objectLiteral(i)&&O.string(i.language)&&O.string(i.value)}e.is=n})(Mu||(Mu={}));var Q0;(function(e){function t(n){let r=n;return!!r&&O.objectLiteral(r)&&(hi.is(r.contents)||Mu.is(r.contents)||O.typedArray(r.contents,Mu.is))&&(n.range===void 0||He.is(n.range))}e.is=t})(Q0||(Q0={}));var z0;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(z0||(z0={}));var Y0;(function(e){function t(n,r,...i){let s={label:n};return O.defined(r)&&(s.documentation=r),O.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(Y0||(Y0={}));var J0;(function(e){e.Text=1,e.Read=2,e.Write=3})(J0||(J0={}));var X0;(function(e){function t(n,r){let i={range:n};return O.number(r)&&(i.kind=r),i}e.create=t})(X0||(X0={}));var K0;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(K0||(K0={}));var Z0;(function(e){e.Deprecated=1})(Z0||(Z0={}));var e2;(function(e){function t(n,r,i,s,o){let a={name:n,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}e.create=t})(e2||(e2={}));var t2;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(t2||(t2={}));var n2;(function(e){function t(r,i,s,o,a,u){let l={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(l.children=u),l}e.create=t;function n(r){let i=r;return i&&O.string(i.name)&&O.number(i.kind)&&He.is(i.range)&&He.is(i.selectionRange)&&(i.detail===void 0||O.string(i.detail))&&(i.deprecated===void 0||O.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(n2||(n2={}));var r2;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(r2||(r2={}));var Pu;(function(e){e.Invoked=1,e.Automatic=2})(Pu||(Pu={}));var i2;(function(e){function t(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}e.create=t;function n(r){let i=r;return O.defined(i)&&O.typedArray(i.diagnostics,Ou.is)&&(i.only===void 0||O.typedArray(i.only,O.string))&&(i.triggerKind===void 0||i.triggerKind===Pu.Invoked||i.triggerKind===Pu.Automatic)}e.is=n})(i2||(i2={}));var Xf;(function(e){e.LLMGenerated=1;function t(n){return O.defined(n)&&n===e.LLMGenerated}e.is=t})(Xf||(Xf={}));var s2;(function(e){function t(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):Es.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}e.create=t;function n(r){let i=r;return i&&O.string(i.title)&&(i.diagnostics===void 0||O.typedArray(i.diagnostics,Ou.is))&&(i.kind===void 0||O.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Es.is(i.command))&&(i.isPreferred===void 0||O.boolean(i.isPreferred))&&(i.edit===void 0||zf.is(i.edit))&&(i.tags===void 0||O.typedArray(i.tags,Xf.is))}e.is=n})(s2||(s2={}));var o2;(function(e){function t(r,i){let s={range:r};return O.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return O.defined(i)&&He.is(i.range)&&(O.undefined(i.command)||Es.is(i.command))}e.is=n})(o2||(o2={}));var a2;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.uinteger(i.tabSize)&&O.boolean(i.insertSpaces)}e.is=n})(a2||(a2={}));var u2;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return O.defined(i)&&He.is(i.range)&&(O.undefined(i.target)||O.string(i.target))}e.is=n})(u2||(u2={}));var l2;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&He.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(l2||(l2={}));var c2;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(c2||(c2={}));var f2;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(f2||(f2={}));var p2;(function(e){function t(n){let r=n;return O.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(p2||(p2={}));var d2;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&He.is(i.range)&&O.string(i.text)}e.is=n})(d2||(d2={}));var h2;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){let i=r;return i!=null&&He.is(i.range)&&O.boolean(i.caseSensitiveLookup)&&(O.string(i.variableName)||i.variableName===void 0)}e.is=n})(h2||(h2={}));var m2;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&He.is(i.range)&&(O.string(i.expression)||i.expression===void 0)}e.is=n})(m2||(m2={}));var g2;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&He.is(r.stoppedLocation)}e.is=n})(g2||(g2={}));var Kf;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Kf||(Kf={}));var Zf;(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&(i.tooltip===void 0||O.string(i.tooltip)||hi.is(i.tooltip))&&(i.location===void 0||Ru.is(i.location))&&(i.command===void 0||Es.is(i.command))}e.is=n})(Zf||(Zf={}));var D2;(function(e){function t(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&dn.is(i.position)&&(O.string(i.label)||O.typedArray(i.label,Zf.is))&&(i.kind===void 0||Kf.is(i.kind))&&i.textEdits===void 0||O.typedArray(i.textEdits,bs.is)&&(i.tooltip===void 0||O.string(i.tooltip)||hi.is(i.tooltip))&&(i.paddingLeft===void 0||O.boolean(i.paddingLeft))&&(i.paddingRight===void 0||O.boolean(i.paddingRight))}e.is=n})(D2||(D2={}));var e1;(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let i=r;return O.objectLiteral(i)&&i.kind==="snippet"&&O.string(i.value)}e.isSnippet=n})(e1||(e1={}));var y2;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(y2||(y2={}));var E2;(function(e){function t(n){return{items:n}}e.create=t})(E2||(E2={}));var b2;(function(e){e.Invoked=1,e.Automatic=2})(b2||(b2={}));var x2;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(x2||(x2={}));var v2;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(v2||(v2={}));var _2;(function(e){function t(n){let r=n;return O.objectLiteral(r)&&$f.is(r.uri)&&O.string(r.name)}e.is=t})(_2||(_2={}));var N2;(function(e){function t(s,o,a,u){return new t1(s,o,a,u)}e.create=t;function n(s){let o=s;return!!(O.defined(o)&&O.string(o.uri)&&(O.undefined(o.languageId)||O.string(o.languageId))&&O.uinteger(o.lineCount)&&O.func(o.getText)&&O.func(o.positionAt)&&O.func(o.offsetAt))}e.is=n;function r(s,o){let a=s.getText(),u=i(o,(c,f)=>{let h=c.range.start.line-f.range.start.line;return h===0?c.range.start.character-f.range.start.character:h}),l=a.length;for(let c=u.length-1;c>=0;c--){let f=u[c],h=s.offsetAt(f.range.start),m=s.offsetAt(f.range.end);if(m<=l)a=a.substring(0,h)+f.newText+a.substring(m,a.length);else throw new Error("Overlapping edit");l=h}return a}e.applyEdits=r;function i(s,o){if(s.length<=1)return s;let a=s.length/2|0,u=s.slice(0,a),l=s.slice(a);i(u,o),i(l,o);let c=0,f=0,h=0;for(;c0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return yn.create(0,t);for(;rt?i=o:r=o+1}let s=r-1;return yn.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1"u"}e.undefined=r;function i(m){return m===!0||m===!1}e.boolean=i;function s(m){return t.call(m)==="[object String]"}e.string=s;function o(m){return t.call(m)==="[object Number]"}e.number=o;function a(m,g,v){return t.call(m)==="[object Number]"&&g<=m&&m<=v}e.numberRange=a;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=u;function l(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=l;function c(m){return t.call(m)==="[object Function]"}e.func=c;function f(m){return m!==null&&typeof m=="object"}e.objectLiteral=f;function h(m,g){return Array.isArray(m)&&m.every(g)}e.typedArray=h})(R||(R={}));var Rn=class{constructor(t){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{let n=this._sourceText.charAt(this._pos);return this._pos++,n},this.eat=n=>{if(this._testNextCharacter(n))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=n=>{let r=this._testNextCharacter(n),i=!1;for(r&&(i=r,this._start=this._pos);r;)this._pos++,r=this._testNextCharacter(n),i=!0;return i},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=n=>{this._pos=n},this.match=(n,r=!0,i=!1)=>{let s=null,o=null;return typeof n=="string"?(o=new RegExp(n,i?"i":"g").test(this._sourceText.slice(this._pos,this._pos+n.length)),s=n):n instanceof RegExp&&(o=this._sourceText.slice(this._pos).match(n),s=o?.[0]),o!=null&&(typeof n=="string"||o instanceof Array&&this._sourceText.startsWith(o[0],this._pos))?(r&&(this._start=this._pos,s&&s.length&&(this._pos+=s.length)),o):!1},this.backUp=n=>{this._pos-=n},this.column=()=>this._pos,this.indentation=()=>{let n=this._sourceText.match(/\s*/),r=0;if(n&&n.length!==0){let i=n[0],s=0;for(;i.length>s;)i.charCodeAt(s)===9?r+=2:r++,s++}return r},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=t}_testNextCharacter(t){let n=this._sourceText.charAt(this._pos),r=!1;return typeof t=="string"?r=n===t:r=t instanceof RegExp?t.test(n):t(n),r}};function Pe(e){return{ofRule:e}}function _e(e,t){return{ofRule:e,isList:!0,separator:t}}function Nf(e,t){let n=e.match;return e.match=r=>{let i=!1;return n&&(i=n(r)),i&&t.every(s=>s.match&&!s.match(r))},e}function fs(e,t){return{style:t,match:n=>n.kind===e}}function de(e,t){return{style:t||"punctuation",match:n=>n.kind==="Punctuation"&&n.value===e}}var gu=e=>e===" "||e===" "||e===","||e===` -`||e==="\r"||e==="\uFEFF"||e==="\xA0",vu={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},Du={Document:[_e("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return x.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[St("query"),Pe(He("def")),Pe("VariableDefinitions"),_e("Directive"),"SelectionSet"],Mutation:[St("mutation"),Pe(He("def")),Pe("VariableDefinitions"),_e("Directive"),"SelectionSet"],Subscription:[St("subscription"),Pe(He("def")),Pe("VariableDefinitions"),_e("Directive"),"SelectionSet"],VariableDefinitions:[de("("),_e("VariableDefinition"),de(")")],VariableDefinition:["Variable",de(":"),"Type",Pe("DefaultValue")],Variable:[de("$","variable"),He("variable")],DefaultValue:[de("="),"Value"],SelectionSet:[de("{"),_e("Selection"),de("}")],Selection(e,t){return e.value==="..."?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[He("property"),de(":"),He("qualifier"),Pe("Arguments"),_e("Directive"),Pe("SelectionSet")],Field:[He("property"),Pe("Arguments"),_e("Directive"),Pe("SelectionSet")],Arguments:[de("("),_e("Argument"),de(")")],Argument:[He("attribute"),de(":"),"Value"],FragmentSpread:[de("..."),He("def"),_e("Directive")],InlineFragment:[de("..."),Pe("TypeCondition"),_e("Directive"),"SelectionSet"],FragmentDefinition:[St("fragment"),Pe(Nf(He("def"),[St("on")])),"TypeCondition",_e("Directive"),"SelectionSet"],TypeCondition:[St("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return e.value==="null"?"NullValue":"EnumValue"}},NumberValue:[fs("Number","number")],StringValue:[{style:"string",match:e=>e.kind==="String",update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[fs("Name","builtin")],NullValue:[fs("Name","keyword")],EnumValue:[He("string-2")],ListValue:[de("["),_e("Value"),de("]")],ObjectValue:[de("{"),_e("ObjectField"),de("}")],ObjectField:[He("attribute"),de(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[de("["),"Type",de("]"),Pe(de("!"))],NonNullType:["NamedType",Pe(de("!"))],NamedType:[q9("atom")],Directive:[de("@","meta"),He("meta"),Pe("Arguments")],DirectiveDef:[St("directive"),de("@","meta"),He("meta"),Pe("ArgumentsDef"),St("on"),_e("DirectiveLocation",de("|"))],InterfaceDef:[St("interface"),He("atom"),Pe("Implements"),_e("Directive"),Pe("FieldsDef")],Implements:[St("implements"),_e("NamedType",de("&"))],DirectiveLocation:[He("string-2")],SchemaDef:[St("schema"),_e("Directive"),de("{"),_e("OperationTypeDef"),de("}")],OperationTypeDef:[He("keyword"),de(":"),He("atom")],ScalarDef:[St("scalar"),He("atom"),_e("Directive")],ObjectTypeDef:[St("type"),He("atom"),Pe("Implements"),_e("Directive"),Pe("FieldsDef")],FieldsDef:[de("{"),_e("FieldDef"),de("}")],FieldDef:[He("property"),Pe("ArgumentsDef"),de(":"),"Type",_e("Directive")],ArgumentsDef:[de("("),_e("InputValueDef"),de(")")],InputValueDef:[He("attribute"),de(":"),"Type",Pe("DefaultValue"),_e("Directive")],UnionDef:[St("union"),He("atom"),_e("Directive"),de("="),_e("UnionMember",de("|"))],UnionMember:["NamedType"],EnumDef:[St("enum"),He("atom"),_e("Directive"),Pe("EnumValuesDef")],EnumValuesDef:[de("{"),_e("EnumValueDef"),de("}")],EnumValueDef:[He("string-2"),_e("Directive")],InputDef:[St("input"),He("atom"),_e("Directive"),Pe("InputFieldsDef")],InputFieldsDef:[de("{"),_e("InputValueDef"),de("}")],ExtendDef:[St("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return x.SCHEMA_EXTENSION;case"scalar":return x.SCALAR_TYPE_EXTENSION;case"type":return x.OBJECT_TYPE_EXTENSION;case"interface":return x.INTERFACE_TYPE_EXTENSION;case"union":return x.UNION_TYPE_EXTENSION;case"enum":return x.ENUM_TYPE_EXTENSION;case"input":return x.INPUT_OBJECT_TYPE_EXTENSION}},[x.SCHEMA_EXTENSION]:["SchemaDef"],[x.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[x.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[x.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[x.UNION_TYPE_EXTENSION]:["UnionDef"],[x.ENUM_TYPE_EXTENSION]:["EnumDef"],[x.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function St(e){return{style:"keyword",match:t=>t.kind==="Name"&&t.value===e}}function He(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function q9(e){return{style:e,match:t=>t.kind==="Name",update(t,n){var r;!((r=t.prevState)===null||r===void 0)&&r.prevState&&(t.name=n.value,t.prevState.prevState.type=n.value)}}}function oi(e={eatWhitespace:t=>t.eatWhile(gu),lexRules:vu,parseRules:Du,editorConfig:{}}){return{startState(){let t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Eo(e.parseRules,t,x.DOCUMENT),t},token(t,n){return $9(t,n,e)}}}function $9(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");let{lexRules:i,parseRules:s,eatWhitespace:o,editorConfig:a}=n;if(t.rule&&t.rule.length===0?Af(t):t.needsAdvance&&(t.needsAdvance=!1,Ff(t,!0)),e.sol()){let c=a?.tabSize||2;t.indentLevel=Math.floor(e.indentation()/c)}if(o(e))return"ws";let u=W9(i,e);if(!u)return e.match(/\S+/)||e.match(/\s/),Eo(Sf,t,"Invalid"),"invalidchar";if(u.kind==="Comment")return Eo(Sf,t,"Comment"),"comment";let l=Sm({},t);if(u.kind==="Punctuation"){if(/^[{([]/.test(u.value))t.indentLevel!==void 0&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(u.value)){let c=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&c.length>0&&c.at(-1){let t=sn.UNKNOWN;if(e)try{Tt(fn(e),{enter(n){if(n.kind==="Document"){t=sn.EXECUTABLE;return}return Q9.includes(n.kind)?(t=sn.TYPE_SYSTEM,Wn):!1}})}catch{return t}return t};function Am(e,t){return t?.endsWith(".graphqls")?sn.TYPE_SYSTEM:z9(e)}function bo(e,t,n=0){let r=null,i=null,s=null,o=ps(e,(a,u,l,c)=>{if(!(c!==t.line||a.getCurrentPosition()+n=0;i--)t(n[i])}function Eu(e){let t;return wm(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function xo(e,t){let n,r,i,s,o,a,u,l,c,f,h,m;return wm(t,g=>{var v,b;switch(g.kind){case H.QUERY:case"ShortQuery":h=e.getQueryType();break;case H.MUTATION:h=e.getMutationType();break;case H.SUBSCRIPTION:h=e.getSubscriptionType();break;case H.INLINE_FRAGMENT:case H.FRAGMENT_DEFINITION:g.type&&(h=e.getType(g.type));break;case H.FIELD:case H.ALIASED_FIELD:{!h||!g.name?o=null:(o=f?yu(e,f,g.name):null,h=o?o.type:null);break}case H.SELECTION_SET:f=Ce(h);break;case H.DIRECTIVE:i=g.name?e.getDirective(g.name):null;break;case H.INTERFACE_DEF:g.name&&(l=null,m=new Ut({name:g.name,interfaces:[],fields:{}}));break;case H.OBJECT_TYPE_DEF:g.name&&(m=null,l=new ft({name:g.name,interfaces:[],fields:{}}));break;case H.ARGUMENTS:{if(g.prevState)switch(g.prevState.kind){case H.FIELD:r=o&&o.args;break;case H.DIRECTIVE:r=i&&i.args;break;case H.ALIASED_FIELD:{let F=(v=g.prevState)===null||v===void 0?void 0:v.name;if(!F){r=null;break}let O=f?yu(e,f,F):null;if(!O){r=null;break}r=O.args;break}default:r=null;break}else r=null;break}case H.ARGUMENT:if(r){for(let F=0;FF.value===g.name):null;break;case H.LIST_VALUE:let A=Nr(a);a=A instanceof Re?A.ofType:null;break;case H.OBJECT_VALUE:let C=Ce(a);u=C instanceof vn?C:null,c=(b=u?.getFields())!==null&&b!==void 0?b:null;break;case H.OBJECT_FIELD:let w=g.name&&c?c[g.name]:null;a=w?.type,o=w,h=o?o.type:null;break;case H.NAMED_TYPE:g.name&&(h=e.getType(g.name));break}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:s,fieldDef:o,inputObjectType:u,inputType:a,objectFieldDefs:c,parentType:f,type:h,interfaceDef:m,objectTypeDef:l}}var Y9={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},H=Object.assign(Object.assign({},x),Y9);var Ee;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ee||(Ee={}));var bu={command:"editor.action.triggerSuggest",title:"Suggestions"},J9=e=>{let t=[];if(e)try{Tt(fn(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t};function wf(e,t,n,r,i,s){var o;let a=Object.assign(Object.assign({},s),{schema:e}),u=hs(t,n,e,r,s,1);if(!u)return[];let{state:l,typeInfo:c,mode:f,token:h}=u,{kind:m,step:g,prevState:v}=l;if(m===H.DOCUMENT)return f===sn.TYPE_SYSTEM?X9(h):f===sn.EXECUTABLE?K9(h):Z9(h);if(m===H.EXTEND_DEF)return ey(h);if(((o=v?.prevState)===null||o===void 0?void 0:o.kind)===H.EXTENSION_DEFINITION&&l.name)return $e(h,[]);if(v?.kind===x.SCALAR_TYPE_EXTENSION)return $e(h,Object.values(e.getTypeMap()).filter(mt).map(E=>({label:E.name,kind:Ee.Function})));if(v?.kind===x.OBJECT_TYPE_EXTENSION)return $e(h,Object.values(e.getTypeMap()).filter(E=>ve(E)&&!E.name.startsWith("__")).map(E=>({label:E.name,kind:Ee.Function})));if(v?.kind===x.INTERFACE_TYPE_EXTENSION)return $e(h,Object.values(e.getTypeMap()).filter(ye).map(E=>({label:E.name,kind:Ee.Function})));if(v?.kind===x.UNION_TYPE_EXTENSION)return $e(h,Object.values(e.getTypeMap()).filter(rt).map(E=>({label:E.name,kind:Ee.Function})));if(v?.kind===x.ENUM_TYPE_EXTENSION)return $e(h,Object.values(e.getTypeMap()).filter(E=>qe(E)&&!E.name.startsWith("__")).map(E=>({label:E.name,kind:Ee.Function})));if(v?.kind===x.INPUT_OBJECT_TYPE_EXTENSION)return $e(h,Object.values(e.getTypeMap()).filter(xe).map(E=>({label:E.name,kind:Ee.Function})));if(m===H.IMPLEMENTS||m===H.NAMED_TYPE&&v?.kind===H.IMPLEMENTS)return ry(h,l,e,t,c);if(m===H.SELECTION_SET||m===H.FIELD||m===H.ALIASED_FIELD)return ty(h,c,a);if(m===H.ARGUMENTS||m===H.ARGUMENT&&g===0){let{argDefs:E}=c;if(E)return $e(h,E.map(A=>{var C;return{label:A.name,insertText:lf(A.name+": ",A.type),insertTextMode:wr.adjustIndentation,insertTextFormat:Ar.Snippet,command:bu,labelDetails:{detail:" "+String(A.type)},documentation:(C=A.description)!==null&&C!==void 0?C:void 0,kind:Ee.Variable,type:A.type}}))}if((m===H.OBJECT_VALUE||m===H.OBJECT_FIELD&&g===0)&&c.objectFieldDefs){let E=Fr(c.objectFieldDefs),A=m===H.OBJECT_VALUE?Ee.Value:Ee.Field;return $e(h,E.map(C=>{var w;return{label:C.name,detail:String(C.type),documentation:(w=C?.description)!==null&&w!==void 0?w:void 0,kind:A,type:C.type,insertText:lf(C.name+": ",C.type),insertTextMode:wr.adjustIndentation,insertTextFormat:Ar.Snippet,command:bu}}))}if(m===H.ENUM_VALUE||m===H.LIST_VALUE&&g===1||m===H.OBJECT_FIELD&&g===2||m===H.ARGUMENT&&g===2)return ny(h,c,t,e);if(m===H.VARIABLE&&g===1){let E=Ce(c.inputType),A=Lf(t,e,h);return $e(h,A.filter(C=>C.detail===E?.name))}if(m===H.TYPE_CONDITION&&g===1||m===H.NAMED_TYPE&&v!=null&&v.kind===H.TYPE_CONDITION)return iy(h,c,e,m);if(m===H.FRAGMENT_SPREAD&&g===1)return sy(h,c,e,t,Array.isArray(i)?i:J9(i));let b=Rm(l);return b.kind===H.FIELD_DEF?$e(h,Object.values(e.getTypeMap()).filter(E=>Yt(E)&&!E.name.startsWith("__")).map(E=>({label:E.name,kind:Ee.Function,insertText:s?.fillLeafsOnComplete?E.name+` -`:E.name,insertTextMode:wr.adjustIndentation}))):b.kind===H.INPUT_VALUE_DEF&&g===2?$e(h,Object.values(e.getTypeMap()).filter(E=>it(E)&&!E.name.startsWith("__")).map(E=>({label:E.name,kind:Ee.Function,insertText:s?.fillLeafsOnComplete?E.name+` -$1`:E.name,insertTextMode:wr.adjustIndentation,insertTextFormat:Ar.Snippet}))):m===H.VARIABLE_DEFINITION&&g===2||m===H.LIST_TYPE&&g===1||m===H.NAMED_TYPE&&v&&(v.kind===H.VARIABLE_DEFINITION||v.kind===H.LIST_TYPE||v.kind===H.NON_NULL_TYPE)?ay(h,e,m):m===H.DIRECTIVE?uy(h,l,e,m):m===H.DIRECTIVE_DEF?ly(h,l,e,m):[]}var Cf=[{label:"type",kind:Ee.Function},{label:"interface",kind:Ee.Function},{label:"union",kind:Ee.Function},{label:"input",kind:Ee.Function},{label:"scalar",kind:Ee.Function},{label:"schema",kind:Ee.Function}],Cm=[{label:"query",kind:Ee.Function},{label:"mutation",kind:Ee.Function},{label:"subscription",kind:Ee.Function},{label:"fragment",kind:Ee.Function},{label:"{",kind:Ee.Constructor}];function X9(e){return $e(e,[{label:"extend",kind:Ee.Function},...Cf])}function K9(e){return $e(e,Cm)}function Z9(e){return $e(e,[{label:"extend",kind:Ee.Function},...Cm,...Cf])}function ey(e){return $e(e,Cf)}function ty(e,t,n){var r;if(t.parentType){let{parentType:i}=t,s=[];return"getFields"in i&&(s=Fr(i.getFields())),ct(i)&&s.push(Ln),i===((r=n?.schema)===null||r===void 0?void 0:r.getQueryType())&&s.push(wn,Cn),$e(e,s.map((o,a)=>{var u;let l={sortText:String(a)+o.name,label:o.name,detail:String(o.type),documentation:(u=o.description)!==null&&u!==void 0?u:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:Ee.Field,labelDetails:{detail:" "+o.type.toString()},type:o.type};return n?.fillLeafsOnComplete&&(l.insertText=T0(o),l.insertText||(l.insertText=yo(o.name,o.type,o.name+(e.state.needsAdvance?"":` -`))),l.insertText&&(l.insertTextFormat=Ar.Snippet,l.insertTextMode=wr.adjustIndentation,l.command=bu)),l}))}return[]}function ny(e,t,n,r){let i=Ce(t.inputType),s=Lf(n,r,e).filter(o=>o.detail===i?.name);if(i instanceof Rt){let o=i.getValues();return $e(e,o.map(a=>{var u;return{label:a.name,detail:String(i),documentation:(u=a.description)!==null&&u!==void 0?u:void 0,deprecated:!!a.deprecationReason,isDeprecated:!!a.deprecationReason,deprecationReason:a.deprecationReason,kind:Ee.EnumMember,type:i}}).concat(s))}return i===Ze?$e(e,s.concat([{label:"true",detail:String(Ze),documentation:"Not false.",kind:Ee.Variable,type:Ze},{label:"false",detail:String(Ze),documentation:"Not true.",kind:Ee.Variable,type:Ze}])):s}function ry(e,t,n,r,i){if(t.needsSeparator)return[];let s=n.getTypeMap(),o=Fr(s).filter(ye),a=o.map(({name:m})=>m),u=new Set;ps(r,(m,g)=>{var v,b,E,A,C;if(g.name&&(g.kind===H.INTERFACE_DEF&&!a.includes(g.name)&&u.add(g.name),g.kind===H.NAMED_TYPE&&((v=g.prevState)===null||v===void 0?void 0:v.kind)===H.IMPLEMENTS)){if(i.interfaceDef){if((b=i.interfaceDef)===null||b===void 0?void 0:b.getInterfaces().find(({name:L})=>L===g.name))return;let F=n.getType(g.name),O=(E=i.interfaceDef)===null||E===void 0?void 0:E.toConfig();i.interfaceDef=new Ut(Object.assign(Object.assign({},O),{interfaces:[...O.interfaces,F||new Ut({name:g.name,fields:{}})]}))}else if(i.objectTypeDef){if((A=i.objectTypeDef)===null||A===void 0?void 0:A.getInterfaces().find(({name:L})=>L===g.name))return;let F=n.getType(g.name),O=(C=i.objectTypeDef)===null||C===void 0?void 0:C.toConfig();i.objectTypeDef=new ft(Object.assign(Object.assign({},O),{interfaces:[...O.interfaces,F||new Ut({name:g.name,fields:{}})]}))}}});let l=i.interfaceDef||i.objectTypeDef,f=(l?.getInterfaces()||[]).map(({name:m})=>m),h=o.concat([...u].map(m=>({name:m}))).filter(({name:m})=>m!==l?.name&&!f.includes(m));return $e(e,h.map(m=>{let g={label:m.name,kind:Ee.Interface,type:m};return m?.description&&(g.documentation=m.description),g}))}function iy(e,t,n,r){let i;if(t.parentType)if(It(t.parentType)){let s=Qa(t.parentType),o=n.getPossibleTypes(s),a=Object.create(null);for(let u of o)for(let l of u.getInterfaces())a[l.name]=l;i=o.concat(Fr(a))}else i=[t.parentType];else{let s=n.getTypeMap();i=Fr(s).filter(o=>ct(o)&&!o.name.startsWith("__"))}return $e(e,i.map(s=>{let o=Ce(s);return{label:String(s),documentation:o?.description||"",kind:Ee.Field}}))}function sy(e,t,n,r,i){if(!r)return[];let s=n.getTypeMap(),o=Eu(e.state),a=Lm(r);i&&i.length>0&&a.push(...i);let u=a.filter(l=>s[l.typeCondition.name.value]&&!(o&&o.kind===H.FRAGMENT_DEFINITION&&o.name===l.name.value)&&ct(t.parentType)&&ct(s[l.typeCondition.name.value])&&Qr(n,t.parentType,s[l.typeCondition.name.value]));return $e(e,u.map(l=>({label:l.name.value,detail:String(s[l.typeCondition.name.value]),documentation:`fragment ${l.name.value} on ${l.typeCondition.name.value}`,labelDetails:{detail:`fragment ${l.name.value} on ${l.typeCondition.name.value}`},kind:Ee.Field,type:s[l.typeCondition.name.value]})))}var oy=(e,t)=>{var n,r,i,s,o,a,u,l,c,f;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((i=(r=e.prevState)===null||r===void 0?void 0:r.prevState)===null||i===void 0?void 0:i.kind)===t)return e.prevState.prevState;if(((a=(o=(s=e.prevState)===null||s===void 0?void 0:s.prevState)===null||o===void 0?void 0:o.prevState)===null||a===void 0?void 0:a.kind)===t)return e.prevState.prevState.prevState;if(((f=(c=(l=(u=e.prevState)===null||u===void 0?void 0:u.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.prevState)===null||f===void 0?void 0:f.kind)===t)return e.prevState.prevState.prevState.prevState};function Lf(e,t,n){let r=null,i,s=Object.create({});return ps(e,(o,a)=>{var u;if(a?.kind===H.VARIABLE&&a.name&&(r=a.name),a?.kind===H.NAMED_TYPE&&r){let l=oy(a,H.TYPE);l?.type&&(i=t.getType(l?.type))}if(r&&i&&!s[r]){let l=n.string==="$"||((u=n?.state)===null||u===void 0?void 0:u.kind)==="Variable"?r:"$"+r;s[r]={detail:i.toString(),insertText:l,label:"$"+r,rawInsert:l,type:i,kind:Ee.Variable},r=null,i=null}}),Fr(s)}function Lm(e){let t=[];return ps(e,(n,r)=>{r.kind===H.FRAGMENT_DEFINITION&&r.name&&r.type&&t.push({kind:H.FRAGMENT_DEFINITION,name:{kind:x.NAME,value:r.name},selectionSet:{kind:H.SELECTION_SET,selections:[]},typeCondition:{kind:H.NAMED_TYPE,name:{kind:x.NAME,value:r.type}}})}),t}function ay(e,t,n){let r=t.getTypeMap(),i=Fr(r).filter(it);return $e(e,i.map(s=>({label:s.name,documentation:s?.description||"",kind:Ee.Variable})))}function uy(e,t,n,r){var i;if(!((i=t.prevState)===null||i===void 0)&&i.kind){let s=n.getDirectives().filter(o=>Im(t.prevState,o));return $e(e,s.map(o=>({label:o.name,documentation:o?.description||"",kind:Ee.Function})))}return[]}function ly(e,t,n,r){let i=n.getDirectives().find(s=>s.name===t.name);return $e(e,i?.args.map(s=>({label:s.name,documentation:s.description||"",kind:Ee.Field}))||[])}function Im(e,t){if(!e?.kind)return!1;let{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case H.QUERY:return i.includes(K.QUERY);case H.MUTATION:return i.includes(K.MUTATION);case H.SUBSCRIPTION:return i.includes(K.SUBSCRIPTION);case H.FIELD:case H.ALIASED_FIELD:return i.includes(K.FIELD);case H.FRAGMENT_DEFINITION:return i.includes(K.FRAGMENT_DEFINITION);case H.FRAGMENT_SPREAD:return i.includes(K.FRAGMENT_SPREAD);case H.INLINE_FRAGMENT:return i.includes(K.INLINE_FRAGMENT);case H.SCHEMA_DEF:return i.includes(K.SCHEMA);case H.SCALAR_DEF:return i.includes(K.SCALAR);case H.OBJECT_TYPE_DEF:return i.includes(K.OBJECT);case H.FIELD_DEF:return i.includes(K.FIELD_DEFINITION);case H.INTERFACE_DEF:return i.includes(K.INTERFACE);case H.UNION_DEF:return i.includes(K.UNION);case H.ENUM_DEF:return i.includes(K.ENUM);case H.ENUM_VALUE:return i.includes(K.ENUM_VALUE);case H.INPUT_DEF:return i.includes(K.INPUT_OBJECT);case H.INPUT_VALUE_DEF:switch(r?.kind){case H.ARGUMENTS_DEF:return i.includes(K.ARGUMENT_DEFINITION);case H.INPUT_DEF:return i.includes(K.INPUT_FIELD_DEFINITION)}}return!1}function Rm(e){return e.prevState&&e.kind&&[H.NAMED_TYPE,H.LIST_TYPE,H.TYPE,H.NON_NULL_TYPE].includes(e.kind)?Rm(e.prevState):e}var cy=el(km());function jt(e,t){e.push(t)}function If(e,t){he(t)?(If(e,t.ofType),jt(e,"!")):we(t)?(jt(e,"["),If(e,t.ofType),jt(e,"]")):jt(e,t.name)}function _u(e,t,n){let r=[],i="type"in e?e.type:e;return"type"in e&&e.description&&(jt(r,e.description),jt(r,` - -`)),jt(r,fy(i,t)),n?(jt(r,` -`),jt(r,n)):!mt(i)&&"description"in i&&i.description?(jt(r,` -`),jt(r,i.description)):"ofType"in i&&!mt(i.ofType)&&"description"in i.ofType&&i.ofType.description&&(jt(r,` -`),jt(r,i.ofType.description)),r.join("")}function fy(e,t){let n=[];return t&&jt(n,"```graphql\n"),If(n,e),t&&jt(n,"\n```"),n.join("")}var py={Int:{type:"integer"},String:{type:"string"},Float:{type:"number"},ID:{type:"string"},Boolean:{type:"boolean"},DateTime:{type:"string"}},Rf=class{constructor(){this.set=new Set}mark(t){return this.set.has(t)?!1:(this.set.add(t),!0)}};function Of(e,t){var n,r;let i=Object.create(null),s=Object.create(null),a="type"in e?e.type:e,u=he(a)?a.ofType:a,l=he(a);if(mt(u))!((n=t?.scalarSchemas)===null||n===void 0)&&n[u.name]?i=JSON.parse(JSON.stringify(t.scalarSchemas[u.name])):i.type=["string","number","boolean","integer"],l||(Array.isArray(i.type)?i.type.push("null"):i.type?i.type=[i.type,"null"]:i.enum?i.enum.push(null):i.oneOf?i.oneOf.push({type:"null"}):i={oneOf:[i,{type:"null"}]});else if(qe(u))i.enum=u.getValues().map(f=>f.name),l||i.enum.push(null);else if(we(u)){l?i.type="array":i.type=["array","null"];let{definition:f,definitions:h}=Of(u.ofType,t);if(i.items=f,h)for(let m of Object.keys(h))s[m]=h[m]}else if(xe(u)&&(l?i.$ref=`#/definitions/${u.name}`:i.oneOf=[{$ref:`#/definitions/${u.name}`},{type:"null"}],!((r=t?.definitionMarker)===null||r===void 0)&&r.mark(u.name))){let f=u.getFields(),h={type:"object",properties:{},required:[]};h.description=_u(u),t?.useMarkdownDescription&&(h.markdownDescription=_u(u,!0));for(let m of Object.keys(f)){let g=f[m],{required:v,definition:b,definitions:E}=Of(g,t);if(h.properties[m]=b,v&&h.required.push(m),E)for(let[A,C]of Object.entries(E))s[A]=C}s[u.name]=h}"defaultValue"in e&&e.defaultValue!==void 0&&(i.default=e.defaultValue);let{description:c}=i;return i.description=_u(e,!1,c),t?.useMarkdownDescription&&(i.markdownDescription=_u(e,!0,c)),{required:l,definition:i,definitions:s}}function Tu(e,t){var n;let r={$schema:"http://json-schema.org/draft-04/schema",type:"object",properties:{},required:[],additionalProperties:!1},i=Object.assign(Object.assign({},t),{definitionMarker:new Rf,scalarSchemas:Object.assign(Object.assign({},py),t?.scalarSchemas)});if(e)for(let[s,o]of Object.entries(e)){let{definition:a,required:u,definitions:l}=Of(o,i);r.properties[s]=a,u&&((n=r.required)===null||n===void 0||n.push(s)),l&&(r.definitions=Object.assign(Object.assign({},r?.definitions),l))}return r}var Xn=class{constructor(t,n){this.containsPosition=r=>this.start.line===r.line?this.start.character<=r.character:this.end.line===r.line?this.end.character>=r.character:this.start.line<=r.line&&this.end.line>=r.line,this.start=t,this.end=n}setStart(t,n){this.start=new Ot(t,n)}setEnd(t,n){this.end=new Ot(t,n)}},Ot=class{constructor(t,n){this.lessThanOrEqualTo=r=>this.line!(a===Ji||a===Qi||r&&a===Yi));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,hy),us(e,t,s).filter(a=>{if(a.message.includes("Unknown directive")&&a.nodes){let u=a.nodes[0];if(u&&u.kind===x.DIRECTIVE){let l=u.name.value;if(l==="arguments"||l==="argumentDefinitions")return!1}}return!0})}function Su(e,t){let n=Object.create(null);for(let r of t.definitions)if(r.kind==="OperationDefinition"){let{variableDefinitions:i}=r;if(i)for(let{variable:s,type:o}of i){let a=st(e,o);a?n[s.name.value]=a:o.kind===x.NAMED_TYPE&&o.name.value==="Float"&&(n[s.name.value]=lo)}}return n}function Fu(e,t){let n=t?Su(t,e):void 0,r=[];return Tt(e,{OperationDefinition(i){r.push(i)}}),{variableToType:n,operations:r}}var _o={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},Au={[_o.Error]:1,[_o.Warning]:2,[_o.Information]:3,[_o.Hint]:4},wu=(e,t)=>{if(!e)throw new Error(t)};function Mf(e,t=null,n,r,i){var s,o;let a=null,u="";i&&(u=typeof i=="string"?i:i.reduce((c,f)=>c+Ae(f)+` +`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return dn.create(0,t);for(;rt?i=o:r=o+1}let s=r-1;return dn.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1"u"}e.undefined=r;function i(m){return m===!0||m===!1}e.boolean=i;function s(m){return t.call(m)==="[object String]"}e.string=s;function o(m){return t.call(m)==="[object Number]"}e.number=o;function a(m,g,E){return t.call(m)==="[object Number]"&&g<=m&&m<=E}e.numberRange=a;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=u;function l(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=l;function c(m){return t.call(m)==="[object Function]"}e.func=c;function f(m){return m!==null&&typeof m=="object"}e.objectLiteral=f;function h(m,g){return Array.isArray(m)&&m.every(g)}e.typedArray=h})(O||(O={}));var Cn=class{constructor(t){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{let n=this._sourceText.charAt(this._pos);return this._pos++,n},this.eat=n=>{if(this._testNextCharacter(n))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=n=>{let r=this._testNextCharacter(n),i=!1;for(r&&(i=r,this._start=this._pos);r;)this._pos++,r=this._testNextCharacter(n),i=!0;return i},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=n=>{this._pos=n},this.match=(n,r=!0,i=!1)=>{let s=null,o=null;return typeof n=="string"?(o=new RegExp(n,i?"i":"g").test(this._sourceText.slice(this._pos,this._pos+n.length)),s=n):n instanceof RegExp&&(o=this._sourceText.slice(this._pos).match(n),s=o?.[0]),o!=null&&(typeof n=="string"||o instanceof Array&&this._sourceText.startsWith(o[0],this._pos))?(r&&(this._start=this._pos,s&&s.length&&(this._pos+=s.length)),o):!1},this.backUp=n=>{this._pos-=n},this.column=()=>this._pos,this.indentation=()=>{let n=this._sourceText.match(/\s*/),r=0;if(n&&n.length!==0){let i=n[0],s=0;for(;i.length>s;)i.charCodeAt(s)===9?r+=2:r++,s++}return r},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=t}_testNextCharacter(t){let n=this._sourceText.charAt(this._pos),r=!1;return typeof t=="string"?r=n===t:r=t instanceof RegExp?t.test(n):t(n),r}};function Ae(e){return{ofRule:e}}function Ee(e,t){return{ofRule:e,isList:!0,separator:t}}function n1(e,t){let n=e.match;return e.match=r=>{let i=!1;return n&&(i=n(r)),i&&t.every(s=>s.match&&!s.match(r))},e}function xs(e,t){return{style:t,match:n=>n.kind===e}}function ce(e,t){return{style:t||"punctuation",match:n=>n.kind==="Punctuation"&&n.value===e}}var Bu=e=>e===" "||e===" "||e===","||e===` +`||e==="\r"||e==="\uFEFF"||e==="\xA0",Vu={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},Uu={Document:[Ee("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return D.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[xt("query"),Ae(Ve("def")),Ae("VariableDefinitions"),Ee("Directive"),"SelectionSet"],Mutation:[xt("mutation"),Ae(Ve("def")),Ae("VariableDefinitions"),Ee("Directive"),"SelectionSet"],Subscription:[xt("subscription"),Ae(Ve("def")),Ae("VariableDefinitions"),Ee("Directive"),"SelectionSet"],VariableDefinitions:[ce("("),Ee("VariableDefinition"),ce(")")],VariableDefinition:["Variable",ce(":"),"Type",Ae("DefaultValue")],Variable:[ce("$","variable"),Ve("variable")],DefaultValue:[ce("="),"Value"],SelectionSet:[ce("{"),Ee("Selection"),ce("}")],Selection(e,t){return e.value==="..."?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[Ve("property"),ce(":"),Ve("qualifier"),Ae("Arguments"),Ee("Directive"),Ae("SelectionSet")],Field:[Ve("property"),Ae("Arguments"),Ee("Directive"),Ae("SelectionSet")],Arguments:[ce("("),Ee("Argument"),ce(")")],Argument:[Ve("attribute"),ce(":"),"Value"],FragmentSpread:[ce("..."),Ve("def"),Ee("Directive")],InlineFragment:[ce("..."),Ae("TypeCondition"),Ee("Directive"),"SelectionSet"],FragmentDefinition:[xt("fragment"),Ae(n1(Ve("def"),[xt("on")])),"TypeCondition",Ee("Directive"),"SelectionSet"],TypeCondition:[xt("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return e.value==="null"?"NullValue":"EnumValue"}},NumberValue:[xs("Number","number")],StringValue:[{style:"string",match:e=>e.kind==="String",update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[xs("Name","builtin")],NullValue:[xs("Name","keyword")],EnumValue:[Ve("string-2")],ListValue:[ce("["),Ee("Value"),ce("]")],ObjectValue:[ce("{"),Ee("ObjectField"),ce("}")],ObjectField:[Ve("attribute"),ce(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[ce("["),"Type",ce("]"),Ae(ce("!"))],NonNullType:["NamedType",Ae(ce("!"))],NamedType:[M8("atom")],Directive:[ce("@","meta"),Ve("meta"),Ae("Arguments")],DirectiveDef:[xt("directive"),ce("@","meta"),Ve("meta"),Ae("ArgumentsDef"),xt("on"),Ee("DirectiveLocation",ce("|"))],InterfaceDef:[xt("interface"),Ve("atom"),Ae("Implements"),Ee("Directive"),Ae("FieldsDef")],Implements:[xt("implements"),Ee("NamedType",ce("&"))],DirectiveLocation:[Ve("string-2")],SchemaDef:[xt("schema"),Ee("Directive"),ce("{"),Ee("OperationTypeDef"),ce("}")],OperationTypeDef:[Ve("keyword"),ce(":"),Ve("atom")],ScalarDef:[xt("scalar"),Ve("atom"),Ee("Directive")],ObjectTypeDef:[xt("type"),Ve("atom"),Ae("Implements"),Ee("Directive"),Ae("FieldsDef")],FieldsDef:[ce("{"),Ee("FieldDef"),ce("}")],FieldDef:[Ve("property"),Ae("ArgumentsDef"),ce(":"),"Type",Ee("Directive")],ArgumentsDef:[ce("("),Ee("InputValueDef"),ce(")")],InputValueDef:[Ve("attribute"),ce(":"),"Type",Ae("DefaultValue"),Ee("Directive")],UnionDef:[xt("union"),Ve("atom"),Ee("Directive"),ce("="),Ee("UnionMember",ce("|"))],UnionMember:["NamedType"],EnumDef:[xt("enum"),Ve("atom"),Ee("Directive"),Ae("EnumValuesDef")],EnumValuesDef:[ce("{"),Ee("EnumValueDef"),ce("}")],EnumValueDef:[Ve("string-2"),Ee("Directive")],InputDef:[xt("input"),Ve("atom"),Ee("Directive"),Ae("InputFieldsDef")],InputFieldsDef:[ce("{"),Ee("InputValueDef"),ce("}")],ExtendDef:[xt("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return D.SCHEMA_EXTENSION;case"scalar":return D.SCALAR_TYPE_EXTENSION;case"type":return D.OBJECT_TYPE_EXTENSION;case"interface":return D.INTERFACE_TYPE_EXTENSION;case"union":return D.UNION_TYPE_EXTENSION;case"enum":return D.ENUM_TYPE_EXTENSION;case"input":return D.INPUT_OBJECT_TYPE_EXTENSION}},[D.SCHEMA_EXTENSION]:["SchemaDef"],[D.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[D.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[D.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[D.UNION_TYPE_EXTENSION]:["UnionDef"],[D.ENUM_TYPE_EXTENSION]:["EnumDef"],[D.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function xt(e){return{style:"keyword",match:t=>t.kind==="Name"&&t.value===e}}function Ve(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function M8(e){return{style:e,match:t=>t.kind==="Name",update(t,n){var r;!((r=t.prevState)===null||r===void 0)&&r.prevState&&(t.name=n.value,t.prevState.prevState.type=n.value)}}}function mi(e={eatWhitespace:t=>t.eatWhile(Bu),lexRules:Vu,parseRules:Uu,editorConfig:{}}){return{startState(){let t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return $o(e.parseRules,t,D.DOCUMENT),t},token(t,n){return P8(t,n,e)}}}function P8(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");let{lexRules:i,parseRules:s,eatWhitespace:o,editorConfig:a}=n;if(t.rule&&t.rule.length===0?s1(t):t.needsAdvance&&(t.needsAdvance=!1,i1(t,!0)),e.sol()){let c=a?.tabSize||2;t.indentLevel=Math.floor(e.indentation()/c)}if(o(e))return"ws";let u=V8(i,e);if(!u)return e.match(/\S+/)||e.match(/\s/),$o(r1,t,"Invalid"),"invalidchar";if(u.kind==="Comment")return $o(r1,t,"Comment"),"comment";let l=T2({},t);if(u.kind==="Punctuation"){if(/^[{([]/.test(u.value))t.indentLevel!==void 0&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(u.value)){let c=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&c.length>0&&c.at(-1){let t=en.UNKNOWN;if(e)try{yt(pn(e),{enter(n){if(n.kind==="Document"){t=en.EXECUTABLE;return}return U8.includes(n.kind)?(t=en.TYPE_SYSTEM,jn):!1}})}catch{return t}return t};function F2(e,t){return t?.endsWith(".graphqls")?en.TYPE_SYSTEM:$8(e)}function jo(e,t,n=0){let r=null,i=null,s=null,o=vs(e,(a,u,l,c)=>{if(!(c!==t.line||a.getCurrentPosition()+n=0;i--)t(n[i])}function ju(e){let t;return A2(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function Go(e,t){let n,r,i,s,o,a,u,l,c,f,h,m;return A2(t,g=>{var E,v;switch(g.kind){case W.QUERY:case"ShortQuery":h=e.getQueryType();break;case W.MUTATION:h=e.getMutationType();break;case W.SUBSCRIPTION:h=e.getSubscriptionType();break;case W.INLINE_FRAGMENT:case W.FRAGMENT_DEFINITION:g.type&&(h=e.getType(g.type));break;case W.FIELD:case W.ALIASED_FIELD:{!h||!g.name?o=null:(o=f?$u(e,f,g.name):null,h=o?o.type:null);break}case W.SELECTION_SET:f=_e(h);break;case W.DIRECTIVE:i=g.name?e.getDirective(g.name):null;break;case W.INTERFACE_DEF:g.name&&(l=null,m=new bt({name:g.name,interfaces:[],fields:{}}));break;case W.OBJECT_TYPE_DEF:g.name&&(m=null,l=new qe({name:g.name,interfaces:[],fields:{}}));break;case W.ARGUMENTS:{if(g.prevState)switch(g.prevState.kind){case W.FIELD:r=o&&o.args;break;case W.DIRECTIVE:r=i&&i.args;break;case W.ALIASED_FIELD:{let R=(E=g.prevState)===null||E===void 0?void 0:E.name;if(!R){r=null;break}let V=f?$u(e,f,R):null;if(!V){r=null;break}r=V.args;break}default:r=null;break}else r=null;break}case W.ARGUMENT:if(r){for(let R=0;RR.value===g.name):null;break;case W.LIST_VALUE:let L=zi(a);a=L instanceof Te?L.ofType:null;break;case W.OBJECT_VALUE:let M=_e(a);u=M instanceof Gt?M:null,c=(v=u?.getFields())!==null&&v!==void 0?v:null;break;case W.OBJECT_FIELD:let w=g.name&&c?c[g.name]:null;a=w?.type,o=w,h=o?o.type:null;break;case W.NAMED_TYPE:g.name&&(h=e.getType(g.name));break}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:s,fieldDef:o,inputObjectType:u,inputType:a,objectFieldDefs:c,parentType:f,type:h,interfaceDef:m,objectTypeDef:l}}var j8={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},W=Object.assign(Object.assign({},D),j8);var me;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(me||(me={}));var Gu={command:"editor.action.triggerSuggest",title:"Suggestions"},G8=e=>{let t=[];if(e)try{yt(pn(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t};function o1(e,t,n,r,i,s){var o;let a=Object.assign(Object.assign({},s),{schema:e}),u=_s(t,n,e,r,s,1);if(!u)return[];let{state:l,typeInfo:c,mode:f,token:h}=u,{kind:m,step:g,prevState:E}=l;if(m===W.DOCUMENT)return f===en.TYPE_SYSTEM?q8(h):f===en.EXECUTABLE?H8(h):W8(h);if(m===W.EXTEND_DEF)return Q8(h);if(((o=E?.prevState)===null||o===void 0?void 0:o.kind)===W.EXTENSION_DEFINITION&&l.name)return Be(h,[]);if(E?.kind===D.SCALAR_TYPE_EXTENSION)return Be(h,Object.values(e.getTypeMap()).filter(at).map(N=>({label:N.name,kind:me.Function})));if(E?.kind===D.OBJECT_TYPE_EXTENSION)return Be(h,Object.values(e.getTypeMap()).filter(N=>ge(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:me.Function})));if(E?.kind===D.INTERFACE_TYPE_EXTENSION)return Be(h,Object.values(e.getTypeMap()).filter(De).map(N=>({label:N.name,kind:me.Function})));if(E?.kind===D.UNION_TYPE_EXTENSION)return Be(h,Object.values(e.getTypeMap()).filter(Ye).map(N=>({label:N.name,kind:me.Function})));if(E?.kind===D.ENUM_TYPE_EXTENSION)return Be(h,Object.values(e.getTypeMap()).filter(N=>Me(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:me.Function})));if(E?.kind===D.INPUT_OBJECT_TYPE_EXTENSION)return Be(h,Object.values(e.getTypeMap()).filter(ue).map(N=>({label:N.name,kind:me.Function})));if(m===W.IMPLEMENTS||m===W.NAMED_TYPE&&E?.kind===W.IMPLEMENTS)return J8(h,l,e,t,c);if(m===W.SELECTION_SET||m===W.FIELD||m===W.ALIASED_FIELD)return z8(h,c,a);if(m===W.ARGUMENTS||m===W.ARGUMENT&&g===0){let{argDefs:N}=c;if(N)return Be(h,N.map(L=>{var M;return{label:L.name,insertText:Uf(L.name+": ",L.type),insertTextMode:Fr.adjustIndentation,insertTextFormat:Sr.Snippet,command:Gu,labelDetails:{detail:" "+String(L.type)},documentation:(M=L.description)!==null&&M!==void 0?M:void 0,kind:me.Variable,type:L.type}}))}if((m===W.OBJECT_VALUE||m===W.OBJECT_FIELD&&g===0)&&c.objectFieldDefs){let N=Tr(c.objectFieldDefs),L=m===W.OBJECT_VALUE?me.Value:me.Field;return Be(h,N.map(M=>{var w;return{label:M.name,detail:String(M.type),documentation:(w=M?.description)!==null&&w!==void 0?w:void 0,kind:L,type:M.type,insertText:Uf(M.name+": ",M.type),insertTextMode:Fr.adjustIndentation,insertTextFormat:Sr.Snippet,command:Gu}}))}if(m===W.ENUM_VALUE||m===W.LIST_VALUE&&g===1||m===W.OBJECT_FIELD&&g===2||m===W.ARGUMENT&&g===2)return Y8(h,c,t,e);if(m===W.VARIABLE&&g===1){let N=_e(c.inputType),L=u1(t,e,h);return Be(h,L.filter(M=>M.detail===N?.name))}if(m===W.TYPE_CONDITION&&g===1||m===W.NAMED_TYPE&&E!=null&&E.kind===W.TYPE_CONDITION)return X8(h,c,e,m);if(m===W.FRAGMENT_SPREAD&&g===1)return K8(h,c,e,t,Array.isArray(i)?i:G8(i));let v=I2(l);return v.kind===W.FIELD_DEF?Be(h,Object.values(e.getTypeMap()).filter(N=>qt(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:me.Function,insertText:s?.fillLeafsOnComplete?N.name+` +`:N.name,insertTextMode:Fr.adjustIndentation}))):v.kind===W.INPUT_VALUE_DEF&&g===2?Be(h,Object.values(e.getTypeMap()).filter(N=>Je(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:me.Function,insertText:s?.fillLeafsOnComplete?N.name+` +$1`:N.name,insertTextMode:Fr.adjustIndentation,insertTextFormat:Sr.Snippet}))):m===W.VARIABLE_DEFINITION&&g===2||m===W.LIST_TYPE&&g===1||m===W.NAMED_TYPE&&E&&(E.kind===W.VARIABLE_DEFINITION||E.kind===W.LIST_TYPE||E.kind===W.NON_NULL_TYPE)?eb(h,e,m):m===W.DIRECTIVE?tb(h,l,e,m):m===W.DIRECTIVE_DEF?nb(h,l,e,m):[]}var a1=[{label:"type",kind:me.Function},{label:"interface",kind:me.Function},{label:"union",kind:me.Function},{label:"input",kind:me.Function},{label:"scalar",kind:me.Function},{label:"schema",kind:me.Function}],C2=[{label:"query",kind:me.Function},{label:"mutation",kind:me.Function},{label:"subscription",kind:me.Function},{label:"fragment",kind:me.Function},{label:"{",kind:me.Constructor}];function q8(e){return Be(e,[{label:"extend",kind:me.Function},...a1])}function H8(e){return Be(e,C2)}function W8(e){return Be(e,[{label:"extend",kind:me.Function},...C2,...a1])}function Q8(e){return Be(e,a1)}function z8(e,t,n){var r;if(t.parentType){let{parentType:i}=t,s=[];return"getFields"in i&&(s=Tr(i.getFields())),ut(i)&&s.push(An),i===((r=n?.schema)===null||r===void 0?void 0:r.getQueryType())&&s.push(Sn,Fn),Be(e,s.map((o,a)=>{var u;let l={sortText:String(a)+o.name,label:o.name,detail:String(o.type),documentation:(u=o.description)!==null&&u!==void 0?u:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:me.Field,labelDetails:{detail:" "+o.type.toString()},type:o.type};return n?.fillLeafsOnComplete&&(l.insertText=_0(o),l.insertText||(l.insertText=Uo(o.name,o.type,o.name+(e.state.needsAdvance?"":` +`))),l.insertText&&(l.insertTextFormat=Sr.Snippet,l.insertTextMode=Fr.adjustIndentation,l.command=Gu)),l}))}return[]}function Y8(e,t,n,r){let i=_e(t.inputType),s=u1(n,r,e).filter(o=>o.detail===i?.name);if(i instanceof dt){let o=i.getValues();return Be(e,o.map(a=>{var u;return{label:a.name,detail:String(i),documentation:(u=a.description)!==null&&u!==void 0?u:void 0,deprecated:!!a.deprecationReason,isDeprecated:!!a.deprecationReason,deprecationReason:a.deprecationReason,kind:me.EnumMember,type:i}}).concat(s))}return i===Re?Be(e,s.concat([{label:"true",detail:String(Re),documentation:"Not false.",kind:me.Variable,type:Re},{label:"false",detail:String(Re),documentation:"Not true.",kind:me.Variable,type:Re}])):s}function J8(e,t,n,r,i){if(t.needsSeparator)return[];let s=n.getTypeMap(),o=Tr(s).filter(De),a=o.map(({name:m})=>m),u=new Set;vs(r,(m,g)=>{var E,v,N,L,M;if(g.name&&(g.kind===W.INTERFACE_DEF&&!a.includes(g.name)&&u.add(g.name),g.kind===W.NAMED_TYPE&&((E=g.prevState)===null||E===void 0?void 0:E.kind)===W.IMPLEMENTS)){if(i.interfaceDef){if((v=i.interfaceDef)===null||v===void 0?void 0:v.getInterfaces().find(({name:S})=>S===g.name))return;let R=n.getType(g.name),V=(N=i.interfaceDef)===null||N===void 0?void 0:N.toConfig();i.interfaceDef=new bt(Object.assign(Object.assign({},V),{interfaces:[...V.interfaces,R||new bt({name:g.name,fields:{}})]}))}else if(i.objectTypeDef){if((L=i.objectTypeDef)===null||L===void 0?void 0:L.getInterfaces().find(({name:S})=>S===g.name))return;let R=n.getType(g.name),V=(M=i.objectTypeDef)===null||M===void 0?void 0:M.toConfig();i.objectTypeDef=new qe(Object.assign(Object.assign({},V),{interfaces:[...V.interfaces,R||new bt({name:g.name,fields:{}})]}))}}});let l=i.interfaceDef||i.objectTypeDef,f=(l?.getInterfaces()||[]).map(({name:m})=>m),h=o.concat([...u].map(m=>({name:m}))).filter(({name:m})=>m!==l?.name&&!f.includes(m));return Be(e,h.map(m=>{let g={label:m.name,kind:me.Interface,type:m};return m?.description&&(g.documentation=m.description),g}))}function X8(e,t,n,r){let i;if(t.parentType)if(ht(t.parentType)){let s=tu(t.parentType),o=n.getPossibleTypes(s),a=Object.create(null);for(let u of o)for(let l of u.getInterfaces())a[l.name]=l;i=o.concat(Tr(a))}else i=[t.parentType];else{let s=n.getTypeMap();i=Tr(s).filter(o=>ut(o)&&!o.name.startsWith("__"))}return Be(e,i.map(s=>{let o=_e(s);return{label:String(s),documentation:o?.description||"",kind:me.Field}}))}function K8(e,t,n,r,i){if(!r)return[];let s=n.getTypeMap(),o=ju(e.state),a=w2(r);i&&i.length>0&&a.push(...i);let u=a.filter(l=>s[l.typeCondition.name.value]&&!(o&&o.kind===W.FRAGMENT_DEFINITION&&o.name===l.name.value)&&ut(t.parentType)&&ut(s[l.typeCondition.name.value])&&Qr(n,t.parentType,s[l.typeCondition.name.value]));return Be(e,u.map(l=>({label:l.name.value,detail:String(s[l.typeCondition.name.value]),documentation:`fragment ${l.name.value} on ${l.typeCondition.name.value}`,labelDetails:{detail:`fragment ${l.name.value} on ${l.typeCondition.name.value}`},kind:me.Field,type:s[l.typeCondition.name.value]})))}var Z8=(e,t)=>{var n,r,i,s,o,a,u,l,c,f;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((i=(r=e.prevState)===null||r===void 0?void 0:r.prevState)===null||i===void 0?void 0:i.kind)===t)return e.prevState.prevState;if(((a=(o=(s=e.prevState)===null||s===void 0?void 0:s.prevState)===null||o===void 0?void 0:o.prevState)===null||a===void 0?void 0:a.kind)===t)return e.prevState.prevState.prevState;if(((f=(c=(l=(u=e.prevState)===null||u===void 0?void 0:u.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.prevState)===null||f===void 0?void 0:f.kind)===t)return e.prevState.prevState.prevState.prevState};function u1(e,t,n){let r=null,i,s=Object.create({});return vs(e,(o,a)=>{var u;if(a?.kind===W.VARIABLE&&a.name&&(r=a.name),a?.kind===W.NAMED_TYPE&&r){let l=Z8(a,W.TYPE);l?.type&&(i=t.getType(l?.type))}if(r&&i&&!s[r]){let l=n.string==="$"||((u=n?.state)===null||u===void 0?void 0:u.kind)==="Variable"?r:"$"+r;s[r]={detail:i.toString(),insertText:l,label:"$"+r,rawInsert:l,type:i,kind:me.Variable},r=null,i=null}}),Tr(s)}function w2(e){let t=[];return vs(e,(n,r)=>{r.kind===W.FRAGMENT_DEFINITION&&r.name&&r.type&&t.push({kind:W.FRAGMENT_DEFINITION,name:{kind:D.NAME,value:r.name},selectionSet:{kind:W.SELECTION_SET,selections:[]},typeCondition:{kind:W.NAMED_TYPE,name:{kind:D.NAME,value:r.type}}})}),t}function eb(e,t,n){let r=t.getTypeMap(),i=Tr(r).filter(Je);return Be(e,i.map(s=>({label:s.name,documentation:s?.description||"",kind:me.Variable})))}function tb(e,t,n,r){var i;if(!((i=t.prevState)===null||i===void 0)&&i.kind){let s=n.getDirectives().filter(o=>L2(t.prevState,o));return Be(e,s.map(o=>({label:o.name,documentation:o?.description||"",kind:me.Function})))}return[]}function nb(e,t,n,r){let i=n.getDirectives().find(s=>s.name===t.name);return Be(e,i?.args.map(s=>({label:s.name,documentation:s.description||"",kind:me.Field}))||[])}function L2(e,t){if(!e?.kind)return!1;let{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case W.QUERY:return i.includes(z.QUERY);case W.MUTATION:return i.includes(z.MUTATION);case W.SUBSCRIPTION:return i.includes(z.SUBSCRIPTION);case W.FIELD:case W.ALIASED_FIELD:return i.includes(z.FIELD);case W.FRAGMENT_DEFINITION:return i.includes(z.FRAGMENT_DEFINITION);case W.FRAGMENT_SPREAD:return i.includes(z.FRAGMENT_SPREAD);case W.INLINE_FRAGMENT:return i.includes(z.INLINE_FRAGMENT);case W.SCHEMA_DEF:return i.includes(z.SCHEMA);case W.SCALAR_DEF:return i.includes(z.SCALAR);case W.OBJECT_TYPE_DEF:return i.includes(z.OBJECT);case W.FIELD_DEF:return i.includes(z.FIELD_DEFINITION);case W.INTERFACE_DEF:return i.includes(z.INTERFACE);case W.UNION_DEF:return i.includes(z.UNION);case W.ENUM_DEF:return i.includes(z.ENUM);case W.ENUM_VALUE:return i.includes(z.ENUM_VALUE);case W.INPUT_DEF:return i.includes(z.INPUT_OBJECT);case W.INPUT_VALUE_DEF:switch(r?.kind){case W.ARGUMENTS_DEF:return i.includes(z.ARGUMENT_DEFINITION);case W.INPUT_DEF:return i.includes(z.INPUT_FIELD_DEFINITION)}}return!1}function I2(e){return e.prevState&&e.kind&&[W.NAMED_TYPE,W.LIST_TYPE,W.TYPE,W.NON_NULL_TYPE].includes(e.kind)?I2(e.prevState):e}var rb=El(O2());function It(e,t){e.push(t)}function l1(e,t){ae(t)?(l1(e,t.ofType),It(e,"!")):pe(t)?(It(e,"["),l1(e,t.ofType),It(e,"]")):It(e,t.name)}function Hu(e,t,n){let r=[],i="type"in e?e.type:e;return"type"in e&&e.description&&(It(r,e.description),It(r,` + +`)),It(r,ib(i,t)),n?(It(r,` +`),It(r,n)):!at(i)&&"description"in i&&i.description?(It(r,` +`),It(r,i.description)):"ofType"in i&&!at(i.ofType)&&"description"in i.ofType&&i.ofType.description&&(It(r,` +`),It(r,i.ofType.description)),r.join("")}function ib(e,t){let n=[];return t&&It(n,"```graphql\n"),l1(n,e),t&&It(n,"\n```"),n.join("")}var sb={Int:{type:"integer"},String:{type:"string"},Float:{type:"number"},ID:{type:"string"},Boolean:{type:"boolean"},DateTime:{type:"string"}},c1=class{constructor(){this.set=new Set}mark(t){return this.set.has(t)?!1:(this.set.add(t),!0)}};function f1(e,t){var n,r;let i=Object.create(null),s=Object.create(null),a="type"in e?e.type:e,u=ae(a)?a.ofType:a,l=ae(a);if(at(u))!((n=t?.scalarSchemas)===null||n===void 0)&&n[u.name]?i=JSON.parse(JSON.stringify(t.scalarSchemas[u.name])):i.type=["string","number","boolean","integer"],l||(Array.isArray(i.type)?i.type.push("null"):i.type?i.type=[i.type,"null"]:i.enum?i.enum.push(null):i.oneOf?i.oneOf.push({type:"null"}):i={oneOf:[i,{type:"null"}]});else if(Me(u))i.enum=u.getValues().map(f=>f.name),l||i.enum.push(null);else if(pe(u)){l?i.type="array":i.type=["array","null"];let{definition:f,definitions:h}=f1(u.ofType,t);if(i.items=f,h)for(let m of Object.keys(h))s[m]=h[m]}else if(ue(u)&&(l?i.$ref=`#/definitions/${u.name}`:i.oneOf=[{$ref:`#/definitions/${u.name}`},{type:"null"}],!((r=t?.definitionMarker)===null||r===void 0)&&r.mark(u.name))){let f=u.getFields(),h={type:"object",properties:{},required:[]};h.description=Hu(u),t?.useMarkdownDescription&&(h.markdownDescription=Hu(u,!0));for(let m of Object.keys(f)){let g=f[m],{required:E,definition:v,definitions:N}=f1(g,t);if(h.properties[m]=v,E&&h.required.push(m),N)for(let[L,M]of Object.entries(N))s[L]=M}s[u.name]=h}"defaultValue"in e&&e.defaultValue!==void 0&&(i.default=e.defaultValue);let{description:c}=i;return i.description=Hu(e,!1,c),t?.useMarkdownDescription&&(i.markdownDescription=Hu(e,!0,c)),{required:l,definition:i,definitions:s}}function Wu(e,t){var n;let r={$schema:"http://json-schema.org/draft-04/schema",type:"object",properties:{},required:[],additionalProperties:!1},i=Object.assign(Object.assign({},t),{definitionMarker:new c1,scalarSchemas:Object.assign(Object.assign({},sb),t?.scalarSchemas)});if(e)for(let[s,o]of Object.entries(e)){let{definition:a,required:u,definitions:l}=f1(o,i);r.properties[s]=a,u&&((n=r.required)===null||n===void 0||n.push(s)),l&&(r.definitions=Object.assign(Object.assign({},r?.definitions),l))}return r}var Wn=class{constructor(t,n){this.containsPosition=r=>this.start.line===r.line?this.start.character<=r.character:this.end.line===r.line?this.end.character>=r.character:this.start.line<=r.line&&this.end.line>=r.line,this.start=t,this.end=n}setStart(t,n){this.start=new Ct(t,n)}setEnd(t,n){this.end=new Ct(t,n)}},Ct=class{constructor(t,n){this.lessThanOrEqualTo=r=>this.line!(a===os||a===ns||r&&a===is));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,ob),ys(e,t,s).filter(a=>{if(a.message.includes("Unknown directive")&&a.nodes){let u=a.nodes[0];if(u&&u.kind===D.DIRECTIVE){let l=u.name.value;if(l==="arguments"||l==="argumentDefinitions")return!1}}return!0})}function zu(e,t){let n=Object.create(null);for(let r of t.definitions)if(r.kind==="OperationDefinition"){let{variableDefinitions:i}=r;if(i)for(let{variable:s,type:o}of i){let a=Pe(e,o);a?n[s.name.value]=a:o.kind===D.NAMED_TYPE&&o.name.value==="Float"&&(n[s.name.value]=So)}}return n}function Yu(e,t){let n=t?zu(t,e):void 0,r=[];return yt(e,{OperationDefinition(i){r.push(i)}}),{variableToType:n,operations:r}}var qo={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},Ju={[qo.Error]:1,[qo.Warning]:2,[qo.Information]:3,[qo.Hint]:4},Xu=(e,t)=>{if(!e)throw new Error(t)};function d1(e,t=null,n,r,i){var s,o;let a=null,u="";i&&(u=typeof i=="string"?i:i.reduce((c,f)=>c+ve(f)+` `,""));let l=u?`${e} -${u}`:e;try{a=fn(l)}catch(c){if(c instanceof M){let f=Bm((o=(s=c.locations)===null||s===void 0?void 0:s[0])!==null&&o!==void 0?o:{line:0,column:0},l);return[{severity:Au.Error,message:c.message,source:"GraphQL: Syntax",range:f}]}throw c}return Pm(a,t,n,r)}function Pm(e,t=null,n,r){if(!t)return[];let i=Nu(t,e,n,r).flatMap(o=>Mm(o,Au.Error,"Validation")),s=us(t,e,[uu]).flatMap(o=>Mm(o,Au.Warning,"Deprecation"));return i.concat(s)}function Mm(e,t,n){if(!e.nodes)return[];let r=[];for(let[i,s]of e.nodes.entries()){let o=s.kind!=="Variable"&&"name"in s&&s.name!==void 0?s.name:"variable"in s&&s.variable!==void 0?s.variable:s;if(o){wu(e.locations,"GraphQL validation error requires locations.");let a=e.locations[i],u=by(o),l=a.column+(u.end-u.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new Xn(new Ot(a.line-1,a.column-1),new Ot(a.line-1,l))})}}return r}function Bm(e,t){let n=oi(),r=n.startState(),i=t.split(` -`);wu(i.length>=e.line,"Query text must have more lines than where the error happened");let s=null;for(let l=0;lk2(o,Ju.Error,"Validation")),s=ys(t,e,[Lu]).flatMap(o=>k2(o,Ju.Warning,"Deprecation"));return i.concat(s)}function k2(e,t,n){if(!e.nodes)return[];let r=[];for(let[i,s]of e.nodes.entries()){let o=s.kind!=="Variable"&&"name"in s&&s.name!==void 0?s.name:"variable"in s&&s.variable!==void 0?s.variable:s;if(o){Xu(e.locations,"GraphQL validation error requires locations.");let a=e.locations[i],u=hb(o),l=a.column+(u.end-u.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new Wn(new Ct(a.line-1,a.column-1),new Ct(a.line-1,l))})}}return r}function P2(e,t){let n=mi(),r=n.startState(),i=t.split(` +`);Xu(i.length>=e.line,"Query text must have more lines than where the error happened");let s=null;for(let l=0;l{let{schema:n,documentAST:r,introspectionJSON:i,introspectionJSONString:s,buildSchemaOptions:o,documentString:a}=e;if(n)return n;if(s){let u=JSON.parse(s);return vo(u,o)}if(a&&t){let u=t(a);return Do(u,o)}if(i)return vo(i,o);if(r)return Do(r,o);throw new Error("No schema supplied")};var t8=new Map,Ou=class{_parser=fn;_schemas=[];_schemaCache=t8;_schemaLoader=$f;_parseOptions;_customValidationRules;_externalFragmentDefinitionNodes=null;_externalFragmentDefinitionsString=null;_completionSettings;constructor({parser:t,schemas:n,parseOptions:r,externalFragmentDefinitions:i,customValidationRules:s,fillLeafsOnComplete:o,completionSettings:a}){this._schemaLoader=$f,n&&(this._schemas=n,this._cacheSchemas()),t&&(this._parser=t),this._completionSettings={...a,fillLeafsOnComplete:a?.fillLeafsOnComplete??o},r&&(this._parseOptions=r),s&&(this._customValidationRules=s),i&&(Array.isArray(i)?this._externalFragmentDefinitionNodes=i:this._externalFragmentDefinitionsString=i)}_cacheSchemas(){for(let t of this._schemas)this._cacheSchema(t)}_cacheSchema(t){let n=this._schemaLoader(t,this.parse.bind(this));return this._schemaCache.set(t.uri,{...t,schema:n})}getSchemaForFile(t){if(!this._schemas.length)return;if(this._schemas.length===1)return this._schemaCache.get(this._schemas[0].uri);let n=this._schemas.find(r=>r.fileMatch?r.fileMatch.some(i=>(0,f2.default)(i)(t)):!1);if(n){let r=this._schemaCache.get(n.uri);return r||this._cacheSchema(n).get(n.uri)}}getExternalFragmentDefinitions(){if(!this._externalFragmentDefinitionNodes&&this._externalFragmentDefinitionsString){let t=[];try{Tt(this._parser(this._externalFragmentDefinitionsString),{FragmentDefinition(n){t.push(n)}})}catch{throw new Error(`Failed parsing externalFragmentDefinitions string: -${this._externalFragmentDefinitionsString}`)}this._externalFragmentDefinitionNodes=t}return this._externalFragmentDefinitionNodes}async updateSchemas(t){this._schemas=t,this._cacheSchemas()}updateSchema(t){let n=this._schemas.findIndex(r=>r.uri===t.uri);if(n<0){console.warn("updateSchema could not find a schema in your config by that URI",t.uri);return}this._schemas[n]=t,this._cacheSchema(t)}addSchema(t){this._schemas.push(t),this._cacheSchema(t)}parse(t,n){return this._parser(t,n||this._parseOptions)}getCompletion=(t,n,r)=>{let i=this.getSchemaForFile(t);return!n||!i?.schema?[]:wf(i.schema,n,r,void 0,this.getExternalFragmentDefinitions(),{uri:t,...this._completionSettings})};getDiagnostics=(t,n,r)=>{let i=this.getSchemaForFile(t);return!n||n.trim().length<2||!i?.schema?[]:Mf(n,i.schema,r??this._customValidationRules,!1,this.getExternalFragmentDefinitions())};getHover=(t,n,r,i)=>{let s=this.getSchemaForFile(t);if(s&&n.length>3)return Cu(s.schema,n,r,void 0,{useMarkdown:!0,...i})};getVariablesJSONSchema=(t,n,r)=>{let i=this.getSchemaForFile(t);if(i&&n.length>3)try{let s=this.parse(n),{variableToType:o}=Fu(s,i.schema);if(o)return Tu(o,{...r,scalarSchemas:i.customScalarSchemas})}catch{}return null}};function Hf(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function Wf(e){return new Ot(e.lineNumber-1,e.column-1)}function p2(e,t){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,...e.documentation&&{documentation:{value:e.documentation}},detail:e.detail,...t&&{range:Hf(t)},kind:e.kind,...e.insertTextFormat&&{insertTextFormat:e.insertTextFormat},...e.insertTextMode&&{insertTextMode:e.insertTextMode},...e.command&&{command:{...e.command,id:e.command.command}},...e.labelDetails&&{labelDetails:e.labelDetails}}}function n8(e){let t={1:qn.Error,2:qn.Warning,3:qn.Info,4:qn.Hint};return e?t[e]:t[2]}function h2(e){return{startLineNumber:e.range.start.line+1,endLineNumber:e.range.end.line+1,startColumn:e.range.start.character+1,endColumn:e.range.end.character,message:e.message,severity:n8(e.severity),code:e.code||void 0}}var zu=class{_ctx;_languageService;_formattingOptions;constructor(t,n){this._ctx=t,this._languageService=new Ou(n.languageConfig),this._formattingOptions=n.formattingOptions}async doValidation(t){try{let r=this._getTextModel(t)?.getValue();return r?this._languageService.getDiagnostics(t,r).map(h2):[]}catch(n){return console.error(n),[]}}async doComplete(t,n){try{let i=this._getTextModel(t)?.getValue();if(!i)return[];let s=Wf(n);return this._languageService.getCompletion(t,i,s).map(a=>p2(a))}catch(r){return console.error(r),[]}}async doHover(t,n){try{let i=this._getTextModel(t)?.getValue();if(!i)return null;let s=Wf(n),o=this._languageService.getHover(t,i,s),a=bo(i,s);return{content:o,range:Hf(new Xn(new Ot(s.line,a.start),new Ot(s.line,a.end)))}}catch(r){return console.error(r),null}}async doGetVariablesJSONSchema(t){let n=this._getTextModel(t),r=n?.getValue();if(!n||!r)return null;let i=this._languageService.getVariablesJSONSchema(t,r,{useMarkdownDescription:!0});return i?{...i,$id:"monaco://variables-schema.json",title:"GraphQL Variables"}:null}async doFormat(t){let n=this._getTextModel(t),r=n?.getValue();if(!n||!r)return null;let i=await Promise.resolve().then(()=>(Qg(),Wg)),s=await Promise.resolve().then(()=>el(Jg()));return i.format(r,{parser:"graphql",plugins:[s],...this._formattingOptions?.prettierConfig})}_getTextModel(t){let n=this._ctx.getMirrorModels();for(let r of n)if(r.uri.toString()===t)return r;return null}doUpdateSchema(t){return this._languageService.updateSchema(t)}doUpdateSchemas(t){return this._languageService.updateSchemas(t)}};globalThis.onmessage=()=>{pc((e,t)=>new zu(e,t))};})(); +`),rt(e,"Deprecated: "),rt(e,r))}function rt(e,t){e.push(t)}var cg=El(lg());var x1=(e,t)=>{let{schema:n,documentAST:r,introspectionJSON:i,introspectionJSONString:s,buildSchemaOptions:o,documentString:a}=e;if(n)return n;if(s){let u=JSON.parse(s);return Bo(u,o)}if(a&&t){let u=t(a);return Vo(u,o)}if(i)return Bo(i,o);if(r)return Vo(r,o);throw new Error("No schema supplied")};var zb=new Map,nl=class{_parser=pn;_schemas=[];_schemaCache=zb;_schemaLoader=x1;_parseOptions;_customValidationRules;_externalFragmentDefinitionNodes=null;_externalFragmentDefinitionsString=null;_completionSettings;constructor({parser:t,schemas:n,parseOptions:r,externalFragmentDefinitions:i,customValidationRules:s,fillLeafsOnComplete:o,completionSettings:a}){this._schemaLoader=x1,n&&(this._schemas=n,this._cacheSchemas()),t&&(this._parser=t),this._completionSettings={...a,fillLeafsOnComplete:a?.fillLeafsOnComplete??o},r&&(this._parseOptions=r),s&&(this._customValidationRules=s),i&&(Array.isArray(i)?this._externalFragmentDefinitionNodes=i:this._externalFragmentDefinitionsString=i)}_cacheSchemas(){for(let t of this._schemas)this._cacheSchema(t)}_cacheSchema(t){let n=this._schemaLoader(t,this.parse.bind(this));return this._schemaCache.set(t.uri,{...t,schema:n})}getSchemaForFile(t){if(!this._schemas.length)return;if(this._schemas.length===1)return this._schemaCache.get(this._schemas[0].uri);let n=this._schemas.find(r=>r.fileMatch?r.fileMatch.some(i=>(0,cg.default)(i)(t)):!1);if(n){let r=this._schemaCache.get(n.uri);return r||this._cacheSchema(n).get(n.uri)}}getExternalFragmentDefinitions(){if(!this._externalFragmentDefinitionNodes&&this._externalFragmentDefinitionsString){let t=[];try{yt(this._parser(this._externalFragmentDefinitionsString),{FragmentDefinition(n){t.push(n)}})}catch{throw new Error(`Failed parsing externalFragmentDefinitions string: +${this._externalFragmentDefinitionsString}`)}this._externalFragmentDefinitionNodes=t}return this._externalFragmentDefinitionNodes}async updateSchemas(t){this._schemas=t,this._cacheSchemas()}updateSchema(t){let n=this._schemas.findIndex(r=>r.uri===t.uri);if(n<0){console.warn("updateSchema could not find a schema in your config by that URI",t.uri);return}this._schemas[n]=t,this._cacheSchema(t)}addSchema(t){this._schemas.push(t),this._cacheSchema(t)}parse(t,n){return this._parser(t,n||this._parseOptions)}getCompletion=(t,n,r)=>{let i=this.getSchemaForFile(t);return!n||!i?.schema?[]:o1(i.schema,n,r,void 0,this.getExternalFragmentDefinitions(),{uri:t,...this._completionSettings})};getDiagnostics=(t,n,r)=>{let i=this.getSchemaForFile(t);return!n||n.trim().length<2||!i?.schema?[]:d1(n,i.schema,r??this._customValidationRules,!1,this.getExternalFragmentDefinitions())};getHover=(t,n,r,i)=>{let s=this.getSchemaForFile(t);if(s&&n.length>3)return Ku(s.schema,n,r,void 0,{useMarkdown:!0,...i})};getVariablesJSONSchema=(t,n,r)=>{let i=this.getSchemaForFile(t);if(i&&n.length>3)try{let s=this.parse(n),{variableToType:o}=Yu(s,i.schema);if(o)return Wu(o,{...r,scalarSchemas:i.customScalarSchemas})}catch{}return null}};function v1(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function _1(e){return new Ct(e.lineNumber-1,e.column-1)}function fg(e,t){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,...e.documentation&&{documentation:{value:e.documentation}},detail:e.detail,...t&&{range:v1(t)},kind:e.kind,...e.insertTextFormat&&{insertTextFormat:e.insertTextFormat},...e.insertTextMode&&{insertTextMode:e.insertTextMode},...e.command&&{command:{...e.command,id:e.command.command}},...e.labelDetails&&{labelDetails:e.labelDetails}}}function Yb(e){let t={1:Vn.Error,2:Vn.Warning,3:Vn.Info,4:Vn.Hint};return e?t[e]:t[2]}function pg(e){return{startLineNumber:e.range.start.line+1,endLineNumber:e.range.end.line+1,startColumn:e.range.start.character+1,endColumn:e.range.end.character,message:e.message,severity:Yb(e.severity),code:e.code||void 0}}var gl=class{_ctx;_languageService;_formattingOptions;constructor(t,n){this._ctx=t,this._languageService=new nl(n.languageConfig),this._formattingOptions=n.formattingOptions}async doValidation(t){try{let r=this._getTextModel(t)?.getValue();return r?this._languageService.getDiagnostics(t,r).map(pg):[]}catch(n){return console.error(n),[]}}async doComplete(t,n){try{let i=this._getTextModel(t)?.getValue();if(!i)return[];let s=_1(n);return this._languageService.getCompletion(t,i,s).map(a=>fg(a))}catch(r){return console.error(r),[]}}async doHover(t,n){try{let i=this._getTextModel(t)?.getValue();if(!i)return null;let s=_1(n),o=this._languageService.getHover(t,i,s),a=jo(i,s);return{content:o,range:v1(new Wn(new Ct(s.line,a.start),new Ct(s.line,a.end)))}}catch(r){return console.error(r),null}}async doGetVariablesJSONSchema(t){let n=this._getTextModel(t),r=n?.getValue();if(!n||!r)return null;let i=this._languageService.getVariablesJSONSchema(t,r,{useMarkdownDescription:!0});return i?{...i,$id:"monaco://variables-schema.json",title:"GraphQL Variables"}:null}async doFormat(t){let n=this._getTextModel(t),r=n?.getValue();if(!n||!r)return null;let i=await Promise.resolve().then(()=>(W4(),H4)),s=await Promise.resolve().then(()=>El(Y4()));return i.format(r,{parser:"graphql",plugins:[s],...this._formattingOptions?.prettierConfig})}_getTextModel(t){let n=this._ctx.getMirrorModels();for(let r of n)if(r.uri.toString()===t)return r;return null}doUpdateSchema(t){return this._languageService.updateSchema(t)}doUpdateSchemas(t){return this._languageService.updateSchemas(t)}};globalThis.onmessage=()=>{Lc((e,t)=>new gl(e,t))};})(); diff --git a/gui/graphql/public/main.js b/gui/graphql/public/main.js index 9e0067f8..9688882b 100644 --- a/gui/graphql/public/main.js +++ b/gui/graphql/public/main.js @@ -1,126 +1,160 @@ -var Z7t=Object.create;var dAe=Object.defineProperty;var $7t=Object.getOwnPropertyDescriptor;var ezt=Object.getOwnPropertyNames;var tzt=Object.getPrototypeOf,izt=Object.prototype.hasOwnProperty;var D=(i,e,t)=>()=>{if(t)throw t[0];try{return i&&(e=i(i=0)),e}catch(n){throw t=[n],n}};var Ue=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},Ih=(i,e)=>{for(var t in e)dAe(i,t,{get:e[t],enumerable:!0})},nzt=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ezt(e))!izt.call(i,r)&&r!==t&&dAe(i,r,{get:()=>e[r],enumerable:!(n=$7t(e,r))||n.enumerable});return i};var $=(i,e,t)=>(t=i!=null?Z7t(tzt(i)):{},nzt(e||!i||!i.__esModule?dAe(t,"default",{value:i,enumerable:!0}):t,i));var yGe=Ue(Nq=>{"use strict";var ozt=Symbol.for("react.transitional.element"),szt=Symbol.for("react.fragment");function AGe(i,e,t){var n=null;if(t!==void 0&&(n=""+t),e.key!==void 0&&(n=""+e.key),"key"in e){t={};for(var r in e)r!=="key"&&(t[r]=e[r])}else t=e;return e=t.ref,{$$typeof:ozt,type:i,key:n,ref:e!==void 0?e:null,props:t}}Nq.Fragment=szt;Nq.jsx=AGe;Nq.jsxs=AGe});var Hi=Ue((g8i,wGe)=>{"use strict";wGe.exports=yGe()});var NGe=Ue(Kn=>{"use strict";var mAe=Symbol.for("react.transitional.element"),azt=Symbol.for("react.portal"),lzt=Symbol.for("react.fragment"),czt=Symbol.for("react.strict_mode"),uzt=Symbol.for("react.profiler"),dzt=Symbol.for("react.consumer"),hzt=Symbol.for("react.context"),fzt=Symbol.for("react.forward_ref"),pzt=Symbol.for("react.suspense"),mzt=Symbol.for("react.memo"),EGe=Symbol.for("react.lazy"),gzt=Symbol.for("react.activity"),xGe=Symbol.iterator;function bzt(i){return i===null||typeof i!="object"?null:(i=xGe&&i[xGe]||i["@@iterator"],typeof i=="function"?i:null)}var DGe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},TGe=Object.assign,kGe={};function DM(i,e,t){this.props=i,this.context=e,this.refs=kGe,this.updater=t||DGe}DM.prototype.isReactComponent={};DM.prototype.setState=function(i,e){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,e,"setState")};DM.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function IGe(){}IGe.prototype=DM.prototype;function gAe(i,e,t){this.props=i,this.context=e,this.refs=kGe,this.updater=t||DGe}var bAe=gAe.prototype=new IGe;bAe.constructor=gAe;TGe(bAe,DM.prototype);bAe.isPureReactComponent=!0;var CGe=Array.isArray;function pAe(){}var _a={H:null,A:null,T:null,S:null},LGe=Object.prototype.hasOwnProperty;function vAe(i,e,t){var n=t.ref;return{$$typeof:mAe,type:i,key:e,ref:n!==void 0?n:null,props:t}}function vzt(i,e){return vAe(i.type,e,i.props)}function AAe(i){return typeof i=="object"&&i!==null&&i.$$typeof===mAe}function Azt(i){var e={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(t){return e[t]})}var _Ge=/\/+/g;function fAe(i,e){return typeof i=="object"&&i!==null&&i.key!=null?Azt(""+i.key):e.toString(36)}function yzt(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(pAe,pAe):(i.status="pending",i.then(function(e){i.status==="pending"&&(i.status="fulfilled",i.value=e)},function(e){i.status==="pending"&&(i.status="rejected",i.reason=e)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function EM(i,e,t,n,r){var o=typeof i;(o==="undefined"||o==="boolean")&&(i=null);var s=!1;if(i===null)s=!0;else switch(o){case"bigint":case"string":case"number":s=!0;break;case"object":switch(i.$$typeof){case mAe:case azt:s=!0;break;case EGe:return s=i._init,EM(s(i._payload),e,t,n,r)}}if(s)return r=r(i),s=n===""?"."+fAe(i,0):n,CGe(r)?(t="",s!=null&&(t=s.replace(_Ge,"$&/")+"/"),EM(r,e,t,"",function(c){return c})):r!=null&&(AAe(r)&&(r=vzt(r,t+(r.key==null||i&&i.key===r.key?"":(""+r.key).replace(_Ge,"$&/")+"/")+s)),e.push(r)),1;s=0;var a=n===""?".":n+":";if(CGe(i))for(var l=0;l{"use strict";MGe.exports=NGe()});var ur=Ue((A8i,zGe)=>{"use no memo";"use strict";var Czt=Object.create,Oq=Object.defineProperty,_zt=Object.getOwnPropertyDescriptor,Szt=Object.getOwnPropertyNames,Ezt=Object.getPrototypeOf,Dzt=Object.prototype.hasOwnProperty,Tzt=(i,e)=>{for(var t in e)Oq(i,t,{get:e[t],enumerable:!0})},PGe=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Szt(e))!Dzt.call(i,r)&&r!==t&&Oq(i,r,{get:()=>e[r],enumerable:!(n=_zt(e,r))||n.enumerable});return i},kzt=(i,e,t)=>(t=i!=null?Czt(Ezt(i)):{},PGe(e||!i||!i.__esModule?Oq(t,"default",{value:i,enumerable:!0}):t,i)),Izt=i=>PGe(Oq({},"__esModule",{value:!0}),i),BGe={};Tzt(BGe,{$dispatcherGuard:()=>Rzt,$makeReadOnly:()=>Ozt,$reset:()=>Fzt,$structuralCheck:()=>Hzt,c:()=>Mzt,clearRenderCounterRegistry:()=>Pzt,renderCounterRegistry:()=>m5,useRenderCounter:()=>Vzt});zGe.exports=Izt(BGe);var IM=kzt(Te()),{useRef:Lzt,useEffect:Nzt,isValidElement:TM}=IM,RGe,yAe=(RGe=IM.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)!=null?RGe:IM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wAe=Symbol.for("react.memo_cache_sentinel"),FGe,Mzt=typeof((FGe=IM.__COMPILER_RUNTIME)==null?void 0:FGe.c)=="function"?IM.__COMPILER_RUNTIME.c:function(e){return IM.useMemo(()=>{let t=new Array(e);for(let n=0;n{Fq[i]=()=>{throw new Error(`[React] Unexpected React hook call (${i}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var p5=null;Fq.useMemoCache=i=>{if(p5==null)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return p5.useMemoCache(i)};function Rq(i){return yAe.ReactCurrentDispatcher.current=i,yAe.ReactCurrentDispatcher.current}var kM=[];function Rzt(i){let e=yAe.ReactCurrentDispatcher.current;if(i===0){if(kM.push(e),kM.length===1&&(p5=e),e===Fq)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");Rq(Fq)}else if(i===1){let t=kM.pop();if(t==null)throw new Error("React Compiler internal error: unexpected null in guard stack");kM.length===0&&(p5=null),Rq(t)}else if(i===2)kM.push(e),Rq(p5);else if(i===3){let t=kM.pop();if(t==null)throw new Error("React Compiler internal error: unexpected null in guard stack");Rq(t)}else throw new Error("React Compiler internal error: unreachable block"+i)}function Fzt(i){for(let e=0;e{e.count=0})}function Bzt(i,e){let t=m5.get(i);t==null&&(t=new Set,m5.set(i,t)),t.add(e)}function zzt(i,e){let t=m5.get(i);t?.delete(e)}function Vzt(i){let e=Lzt(null);e.current!=null&&(e.current.count+=1),Nzt(()=>{if(e.current==null){let t={count:0};Bzt(i,t),e.current=t}return()=>{e.current!==null&&zzt(i,e.current)}})}var OGe=new Set;function Hzt(i,e,t,n,r,o){function s(c,u,d,h){let f=`${n}:${o} [${r}] ${t}${d} changed from ${c} to ${u} at depth ${h}`;OGe.has(f)||(OGe.add(f),console.error(f))}let a=2;function l(c,u,d,h){if(!(h>a)){if(c===u)return;if(typeof c!=typeof u)s(`type ${typeof c}`,`type ${typeof u}`,d,h);else if(typeof c=="object"){let f=Array.isArray(c),p=Array.isArray(u);if(c===null&&u!==null)s("null",`type ${typeof u}`,d,h);else if(u===null)s(`type ${typeof c}`,"null",d,h);else if(c instanceof Map)if(!(u instanceof Map))s("Map instance","other value",d,h);else if(c.size!==u.size)s(`Map instance with size ${c.size}`,`Map instance with size ${u.size}`,d,h);else for(let[g,v]of c)u.has(g)?l(v,u.get(g),`${d}.get(${g})`,h+1):s(`Map instance with key ${g}`,`Map instance without key ${g}`,d,h);else if(u instanceof Map)s("other value","Map instance",d,h);else if(c instanceof Set)if(!(u instanceof Set))s("Set instance","other value",d,h);else if(c.size!==u.size)s(`Set instance with size ${c.size}`,`Set instance with size ${u.size}`,d,h);else for(let g of u)c.has(g)||s(`Set instance without element ${g}`,`Set instance with element ${g}`,d,h);else if(u instanceof Set)s("other value","Set instance",d,h);else if(f||p)if(f!==p)s(`type ${f?"array":"object"}`,`type ${p?"array":"object"}`,d,h);else if(c.length!==u.length)s(`array with length ${c.length}`,`array with length ${u.length}`,d,h);else for(let g=0;g{XAe=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?M5.isErrorNoTelemetry(e)?new M5(e.message+` +var e9t=Object.create;var cK=Object.defineProperty;var t9t=Object.getOwnPropertyDescriptor;var i9t=Object.getOwnPropertyNames;var n9t=Object.getPrototypeOf,o9t=Object.prototype.hasOwnProperty;var D=(i,e,t)=>()=>{if(t)throw t[0];try{return i&&(e=i(i=0)),e}catch(n){throw t=[n],n}};var la=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},ad=(i,e)=>{for(var t in e)cK(i,t,{get:e[t],enumerable:!0})},WGe=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i9t(e))!o9t.call(i,o)&&o!==t&&cK(i,o,{get:()=>e[o],enumerable:!(n=t9t(e,o))||n.enumerable});return i};var ae=(i,e,t)=>(t=i!=null?e9t(n9t(i)):{},WGe(e||!i||!i.__esModule?cK(t,"default",{value:i,enumerable:!0}):t,i)),r9t=i=>WGe(cK({},"__esModule",{value:!0}),i);var jGe=la(uK=>{"use strict";var a9t=Symbol.for("react.transitional.element"),l9t=Symbol.for("react.fragment");function UGe(i,e,t){var n=null;if(t!==void 0&&(n=""+t),e.key!==void 0&&(n=""+e.key),"key"in e){t={};for(var o in e)o!=="key"&&(t[o]=e[o])}else t=e;return e=t.ref,{$$typeof:a9t,type:i,key:n,ref:e!==void 0?e:null,props:t}}uK.Fragment=l9t;uK.jsx=UGe;uK.jsxs=UGe});var zi=la((cNi,QGe)=>{"use strict";QGe.exports=jGe()});var iqe=la($n=>{"use strict";var Lye=Symbol.for("react.transitional.element"),c9t=Symbol.for("react.portal"),u9t=Symbol.for("react.fragment"),d9t=Symbol.for("react.strict_mode"),h9t=Symbol.for("react.profiler"),f9t=Symbol.for("react.consumer"),p9t=Symbol.for("react.context"),m9t=Symbol.for("react.forward_ref"),g9t=Symbol.for("react.suspense"),b9t=Symbol.for("react.memo"),JGe=Symbol.for("react.lazy"),A9t=Symbol.for("react.activity"),GGe=Symbol.iterator;function v9t(i){return i===null||typeof i!="object"?null:(i=GGe&&i[GGe]||i["@@iterator"],typeof i=="function"?i:null)}var XGe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ZGe=Object.assign,$Ge={};function aR(i,e,t){this.props=i,this.context=e,this.refs=$Ge,this.updater=t||XGe}aR.prototype.isReactComponent={};aR.prototype.setState=function(i,e){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,e,"setState")};aR.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function eqe(){}eqe.prototype=aR.prototype;function Nye(i,e,t){this.props=i,this.context=e,this.refs=$Ge,this.updater=t||XGe}var Mye=Nye.prototype=new eqe;Mye.constructor=Nye;ZGe(Mye,aR.prototype);Mye.isPureReactComponent=!0;var qGe=Array.isArray;function Iye(){}var Ia={H:null,A:null,T:null,S:null},tqe=Object.prototype.hasOwnProperty;function Rye(i,e,t){var n=t.ref;return{$$typeof:Lye,type:i,key:e,ref:n!==void 0?n:null,props:t}}function y9t(i,e){return Rye(i.type,e,i.props)}function Fye(i){return typeof i=="object"&&i!==null&&i.$$typeof===Lye}function w9t(i){var e={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(t){return e[t]})}var YGe=/\/+/g;function kye(i,e){return typeof i=="object"&&i!==null&&i.key!=null?w9t(""+i.key):e.toString(36)}function x9t(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(Iye,Iye):(i.status="pending",i.then(function(e){i.status==="pending"&&(i.status="fulfilled",i.value=e)},function(e){i.status==="pending"&&(i.status="rejected",i.reason=e)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function sR(i,e,t,n,o){var r=typeof i;(r==="undefined"||r==="boolean")&&(i=null);var s=!1;if(i===null)s=!0;else switch(r){case"bigint":case"string":case"number":s=!0;break;case"object":switch(i.$$typeof){case Lye:case c9t:s=!0;break;case JGe:return s=i._init,sR(s(i._payload),e,t,n,o)}}if(s)return o=o(i),s=n===""?"."+kye(i,0):n,qGe(o)?(t="",s!=null&&(t=s.replace(YGe,"$&/")+"/"),sR(o,e,t,"",function(c){return c})):o!=null&&(Fye(o)&&(o=y9t(o,t+(o.key==null||i&&i.key===o.key?"":(""+o.key).replace(YGe,"$&/")+"/")+s)),e.push(o)),1;s=0;var a=n===""?".":n+":";if(qGe(i))for(var l=0;l{"use strict";nqe.exports=iqe()});var fo=la((hNi,cqe)=>{"use no memo";"use strict";var S9t=Object.create,pK=Object.defineProperty,E9t=Object.getOwnPropertyDescriptor,D9t=Object.getOwnPropertyNames,T9t=Object.getPrototypeOf,k9t=Object.prototype.hasOwnProperty,I9t=(i,e)=>{for(var t in e)pK(i,t,{get:e[t],enumerable:!0})},aqe=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D9t(e))!k9t.call(i,o)&&o!==t&&pK(i,o,{get:()=>e[o],enumerable:!(n=E9t(e,o))||n.enumerable});return i},L9t=(i,e,t)=>(t=i!=null?S9t(T9t(i)):{},aqe(e||!i||!i.__esModule?pK(t,"default",{value:i,enumerable:!0}):t,i)),N9t=i=>aqe(pK({},"__esModule",{value:!0}),i),lqe={};I9t(lqe,{$dispatcherGuard:()=>O9t,$makeReadOnly:()=>B9t,$reset:()=>P9t,$structuralCheck:()=>U9t,c:()=>F9t,clearRenderCounterRegistry:()=>z9t,renderCounterRegistry:()=>r6,useRenderCounter:()=>W9t});cqe.exports=N9t(lqe);var uR=L9t(ke()),{useRef:M9t,useEffect:R9t,isValidElement:lR}=uR,oqe,Oye=(oqe=uR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)!=null?oqe:uR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pye=Symbol.for("react.memo_cache_sentinel"),rqe,F9t=typeof((rqe=uR.__COMPILER_RUNTIME)==null?void 0:rqe.c)=="function"?uR.__COMPILER_RUNTIME.c:function(e){return uR.useMemo(()=>{let t=new Array(e);for(let n=0;n{fK[i]=()=>{throw new Error(`[React] Unexpected React hook call (${i}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var o6=null;fK.useMemoCache=i=>{if(o6==null)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return o6.useMemoCache(i)};function hK(i){return Oye.ReactCurrentDispatcher.current=i,Oye.ReactCurrentDispatcher.current}var cR=[];function O9t(i){let e=Oye.ReactCurrentDispatcher.current;if(i===0){if(cR.push(e),cR.length===1&&(o6=e),e===fK)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");hK(fK)}else if(i===1){let t=cR.pop();if(t==null)throw new Error("React Compiler internal error: unexpected null in guard stack");cR.length===0&&(o6=null),hK(t)}else if(i===2)cR.push(e),hK(o6);else if(i===3){let t=cR.pop();if(t==null)throw new Error("React Compiler internal error: unexpected null in guard stack");hK(t)}else throw new Error("React Compiler internal error: unreachable block"+i)}function P9t(i){for(let e=0;e{e.count=0})}function V9t(i,e){let t=r6.get(i);t==null&&(t=new Set,r6.set(i,t)),t.add(e)}function H9t(i,e){let t=r6.get(i);t?.delete(e)}function W9t(i){let e=M9t(null);e.current!=null&&(e.current.count+=1),R9t(()=>{if(e.current==null){let t={count:0};V9t(i,t),e.current=t}return()=>{e.current!==null&&H9t(i,e.current)}})}var sqe=new Set;function U9t(i,e,t,n,o,r){function s(c,u,d,h){let f=`${n}:${r} [${o}] ${t}${d} changed from ${c} to ${u} at depth ${h}`;sqe.has(f)||(sqe.add(f),console.error(f))}let a=2;function l(c,u,d,h){if(!(h>a)){if(c===u)return;if(typeof c!=typeof u)s(`type ${typeof c}`,`type ${typeof u}`,d,h);else if(typeof c=="object"){let f=Array.isArray(c),p=Array.isArray(u);if(c===null&&u!==null)s("null",`type ${typeof u}`,d,h);else if(u===null)s(`type ${typeof c}`,"null",d,h);else if(c instanceof Map)if(!(u instanceof Map))s("Map instance","other value",d,h);else if(c.size!==u.size)s(`Map instance with size ${c.size}`,`Map instance with size ${u.size}`,d,h);else for(let[g,A]of c)u.has(g)?l(A,u.get(g),`${d}.get(${g})`,h+1):s(`Map instance with key ${g}`,`Map instance without key ${g}`,d,h);else if(u instanceof Map)s("other value","Map instance",d,h);else if(c instanceof Set)if(!(u instanceof Set))s("Set instance","other value",d,h);else if(c.size!==u.size)s(`Set instance with size ${c.size}`,`Set instance with size ${u.size}`,d,h);else for(let g of u)c.has(g)||s(`Set instance without element ${g}`,`Set instance with element ${g}`,d,h);else if(u instanceof Set)s("other value","Set instance",d,h);else if(f||p)if(f!==p)s(`type ${f?"array":"object"}`,`type ${p?"array":"object"}`,d,h);else if(c.length!==u.length)s(`array with length ${c.length}`,`array with length ${u.length}`,d,h);else for(let g=0;g{f1e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?C6.isErrorNoTelemetry(e)?new C6(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Aqe=new XAe;Jq="Canceled";Hc=class extends Error{constructor(){super(Jq),this.name=this.message}};Xq=class extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}},M5=class i extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof i)return e;let t=new i;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},vi=class i extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,i.prototype)}}});function Tf(i,e){let t=this,n=!1,r;return function(){if(n)return r;if(n=!0,e)try{r=i.apply(t,arguments)}finally{e()}else r=i.apply(t,arguments);return r}}var b_=D(()=>{});var bi,td=D(()=>{(function(i){function e(_){return _&&typeof _=="object"&&typeof _[Symbol.iterator]=="function"}i.is=e;let t=Object.freeze([]);function n(){return t}i.empty=n;function*r(_){yield _}i.single=r;function o(_){return e(_)?_:r(_)}i.wrap=o;function s(_){return _||t}i.from=s;function*a(_){for(let E=_.length-1;E>=0;E--)yield _[E]}i.reverse=a;function l(_){return!_||_[Symbol.iterator]().next().done===!0}i.isEmpty=l;function c(_){return _[Symbol.iterator]().next().value}i.first=c;function u(_,E){let I=0;for(let T of _)if(E(T,I++))return!0;return!1}i.some=u;function d(_,E){for(let I of _)if(E(I))return I}i.find=d;function*h(_,E){for(let I of _)E(I)&&(yield I)}i.filter=h;function*f(_,E){let I=0;for(let T of _)yield E(T,I++)}i.map=f;function*p(_,E){let I=0;for(let T of _)yield*E(T,I++)}i.flatMap=p;function*g(..._){for(let E of _)yield*E}i.concat=g;function v(_,E,I){let T=I;for(let L of _)T=E(T,L);return T}i.reduce=v;function*A(_,E,I=_.length){for(E<0&&(E+=_.length),I<0?I+=_.length:I>_.length&&(I=_.length);E1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function hc(...i){let e=Ve(()=>Vi(i));return jzt(i,e),e}function Ve(i){let e=QT({dispose:Tf(()=>{GT(e),i()})});return e}var Wzt,jT,te,W,On,$q,eY,v_,ae=D(()=>{b_();td();Wzt=!1,jT=null;if(Wzt){let i="__is_disposable_tracked__";Uzt(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[i]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==W.None)try{e[i]=!0}catch{}}markAsDisposed(e){if(e&&e!==W.None)try{e[i]=!0}catch{}}markAsSingleton(e){}})}te=class i{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,QT(this)}dispose(){this._isDisposed||(GT(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Vi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Zq(e,this),this._isDisposed?i.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),Zq(e,null))}},W=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new te,QT(this),Zq(this._store,this)}dispose(){GT(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}},On=class{constructor(){this._isDisposed=!1,QT(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Zq(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,GT(this),this._value?.dispose(),this._value=void 0}},$q=class{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}},eY=class{constructor(e){this.object=e}dispose(){}},v_=class{constructor(){this._store=new Map,this._isDisposed=!1,QT(this)}dispose(){GT(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Vi(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}});var Sa,Ro,Sp=D(()=>{Sa=class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}},Ro=class{constructor(){this._first=Sa.Undefined,this._last=Sa.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Sa.Undefined}clear(){let e=this._first;for(;e!==Sa.Undefined;){let t=e.next;e.prev=Sa.Undefined,e.next=Sa.Undefined,e=t}this._first=Sa.Undefined,this._last=Sa.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new Sa(e);if(this._first===Sa.Undefined)this._first=n,this._last=n;else if(t){let o=this._last;this._last=n,n.prev=o,o.next=n}else{let o=this._first;this._first=n,n.next=o,o.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==Sa.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Sa.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Sa.Undefined&&e.next!==Sa.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Sa.Undefined&&e.next===Sa.Undefined?(this._first=Sa.Undefined,this._last=Sa.Undefined):e.next===Sa.Undefined?(this._last=this._last.prev,this._last.next=Sa.Undefined):e.prev===Sa.Undefined&&(this._first=this._first.next,this._first.prev=Sa.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Sa.Undefined;)yield e.element,e=e.next}}});var Qzt,Ar,id=D(()=>{Qzt=globalThis.performance&&typeof globalThis.performance.now=="function",Ar=class i{static create(e){return new i(e)}constructor(e){this._now=Qzt&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}});var Gzt,xqe,qzt,Se,$Ae,Cqe,eye,R5,tye,iye,RM,Yzt,Kzt,tY,G,_qe,iY,Fm,FM,nY,rY,ab,F5,et=D(()=>{Lt();b_();ae();Sp();id();Gzt=!1,xqe=!1,qzt=!1;(function(i){i.None=()=>W.None;function e(U){if(qzt){let{onDidAddListener:F}=U,ne=R5.create(),ce=0;U.onDidAddListener=()=>{++ce===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ne.print()),F?.()}}}function t(U,F){return f(U,()=>{},0,void 0,!0,void 0,F)}i.defer=t;function n(U){return(F,ne=null,ce)=>{let se=!1,le;return le=U(oe=>{if(!se)return le?le.dispose():se=!0,F.call(ne,oe)},null,ce),se&&le.dispose(),le}}i.once=n;function r(U,F){return i.once(i.filter(U,F))}i.onceIf=r;function o(U,F,ne){return d((ce,se=null,le)=>U(oe=>ce.call(se,F(oe)),null,le),ne)}i.map=o;function s(U,F,ne){return d((ce,se=null,le)=>U(oe=>{F(oe),ce.call(se,oe)},null,le),ne)}i.forEach=s;function a(U,F,ne){return d((ce,se=null,le)=>U(oe=>F(oe)&&ce.call(se,oe),null,le),ne)}i.filter=a;function l(U){return U}i.signal=l;function c(...U){return(F,ne=null,ce)=>{let se=hc(...U.map(le=>le(oe=>F.call(ne,oe))));return h(se,ce)}}i.any=c;function u(U,F,ne,ce){let se=ne;return o(U,le=>(se=F(se,le),se),ce)}i.reduce=u;function d(U,F){let ne,ce={onWillAddFirstListener(){ne=U(se.fire,se)},onDidRemoveLastListener(){ne?.dispose()}};F||e(ce);let se=new G(ce);return F?.add(se),se.event}function h(U,F){return F instanceof Array?F.push(U):F&&F.add(U),U}function f(U,F,ne=100,ce=!1,se=!1,le,oe){let fe,Re,ft,At=0,Dt,Ct={leakWarningThreshold:le,onWillAddFirstListener(){fe=U(Be=>{At++,Re=F(Re,Be),ce&&!ft&&(Xt.fire(Re),Re=void 0),Dt=()=>{let Vt=Re;Re=void 0,ft=void 0,(!ce||At>1)&&Xt.fire(Vt),At=0},typeof ne=="number"?(clearTimeout(ft),ft=setTimeout(Dt,ne)):ft===void 0&&(ft=0,queueMicrotask(Dt))})},onWillRemoveListener(){se&&At>0&&Dt?.()},onDidRemoveLastListener(){Dt=void 0,fe.dispose()}};oe||e(Ct);let Xt=new G(Ct);return oe?.add(Xt),Xt.event}i.debounce=f;function p(U,F=0,ne){return i.debounce(U,(ce,se)=>ce?(ce.push(se),ce):[se],F,void 0,!0,void 0,ne)}i.accumulate=p;function g(U,F=(ce,se)=>ce===se,ne){let ce=!0,se;return a(U,le=>{let oe=ce||!F(le,se);return ce=!1,se=le,oe},ne)}i.latch=g;function v(U,F,ne){return[i.filter(U,F,ne),i.filter(U,ce=>!F(ce),ne)]}i.split=v;function A(U,F=!1,ne=[],ce){let se=ne.slice(),le=U(Re=>{se?se.push(Re):fe.fire(Re)});ce&&ce.add(le);let oe=()=>{se?.forEach(Re=>fe.fire(Re)),se=null},fe=new G({onWillAddFirstListener(){le||(le=U(Re=>fe.fire(Re)),ce&&ce.add(le))},onDidAddFirstListener(){se&&(F?setTimeout(oe):oe())},onDidRemoveLastListener(){le&&le.dispose(),le=null}});return ce&&ce.add(fe),fe.event}i.buffer=A;function w(U,F){return(ce,se,le)=>{let oe=F(new _);return U(function(fe){let Re=oe.evaluate(fe);Re!==C&&ce.call(se,Re)},void 0,le)}}i.chain=w;let C=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(F){return this.steps.push(F),this}forEach(F){return this.steps.push(ne=>(F(ne),ne)),this}filter(F){return this.steps.push(ne=>F(ne)?ne:C),this}reduce(F,ne){let ce=ne;return this.steps.push(se=>(ce=F(ce,se),ce)),this}latch(F=(ne,ce)=>ne===ce){let ne=!0,ce;return this.steps.push(se=>{let le=ne||!F(se,ce);return ne=!1,ce=se,le?se:C}),this}evaluate(F){for(let ne of this.steps)if(F=ne(F),F===C)break;return F}}function E(U,F,ne=ce=>ce){let ce=(...fe)=>oe.fire(ne(...fe)),se=()=>U.on(F,ce),le=()=>U.removeListener(F,ce),oe=new G({onWillAddFirstListener:se,onDidRemoveLastListener:le});return oe.event}i.fromNodeEventEmitter=E;function I(U,F,ne=ce=>ce){let ce=(...fe)=>oe.fire(ne(...fe)),se=()=>U.addEventListener(F,ce),le=()=>U.removeEventListener(F,ce),oe=new G({onWillAddFirstListener:se,onDidRemoveLastListener:le});return oe.event}i.fromDOMEventEmitter=I;function T(U){return new Promise(F=>n(U)(F))}i.toPromise=T;function L(U){let F=new G;return U.then(ne=>{F.fire(ne)},()=>{F.fire(void 0)}).finally(()=>{F.dispose()}),F.event}i.fromPromise=L;function M(U,F){return U(ne=>F.fire(ne))}i.forward=M;function z(U,F,ne){return F(ne),U(ce=>F(ce))}i.runAndSubscribe=z;class H{constructor(F,ne){this._observable=F,this._counter=0,this._hasChanged=!1;let ce={onWillAddFirstListener:()=>{F.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{F.removeObserver(this)}};ne||e(ce),this.emitter=new G(ce),ne&&ne.add(this.emitter)}beginUpdate(F){this._counter++}handlePossibleChange(F){}handleChange(F,ne){this._hasChanged=!0}endUpdate(F){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function B(U,F){return new H(U,F).emitter.event}i.fromObservable=B;function q(U){return(F,ne,ce)=>{let se=0,le=!1,oe={beginUpdate(){se++},endUpdate(){se--,se===0&&(U.reportChanges(),le&&(le=!1,F.call(ne)))},handlePossibleChange(){},handleChange(){le=!0}};U.addObserver(oe),U.reportChanges();let fe={dispose(){U.removeObserver(oe)}};return ce instanceof te?ce.add(fe):Array.isArray(ce)&&ce.push(fe),fe}}i.fromObservableLight=q})(Se||(Se={}));$Ae=class i{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${i._idPool++}`,i.all.add(this)}start(e){this._stopWatch=new Ar,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},Cqe=-1,eye=class i{static{this._idPool=1}constructor(e,t,n=(i._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let o=this._stacks.get(e.value)||0;this._stacks.set(e.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Uqe=new f1e;TK="Canceled";qc=class extends Error{constructor(){super(TK),this.name=this.message}};kK=class extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}},C6=class i extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof i)return e;let t=new i;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},fi=class i extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,i.prototype)}}});function zf(i,e){let t=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=i.apply(t,arguments)}finally{e()}else o=i.apply(t,arguments);return o}}var H_=D(()=>{});var hi,ld=D(()=>{(function(i){function e(_){return _&&typeof _=="object"&&typeof _[Symbol.iterator]=="function"}i.is=e;let t=Object.freeze([]);function n(){return t}i.empty=n;function*o(_){yield _}i.single=o;function r(_){return e(_)?_:o(_)}i.wrap=r;function s(_){return _||t}i.from=s;function*a(_){for(let E=_.length-1;E>=0;E--)yield _[E]}i.reverse=a;function l(_){return!_||_[Symbol.iterator]().next().done===!0}i.isEmpty=l;function c(_){return _[Symbol.iterator]().next().value}i.first=c;function u(_,E){let I=0;for(let T of _)if(E(T,I++))return!0;return!1}i.some=u;function d(_,E){for(let I of _)if(E(I))return I}i.find=d;function*h(_,E){for(let I of _)E(I)&&(yield I)}i.filter=h;function*f(_,E){let I=0;for(let T of _)yield E(T,I++)}i.map=f;function*p(_,E){let I=0;for(let T of _)yield*E(T,I++)}i.flatMap=p;function*g(..._){for(let E of _)yield*E}i.concat=g;function A(_,E,I){let T=I;for(let N of _)T=E(T,N);return T}i.reduce=A;function*v(_,E,I=_.length){for(E<0&&(E+=_.length),I<0?I+=_.length:I>_.length&&(I=_.length);E1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function gc(...i){let e=He(()=>Oi(i));return G9t(i,e),e}function He(i){let e=mk({dispose:zf(()=>{gk(e),i()})});return e}var j9t,pk,se,H,Vn,LK,NK,W_,de=D(()=>{H_();ld();j9t=!1,pk=null;if(j9t){let i="__is_disposable_tracked__";Q9t(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[i]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==H.None)try{e[i]=!0}catch{}}markAsDisposed(e){if(e&&e!==H.None)try{e[i]=!0}catch{}}markAsSingleton(e){}})}se=class i{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,mk(this)}dispose(){this._isDisposed||(gk(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Oi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return IK(e,this),this._isDisposed?i.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),IK(e,null))}},H=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new se,mk(this),IK(this._store,this)}dispose(){gk(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}},Vn=class{constructor(){this._isDisposed=!1,mk(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&IK(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,gk(this),this._value?.dispose(),this._value=void 0}},LK=class{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}},NK=class{constructor(e){this.object=e}dispose(){}},W_=class{constructor(){this._store=new Map,this._isDisposed=!1,mk(this)}dispose(){gk(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Oi(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}});var La,Br,Pp=D(()=>{La=class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}},Br=class{constructor(){this._first=La.Undefined,this._last=La.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===La.Undefined}clear(){let e=this._first;for(;e!==La.Undefined;){let t=e.next;e.prev=La.Undefined,e.next=La.Undefined,e=t}this._first=La.Undefined,this._last=La.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new La(e);if(this._first===La.Undefined)this._first=n,this._last=n;else if(t){let r=this._last;this._last=n,n.prev=r,r.next=n}else{let r=this._first;this._first=n,n.next=r,r.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==La.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==La.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==La.Undefined&&e.next!==La.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===La.Undefined&&e.next===La.Undefined?(this._first=La.Undefined,this._last=La.Undefined):e.next===La.Undefined?(this._last=this._last.prev,this._last.next=La.Undefined):e.prev===La.Undefined&&(this._first=this._first.next,this._first.prev=La.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==La.Undefined;)yield e.element,e=e.next}}});var q9t,xo,cd=D(()=>{q9t=globalThis.performance&&typeof globalThis.performance.now=="function",xo=class i{static create(e){return new i(e)}constructor(e){this._now=q9t&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}});var Y9t,Gqe,K9t,Ee,m1e,qqe,g1e,_6,b1e,A1e,pR,J9t,X9t,MK,q,Yqe,RK,Jm,mR,FK,OK,wb,S6,et=D(()=>{Tt();H_();de();Pp();cd();Y9t=!1,Gqe=!1,K9t=!1;(function(i){i.None=()=>H.None;function e(U){if(K9t){let{onDidAddListener:M}=U,ee=_6.create(),X=0;U.onDidAddListener=()=>{++X===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ee.print()),M?.()}}}function t(U,M){return f(U,()=>{},0,void 0,!0,void 0,M)}i.defer=t;function n(U){return(M,ee=null,X)=>{let Y=!1,$;return $=U(re=>{if(!Y)return $?$.dispose():Y=!0,M.call(ee,re)},null,X),Y&&$.dispose(),$}}i.once=n;function o(U,M){return i.once(i.filter(U,M))}i.onceIf=o;function r(U,M,ee){return d((X,Y=null,$)=>U(re=>X.call(Y,M(re)),null,$),ee)}i.map=r;function s(U,M,ee){return d((X,Y=null,$)=>U(re=>{M(re),X.call(Y,re)},null,$),ee)}i.forEach=s;function a(U,M,ee){return d((X,Y=null,$)=>U(re=>M(re)&&X.call(Y,re),null,$),ee)}i.filter=a;function l(U){return U}i.signal=l;function c(...U){return(M,ee=null,X)=>{let Y=gc(...U.map($=>$(re=>M.call(ee,re))));return h(Y,X)}}i.any=c;function u(U,M,ee,X){let Y=ee;return r(U,$=>(Y=M(Y,$),Y),X)}i.reduce=u;function d(U,M){let ee,X={onWillAddFirstListener(){ee=U(Y.fire,Y)},onDidRemoveLastListener(){ee?.dispose()}};M||e(X);let Y=new q(X);return M?.add(Y),Y.event}function h(U,M){return M instanceof Array?M.push(U):M&&M.add(U),U}function f(U,M,ee=100,X=!1,Y=!1,$,re){let ue,Ie,nt,mt=0,xt,wt={leakWarningThreshold:$,onWillAddFirstListener(){ue=U(Fe=>{mt++,Ie=M(Ie,Fe),X&&!nt&&(Ht.fire(Ie),Ie=void 0),xt=()=>{let zt=Ie;Ie=void 0,nt=void 0,(!X||mt>1)&&Ht.fire(zt),mt=0},typeof ee=="number"?(clearTimeout(nt),nt=setTimeout(xt,ee)):nt===void 0&&(nt=0,queueMicrotask(xt))})},onWillRemoveListener(){Y&&mt>0&&xt?.()},onDidRemoveLastListener(){xt=void 0,ue.dispose()}};re||e(wt);let Ht=new q(wt);return re?.add(Ht),Ht.event}i.debounce=f;function p(U,M=0,ee){return i.debounce(U,(X,Y)=>X?(X.push(Y),X):[Y],M,void 0,!0,void 0,ee)}i.accumulate=p;function g(U,M=(X,Y)=>X===Y,ee){let X=!0,Y;return a(U,$=>{let re=X||!M($,Y);return X=!1,Y=$,re},ee)}i.latch=g;function A(U,M,ee){return[i.filter(U,M,ee),i.filter(U,X=>!M(X),ee)]}i.split=A;function v(U,M=!1,ee=[],X){let Y=ee.slice(),$=U(Ie=>{Y?Y.push(Ie):ue.fire(Ie)});X&&X.add($);let re=()=>{Y?.forEach(Ie=>ue.fire(Ie)),Y=null},ue=new q({onWillAddFirstListener(){$||($=U(Ie=>ue.fire(Ie)),X&&X.add($))},onDidAddFirstListener(){Y&&(M?setTimeout(re):re())},onDidRemoveLastListener(){$&&$.dispose(),$=null}});return X&&X.add(ue),ue.event}i.buffer=v;function w(U,M){return(X,Y,$)=>{let re=M(new _);return U(function(ue){let Ie=re.evaluate(ue);Ie!==C&&X.call(Y,Ie)},void 0,$)}}i.chain=w;let C=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(M){return this.steps.push(M),this}forEach(M){return this.steps.push(ee=>(M(ee),ee)),this}filter(M){return this.steps.push(ee=>M(ee)?ee:C),this}reduce(M,ee){let X=ee;return this.steps.push(Y=>(X=M(X,Y),X)),this}latch(M=(ee,X)=>ee===X){let ee=!0,X;return this.steps.push(Y=>{let $=ee||!M(Y,X);return ee=!1,X=Y,$?Y:C}),this}evaluate(M){for(let ee of this.steps)if(M=ee(M),M===C)break;return M}}function E(U,M,ee=X=>X){let X=(...ue)=>re.fire(ee(...ue)),Y=()=>U.on(M,X),$=()=>U.removeListener(M,X),re=new q({onWillAddFirstListener:Y,onDidRemoveLastListener:$});return re.event}i.fromNodeEventEmitter=E;function I(U,M,ee=X=>X){let X=(...ue)=>re.fire(ee(...ue)),Y=()=>U.addEventListener(M,X),$=()=>U.removeEventListener(M,X),re=new q({onWillAddFirstListener:Y,onDidRemoveLastListener:$});return re.event}i.fromDOMEventEmitter=I;function T(U){return new Promise(M=>n(U)(M))}i.toPromise=T;function N(U){let M=new q;return U.then(ee=>{M.fire(ee)},()=>{M.fire(void 0)}).finally(()=>{M.dispose()}),M.event}i.fromPromise=N;function L(U,M){return U(ee=>M.fire(ee))}i.forward=L;function B(U,M,ee){return M(ee),U(X=>M(X))}i.runAndSubscribe=B;class z{constructor(M,ee){this._observable=M,this._counter=0,this._hasChanged=!1;let X={onWillAddFirstListener:()=>{M.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{M.removeObserver(this)}};ee||e(X),this.emitter=new q(X),ee&&ee.add(this.emitter)}beginUpdate(M){this._counter++}handlePossibleChange(M){}handleChange(M,ee){this._hasChanged=!0}endUpdate(M){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Q(U,M){return new z(U,M).emitter.event}i.fromObservable=Q;function Z(U){return(M,ee,X)=>{let Y=0,$=!1,re={beginUpdate(){Y++},endUpdate(){Y--,Y===0&&(U.reportChanges(),$&&($=!1,M.call(ee)))},handlePossibleChange(){},handleChange(){$=!0}};U.addObserver(re),U.reportChanges();let ue={dispose(){U.removeObserver(re)}};return X instanceof se?X.add(ue):Array.isArray(X)&&X.push(ue),ue}}i.fromObservableLight=Z})(Ee||(Ee={}));m1e=class i{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${i._idPool++}`,i.all.add(this)}start(e){this._stopWatch=new xo,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},qqe=-1,g1e=class i{static{this._idPool=1}constructor(e,t,n=(i._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let r=this._stacks.get(e.value)||0;this._stacks.set(e.value,r-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,o]of this._stacks)(!e||t{if(i instanceof RM)e(i);else for(let t=0;t{i.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(i.join(` -`)),i.length=0)},3e3),tY=new FinalizationRegistry(e=>{typeof e=="string"&&i.push(e)})}G=class{constructor(e){this._size=0,this._options=e,this._leakageMon=Cqe>0||this._options?.leakWarningThreshold?new eye(e?.onListenerError??pt,this._options?.leakWarningThreshold??Cqe):void 0,this._perfMon=this._options?._profName?new $Ae(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(xqe){let e=this._listeners;queueMicrotask(()=>{Kzt(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let c=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new iye(`${l}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0]);return(this._options?.onListenerError||pt)(u),W.None}if(this._disposed)return W.None;t&&(e=e.bind(t));let r=new RM(e),o,s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=R5.create(),o=this._leakageMon.check(r.stack,this._size+1)),xqe&&(r.stack=s??R5.create()),this._listeners?this._listeners instanceof RM?(this._deliveryQueue??=new iY,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Ve(()=>{tY?.unregister(a),o?.(),this._removeListener(r)});if(n instanceof te?n.add(a):Array.isArray(n)&&n.push(a),tY){let l=new Error().stack.split(` +`))}},b1e=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},A1e=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},pR=class{constructor(e){this.value=e}},J9t=2,X9t=(i,e)=>{if(i instanceof pR)e(i);else for(let t=0;t{i.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(i.join(` +`)),i.length=0)},3e3),MK=new FinalizationRegistry(e=>{typeof e=="string"&&i.push(e)})}q=class{constructor(e){this._size=0,this._options=e,this._leakageMon=qqe>0||this._options?.leakWarningThreshold?new g1e(e?.onListenerError??ft,this._options?.leakWarningThreshold??qqe):void 0,this._perfMon=this._options?._profName?new m1e(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Gqe){let e=this._listeners;queueMicrotask(()=>{X9t(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let c=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new A1e(`${l}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0]);return(this._options?.onListenerError||ft)(u),H.None}if(this._disposed)return H.None;t&&(e=e.bind(t));let o=new pR(e),r,s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=_6.create(),r=this._leakageMon.check(o.stack,this._size+1)),Gqe&&(o.stack=s??_6.create()),this._listeners?this._listeners instanceof pR?(this._deliveryQueue??=new RK,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=He(()=>{MK?.unregister(a),r?.(),this._removeListener(o)});if(n instanceof se?n.add(a):Array.isArray(n)&&n.push(a),MK){let l=new Error().stack.split(` `).slice(2,3).join(` -`).trim(),c=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(l);tY.register(a,c?.[2]??l,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*Yzt<=t.length){let o=0;for(let s=0;s0}},_qe=()=>new iY,iY=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Fm=class extends G{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Ro,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},FM=class extends Fm{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}},nY=class extends G{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}},rY=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new G({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){let t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),Ve(Tf(()=>{this.hasListeners&&this.unhook(t);let r=this.events.indexOf(t);this.events.splice(r,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(let e of this.events)e.listener?.dispose();this.events=[]}},ab=class{constructor(){this.data=[]}wrapEvent(e,t,n){return(r,o,s)=>e(a=>{let l=this.data[this.data.length-1];if(!t){l?l.buffers.push(()=>r.call(o,a)):r.call(o,a);return}let c=l;if(!c){r.call(o,t(n,a));return}c.items??=[],c.items.push(a),c.buffers.length===0&&l.buffers.push(()=>{c.reducedResult??=n?c.items.reduce(t,n):c.items.reduce(t),r.call(o,c.reducedResult)})},void 0,s)}bufferEvents(e){let t={buffers:new Array};this.data.push(t);let n=e();return this.data.pop(),t.buffers.forEach(r=>r()),n}},F5=class{constructor(){this.listening=!1,this.inputEvent=Se.None,this.inputEventListener=W.None,this.emitter=new G({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});function O5(i){let e=new Bi;return i.add({dispose(){e.cancel()}}),e.token}var Sqe,Ft,OM,Bi,sn=D(()=>{et();Sqe=Object.freeze(function(i,e){let t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}});(function(i){function e(t){return t===i.None||t===i.Cancelled||t instanceof OM?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}i.isCancellationToken=e,i.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Se.None}),i.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Sqe})})(Ft||(Ft={}));OM=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Sqe:(this._emitter||(this._emitter=new G),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Bi=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new OM),this._token}cancel(){this._token?this._token instanceof OM&&this._token.cancel():this._token=Ft.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof OM&&this._token.dispose():this._token=Ft.None}}});function Wr(i,e){let t=(e&65535)<<16>>>0;return(i|t)>>>0}var P5,oY,nye,rye,sye,Xzt,Zzt,$zt,eVt,sY,oye,lb,Ep=D(()=>{P5=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},oY=new P5,nye=new P5,rye=new P5,sye=new Array(230),Xzt={},Zzt=[],$zt=Object.create(null),eVt=Object.create(null),sY=[],oye=[];for(let i=0;i<=193;i++)sY[i]=-1;for(let i=0;i<=132;i++)oye[i]=-1;(function(){let e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],t=[],n=[];for(let r of e){let[o,s,a,l,c,u,d,h,f]=r;if(n[s]||(n[s]=!0,Zzt[s]=a,$zt[a]=s,eVt[a.toLowerCase()]=s,o&&(sY[s]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(oye[l]=s))),!t[l]){if(t[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);oY.define(l,c),nye.define(l,h||c),rye.define(l,f||h||c)}u&&(sye[u]=l),d&&(Xzt[d]=l)}oye[3]=46})();(function(i){function e(a){return oY.keyCodeToStr(a)}i.toString=e;function t(a){return oY.strToKeyCode(a)}i.fromString=t;function n(a){return nye.keyCodeToStr(a)}i.toUserSettingsUS=n;function r(a){return rye.keyCodeToStr(a)}i.toUserSettingsGeneral=r;function o(a){return nye.strToKeyCode(a)||rye.strToKeyCode(a)}i.fromUserSettings=o;function s(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return oY.keyCodeToStr(a)}i.toElectronAccelerator=s})(lb||(lb={}))});function B5(){return globalThis._VSCODE_NLS_MESSAGES}function qT(){return globalThis._VSCODE_NLS_LANGUAGE}var aye=D(()=>{});function aY(i,e){let t;return e.length===0?t=i:t=i.replace(/\{(\d+)\}/g,(n,r)=>{let o=r[0],s=e[o],a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),tVt&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function y(i,e,...t){return aY(typeof i=="number"?Eqe(i,e):e,t)}function Eqe(i,e){let t=B5()?.[i];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${i} !!!`)}return t}function Bt(i,e,...t){let n;typeof i=="number"?n=Eqe(i,e):n=e;let r=aY(n,t);return{value:r,original:e===n?r:aY(e,t)}}var tVt,Oe=D(()=>{aye();aye();tVt=qT()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function hY(){if(!kqe){kqe=!0;let i=new Uint8Array(2);i[0]=1,i[1]=2,Tqe=new Uint16Array(i.buffer)[0]===513}return Tqe}var PM,V5,H5,z5,iVt,Iqe,cye,nVt,uye,rVt,Lqe,lY,cY,Dqe,oVt,dw,hw,Om,Nqe,sVt,lye,Nr,qt,vo,Lh,cb,aVt,Mqe,Tu,uY,vA,Rqe,lVt,dY,Qa,Tqe,kqe,dye,Fqe,Oqe,Pqe,Bqe,Si=D(()=>{Oe();PM="en",V5=!1,H5=!1,z5=!1,iVt=!1,Iqe=!1,cye=!1,nVt=!1,uye=!1,rVt=!1,Lqe=!1,cY=PM,Dqe=PM,hw=globalThis;typeof hw.vscode<"u"&&typeof hw.vscode.process<"u"?Om=hw.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Om=process);Nqe=typeof Om?.versions?.electron=="string",sVt=Nqe&&Om?.type==="renderer";if(typeof Om=="object"){V5=Om.platform==="win32",H5=Om.platform==="darwin",z5=Om.platform==="linux",iVt=z5&&!!Om.env.SNAP&&!!Om.env.SNAP_REVISION,nVt=Nqe,rVt=!!Om.env.CI||!!Om.env.BUILD_ARTIFACTSTAGINGDIRECTORY,lY=PM,cY=PM;let i=Om.env.VSCODE_NLS_CONFIG;if(i)try{let e=JSON.parse(i);lY=e.userLocale,Dqe=e.osLocale,cY=e.resolvedLanguage||PM,oVt=e.languagePack?.translationsConfigFile}catch{}Iqe=!0}else typeof navigator=="object"&&!sVt?(dw=navigator.userAgent,V5=dw.indexOf("Windows")>=0,H5=dw.indexOf("Macintosh")>=0,uye=(dw.indexOf("Macintosh")>=0||dw.indexOf("iPad")>=0||dw.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,z5=dw.indexOf("Linux")>=0,Lqe=dw?.indexOf("Mobi")>=0,cye=!0,cY=qT()||PM,lY=navigator.language.toLowerCase(),Dqe=lY):console.error("Unable to resolve platform.");lye=0;H5?lye=1:V5?lye=3:z5&&(lye=2);Nr=V5,qt=H5,vo=z5,Lh=Iqe,cb=cye,aVt=cye&&typeof hw.importScripts=="function",Mqe=aVt?hw.origin:void 0,Tu=uye,uY=Lqe,vA=dw,Rqe=cY,lVt=typeof hw.postMessage=="function"&&!hw.importScripts,dY=(()=>{if(lVt){let i=[];hw.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=i.length;n{let n=++e;i.push({id:n,callback:t}),hw.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})(),Qa=H5||uye?2:V5?1:3,Tqe=!0,kqe=!1;dye=!!(vA&&vA.indexOf("Chrome")>=0),Fqe=!!(vA&&vA.indexOf("Firefox")>=0),Oqe=!!(!dye&&vA&&vA.indexOf("Safari")>=0),Pqe=!!(vA&&vA.indexOf("Edg/")>=0),Bqe=!!(vA&&vA.indexOf("Android")>=0)});var BM,hye,W5,U5,zqe,fye=D(()=>{Si();hye=globalThis.vscode;if(typeof hye<"u"&&typeof hye.process<"u"){let i=hye.process;BM={get platform(){return i.platform},get arch(){return i.arch},get env(){return i.env},cwd(){return i.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?BM={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:BM={get platform(){return Nr?"win32":qt?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};W5=BM.cwd,U5=BM.env,zqe=BM.platform});function mVt(i,e){if(i===null||typeof i!="object")throw new fY(e,"Object",i)}function Bl(i,e){if(typeof i!="string")throw new fY(e,"string",i)}function dr(i){return i===nd||i===Dp}function pye(i){return i===nd}function x_(i){return i>=uVt&&i<=hVt||i>=dVt&&i<=fVt}function pY(i,e,t,n){let r="",o=0,s=-1,a=0,l=0;for(let c=0;c<=i.length;++c){if(c2){let u=r.lastIndexOf(t);u===-1?(r="",o=0):(r=r.slice(0,u),o=r.length-1-r.lastIndexOf(t)),s=c,a=0;continue}else if(r.length!==0){r="",o=0,s=c,a=0;continue}}e&&(r+=r.length>0?`${t}..`:"..",o=2)}else r.length>0?r+=`${t}${i.slice(s+1,c)}`:r=i.slice(s+1,c),o=c-s-1;s=c,a=0}else l===C_&&a!==-1?++a:a=-1}return r}function gVt(i){return i?`${i[0]==="."?"":"."}${i}`:""}function Vqe(i,e){mVt(e,"pathObject");let t=e.dir||e.root,n=e.base||`${e.name||""}${gVt(e.ext)}`;return t?t===e.root?`${t}${n}`:`${t}${i}${n}`:n}var uVt,dVt,hVt,fVt,C_,nd,Dp,w_,pVt,fY,fw,Vd,bVt,yo,mY,Hqe,Wqe,Uqe,gY,ub,jqe,kf,H0=D(()=>{fye();uVt=65,dVt=97,hVt=90,fVt=122,C_=46,nd=47,Dp=92,w_=58,pVt=63,fY=class extends Error{constructor(e,t,n){let r;typeof t=="string"&&t.indexOf("not ")===0?(r="must not be",t=t.replace(/^not /,"")):r="must be";let o=e.indexOf(".")!==-1?"property":"argument",s=`The "${e}" ${o} ${r} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};fw=zqe==="win32";Vd={resolve(...i){let e="",t="",n=!1;for(let r=i.length-1;r>=-1;r--){let o;if(r>=0){if(o=i[r],Bl(o,`paths[${r}]`),o.length===0)continue}else e.length===0?o=W5():(o=U5[`=${e}`]||W5(),(o===void 0||o.slice(0,2).toLowerCase()!==e.toLowerCase()&&o.charCodeAt(2)===Dp)&&(o=`${e}\\`));let s=o.length,a=0,l="",c=!1,u=o.charCodeAt(0);if(s===1)dr(u)&&(a=1,c=!0);else if(dr(u))if(c=!0,dr(o.charCodeAt(1))){let d=2,h=d;for(;d2&&dr(o.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t=`${o.slice(a)}\\${t}`,n=c,c&&e.length>0)break}return t=pY(t,!n,"\\",dr),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(i){Bl(i,"path");let e=i.length;if(e===0)return".";let t=0,n,r=!1,o=i.charCodeAt(0);if(e===1)return pye(o)?"\\":i;if(dr(o))if(r=!0,dr(i.charCodeAt(1))){let a=2,l=a;for(;a2&&dr(i.charCodeAt(2))&&(r=!0,t=3));let s=t0&&dr(i.charCodeAt(e-1))&&(s+="\\"),n===void 0?r?`\\${s}`:s:r?`${n}\\${s}`:`${n}${s}`},isAbsolute(i){Bl(i,"path");let e=i.length;if(e===0)return!1;let t=i.charCodeAt(0);return dr(t)||e>2&&x_(t)&&i.charCodeAt(1)===w_&&dr(i.charCodeAt(2))},join(...i){if(i.length===0)return".";let e,t;for(let o=0;o0&&(e===void 0?e=t=s:e+=`\\${s}`)}if(e===void 0)return".";let n=!0,r=0;if(typeof t=="string"&&dr(t.charCodeAt(0))){++r;let o=t.length;o>1&&dr(t.charCodeAt(1))&&(++r,o>2&&(dr(t.charCodeAt(2))?++r:n=!1))}if(n){for(;r=2&&(e=`\\${e.slice(r)}`)}return Vd.normalize(e)},relative(i,e){if(Bl(i,"from"),Bl(e,"to"),i===e)return"";let t=Vd.resolve(i),n=Vd.resolve(e);if(t===n||(i=t.toLowerCase(),e=n.toLowerCase(),i===e))return"";let r=0;for(;rr&&i.charCodeAt(o-1)===Dp;)o--;let s=o-r,a=0;for(;aa&&e.charCodeAt(l-1)===Dp;)l--;let c=l-a,u=su){if(e.charCodeAt(a+h)===Dp)return n.slice(a+h+1);if(h===2)return n.slice(a+h)}s>u&&(i.charCodeAt(r+h)===Dp?d=h:h===2&&(d=3)),d===-1&&(d=0)}let f="";for(h=r+d+1;h<=o;++h)(h===o||i.charCodeAt(h)===Dp)&&(f+=f.length===0?"..":"\\..");return a+=d,f.length>0?`${f}${n.slice(a,l)}`:(n.charCodeAt(a)===Dp&&++a,n.slice(a,l))},toNamespacedPath(i){if(typeof i!="string"||i.length===0)return i;let e=Vd.resolve(i);if(e.length<=2)return i;if(e.charCodeAt(0)===Dp){if(e.charCodeAt(1)===Dp){let t=e.charCodeAt(2);if(t!==pVt&&t!==C_)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(x_(e.charCodeAt(0))&&e.charCodeAt(1)===w_&&e.charCodeAt(2)===Dp)return`\\\\?\\${e}`;return i},dirname(i){Bl(i,"path");let e=i.length;if(e===0)return".";let t=-1,n=0,r=i.charCodeAt(0);if(e===1)return dr(r)?i:".";if(dr(r)){if(t=n=1,dr(i.charCodeAt(1))){let a=2,l=a;for(;a2&&dr(i.charCodeAt(2))?3:2,n=t);let o=-1,s=!0;for(let a=e-1;a>=n;--a)if(dr(i.charCodeAt(a))){if(!s){o=a;break}}else s=!1;if(o===-1){if(t===-1)return".";o=t}return i.slice(0,o)},basename(i,e){e!==void 0&&Bl(e,"suffix"),Bl(i,"path");let t=0,n=-1,r=!0,o;if(i.length>=2&&x_(i.charCodeAt(0))&&i.charCodeAt(1)===w_&&(t=2),e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(o=i.length-1;o>=t;--o){let l=i.charCodeAt(o);if(dr(l)){if(!r){t=o+1;break}}else a===-1&&(r=!1,a=o+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=o):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(o=i.length-1;o>=t;--o)if(dr(i.charCodeAt(o))){if(!r){t=o+1;break}}else n===-1&&(r=!1,n=o+1);return n===-1?"":i.slice(t,n)},extname(i){Bl(i,"path");let e=0,t=-1,n=0,r=-1,o=!0,s=0;i.length>=2&&i.charCodeAt(1)===w_&&x_(i.charCodeAt(0))&&(e=n=2);for(let a=i.length-1;a>=e;--a){let l=i.charCodeAt(a);if(dr(l)){if(!o){n=a+1;break}continue}r===-1&&(o=!1,r=a+1),l===C_?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":i.slice(t,r)},format:Vqe.bind(null,"\\"),parse(i){Bl(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.length,n=0,r=i.charCodeAt(0);if(t===1)return dr(r)?(e.root=e.dir=i,e):(e.base=e.name=i,e);if(dr(r)){if(n=1,dr(i.charCodeAt(1))){let d=2,h=d;for(;d0&&(e.root=i.slice(0,n));let o=-1,s=n,a=-1,l=!0,c=i.length-1,u=0;for(;c>=n;--c){if(r=i.charCodeAt(c),dr(r)){if(!l){s=c+1;break}continue}a===-1&&(l=!1,a=c+1),r===C_?o===-1?o=c:u!==1&&(u=1):o!==-1&&(u=-1)}return a!==-1&&(o===-1||u===0||u===1&&o===a-1&&o===s+1?e.base=e.name=i.slice(s,a):(e.name=i.slice(s,o),e.base=i.slice(s,a),e.ext=i.slice(o,a))),s>0&&s!==n?e.dir=i.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},bVt=(()=>{if(fw){let i=/\\/g;return()=>{let e=W5().replace(i,"/");return e.slice(e.indexOf("/"))}}return()=>W5()})(),yo={resolve(...i){let e="",t=!1;for(let n=i.length-1;n>=-1&&!t;n--){let r=n>=0?i[n]:bVt();Bl(r,`paths[${n}]`),r.length!==0&&(e=`${r}/${e}`,t=r.charCodeAt(0)===nd)}return e=pY(e,!t,"/",pye),t?`/${e}`:e.length>0?e:"."},normalize(i){if(Bl(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===nd,t=i.charCodeAt(i.length-1)===nd;return i=pY(i,!e,"/",pye),i.length===0?e?"/":t?"./":".":(t&&(i+="/"),e?`/${i}`:i)},isAbsolute(i){return Bl(i,"path"),i.length>0&&i.charCodeAt(0)===nd},join(...i){if(i.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":yo.normalize(e)},relative(i,e){if(Bl(i,"from"),Bl(e,"to"),i===e||(i=yo.resolve(i),e=yo.resolve(e),i===e))return"";let t=1,n=i.length,r=n-t,o=1,s=e.length-o,a=ra){if(e.charCodeAt(o+c)===nd)return e.slice(o+c+1);if(c===0)return e.slice(o+c)}else r>a&&(i.charCodeAt(t+c)===nd?l=c:c===0&&(l=0));let u="";for(c=t+l+1;c<=n;++c)(c===n||i.charCodeAt(c)===nd)&&(u+=u.length===0?"..":"/..");return`${u}${e.slice(o+l)}`},toNamespacedPath(i){return i},dirname(i){if(Bl(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===nd,t=-1,n=!0;for(let r=i.length-1;r>=1;--r)if(i.charCodeAt(r)===nd){if(!n){t=r;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":i.slice(0,t)},basename(i,e){e!==void 0&&Bl(e,"ext"),Bl(i,"path");let t=0,n=-1,r=!0,o;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(o=i.length-1;o>=0;--o){let l=i.charCodeAt(o);if(l===nd){if(!r){t=o+1;break}}else a===-1&&(r=!1,a=o+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=o):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(o=i.length-1;o>=0;--o)if(i.charCodeAt(o)===nd){if(!r){t=o+1;break}}else n===-1&&(r=!1,n=o+1);return n===-1?"":i.slice(t,n)},extname(i){Bl(i,"path");let e=-1,t=0,n=-1,r=!0,o=0;for(let s=i.length-1;s>=0;--s){let a=i.charCodeAt(s);if(a===nd){if(!r){t=s+1;break}continue}n===-1&&(r=!1,n=s+1),a===C_?e===-1?e=s:o!==1&&(o=1):e!==-1&&(o=-1)}return e===-1||n===-1||o===0||o===1&&e===n-1&&e===t+1?"":i.slice(e,n)},format:Vqe.bind(null,"/"),parse(i){Bl(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.charCodeAt(0)===nd,n;t?(e.root="/",n=1):n=0;let r=-1,o=0,s=-1,a=!0,l=i.length-1,c=0;for(;l>=n;--l){let u=i.charCodeAt(l);if(u===nd){if(!a){o=l+1;break}continue}s===-1&&(a=!1,s=l+1),u===C_?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}if(s!==-1){let u=o===0&&t?1:o;r===-1||c===0||c===1&&r===s-1&&r===o+1?e.base=e.name=i.slice(u,s):(e.name=i.slice(u,r),e.base=i.slice(u,s),e.ext=i.slice(r,s))}return o>0?e.dir=i.slice(0,o-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};yo.win32=Vd.win32=Vd;yo.posix=Vd.posix=yo;mY=fw?Vd.normalize:yo.normalize,Hqe=fw?Vd.join:yo.join,Wqe=fw?Vd.resolve:yo.resolve,Uqe=fw?Vd.relative:yo.relative,gY=fw?Vd.dirname:yo.dirname,ub=fw?Vd.basename:yo.basename,jqe=fw?Vd.extname:yo.extname,kf=fw?Vd.sep:yo.sep});function wVt(i,e){if(!i.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!vVt.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!AVt.test(i.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(yVt.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function xVt(i,e){return!i&&!e?"file":i}function CVt(i,e){switch(i){case"https":case"http":case"file":e?e[0]!==W0&&(e=W0+e):e=W0;break}return e}function Qqe(i,e,t){let n,r=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47||t&&s===91||t&&s===93||t&&s===58)r!==-1&&(n+=encodeURIComponent(i.substring(r,o)),r=-1),n!==void 0&&(n+=i.charAt(o));else{n===void 0&&(n=i.substr(0,o));let a=Yqe[s];a!==void 0?(r!==-1&&(n+=encodeURIComponent(i.substring(r,o)),r=-1),n+=a):r===-1&&(r=o)}}return r!==-1&&(n+=encodeURIComponent(i.substring(r))),n!==void 0?n:i}function SVt(i){let e;for(let t=0;t1&&i.scheme==="file"?t=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?e?t=i.path.substr(1):t=i.path[1].toLowerCase()+i.path.substr(2):t=i.path,Nr&&(t=t.replace(/\//g,"\\")),t}function mye(i,e){let t=e?SVt:Qqe,n="",{scheme:r,authority:o,path:s,query:a,fragment:l}=i;if(r&&(n+=r,n+=":"),(o||r==="file")&&(n+=W0,n+=W0),o){let c=o.indexOf("@");if(c!==-1){let u=o.substr(0,c);o=o.substr(c+1),c=u.lastIndexOf(":"),c===-1?n+=t(u,!1,!1):(n+=t(u.substr(0,c),!1,!1),n+=":",n+=t(u.substr(c+1),!1,!0)),n+="@"}o=o.toLowerCase(),c=o.lastIndexOf(":"),c===-1?n+=t(o,!1,!0):(n+=t(o.substr(0,c),!1,!0),n+=o.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let c=s.charCodeAt(1);c>=65&&c<=90&&(s=`/${String.fromCharCode(c+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let c=s.charCodeAt(0);c>=65&&c<=90&&(s=`${String.fromCharCode(c+32)}:${s.substr(2)}`)}n+=t(s,!0,!1)}return a&&(n+="?",n+=t(a,!1,!1)),l&&(n+="#",n+=e?l:Qqe(l,!1,!1)),n}function Kqe(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+Kqe(i.substr(3)):i}}function vY(i){return i.match(Gqe)?i.replace(Gqe,e=>Kqe(e)):i}var vVt,AVt,yVt,Hs,W0,_Vt,Xe,qqe,__,Yqe,Gqe,mn=D(()=>{H0();Si();vVt=/^\w[\w\d+.-]*$/,AVt=/^\//,yVt=/^\/\//;Hs="",W0="/",_Vt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Xe=class i{static isUri(e){return e instanceof i?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,n,r,o,s=!1){typeof e=="object"?(this.scheme=e.scheme||Hs,this.authority=e.authority||Hs,this.path=e.path||Hs,this.query=e.query||Hs,this.fragment=e.fragment||Hs):(this.scheme=xVt(e,s),this.authority=t||Hs,this.path=CVt(this.scheme,n||Hs),this.query=r||Hs,this.fragment=o||Hs,wVt(this,s))}get fsPath(){return j5(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:s}=e;return t===void 0?t=this.scheme:t===null&&(t=Hs),n===void 0?n=this.authority:n===null&&(n=Hs),r===void 0?r=this.path:r===null&&(r=Hs),o===void 0?o=this.query:o===null&&(o=Hs),s===void 0?s=this.fragment:s===null&&(s=Hs),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&s===this.fragment?this:new __(t,n,r,o,s)}static parse(e,t=!1){let n=_Vt.exec(e);return n?new __(n[2]||Hs,vY(n[4]||Hs),vY(n[5]||Hs),vY(n[7]||Hs),vY(n[9]||Hs),t):new __(Hs,Hs,Hs,Hs,Hs)}static file(e){let t=Hs;if(Nr&&(e=e.replace(/\\/g,W0)),e[0]===W0&&e[1]===W0){let n=e.indexOf(W0,2);n===-1?(t=e.substring(2),e=W0):(t=e.substring(2,n),e=e.substring(n)||W0)}return new __("file",t,e,Hs,Hs)}static from(e,t){return new __(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return Nr&&e.scheme==="file"?n=i.file(Vd.join(j5(e,!0),...t)).path:n=yo.join(e.path,...t),e.with({path:n})}toString(e=!1){return mye(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof i)return e;{let t=new __(e);return t._formatted=e.external??null,t._fsPath=e._sep===qqe?e.fsPath??null:null,t}}else return e}},qqe=Nr?1:void 0,__=class extends Xe{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=j5(this,!1)),this._fsPath}toString(e=!1){return e?mye(this,!0):(this._formatted||(this._formatted=mye(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=qqe),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Yqe={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};Gqe=/(%[0-9A-Za-z][0-9A-Za-z])+/g});var K,Nt=D(()=>{K=class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{Nt();N=class i{constructor(e,t,n,r){e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return i.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return i.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return i.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return i.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return i.plusRange(this,e)}static plusRange(e,t){let n,r,o,s;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new i(n,r,o,s)}intersectRanges(e){return i.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,u=t.endColumn;return nc?(o=c,s=u):o===c&&(s=Math.min(s,u)),n>o||n===o&&r>s?null:new i(n,r,o,s)}equalsRange(e){return i.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return i.getEndPosition(this)}static getEndPosition(e){return new K(e.endLineNumber,e.endColumn)}getStartPosition(){return i.getStartPosition(this)}static getStartPosition(e){return new K(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new i(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new i(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return i.collapseToStart(this)}static collapseToStart(e){return new i(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return i.collapseToEnd(this)}static collapseToEnd(e){return new i(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new i(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}});var qe,Hn=D(()=>{Nt();We();qe=class i extends N{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return i.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new i(this.startLineNumber,this.startColumn,e,t):new i(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new K(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new K(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new i(e,t,this.endLineNumber,this.endColumn):new i(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new i(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new i(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n"u"}function If(i){return!ku(i)}function ku(i){return Ga(i)||i===null}function yi(i,e){if(!i)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function db(i){if(ku(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function S_(i){return typeof i=="function"}function Xqe(i,e){let t=Math.min(i.length,e.length);for(let n=0;n{});function R(i,e){if(Ea(e)){let t=bye[e];if(t===void 0)throw new Error(`${i} references an unknown codicon: ${e}`);e=t}return bye[i]=e,{id:i}}function yY(){return bye}var bye,Q5=D(()=>{gn();bye=Object.create(null)});var Zqe,$qe=D(()=>{Q5();Zqe={add:R("add",6e4),plus:R("plus",6e4),gistNew:R("gist-new",6e4),repoCreate:R("repo-create",6e4),lightbulb:R("lightbulb",60001),lightBulb:R("light-bulb",60001),repo:R("repo",60002),repoDelete:R("repo-delete",60002),gistFork:R("gist-fork",60003),repoForked:R("repo-forked",60003),gitPullRequest:R("git-pull-request",60004),gitPullRequestAbandoned:R("git-pull-request-abandoned",60004),recordKeys:R("record-keys",60005),keyboard:R("keyboard",60005),tag:R("tag",60006),gitPullRequestLabel:R("git-pull-request-label",60006),tagAdd:R("tag-add",60006),tagRemove:R("tag-remove",60006),person:R("person",60007),personFollow:R("person-follow",60007),personOutline:R("person-outline",60007),personFilled:R("person-filled",60007),gitBranch:R("git-branch",60008),gitBranchCreate:R("git-branch-create",60008),gitBranchDelete:R("git-branch-delete",60008),sourceControl:R("source-control",60008),mirror:R("mirror",60009),mirrorPublic:R("mirror-public",60009),star:R("star",60010),starAdd:R("star-add",60010),starDelete:R("star-delete",60010),starEmpty:R("star-empty",60010),comment:R("comment",60011),commentAdd:R("comment-add",60011),alert:R("alert",60012),warning:R("warning",60012),search:R("search",60013),searchSave:R("search-save",60013),logOut:R("log-out",60014),signOut:R("sign-out",60014),logIn:R("log-in",60015),signIn:R("sign-in",60015),eye:R("eye",60016),eyeUnwatch:R("eye-unwatch",60016),eyeWatch:R("eye-watch",60016),circleFilled:R("circle-filled",60017),primitiveDot:R("primitive-dot",60017),closeDirty:R("close-dirty",60017),debugBreakpoint:R("debug-breakpoint",60017),debugBreakpointDisabled:R("debug-breakpoint-disabled",60017),debugHint:R("debug-hint",60017),terminalDecorationSuccess:R("terminal-decoration-success",60017),primitiveSquare:R("primitive-square",60018),edit:R("edit",60019),pencil:R("pencil",60019),info:R("info",60020),issueOpened:R("issue-opened",60020),gistPrivate:R("gist-private",60021),gitForkPrivate:R("git-fork-private",60021),lock:R("lock",60021),mirrorPrivate:R("mirror-private",60021),close:R("close",60022),removeClose:R("remove-close",60022),x:R("x",60022),repoSync:R("repo-sync",60023),sync:R("sync",60023),clone:R("clone",60024),desktopDownload:R("desktop-download",60024),beaker:R("beaker",60025),microscope:R("microscope",60025),vm:R("vm",60026),deviceDesktop:R("device-desktop",60026),file:R("file",60027),fileText:R("file-text",60027),more:R("more",60028),ellipsis:R("ellipsis",60028),kebabHorizontal:R("kebab-horizontal",60028),mailReply:R("mail-reply",60029),reply:R("reply",60029),organization:R("organization",60030),organizationFilled:R("organization-filled",60030),organizationOutline:R("organization-outline",60030),newFile:R("new-file",60031),fileAdd:R("file-add",60031),newFolder:R("new-folder",60032),fileDirectoryCreate:R("file-directory-create",60032),trash:R("trash",60033),trashcan:R("trashcan",60033),history:R("history",60034),clock:R("clock",60034),folder:R("folder",60035),fileDirectory:R("file-directory",60035),symbolFolder:R("symbol-folder",60035),logoGithub:R("logo-github",60036),markGithub:R("mark-github",60036),github:R("github",60036),terminal:R("terminal",60037),console:R("console",60037),repl:R("repl",60037),zap:R("zap",60038),symbolEvent:R("symbol-event",60038),error:R("error",60039),stop:R("stop",60039),variable:R("variable",60040),symbolVariable:R("symbol-variable",60040),array:R("array",60042),symbolArray:R("symbol-array",60042),symbolModule:R("symbol-module",60043),symbolPackage:R("symbol-package",60043),symbolNamespace:R("symbol-namespace",60043),symbolObject:R("symbol-object",60043),symbolMethod:R("symbol-method",60044),symbolFunction:R("symbol-function",60044),symbolConstructor:R("symbol-constructor",60044),symbolBoolean:R("symbol-boolean",60047),symbolNull:R("symbol-null",60047),symbolNumeric:R("symbol-numeric",60048),symbolNumber:R("symbol-number",60048),symbolStructure:R("symbol-structure",60049),symbolStruct:R("symbol-struct",60049),symbolParameter:R("symbol-parameter",60050),symbolTypeParameter:R("symbol-type-parameter",60050),symbolKey:R("symbol-key",60051),symbolText:R("symbol-text",60051),symbolReference:R("symbol-reference",60052),goToFile:R("go-to-file",60052),symbolEnum:R("symbol-enum",60053),symbolValue:R("symbol-value",60053),symbolRuler:R("symbol-ruler",60054),symbolUnit:R("symbol-unit",60054),activateBreakpoints:R("activate-breakpoints",60055),archive:R("archive",60056),arrowBoth:R("arrow-both",60057),arrowDown:R("arrow-down",60058),arrowLeft:R("arrow-left",60059),arrowRight:R("arrow-right",60060),arrowSmallDown:R("arrow-small-down",60061),arrowSmallLeft:R("arrow-small-left",60062),arrowSmallRight:R("arrow-small-right",60063),arrowSmallUp:R("arrow-small-up",60064),arrowUp:R("arrow-up",60065),bell:R("bell",60066),bold:R("bold",60067),book:R("book",60068),bookmark:R("bookmark",60069),debugBreakpointConditionalUnverified:R("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:R("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:R("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:R("debug-breakpoint-data-unverified",60072),debugBreakpointData:R("debug-breakpoint-data",60073),debugBreakpointDataDisabled:R("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:R("debug-breakpoint-log-unverified",60074),debugBreakpointLog:R("debug-breakpoint-log",60075),debugBreakpointLogDisabled:R("debug-breakpoint-log-disabled",60075),briefcase:R("briefcase",60076),broadcast:R("broadcast",60077),browser:R("browser",60078),bug:R("bug",60079),calendar:R("calendar",60080),caseSensitive:R("case-sensitive",60081),check:R("check",60082),checklist:R("checklist",60083),chevronDown:R("chevron-down",60084),chevronLeft:R("chevron-left",60085),chevronRight:R("chevron-right",60086),chevronUp:R("chevron-up",60087),chromeClose:R("chrome-close",60088),chromeMaximize:R("chrome-maximize",60089),chromeMinimize:R("chrome-minimize",60090),chromeRestore:R("chrome-restore",60091),circleOutline:R("circle-outline",60092),circle:R("circle",60092),debugBreakpointUnverified:R("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:R("terminal-decoration-incomplete",60092),circleSlash:R("circle-slash",60093),circuitBoard:R("circuit-board",60094),clearAll:R("clear-all",60095),clippy:R("clippy",60096),closeAll:R("close-all",60097),cloudDownload:R("cloud-download",60098),cloudUpload:R("cloud-upload",60099),code:R("code",60100),collapseAll:R("collapse-all",60101),colorMode:R("color-mode",60102),commentDiscussion:R("comment-discussion",60103),creditCard:R("credit-card",60105),dash:R("dash",60108),dashboard:R("dashboard",60109),database:R("database",60110),debugContinue:R("debug-continue",60111),debugDisconnect:R("debug-disconnect",60112),debugPause:R("debug-pause",60113),debugRestart:R("debug-restart",60114),debugStart:R("debug-start",60115),debugStepInto:R("debug-step-into",60116),debugStepOut:R("debug-step-out",60117),debugStepOver:R("debug-step-over",60118),debugStop:R("debug-stop",60119),debug:R("debug",60120),deviceCameraVideo:R("device-camera-video",60121),deviceCamera:R("device-camera",60122),deviceMobile:R("device-mobile",60123),diffAdded:R("diff-added",60124),diffIgnored:R("diff-ignored",60125),diffModified:R("diff-modified",60126),diffRemoved:R("diff-removed",60127),diffRenamed:R("diff-renamed",60128),diff:R("diff",60129),diffSidebyside:R("diff-sidebyside",60129),discard:R("discard",60130),editorLayout:R("editor-layout",60131),emptyWindow:R("empty-window",60132),exclude:R("exclude",60133),extensions:R("extensions",60134),eyeClosed:R("eye-closed",60135),fileBinary:R("file-binary",60136),fileCode:R("file-code",60137),fileMedia:R("file-media",60138),filePdf:R("file-pdf",60139),fileSubmodule:R("file-submodule",60140),fileSymlinkDirectory:R("file-symlink-directory",60141),fileSymlinkFile:R("file-symlink-file",60142),fileZip:R("file-zip",60143),files:R("files",60144),filter:R("filter",60145),flame:R("flame",60146),foldDown:R("fold-down",60147),foldUp:R("fold-up",60148),fold:R("fold",60149),folderActive:R("folder-active",60150),folderOpened:R("folder-opened",60151),gear:R("gear",60152),gift:R("gift",60153),gistSecret:R("gist-secret",60154),gist:R("gist",60155),gitCommit:R("git-commit",60156),gitCompare:R("git-compare",60157),compareChanges:R("compare-changes",60157),gitMerge:R("git-merge",60158),githubAction:R("github-action",60159),githubAlt:R("github-alt",60160),globe:R("globe",60161),grabber:R("grabber",60162),graph:R("graph",60163),gripper:R("gripper",60164),heart:R("heart",60165),home:R("home",60166),horizontalRule:R("horizontal-rule",60167),hubot:R("hubot",60168),inbox:R("inbox",60169),issueReopened:R("issue-reopened",60171),issues:R("issues",60172),italic:R("italic",60173),jersey:R("jersey",60174),json:R("json",60175),kebabVertical:R("kebab-vertical",60176),key:R("key",60177),law:R("law",60178),lightbulbAutofix:R("lightbulb-autofix",60179),linkExternal:R("link-external",60180),link:R("link",60181),listOrdered:R("list-ordered",60182),listUnordered:R("list-unordered",60183),liveShare:R("live-share",60184),loading:R("loading",60185),location:R("location",60186),mailRead:R("mail-read",60187),mail:R("mail",60188),markdown:R("markdown",60189),megaphone:R("megaphone",60190),mention:R("mention",60191),milestone:R("milestone",60192),gitPullRequestMilestone:R("git-pull-request-milestone",60192),mortarBoard:R("mortar-board",60193),move:R("move",60194),multipleWindows:R("multiple-windows",60195),mute:R("mute",60196),noNewline:R("no-newline",60197),note:R("note",60198),octoface:R("octoface",60199),openPreview:R("open-preview",60200),package:R("package",60201),paintcan:R("paintcan",60202),pin:R("pin",60203),play:R("play",60204),run:R("run",60204),plug:R("plug",60205),preserveCase:R("preserve-case",60206),preview:R("preview",60207),project:R("project",60208),pulse:R("pulse",60209),question:R("question",60210),quote:R("quote",60211),radioTower:R("radio-tower",60212),reactions:R("reactions",60213),references:R("references",60214),refresh:R("refresh",60215),regex:R("regex",60216),remoteExplorer:R("remote-explorer",60217),remote:R("remote",60218),remove:R("remove",60219),replaceAll:R("replace-all",60220),replace:R("replace",60221),repoClone:R("repo-clone",60222),repoForcePush:R("repo-force-push",60223),repoPull:R("repo-pull",60224),repoPush:R("repo-push",60225),report:R("report",60226),requestChanges:R("request-changes",60227),rocket:R("rocket",60228),rootFolderOpened:R("root-folder-opened",60229),rootFolder:R("root-folder",60230),rss:R("rss",60231),ruby:R("ruby",60232),saveAll:R("save-all",60233),saveAs:R("save-as",60234),save:R("save",60235),screenFull:R("screen-full",60236),screenNormal:R("screen-normal",60237),searchStop:R("search-stop",60238),server:R("server",60240),settingsGear:R("settings-gear",60241),settings:R("settings",60242),shield:R("shield",60243),smiley:R("smiley",60244),sortPrecedence:R("sort-precedence",60245),splitHorizontal:R("split-horizontal",60246),splitVertical:R("split-vertical",60247),squirrel:R("squirrel",60248),starFull:R("star-full",60249),starHalf:R("star-half",60250),symbolClass:R("symbol-class",60251),symbolColor:R("symbol-color",60252),symbolConstant:R("symbol-constant",60253),symbolEnumMember:R("symbol-enum-member",60254),symbolField:R("symbol-field",60255),symbolFile:R("symbol-file",60256),symbolInterface:R("symbol-interface",60257),symbolKeyword:R("symbol-keyword",60258),symbolMisc:R("symbol-misc",60259),symbolOperator:R("symbol-operator",60260),symbolProperty:R("symbol-property",60261),wrench:R("wrench",60261),wrenchSubaction:R("wrench-subaction",60261),symbolSnippet:R("symbol-snippet",60262),tasklist:R("tasklist",60263),telescope:R("telescope",60264),textSize:R("text-size",60265),threeBars:R("three-bars",60266),thumbsdown:R("thumbsdown",60267),thumbsup:R("thumbsup",60268),tools:R("tools",60269),triangleDown:R("triangle-down",60270),triangleLeft:R("triangle-left",60271),triangleRight:R("triangle-right",60272),triangleUp:R("triangle-up",60273),twitter:R("twitter",60274),unfold:R("unfold",60275),unlock:R("unlock",60276),unmute:R("unmute",60277),unverified:R("unverified",60278),verified:R("verified",60279),versions:R("versions",60280),vmActive:R("vm-active",60281),vmOutline:R("vm-outline",60282),vmRunning:R("vm-running",60283),watch:R("watch",60284),whitespace:R("whitespace",60285),wholeWord:R("whole-word",60286),window:R("window",60287),wordWrap:R("word-wrap",60288),zoomIn:R("zoom-in",60289),zoomOut:R("zoom-out",60290),listFilter:R("list-filter",60291),listFlat:R("list-flat",60292),listSelection:R("list-selection",60293),selection:R("selection",60293),listTree:R("list-tree",60294),debugBreakpointFunctionUnverified:R("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:R("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:R("debug-breakpoint-function-disabled",60296),debugStackframeActive:R("debug-stackframe-active",60297),circleSmallFilled:R("circle-small-filled",60298),debugStackframeDot:R("debug-stackframe-dot",60298),terminalDecorationMark:R("terminal-decoration-mark",60298),debugStackframe:R("debug-stackframe",60299),debugStackframeFocused:R("debug-stackframe-focused",60299),debugBreakpointUnsupported:R("debug-breakpoint-unsupported",60300),symbolString:R("symbol-string",60301),debugReverseContinue:R("debug-reverse-continue",60302),debugStepBack:R("debug-step-back",60303),debugRestartFrame:R("debug-restart-frame",60304),debugAlt:R("debug-alt",60305),callIncoming:R("call-incoming",60306),callOutgoing:R("call-outgoing",60307),menu:R("menu",60308),expandAll:R("expand-all",60309),feedback:R("feedback",60310),gitPullRequestReviewer:R("git-pull-request-reviewer",60310),groupByRefType:R("group-by-ref-type",60311),ungroupByRefType:R("ungroup-by-ref-type",60312),account:R("account",60313),gitPullRequestAssignee:R("git-pull-request-assignee",60313),bellDot:R("bell-dot",60314),debugConsole:R("debug-console",60315),library:R("library",60316),output:R("output",60317),runAll:R("run-all",60318),syncIgnored:R("sync-ignored",60319),pinned:R("pinned",60320),githubInverted:R("github-inverted",60321),serverProcess:R("server-process",60322),serverEnvironment:R("server-environment",60323),pass:R("pass",60324),issueClosed:R("issue-closed",60324),stopCircle:R("stop-circle",60325),playCircle:R("play-circle",60326),record:R("record",60327),debugAltSmall:R("debug-alt-small",60328),vmConnect:R("vm-connect",60329),cloud:R("cloud",60330),merge:R("merge",60331),export:R("export",60332),graphLeft:R("graph-left",60333),magnet:R("magnet",60334),notebook:R("notebook",60335),redo:R("redo",60336),checkAll:R("check-all",60337),pinnedDirty:R("pinned-dirty",60338),passFilled:R("pass-filled",60339),circleLargeFilled:R("circle-large-filled",60340),circleLarge:R("circle-large",60341),circleLargeOutline:R("circle-large-outline",60341),combine:R("combine",60342),gather:R("gather",60342),table:R("table",60343),variableGroup:R("variable-group",60344),typeHierarchy:R("type-hierarchy",60345),typeHierarchySub:R("type-hierarchy-sub",60346),typeHierarchySuper:R("type-hierarchy-super",60347),gitPullRequestCreate:R("git-pull-request-create",60348),runAbove:R("run-above",60349),runBelow:R("run-below",60350),notebookTemplate:R("notebook-template",60351),debugRerun:R("debug-rerun",60352),workspaceTrusted:R("workspace-trusted",60353),workspaceUntrusted:R("workspace-untrusted",60354),workspaceUnknown:R("workspace-unknown",60355),terminalCmd:R("terminal-cmd",60356),terminalDebian:R("terminal-debian",60357),terminalLinux:R("terminal-linux",60358),terminalPowershell:R("terminal-powershell",60359),terminalTmux:R("terminal-tmux",60360),terminalUbuntu:R("terminal-ubuntu",60361),terminalBash:R("terminal-bash",60362),arrowSwap:R("arrow-swap",60363),copy:R("copy",60364),personAdd:R("person-add",60365),filterFilled:R("filter-filled",60366),wand:R("wand",60367),debugLineByLine:R("debug-line-by-line",60368),inspect:R("inspect",60369),layers:R("layers",60370),layersDot:R("layers-dot",60371),layersActive:R("layers-active",60372),compass:R("compass",60373),compassDot:R("compass-dot",60374),compassActive:R("compass-active",60375),azure:R("azure",60376),issueDraft:R("issue-draft",60377),gitPullRequestClosed:R("git-pull-request-closed",60378),gitPullRequestDraft:R("git-pull-request-draft",60379),debugAll:R("debug-all",60380),debugCoverage:R("debug-coverage",60381),runErrors:R("run-errors",60382),folderLibrary:R("folder-library",60383),debugContinueSmall:R("debug-continue-small",60384),beakerStop:R("beaker-stop",60385),graphLine:R("graph-line",60386),graphScatter:R("graph-scatter",60387),pieChart:R("pie-chart",60388),bracket:R("bracket",60175),bracketDot:R("bracket-dot",60389),bracketError:R("bracket-error",60390),lockSmall:R("lock-small",60391),azureDevops:R("azure-devops",60392),verifiedFilled:R("verified-filled",60393),newline:R("newline",60394),layout:R("layout",60395),layoutActivitybarLeft:R("layout-activitybar-left",60396),layoutActivitybarRight:R("layout-activitybar-right",60397),layoutPanelLeft:R("layout-panel-left",60398),layoutPanelCenter:R("layout-panel-center",60399),layoutPanelJustify:R("layout-panel-justify",60400),layoutPanelRight:R("layout-panel-right",60401),layoutPanel:R("layout-panel",60402),layoutSidebarLeft:R("layout-sidebar-left",60403),layoutSidebarRight:R("layout-sidebar-right",60404),layoutStatusbar:R("layout-statusbar",60405),layoutMenubar:R("layout-menubar",60406),layoutCentered:R("layout-centered",60407),target:R("target",60408),indent:R("indent",60409),recordSmall:R("record-small",60410),errorSmall:R("error-small",60411),terminalDecorationError:R("terminal-decoration-error",60411),arrowCircleDown:R("arrow-circle-down",60412),arrowCircleLeft:R("arrow-circle-left",60413),arrowCircleRight:R("arrow-circle-right",60414),arrowCircleUp:R("arrow-circle-up",60415),layoutSidebarRightOff:R("layout-sidebar-right-off",60416),layoutPanelOff:R("layout-panel-off",60417),layoutSidebarLeftOff:R("layout-sidebar-left-off",60418),blank:R("blank",60419),heartFilled:R("heart-filled",60420),map:R("map",60421),mapHorizontal:R("map-horizontal",60421),foldHorizontal:R("fold-horizontal",60421),mapFilled:R("map-filled",60422),mapHorizontalFilled:R("map-horizontal-filled",60422),foldHorizontalFilled:R("fold-horizontal-filled",60422),circleSmall:R("circle-small",60423),bellSlash:R("bell-slash",60424),bellSlashDot:R("bell-slash-dot",60425),commentUnresolved:R("comment-unresolved",60426),gitPullRequestGoToChanges:R("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:R("git-pull-request-new-changes",60428),searchFuzzy:R("search-fuzzy",60429),commentDraft:R("comment-draft",60430),send:R("send",60431),sparkle:R("sparkle",60432),insert:R("insert",60433),mic:R("mic",60434),thumbsdownFilled:R("thumbsdown-filled",60435),thumbsupFilled:R("thumbsup-filled",60436),coffee:R("coffee",60437),snake:R("snake",60438),game:R("game",60439),vr:R("vr",60440),chip:R("chip",60441),piano:R("piano",60442),music:R("music",60443),micFilled:R("mic-filled",60444),repoFetch:R("repo-fetch",60445),copilot:R("copilot",60446),lightbulbSparkle:R("lightbulb-sparkle",60447),robot:R("robot",60448),sparkleFilled:R("sparkle-filled",60449),diffSingle:R("diff-single",60450),diffMultiple:R("diff-multiple",60451),surroundWith:R("surround-with",60452),share:R("share",60453),gitStash:R("git-stash",60454),gitStashApply:R("git-stash-apply",60455),gitStashPop:R("git-stash-pop",60456),vscode:R("vscode",60457),vscodeInsiders:R("vscode-insiders",60458),codeOss:R("code-oss",60459),runCoverage:R("run-coverage",60460),runAllCoverage:R("run-all-coverage",60461),coverage:R("coverage",60462),githubProject:R("github-project",60463),mapVertical:R("map-vertical",60464),foldVertical:R("fold-vertical",60464),mapVerticalFilled:R("map-vertical-filled",60465),foldVerticalFilled:R("fold-vertical-filled",60465),goToSearch:R("go-to-search",60466),percentage:R("percentage",60467),sortPercentage:R("sort-percentage",60467),attach:R("attach",60468)}});var TVt,Ee,er=D(()=>{Q5();$qe();TVt={dialogError:R("dialog-error","error"),dialogWarning:R("dialog-warning","warning"),dialogInfo:R("dialog-info","info"),dialogClose:R("dialog-close","close"),treeItemExpanded:R("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:R("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:R("tree-filter-on-type-off","list-selection"),treeFilterClear:R("tree-filter-clear","close"),treeItemLoading:R("tree-item-loading","loading"),menuSelection:R("menu-selection","check"),menuSubmenu:R("menu-submenu","chevron-right"),menuBarMore:R("menubar-more","more"),scrollbarButtonLeft:R("scrollbar-button-left","triangle-left"),scrollbarButtonRight:R("scrollbar-button-right","triangle-right"),scrollbarButtonUp:R("scrollbar-button-up","triangle-up"),scrollbarButtonDown:R("scrollbar-button-down","triangle-down"),toolBarMore:R("toolbar-more","more"),quickInputBack:R("quick-input-back","arrow-left"),dropDownButton:R("drop-down-button",60084),symbolCustomColor:R("symbol-customcolor",60252),exportIcon:R("export",60332),workspaceUnspecified:R("workspace-unspecified",60355),newLine:R("newline",60394),thumbsDownFilled:R("thumbsdown-filled",60435),thumbsUpFilled:R("thumbsup-filled",60436),gitFetch:R("git-fetch",60445),lightbulbSparkleAutofix:R("lightbulb-sparkle-autofix",60447),debugBreakpointPending:R("debug-breakpoint-pending",60377)},Ee={...Zqe,...TVt}});var G5,vye,eYe=D(()=>{et();ae();G5=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),Ve(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();let n=new vye(this,e,t);return this._factories.set(e,n),Ve(()=>{let r=this._factories.get(e);!r||r!==n||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){let t=this.get(e);if(t)return t;let n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},vye=class extends W{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}});function tYe(i){return i&&Xe.isUri(i.uri)&&N.isIRange(i.range)&&(N.isIRange(i.originSelectionRange)||N.isIRange(i.targetSelectionRange))}function iYe(i,e){return y("symbolAriaLabel","{0} ({1})",i,kVt[e])}var U0,E_,pw,Hd,YT,Lf,zM,KT,Pm,D_,kVt,VM,yA,wY,JT,xY,q5,CY,Wn,K5,Y5,tr=D(()=>{er();mn();We();eYe();Oe();U0=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},E_=class{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}},pw=class{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}};(function(i){i[i.Increase=0]="Increase",i[i.Decrease=1]="Decrease"})(Hd||(Hd={}));(function(i){let e=new Map;e.set(0,Ee.symbolMethod),e.set(1,Ee.symbolFunction),e.set(2,Ee.symbolConstructor),e.set(3,Ee.symbolField),e.set(4,Ee.symbolVariable),e.set(5,Ee.symbolClass),e.set(6,Ee.symbolStruct),e.set(7,Ee.symbolInterface),e.set(8,Ee.symbolModule),e.set(9,Ee.symbolProperty),e.set(10,Ee.symbolEvent),e.set(11,Ee.symbolOperator),e.set(12,Ee.symbolUnit),e.set(13,Ee.symbolValue),e.set(15,Ee.symbolEnum),e.set(14,Ee.symbolConstant),e.set(15,Ee.symbolEnum),e.set(16,Ee.symbolEnumMember),e.set(17,Ee.symbolKeyword),e.set(27,Ee.symbolSnippet),e.set(18,Ee.symbolText),e.set(19,Ee.symbolColor),e.set(20,Ee.symbolFile),e.set(21,Ee.symbolReference),e.set(22,Ee.symbolCustomColor),e.set(23,Ee.symbolFolder),e.set(24,Ee.symbolTypeParameter),e.set(25,Ee.account),e.set(26,Ee.issues);function t(o){let s=e.get(o);return s||(console.info("No codicon found for CompletionItemKind "+o),s=Ee.symbolProperty),s}i.toIcon=t;let n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function r(o,s){let a=n.get(o);return typeof a>"u"&&!s&&(a=9),a}i.fromString=r})(YT||(YT={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(Lf||(Lf={}));zM=class{constructor(e,t,n,r){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=r}equals(e){return N.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}};(function(i){i[i.Automatic=0]="Automatic",i[i.PasteAs=1]="PasteAs"})(KT||(KT={}));(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(Pm||(Pm={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(D_||(D_={}));kVt={17:y("Array","array"),16:y("Boolean","boolean"),4:y("Class","class"),13:y("Constant","constant"),8:y("Constructor","constructor"),9:y("Enum","enumeration"),21:y("EnumMember","enumeration member"),23:y("Event","event"),7:y("Field","field"),0:y("File","file"),11:y("Function","function"),10:y("Interface","interface"),19:y("Key","key"),5:y("Method","method"),1:y("Module","module"),2:y("Namespace","namespace"),20:y("Null","null"),15:y("Number","number"),18:y("Object","object"),24:y("Operator","operator"),3:y("Package","package"),6:y("Property","property"),14:y("String","string"),22:y("Struct","struct"),25:y("TypeParameter","type parameter"),12:y("Variable","variable")};(function(i){let e=new Map;e.set(0,Ee.symbolFile),e.set(1,Ee.symbolModule),e.set(2,Ee.symbolNamespace),e.set(3,Ee.symbolPackage),e.set(4,Ee.symbolClass),e.set(5,Ee.symbolMethod),e.set(6,Ee.symbolProperty),e.set(7,Ee.symbolField),e.set(8,Ee.symbolConstructor),e.set(9,Ee.symbolEnum),e.set(10,Ee.symbolInterface),e.set(11,Ee.symbolFunction),e.set(12,Ee.symbolVariable),e.set(13,Ee.symbolConstant),e.set(14,Ee.symbolString),e.set(15,Ee.symbolNumber),e.set(16,Ee.symbolBoolean),e.set(17,Ee.symbolArray),e.set(18,Ee.symbolObject),e.set(19,Ee.symbolKey),e.set(20,Ee.symbolNull),e.set(21,Ee.symbolEnumMember),e.set(22,Ee.symbolStruct),e.set(23,Ee.symbolEvent),e.set(24,Ee.symbolOperator),e.set(25,Ee.symbolTypeParameter);function t(n){let r=e.get(n);return r||(console.info("No codicon found for SymbolKind "+n),r=Ee.symbolProperty),r}i.toIcon=t})(VM||(VM={}));yA=class i{static{this.Comment=new i("comment")}static{this.Imports=new i("imports")}static{this.Region=new i("region")}static fromValue(e){switch(e){case"comment":return i.Comment;case"imports":return i.Imports;case"region":return i.Region}return new i(e)}constructor(e){this.value=e}};(function(i){i[i.AIGenerated=1]="AIGenerated"})(wY||(wY={}));(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(JT||(JT={}));(function(i){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}i.is=e})(xY||(xY={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(q5||(q5={}));CY=class{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}},Wn=new G5,K5=new G5;(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(Y5||(Y5={}))});var _Y,SY,EY,DY,TY,kY,IY,LY,NY,MY,RY,FY,OY,PY,BY,zY,VY,HY,WY,UY,jY,wA,J5,QY,GY,qY,YY,KY,JY,XY,ZY,$Y,eK,tK,iK,nK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,ZT=D(()=>{(function(i){i[i.Unknown=0]="Unknown",i[i.Disabled=1]="Disabled",i[i.Enabled=2]="Enabled"})(_Y||(_Y={}));(function(i){i[i.Invoke=1]="Invoke",i[i.Auto=2]="Auto"})(SY||(SY={}));(function(i){i[i.None=0]="None",i[i.KeepWhitespace=1]="KeepWhitespace",i[i.InsertAsSnippet=4]="InsertAsSnippet"})(EY||(EY={}));(function(i){i[i.Method=0]="Method",i[i.Function=1]="Function",i[i.Constructor=2]="Constructor",i[i.Field=3]="Field",i[i.Variable=4]="Variable",i[i.Class=5]="Class",i[i.Struct=6]="Struct",i[i.Interface=7]="Interface",i[i.Module=8]="Module",i[i.Property=9]="Property",i[i.Event=10]="Event",i[i.Operator=11]="Operator",i[i.Unit=12]="Unit",i[i.Value=13]="Value",i[i.Constant=14]="Constant",i[i.Enum=15]="Enum",i[i.EnumMember=16]="EnumMember",i[i.Keyword=17]="Keyword",i[i.Text=18]="Text",i[i.Color=19]="Color",i[i.File=20]="File",i[i.Reference=21]="Reference",i[i.Customcolor=22]="Customcolor",i[i.Folder=23]="Folder",i[i.TypeParameter=24]="TypeParameter",i[i.User=25]="User",i[i.Issue=26]="Issue",i[i.Snippet=27]="Snippet"})(DY||(DY={}));(function(i){i[i.Deprecated=1]="Deprecated"})(TY||(TY={}));(function(i){i[i.Invoke=0]="Invoke",i[i.TriggerCharacter=1]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(kY||(kY={}));(function(i){i[i.EXACT=0]="EXACT",i[i.ABOVE=1]="ABOVE",i[i.BELOW=2]="BELOW"})(IY||(IY={}));(function(i){i[i.NotSet=0]="NotSet",i[i.ContentFlush=1]="ContentFlush",i[i.RecoverFromMarkers=2]="RecoverFromMarkers",i[i.Explicit=3]="Explicit",i[i.Paste=4]="Paste",i[i.Undo=5]="Undo",i[i.Redo=6]="Redo"})(LY||(LY={}));(function(i){i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(NY||(NY={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(MY||(MY={}));(function(i){i[i.None=0]="None",i[i.Keep=1]="Keep",i[i.Brackets=2]="Brackets",i[i.Advanced=3]="Advanced",i[i.Full=4]="Full"})(RY||(RY={}));(function(i){i[i.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",i[i.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",i[i.accessibilitySupport=2]="accessibilitySupport",i[i.accessibilityPageSize=3]="accessibilityPageSize",i[i.ariaLabel=4]="ariaLabel",i[i.ariaRequired=5]="ariaRequired",i[i.autoClosingBrackets=6]="autoClosingBrackets",i[i.autoClosingComments=7]="autoClosingComments",i[i.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",i[i.autoClosingDelete=9]="autoClosingDelete",i[i.autoClosingOvertype=10]="autoClosingOvertype",i[i.autoClosingQuotes=11]="autoClosingQuotes",i[i.autoIndent=12]="autoIndent",i[i.automaticLayout=13]="automaticLayout",i[i.autoSurround=14]="autoSurround",i[i.bracketPairColorization=15]="bracketPairColorization",i[i.guides=16]="guides",i[i.codeLens=17]="codeLens",i[i.codeLensFontFamily=18]="codeLensFontFamily",i[i.codeLensFontSize=19]="codeLensFontSize",i[i.colorDecorators=20]="colorDecorators",i[i.colorDecoratorsLimit=21]="colorDecoratorsLimit",i[i.columnSelection=22]="columnSelection",i[i.comments=23]="comments",i[i.contextmenu=24]="contextmenu",i[i.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",i[i.cursorBlinking=26]="cursorBlinking",i[i.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",i[i.cursorStyle=28]="cursorStyle",i[i.cursorSurroundingLines=29]="cursorSurroundingLines",i[i.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",i[i.cursorWidth=31]="cursorWidth",i[i.disableLayerHinting=32]="disableLayerHinting",i[i.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",i[i.domReadOnly=34]="domReadOnly",i[i.dragAndDrop=35]="dragAndDrop",i[i.dropIntoEditor=36]="dropIntoEditor",i[i.emptySelectionClipboard=37]="emptySelectionClipboard",i[i.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",i[i.extraEditorClassName=39]="extraEditorClassName",i[i.fastScrollSensitivity=40]="fastScrollSensitivity",i[i.find=41]="find",i[i.fixedOverflowWidgets=42]="fixedOverflowWidgets",i[i.folding=43]="folding",i[i.foldingStrategy=44]="foldingStrategy",i[i.foldingHighlight=45]="foldingHighlight",i[i.foldingImportsByDefault=46]="foldingImportsByDefault",i[i.foldingMaximumRegions=47]="foldingMaximumRegions",i[i.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",i[i.fontFamily=49]="fontFamily",i[i.fontInfo=50]="fontInfo",i[i.fontLigatures=51]="fontLigatures",i[i.fontSize=52]="fontSize",i[i.fontWeight=53]="fontWeight",i[i.fontVariations=54]="fontVariations",i[i.formatOnPaste=55]="formatOnPaste",i[i.formatOnType=56]="formatOnType",i[i.glyphMargin=57]="glyphMargin",i[i.gotoLocation=58]="gotoLocation",i[i.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",i[i.hover=60]="hover",i[i.inDiffEditor=61]="inDiffEditor",i[i.inlineSuggest=62]="inlineSuggest",i[i.inlineEdit=63]="inlineEdit",i[i.letterSpacing=64]="letterSpacing",i[i.lightbulb=65]="lightbulb",i[i.lineDecorationsWidth=66]="lineDecorationsWidth",i[i.lineHeight=67]="lineHeight",i[i.lineNumbers=68]="lineNumbers",i[i.lineNumbersMinChars=69]="lineNumbersMinChars",i[i.linkedEditing=70]="linkedEditing",i[i.links=71]="links",i[i.matchBrackets=72]="matchBrackets",i[i.minimap=73]="minimap",i[i.mouseStyle=74]="mouseStyle",i[i.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",i[i.mouseWheelZoom=76]="mouseWheelZoom",i[i.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",i[i.multiCursorModifier=78]="multiCursorModifier",i[i.multiCursorPaste=79]="multiCursorPaste",i[i.multiCursorLimit=80]="multiCursorLimit",i[i.occurrencesHighlight=81]="occurrencesHighlight",i[i.overviewRulerBorder=82]="overviewRulerBorder",i[i.overviewRulerLanes=83]="overviewRulerLanes",i[i.padding=84]="padding",i[i.pasteAs=85]="pasteAs",i[i.parameterHints=86]="parameterHints",i[i.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",i[i.placeholder=88]="placeholder",i[i.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",i[i.quickSuggestions=90]="quickSuggestions",i[i.quickSuggestionsDelay=91]="quickSuggestionsDelay",i[i.readOnly=92]="readOnly",i[i.readOnlyMessage=93]="readOnlyMessage",i[i.renameOnType=94]="renameOnType",i[i.renderControlCharacters=95]="renderControlCharacters",i[i.renderFinalNewline=96]="renderFinalNewline",i[i.renderLineHighlight=97]="renderLineHighlight",i[i.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",i[i.renderValidationDecorations=99]="renderValidationDecorations",i[i.renderWhitespace=100]="renderWhitespace",i[i.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",i[i.roundedSelection=102]="roundedSelection",i[i.rulers=103]="rulers",i[i.scrollbar=104]="scrollbar",i[i.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",i[i.scrollBeyondLastLine=106]="scrollBeyondLastLine",i[i.scrollPredominantAxis=107]="scrollPredominantAxis",i[i.selectionClipboard=108]="selectionClipboard",i[i.selectionHighlight=109]="selectionHighlight",i[i.selectOnLineNumbers=110]="selectOnLineNumbers",i[i.showFoldingControls=111]="showFoldingControls",i[i.showUnused=112]="showUnused",i[i.snippetSuggestions=113]="snippetSuggestions",i[i.smartSelect=114]="smartSelect",i[i.smoothScrolling=115]="smoothScrolling",i[i.stickyScroll=116]="stickyScroll",i[i.stickyTabStops=117]="stickyTabStops",i[i.stopRenderingLineAfter=118]="stopRenderingLineAfter",i[i.suggest=119]="suggest",i[i.suggestFontSize=120]="suggestFontSize",i[i.suggestLineHeight=121]="suggestLineHeight",i[i.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",i[i.suggestSelection=123]="suggestSelection",i[i.tabCompletion=124]="tabCompletion",i[i.tabIndex=125]="tabIndex",i[i.unicodeHighlighting=126]="unicodeHighlighting",i[i.unusualLineTerminators=127]="unusualLineTerminators",i[i.useShadowDOM=128]="useShadowDOM",i[i.useTabStops=129]="useTabStops",i[i.wordBreak=130]="wordBreak",i[i.wordSegmenterLocales=131]="wordSegmenterLocales",i[i.wordSeparators=132]="wordSeparators",i[i.wordWrap=133]="wordWrap",i[i.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",i[i.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",i[i.wordWrapColumn=136]="wordWrapColumn",i[i.wordWrapOverride1=137]="wordWrapOverride1",i[i.wordWrapOverride2=138]="wordWrapOverride2",i[i.wrappingIndent=139]="wrappingIndent",i[i.wrappingStrategy=140]="wrappingStrategy",i[i.showDeprecated=141]="showDeprecated",i[i.inlayHints=142]="inlayHints",i[i.editorClassName=143]="editorClassName",i[i.pixelRatio=144]="pixelRatio",i[i.tabFocusMode=145]="tabFocusMode",i[i.layoutInfo=146]="layoutInfo",i[i.wrappingInfo=147]="wrappingInfo",i[i.defaultColorDecorators=148]="defaultColorDecorators",i[i.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",i[i.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(FY||(FY={}));(function(i){i[i.TextDefined=0]="TextDefined",i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(OY||(OY={}));(function(i){i[i.LF=0]="LF",i[i.CRLF=1]="CRLF"})(PY||(PY={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(BY||(BY={}));(function(i){i[i.Increase=0]="Increase",i[i.Decrease=1]="Decrease"})(zY||(zY={}));(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(VY||(VY={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(HY||(HY={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(WY||(WY={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(UY||(UY={}));(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(jY||(jY={}));(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.F20=78]="F20",i[i.F21=79]="F21",i[i.F22=80]="F22",i[i.F23=81]="F23",i[i.F24=82]="F24",i[i.NumLock=83]="NumLock",i[i.ScrollLock=84]="ScrollLock",i[i.Semicolon=85]="Semicolon",i[i.Equal=86]="Equal",i[i.Comma=87]="Comma",i[i.Minus=88]="Minus",i[i.Period=89]="Period",i[i.Slash=90]="Slash",i[i.Backquote=91]="Backquote",i[i.BracketLeft=92]="BracketLeft",i[i.Backslash=93]="Backslash",i[i.BracketRight=94]="BracketRight",i[i.Quote=95]="Quote",i[i.OEM_8=96]="OEM_8",i[i.IntlBackslash=97]="IntlBackslash",i[i.Numpad0=98]="Numpad0",i[i.Numpad1=99]="Numpad1",i[i.Numpad2=100]="Numpad2",i[i.Numpad3=101]="Numpad3",i[i.Numpad4=102]="Numpad4",i[i.Numpad5=103]="Numpad5",i[i.Numpad6=104]="Numpad6",i[i.Numpad7=105]="Numpad7",i[i.Numpad8=106]="Numpad8",i[i.Numpad9=107]="Numpad9",i[i.NumpadMultiply=108]="NumpadMultiply",i[i.NumpadAdd=109]="NumpadAdd",i[i.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=111]="NumpadSubtract",i[i.NumpadDecimal=112]="NumpadDecimal",i[i.NumpadDivide=113]="NumpadDivide",i[i.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",i[i.ABNT_C1=115]="ABNT_C1",i[i.ABNT_C2=116]="ABNT_C2",i[i.AudioVolumeMute=117]="AudioVolumeMute",i[i.AudioVolumeUp=118]="AudioVolumeUp",i[i.AudioVolumeDown=119]="AudioVolumeDown",i[i.BrowserSearch=120]="BrowserSearch",i[i.BrowserHome=121]="BrowserHome",i[i.BrowserBack=122]="BrowserBack",i[i.BrowserForward=123]="BrowserForward",i[i.MediaTrackNext=124]="MediaTrackNext",i[i.MediaTrackPrevious=125]="MediaTrackPrevious",i[i.MediaStop=126]="MediaStop",i[i.MediaPlayPause=127]="MediaPlayPause",i[i.LaunchMediaPlayer=128]="LaunchMediaPlayer",i[i.LaunchMail=129]="LaunchMail",i[i.LaunchApp2=130]="LaunchApp2",i[i.Clear=131]="Clear",i[i.MAX_VALUE=132]="MAX_VALUE"})(wA||(wA={}));(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(J5||(J5={}));(function(i){i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated"})(QY||(QY={}));(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(GY||(GY={}));(function(i){i[i.Normal=1]="Normal",i[i.Underlined=2]="Underlined"})(qY||(qY={}));(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.TEXTAREA=1]="TEXTAREA",i[i.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",i[i.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",i[i.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",i[i.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",i[i.CONTENT_TEXT=6]="CONTENT_TEXT",i[i.CONTENT_EMPTY=7]="CONTENT_EMPTY",i[i.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",i[i.CONTENT_WIDGET=9]="CONTENT_WIDGET",i[i.OVERVIEW_RULER=10]="OVERVIEW_RULER",i[i.SCROLLBAR=11]="SCROLLBAR",i[i.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",i[i.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(YY||(YY={}));(function(i){i[i.AIGenerated=1]="AIGenerated"})(KY||(KY={}));(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(JY||(JY={}));(function(i){i[i.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",i[i.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",i[i.TOP_CENTER=2]="TOP_CENTER"})(XY||(XY={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(ZY||(ZY={}));(function(i){i[i.Word=0]="Word",i[i.Line=1]="Line",i[i.Suggest=2]="Suggest"})($Y||($Y={}));(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.None=2]="None",i[i.LeftOfInjectedText=3]="LeftOfInjectedText",i[i.RightOfInjectedText=4]="RightOfInjectedText"})(eK||(eK={}));(function(i){i[i.Off=0]="Off",i[i.On=1]="On",i[i.Relative=2]="Relative",i[i.Interval=3]="Interval",i[i.Custom=4]="Custom"})(tK||(tK={}));(function(i){i[i.None=0]="None",i[i.Text=1]="Text",i[i.Blocks=2]="Blocks"})(iK||(iK={}));(function(i){i[i.Smooth=0]="Smooth",i[i.Immediate=1]="Immediate"})(nK||(nK={}));(function(i){i[i.Auto=1]="Auto",i[i.Hidden=2]="Hidden",i[i.Visible=3]="Visible"})(rK||(rK={}));(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})(oK||(oK={}));(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(sK||(sK={}));(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(aK||(aK={}));(function(i){i[i.File=0]="File",i[i.Module=1]="Module",i[i.Namespace=2]="Namespace",i[i.Package=3]="Package",i[i.Class=4]="Class",i[i.Method=5]="Method",i[i.Property=6]="Property",i[i.Field=7]="Field",i[i.Constructor=8]="Constructor",i[i.Enum=9]="Enum",i[i.Interface=10]="Interface",i[i.Function=11]="Function",i[i.Variable=12]="Variable",i[i.Constant=13]="Constant",i[i.String=14]="String",i[i.Number=15]="Number",i[i.Boolean=16]="Boolean",i[i.Array=17]="Array",i[i.Object=18]="Object",i[i.Key=19]="Key",i[i.Null=20]="Null",i[i.EnumMember=21]="EnumMember",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter"})(lK||(lK={}));(function(i){i[i.Deprecated=1]="Deprecated"})(cK||(cK={}));(function(i){i[i.Hidden=0]="Hidden",i[i.Blink=1]="Blink",i[i.Smooth=2]="Smooth",i[i.Phase=3]="Phase",i[i.Expand=4]="Expand",i[i.Solid=5]="Solid"})(uK||(uK={}));(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(dK||(dK={}));(function(i){i[i.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",i[i.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",i[i.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",i[i.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(hK||(hK={}));(function(i){i[i.None=0]="None",i[i.Same=1]="Same",i[i.Indent=2]="Indent",i[i.DeepIndent=3]="DeepIndent"})(fK||(fK={}))});function pK(){return{editor:void 0,languages:void 0,CancellationTokenSource:Bi,Emitter:G,KeyCode:wA,KeyMod:hb,Position:K,Range:N,Selection:qe,SelectionDirection:oK,MarkerSeverity:J5,MarkerTag:QY,Uri:Xe,Token:U0}}var hb,X5=D(()=>{sn();et();Ep();mn();Nt();We();Hn();tr();ZT();hb=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return Wr(e,t)}}});var Zye={};Ih(Zye,{__debug:()=>RKe,check:()=>NKe,default:()=>IYe,doc:()=>jye,format:()=>Xye,formatWithCursor:()=>Jye,getSupportInfo:()=>MKe,util:()=>Qye,version:()=>kKe});function OVt(i,e,t){return FVt.diff(i,e,t)}function HVt(i){let e=i.indexOf(Lye);return e!==-1?i.charAt(e+1)===yK?NYe:LYe:zVt}function Nye(i){return i===LYe?Lye:i===NYe?MYe:VVt}function RYe(i,e){let t=WVt.get(e);return i.match(t)?.length??0}function jVt(i){return AK(0,i,UVt,yK)}function QVt(i){return this[i<0?this.length+i:i]}function qVt(i){let e=i.length;for(;e>0&&(i[e-1]==="\r"||i[e-1]===` -`);)e--;return e`'${r}'`));return`Unexpected doc.type '${i.type}'. -Expected it to be ${n}.`}function ZVt(i,e,t,n){let r=[i];for(;r.length>0;){let o=r.pop();if(o===nYe){t(r.pop());continue}t&&r.push(o,nYe);let s=rk(o);if(!s)throw new UM(o);if(e?.(o)!==!1)switch(s){case bw:case SA:{let a=s===bw?o:o.parts;for(let l=a.length,c=l-1;c>=0;--c)r.push(a[c]);break}case Bm:r.push(o.flatContents,o.breakContents);break;case kp:if(n&&o.expandedStates)for(let a=o.expandedStates.length,l=a-1;l>=0;--l)r.push(o.expandedStates[l]);else r.push(o.contents);break;case Aw:case vw:case ww:case EA:case xw:r.push(o.contents);break;case nk:case L_:case yw:case Cw:case Ud:case pb:break;default:throw new UM(o)}}}function xK(i,e){if(typeof i=="string")return e(i);let t=new Map;return n(i);function n(o){return Mye(t,o,r)}function r(o){switch(rk(o)){case bw:return e(o.map(n));case SA:return e({...o,parts:o.parts.map(n)});case Bm:return e({...o,breakContents:n(o.breakContents),flatContents:n(o.flatContents)});case kp:{let{expandedStates:s,contents:a}=o;return s?(s=s.map(n),a=s[0]):a=n(a),e({...o,contents:a,expandedStates:s})}case Aw:case vw:case ww:case EA:case xw:return e({...o,contents:n(o.contents)});case nk:case L_:case yw:case Cw:case Ud:case pb:return e(o);default:throw new UM(o)}}}function Fye(i,e,t){let n=t,r=!1;function o(s){if(r)return!1;let a=e(s);a!==void 0&&(r=!0,n=a)}return Rye(i,o),n}function $Vt(i){if(i.type===kp&&i.break||i.type===Ud&&i.hard||i.type===pb)return!0}function eHt(i){return Fye(i,$Vt,!1)}function rYe(i){if(i.length>0){let e=Wd(0,i,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function tHt(i){let e=new Set,t=[];function n(o){if(o.type===pb&&rYe(t),o.type===kp){if(t.push(o),e.has(o))return!1;e.add(o)}}function r(o){o.type===kp&&t.pop().break&&rYe(t)}Rye(i,n,r,!0)}function iHt(i){return i.type===Ud&&!i.hard?i.soft?"":" ":i.type===Bm?i.flatContents:i}function nHt(i){return xK(i,iHt)}function oYe(i){for(i=[...i];i.length>=2&&Wd(0,i,-2).type===Ud&&Wd(0,i,-1).type===pb;)i.length-=2;if(i.length>0){let e=Z5(Wd(0,i,-1));i[i.length-1]=e}return i}function Z5(i){switch(rk(i)){case vw:case ww:case kp:case xw:case EA:{let e=Z5(i.contents);return{...i,contents:e}}case Bm:return{...i,breakContents:Z5(i.breakContents),flatContents:Z5(i.flatContents)};case SA:return{...i,parts:oYe(i.parts)};case bw:return oYe(i);case nk:return qVt(i);case Aw:case L_:case yw:case Cw:case Ud:case pb:break;default:throw new UM(i)}return i}function OYe(i){return Z5(oHt(i))}function rHt(i){switch(rk(i)){case SA:{let{parts:e}=i;if(e.every(t=>t===""))return"";if(e.length===1)return e[0];break}case kp:if(!i.contents&&!i.id&&!i.break&&!i.expandedStates)return"";if(i.contents.type===kp&&i.contents.id===i.id&&i.contents.break===i.break&&i.contents.expandedStates===i.expandedStates)return i.contents;break;case Aw:case vw:case ww:case xw:if(!i.contents)return"";break;case Bm:if(!i.flatContents&&!i.breakContents)return"";break;case bw:{let e=[];for(let t of i){if(!t)continue;let[n,...r]=Array.isArray(t)?t:[t];typeof n=="string"&&typeof Wd(0,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...r)}return e.length===0?"":e.length===1?e[0]:e}case nk:case L_:case yw:case Cw:case Ud:case EA:case pb:break;default:throw new UM(i)}return i}function oHt(i){return xK(i,e=>rHt(e))}function sHt(i,e=jYe){return xK(i,t=>typeof t=="string"?HYe(e,t.split(` -`)):t)}function aHt(i){if(i.type===Ud)return!0}function lHt(i){return Fye(i,aHt,!1)}function gK(i,e){return i.type===EA?{...i,contents:e(i.contents)}:e(i)}function vK(i){return _A(i),{type:vw,contents:i}}function jM(i,e){return uHt(i),_A(e),{type:Aw,contents:e,n:i}}function dHt(i){return jM(Number.NEGATIVE_INFINITY,i)}function BYe(i){return jM({type:"root"},i)}function hHt(i){return jM(-1,i)}function zYe(i,e,t){_A(i);let n=i;if(e>0){for(let r=0;r0?`, { ${l.join(", ")} }`:"";return`indentIfBreak(${n(o.contents)}${c})`}if(o.type===kp){let l=[];o.break&&o.break!=="propagated"&&l.push("shouldBreak: true"),o.id&&l.push(`id: ${r(o.id)}`);let c=l.length>0?`, { ${l.join(", ")} }`:"";return o.expandedStates?`conditionalGroup([${o.expandedStates.map(u=>n(u)).join(",")}]${c})`:`group(${n(o.contents)}${c})`}if(o.type===SA)return`fill([${o.parts.map(l=>n(l)).join(", ")}])`;if(o.type===xw)return"lineSuffix("+n(o.contents)+")";if(o.type===Cw)return"lineSuffixBoundary";if(o.type===EA)return`label(${JSON.stringify(o.label)}, ${n(o.contents)})`;if(o.type===L_)return"cursor";throw new Error("Unknown doc type "+o.type)}function r(o){if(typeof o!="symbol")return JSON.stringify(String(o));if(o in e)return e[o];let s=o.description||"symbol";for(let a=0;;a++){let l=s+(a>0?` #${a}`:"");if(!t.has(l))return t.add(l),e[o]=`Symbol.for(${JSON.stringify(l)})`}}}function IHt(i){let e=i[0],t=i[1];for(let n=0;n=r&&sYe<=o)return[r,o];o-r>t-e&&(e=r,t=o)}return[e,t]}function OHt(i){if(!i)return 0;if(!FHt.test(i))return i.length;let e=0;i=i.replace(xHt(),t=>(e+=RHt(t)?1:2,""));for(let t of i){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(e+=LHt(n)||NHt(n)?2:1)}return e}function YYe(i,e,t){let n=e.type===1?i.queue.slice(0,-1):[...i.queue,e],r="",o=0,s=0,a=0;for(let p of n)switch(p.type){case 0:u(),t.useTabs?l(1):c(t.tabWidth);break;case 3:{let{string:g}=p;u(),r+=g,o+=g.length;break}case 2:{let{width:g}=p;s+=1,a+=g;break}default:throw new Error(`Unexpected indent comment '${p.type}'.`)}return h(),{...i,value:r,length:o,queue:n};function l(p){r+=" ".repeat(p),o+=t.tabWidth*p}function c(p){r+=" ".repeat(p),o+=p}function u(){t.useTabs?d():h()}function d(){s>0&&l(s),f()}function h(){a>0&&c(a),f()}function f(){s=0,a=0}}function zHt(i,e,t){if(!e)return i;if(e.type==="root")return{...i,root:i};if(e===Number.NEGATIVE_INFINITY)return i.root;let n;return typeof e=="number"?e<0?n=BHt:n={type:2,width:e}:n={type:3,string:e},YYe(i,n,t)}function VHt(i,e){return YYe(i,PHt,e)}function HHt(i){let e=0;for(let t=i.length-1;t>=0;t--){let n=i[t];if(n===" "||n===" ")e++;else break}return e}function KYe(i){let e=HHt(i);return{text:e===0?i:i.slice(0,i.length-e),count:e}}function mK(i,e,t,n,r,o){if(t===Number.POSITIVE_INFINITY)return!0;let s=e.length,a=!1,l=[i],c="";for(;t>=0;){if(l.length===0){if(s===0)return!0;l.push(e[--s]);continue}let{mode:u,doc:d}=l.pop(),h=rk(d);switch(h){case nk:d&&(a&&(c+=" ",t-=1,a=!1),c+=d,t-=Pye(d));break;case bw:case SA:{let f=h===bw?d:d.parts,p=d[Dye]??0;for(let g=f.length-1;g>=p;g--)l.push({mode:u,doc:f[g]});break}case vw:case Aw:case ww:case EA:l.push({mode:u,doc:d.contents});break;case yw:{let{text:f,count:p}=KYe(c);c=f,t+=p;break}case kp:{if(o&&d.break)return!1;let f=d.break?fb:u,p=d.expandedStates&&f===fb?Wd(0,d.expandedStates,-1):d.contents;l.push({mode:f,doc:p});break}case Bm:{let f=(d.groupId?r[d.groupId]||xA:u)===fb?d.breakContents:d.flatContents;f&&l.push({mode:u,doc:f});break}case Ud:if(u===fb||d.hard)return!0;d.soft||(a=!0);break;case xw:n=!0;break;case Cw:if(n)return!1;break}}return!1}function _K(i,e){let t=Object.create(null),n=e.printWidth,r=Nye(e.endOfLine),o=0,s=[{indent:qYe,mode:fb,doc:i}],a=!1,l=[],c=new UHt;for(tHt(i);s.length>0;){let{indent:p,mode:g,doc:v}=s.pop();switch(rk(v)){case nk:{let A=r!==` -`?AK(0,v,` -`,r):v;A&&(c.write(A),s.length>0&&(o+=Pye(A)));break}case bw:for(let A=v.length-1;A>=0;A--)s.push({indent:p,mode:g,doc:v[A]});break;case L_:c.markPosition();break;case vw:s.push({indent:VHt(p,e),mode:g,doc:v.contents});break;case Aw:s.push({indent:zHt(p,v.n,e),mode:g,doc:v.contents});break;case yw:o-=c.trim();break;case kp:{let A=(function(){if(g===xA&&!a)return{indent:p,mode:v.break?fb:xA,doc:v.contents};a=!1;let w=n-o,C=l.length>0,_={indent:p,mode:xA,doc:v.contents};if(!v.break&&mK(_,s,w,C,t))return _;if(!v.expandedStates)return{indent:p,mode:fb,doc:v.contents};if(!v.break)for(let E=1;E0,t,!0);if(_===1){M?s.push(T):s.push(L);break}let z={indent:p,mode:xA,doc:I},H={indent:p,mode:fb,doc:I};if(_===2){M?s.push(z,T):s.push(H,L);break}let B=C[w+2],q={indent:p,mode:g,doc:{...v,[Dye]:w+2}},U=mK({indent:p,mode:xA,doc:[E,I,B]},[],A,l.length>0,t,!0);s.push(q),U?s.push(z,T):M?s.push(H,T):s.push(H,L);break}case Bm:case ww:{let A=v.groupId?t[v.groupId]:g;if(A===fb){let w=v.type===Bm?v.breakContents:v.negate?v.contents:vK(v.contents);w&&s.push({indent:p,mode:g,doc:w})}if(A===xA){let w=v.type===Bm?v.flatContents:v.negate?vK(v.contents):v.contents;w&&s.push({indent:p,mode:g,doc:w})}break}case xw:l.push({indent:p,mode:g,doc:v.contents});break;case Cw:l.length>0&&s.push({indent:p,mode:g,doc:Oye});break;case Ud:switch(g){case xA:if(!v.hard){v.soft||(c.write(" "),o+=1);break}a=!0;case fb:if(l.length>0){s.push({indent:p,mode:g,doc:v},...l.reverse()),l.length=0;break}v.literal?(c.write(r),o=0,p.root&&(p.root.value&&c.write(p.root.value),o=p.root.length)):(c.trim(),c.write(r+p.value),o=p.length);break}break;case EA:s.push({indent:p,mode:g,doc:v.contents});break;case pb:break;default:throw new UM(v)}s.length===0&&l.length>0&&(s.push(...l.reverse()),l.length=0)}let{text:u,positions:d}=c.finish();if(d.length!==2)return{formatted:u};let[h,f]=d;return{formatted:u,cursorNodeStart:h,cursorNodeText:u.slice(h,f)}}function jHt(i,e,t=0){let n=0;for(let r=t;r0}function YHt(i){return i!==null&&typeof i=="object"}function i6(i){return(e,t,n)=>{if(t===!1)return!1;let r=!!n?.backwards,{length:o}=e,s=t;for(;s>=0&&s!0}=e,r=o=>zye(o)&&n(o);for(let o of t(i)){let s=i[o];if(Array.isArray(s))for(let a of s)r(a)&&(yield a);else r(s)&&(yield s)}}function*ZHt(i,e){let t=[i];for(let n=0;n(r??(r=[i,...e]),n(l,r)?[l]:$Ye(l,r,t))),{locStart:s,locEnd:a}=t;return o.sort((l,c)=>s(l)-s(c)||a(l)-a(c)),o}function $Ye(i,e,t){return Mye(t.cache,i,n=>eWt(n,e,t))}function tWt(i){let e=i.type||i.kind||"(unknown type)",t=String(i.name||i.id&&(typeof i.id=="object"?i.id.name:i.id)||i.key&&(typeof i.key=="object"?i.key.name:i.key)||i.value&&(typeof i.value=="object"?"":String(i.value))||i.operator||"");return t.length>20&&(t=t.slice(0,19)+"\u2026"),e+(t?" "+t:"")}function Vye(i,e){(i.comments??(i.comments=[])).push(e),e.printed=!1,e.nodeDescription=tWt(i)}function $5(i,e){e.leading=!0,e.trailing=!1,Vye(i,e)}function $T(i,e,t){e.leading=!1,e.trailing=!1,t&&(e.marker=t),Vye(i,e)}function e6(i,e){e.leading=!1,e.trailing=!0,Vye(i,e)}function iKe(i,e,t,n,r=[]){let{locStart:o,locEnd:s}=t,a=o(e),l=s(e),c=eKe(i,r,{cache:tKe,locStart:o,locEnd:s,getVisitorKeys:t.getVisitorKeys,filter:t.printer.canAttachComment,getChildren:t.printer.getCommentChildNodes}),u,d,h=0,f=c.length;for(;h>1,g=c[p],v=o(g),A=s(g);if(v<=a&&l<=A)return iKe(g,e,t,g,[g,...r]);if(A<=a){u=g,h=p+1;continue}if(l<=v){d=g,f=p;continue}throw new Error("Comment location overlaps with node location")}if(n?.type==="TemplateLiteral"){let{quasis:p}=n,g=wye(p,e,t);u&&wye(p,u,t)!==g&&(u=null),d&&wye(p,d,t)!==g&&(d=null)}return{enclosingNode:n,precedingNode:u,followingNode:d}}function iWt(i,e){let{comments:t}=i;if(delete i.comments,!JYe(t)||!e.printer.canAttachComment)return;let n=[],{printer:{features:{experimental_avoidAstMutation:r},handleComments:o={}},originalText:s}=e,{ownLine:a=yye,endOfLine:l=yye,remaining:c=yye}=o,u=t.map((h,f)=>({...iKe(i,h,e),comment:h,text:s,options:e,ast:i,isLastComment:t.length-1===f,placement:void 0})),d=!r;for(let[h,f]of u.entries()){let{comment:p,precedingNode:g,enclosingNode:v,followingNode:A,text:w,options:C,ast:_,isLastComment:E}=f,I=nWt(w,C,u,h)?"ownLine":rWt(w,C,u,h)?"endOfLine":"remaining",T;if(r?(f.placement=I,T=[f]):T=[p,w,C,_,E],d&&(p.enclosingNode=v,p.precedingNode=g,p.followingNode=A),p.placement=I,I==="ownLine")a(...T)||(A?$5(A,p):g?e6(g,p):$T(v||_,p));else if(I==="endOfLine")l(...T)||(g?e6(g,p):A?$5(A,p):$T(v||_,p));else if(!c(...T))if(g&&A){let L=n.length;L>0&&n[L-1].followingNode!==A&&lYe(n,C),n.push(f)}else g?e6(g,p):A?$5(A,p):$T(v||_,p)}if(lYe(n,e),d)for(let h of t)delete h.precedingNode,delete h.enclosingNode,delete h.followingNode}function nWt(i,e,t,n){let{comment:r,precedingNode:o}=t[n],{locStart:s,locEnd:a}=e,l=s(r);if(o)for(let c=n-1;c>=0;c--){let{comment:u,precedingNode:d}=t[c];if(d!==o||!nKe(i.slice(a(u),l)))break;l=s(u)}return T_(i,l,{backwards:!0})}function rWt(i,e,t,n){let{comment:r,followingNode:o}=t[n],{locStart:s,locEnd:a}=e,l=a(r);if(o)for(let c=n+1;c0;--s){let{comment:a,precedingNode:l,followingNode:c}=i[s-1];k_(l,n),k_(c,r);let u=e.originalText.slice(e.locEnd(a),o);if(e.printer.isGap?.(u,e)??/^[\s(]*$/.test(u))o=e.locStart(a);else break}for(let[a,{comment:l}]of i.entries())a1&&a.comments.sort((l,c)=>e.locStart(l)-e.locStart(c));i.length=0}function wye(i,e,t){let n=t.locStart(e)-1;for(let r=1;r!n?.has(s)&&s.leading&&r(s)));return o.size===0?"":i.map(({node:s})=>o.has(s)?sWt(i,e):"","comments").filter(Boolean)}function cWt(i,e,t){let n=i.node?.comments,r=new Set(n?.filter(u=>u.trailing)),o=e[Symbol.for("printedComments")],s=t?.filter??rKe,a=new Set(n?.filter(u=>r.has(u)&&!o?.has(u)&&s(u)));if(a.size===0)return"";let l=[],c;return i.each(({node:u})=>{r.has(u)&&(c=aWt(i,e,c),a.has(u)&&l.push(c.doc))},"comments"),l}function uWt(i,e,t,n){let r=lWt(i,t,n),o=cWt(i,t,n);return r||o?gK(e,s=>[r,s,o]):e}function dWt(i){let{[wK]:e,[Symbol.for("printedComments")]:t}=i;for(let n of e){if(!n.printed&&!t.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}function aKe({plugins:i=[],showDeprecated:e=!1}={}){let t=i.flatMap(r=>r.languages??[]),n=[];for(let r of gWt(Object.assign({},...i.map(({options:o})=>o),pWt)))!e&&r.deprecated||(Array.isArray(r.choices)&&(e||(r.choices=r.choices.filter(o=>!o.deprecated)),r.name==="parser"&&(r.choices=[...r.choices,...mWt(r.choices,t,i)])),r.pluginDefaults=Object.fromEntries(i.filter(o=>o.defaultOptions?.[r.name]!==void 0).map(o=>[o.name,o.defaultOptions[r.name]])),n.push(r));return{languages:t,options:n}}function*mWt(i,e,t){let n=new Set(i.map(r=>r.value));for(let r of e)if(r.parsers){for(let o of r.parsers)if(!n.has(o)){n.add(o);let s=t.find(l=>l.parsers&&EK(l.parsers,o)),a=r.name;s?.name&&(a+=` (plugin: ${s.name})`),yield{value:o,description:a}}}}function gWt(i){let e=[];for(let[t,n]of Object.entries(i)){let r={name:t,...n};Array.isArray(r.default)&&(r.default=Wd(0,r.default,-1).value),e.push(r)}return e}function yWt(){let i=globalThis,e=i.process?.platform;if(typeof e=="string")return e.startsWith("win");let t=i.Deno?.build?.os;return typeof t=="string"?t==="windows":i.navigator?.platform?.startsWith("Win")??!1}function lKe(i){if(i=i instanceof URL?i:new URL(i),i.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${i.protocol}"`);return i}function xWt(i){return i=lKe(i),decodeURIComponent(i.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function CWt(i){i=lKe(i);let e=decodeURIComponent(i.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return i.hostname!==""&&(e=`\\\\${i.hostname}${e}`),e}function _Wt(i){return wWt?CWt(i):xWt(i)}function uYe(i,e){if(!e)return;let t=SWt(e).toLowerCase();return i.find(({filenames:n})=>n?.some(r=>r.toLowerCase()===t))??i.find(({extensions:n})=>n?.some(r=>t.endsWith(r)))}function DWt(i,e){if(e)return i.find(({name:t})=>t.toLowerCase()===e)??i.find(({aliases:t})=>t?.includes(e))??i.find(({extensions:t})=>t?.includes(`.${e}`))}function dYe(i,e){if(e){if(EWt(e))try{e=_Wt(e)}catch{return}if(typeof e=="string")return i.find(({isSupported:t})=>t?.({filepath:e}))}}function kWt(i,e){let t=AWt(0,i.plugins).flatMap(n=>n.languages??[]);return(DWt(t,e.language)??uYe(t,e.physicalFile)??uYe(t,e.file)??dYe(t,e.physicalFile)??dYe(t,e.file)??TWt?.(t,e.physicalFile))?.parsers[0]}function fYe(i,e,t,n){return[`Invalid ${CA.red(n.key(i))} value.`,`Expected ${CA.blue(t)},`,`but received ${e===dKe?CA.gray("nothing"):CA.red(n.value(e))}.`].join(" ")}function hKe({text:i,list:e},t){let n=[];return i&&n.push(`- ${CA.blue(i)}`),e&&n.push([`- ${CA.blue(e.title)}:`].concat(e.values.map(r=>hKe(r,t-hYe.length).replace(/^|\n/g,`$&${hYe}`))).join(` -`)),fKe(n,t)}function fKe(i,e){if(i.length===1)return i[0];let[t,n]=i,[r,o]=i.map(s=>s.split(` -`,1)[0].length);return r>e&&r>o?n:t}function Cye(i,e,t){if(i===e)return 0;let n=t?.maxDistance,r=i;i.length>e.length&&(i=e,e=r);let o=i.length,s=e.length;for(;o>0&&i.charCodeAt(~-o)===e.charCodeAt(~-s);)o--,s--;let a=0;for(;an)return n;if(o===0)return n!==void 0&&s>n?n:s;let l,c,u,d,h=0,f=0;for(;hc?d>c?c+1:d:d>u?u+1:d;if(n!==void 0){let p=c;for(h=0;hn)return n}}return HM.length=o,xye.length=o,n!==void 0&&c>n?n:c}function NWt(i,e,t){if(!Array.isArray(e)||e.length===0)return;let n=t?.maxDistance,r=i.length;for(let l of e)if(l===i)return l;if(n===0)return;let o,s=Number.POSITIVE_INFINITY,a=new Set;for(let l of e){if(a.has(l))continue;a.add(l);let c=Math.abs(l.length-r);if(c>=s||n!==void 0&&c>n)continue;let u=Number.isFinite(s)?n===void 0?s:Math.min(s,n):n,d=u===void 0?Cye(i,l):Cye(i,l,{maxDistance:u});if(n!==void 0&&d>n)continue;let h=d;if(u!==void 0&&d===u&&u===n&&(h=Cye(i,l)),hn))return o}function RWt(i,e){let t=new i(e),n=Object.create(t);for(let r of MWt)r in e&&(n[r]=FWt(e[r],t,N_.prototype[r].length));return n}function FWt(i,e,t){return typeof i=="function"?(...n)=>i(...n.slice(0,t-1),e,...n.slice(t-1)):()=>i}function pYe({from:i,to:e}){return{from:[i],to:e}}function VWt(i,e){let t=Object.create(null);for(let n of i){let r=n[e];if(t[r])throw new Error(`Duplicate ${e} ${JSON.stringify(r)}`);t[r]=n}return t}function HWt(i,e){let t=new Map;for(let n of i){let r=n[e];if(t.has(r))throw new Error(`Duplicate ${e} ${JSON.stringify(r)}`);t.set(r,n)}return t}function WWt(){let i=Object.create(null);return e=>{let t=JSON.stringify(e);return i[t]?!0:(i[t]=!0,!1)}}function UWt(i,e){let t=[],n=[];for(let r of i)e(r)?t.push(r):n.push(r);return[t,n]}function jWt(i){return i===Math.floor(i)}function QWt(i,e){if(i===e)return 0;let t=typeof i,n=typeof e,r=["undefined","object","boolean","number","string"];return t!==n?r.indexOf(t)-r.indexOf(n):t!=="string"?Number(i)-Number(e):i.localeCompare(e)}function GWt(i){return(...e)=>{let t=i(...e);return typeof t=="string"?new Error(t):t}}function mYe(i){return i===void 0?{}:i}function mKe(i){if(typeof i=="string")return{text:i};let{text:e,list:t}=i;return qWt((e||t)!==void 0,"Unexpected `expected` result, there should be at least one field."),t?{text:e,list:{title:t.title,values:t.values.map(mKe)}}:{text:e}}function gYe(i,e){return i===!0?!0:i===!1?{value:e}:i}function bYe(i,e,t=!1){return i===!1?!1:i===!0?t?!0:[{value:e}]:"value"in i?[i]:i.length===0?!1:i}function vYe(i,e){return typeof i=="string"||"key"in i?{from:e,to:i}:"from"in i?{from:i.from,to:i.to}:{from:e,to:i.to}}function Tye(i,e){return i===void 0?[]:Array.isArray(i)?i.map(t=>vYe(t,e)):[vYe(i,e)]}function AYe(i,e){let t=Tye(typeof i=="object"&&"redirect"in i?i.redirect:i,e);return t.length===0?{remain:e,redirect:t}:typeof i=="object"&&"remain"in i?{remain:i.remain,redirect:t}:{redirect:t}}function qWt(i,e){if(!i)throw new Error(e)}function iUt(i,e,{logger:t=!1,isCLI:n=!1,passThrough:r=!1,FlagSchema:o,descriptor:s}={}){if(n){if(!o)throw new Error("'FlagSchema' option is required.");if(!s)throw new Error("'descriptor' option is required.")}else s=WM;let a=r?Array.isArray(r)?(h,f)=>r.includes(h)?{[h]:f}:void 0:(h,f)=>({[h]:f}):(h,f,p)=>{let{_:g,...v}=p.schemas;return pKe(h,f,{...p,schemas:v})},l=nUt(e,{isCLI:n,FlagSchema:o}),c=new tUt(l,{logger:t,unknown:a,descriptor:s}),u=t!==!1;u&&_ye&&(c._hasDeprecationWarned=_ye);let d=c.normalize(i);return u&&(_ye=c._hasDeprecationWarned),d}function nUt(i,{isCLI:e,FlagSchema:t}){let n=[];e&&n.push(PWt.create({name:"_"}));for(let r of i)n.push(rUt(r,{isCLI:e,optionInfos:i,FlagSchema:t})),r.alias&&e&&n.push(OWt.create({name:r.alias,sourceName:r.name}));return n}function rUt(i,{isCLI:e,optionInfos:t,FlagSchema:n}){let{name:r}=i,o={name:r},s,a={};switch(i.type){case"int":s=JWt,e&&(o.preprocess=Number);break;case"string":s=yYe;break;case"choice":s=YWt,o.choices=i.choices.map(l=>l?.redirect?{...l,redirect:{to:{key:i.name,value:l.redirect}}}:l);break;case"boolean":s=zWt;break;case"flag":s=n,o.flags=t.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":s=yYe;break;default:throw new Error(`Unexpected type ${i.type}`)}if(i.exception?o.validate=(l,c,u)=>i.exception(l)||c.validate(l,u):o.validate=(l,c,u)=>l===void 0||c.validate(l,u),i.redirect&&(a.redirect=l=>l?{to:typeof i.redirect=="string"?i.redirect:{key:i.redirect.option,value:i.redirect.value}}:void 0),i.deprecated&&(a.deprecated=!0),e&&!i.array){let l=o.preprocess||(c=>c);o.preprocess=(c,u,d)=>u.preprocess(l(Array.isArray(c)?Wd(0,c,-1):c),d)}return i.array?BWt.create({...e?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...a,valueSchema:s.create(o)}):s.create({...o,...a})}function uUt(i){return!!i?.[lUt]}async function dUt(i,e,t,n){let{node:r}=t,{language:o}=r;if(!bKe.has(o))return;let s=r.value.trim(),a;if(s){let l=o==="yaml"?o:cKe(n,{language:o});if(!l)return;a=s?await i(s,{parser:l}):""}else a=s;return BYe([r.startDelimiter,r.explicitLanguage??"",gw,a,a?gw:"",r.endDelimiter])}function hUt(i,e){return vKe({node:i})&&(delete e.end,delete e.raw,delete e.value),e}function pUt({node:i}){return i.raw}function bUt(i,e){let t=i?n=>i(n,AKe):gUt;return e?new Proxy(t,{apply:(n,r,o)=>Wye(o[0])?cUt:Reflect.apply(n,r,o)}):t}function yKe(i,e){if(!e)throw new Error("parserName is required.");let t=gKe(0,i,r=>r.parsers&&EK(r.parsers,e));if(t)return t;let n=`Couldn't resolve parser "${e}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new sKe(n)}function vUt(i,e){if(!e)throw new Error("astFormat is required.");let t=gKe(0,i,r=>r.printers&&EK(r.printers,e));if(t)return t;let n=`Couldn't find plugin for AST format "${e}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new sKe(n)}function Uye({plugins:i,parser:e}){let t=yKe(i,e);return wKe(t,e)}function wKe(i,e){let t=i.parsers[e];return typeof t=="function"?t():t}async function AUt(i,e){let t=i.printers[e],n=typeof t=="function"?await t():t;return xUt(n)}function yUt(i){let{features:e,getVisitorKeys:t,embed:n,massageAstNode:r,print:o,...s}=i;e=EUt(e);let a=e.experimental_frontMatterSupport;t=wYe(t,a.massageAstNode||a.embed||a.print);let l=r;r&&a.massageAstNode&&(l=new Proxy(r,{apply(d,h,f){return fUt(...f),Reflect.apply(d,h,f)}}));let c=n;if(n){let d;c=new Proxy(n,{get(h,f,p){return f==="getVisitorKeys"?(d??(d=n.getVisitorKeys?wYe(n.getVisitorKeys,a.massageAstNode||a.embed):t),d):Reflect.get(h,f,p)},apply:(h,f,p)=>a.embed&&vKe(...p)?dUt:Reflect.apply(h,f,p)})}let u=o;return a.print&&(u=new Proxy(o,{apply(d,h,f){let[p]=f;return Wye(p.node)?mUt(p):Reflect.apply(d,h,f)}})),{features:e,getVisitorKeys:t,embed:c,massageAstNode:l,print:u,...s}}function xUt(i){return Mye(wUt,i,yUt)}function SUt(i){return{..._Ut,...i}}function EUt(i){return{experimental_avoidAstMutation:!1,...i,experimental_frontMatterSupport:SUt(i?.experimental_frontMatterSupport)}}async function DUt(i,e={}){let t={...i};if(!t.parser){if(!t.filepath)throw new cYe("No parser and no file path given, couldn't infer a parser.");if(t.parser=cKe(t,{physicalFile:t.filepath}),!t.parser)throw new cYe(`No parser could be inferred for file "${t.filepath}".`)}let n=aKe({plugins:i.plugins,showDeprecated:!0}).options,r={...xYe,...Object.fromEntries(n.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},o=yKe(t.plugins,t.parser),s=await wKe(o,t.parser);t.astFormat=s.astFormat,t.locEnd=s.locEnd,t.locStart=s.locStart;let a=o.printers?.[s.astFormat]?o:vUt(t.plugins,s.astFormat),l=await AUt(a,s.astFormat);t.printer=l,t.getVisitorKeys=l.getVisitorKeys;let c=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,d])=>d!==void 0)):{},u={...r,...c};for(let[d,h]of Object.entries(u))t[d]??(t[d]=h);return t.parser==="json"&&(t.trailingComma="none"),oUt(t,n,{passThrough:Object.keys(xYe),...e})}function TUt(i,e,t,n){let r={column:null,line:-1,...i.start},o={...r,...i.end},{linesAbove:s=2,linesBelow:a=3}=t||{},l=r.line-n,c=r.column,u=o.line-n,d=o.column,h=Math.max(l-(s+1),0),f=Math.min(e.length,u+a);l===-1&&(h=0),u===-1&&(f=e.length);let p=u-l,g={};if(p)for(let v=0;v<=p;v++){let A=v+l;if(c==null)g[A]=!0;else if(v===0){let w=e[A-1].length;g[A]=[c,w-c]}else if(v===p)g[A]=[0,d];else{let w=e[A-1].length;g[A]=[0,w]}}else if(c===d)c!=null?g[l]=[c,0]:g[l]=!0;else{let v=c??0,A=d??v;g[l]=[v,A-v]}return{start:h,end:f,markerLines:g}}function kUt(i,e,t={},n){let{defs:r,highlight:o}=n||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},s=(t.startLine||1)-1,a=i.split(CYe),{start:l,end:c,markerLines:u}=TUt(e,a,t,s),d=e.start&&typeof e.start.column=="number",h=String(c+s).length,f=o(i).split(CYe,c).slice(l,c).map((p,g)=>{let v=l+1+g,A=` ${` ${v+s}`.slice(-h)} |`,w=u[v],C=!u[v+1];if(w){let _="";if(Array.isArray(w)){let E=p.slice(0,w[0]).replace(/[^\t]/g," "),I=w[1]||1;_=[` - `,r.gutter(A.replace(/\d/g," "))," ",E,r.marker("^").repeat(I)].join(""),C&&t.message&&(_+=" "+r.message(t.message))}return[r.marker(">"),r.gutter(A),p.length>0?` ${p}`:"",_].join("")}else return` ${r.gutter(A)}${p.length>0?` ${p}`:""}`}).join(` +`).trim(),c=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(l);MK.register(a,c?.[2]??l,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let o=this._deliveryQueue.current===this;if(this._size*J9t<=t.length){let r=0;for(let s=0;s0}},Yqe=()=>new RK,RK=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Jm=class extends q{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Br,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},mR=class extends Jm{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}},FK=class extends q{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}},OK=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new q({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){let t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),He(zf(()=>{this.hasListeners&&this.unhook(t);let o=this.events.indexOf(t);this.events.splice(o,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(let e of this.events)e.listener?.dispose();this.events=[]}},wb=class{constructor(){this.data=[]}wrapEvent(e,t,n){return(o,r,s)=>e(a=>{let l=this.data[this.data.length-1];if(!t){l?l.buffers.push(()=>o.call(r,a)):o.call(r,a);return}let c=l;if(!c){o.call(r,t(n,a));return}c.items??=[],c.items.push(a),c.buffers.length===0&&l.buffers.push(()=>{c.reducedResult??=n?c.items.reduce(t,n):c.items.reduce(t),o.call(r,c.reducedResult)})},void 0,s)}bufferEvents(e){let t={buffers:new Array};this.data.push(t);let n=e();return this.data.pop(),t.buffers.forEach(o=>o()),n}},S6=class{constructor(){this.listening=!1,this.inputEvent=Ee.None,this.inputEventListener=H.None,this.emitter=new q({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});function E6(i){let e=new Mi;return i.add({dispose(){e.cancel()}}),e.token}var Kqe,Nt,gR,Mi,sn=D(()=>{et();Kqe=Object.freeze(function(i,e){let t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}});(function(i){function e(t){return t===i.None||t===i.Cancelled||t instanceof gR?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}i.isCancellationToken=e,i.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ee.None}),i.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Kqe})})(Nt||(Nt={}));gR=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Kqe:(this._emitter||(this._emitter=new q),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Mi=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new gR),this._token}cancel(){this._token?this._token instanceof gR&&this._token.cancel():this._token=Nt.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof gR&&this._token.dispose():this._token=Nt.None}}});function Qo(i,e){let t=(e&65535)<<16>>>0;return(i|t)>>>0}var D6,PK,v1e,y1e,x1e,$9t,e7t,t7t,i7t,BK,w1e,xb,Bp=D(()=>{D6=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},PK=new D6,v1e=new D6,y1e=new D6,x1e=new Array(230),$9t={},e7t=[],t7t=Object.create(null),i7t=Object.create(null),BK=[],w1e=[];for(let i=0;i<=193;i++)BK[i]=-1;for(let i=0;i<=132;i++)w1e[i]=-1;(function(){let e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],t=[],n=[];for(let o of e){let[r,s,a,l,c,u,d,h,f]=o;if(n[s]||(n[s]=!0,e7t[s]=a,t7t[a]=s,i7t[a.toLowerCase()]=s,r&&(BK[s]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(w1e[l]=s))),!t[l]){if(t[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);PK.define(l,c),v1e.define(l,h||c),y1e.define(l,f||h||c)}u&&(x1e[u]=l),d&&($9t[d]=l)}w1e[3]=46})();(function(i){function e(a){return PK.keyCodeToStr(a)}i.toString=e;function t(a){return PK.strToKeyCode(a)}i.fromString=t;function n(a){return v1e.keyCodeToStr(a)}i.toUserSettingsUS=n;function o(a){return y1e.keyCodeToStr(a)}i.toUserSettingsGeneral=o;function r(a){return v1e.strToKeyCode(a)||y1e.strToKeyCode(a)}i.fromUserSettings=r;function s(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return PK.keyCodeToStr(a)}i.toElectronAccelerator=s})(xb||(xb={}))});function T6(){return globalThis._VSCODE_NLS_MESSAGES}function bk(){return globalThis._VSCODE_NLS_LANGUAGE}var C1e=D(()=>{});function zK(i,e){let t;return e.length===0?t=i:t=i.replace(/\{(\d+)\}/g,(n,o)=>{let r=o[0],s=e[r],a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),n7t&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function y(i,e,...t){return zK(typeof i=="number"?Jqe(i,e):e,t)}function Jqe(i,e){let t=T6()?.[i];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${i} !!!`)}return t}function Ft(i,e,...t){let n;typeof i=="number"?n=Jqe(i,e):n=e;let o=zK(n,t);return{value:o,original:e===n?o:zK(e,t)}}var n7t,Be=D(()=>{C1e();C1e();n7t=bk()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function jK(){if(!$qe){$qe=!0;let i=new Uint8Array(2);i[0]=1,i[1]=2,Zqe=new Uint16Array(i.buffer)[0]===513}return Zqe}var bR,I6,L6,k6,o7t,eYe,S1e,r7t,E1e,s7t,tYe,VK,HK,Xqe,a7t,Tw,kw,Xm,iYe,l7t,_1e,Fo,jt,Cr,Bh,Cb,c7t,nYe,Ou,WK,Bv,oYe,u7t,UK,Ja,Zqe,$qe,D1e,rYe,sYe,aYe,lYe,wi=D(()=>{Be();bR="en",I6=!1,L6=!1,k6=!1,o7t=!1,eYe=!1,S1e=!1,r7t=!1,E1e=!1,s7t=!1,tYe=!1,HK=bR,Xqe=bR,kw=globalThis;typeof kw.vscode<"u"&&typeof kw.vscode.process<"u"?Xm=kw.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Xm=process);iYe=typeof Xm?.versions?.electron=="string",l7t=iYe&&Xm?.type==="renderer";if(typeof Xm=="object"){I6=Xm.platform==="win32",L6=Xm.platform==="darwin",k6=Xm.platform==="linux",o7t=k6&&!!Xm.env.SNAP&&!!Xm.env.SNAP_REVISION,r7t=iYe,s7t=!!Xm.env.CI||!!Xm.env.BUILD_ARTIFACTSTAGINGDIRECTORY,VK=bR,HK=bR;let i=Xm.env.VSCODE_NLS_CONFIG;if(i)try{let e=JSON.parse(i);VK=e.userLocale,Xqe=e.osLocale,HK=e.resolvedLanguage||bR,a7t=e.languagePack?.translationsConfigFile}catch{}eYe=!0}else typeof navigator=="object"&&!l7t?(Tw=navigator.userAgent,I6=Tw.indexOf("Windows")>=0,L6=Tw.indexOf("Macintosh")>=0,E1e=(Tw.indexOf("Macintosh")>=0||Tw.indexOf("iPad")>=0||Tw.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,k6=Tw.indexOf("Linux")>=0,tYe=Tw?.indexOf("Mobi")>=0,S1e=!0,HK=bk()||bR,VK=navigator.language.toLowerCase(),Xqe=VK):console.error("Unable to resolve platform.");_1e=0;L6?_1e=1:I6?_1e=3:k6&&(_1e=2);Fo=I6,jt=L6,Cr=k6,Bh=eYe,Cb=S1e,c7t=S1e&&typeof kw.importScripts=="function",nYe=c7t?kw.origin:void 0,Ou=E1e,WK=tYe,Bv=Tw,oYe=HK,u7t=typeof kw.postMessage=="function"&&!kw.importScripts,UK=(()=>{if(u7t){let i=[];kw.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,o=i.length;n{let n=++e;i.push({id:n,callback:t}),kw.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})(),Ja=L6||E1e?2:I6?1:3,Zqe=!0,$qe=!1;D1e=!!(Bv&&Bv.indexOf("Chrome")>=0),rYe=!!(Bv&&Bv.indexOf("Firefox")>=0),sYe=!!(!D1e&&Bv&&Bv.indexOf("Safari")>=0),aYe=!!(Bv&&Bv.indexOf("Edg/")>=0),lYe=!!(Bv&&Bv.indexOf("Android")>=0)});var AR,T1e,N6,M6,cYe,k1e=D(()=>{wi();T1e=globalThis.vscode;if(typeof T1e<"u"&&typeof T1e.process<"u"){let i=T1e.process;AR={get platform(){return i.platform},get arch(){return i.arch},get env(){return i.env},cwd(){return i.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?AR={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:AR={get platform(){return Fo?"win32":jt?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};N6=AR.cwd,M6=AR.env,cYe=AR.platform});function b7t(i,e){if(i===null||typeof i!="object")throw new QK(e,"Object",i)}function Wl(i,e){if(typeof i!="string")throw new QK(e,"string",i)}function po(i){return i===ud||i===zp}function I1e(i){return i===ud}function G_(i){return i>=h7t&&i<=p7t||i>=f7t&&i<=m7t}function GK(i,e,t,n){let o="",r=0,s=-1,a=0,l=0;for(let c=0;c<=i.length;++c){if(c2){let u=o.lastIndexOf(t);u===-1?(o="",r=0):(o=o.slice(0,u),r=o.length-1-o.lastIndexOf(t)),s=c,a=0;continue}else if(o.length!==0){o="",r=0,s=c,a=0;continue}}e&&(o+=o.length>0?`${t}..`:"..",r=2)}else o.length>0?o+=`${t}${i.slice(s+1,c)}`:o=i.slice(s+1,c),r=c-s-1;s=c,a=0}else l===q_&&a!==-1?++a:a=-1}return o}function A7t(i){return i?`${i[0]==="."?"":"."}${i}`:""}function uYe(i,e){b7t(e,"pathObject");let t=e.dir||e.root,n=e.base||`${e.name||""}${A7t(e.ext)}`;return t?t===e.root?`${t}${n}`:`${t}${i}${n}`:n}var h7t,f7t,p7t,m7t,q_,ud,zp,Q_,g7t,QK,Iw,Kd,v7t,Sr,qK,dYe,hYe,fYe,YK,_b,pYe,Vf,eA=D(()=>{k1e();h7t=65,f7t=97,p7t=90,m7t=122,q_=46,ud=47,zp=92,Q_=58,g7t=63,QK=class extends Error{constructor(e,t,n){let o;typeof t=="string"&&t.indexOf("not ")===0?(o="must not be",t=t.replace(/^not /,"")):o="must be";let r=e.indexOf(".")!==-1?"property":"argument",s=`The "${e}" ${r} ${o} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};Iw=cYe==="win32";Kd={resolve(...i){let e="",t="",n=!1;for(let o=i.length-1;o>=-1;o--){let r;if(o>=0){if(r=i[o],Wl(r,`paths[${o}]`),r.length===0)continue}else e.length===0?r=N6():(r=M6[`=${e}`]||N6(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===zp)&&(r=`${e}\\`));let s=r.length,a=0,l="",c=!1,u=r.charCodeAt(0);if(s===1)po(u)&&(a=1,c=!0);else if(po(u))if(c=!0,po(r.charCodeAt(1))){let d=2,h=d;for(;d2&&po(r.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t=`${r.slice(a)}\\${t}`,n=c,c&&e.length>0)break}return t=GK(t,!n,"\\",po),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(i){Wl(i,"path");let e=i.length;if(e===0)return".";let t=0,n,o=!1,r=i.charCodeAt(0);if(e===1)return I1e(r)?"\\":i;if(po(r))if(o=!0,po(i.charCodeAt(1))){let a=2,l=a;for(;a2&&po(i.charCodeAt(2))&&(o=!0,t=3));let s=t0&&po(i.charCodeAt(e-1))&&(s+="\\"),n===void 0?o?`\\${s}`:s:o?`${n}\\${s}`:`${n}${s}`},isAbsolute(i){Wl(i,"path");let e=i.length;if(e===0)return!1;let t=i.charCodeAt(0);return po(t)||e>2&&G_(t)&&i.charCodeAt(1)===Q_&&po(i.charCodeAt(2))},join(...i){if(i.length===0)return".";let e,t;for(let r=0;r0&&(e===void 0?e=t=s:e+=`\\${s}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof t=="string"&&po(t.charCodeAt(0))){++o;let r=t.length;r>1&&po(t.charCodeAt(1))&&(++o,r>2&&(po(t.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return Kd.normalize(e)},relative(i,e){if(Wl(i,"from"),Wl(e,"to"),i===e)return"";let t=Kd.resolve(i),n=Kd.resolve(e);if(t===n||(i=t.toLowerCase(),e=n.toLowerCase(),i===e))return"";let o=0;for(;oo&&i.charCodeAt(r-1)===zp;)r--;let s=r-o,a=0;for(;aa&&e.charCodeAt(l-1)===zp;)l--;let c=l-a,u=su){if(e.charCodeAt(a+h)===zp)return n.slice(a+h+1);if(h===2)return n.slice(a+h)}s>u&&(i.charCodeAt(o+h)===zp?d=h:h===2&&(d=3)),d===-1&&(d=0)}let f="";for(h=o+d+1;h<=r;++h)(h===r||i.charCodeAt(h)===zp)&&(f+=f.length===0?"..":"\\..");return a+=d,f.length>0?`${f}${n.slice(a,l)}`:(n.charCodeAt(a)===zp&&++a,n.slice(a,l))},toNamespacedPath(i){if(typeof i!="string"||i.length===0)return i;let e=Kd.resolve(i);if(e.length<=2)return i;if(e.charCodeAt(0)===zp){if(e.charCodeAt(1)===zp){let t=e.charCodeAt(2);if(t!==g7t&&t!==q_)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(G_(e.charCodeAt(0))&&e.charCodeAt(1)===Q_&&e.charCodeAt(2)===zp)return`\\\\?\\${e}`;return i},dirname(i){Wl(i,"path");let e=i.length;if(e===0)return".";let t=-1,n=0,o=i.charCodeAt(0);if(e===1)return po(o)?i:".";if(po(o)){if(t=n=1,po(i.charCodeAt(1))){let a=2,l=a;for(;a2&&po(i.charCodeAt(2))?3:2,n=t);let r=-1,s=!0;for(let a=e-1;a>=n;--a)if(po(i.charCodeAt(a))){if(!s){r=a;break}}else s=!1;if(r===-1){if(t===-1)return".";r=t}return i.slice(0,r)},basename(i,e){e!==void 0&&Wl(e,"suffix"),Wl(i,"path");let t=0,n=-1,o=!0,r;if(i.length>=2&&G_(i.charCodeAt(0))&&i.charCodeAt(1)===Q_&&(t=2),e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(r=i.length-1;r>=t;--r){let l=i.charCodeAt(r);if(po(l)){if(!o){t=r+1;break}}else a===-1&&(o=!1,a=r+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=r):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=t;--r)if(po(i.charCodeAt(r))){if(!o){t=r+1;break}}else n===-1&&(o=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Wl(i,"path");let e=0,t=-1,n=0,o=-1,r=!0,s=0;i.length>=2&&i.charCodeAt(1)===Q_&&G_(i.charCodeAt(0))&&(e=n=2);for(let a=i.length-1;a>=e;--a){let l=i.charCodeAt(a);if(po(l)){if(!r){n=a+1;break}continue}o===-1&&(r=!1,o=a+1),l===q_?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||o===-1||s===0||s===1&&t===o-1&&t===n+1?"":i.slice(t,o)},format:uYe.bind(null,"\\"),parse(i){Wl(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.length,n=0,o=i.charCodeAt(0);if(t===1)return po(o)?(e.root=e.dir=i,e):(e.base=e.name=i,e);if(po(o)){if(n=1,po(i.charCodeAt(1))){let d=2,h=d;for(;d0&&(e.root=i.slice(0,n));let r=-1,s=n,a=-1,l=!0,c=i.length-1,u=0;for(;c>=n;--c){if(o=i.charCodeAt(c),po(o)){if(!l){s=c+1;break}continue}a===-1&&(l=!1,a=c+1),o===q_?r===-1?r=c:u!==1&&(u=1):r!==-1&&(u=-1)}return a!==-1&&(r===-1||u===0||u===1&&r===a-1&&r===s+1?e.base=e.name=i.slice(s,a):(e.name=i.slice(s,r),e.base=i.slice(s,a),e.ext=i.slice(r,a))),s>0&&s!==n?e.dir=i.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},v7t=(()=>{if(Iw){let i=/\\/g;return()=>{let e=N6().replace(i,"/");return e.slice(e.indexOf("/"))}}return()=>N6()})(),Sr={resolve(...i){let e="",t=!1;for(let n=i.length-1;n>=-1&&!t;n--){let o=n>=0?i[n]:v7t();Wl(o,`paths[${n}]`),o.length!==0&&(e=`${o}/${e}`,t=o.charCodeAt(0)===ud)}return e=GK(e,!t,"/",I1e),t?`/${e}`:e.length>0?e:"."},normalize(i){if(Wl(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===ud,t=i.charCodeAt(i.length-1)===ud;return i=GK(i,!e,"/",I1e),i.length===0?e?"/":t?"./":".":(t&&(i+="/"),e?`/${i}`:i)},isAbsolute(i){return Wl(i,"path"),i.length>0&&i.charCodeAt(0)===ud},join(...i){if(i.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Sr.normalize(e)},relative(i,e){if(Wl(i,"from"),Wl(e,"to"),i===e||(i=Sr.resolve(i),e=Sr.resolve(e),i===e))return"";let t=1,n=i.length,o=n-t,r=1,s=e.length-r,a=oa){if(e.charCodeAt(r+c)===ud)return e.slice(r+c+1);if(c===0)return e.slice(r+c)}else o>a&&(i.charCodeAt(t+c)===ud?l=c:c===0&&(l=0));let u="";for(c=t+l+1;c<=n;++c)(c===n||i.charCodeAt(c)===ud)&&(u+=u.length===0?"..":"/..");return`${u}${e.slice(r+l)}`},toNamespacedPath(i){return i},dirname(i){if(Wl(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===ud,t=-1,n=!0;for(let o=i.length-1;o>=1;--o)if(i.charCodeAt(o)===ud){if(!n){t=o;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":i.slice(0,t)},basename(i,e){e!==void 0&&Wl(e,"ext"),Wl(i,"path");let t=0,n=-1,o=!0,r;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(r=i.length-1;r>=0;--r){let l=i.charCodeAt(r);if(l===ud){if(!o){t=r+1;break}}else a===-1&&(o=!1,a=r+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=r):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=0;--r)if(i.charCodeAt(r)===ud){if(!o){t=r+1;break}}else n===-1&&(o=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Wl(i,"path");let e=-1,t=0,n=-1,o=!0,r=0;for(let s=i.length-1;s>=0;--s){let a=i.charCodeAt(s);if(a===ud){if(!o){t=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===q_?e===-1?e=s:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===t+1?"":i.slice(e,n)},format:uYe.bind(null,"/"),parse(i){Wl(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.charCodeAt(0)===ud,n;t?(e.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,l=i.length-1,c=0;for(;l>=n;--l){let u=i.charCodeAt(l);if(u===ud){if(!a){r=l+1;break}continue}s===-1&&(a=!1,s=l+1),u===q_?o===-1?o=l:c!==1&&(c=1):o!==-1&&(c=-1)}if(s!==-1){let u=r===0&&t?1:r;o===-1||c===0||c===1&&o===s-1&&o===r+1?e.base=e.name=i.slice(u,s):(e.name=i.slice(u,o),e.base=i.slice(u,s),e.ext=i.slice(o,s))}return r>0?e.dir=i.slice(0,r-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Sr.win32=Kd.win32=Kd;Sr.posix=Kd.posix=Sr;qK=Iw?Kd.normalize:Sr.normalize,dYe=Iw?Kd.join:Sr.join,hYe=Iw?Kd.resolve:Sr.resolve,fYe=Iw?Kd.relative:Sr.relative,YK=Iw?Kd.dirname:Sr.dirname,_b=Iw?Kd.basename:Sr.basename,pYe=Iw?Kd.extname:Sr.extname,Vf=Iw?Kd.sep:Sr.sep});function C7t(i,e){if(!i.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!y7t.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!w7t.test(i.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(x7t.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function _7t(i,e){return!i&&!e?"file":i}function S7t(i,e){switch(i){case"https":case"http":case"file":e?e[0]!==tA&&(e=tA+e):e=tA;break}return e}function mYe(i,e,t){let n,o=-1;for(let r=0;r=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47||t&&s===91||t&&s===93||t&&s===58)o!==-1&&(n+=encodeURIComponent(i.substring(o,r)),o=-1),n!==void 0&&(n+=i.charAt(r));else{n===void 0&&(n=i.substr(0,r));let a=AYe[s];a!==void 0?(o!==-1&&(n+=encodeURIComponent(i.substring(o,r)),o=-1),n+=a):o===-1&&(o=r)}}return o!==-1&&(n+=encodeURIComponent(i.substring(o))),n!==void 0?n:i}function D7t(i){let e;for(let t=0;t1&&i.scheme==="file"?t=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?e?t=i.path.substr(1):t=i.path[1].toLowerCase()+i.path.substr(2):t=i.path,Fo&&(t=t.replace(/\//g,"\\")),t}function L1e(i,e){let t=e?D7t:mYe,n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=i;if(o&&(n+=o,n+=":"),(r||o==="file")&&(n+=tA,n+=tA),r){let c=r.indexOf("@");if(c!==-1){let u=r.substr(0,c);r=r.substr(c+1),c=u.lastIndexOf(":"),c===-1?n+=t(u,!1,!1):(n+=t(u.substr(0,c),!1,!1),n+=":",n+=t(u.substr(c+1),!1,!0)),n+="@"}r=r.toLowerCase(),c=r.lastIndexOf(":"),c===-1?n+=t(r,!1,!0):(n+=t(r.substr(0,c),!1,!0),n+=r.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let c=s.charCodeAt(1);c>=65&&c<=90&&(s=`/${String.fromCharCode(c+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let c=s.charCodeAt(0);c>=65&&c<=90&&(s=`${String.fromCharCode(c+32)}:${s.substr(2)}`)}n+=t(s,!0,!1)}return a&&(n+="?",n+=t(a,!1,!1)),l&&(n+="#",n+=e?l:mYe(l,!1,!1)),n}function vYe(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+vYe(i.substr(3)):i}}function JK(i){return i.match(gYe)?i.replace(gYe,e=>vYe(e)):i}var y7t,w7t,x7t,Gs,tA,E7t,Je,bYe,Y_,AYe,gYe,mn=D(()=>{eA();wi();y7t=/^\w[\w\d+.-]*$/,w7t=/^\//,x7t=/^\/\//;Gs="",tA="/",E7t=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Je=class i{static isUri(e){return e instanceof i?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,n,o,r,s=!1){typeof e=="object"?(this.scheme=e.scheme||Gs,this.authority=e.authority||Gs,this.path=e.path||Gs,this.query=e.query||Gs,this.fragment=e.fragment||Gs):(this.scheme=_7t(e,s),this.authority=t||Gs,this.path=S7t(this.scheme,n||Gs),this.query=o||Gs,this.fragment=r||Gs,C7t(this,s))}get fsPath(){return R6(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:o,query:r,fragment:s}=e;return t===void 0?t=this.scheme:t===null&&(t=Gs),n===void 0?n=this.authority:n===null&&(n=Gs),o===void 0?o=this.path:o===null&&(o=Gs),r===void 0?r=this.query:r===null&&(r=Gs),s===void 0?s=this.fragment:s===null&&(s=Gs),t===this.scheme&&n===this.authority&&o===this.path&&r===this.query&&s===this.fragment?this:new Y_(t,n,o,r,s)}static parse(e,t=!1){let n=E7t.exec(e);return n?new Y_(n[2]||Gs,JK(n[4]||Gs),JK(n[5]||Gs),JK(n[7]||Gs),JK(n[9]||Gs),t):new Y_(Gs,Gs,Gs,Gs,Gs)}static file(e){let t=Gs;if(Fo&&(e=e.replace(/\\/g,tA)),e[0]===tA&&e[1]===tA){let n=e.indexOf(tA,2);n===-1?(t=e.substring(2),e=tA):(t=e.substring(2,n),e=e.substring(n)||tA)}return new Y_("file",t,e,Gs,Gs)}static from(e,t){return new Y_(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return Fo&&e.scheme==="file"?n=i.file(Kd.join(R6(e,!0),...t)).path:n=Sr.join(e.path,...t),e.with({path:n})}toString(e=!1){return L1e(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof i)return e;{let t=new Y_(e);return t._formatted=e.external??null,t._fsPath=e._sep===bYe?e.fsPath??null:null,t}}else return e}},bYe=Fo?1:void 0,Y_=class extends Je{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=R6(this,!1)),this._fsPath}toString(e=!1){return e?L1e(this,!0):(this._formatted||(this._formatted=L1e(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=bYe),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},AYe={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};gYe=/(%[0-9A-Za-z][0-9A-Za-z])+/g});var J,kt=D(()=>{J=class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{kt();R=class i{constructor(e,t,n,o){e>n||e===n&&t>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return i.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return i.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return i.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return i.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return i.plusRange(this,e)}static plusRange(e,t){let n,o,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new i(n,o,r,s)}intersectRanges(e){return i.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,u=t.endColumn;return nc?(r=c,s=u):r===c&&(s=Math.min(s,u)),n>r||n===r&&o>s?null:new i(n,o,r,s)}equalsRange(e){return i.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return i.getEndPosition(this)}static getEndPosition(e){return new J(e.endLineNumber,e.endColumn)}getStartPosition(){return i.getStartPosition(this)}static getStartPosition(e){return new J(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new i(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new i(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return i.collapseToStart(this)}static collapseToStart(e){return new i(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return i.collapseToEnd(this)}static collapseToEnd(e){return new i(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new i(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}});var qe,Qn=D(()=>{kt();Ue();qe=class i extends R{constructor(e,t,n,o){super(e,t,n,o),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=o}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return i.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new i(this.startLineNumber,this.startColumn,e,t):new i(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new J(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new J(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new i(e,t,this.endLineNumber,this.endColumn):new i(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new i(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new i(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n"u"}function Hf(i){return!Pu(i)}function Pu(i){return Xa(i)||i===null}function gi(i,e){if(!i)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Sb(i){if(Pu(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function K_(i){return typeof i=="function"}function wYe(i,e){let t=Math.min(i.length,e.length);for(let n=0;n{});function F(i,e){if(Na(e)){let t=M1e[e];if(t===void 0)throw new Error(`${i} references an unknown codicon: ${e}`);e=t}return M1e[i]=e,{id:i}}function ZK(){return M1e}var M1e,F6=D(()=>{gn();M1e=Object.create(null)});var xYe,CYe=D(()=>{F6();xYe={add:F("add",6e4),plus:F("plus",6e4),gistNew:F("gist-new",6e4),repoCreate:F("repo-create",6e4),lightbulb:F("lightbulb",60001),lightBulb:F("light-bulb",60001),repo:F("repo",60002),repoDelete:F("repo-delete",60002),gistFork:F("gist-fork",60003),repoForked:F("repo-forked",60003),gitPullRequest:F("git-pull-request",60004),gitPullRequestAbandoned:F("git-pull-request-abandoned",60004),recordKeys:F("record-keys",60005),keyboard:F("keyboard",60005),tag:F("tag",60006),gitPullRequestLabel:F("git-pull-request-label",60006),tagAdd:F("tag-add",60006),tagRemove:F("tag-remove",60006),person:F("person",60007),personFollow:F("person-follow",60007),personOutline:F("person-outline",60007),personFilled:F("person-filled",60007),gitBranch:F("git-branch",60008),gitBranchCreate:F("git-branch-create",60008),gitBranchDelete:F("git-branch-delete",60008),sourceControl:F("source-control",60008),mirror:F("mirror",60009),mirrorPublic:F("mirror-public",60009),star:F("star",60010),starAdd:F("star-add",60010),starDelete:F("star-delete",60010),starEmpty:F("star-empty",60010),comment:F("comment",60011),commentAdd:F("comment-add",60011),alert:F("alert",60012),warning:F("warning",60012),search:F("search",60013),searchSave:F("search-save",60013),logOut:F("log-out",60014),signOut:F("sign-out",60014),logIn:F("log-in",60015),signIn:F("sign-in",60015),eye:F("eye",60016),eyeUnwatch:F("eye-unwatch",60016),eyeWatch:F("eye-watch",60016),circleFilled:F("circle-filled",60017),primitiveDot:F("primitive-dot",60017),closeDirty:F("close-dirty",60017),debugBreakpoint:F("debug-breakpoint",60017),debugBreakpointDisabled:F("debug-breakpoint-disabled",60017),debugHint:F("debug-hint",60017),terminalDecorationSuccess:F("terminal-decoration-success",60017),primitiveSquare:F("primitive-square",60018),edit:F("edit",60019),pencil:F("pencil",60019),info:F("info",60020),issueOpened:F("issue-opened",60020),gistPrivate:F("gist-private",60021),gitForkPrivate:F("git-fork-private",60021),lock:F("lock",60021),mirrorPrivate:F("mirror-private",60021),close:F("close",60022),removeClose:F("remove-close",60022),x:F("x",60022),repoSync:F("repo-sync",60023),sync:F("sync",60023),clone:F("clone",60024),desktopDownload:F("desktop-download",60024),beaker:F("beaker",60025),microscope:F("microscope",60025),vm:F("vm",60026),deviceDesktop:F("device-desktop",60026),file:F("file",60027),fileText:F("file-text",60027),more:F("more",60028),ellipsis:F("ellipsis",60028),kebabHorizontal:F("kebab-horizontal",60028),mailReply:F("mail-reply",60029),reply:F("reply",60029),organization:F("organization",60030),organizationFilled:F("organization-filled",60030),organizationOutline:F("organization-outline",60030),newFile:F("new-file",60031),fileAdd:F("file-add",60031),newFolder:F("new-folder",60032),fileDirectoryCreate:F("file-directory-create",60032),trash:F("trash",60033),trashcan:F("trashcan",60033),history:F("history",60034),clock:F("clock",60034),folder:F("folder",60035),fileDirectory:F("file-directory",60035),symbolFolder:F("symbol-folder",60035),logoGithub:F("logo-github",60036),markGithub:F("mark-github",60036),github:F("github",60036),terminal:F("terminal",60037),console:F("console",60037),repl:F("repl",60037),zap:F("zap",60038),symbolEvent:F("symbol-event",60038),error:F("error",60039),stop:F("stop",60039),variable:F("variable",60040),symbolVariable:F("symbol-variable",60040),array:F("array",60042),symbolArray:F("symbol-array",60042),symbolModule:F("symbol-module",60043),symbolPackage:F("symbol-package",60043),symbolNamespace:F("symbol-namespace",60043),symbolObject:F("symbol-object",60043),symbolMethod:F("symbol-method",60044),symbolFunction:F("symbol-function",60044),symbolConstructor:F("symbol-constructor",60044),symbolBoolean:F("symbol-boolean",60047),symbolNull:F("symbol-null",60047),symbolNumeric:F("symbol-numeric",60048),symbolNumber:F("symbol-number",60048),symbolStructure:F("symbol-structure",60049),symbolStruct:F("symbol-struct",60049),symbolParameter:F("symbol-parameter",60050),symbolTypeParameter:F("symbol-type-parameter",60050),symbolKey:F("symbol-key",60051),symbolText:F("symbol-text",60051),symbolReference:F("symbol-reference",60052),goToFile:F("go-to-file",60052),symbolEnum:F("symbol-enum",60053),symbolValue:F("symbol-value",60053),symbolRuler:F("symbol-ruler",60054),symbolUnit:F("symbol-unit",60054),activateBreakpoints:F("activate-breakpoints",60055),archive:F("archive",60056),arrowBoth:F("arrow-both",60057),arrowDown:F("arrow-down",60058),arrowLeft:F("arrow-left",60059),arrowRight:F("arrow-right",60060),arrowSmallDown:F("arrow-small-down",60061),arrowSmallLeft:F("arrow-small-left",60062),arrowSmallRight:F("arrow-small-right",60063),arrowSmallUp:F("arrow-small-up",60064),arrowUp:F("arrow-up",60065),bell:F("bell",60066),bold:F("bold",60067),book:F("book",60068),bookmark:F("bookmark",60069),debugBreakpointConditionalUnverified:F("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:F("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:F("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:F("debug-breakpoint-data-unverified",60072),debugBreakpointData:F("debug-breakpoint-data",60073),debugBreakpointDataDisabled:F("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:F("debug-breakpoint-log-unverified",60074),debugBreakpointLog:F("debug-breakpoint-log",60075),debugBreakpointLogDisabled:F("debug-breakpoint-log-disabled",60075),briefcase:F("briefcase",60076),broadcast:F("broadcast",60077),browser:F("browser",60078),bug:F("bug",60079),calendar:F("calendar",60080),caseSensitive:F("case-sensitive",60081),check:F("check",60082),checklist:F("checklist",60083),chevronDown:F("chevron-down",60084),chevronLeft:F("chevron-left",60085),chevronRight:F("chevron-right",60086),chevronUp:F("chevron-up",60087),chromeClose:F("chrome-close",60088),chromeMaximize:F("chrome-maximize",60089),chromeMinimize:F("chrome-minimize",60090),chromeRestore:F("chrome-restore",60091),circleOutline:F("circle-outline",60092),circle:F("circle",60092),debugBreakpointUnverified:F("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:F("terminal-decoration-incomplete",60092),circleSlash:F("circle-slash",60093),circuitBoard:F("circuit-board",60094),clearAll:F("clear-all",60095),clippy:F("clippy",60096),closeAll:F("close-all",60097),cloudDownload:F("cloud-download",60098),cloudUpload:F("cloud-upload",60099),code:F("code",60100),collapseAll:F("collapse-all",60101),colorMode:F("color-mode",60102),commentDiscussion:F("comment-discussion",60103),creditCard:F("credit-card",60105),dash:F("dash",60108),dashboard:F("dashboard",60109),database:F("database",60110),debugContinue:F("debug-continue",60111),debugDisconnect:F("debug-disconnect",60112),debugPause:F("debug-pause",60113),debugRestart:F("debug-restart",60114),debugStart:F("debug-start",60115),debugStepInto:F("debug-step-into",60116),debugStepOut:F("debug-step-out",60117),debugStepOver:F("debug-step-over",60118),debugStop:F("debug-stop",60119),debug:F("debug",60120),deviceCameraVideo:F("device-camera-video",60121),deviceCamera:F("device-camera",60122),deviceMobile:F("device-mobile",60123),diffAdded:F("diff-added",60124),diffIgnored:F("diff-ignored",60125),diffModified:F("diff-modified",60126),diffRemoved:F("diff-removed",60127),diffRenamed:F("diff-renamed",60128),diff:F("diff",60129),diffSidebyside:F("diff-sidebyside",60129),discard:F("discard",60130),editorLayout:F("editor-layout",60131),emptyWindow:F("empty-window",60132),exclude:F("exclude",60133),extensions:F("extensions",60134),eyeClosed:F("eye-closed",60135),fileBinary:F("file-binary",60136),fileCode:F("file-code",60137),fileMedia:F("file-media",60138),filePdf:F("file-pdf",60139),fileSubmodule:F("file-submodule",60140),fileSymlinkDirectory:F("file-symlink-directory",60141),fileSymlinkFile:F("file-symlink-file",60142),fileZip:F("file-zip",60143),files:F("files",60144),filter:F("filter",60145),flame:F("flame",60146),foldDown:F("fold-down",60147),foldUp:F("fold-up",60148),fold:F("fold",60149),folderActive:F("folder-active",60150),folderOpened:F("folder-opened",60151),gear:F("gear",60152),gift:F("gift",60153),gistSecret:F("gist-secret",60154),gist:F("gist",60155),gitCommit:F("git-commit",60156),gitCompare:F("git-compare",60157),compareChanges:F("compare-changes",60157),gitMerge:F("git-merge",60158),githubAction:F("github-action",60159),githubAlt:F("github-alt",60160),globe:F("globe",60161),grabber:F("grabber",60162),graph:F("graph",60163),gripper:F("gripper",60164),heart:F("heart",60165),home:F("home",60166),horizontalRule:F("horizontal-rule",60167),hubot:F("hubot",60168),inbox:F("inbox",60169),issueReopened:F("issue-reopened",60171),issues:F("issues",60172),italic:F("italic",60173),jersey:F("jersey",60174),json:F("json",60175),kebabVertical:F("kebab-vertical",60176),key:F("key",60177),law:F("law",60178),lightbulbAutofix:F("lightbulb-autofix",60179),linkExternal:F("link-external",60180),link:F("link",60181),listOrdered:F("list-ordered",60182),listUnordered:F("list-unordered",60183),liveShare:F("live-share",60184),loading:F("loading",60185),location:F("location",60186),mailRead:F("mail-read",60187),mail:F("mail",60188),markdown:F("markdown",60189),megaphone:F("megaphone",60190),mention:F("mention",60191),milestone:F("milestone",60192),gitPullRequestMilestone:F("git-pull-request-milestone",60192),mortarBoard:F("mortar-board",60193),move:F("move",60194),multipleWindows:F("multiple-windows",60195),mute:F("mute",60196),noNewline:F("no-newline",60197),note:F("note",60198),octoface:F("octoface",60199),openPreview:F("open-preview",60200),package:F("package",60201),paintcan:F("paintcan",60202),pin:F("pin",60203),play:F("play",60204),run:F("run",60204),plug:F("plug",60205),preserveCase:F("preserve-case",60206),preview:F("preview",60207),project:F("project",60208),pulse:F("pulse",60209),question:F("question",60210),quote:F("quote",60211),radioTower:F("radio-tower",60212),reactions:F("reactions",60213),references:F("references",60214),refresh:F("refresh",60215),regex:F("regex",60216),remoteExplorer:F("remote-explorer",60217),remote:F("remote",60218),remove:F("remove",60219),replaceAll:F("replace-all",60220),replace:F("replace",60221),repoClone:F("repo-clone",60222),repoForcePush:F("repo-force-push",60223),repoPull:F("repo-pull",60224),repoPush:F("repo-push",60225),report:F("report",60226),requestChanges:F("request-changes",60227),rocket:F("rocket",60228),rootFolderOpened:F("root-folder-opened",60229),rootFolder:F("root-folder",60230),rss:F("rss",60231),ruby:F("ruby",60232),saveAll:F("save-all",60233),saveAs:F("save-as",60234),save:F("save",60235),screenFull:F("screen-full",60236),screenNormal:F("screen-normal",60237),searchStop:F("search-stop",60238),server:F("server",60240),settingsGear:F("settings-gear",60241),settings:F("settings",60242),shield:F("shield",60243),smiley:F("smiley",60244),sortPrecedence:F("sort-precedence",60245),splitHorizontal:F("split-horizontal",60246),splitVertical:F("split-vertical",60247),squirrel:F("squirrel",60248),starFull:F("star-full",60249),starHalf:F("star-half",60250),symbolClass:F("symbol-class",60251),symbolColor:F("symbol-color",60252),symbolConstant:F("symbol-constant",60253),symbolEnumMember:F("symbol-enum-member",60254),symbolField:F("symbol-field",60255),symbolFile:F("symbol-file",60256),symbolInterface:F("symbol-interface",60257),symbolKeyword:F("symbol-keyword",60258),symbolMisc:F("symbol-misc",60259),symbolOperator:F("symbol-operator",60260),symbolProperty:F("symbol-property",60261),wrench:F("wrench",60261),wrenchSubaction:F("wrench-subaction",60261),symbolSnippet:F("symbol-snippet",60262),tasklist:F("tasklist",60263),telescope:F("telescope",60264),textSize:F("text-size",60265),threeBars:F("three-bars",60266),thumbsdown:F("thumbsdown",60267),thumbsup:F("thumbsup",60268),tools:F("tools",60269),triangleDown:F("triangle-down",60270),triangleLeft:F("triangle-left",60271),triangleRight:F("triangle-right",60272),triangleUp:F("triangle-up",60273),twitter:F("twitter",60274),unfold:F("unfold",60275),unlock:F("unlock",60276),unmute:F("unmute",60277),unverified:F("unverified",60278),verified:F("verified",60279),versions:F("versions",60280),vmActive:F("vm-active",60281),vmOutline:F("vm-outline",60282),vmRunning:F("vm-running",60283),watch:F("watch",60284),whitespace:F("whitespace",60285),wholeWord:F("whole-word",60286),window:F("window",60287),wordWrap:F("word-wrap",60288),zoomIn:F("zoom-in",60289),zoomOut:F("zoom-out",60290),listFilter:F("list-filter",60291),listFlat:F("list-flat",60292),listSelection:F("list-selection",60293),selection:F("selection",60293),listTree:F("list-tree",60294),debugBreakpointFunctionUnverified:F("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:F("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:F("debug-breakpoint-function-disabled",60296),debugStackframeActive:F("debug-stackframe-active",60297),circleSmallFilled:F("circle-small-filled",60298),debugStackframeDot:F("debug-stackframe-dot",60298),terminalDecorationMark:F("terminal-decoration-mark",60298),debugStackframe:F("debug-stackframe",60299),debugStackframeFocused:F("debug-stackframe-focused",60299),debugBreakpointUnsupported:F("debug-breakpoint-unsupported",60300),symbolString:F("symbol-string",60301),debugReverseContinue:F("debug-reverse-continue",60302),debugStepBack:F("debug-step-back",60303),debugRestartFrame:F("debug-restart-frame",60304),debugAlt:F("debug-alt",60305),callIncoming:F("call-incoming",60306),callOutgoing:F("call-outgoing",60307),menu:F("menu",60308),expandAll:F("expand-all",60309),feedback:F("feedback",60310),gitPullRequestReviewer:F("git-pull-request-reviewer",60310),groupByRefType:F("group-by-ref-type",60311),ungroupByRefType:F("ungroup-by-ref-type",60312),account:F("account",60313),gitPullRequestAssignee:F("git-pull-request-assignee",60313),bellDot:F("bell-dot",60314),debugConsole:F("debug-console",60315),library:F("library",60316),output:F("output",60317),runAll:F("run-all",60318),syncIgnored:F("sync-ignored",60319),pinned:F("pinned",60320),githubInverted:F("github-inverted",60321),serverProcess:F("server-process",60322),serverEnvironment:F("server-environment",60323),pass:F("pass",60324),issueClosed:F("issue-closed",60324),stopCircle:F("stop-circle",60325),playCircle:F("play-circle",60326),record:F("record",60327),debugAltSmall:F("debug-alt-small",60328),vmConnect:F("vm-connect",60329),cloud:F("cloud",60330),merge:F("merge",60331),export:F("export",60332),graphLeft:F("graph-left",60333),magnet:F("magnet",60334),notebook:F("notebook",60335),redo:F("redo",60336),checkAll:F("check-all",60337),pinnedDirty:F("pinned-dirty",60338),passFilled:F("pass-filled",60339),circleLargeFilled:F("circle-large-filled",60340),circleLarge:F("circle-large",60341),circleLargeOutline:F("circle-large-outline",60341),combine:F("combine",60342),gather:F("gather",60342),table:F("table",60343),variableGroup:F("variable-group",60344),typeHierarchy:F("type-hierarchy",60345),typeHierarchySub:F("type-hierarchy-sub",60346),typeHierarchySuper:F("type-hierarchy-super",60347),gitPullRequestCreate:F("git-pull-request-create",60348),runAbove:F("run-above",60349),runBelow:F("run-below",60350),notebookTemplate:F("notebook-template",60351),debugRerun:F("debug-rerun",60352),workspaceTrusted:F("workspace-trusted",60353),workspaceUntrusted:F("workspace-untrusted",60354),workspaceUnknown:F("workspace-unknown",60355),terminalCmd:F("terminal-cmd",60356),terminalDebian:F("terminal-debian",60357),terminalLinux:F("terminal-linux",60358),terminalPowershell:F("terminal-powershell",60359),terminalTmux:F("terminal-tmux",60360),terminalUbuntu:F("terminal-ubuntu",60361),terminalBash:F("terminal-bash",60362),arrowSwap:F("arrow-swap",60363),copy:F("copy",60364),personAdd:F("person-add",60365),filterFilled:F("filter-filled",60366),wand:F("wand",60367),debugLineByLine:F("debug-line-by-line",60368),inspect:F("inspect",60369),layers:F("layers",60370),layersDot:F("layers-dot",60371),layersActive:F("layers-active",60372),compass:F("compass",60373),compassDot:F("compass-dot",60374),compassActive:F("compass-active",60375),azure:F("azure",60376),issueDraft:F("issue-draft",60377),gitPullRequestClosed:F("git-pull-request-closed",60378),gitPullRequestDraft:F("git-pull-request-draft",60379),debugAll:F("debug-all",60380),debugCoverage:F("debug-coverage",60381),runErrors:F("run-errors",60382),folderLibrary:F("folder-library",60383),debugContinueSmall:F("debug-continue-small",60384),beakerStop:F("beaker-stop",60385),graphLine:F("graph-line",60386),graphScatter:F("graph-scatter",60387),pieChart:F("pie-chart",60388),bracket:F("bracket",60175),bracketDot:F("bracket-dot",60389),bracketError:F("bracket-error",60390),lockSmall:F("lock-small",60391),azureDevops:F("azure-devops",60392),verifiedFilled:F("verified-filled",60393),newline:F("newline",60394),layout:F("layout",60395),layoutActivitybarLeft:F("layout-activitybar-left",60396),layoutActivitybarRight:F("layout-activitybar-right",60397),layoutPanelLeft:F("layout-panel-left",60398),layoutPanelCenter:F("layout-panel-center",60399),layoutPanelJustify:F("layout-panel-justify",60400),layoutPanelRight:F("layout-panel-right",60401),layoutPanel:F("layout-panel",60402),layoutSidebarLeft:F("layout-sidebar-left",60403),layoutSidebarRight:F("layout-sidebar-right",60404),layoutStatusbar:F("layout-statusbar",60405),layoutMenubar:F("layout-menubar",60406),layoutCentered:F("layout-centered",60407),target:F("target",60408),indent:F("indent",60409),recordSmall:F("record-small",60410),errorSmall:F("error-small",60411),terminalDecorationError:F("terminal-decoration-error",60411),arrowCircleDown:F("arrow-circle-down",60412),arrowCircleLeft:F("arrow-circle-left",60413),arrowCircleRight:F("arrow-circle-right",60414),arrowCircleUp:F("arrow-circle-up",60415),layoutSidebarRightOff:F("layout-sidebar-right-off",60416),layoutPanelOff:F("layout-panel-off",60417),layoutSidebarLeftOff:F("layout-sidebar-left-off",60418),blank:F("blank",60419),heartFilled:F("heart-filled",60420),map:F("map",60421),mapHorizontal:F("map-horizontal",60421),foldHorizontal:F("fold-horizontal",60421),mapFilled:F("map-filled",60422),mapHorizontalFilled:F("map-horizontal-filled",60422),foldHorizontalFilled:F("fold-horizontal-filled",60422),circleSmall:F("circle-small",60423),bellSlash:F("bell-slash",60424),bellSlashDot:F("bell-slash-dot",60425),commentUnresolved:F("comment-unresolved",60426),gitPullRequestGoToChanges:F("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:F("git-pull-request-new-changes",60428),searchFuzzy:F("search-fuzzy",60429),commentDraft:F("comment-draft",60430),send:F("send",60431),sparkle:F("sparkle",60432),insert:F("insert",60433),mic:F("mic",60434),thumbsdownFilled:F("thumbsdown-filled",60435),thumbsupFilled:F("thumbsup-filled",60436),coffee:F("coffee",60437),snake:F("snake",60438),game:F("game",60439),vr:F("vr",60440),chip:F("chip",60441),piano:F("piano",60442),music:F("music",60443),micFilled:F("mic-filled",60444),repoFetch:F("repo-fetch",60445),copilot:F("copilot",60446),lightbulbSparkle:F("lightbulb-sparkle",60447),robot:F("robot",60448),sparkleFilled:F("sparkle-filled",60449),diffSingle:F("diff-single",60450),diffMultiple:F("diff-multiple",60451),surroundWith:F("surround-with",60452),share:F("share",60453),gitStash:F("git-stash",60454),gitStashApply:F("git-stash-apply",60455),gitStashPop:F("git-stash-pop",60456),vscode:F("vscode",60457),vscodeInsiders:F("vscode-insiders",60458),codeOss:F("code-oss",60459),runCoverage:F("run-coverage",60460),runAllCoverage:F("run-all-coverage",60461),coverage:F("coverage",60462),githubProject:F("github-project",60463),mapVertical:F("map-vertical",60464),foldVertical:F("fold-vertical",60464),mapVerticalFilled:F("map-vertical-filled",60465),foldVerticalFilled:F("fold-vertical-filled",60465),goToSearch:F("go-to-search",60466),percentage:F("percentage",60467),sortPercentage:F("sort-percentage",60467),attach:F("attach",60468)}});var I7t,De,oo=D(()=>{F6();CYe();I7t={dialogError:F("dialog-error","error"),dialogWarning:F("dialog-warning","warning"),dialogInfo:F("dialog-info","info"),dialogClose:F("dialog-close","close"),treeItemExpanded:F("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:F("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:F("tree-filter-on-type-off","list-selection"),treeFilterClear:F("tree-filter-clear","close"),treeItemLoading:F("tree-item-loading","loading"),menuSelection:F("menu-selection","check"),menuSubmenu:F("menu-submenu","chevron-right"),menuBarMore:F("menubar-more","more"),scrollbarButtonLeft:F("scrollbar-button-left","triangle-left"),scrollbarButtonRight:F("scrollbar-button-right","triangle-right"),scrollbarButtonUp:F("scrollbar-button-up","triangle-up"),scrollbarButtonDown:F("scrollbar-button-down","triangle-down"),toolBarMore:F("toolbar-more","more"),quickInputBack:F("quick-input-back","arrow-left"),dropDownButton:F("drop-down-button",60084),symbolCustomColor:F("symbol-customcolor",60252),exportIcon:F("export",60332),workspaceUnspecified:F("workspace-unspecified",60355),newLine:F("newline",60394),thumbsDownFilled:F("thumbsdown-filled",60435),thumbsUpFilled:F("thumbsup-filled",60436),gitFetch:F("git-fetch",60445),lightbulbSparkleAutofix:F("lightbulb-sparkle-autofix",60447),debugBreakpointPending:F("debug-breakpoint-pending",60377)},De={...xYe,...I7t}});var O6,R1e,_Ye=D(()=>{et();de();O6=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),He(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();let n=new R1e(this,e,t);return this._factories.set(e,n),He(()=>{let o=this._factories.get(e);!o||o!==n||(this._factories.delete(e),o.dispose())})}async getOrCreate(e){let t=this.get(e);if(t)return t;let n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},R1e=class extends H{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}});function SYe(i){return i&&Je.isUri(i.uri)&&R.isIRange(i.range)&&(R.isIRange(i.originSelectionRange)||R.isIRange(i.targetSelectionRange))}function EYe(i,e){return y("symbolAriaLabel","{0} ({1})",i,L7t[e])}var iA,J_,Lw,Jd,Ak,Wf,vR,vk,Zm,X_,L7t,yR,Vv,$K,yk,eJ,P6,tJ,Gn,z6,B6,ro=D(()=>{oo();mn();Ue();_Ye();Be();iA=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},J_=class{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}},Lw=class{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}};(function(i){i[i.Increase=0]="Increase",i[i.Decrease=1]="Decrease"})(Jd||(Jd={}));(function(i){let e=new Map;e.set(0,De.symbolMethod),e.set(1,De.symbolFunction),e.set(2,De.symbolConstructor),e.set(3,De.symbolField),e.set(4,De.symbolVariable),e.set(5,De.symbolClass),e.set(6,De.symbolStruct),e.set(7,De.symbolInterface),e.set(8,De.symbolModule),e.set(9,De.symbolProperty),e.set(10,De.symbolEvent),e.set(11,De.symbolOperator),e.set(12,De.symbolUnit),e.set(13,De.symbolValue),e.set(15,De.symbolEnum),e.set(14,De.symbolConstant),e.set(15,De.symbolEnum),e.set(16,De.symbolEnumMember),e.set(17,De.symbolKeyword),e.set(27,De.symbolSnippet),e.set(18,De.symbolText),e.set(19,De.symbolColor),e.set(20,De.symbolFile),e.set(21,De.symbolReference),e.set(22,De.symbolCustomColor),e.set(23,De.symbolFolder),e.set(24,De.symbolTypeParameter),e.set(25,De.account),e.set(26,De.issues);function t(r){let s=e.get(r);return s||(console.info("No codicon found for CompletionItemKind "+r),s=De.symbolProperty),s}i.toIcon=t;let n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function o(r,s){let a=n.get(r);return typeof a>"u"&&!s&&(a=9),a}i.fromString=o})(Ak||(Ak={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(Wf||(Wf={}));vR=class{constructor(e,t,n,o){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=o}equals(e){return R.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}};(function(i){i[i.Automatic=0]="Automatic",i[i.PasteAs=1]="PasteAs"})(vk||(vk={}));(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(Zm||(Zm={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(X_||(X_={}));L7t={17:y("Array","array"),16:y("Boolean","boolean"),4:y("Class","class"),13:y("Constant","constant"),8:y("Constructor","constructor"),9:y("Enum","enumeration"),21:y("EnumMember","enumeration member"),23:y("Event","event"),7:y("Field","field"),0:y("File","file"),11:y("Function","function"),10:y("Interface","interface"),19:y("Key","key"),5:y("Method","method"),1:y("Module","module"),2:y("Namespace","namespace"),20:y("Null","null"),15:y("Number","number"),18:y("Object","object"),24:y("Operator","operator"),3:y("Package","package"),6:y("Property","property"),14:y("String","string"),22:y("Struct","struct"),25:y("TypeParameter","type parameter"),12:y("Variable","variable")};(function(i){let e=new Map;e.set(0,De.symbolFile),e.set(1,De.symbolModule),e.set(2,De.symbolNamespace),e.set(3,De.symbolPackage),e.set(4,De.symbolClass),e.set(5,De.symbolMethod),e.set(6,De.symbolProperty),e.set(7,De.symbolField),e.set(8,De.symbolConstructor),e.set(9,De.symbolEnum),e.set(10,De.symbolInterface),e.set(11,De.symbolFunction),e.set(12,De.symbolVariable),e.set(13,De.symbolConstant),e.set(14,De.symbolString),e.set(15,De.symbolNumber),e.set(16,De.symbolBoolean),e.set(17,De.symbolArray),e.set(18,De.symbolObject),e.set(19,De.symbolKey),e.set(20,De.symbolNull),e.set(21,De.symbolEnumMember),e.set(22,De.symbolStruct),e.set(23,De.symbolEvent),e.set(24,De.symbolOperator),e.set(25,De.symbolTypeParameter);function t(n){let o=e.get(n);return o||(console.info("No codicon found for SymbolKind "+n),o=De.symbolProperty),o}i.toIcon=t})(yR||(yR={}));Vv=class i{static{this.Comment=new i("comment")}static{this.Imports=new i("imports")}static{this.Region=new i("region")}static fromValue(e){switch(e){case"comment":return i.Comment;case"imports":return i.Imports;case"region":return i.Region}return new i(e)}constructor(e){this.value=e}};(function(i){i[i.AIGenerated=1]="AIGenerated"})($K||($K={}));(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(yk||(yk={}));(function(i){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}i.is=e})(eJ||(eJ={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(P6||(P6={}));tJ=class{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}},Gn=new O6,z6=new O6;(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(B6||(B6={}))});var iJ,nJ,oJ,rJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,bJ,AJ,vJ,yJ,wJ,xJ,Hv,V6,CJ,_J,SJ,EJ,DJ,TJ,kJ,IJ,LJ,NJ,MJ,RJ,FJ,OJ,PJ,BJ,zJ,VJ,HJ,WJ,UJ,jJ,QJ,xk=D(()=>{(function(i){i[i.Unknown=0]="Unknown",i[i.Disabled=1]="Disabled",i[i.Enabled=2]="Enabled"})(iJ||(iJ={}));(function(i){i[i.Invoke=1]="Invoke",i[i.Auto=2]="Auto"})(nJ||(nJ={}));(function(i){i[i.None=0]="None",i[i.KeepWhitespace=1]="KeepWhitespace",i[i.InsertAsSnippet=4]="InsertAsSnippet"})(oJ||(oJ={}));(function(i){i[i.Method=0]="Method",i[i.Function=1]="Function",i[i.Constructor=2]="Constructor",i[i.Field=3]="Field",i[i.Variable=4]="Variable",i[i.Class=5]="Class",i[i.Struct=6]="Struct",i[i.Interface=7]="Interface",i[i.Module=8]="Module",i[i.Property=9]="Property",i[i.Event=10]="Event",i[i.Operator=11]="Operator",i[i.Unit=12]="Unit",i[i.Value=13]="Value",i[i.Constant=14]="Constant",i[i.Enum=15]="Enum",i[i.EnumMember=16]="EnumMember",i[i.Keyword=17]="Keyword",i[i.Text=18]="Text",i[i.Color=19]="Color",i[i.File=20]="File",i[i.Reference=21]="Reference",i[i.Customcolor=22]="Customcolor",i[i.Folder=23]="Folder",i[i.TypeParameter=24]="TypeParameter",i[i.User=25]="User",i[i.Issue=26]="Issue",i[i.Snippet=27]="Snippet"})(rJ||(rJ={}));(function(i){i[i.Deprecated=1]="Deprecated"})(sJ||(sJ={}));(function(i){i[i.Invoke=0]="Invoke",i[i.TriggerCharacter=1]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(aJ||(aJ={}));(function(i){i[i.EXACT=0]="EXACT",i[i.ABOVE=1]="ABOVE",i[i.BELOW=2]="BELOW"})(lJ||(lJ={}));(function(i){i[i.NotSet=0]="NotSet",i[i.ContentFlush=1]="ContentFlush",i[i.RecoverFromMarkers=2]="RecoverFromMarkers",i[i.Explicit=3]="Explicit",i[i.Paste=4]="Paste",i[i.Undo=5]="Undo",i[i.Redo=6]="Redo"})(cJ||(cJ={}));(function(i){i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(uJ||(uJ={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(dJ||(dJ={}));(function(i){i[i.None=0]="None",i[i.Keep=1]="Keep",i[i.Brackets=2]="Brackets",i[i.Advanced=3]="Advanced",i[i.Full=4]="Full"})(hJ||(hJ={}));(function(i){i[i.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",i[i.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",i[i.accessibilitySupport=2]="accessibilitySupport",i[i.accessibilityPageSize=3]="accessibilityPageSize",i[i.ariaLabel=4]="ariaLabel",i[i.ariaRequired=5]="ariaRequired",i[i.autoClosingBrackets=6]="autoClosingBrackets",i[i.autoClosingComments=7]="autoClosingComments",i[i.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",i[i.autoClosingDelete=9]="autoClosingDelete",i[i.autoClosingOvertype=10]="autoClosingOvertype",i[i.autoClosingQuotes=11]="autoClosingQuotes",i[i.autoIndent=12]="autoIndent",i[i.automaticLayout=13]="automaticLayout",i[i.autoSurround=14]="autoSurround",i[i.bracketPairColorization=15]="bracketPairColorization",i[i.guides=16]="guides",i[i.codeLens=17]="codeLens",i[i.codeLensFontFamily=18]="codeLensFontFamily",i[i.codeLensFontSize=19]="codeLensFontSize",i[i.colorDecorators=20]="colorDecorators",i[i.colorDecoratorsLimit=21]="colorDecoratorsLimit",i[i.columnSelection=22]="columnSelection",i[i.comments=23]="comments",i[i.contextmenu=24]="contextmenu",i[i.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",i[i.cursorBlinking=26]="cursorBlinking",i[i.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",i[i.cursorStyle=28]="cursorStyle",i[i.cursorSurroundingLines=29]="cursorSurroundingLines",i[i.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",i[i.cursorWidth=31]="cursorWidth",i[i.disableLayerHinting=32]="disableLayerHinting",i[i.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",i[i.domReadOnly=34]="domReadOnly",i[i.dragAndDrop=35]="dragAndDrop",i[i.dropIntoEditor=36]="dropIntoEditor",i[i.emptySelectionClipboard=37]="emptySelectionClipboard",i[i.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",i[i.extraEditorClassName=39]="extraEditorClassName",i[i.fastScrollSensitivity=40]="fastScrollSensitivity",i[i.find=41]="find",i[i.fixedOverflowWidgets=42]="fixedOverflowWidgets",i[i.folding=43]="folding",i[i.foldingStrategy=44]="foldingStrategy",i[i.foldingHighlight=45]="foldingHighlight",i[i.foldingImportsByDefault=46]="foldingImportsByDefault",i[i.foldingMaximumRegions=47]="foldingMaximumRegions",i[i.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",i[i.fontFamily=49]="fontFamily",i[i.fontInfo=50]="fontInfo",i[i.fontLigatures=51]="fontLigatures",i[i.fontSize=52]="fontSize",i[i.fontWeight=53]="fontWeight",i[i.fontVariations=54]="fontVariations",i[i.formatOnPaste=55]="formatOnPaste",i[i.formatOnType=56]="formatOnType",i[i.glyphMargin=57]="glyphMargin",i[i.gotoLocation=58]="gotoLocation",i[i.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",i[i.hover=60]="hover",i[i.inDiffEditor=61]="inDiffEditor",i[i.inlineSuggest=62]="inlineSuggest",i[i.inlineEdit=63]="inlineEdit",i[i.letterSpacing=64]="letterSpacing",i[i.lightbulb=65]="lightbulb",i[i.lineDecorationsWidth=66]="lineDecorationsWidth",i[i.lineHeight=67]="lineHeight",i[i.lineNumbers=68]="lineNumbers",i[i.lineNumbersMinChars=69]="lineNumbersMinChars",i[i.linkedEditing=70]="linkedEditing",i[i.links=71]="links",i[i.matchBrackets=72]="matchBrackets",i[i.minimap=73]="minimap",i[i.mouseStyle=74]="mouseStyle",i[i.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",i[i.mouseWheelZoom=76]="mouseWheelZoom",i[i.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",i[i.multiCursorModifier=78]="multiCursorModifier",i[i.multiCursorPaste=79]="multiCursorPaste",i[i.multiCursorLimit=80]="multiCursorLimit",i[i.occurrencesHighlight=81]="occurrencesHighlight",i[i.overviewRulerBorder=82]="overviewRulerBorder",i[i.overviewRulerLanes=83]="overviewRulerLanes",i[i.padding=84]="padding",i[i.pasteAs=85]="pasteAs",i[i.parameterHints=86]="parameterHints",i[i.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",i[i.placeholder=88]="placeholder",i[i.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",i[i.quickSuggestions=90]="quickSuggestions",i[i.quickSuggestionsDelay=91]="quickSuggestionsDelay",i[i.readOnly=92]="readOnly",i[i.readOnlyMessage=93]="readOnlyMessage",i[i.renameOnType=94]="renameOnType",i[i.renderControlCharacters=95]="renderControlCharacters",i[i.renderFinalNewline=96]="renderFinalNewline",i[i.renderLineHighlight=97]="renderLineHighlight",i[i.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",i[i.renderValidationDecorations=99]="renderValidationDecorations",i[i.renderWhitespace=100]="renderWhitespace",i[i.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",i[i.roundedSelection=102]="roundedSelection",i[i.rulers=103]="rulers",i[i.scrollbar=104]="scrollbar",i[i.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",i[i.scrollBeyondLastLine=106]="scrollBeyondLastLine",i[i.scrollPredominantAxis=107]="scrollPredominantAxis",i[i.selectionClipboard=108]="selectionClipboard",i[i.selectionHighlight=109]="selectionHighlight",i[i.selectOnLineNumbers=110]="selectOnLineNumbers",i[i.showFoldingControls=111]="showFoldingControls",i[i.showUnused=112]="showUnused",i[i.snippetSuggestions=113]="snippetSuggestions",i[i.smartSelect=114]="smartSelect",i[i.smoothScrolling=115]="smoothScrolling",i[i.stickyScroll=116]="stickyScroll",i[i.stickyTabStops=117]="stickyTabStops",i[i.stopRenderingLineAfter=118]="stopRenderingLineAfter",i[i.suggest=119]="suggest",i[i.suggestFontSize=120]="suggestFontSize",i[i.suggestLineHeight=121]="suggestLineHeight",i[i.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",i[i.suggestSelection=123]="suggestSelection",i[i.tabCompletion=124]="tabCompletion",i[i.tabIndex=125]="tabIndex",i[i.unicodeHighlighting=126]="unicodeHighlighting",i[i.unusualLineTerminators=127]="unusualLineTerminators",i[i.useShadowDOM=128]="useShadowDOM",i[i.useTabStops=129]="useTabStops",i[i.wordBreak=130]="wordBreak",i[i.wordSegmenterLocales=131]="wordSegmenterLocales",i[i.wordSeparators=132]="wordSeparators",i[i.wordWrap=133]="wordWrap",i[i.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",i[i.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",i[i.wordWrapColumn=136]="wordWrapColumn",i[i.wordWrapOverride1=137]="wordWrapOverride1",i[i.wordWrapOverride2=138]="wordWrapOverride2",i[i.wrappingIndent=139]="wrappingIndent",i[i.wrappingStrategy=140]="wrappingStrategy",i[i.showDeprecated=141]="showDeprecated",i[i.inlayHints=142]="inlayHints",i[i.editorClassName=143]="editorClassName",i[i.pixelRatio=144]="pixelRatio",i[i.tabFocusMode=145]="tabFocusMode",i[i.layoutInfo=146]="layoutInfo",i[i.wrappingInfo=147]="wrappingInfo",i[i.defaultColorDecorators=148]="defaultColorDecorators",i[i.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",i[i.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(fJ||(fJ={}));(function(i){i[i.TextDefined=0]="TextDefined",i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(pJ||(pJ={}));(function(i){i[i.LF=0]="LF",i[i.CRLF=1]="CRLF"})(mJ||(mJ={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(gJ||(gJ={}));(function(i){i[i.Increase=0]="Increase",i[i.Decrease=1]="Decrease"})(bJ||(bJ={}));(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(AJ||(AJ={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(vJ||(vJ={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(yJ||(yJ={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(wJ||(wJ={}));(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(xJ||(xJ={}));(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.F20=78]="F20",i[i.F21=79]="F21",i[i.F22=80]="F22",i[i.F23=81]="F23",i[i.F24=82]="F24",i[i.NumLock=83]="NumLock",i[i.ScrollLock=84]="ScrollLock",i[i.Semicolon=85]="Semicolon",i[i.Equal=86]="Equal",i[i.Comma=87]="Comma",i[i.Minus=88]="Minus",i[i.Period=89]="Period",i[i.Slash=90]="Slash",i[i.Backquote=91]="Backquote",i[i.BracketLeft=92]="BracketLeft",i[i.Backslash=93]="Backslash",i[i.BracketRight=94]="BracketRight",i[i.Quote=95]="Quote",i[i.OEM_8=96]="OEM_8",i[i.IntlBackslash=97]="IntlBackslash",i[i.Numpad0=98]="Numpad0",i[i.Numpad1=99]="Numpad1",i[i.Numpad2=100]="Numpad2",i[i.Numpad3=101]="Numpad3",i[i.Numpad4=102]="Numpad4",i[i.Numpad5=103]="Numpad5",i[i.Numpad6=104]="Numpad6",i[i.Numpad7=105]="Numpad7",i[i.Numpad8=106]="Numpad8",i[i.Numpad9=107]="Numpad9",i[i.NumpadMultiply=108]="NumpadMultiply",i[i.NumpadAdd=109]="NumpadAdd",i[i.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=111]="NumpadSubtract",i[i.NumpadDecimal=112]="NumpadDecimal",i[i.NumpadDivide=113]="NumpadDivide",i[i.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",i[i.ABNT_C1=115]="ABNT_C1",i[i.ABNT_C2=116]="ABNT_C2",i[i.AudioVolumeMute=117]="AudioVolumeMute",i[i.AudioVolumeUp=118]="AudioVolumeUp",i[i.AudioVolumeDown=119]="AudioVolumeDown",i[i.BrowserSearch=120]="BrowserSearch",i[i.BrowserHome=121]="BrowserHome",i[i.BrowserBack=122]="BrowserBack",i[i.BrowserForward=123]="BrowserForward",i[i.MediaTrackNext=124]="MediaTrackNext",i[i.MediaTrackPrevious=125]="MediaTrackPrevious",i[i.MediaStop=126]="MediaStop",i[i.MediaPlayPause=127]="MediaPlayPause",i[i.LaunchMediaPlayer=128]="LaunchMediaPlayer",i[i.LaunchMail=129]="LaunchMail",i[i.LaunchApp2=130]="LaunchApp2",i[i.Clear=131]="Clear",i[i.MAX_VALUE=132]="MAX_VALUE"})(Hv||(Hv={}));(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(V6||(V6={}));(function(i){i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated"})(CJ||(CJ={}));(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(_J||(_J={}));(function(i){i[i.Normal=1]="Normal",i[i.Underlined=2]="Underlined"})(SJ||(SJ={}));(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.TEXTAREA=1]="TEXTAREA",i[i.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",i[i.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",i[i.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",i[i.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",i[i.CONTENT_TEXT=6]="CONTENT_TEXT",i[i.CONTENT_EMPTY=7]="CONTENT_EMPTY",i[i.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",i[i.CONTENT_WIDGET=9]="CONTENT_WIDGET",i[i.OVERVIEW_RULER=10]="OVERVIEW_RULER",i[i.SCROLLBAR=11]="SCROLLBAR",i[i.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",i[i.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(EJ||(EJ={}));(function(i){i[i.AIGenerated=1]="AIGenerated"})(DJ||(DJ={}));(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(TJ||(TJ={}));(function(i){i[i.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",i[i.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",i[i.TOP_CENTER=2]="TOP_CENTER"})(kJ||(kJ={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(IJ||(IJ={}));(function(i){i[i.Word=0]="Word",i[i.Line=1]="Line",i[i.Suggest=2]="Suggest"})(LJ||(LJ={}));(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.None=2]="None",i[i.LeftOfInjectedText=3]="LeftOfInjectedText",i[i.RightOfInjectedText=4]="RightOfInjectedText"})(NJ||(NJ={}));(function(i){i[i.Off=0]="Off",i[i.On=1]="On",i[i.Relative=2]="Relative",i[i.Interval=3]="Interval",i[i.Custom=4]="Custom"})(MJ||(MJ={}));(function(i){i[i.None=0]="None",i[i.Text=1]="Text",i[i.Blocks=2]="Blocks"})(RJ||(RJ={}));(function(i){i[i.Smooth=0]="Smooth",i[i.Immediate=1]="Immediate"})(FJ||(FJ={}));(function(i){i[i.Auto=1]="Auto",i[i.Hidden=2]="Hidden",i[i.Visible=3]="Visible"})(OJ||(OJ={}));(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})(PJ||(PJ={}));(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(BJ||(BJ={}));(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(zJ||(zJ={}));(function(i){i[i.File=0]="File",i[i.Module=1]="Module",i[i.Namespace=2]="Namespace",i[i.Package=3]="Package",i[i.Class=4]="Class",i[i.Method=5]="Method",i[i.Property=6]="Property",i[i.Field=7]="Field",i[i.Constructor=8]="Constructor",i[i.Enum=9]="Enum",i[i.Interface=10]="Interface",i[i.Function=11]="Function",i[i.Variable=12]="Variable",i[i.Constant=13]="Constant",i[i.String=14]="String",i[i.Number=15]="Number",i[i.Boolean=16]="Boolean",i[i.Array=17]="Array",i[i.Object=18]="Object",i[i.Key=19]="Key",i[i.Null=20]="Null",i[i.EnumMember=21]="EnumMember",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter"})(VJ||(VJ={}));(function(i){i[i.Deprecated=1]="Deprecated"})(HJ||(HJ={}));(function(i){i[i.Hidden=0]="Hidden",i[i.Blink=1]="Blink",i[i.Smooth=2]="Smooth",i[i.Phase=3]="Phase",i[i.Expand=4]="Expand",i[i.Solid=5]="Solid"})(WJ||(WJ={}));(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(UJ||(UJ={}));(function(i){i[i.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",i[i.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",i[i.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",i[i.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(jJ||(jJ={}));(function(i){i[i.None=0]="None",i[i.Same=1]="Same",i[i.Indent=2]="Indent",i[i.DeepIndent=3]="DeepIndent"})(QJ||(QJ={}))});function GJ(){return{editor:void 0,languages:void 0,CancellationTokenSource:Mi,Emitter:q,KeyCode:Hv,KeyMod:Eb,Position:J,Range:R,Selection:qe,SelectionDirection:PJ,MarkerSeverity:V6,MarkerTag:CJ,Uri:Je,Token:iA}}var Eb,H6=D(()=>{sn();et();Bp();mn();kt();Ue();Qn();ro();xk();Eb=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return Qo(e,t)}}});var pwe={};ad(pwe,{__debug:()=>oJe,check:()=>iJe,default:()=>eKe,doc:()=>swe,format:()=>fwe,formatWithCursor:()=>hwe,getSupportInfo:()=>nJe,util:()=>awe,version:()=>$Ke});function B7t(i,e,t){return P7t.diff(i,e,t)}function U7t(i){let e=i.indexOf(q1e);return e!==-1?i.charAt(e+1)===ZJ?iKe:tKe:H7t}function Y1e(i){return i===tKe?q1e:i===iKe?nKe:W7t}function oKe(i,e){let t=j7t.get(e);return i.match(t)?.length??0}function G7t(i){return XJ(0,i,Q7t,ZJ)}function q7t(i){return this[i<0?this.length+i:i]}function K7t(i){let e=i.length;for(;e>0&&(i[e-1]==="\r"||i[e-1]===` +`);)e--;return e`'${o}'`));return`Unexpected doc.type '${i.type}'. +Expected it to be ${n}.`}function ezt(i,e,t,n){let o=[i];for(;o.length>0;){let r=o.pop();if(r===DYe){t(o.pop());continue}t&&o.push(r,DYe);let s=Tk(r);if(!s)throw new CR(r);if(e?.(r)!==!1)switch(s){case Rw:case Qv:{let a=s===Rw?r:r.parts;for(let l=a.length,c=l-1;c>=0;--c)o.push(a[c]);break}case $m:o.push(r.flatContents,r.breakContents);break;case Hp:if(n&&r.expandedStates)for(let a=r.expandedStates.length,l=a-1;l>=0;--l)o.push(r.expandedStates[l]);else o.push(r.contents);break;case Ow:case Fw:case Bw:case Gv:case zw:o.push(r.contents);break;case Dk:case tS:case Pw:case Vw:case Zd:case Tb:break;default:throw new CR(r)}}}function eX(i,e){if(typeof i=="string")return e(i);let t=new Map;return n(i);function n(r){return K1e(t,r,o)}function o(r){switch(Tk(r)){case Rw:return e(r.map(n));case Qv:return e({...r,parts:r.parts.map(n)});case $m:return e({...r,breakContents:n(r.breakContents),flatContents:n(r.flatContents)});case Hp:{let{expandedStates:s,contents:a}=r;return s?(s=s.map(n),a=s[0]):a=n(a),e({...r,contents:a,expandedStates:s})}case Ow:case Fw:case Bw:case Gv:case zw:return e({...r,contents:n(r.contents)});case Dk:case tS:case Pw:case Vw:case Zd:case Tb:return e(r);default:throw new CR(r)}}}function X1e(i,e,t){let n=t,o=!1;function r(s){if(o)return!1;let a=e(s);a!==void 0&&(o=!0,n=a)}return J1e(i,r),n}function tzt(i){if(i.type===Hp&&i.break||i.type===Zd&&i.hard||i.type===Tb)return!0}function izt(i){return X1e(i,tzt,!1)}function TYe(i){if(i.length>0){let e=Xd(0,i,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function nzt(i){let e=new Set,t=[];function n(r){if(r.type===Tb&&TYe(t),r.type===Hp){if(t.push(r),e.has(r))return!1;e.add(r)}}function o(r){r.type===Hp&&t.pop().break&&TYe(t)}J1e(i,n,o,!0)}function ozt(i){return i.type===Zd&&!i.hard?i.soft?"":" ":i.type===$m?i.flatContents:i}function rzt(i){return eX(i,ozt)}function kYe(i){for(i=[...i];i.length>=2&&Xd(0,i,-2).type===Zd&&Xd(0,i,-1).type===Tb;)i.length-=2;if(i.length>0){let e=W6(Xd(0,i,-1));i[i.length-1]=e}return i}function W6(i){switch(Tk(i)){case Fw:case Bw:case Hp:case zw:case Gv:{let e=W6(i.contents);return{...i,contents:e}}case $m:return{...i,breakContents:W6(i.breakContents),flatContents:W6(i.flatContents)};case Qv:return{...i,parts:kYe(i.parts)};case Rw:return kYe(i);case Dk:return K7t(i);case Ow:case tS:case Pw:case Vw:case Zd:case Tb:break;default:throw new CR(i)}return i}function sKe(i){return W6(azt(i))}function szt(i){switch(Tk(i)){case Qv:{let{parts:e}=i;if(e.every(t=>t===""))return"";if(e.length===1)return e[0];break}case Hp:if(!i.contents&&!i.id&&!i.break&&!i.expandedStates)return"";if(i.contents.type===Hp&&i.contents.id===i.id&&i.contents.break===i.break&&i.contents.expandedStates===i.expandedStates)return i.contents;break;case Ow:case Fw:case Bw:case zw:if(!i.contents)return"";break;case $m:if(!i.flatContents&&!i.breakContents)return"";break;case Rw:{let e=[];for(let t of i){if(!t)continue;let[n,...o]=Array.isArray(t)?t:[t];typeof n=="string"&&typeof Xd(0,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...o)}return e.length===0?"":e.length===1?e[0]:e}case Dk:case tS:case Pw:case Vw:case Zd:case Gv:case Tb:break;default:throw new CR(i)}return i}function azt(i){return eX(i,e=>szt(e))}function lzt(i,e=pKe){return eX(i,t=>typeof t=="string"?dKe(e,t.split(` +`)):t)}function czt(i){if(i.type===Zd)return!0}function uzt(i){return X1e(i,czt,!1)}function YJ(i,e){return i.type===Gv?{...i,contents:e(i.contents)}:e(i)}function JJ(i){return jv(i),{type:Fw,contents:i}}function _R(i,e){return hzt(i),jv(e),{type:Ow,contents:e,n:i}}function fzt(i){return _R(Number.NEGATIVE_INFINITY,i)}function lKe(i){return _R({type:"root"},i)}function pzt(i){return _R(-1,i)}function cKe(i,e,t){jv(i);let n=i;if(e>0){for(let o=0;o0?`, { ${l.join(", ")} }`:"";return`indentIfBreak(${n(r.contents)}${c})`}if(r.type===Hp){let l=[];r.break&&r.break!=="propagated"&&l.push("shouldBreak: true"),r.id&&l.push(`id: ${o(r.id)}`);let c=l.length>0?`, { ${l.join(", ")} }`:"";return r.expandedStates?`conditionalGroup([${r.expandedStates.map(u=>n(u)).join(",")}]${c})`:`group(${n(r.contents)}${c})`}if(r.type===Qv)return`fill([${r.parts.map(l=>n(l)).join(", ")}])`;if(r.type===zw)return"lineSuffix("+n(r.contents)+")";if(r.type===Vw)return"lineSuffixBoundary";if(r.type===Gv)return`label(${JSON.stringify(r.label)}, ${n(r.contents)})`;if(r.type===tS)return"cursor";throw new Error("Unknown doc type "+r.type)}function o(r){if(typeof r!="symbol")return JSON.stringify(String(r));if(r in e)return e[r];let s=r.description||"symbol";for(let a=0;;a++){let l=s+(a>0?` #${a}`:"");if(!t.has(l))return t.add(l),e[r]=`Symbol.for(${JSON.stringify(l)})`}}}function Nzt(i){let e=i[0],t=i[1];for(let n=0;n=o&&IYe<=r)return[o,r];r-o>t-e&&(e=o,t=r)}return[e,t]}function Bzt(i){if(!i)return 0;if(!Pzt.test(i))return i.length;let e=0;i=i.replace(_zt(),t=>(e+=Ozt(t)?1:2,""));for(let t of i){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(e+=Mzt(n)||Rzt(n)?2:1)}return e}function AKe(i,e,t){let n=e.type===1?i.queue.slice(0,-1):[...i.queue,e],o="",r=0,s=0,a=0;for(let p of n)switch(p.type){case 0:u(),t.useTabs?l(1):c(t.tabWidth);break;case 3:{let{string:g}=p;u(),o+=g,r+=g.length;break}case 2:{let{width:g}=p;s+=1,a+=g;break}default:throw new Error(`Unexpected indent comment '${p.type}'.`)}return h(),{...i,value:o,length:r,queue:n};function l(p){o+=" ".repeat(p),r+=t.tabWidth*p}function c(p){o+=" ".repeat(p),r+=p}function u(){t.useTabs?d():h()}function d(){s>0&&l(s),f()}function h(){a>0&&c(a),f()}function f(){s=0,a=0}}function Hzt(i,e,t){if(!e)return i;if(e.type==="root")return{...i,root:i};if(e===Number.NEGATIVE_INFINITY)return i.root;let n;return typeof e=="number"?e<0?n=Vzt:n={type:2,width:e}:n={type:3,string:e},AKe(i,n,t)}function Wzt(i,e){return AKe(i,zzt,e)}function Uzt(i){let e=0;for(let t=i.length-1;t>=0;t--){let n=i[t];if(n===" "||n===" ")e++;else break}return e}function vKe(i){let e=Uzt(i);return{text:e===0?i:i.slice(0,i.length-e),count:e}}function qJ(i,e,t,n,o,r){if(t===Number.POSITIVE_INFINITY)return!0;let s=e.length,a=!1,l=[i],c="";for(;t>=0;){if(l.length===0){if(s===0)return!0;l.push(e[--s]);continue}let{mode:u,doc:d}=l.pop(),h=Tk(d);switch(h){case Dk:d&&(a&&(c+=" ",t-=1,a=!1),c+=d,t-=$1e(d));break;case Rw:case Qv:{let f=h===Rw?d:d.parts,p=d[U1e]??0;for(let g=f.length-1;g>=p;g--)l.push({mode:u,doc:f[g]});break}case Fw:case Ow:case Bw:case Gv:l.push({mode:u,doc:d.contents});break;case Pw:{let{text:f,count:p}=vKe(c);c=f,t+=p;break}case Hp:{if(r&&d.break)return!1;let f=d.break?Db:u,p=d.expandedStates&&f===Db?Xd(0,d.expandedStates,-1):d.contents;l.push({mode:f,doc:p});break}case $m:{let f=(d.groupId?o[d.groupId]||Wv:u)===Db?d.breakContents:d.flatContents;f&&l.push({mode:u,doc:f});break}case Zd:if(u===Db||d.hard)return!0;d.soft||(a=!0);break;case zw:n=!0;break;case Vw:if(n)return!1;break}}return!1}function iX(i,e){let t=Object.create(null),n=e.printWidth,o=Y1e(e.endOfLine),r=0,s=[{indent:bKe,mode:Db,doc:i}],a=!1,l=[],c=new Qzt;for(nzt(i);s.length>0;){let{indent:p,mode:g,doc:A}=s.pop();switch(Tk(A)){case Dk:{let v=o!==` +`?XJ(0,A,` +`,o):A;v&&(c.write(v),s.length>0&&(r+=$1e(v)));break}case Rw:for(let v=A.length-1;v>=0;v--)s.push({indent:p,mode:g,doc:A[v]});break;case tS:c.markPosition();break;case Fw:s.push({indent:Wzt(p,e),mode:g,doc:A.contents});break;case Ow:s.push({indent:Hzt(p,A.n,e),mode:g,doc:A.contents});break;case Pw:r-=c.trim();break;case Hp:{let v=(function(){if(g===Wv&&!a)return{indent:p,mode:A.break?Db:Wv,doc:A.contents};a=!1;let w=n-r,C=l.length>0,_={indent:p,mode:Wv,doc:A.contents};if(!A.break&&qJ(_,s,w,C,t))return _;if(!A.expandedStates)return{indent:p,mode:Db,doc:A.contents};if(!A.break)for(let E=1;E0,t,!0);if(_===1){L?s.push(T):s.push(N);break}let B={indent:p,mode:Wv,doc:I},z={indent:p,mode:Db,doc:I};if(_===2){L?s.push(B,T):s.push(z,N);break}let Q=C[w+2],Z={indent:p,mode:g,doc:{...A,[U1e]:w+2}},U=qJ({indent:p,mode:Wv,doc:[E,I,Q]},[],v,l.length>0,t,!0);s.push(Z),U?s.push(B,T):L?s.push(z,T):s.push(z,N);break}case $m:case Bw:{let v=A.groupId?t[A.groupId]:g;if(v===Db){let w=A.type===$m?A.breakContents:A.negate?A.contents:JJ(A.contents);w&&s.push({indent:p,mode:g,doc:w})}if(v===Wv){let w=A.type===$m?A.flatContents:A.negate?JJ(A.contents):A.contents;w&&s.push({indent:p,mode:g,doc:w})}break}case zw:l.push({indent:p,mode:g,doc:A.contents});break;case Vw:l.length>0&&s.push({indent:p,mode:g,doc:Z1e});break;case Zd:switch(g){case Wv:if(!A.hard){A.soft||(c.write(" "),r+=1);break}a=!0;case Db:if(l.length>0){s.push({indent:p,mode:g,doc:A},...l.reverse()),l.length=0;break}A.literal?(c.write(o),r=0,p.root&&(p.root.value&&c.write(p.root.value),r=p.root.length)):(c.trim(),c.write(o+p.value),r=p.length);break}break;case Gv:s.push({indent:p,mode:g,doc:A.contents});break;case Tb:break;default:throw new CR(A)}s.length===0&&l.length>0&&(s.push(...l.reverse()),l.length=0)}let{text:u,positions:d}=c.finish();if(d.length!==2)return{formatted:u};let[h,f]=d;return{formatted:u,cursorNodeStart:h,cursorNodeText:u.slice(h,f)}}function Gzt(i,e,t=0){let n=0;for(let o=t;o0}function Jzt(i){return i!==null&&typeof i=="object"}function G6(i){return(e,t,n)=>{if(t===!1)return!1;let o=!!n?.backwards,{length:r}=e,s=t;for(;s>=0&&s!0}=e,o=r=>twe(r)&&n(r);for(let r of t(i)){let s=i[r];if(Array.isArray(s))for(let a of s)o(a)&&(yield a);else o(s)&&(yield s)}}function*eVt(i,e){let t=[i];for(let n=0;n(o??(o=[i,...e]),n(l,o)?[l]:CKe(l,o,t))),{locStart:s,locEnd:a}=t;return r.sort((l,c)=>s(l)-s(c)||a(l)-a(c)),r}function CKe(i,e,t){return K1e(t.cache,i,n=>iVt(n,e,t))}function nVt(i){let e=i.type||i.kind||"(unknown type)",t=String(i.name||i.id&&(typeof i.id=="object"?i.id.name:i.id)||i.key&&(typeof i.key=="object"?i.key.name:i.key)||i.value&&(typeof i.value=="object"?"":String(i.value))||i.operator||"");return t.length>20&&(t=t.slice(0,19)+"\u2026"),e+(t?" "+t:"")}function iwe(i,e){(i.comments??(i.comments=[])).push(e),e.printed=!1,e.nodeDescription=nVt(i)}function U6(i,e){e.leading=!0,e.trailing=!1,iwe(i,e)}function Ck(i,e,t){e.leading=!1,e.trailing=!1,t&&(e.marker=t),iwe(i,e)}function j6(i,e){e.leading=!1,e.trailing=!0,iwe(i,e)}function EKe(i,e,t,n,o=[]){let{locStart:r,locEnd:s}=t,a=r(e),l=s(e),c=_Ke(i,o,{cache:SKe,locStart:r,locEnd:s,getVisitorKeys:t.getVisitorKeys,filter:t.printer.canAttachComment,getChildren:t.printer.getCommentChildNodes}),u,d,h=0,f=c.length;for(;h>1,g=c[p],A=r(g),v=s(g);if(A<=a&&l<=v)return EKe(g,e,t,g,[g,...o]);if(v<=a){u=g,h=p+1;continue}if(l<=A){d=g,f=p;continue}throw new Error("Comment location overlaps with node location")}if(n?.type==="TemplateLiteral"){let{quasis:p}=n,g=P1e(p,e,t);u&&P1e(p,u,t)!==g&&(u=null),d&&P1e(p,d,t)!==g&&(d=null)}return{enclosingNode:n,precedingNode:u,followingNode:d}}function oVt(i,e){let{comments:t}=i;if(delete i.comments,!yKe(t)||!e.printer.canAttachComment)return;let n=[],{printer:{features:{experimental_avoidAstMutation:o},handleComments:r={}},originalText:s}=e,{ownLine:a=O1e,endOfLine:l=O1e,remaining:c=O1e}=r,u=t.map((h,f)=>({...EKe(i,h,e),comment:h,text:s,options:e,ast:i,isLastComment:t.length-1===f,placement:void 0})),d=!o;for(let[h,f]of u.entries()){let{comment:p,precedingNode:g,enclosingNode:A,followingNode:v,text:w,options:C,ast:_,isLastComment:E}=f,I=rVt(w,C,u,h)?"ownLine":sVt(w,C,u,h)?"endOfLine":"remaining",T;if(o?(f.placement=I,T=[f]):T=[p,w,C,_,E],d&&(p.enclosingNode=A,p.precedingNode=g,p.followingNode=v),p.placement=I,I==="ownLine")a(...T)||(v?U6(v,p):g?j6(g,p):Ck(A||_,p));else if(I==="endOfLine")l(...T)||(g?j6(g,p):v?U6(v,p):Ck(A||_,p));else if(!c(...T))if(g&&v){let N=n.length;N>0&&n[N-1].followingNode!==v&&NYe(n,C),n.push(f)}else g?j6(g,p):v?U6(v,p):Ck(A||_,p)}if(NYe(n,e),d)for(let h of t)delete h.precedingNode,delete h.enclosingNode,delete h.followingNode}function rVt(i,e,t,n){let{comment:o,precedingNode:r}=t[n],{locStart:s,locEnd:a}=e,l=s(o);if(r)for(let c=n-1;c>=0;c--){let{comment:u,precedingNode:d}=t[c];if(d!==r||!DKe(i.slice(a(u),l)))break;l=s(u)}return Z_(i,l,{backwards:!0})}function sVt(i,e,t,n){let{comment:o,followingNode:r}=t[n],{locStart:s,locEnd:a}=e,l=a(o);if(r)for(let c=n+1;c0;--s){let{comment:a,precedingNode:l,followingNode:c}=i[s-1];$_(l,n),$_(c,o);let u=e.originalText.slice(e.locEnd(a),r);if(e.printer.isGap?.(u,e)??/^[\s(]*$/.test(u))r=e.locStart(a);else break}for(let[a,{comment:l}]of i.entries())a1&&a.comments.sort((l,c)=>e.locStart(l)-e.locStart(c));i.length=0}function P1e(i,e,t){let n=t.locStart(e)-1;for(let o=1;o!n?.has(s)&&s.leading&&o(s)));return r.size===0?"":i.map(({node:s})=>r.has(s)?lVt(i,e):"","comments").filter(Boolean)}function dVt(i,e,t){let n=i.node?.comments,o=new Set(n?.filter(u=>u.trailing)),r=e[Symbol.for("printedComments")],s=t?.filter??TKe,a=new Set(n?.filter(u=>o.has(u)&&!r?.has(u)&&s(u)));if(a.size===0)return"";let l=[],c;return i.each(({node:u})=>{o.has(u)&&(c=cVt(i,e,c),a.has(u)&&l.push(c.doc))},"comments"),l}function hVt(i,e,t,n){let o=uVt(i,t,n),r=dVt(i,t,n);return o||r?YJ(e,s=>[o,s,r]):e}function fVt(i){let{[$J]:e,[Symbol.for("printedComments")]:t}=i;for(let n of e){if(!n.printed&&!t.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}function LKe({plugins:i=[],showDeprecated:e=!1}={}){let t=i.flatMap(o=>o.languages??[]),n=[];for(let o of AVt(Object.assign({},...i.map(({options:r})=>r),gVt)))!e&&o.deprecated||(Array.isArray(o.choices)&&(e||(o.choices=o.choices.filter(r=>!r.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...bVt(o.choices,t,i)])),o.pluginDefaults=Object.fromEntries(i.filter(r=>r.defaultOptions?.[o.name]!==void 0).map(r=>[r.name,r.defaultOptions[o.name]])),n.push(o));return{languages:t,options:n}}function*bVt(i,e,t){let n=new Set(i.map(o=>o.value));for(let o of e)if(o.parsers){for(let r of o.parsers)if(!n.has(r)){n.add(r);let s=t.find(l=>l.parsers&&oX(l.parsers,r)),a=o.name;s?.name&&(a+=` (plugin: ${s.name})`),yield{value:r,description:a}}}}function AVt(i){let e=[];for(let[t,n]of Object.entries(i)){let o={name:t,...n};Array.isArray(o.default)&&(o.default=Xd(0,o.default,-1).value),e.push(o)}return e}function xVt(){let i=globalThis,e=i.process?.platform;if(typeof e=="string")return e.startsWith("win");let t=i.Deno?.build?.os;return typeof t=="string"?t==="windows":i.navigator?.platform?.startsWith("Win")??!1}function NKe(i){if(i=i instanceof URL?i:new URL(i),i.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${i.protocol}"`);return i}function _Vt(i){return i=NKe(i),decodeURIComponent(i.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function SVt(i){i=NKe(i);let e=decodeURIComponent(i.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return i.hostname!==""&&(e=`\\\\${i.hostname}${e}`),e}function EVt(i){return CVt?SVt(i):_Vt(i)}function RYe(i,e){if(!e)return;let t=DVt(e).toLowerCase();return i.find(({filenames:n})=>n?.some(o=>o.toLowerCase()===t))??i.find(({extensions:n})=>n?.some(o=>t.endsWith(o)))}function kVt(i,e){if(e)return i.find(({name:t})=>t.toLowerCase()===e)??i.find(({aliases:t})=>t?.includes(e))??i.find(({extensions:t})=>t?.includes(`.${e}`))}function FYe(i,e){if(e){if(TVt(e))try{e=EVt(e)}catch{return}if(typeof e=="string")return i.find(({isSupported:t})=>t?.({filepath:e}))}}function LVt(i,e){let t=wVt(0,i.plugins).flatMap(n=>n.languages??[]);return(kVt(t,e.language)??RYe(t,e.physicalFile)??RYe(t,e.file)??FYe(t,e.physicalFile)??FYe(t,e.file)??IVt?.(t,e.physicalFile))?.parsers[0]}function PYe(i,e,t,n){return[`Invalid ${Uv.red(n.key(i))} value.`,`Expected ${Uv.blue(t)},`,`but received ${e===FKe?Uv.gray("nothing"):Uv.red(n.value(e))}.`].join(" ")}function OKe({text:i,list:e},t){let n=[];return i&&n.push(`- ${Uv.blue(i)}`),e&&n.push([`- ${Uv.blue(e.title)}:`].concat(e.values.map(o=>OKe(o,t-OYe.length).replace(/^|\n/g,`$&${OYe}`))).join(` +`)),PKe(n,t)}function PKe(i,e){if(i.length===1)return i[0];let[t,n]=i,[o,r]=i.map(s=>s.split(` +`,1)[0].length);return o>e&&o>r?n:t}function z1e(i,e,t){if(i===e)return 0;let n=t?.maxDistance,o=i;i.length>e.length&&(i=e,e=o);let r=i.length,s=e.length;for(;r>0&&i.charCodeAt(~-r)===e.charCodeAt(~-s);)r--,s--;let a=0;for(;an)return n;if(r===0)return n!==void 0&&s>n?n:s;let l,c,u,d,h=0,f=0;for(;hc?d>c?c+1:d:d>u?u+1:d;if(n!==void 0){let p=c;for(h=0;hn)return n}}return wR.length=r,B1e.length=r,n!==void 0&&c>n?n:c}function RVt(i,e,t){if(!Array.isArray(e)||e.length===0)return;let n=t?.maxDistance,o=i.length;for(let l of e)if(l===i)return l;if(n===0)return;let r,s=Number.POSITIVE_INFINITY,a=new Set;for(let l of e){if(a.has(l))continue;a.add(l);let c=Math.abs(l.length-o);if(c>=s||n!==void 0&&c>n)continue;let u=Number.isFinite(s)?n===void 0?s:Math.min(s,n):n,d=u===void 0?z1e(i,l):z1e(i,l,{maxDistance:u});if(n!==void 0&&d>n)continue;let h=d;if(u!==void 0&&d===u&&u===n&&(h=z1e(i,l)),hn))return r}function OVt(i,e){let t=new i(e),n=Object.create(t);for(let o of FVt)o in e&&(n[o]=PVt(e[o],t,iS.prototype[o].length));return n}function PVt(i,e,t){return typeof i=="function"?(...n)=>i(...n.slice(0,t-1),e,...n.slice(t-1)):()=>i}function BYe({from:i,to:e}){return{from:[i],to:e}}function WVt(i,e){let t=Object.create(null);for(let n of i){let o=n[e];if(t[o])throw new Error(`Duplicate ${e} ${JSON.stringify(o)}`);t[o]=n}return t}function UVt(i,e){let t=new Map;for(let n of i){let o=n[e];if(t.has(o))throw new Error(`Duplicate ${e} ${JSON.stringify(o)}`);t.set(o,n)}return t}function jVt(){let i=Object.create(null);return e=>{let t=JSON.stringify(e);return i[t]?!0:(i[t]=!0,!1)}}function QVt(i,e){let t=[],n=[];for(let o of i)e(o)?t.push(o):n.push(o);return[t,n]}function GVt(i){return i===Math.floor(i)}function qVt(i,e){if(i===e)return 0;let t=typeof i,n=typeof e,o=["undefined","object","boolean","number","string"];return t!==n?o.indexOf(t)-o.indexOf(n):t!=="string"?Number(i)-Number(e):i.localeCompare(e)}function YVt(i){return(...e)=>{let t=i(...e);return typeof t=="string"?new Error(t):t}}function zYe(i){return i===void 0?{}:i}function zKe(i){if(typeof i=="string")return{text:i};let{text:e,list:t}=i;return KVt((e||t)!==void 0,"Unexpected `expected` result, there should be at least one field."),t?{text:e,list:{title:t.title,values:t.values.map(zKe)}}:{text:e}}function VYe(i,e){return i===!0?!0:i===!1?{value:e}:i}function HYe(i,e,t=!1){return i===!1?!1:i===!0?t?!0:[{value:e}]:"value"in i?[i]:i.length===0?!1:i}function WYe(i,e){return typeof i=="string"||"key"in i?{from:e,to:i}:"from"in i?{from:i.from,to:i.to}:{from:e,to:i.to}}function j1e(i,e){return i===void 0?[]:Array.isArray(i)?i.map(t=>WYe(t,e)):[WYe(i,e)]}function UYe(i,e){let t=j1e(typeof i=="object"&&"redirect"in i?i.redirect:i,e);return t.length===0?{remain:e,redirect:t}:typeof i=="object"&&"remain"in i?{remain:i.remain,redirect:t}:{redirect:t}}function KVt(i,e){if(!i)throw new Error(e)}function oHt(i,e,{logger:t=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:r,descriptor:s}={}){if(n){if(!r)throw new Error("'FlagSchema' option is required.");if(!s)throw new Error("'descriptor' option is required.")}else s=xR;let a=o?Array.isArray(o)?(h,f)=>o.includes(h)?{[h]:f}:void 0:(h,f)=>({[h]:f}):(h,f,p)=>{let{_:g,...A}=p.schemas;return BKe(h,f,{...p,schemas:A})},l=rHt(e,{isCLI:n,FlagSchema:r}),c=new nHt(l,{logger:t,unknown:a,descriptor:s}),u=t!==!1;u&&V1e&&(c._hasDeprecationWarned=V1e);let d=c.normalize(i);return u&&(V1e=c._hasDeprecationWarned),d}function rHt(i,{isCLI:e,FlagSchema:t}){let n=[];e&&n.push(zVt.create({name:"_"}));for(let o of i)n.push(sHt(o,{isCLI:e,optionInfos:i,FlagSchema:t})),o.alias&&e&&n.push(BVt.create({name:o.alias,sourceName:o.name}));return n}function sHt(i,{isCLI:e,optionInfos:t,FlagSchema:n}){let{name:o}=i,r={name:o},s,a={};switch(i.type){case"int":s=ZVt,e&&(r.preprocess=Number);break;case"string":s=jYe;break;case"choice":s=JVt,r.choices=i.choices.map(l=>l?.redirect?{...l,redirect:{to:{key:i.name,value:l.redirect}}}:l);break;case"boolean":s=HVt;break;case"flag":s=n,r.flags=t.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":s=jYe;break;default:throw new Error(`Unexpected type ${i.type}`)}if(i.exception?r.validate=(l,c,u)=>i.exception(l)||c.validate(l,u):r.validate=(l,c,u)=>l===void 0||c.validate(l,u),i.redirect&&(a.redirect=l=>l?{to:typeof i.redirect=="string"?i.redirect:{key:i.redirect.option,value:i.redirect.value}}:void 0),i.deprecated&&(a.deprecated=!0),e&&!i.array){let l=r.preprocess||(c=>c);r.preprocess=(c,u,d)=>u.preprocess(l(Array.isArray(c)?Xd(0,c,-1):c),d)}return i.array?VVt.create({...e?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...a,valueSchema:s.create(r)}):s.create({...r,...a})}function hHt(i){return!!i?.[uHt]}async function fHt(i,e,t,n){let{node:o}=t,{language:r}=o;if(!HKe.has(r))return;let s=o.value.trim(),a;if(s){let l=r==="yaml"?r:MKe(n,{language:r});if(!l)return;a=s?await i(s,{parser:l}):""}else a=s;return lKe([o.startDelimiter,o.explicitLanguage??"",Mw,a,a?Mw:"",o.endDelimiter])}function pHt(i,e){return WKe({node:i})&&(delete e.end,delete e.raw,delete e.value),e}function gHt({node:i}){return i.raw}function vHt(i,e){let t=i?n=>i(n,UKe):AHt;return e?new Proxy(t,{apply:(n,o,r)=>owe(r[0])?dHt:Reflect.apply(n,o,r)}):t}function jKe(i,e){if(!e)throw new Error("parserName is required.");let t=VKe(0,i,o=>o.parsers&&oX(o.parsers,e));if(t)return t;let n=`Couldn't resolve parser "${e}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new IKe(n)}function yHt(i,e){if(!e)throw new Error("astFormat is required.");let t=VKe(0,i,o=>o.printers&&oX(o.printers,e));if(t)return t;let n=`Couldn't find plugin for AST format "${e}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new IKe(n)}function rwe({plugins:i,parser:e}){let t=jKe(i,e);return QKe(t,e)}function QKe(i,e){let t=i.parsers[e];return typeof t=="function"?t():t}async function wHt(i,e){let t=i.printers[e],n=typeof t=="function"?await t():t;return _Ht(n)}function xHt(i){let{features:e,getVisitorKeys:t,embed:n,massageAstNode:o,print:r,...s}=i;e=THt(e);let a=e.experimental_frontMatterSupport;t=QYe(t,a.massageAstNode||a.embed||a.print);let l=o;o&&a.massageAstNode&&(l=new Proxy(o,{apply(d,h,f){return mHt(...f),Reflect.apply(d,h,f)}}));let c=n;if(n){let d;c=new Proxy(n,{get(h,f,p){return f==="getVisitorKeys"?(d??(d=n.getVisitorKeys?QYe(n.getVisitorKeys,a.massageAstNode||a.embed):t),d):Reflect.get(h,f,p)},apply:(h,f,p)=>a.embed&&WKe(...p)?fHt:Reflect.apply(h,f,p)})}let u=r;return a.print&&(u=new Proxy(r,{apply(d,h,f){let[p]=f;return owe(p.node)?bHt(p):Reflect.apply(d,h,f)}})),{features:e,getVisitorKeys:t,embed:c,massageAstNode:l,print:u,...s}}function _Ht(i){return K1e(CHt,i,xHt)}function DHt(i){return{...EHt,...i}}function THt(i){return{experimental_avoidAstMutation:!1,...i,experimental_frontMatterSupport:DHt(i?.experimental_frontMatterSupport)}}async function kHt(i,e={}){let t={...i};if(!t.parser){if(!t.filepath)throw new MYe("No parser and no file path given, couldn't infer a parser.");if(t.parser=MKe(t,{physicalFile:t.filepath}),!t.parser)throw new MYe(`No parser could be inferred for file "${t.filepath}".`)}let n=LKe({plugins:i.plugins,showDeprecated:!0}).options,o={...GYe,...Object.fromEntries(n.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},r=jKe(t.plugins,t.parser),s=await QKe(r,t.parser);t.astFormat=s.astFormat,t.locEnd=s.locEnd,t.locStart=s.locStart;let a=r.printers?.[s.astFormat]?r:yHt(t.plugins,s.astFormat),l=await wHt(a,s.astFormat);t.printer=l,t.getVisitorKeys=l.getVisitorKeys;let c=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,d])=>d!==void 0)):{},u={...o,...c};for(let[d,h]of Object.entries(u))t[d]??(t[d]=h);return t.parser==="json"&&(t.trailingComma="none"),aHt(t,n,{passThrough:Object.keys(GYe),...e})}function IHt(i,e,t,n){let o={column:null,line:-1,...i.start},r={...o,...i.end},{linesAbove:s=2,linesBelow:a=3}=t||{},l=o.line-n,c=o.column,u=r.line-n,d=r.column,h=Math.max(l-(s+1),0),f=Math.min(e.length,u+a);l===-1&&(h=0),u===-1&&(f=e.length);let p=u-l,g={};if(p)for(let A=0;A<=p;A++){let v=A+l;if(c==null)g[v]=!0;else if(A===0){let w=e[v-1].length;g[v]=[c,w-c]}else if(A===p)g[v]=[0,d];else{let w=e[v-1].length;g[v]=[0,w]}}else if(c===d)c!=null?g[l]=[c,0]:g[l]=!0;else{let A=c??0,v=d??A;g[l]=[A,v-A]}return{start:h,end:f,markerLines:g}}function LHt(i,e,t={},n){let{defs:o,highlight:r}=n||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},s=(t.startLine||1)-1,a=i.split(qYe),{start:l,end:c,markerLines:u}=IHt(e,a,t,s),d=e.start&&typeof e.start.column=="number",h=String(c+s).length,f=r(i).split(qYe,c).slice(l,c).map((p,g)=>{let A=l+1+g,v=` ${` ${A+s}`.slice(-h)} |`,w=u[A],C=!u[A+1];if(w){let _="";if(Array.isArray(w)){let E=p.slice(0,w[0]).replace(/[^\t]/g," "),I=w[1]||1;_=[` + `,o.gutter(v.replace(/\d/g," "))," ",E,o.marker("^").repeat(I)].join(""),C&&t.message&&(_+=" "+o.message(t.message))}return[o.marker(">"),o.gutter(v),p.length>0?` ${p}`:"",_].join("")}else return` ${o.gutter(v)}${p.length>0?` ${p}`:""}`}).join(` `);return t.message&&!d&&(f=`${" ".repeat(h+1)}${t.message} -${f}`),r.reset(f)}function IUt(i,e,t={}){return kUt(i,e,t)}async function LUt(i,e){let t=await Uye(e),n=t.preprocess?await t.preprocess(i,e):i;e.originalText=n;let r;try{r=await t.parse(n,e,e)}catch(o){NUt(o,i)}return{text:n,ast:r}}function NUt(i,e){let{loc:t}=i;if(t){let{start:n,end:r}=t;n&&(n={line:n.line,column:n.column-1}),r&&(r={line:r.line,column:r.column-1});let o=IUt(e,{start:n,end:r},{highlightCode:!0});i.message+=` -`+o,i.codeFrame=o}throw i}async function MUt(i,e,t,n,r){if(t.embeddedLanguageFormatting!=="auto")return;let{printer:o}=t,{embed:s}=o;if(!s)return;if(s.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:a}=o,{getVisitorKeys:l}=s,c=[];h();let u=i.stack;for(let{print:f,node:p,pathStack:g}of c)try{i.stack=g;let v=await f(d,e,i,t);v&&r.set(p,v)}catch(v){if(globalThis.PRETTIER_DEBUG)throw v}i.stack=u;function d(f,p){return RUt(f,p,t,n)}function h(){let{node:f}=i;if(f===null||typeof f!="object"||a?.(i))return;for(let g of l(f))Array.isArray(f[g])?i.each(h,g):i.call(h,g);let p=s(i,t);if(p){if(typeof p=="function"){c.push({print:p,node:f,pathStack:[...i.stack]});return}r.set(f,p)}}}async function RUt(i,e,t,n){let r=await QM({...t,...e,parentParser:t.parser,originalText:i,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:o}=await n6(i,r),s=await n(o,r);return OYe(s)}function FUt(i,e,t,n){let{originalText:r,[wK]:o,locStart:s,locEnd:a,[Symbol.for("printedComments")]:l}=e,{node:c}=i,u=s(c),d=a(c);for(let f of o)s(f)>=u&&a(f)<=d&&l.add(f);let{printPrettierIgnored:h}=e.printer;return h?h(i,e,t,n):r.slice(u,d)}async function DK(i,e){({ast:i}=await xKe(i,e));let t=new Map,n=new GHt(i),r=hWt(e),o=new Map;await MUt(n,a,e,DK,o);let s=await _Ye(n,e,a,void 0,o);if(dWt(e),e.cursorOffset>=0){if(e.nodeAfterCursor&&!e.nodeBeforeCursor)return[tk,s];if(e.nodeBeforeCursor&&!e.nodeAfterCursor)return[s,tk]}return s;function a(c,u){return c===void 0||c===n?l(u):Array.isArray(c)?n.call(()=>l(u),...c):n.call(()=>l(u),c)}function l(c){r(n);let u=n.node;if(u==null)return"";let d=zye(u)&&c===void 0;if(d&&t.has(u))return t.get(u);let h=_Ye(n,e,a,c,o);return d&&t.set(u,h),h}}function _Ye(i,e,t,n,r){let{node:o}=i,{printer:s}=e,a;switch(s.hasPrettierIgnore?.(i)?a=OUt(i,e,t,n):r.has(o)?a=r.get(o):a=s.print(i,e,t,n),o){case e.cursorNode:a=gK(a,l=>[tk,l,tk]);break;case e.nodeBeforeCursor:a=gK(a,l=>[l,tk]);break;case e.nodeAfterCursor:a=gK(a,l=>[tk,l]);break}return s.printComment&&JYe(o.comments)&&!s.willPrintOwnComments?.(i,e)&&(a=uWt(i,a,e)),a}async function xKe(i,e){let t=i.comments??[];e[wK]=t,e[Symbol.for("printedComments")]=new Set,iWt(i,e);let{printer:{preprocess:n}}=e;return i=n?await n(i,e):i,{ast:i,comments:t}}function PUt(i,e){let{cursorOffset:t,locStart:n,locEnd:r,getVisitorKeys:o}=e,s=f=>n(f)<=t&&r(f)>=t,a=i,l=[i];for(let f of ZHt(i,{getVisitorKeys:o,filter:s}))l.push(f),a=f;if($Ht(a,{getVisitorKeys:o}))return{cursorNode:a};let c,u,d=-1,h=Number.POSITIVE_INFINITY;for(;l.length>0&&(c===void 0||u===void 0);){a=l.pop();let f=c!==void 0,p=u!==void 0;for(let g of SK(a,{getVisitorKeys:o})){if(!f){let v=r(g);v<=t&&v>d&&(c=g,d=v)}if(!p){let v=n(g);v>=t&&vs(h,l)).filter(Boolean);let c={},u=new Set(r(a));for(let h in a)!EK(a,h)||o?.has(h)||(u.has(h)?c[h]=s(a[h],a):c[h]=a[h]);let d=n(a,c,l);if(d!==null)return d??c}}function UUt(i,e){return e=new Set(e),i.find(t=>_Ke.has(t.type)&&e.has(t))}function SYe(i){let e=WUt(0,i,t=>t.type!=="Program"&&t.type!=="File");return e===-1?i:i.slice(0,e+1)}function jUt(i,e,{locStart:t,locEnd:n}){let[r,...o]=i,[s,...a]=e;if(r===s)return[r,s];let l=t(r);for(let u of SYe(a))if(t(u)>=l)s=u;else break;let c=n(s);for(let u of SYe(o)){if(n(u)<=c)r=u;else break;if(r===s)break}return[r,s]}function kye(i,e,t,n,r=[],o,s){let{locStart:a,locEnd:l}=s,c=a(i),u=l(i);if(e>u||en);let o=i.slice(n,r).search(/\S/),s=o===-1;if(!s)for(n+=o;r>n&&!/\S/.test(i[r-1]);--r);let a=e.printer.features?.experimental_locForRangeFormat??e,l=kye(t,n,e,(p,g)=>EYe(e,p,g),[],"rangeStart",a);if(!l)return;let c=s?l:kye(t,r,e,p=>EYe(e,p),[],"rangeEnd",a);if(!c)return;let u,d;if(t.type==="JsonRoot"){let p=UUt(l,c);u=p,d=p}else[u,d]=jUt(l,c,e);let{locStart:h,locEnd:f}=a;return[Math.min(h(u),h(d)),Math.max(f(u),f(d))]}async function EKe(i,e,t=0){if(!i||i.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:r}=await n6(i,e);e.cursorOffset>=0&&(e={...e,...CKe(n,e)});let o=await DK(n,e,t);t>0&&(o=zYe([gw,o],t,e.tabWidth));let s=_K(o,e);if(t>0){let l=s.formatted.trim();s.cursorNodeStart!==void 0&&(s.cursorNodeStart-=s.formatted.indexOf(l),s.cursorNodeStart<0&&(s.cursorNodeStart=0,s.cursorNodeText=s.cursorNodeText.trimStart()),s.cursorNodeStart+s.cursorNodeText.length>l.length&&(s.cursorNodeText=s.cursorNodeText.trimEnd())),s.formatted=l+Nye(e.endOfLine)}let a=e[wK];if(e.cursorOffset>=0){let l,c,u,d;if((e.cursorNode||e.nodeBeforeCursor||e.nodeAfterCursor)&&s.cursorNodeText)if(u=s.cursorNodeStart,d=s.cursorNodeText,e.cursorNode)l=e.locStart(e.cursorNode),c=r.slice(l,e.locEnd(e.cursorNode));else{if(!e.nodeBeforeCursor&&!e.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");l=e.nodeBeforeCursor?e.locEnd(e.nodeBeforeCursor):0;let A=e.nodeAfterCursor?e.locStart(e.nodeAfterCursor):r.length;c=r.slice(l,A)}else l=0,c=r,u=0,d=s.formatted;let h=e.cursorOffset-l;if(c===d)return{formatted:s.formatted,cursorOffset:u+h,comments:a};let f=c.split("");f.splice(h,0,DYe);let p=d.split(""),g=OVt(f,p),v=u;for(let A of g)if(A.removed){if(A.value.includes(DYe))break}else v+=A.count;return{formatted:s.formatted,cursorOffset:v,comments:a}}return{formatted:s.formatted,cursorOffset:-1,comments:a}}async function YUt(i,e){let{ast:t,text:n}=await n6(i,e),[r,o]=qUt(n,e,t)??[0,0],s=n.slice(r,o),a=Math.min(r,n.lastIndexOf(` -`,r)+1),l=n.slice(a,r).match(/^\s*/)[0],c=Bye(l,e.tabWidth),u=await EKe(s,{...e,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:e.cursorOffset>r&&e.cursorOffset<=o?e.cursorOffset-r:-1,endOfLine:"lf"},c),d=u.formatted.trimEnd(),{cursorOffset:h}=e;h>o?h+=d.length-s.length:u.cursorOffset>=0&&(h=u.cursorOffset+r);let f=n.slice(0,r)+d+n.slice(o);if(e.endOfLine!=="lf"){let p=Nye(e.endOfLine);h>=0&&p===`\r -`&&(h+=RYe(f.slice(0,h),` -`)),f=AK(0,f,` -`,p)}return{formatted:f,cursorOffset:h,comments:u.comments}}function Sye(i,e,t){return typeof e!="number"||Number.isNaN(e)||e<0||e>i.length?t:e}function TYe(i,e){let{cursorOffset:t,rangeStart:n,rangeEnd:r}=e;return t=Sye(i,t,-1),n=Sye(i,n,0),r=Sye(i,r,i.length),{...e,cursorOffset:t,rangeStart:n,rangeEnd:r}}function DKe(i,e){let{cursorOffset:t,rangeStart:n,rangeEnd:r,endOfLine:o}=TYe(i,e),s=i.charAt(0)===SKe;if(s&&(i=i.slice(1),t--,n--,r--),o==="auto"&&(o=HVt(i)),i.includes("\r")){let a=l=>RYe(i.slice(0,Math.max(l,0)),`\r -`);t-=a(t),n-=a(n),r-=a(r),i=jVt(i)}return{hasBOM:s,text:i,options:TYe(i,{...e,cursorOffset:t,rangeStart:n,rangeEnd:r,endOfLine:o})}}async function kYe(i,e){let t=await Uye(e);return!t.hasPragma||t.hasPragma(i)}async function KUt(i,e){return(await Uye(e)).hasIgnorePragma?.(i)}async function TKe(i,e){let{hasBOM:t,text:n,options:r}=DKe(i,await QM(e));if(r.rangeStart>=r.rangeEnd&&n!==""||r.requirePragma&&!await kYe(n,r)||r.checkIgnorePragma&&await KUt(n,r))return{formatted:i,cursorOffset:e.cursorOffset,comments:[]};let o;return r.rangeStart>0||r.rangeEnd=0&&o.cursorOffset++),o}async function JUt(i,e,t){let{text:n,options:r}=DKe(i,await QM(e)),o=await n6(n,r);return t&&(t.preprocessForPrint&&(o.ast=await xKe(o.ast,r)),t.massage&&(o.ast=zUt(o.ast,r))),o}async function XUt(i,e){e=await QM(e);let t=await DK(i,e);return _K(t,e)}async function ZUt(i,e){let t=wHt(i),{formatted:n}=await TKe(t,{...e,parser:"__js_expression"});return n}async function $Ut(i,e){e=await QM(e);let{ast:t}=await n6(i,e);return e.cursorOffset>=0&&(e={...e,...CKe(t,e)}),DK(t,e)}async function ejt(i,e){return _K(i,await QM(e))}function rjt(i,e){if(e===!1)return!1;if(i.charAt(e)==="/"&&i.charAt(e+1)==="*"){for(let t=e+2;tMath.max(n,r.length),0)/e.length}function fjt(i,e){let t=Yye(i,e);return t===!1?"":i.charAt(t)}function bjt(i,e){let{preferred:t,alternate:n}=e===!0||e==="'"?mjt:gjt,{length:r}=i,o=0,s=0;for(let a=0;as?n:t).character}function vjt(i,e,t){for(let n=e;ns===n?s:a===e?"\\"+a:a||(t&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(s)?s:"\\"+s));return e+r+e}function Tjt(i,e){return arguments.length===2||typeof e=="number"?Kye(i,e):Ejt(...arguments)}function ek(i,e=1){return async(...t)=>{let n=t[e]??{},r=n.plugins??[];return t[e]={...n,plugins:Array.isArray(r)?r:Object.values(r)},await i(...t)}}async function Xye(i,e){let{formatted:t}=await Jye(i,{...e,cursorOffset:-1});return t}async function NKe(i,e){return await Xye(i,e)===i}var IVt,Iye,IYe,t6,LVt,NVt,AK,MVt,RVt,FVt,PVt,k_,LYe,NYe,BVt,zVt,Lye,MYe,yK,VVt,WVt,UVt,wK,GVt,Wd,nk,bw,L_,vw,Aw,yw,kp,SA,Bm,ww,xw,Cw,Ud,EA,pb,FYe,rk,KVt,XVt,UM,nYe,Rye,_A,PYe,cHt,uHt,CK,tk,WYe,vHt,Oye,gw,UYe,jYe,AHt,yHt,xHt,CHt,_Ht,SHt,EHt,DHt,QYe,GYe,sYe,THt,kHt,LHt,NHt,MHt,RHt,FHt,Pye,PHt,BHt,qYe,WHt,UHt,fb,xA,Dye,Bye,QHt,GHt,JYe,zye,KHt,I_,XYe,ZYe,aYe,ik,T_,eKe,tKe,yye,nKe,Hye,rKe,hWt,sKe,cYe,fWt,EK,pWt,bWt,vWt,AWt,wWt,SWt,EWt,TWt,cKe,WM,uKe,CA,IWt,dKe,bK,hYe,LWt,HM,xye,pKe,MWt,N_,OWt,PWt,BWt,zWt,YWt,KWt,JWt,yYe,XWt,ZWt,$Wt,eUt,tUt,_ye,oUt,sUt,aUt,gKe,lUt,cUt,Wye,bKe,vKe,fUt,mUt,AKe,gUt,wYe,wUt,CUt,_Ut,xYe,QM,CYe,n6,OUt,CKe,zUt,VUt,HUt,WUt,_Ke,GUt,SKe,DYe,jye,tjt,ijt,njt,kKe,Qye,Gye,qye,Yye,Kye,cjt,hjt,pjt,IKe,LKe,mjt,gjt,Ajt,wjt,Jye,MKe,RKe,$ye=D(()=>{IVt=Object.defineProperty,Iye=(i,e)=>{for(var t in e)IVt(i,t,{get:e[t],enumerable:!0})},IYe={};Iye(IYe,{__debug:()=>RKe,check:()=>NKe,doc:()=>jye,format:()=>Xye,formatWithCursor:()=>Jye,getSupportInfo:()=>MKe,util:()=>Qye,version:()=>kKe});t6=(i,e)=>(t,n,...r)=>t|1&&n==null?void 0:(e.call(n)??n[i]).apply(n,r),LVt=String.prototype.replaceAll??function(i,e){return i.global?this.replace(i,e):this.split(i).join(e)},NVt=t6("replaceAll",function(){if(typeof this=="string")return LVt}),AK=NVt,MVt=class{diff(i,e,t={}){let n;typeof t=="function"?(n=t,t={}):"callback"in t&&(n=t.callback);let r=this.castInput(i,t),o=this.castInput(e,t),s=this.removeEmpty(this.tokenize(r,t)),a=this.removeEmpty(this.tokenize(o,t));return this.diffWithOptionsObj(s,a,t,n)}diffWithOptionsObj(i,e,t,n){var r;let o=A=>{if(A=this.postProcess(A,t),n){setTimeout(function(){n(A)},0);return}else return A},s=e.length,a=i.length,l=1,c=s+a;t.maxEditLength!=null&&(c=Math.min(c,t.maxEditLength));let u=(r=t.timeout)!==null&&r!==void 0?r:1/0,d=Date.now()+u,h=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(h[0],e,i,0,t);if(h[0].oldPos+1>=a&&f+1>=s)return o(this.buildValues(h[0].lastComponent,e,i));let p=-1/0,g=1/0,v=()=>{for(let A=Math.max(p,-l);A<=Math.min(g,l);A+=2){let w,C=h[A-1],_=h[A+1];C&&(h[A-1]=void 0);let E=!1;if(_){let T=_.oldPos-A;E=_&&0<=T&&T=a&&f+1>=s)return o(this.buildValues(w.lastComponent,e,i))||!0;h[A]=w,w.oldPos+1>=a&&(g=Math.min(g,A-1)),f+1>=s&&(p=Math.max(p,A+1))}l++};if(n)(function A(){setTimeout(function(){if(l>c||Date.now()>d)return n(void 0);v()||A()},0)})();else for(;l<=c&&Date.now()<=d;){let A=v();if(A)return A}}addToPath(i,e,t,n,r){let o=i.lastComponent;return o&&!r.oneChangePerToken&&o.added===e&&o.removed===t?{oldPos:i.oldPos+n,lastComponent:{count:o.count+1,added:e,removed:t,previousComponent:o.previousComponent}}:{oldPos:i.oldPos+n,lastComponent:{count:1,added:e,removed:t,previousComponent:o}}}extractCommon(i,e,t,n,r){let o=e.length,s=t.length,a=i.oldPos,l=a-n,c=0;for(;l+1d.length?f:d}),c.value=this.join(u)}else c.value=this.join(e.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}return n}},RVt=class extends MVt{tokenize(i){return i.slice()}join(i){return i}removeEmpty(i){return i}},FVt=new RVt;PVt=()=>{},k_=PVt,LYe="cr",NYe="crlf",BVt="lf",zVt=BVt,Lye="\r",MYe=`\r -`,yK=` -`,VVt=yK;WVt=new Map([[yK,/\n/g],[Lye,/\r/g],[MYe,/\r\n/g]]);UVt=/\r\n?/g;wK=Symbol.for("comments");GVt=t6("at",function(){if(Array.isArray(this)||typeof this=="string")return QVt}),Wd=GVt,nk="string",bw="array",L_="cursor",vw="indent",Aw="align",yw="trim",kp="group",SA="fill",Bm="if-break",ww="indent-if-break",xw="line-suffix",Cw="line-suffix-boundary",Ud="line",EA="label",pb="break-parent",FYe=new Set([L_,vw,Aw,yw,kp,SA,Bm,ww,xw,Cw,Ud,EA,pb]);rk=YVt,KVt=i=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(i);XVt=class extends Error{name="InvalidDocError";constructor(i){super(JVt(i)),this.doc=i}},UM=XVt,nYe={};Rye=ZVt;_A=k_,PYe=k_,cHt=k_,uHt=k_;CK={type:pb},tk={type:L_};WYe={type:Ud},vHt={type:Ud,soft:!0},Oye={type:Ud,hard:!0},gw=[Oye,CK],UYe={type:Ud,hard:!0,literal:!0},jYe=[UYe,CK];AHt={type:Cw},yHt={type:yw};xHt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,CHt=12288,_Ht=65510,SHt=[12288,12288,65281,65376,65504,65510],EHt=4352,DHt=262141,QYe=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],GYe=(i,e)=>{let t=0,n=Math.floor(i.length/2)-1;for(;t<=n;){let r=Math.floor((t+n)/2),o=r*2;if(ei[o+1])t=r+1;else return!0}return!1},sYe=19968,[THt,kHt]=IHt(QYe);LHt=i=>i_Ht?!1:GYe(SHt,i),NHt=i=>i>=THt&&i<=kHt?!0:iDHt?!1:GYe(QYe,i),MHt=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,RHt=i=>MHt.test(i),FHt=/[^\x20-\x7F]/;Pye=OHt,PHt={type:0},BHt={type:1},qYe={value:"",length:0,queue:[],get root(){return qYe}};WHt=class{#e=[];#t="";#n=0;#r=[];#i=[];#o(){let i=this.#t;i!==""&&(this.#e.push(i),this.#n+=i.length,this.#t="");for(let e of this.#i)this.#r.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#r.length+this.#i.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#i.push(this.#n+this.#t.length)}write(i){this.#t+=i}trim(){let{text:i,count:e}=KYe(this.#t);return this.#t=i,this.#o(),e}finish(){return this.#o(),{text:this.#e.join(""),positions:this.#r}}},UHt=WHt,fb=Symbol("MODE_BREAK"),xA=Symbol("MODE_FLAT"),Dye=Symbol("DOC_FILL_PRINTED_LENGTH");Bye=jHt,QHt=class{constructor(i){this.stack=[i]}get key(){let{stack:i,siblings:e}=this;return Wd(0,i,e===null?-2:-4)??null}get index(){return this.siblings===null?null:Wd(0,this.stack,-2)}get node(){return Wd(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:i}=this,e=Wd(0,i,-3);return Array.isArray(e)?e:null}get next(){let{siblings:i}=this;return i===null?null:i[this.index+1]}get previous(){let{siblings:i}=this;return i===null?null:i[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:i,index:e}=this;return i!==null&&e===i.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#t()]}getName(){let{stack:i}=this,{length:e}=i;return e>1?Wd(0,i,-2):null}getValue(){return Wd(0,this.stack,-1)}getNode(i=0){let e=this.#e(i);return e===-1?null:this.stack[e]}getParentNode(i=0){return this.getNode(i+1)}#e(i){let{stack:e}=this;for(let t=e.length-1;t>=0;t-=2)if(!Array.isArray(e[t])&&--i<0)return t;return-1}call(i,...e){let{stack:t}=this,{length:n}=t,r=Wd(0,t,-1);for(let o of e)r=r?.[o],t.push(o,r);try{return i(this)}finally{t.length=n}}callParent(i,e=0){let t=this.#e(e+1),n=this.stack.splice(t+1);try{return i(this)}finally{this.stack.push(...n)}}each(i,...e){let{stack:t}=this,{length:n}=t,r=Wd(0,t,-1);for(let o of e)r=r[o],t.push(o,r);try{for(let o=0;o{t[r]=i(n,r,o)},...e),t}match(...i){let e=this.stack.length-1,t=null,n=this.stack[e--];for(let r of i){if(n===void 0)return!1;let o=null;if(typeof t=="number"&&(o=t,t=this.stack[e--],n=this.stack[e--]),r&&!r(n,t,o))return!1;t=this.stack[e--],n=this.stack[e--]}return!0}findAncestor(i){for(let e of this.#t())if(i(e))return e}hasAncestor(i){for(let e of this.#t())if(i(e))return!0;return!1}*#t(){let{stack:i}=this;for(let e=i.length-3;e>=0;e-=2){let t=i[e];Array.isArray(t)||(yield t)}}},GHt=QHt;JYe=qHt;zye=YHt;KHt=i6(/\s/),I_=i6(" "),XYe=i6(",; "),ZYe=i6(/[^\n\r]/),aYe=i=>i===` -`||i==="\r"||i==="\u2028"||i==="\u2029";ik=JHt;T_=XHt;eKe=$Ye;tKe=new WeakMap;yye=()=>!1;nKe=i=>!/[\S\n\u2028\u2029]/.test(i);Hye=oWt,rKe=()=>!0;hWt=()=>k_,sKe=class extends Error{name="ConfigError"},cYe=class extends Error{name="UndefinedParserError"},fWt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),EK=fWt,pWt={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +${f}`),o.reset(f)}function NHt(i,e,t={}){return LHt(i,e,t)}async function MHt(i,e){let t=await rwe(e),n=t.preprocess?await t.preprocess(i,e):i;e.originalText=n;let o;try{o=await t.parse(n,e,e)}catch(r){RHt(r,i)}return{text:n,ast:o}}function RHt(i,e){let{loc:t}=i;if(t){let{start:n,end:o}=t;n&&(n={line:n.line,column:n.column-1}),o&&(o={line:o.line,column:o.column-1});let r=NHt(e,{start:n,end:o},{highlightCode:!0});i.message+=` +`+r,i.codeFrame=r}throw i}async function FHt(i,e,t,n,o){if(t.embeddedLanguageFormatting!=="auto")return;let{printer:r}=t,{embed:s}=r;if(!s)return;if(s.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:a}=r,{getVisitorKeys:l}=s,c=[];h();let u=i.stack;for(let{print:f,node:p,pathStack:g}of c)try{i.stack=g;let A=await f(d,e,i,t);A&&o.set(p,A)}catch(A){if(globalThis.PRETTIER_DEBUG)throw A}i.stack=u;function d(f,p){return OHt(f,p,t,n)}function h(){let{node:f}=i;if(f===null||typeof f!="object"||a?.(i))return;for(let g of l(f))Array.isArray(f[g])?i.each(h,g):i.call(h,g);let p=s(i,t);if(p){if(typeof p=="function"){c.push({print:p,node:f,pathStack:[...i.stack]});return}o.set(f,p)}}}async function OHt(i,e,t,n){let o=await SR({...t,...e,parentParser:t.parser,originalText:i,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:r}=await q6(i,o),s=await n(r,o);return sKe(s)}function PHt(i,e,t,n){let{originalText:o,[$J]:r,locStart:s,locEnd:a,[Symbol.for("printedComments")]:l}=e,{node:c}=i,u=s(c),d=a(c);for(let f of r)s(f)>=u&&a(f)<=d&&l.add(f);let{printPrettierIgnored:h}=e.printer;return h?h(i,e,t,n):o.slice(u,d)}async function rX(i,e){({ast:i}=await GKe(i,e));let t=new Map,n=new Yzt(i),o=pVt(e),r=new Map;await FHt(n,a,e,rX,r);let s=await YYe(n,e,a,void 0,r);if(fVt(e),e.cursorOffset>=0){if(e.nodeAfterCursor&&!e.nodeBeforeCursor)return[Sk,s];if(e.nodeBeforeCursor&&!e.nodeAfterCursor)return[s,Sk]}return s;function a(c,u){return c===void 0||c===n?l(u):Array.isArray(c)?n.call(()=>l(u),...c):n.call(()=>l(u),c)}function l(c){o(n);let u=n.node;if(u==null)return"";let d=twe(u)&&c===void 0;if(d&&t.has(u))return t.get(u);let h=YYe(n,e,a,c,r);return d&&t.set(u,h),h}}function YYe(i,e,t,n,o){let{node:r}=i,{printer:s}=e,a;switch(s.hasPrettierIgnore?.(i)?a=BHt(i,e,t,n):o.has(r)?a=o.get(r):a=s.print(i,e,t,n),r){case e.cursorNode:a=YJ(a,l=>[Sk,l,Sk]);break;case e.nodeBeforeCursor:a=YJ(a,l=>[l,Sk]);break;case e.nodeAfterCursor:a=YJ(a,l=>[Sk,l]);break}return s.printComment&&yKe(r.comments)&&!s.willPrintOwnComments?.(i,e)&&(a=hVt(i,a,e)),a}async function GKe(i,e){let t=i.comments??[];e[$J]=t,e[Symbol.for("printedComments")]=new Set,oVt(i,e);let{printer:{preprocess:n}}=e;return i=n?await n(i,e):i,{ast:i,comments:t}}function zHt(i,e){let{cursorOffset:t,locStart:n,locEnd:o,getVisitorKeys:r}=e,s=f=>n(f)<=t&&o(f)>=t,a=i,l=[i];for(let f of eVt(i,{getVisitorKeys:r,filter:s}))l.push(f),a=f;if(tVt(a,{getVisitorKeys:r}))return{cursorNode:a};let c,u,d=-1,h=Number.POSITIVE_INFINITY;for(;l.length>0&&(c===void 0||u===void 0);){a=l.pop();let f=c!==void 0,p=u!==void 0;for(let g of nX(a,{getVisitorKeys:r})){if(!f){let A=o(g);A<=t&&A>d&&(c=g,d=A)}if(!p){let A=n(g);A>=t&&As(h,l)).filter(Boolean);let c={},u=new Set(o(a));for(let h in a)!oX(a,h)||r?.has(h)||(u.has(h)?c[h]=s(a[h],a):c[h]=a[h]);let d=n(a,c,l);if(d!==null)return d??c}}function QHt(i,e){return e=new Set(e),i.find(t=>YKe.has(t.type)&&e.has(t))}function KYe(i){let e=jHt(0,i,t=>t.type!=="Program"&&t.type!=="File");return e===-1?i:i.slice(0,e+1)}function GHt(i,e,{locStart:t,locEnd:n}){let[o,...r]=i,[s,...a]=e;if(o===s)return[o,s];let l=t(o);for(let u of KYe(a))if(t(u)>=l)s=u;else break;let c=n(s);for(let u of KYe(r)){if(n(u)<=c)o=u;else break;if(o===s)break}return[o,s]}function Q1e(i,e,t,n,o=[],r,s){let{locStart:a,locEnd:l}=s,c=a(i),u=l(i);if(e>u||en);let r=i.slice(n,o).search(/\S/),s=r===-1;if(!s)for(n+=r;o>n&&!/\S/.test(i[o-1]);--o);let a=e.printer.features?.experimental_locForRangeFormat??e,l=Q1e(t,n,e,(p,g)=>JYe(e,p,g),[],"rangeStart",a);if(!l)return;let c=s?l:Q1e(t,o,e,p=>JYe(e,p),[],"rangeEnd",a);if(!c)return;let u,d;if(t.type==="JsonRoot"){let p=QHt(l,c);u=p,d=p}else[u,d]=GHt(l,c,e);let{locStart:h,locEnd:f}=a;return[Math.min(h(u),h(d)),Math.max(f(u),f(d))]}async function JKe(i,e,t=0){if(!i||i.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await q6(i,e);e.cursorOffset>=0&&(e={...e,...qKe(n,e)});let r=await rX(n,e,t);t>0&&(r=cKe([Mw,r],t,e.tabWidth));let s=iX(r,e);if(t>0){let l=s.formatted.trim();s.cursorNodeStart!==void 0&&(s.cursorNodeStart-=s.formatted.indexOf(l),s.cursorNodeStart<0&&(s.cursorNodeStart=0,s.cursorNodeText=s.cursorNodeText.trimStart()),s.cursorNodeStart+s.cursorNodeText.length>l.length&&(s.cursorNodeText=s.cursorNodeText.trimEnd())),s.formatted=l+Y1e(e.endOfLine)}let a=e[$J];if(e.cursorOffset>=0){let l,c,u,d;if((e.cursorNode||e.nodeBeforeCursor||e.nodeAfterCursor)&&s.cursorNodeText)if(u=s.cursorNodeStart,d=s.cursorNodeText,e.cursorNode)l=e.locStart(e.cursorNode),c=o.slice(l,e.locEnd(e.cursorNode));else{if(!e.nodeBeforeCursor&&!e.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");l=e.nodeBeforeCursor?e.locEnd(e.nodeBeforeCursor):0;let v=e.nodeAfterCursor?e.locStart(e.nodeAfterCursor):o.length;c=o.slice(l,v)}else l=0,c=o,u=0,d=s.formatted;let h=e.cursorOffset-l;if(c===d)return{formatted:s.formatted,cursorOffset:u+h,comments:a};let f=c.split("");f.splice(h,0,XYe);let p=d.split(""),g=B7t(f,p),A=u;for(let v of g)if(v.removed){if(v.value.includes(XYe))break}else A+=v.count;return{formatted:s.formatted,cursorOffset:A,comments:a}}return{formatted:s.formatted,cursorOffset:-1,comments:a}}async function JHt(i,e){let{ast:t,text:n}=await q6(i,e),[o,r]=KHt(n,e,t)??[0,0],s=n.slice(o,r),a=Math.min(o,n.lastIndexOf(` +`,o)+1),l=n.slice(a,o).match(/^\s*/)[0],c=ewe(l,e.tabWidth),u=await JKe(s,{...e,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:e.cursorOffset>o&&e.cursorOffset<=r?e.cursorOffset-o:-1,endOfLine:"lf"},c),d=u.formatted.trimEnd(),{cursorOffset:h}=e;h>r?h+=d.length-s.length:u.cursorOffset>=0&&(h=u.cursorOffset+o);let f=n.slice(0,o)+d+n.slice(r);if(e.endOfLine!=="lf"){let p=Y1e(e.endOfLine);h>=0&&p===`\r +`&&(h+=oKe(f.slice(0,h),` +`)),f=XJ(0,f,` +`,p)}return{formatted:f,cursorOffset:h,comments:u.comments}}function H1e(i,e,t){return typeof e!="number"||Number.isNaN(e)||e<0||e>i.length?t:e}function ZYe(i,e){let{cursorOffset:t,rangeStart:n,rangeEnd:o}=e;return t=H1e(i,t,-1),n=H1e(i,n,0),o=H1e(i,o,i.length),{...e,cursorOffset:t,rangeStart:n,rangeEnd:o}}function XKe(i,e){let{cursorOffset:t,rangeStart:n,rangeEnd:o,endOfLine:r}=ZYe(i,e),s=i.charAt(0)===KKe;if(s&&(i=i.slice(1),t--,n--,o--),r==="auto"&&(r=U7t(i)),i.includes("\r")){let a=l=>oKe(i.slice(0,Math.max(l,0)),`\r +`);t-=a(t),n-=a(n),o-=a(o),i=G7t(i)}return{hasBOM:s,text:i,options:ZYe(i,{...e,cursorOffset:t,rangeStart:n,rangeEnd:o,endOfLine:r})}}async function $Ye(i,e){let t=await rwe(e);return!t.hasPragma||t.hasPragma(i)}async function XHt(i,e){return(await rwe(e)).hasIgnorePragma?.(i)}async function ZKe(i,e){let{hasBOM:t,text:n,options:o}=XKe(i,await SR(e));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await $Ye(n,o)||o.checkIgnorePragma&&await XHt(n,o))return{formatted:i,cursorOffset:e.cursorOffset,comments:[]};let r;return o.rangeStart>0||o.rangeEnd=0&&r.cursorOffset++),r}async function ZHt(i,e,t){let{text:n,options:o}=XKe(i,await SR(e)),r=await q6(n,o);return t&&(t.preprocessForPrint&&(r.ast=await GKe(r.ast,o)),t.massage&&(r.ast=HHt(r.ast,o))),r}async function $Ht(i,e){e=await SR(e);let t=await rX(i,e);return iX(t,e)}async function eWt(i,e){let t=Czt(i),{formatted:n}=await ZKe(t,{...e,parser:"__js_expression"});return n}async function tWt(i,e){e=await SR(e);let{ast:t}=await q6(i,e);return e.cursorOffset>=0&&(e={...e,...qKe(t,e)}),rX(t,e)}async function iWt(i,e){return iX(i,await SR(e))}function sWt(i,e){if(e===!1)return!1;if(i.charAt(e)==="/"&&i.charAt(e+1)==="*"){for(let t=e+2;tMath.max(n,o.length),0)/e.length}function mWt(i,e){let t=uwe(i,e);return t===!1?"":i.charAt(t)}function vWt(i,e){let{preferred:t,alternate:n}=e===!0||e==="'"?bWt:AWt,{length:o}=i,r=0,s=0;for(let a=0;as?n:t).character}function yWt(i,e,t){for(let n=e;ns===n?s:a===e?"\\"+a:a||(t&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(s)?s:"\\"+s));return e+o+e}function IWt(i,e){return arguments.length===2||typeof e=="number"?dwe(i,e):TWt(...arguments)}function _k(i,e=1){return async(...t)=>{let n=t[e]??{},o=n.plugins??[];return t[e]={...n,plugins:Array.isArray(o)?o:Object.values(o)},await i(...t)}}async function fwe(i,e){let{formatted:t}=await hwe(i,{...e,cursorOffset:-1});return t}async function iJe(i,e){return await fwe(i,e)===i}var N7t,G1e,eKe,Q6,M7t,R7t,XJ,F7t,O7t,P7t,z7t,$_,tKe,iKe,V7t,H7t,q1e,nKe,ZJ,W7t,j7t,Q7t,$J,Y7t,Xd,Dk,Rw,tS,Fw,Ow,Pw,Hp,Qv,$m,Bw,zw,Vw,Zd,Gv,Tb,rKe,Tk,X7t,$7t,CR,DYe,J1e,jv,aKe,dzt,hzt,tX,Sk,hKe,yzt,Z1e,Mw,fKe,pKe,wzt,xzt,_zt,Szt,Ezt,Dzt,Tzt,kzt,mKe,gKe,IYe,Izt,Lzt,Mzt,Rzt,Fzt,Ozt,Pzt,$1e,zzt,Vzt,bKe,jzt,Qzt,Db,Wv,U1e,ewe,qzt,Yzt,yKe,twe,Xzt,eS,wKe,xKe,LYe,Ek,Z_,_Ke,SKe,O1e,DKe,nwe,TKe,pVt,IKe,MYe,mVt,oX,gVt,vVt,yVt,wVt,CVt,DVt,TVt,IVt,MKe,xR,RKe,Uv,NVt,FKe,KJ,OYe,MVt,wR,B1e,BKe,FVt,iS,BVt,zVt,VVt,HVt,JVt,XVt,ZVt,jYe,$Vt,eHt,tHt,iHt,nHt,V1e,aHt,lHt,cHt,VKe,uHt,dHt,owe,HKe,WKe,mHt,bHt,UKe,AHt,QYe,CHt,SHt,EHt,GYe,SR,qYe,q6,BHt,qKe,HHt,WHt,UHt,jHt,YKe,YHt,KKe,XYe,swe,nWt,oWt,rWt,$Ke,awe,lwe,cwe,uwe,dwe,dWt,pWt,gWt,eJe,tJe,bWt,AWt,wWt,CWt,hwe,nJe,oJe,mwe=D(()=>{N7t=Object.defineProperty,G1e=(i,e)=>{for(var t in e)N7t(i,t,{get:e[t],enumerable:!0})},eKe={};G1e(eKe,{__debug:()=>oJe,check:()=>iJe,doc:()=>swe,format:()=>fwe,formatWithCursor:()=>hwe,getSupportInfo:()=>nJe,util:()=>awe,version:()=>$Ke});Q6=(i,e)=>(t,n,...o)=>t|1&&n==null?void 0:(e.call(n)??n[i]).apply(n,o),M7t=String.prototype.replaceAll??function(i,e){return i.global?this.replace(i,e):this.split(i).join(e)},R7t=Q6("replaceAll",function(){if(typeof this=="string")return M7t}),XJ=R7t,F7t=class{diff(i,e,t={}){let n;typeof t=="function"?(n=t,t={}):"callback"in t&&(n=t.callback);let o=this.castInput(i,t),r=this.castInput(e,t),s=this.removeEmpty(this.tokenize(o,t)),a=this.removeEmpty(this.tokenize(r,t));return this.diffWithOptionsObj(s,a,t,n)}diffWithOptionsObj(i,e,t,n){var o;let r=v=>{if(v=this.postProcess(v,t),n){setTimeout(function(){n(v)},0);return}else return v},s=e.length,a=i.length,l=1,c=s+a;t.maxEditLength!=null&&(c=Math.min(c,t.maxEditLength));let u=(o=t.timeout)!==null&&o!==void 0?o:1/0,d=Date.now()+u,h=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(h[0],e,i,0,t);if(h[0].oldPos+1>=a&&f+1>=s)return r(this.buildValues(h[0].lastComponent,e,i));let p=-1/0,g=1/0,A=()=>{for(let v=Math.max(p,-l);v<=Math.min(g,l);v+=2){let w,C=h[v-1],_=h[v+1];C&&(h[v-1]=void 0);let E=!1;if(_){let T=_.oldPos-v;E=_&&0<=T&&T=a&&f+1>=s)return r(this.buildValues(w.lastComponent,e,i))||!0;h[v]=w,w.oldPos+1>=a&&(g=Math.min(g,v-1)),f+1>=s&&(p=Math.max(p,v+1))}l++};if(n)(function v(){setTimeout(function(){if(l>c||Date.now()>d)return n(void 0);A()||v()},0)})();else for(;l<=c&&Date.now()<=d;){let v=A();if(v)return v}}addToPath(i,e,t,n,o){let r=i.lastComponent;return r&&!o.oneChangePerToken&&r.added===e&&r.removed===t?{oldPos:i.oldPos+n,lastComponent:{count:r.count+1,added:e,removed:t,previousComponent:r.previousComponent}}:{oldPos:i.oldPos+n,lastComponent:{count:1,added:e,removed:t,previousComponent:r}}}extractCommon(i,e,t,n,o){let r=e.length,s=t.length,a=i.oldPos,l=a-n,c=0;for(;l+1d.length?f:d}),c.value=this.join(u)}else c.value=this.join(e.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}return n}},O7t=class extends F7t{tokenize(i){return i.slice()}join(i){return i}removeEmpty(i){return i}},P7t=new O7t;z7t=()=>{},$_=z7t,tKe="cr",iKe="crlf",V7t="lf",H7t=V7t,q1e="\r",nKe=`\r +`,ZJ=` +`,W7t=ZJ;j7t=new Map([[ZJ,/\n/g],[q1e,/\r/g],[nKe,/\r\n/g]]);Q7t=/\r\n?/g;$J=Symbol.for("comments");Y7t=Q6("at",function(){if(Array.isArray(this)||typeof this=="string")return q7t}),Xd=Y7t,Dk="string",Rw="array",tS="cursor",Fw="indent",Ow="align",Pw="trim",Hp="group",Qv="fill",$m="if-break",Bw="indent-if-break",zw="line-suffix",Vw="line-suffix-boundary",Zd="line",Gv="label",Tb="break-parent",rKe=new Set([tS,Fw,Ow,Pw,Hp,Qv,$m,Bw,zw,Vw,Zd,Gv,Tb]);Tk=J7t,X7t=i=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(i);$7t=class extends Error{name="InvalidDocError";constructor(i){super(Z7t(i)),this.doc=i}},CR=$7t,DYe={};J1e=ezt;jv=$_,aKe=$_,dzt=$_,hzt=$_;tX={type:Tb},Sk={type:tS};hKe={type:Zd},yzt={type:Zd,soft:!0},Z1e={type:Zd,hard:!0},Mw=[Z1e,tX],fKe={type:Zd,hard:!0,literal:!0},pKe=[fKe,tX];wzt={type:Vw},xzt={type:Pw};_zt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Szt=12288,Ezt=65510,Dzt=[12288,12288,65281,65376,65504,65510],Tzt=4352,kzt=262141,mKe=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],gKe=(i,e)=>{let t=0,n=Math.floor(i.length/2)-1;for(;t<=n;){let o=Math.floor((t+n)/2),r=o*2;if(ei[r+1])t=o+1;else return!0}return!1},IYe=19968,[Izt,Lzt]=Nzt(mKe);Mzt=i=>iEzt?!1:gKe(Dzt,i),Rzt=i=>i>=Izt&&i<=Lzt?!0:ikzt?!1:gKe(mKe,i),Fzt=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,Ozt=i=>Fzt.test(i),Pzt=/[^\x20-\x7F]/;$1e=Bzt,zzt={type:0},Vzt={type:1},bKe={value:"",length:0,queue:[],get root(){return bKe}};jzt=class{#e=[];#t="";#n=0;#o=[];#i=[];#r(){let i=this.#t;i!==""&&(this.#e.push(i),this.#n+=i.length,this.#t="");for(let e of this.#i)this.#o.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#o.length+this.#i.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#i.push(this.#n+this.#t.length)}write(i){this.#t+=i}trim(){let{text:i,count:e}=vKe(this.#t);return this.#t=i,this.#r(),e}finish(){return this.#r(),{text:this.#e.join(""),positions:this.#o}}},Qzt=jzt,Db=Symbol("MODE_BREAK"),Wv=Symbol("MODE_FLAT"),U1e=Symbol("DOC_FILL_PRINTED_LENGTH");ewe=Gzt,qzt=class{constructor(i){this.stack=[i]}get key(){let{stack:i,siblings:e}=this;return Xd(0,i,e===null?-2:-4)??null}get index(){return this.siblings===null?null:Xd(0,this.stack,-2)}get node(){return Xd(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:i}=this,e=Xd(0,i,-3);return Array.isArray(e)?e:null}get next(){let{siblings:i}=this;return i===null?null:i[this.index+1]}get previous(){let{siblings:i}=this;return i===null?null:i[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:i,index:e}=this;return i!==null&&e===i.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#t()]}getName(){let{stack:i}=this,{length:e}=i;return e>1?Xd(0,i,-2):null}getValue(){return Xd(0,this.stack,-1)}getNode(i=0){let e=this.#e(i);return e===-1?null:this.stack[e]}getParentNode(i=0){return this.getNode(i+1)}#e(i){let{stack:e}=this;for(let t=e.length-1;t>=0;t-=2)if(!Array.isArray(e[t])&&--i<0)return t;return-1}call(i,...e){let{stack:t}=this,{length:n}=t,o=Xd(0,t,-1);for(let r of e)o=o?.[r],t.push(r,o);try{return i(this)}finally{t.length=n}}callParent(i,e=0){let t=this.#e(e+1),n=this.stack.splice(t+1);try{return i(this)}finally{this.stack.push(...n)}}each(i,...e){let{stack:t}=this,{length:n}=t,o=Xd(0,t,-1);for(let r of e)o=o[r],t.push(r,o);try{for(let r=0;r{t[o]=i(n,o,r)},...e),t}match(...i){let e=this.stack.length-1,t=null,n=this.stack[e--];for(let o of i){if(n===void 0)return!1;let r=null;if(typeof t=="number"&&(r=t,t=this.stack[e--],n=this.stack[e--]),o&&!o(n,t,r))return!1;t=this.stack[e--],n=this.stack[e--]}return!0}findAncestor(i){for(let e of this.#t())if(i(e))return e}hasAncestor(i){for(let e of this.#t())if(i(e))return!0;return!1}*#t(){let{stack:i}=this;for(let e=i.length-3;e>=0;e-=2){let t=i[e];Array.isArray(t)||(yield t)}}},Yzt=qzt;yKe=Kzt;twe=Jzt;Xzt=G6(/\s/),eS=G6(" "),wKe=G6(",; "),xKe=G6(/[^\n\r]/),LYe=i=>i===` +`||i==="\r"||i==="\u2028"||i==="\u2029";Ek=Zzt;Z_=$zt;_Ke=CKe;SKe=new WeakMap;O1e=()=>!1;DKe=i=>!/[\S\n\u2028\u2029]/.test(i);nwe=aVt,TKe=()=>!0;pVt=()=>$_,IKe=class extends Error{name="ConfigError"},MYe=class extends Error{name="UndefinedParserError"},mVt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),oX=mVt,gVt={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:i=>typeof i=="string"||typeof i=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:i=>typeof i=="string"||typeof i=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};bWt=Array.prototype.toReversed??function(){return[...this].reverse()},vWt=t6("toReversed",function(){if(Array.isArray(this))return bWt}),AWt=vWt;wWt=yWt();SWt=i=>String(i).split(/[/\\]/).pop(),EWt=i=>String(i).startsWith("file:");TWt=void 0;cKe=kWt,WM={key:i=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(i)?i:JSON.stringify(i),value(i){if(i===null||typeof i!="object")return JSON.stringify(i);if(Array.isArray(i))return`[${i.map(t=>WM.value(t)).join(", ")}]`;let e=Object.keys(i);return e.length===0?"{}":`{ ${e.map(t=>`${WM.key(t)}: ${WM.value(i[t])}`).join(", ")} }`},pair:({key:i,value:e})=>WM.value({[i]:e})},uKe=new Proxy(String,{get:()=>uKe}),CA=uKe,IWt=(i,e,{descriptor:t})=>{let n=[`${CA.yellow(typeof i=="string"?t.key(i):t.pair(i))} is deprecated`];return e&&n.push(`we now treat it as ${CA.blue(typeof e=="string"?t.key(e):t.pair(e))}`),n.join("; ")+"."},dKe=Symbol.for("vnopts.VALUE_NOT_EXIST"),bK=Symbol.for("vnopts.VALUE_UNCHANGED"),hYe=" ".repeat(2),LWt=(i,e,t)=>{let{text:n,list:r}=t.normalizeExpectedResult(t.schemas[i].expected(t)),o=[];return n&&o.push(fYe(i,e,n,t.descriptor)),r&&o.push([fYe(i,e,r.title,t.descriptor)].concat(r.values.map(s=>hKe(s,t.loggerPrintWidth))).join(` -`)),fKe(o,t.loggerPrintWidth)};HM=[],xye=[];pKe=(i,e,{descriptor:t,logger:n,schemas:r})=>{let o=[`Ignored unknown option ${CA.yellow(t.pair({key:i,value:e}))}.`],s=NWt(i,Object.keys(r),{maxDistance:3});s&&o.push(`Did you mean ${CA.blue(t.key(s))}?`),n.warn(o.join(" "))},MWt=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];N_=class{static create(i){return RWt(this,i)}constructor(i){this.name=i.name}default(i){}expected(i){return"nothing"}validate(i,e){return!1}deprecated(i,e){return!1}forward(i,e){}redirect(i,e){}overlap(i,e,t){return i}preprocess(i,e){return i}postprocess(i,e){return bK}};OWt=class extends N_{constructor(i){super(i),this._sourceName=i.sourceName}expected(i){return i.schemas[this._sourceName].expected(i)}validate(i,e){return e.schemas[this._sourceName].validate(i,e)}redirect(i,e){return this._sourceName}},PWt=class extends N_{expected(){return"anything"}validate(){return!0}},BWt=class extends N_{constructor({valueSchema:i,name:e=i.name,...t}){super({...t,name:e}),this._valueSchema=i}expected(i){let{text:e,list:t}=i.normalizeExpectedResult(this._valueSchema.expected(i));return{text:e&&`an array of ${e}`,list:t&&{title:"an array of the following values",values:[{list:t}]}}}validate(i,e){if(!Array.isArray(i))return!1;let t=[];for(let n of i){let r=e.normalizeValidateResult(this._valueSchema.validate(n,e),n);r!==!0&&t.push(r.value)}return t.length===0?!0:{value:t}}deprecated(i,e){let t=[];for(let n of i){let r=e.normalizeDeprecatedResult(this._valueSchema.deprecated(n,e),n);r!==!1&&t.push(...r.map(({value:o})=>({value:[o]})))}return t}forward(i,e){let t=[];for(let n of i){let r=e.normalizeForwardResult(this._valueSchema.forward(n,e),n);t.push(...r.map(pYe))}return t}redirect(i,e){let t=[],n=[];for(let r of i){let o=e.normalizeRedirectResult(this._valueSchema.redirect(r,e),r);"remain"in o&&t.push(o.remain),n.push(...o.redirect.map(pYe))}return t.length===0?{redirect:n}:{redirect:n,remain:t}}overlap(i,e){return i.concat(e)}};zWt=class extends N_{expected(){return"true or false"}validate(i){return typeof i=="boolean"}};YWt=class extends N_{constructor(i){super(i),this._choices=HWt(i.choices.map(e=>e&&typeof e=="object"?e:{value:e}),"value")}expected({descriptor:i}){let e=Array.from(this._choices.keys()).map(r=>this._choices.get(r)).filter(({hidden:r})=>!r).map(r=>r.value).sort(QWt).map(i.value),t=e.slice(0,-2),n=e.slice(-2);return{text:t.concat(n.join(" or ")).join(", "),list:{title:"one of the following values",values:e}}}validate(i){return this._choices.has(i)}deprecated(i){let e=this._choices.get(i);return e&&e.deprecated?{value:i}:!1}forward(i){let e=this._choices.get(i);return e?e.forward:void 0}redirect(i){let e=this._choices.get(i);return e?e.redirect:void 0}},KWt=class extends N_{expected(){return"a number"}validate(i,e){return typeof i=="number"}},JWt=class extends KWt{expected(){return"an integer"}validate(i,e){return e.normalizeValidateResult(super.validate(i,e),i)===!0&&jWt(i)}},yYe=class extends N_{expected(){return"a string"}validate(i){return typeof i=="string"}},XWt=WM,ZWt=pKe,$Wt=LWt,eUt=IWt,tUt=class{constructor(i,e){let{logger:t=console,loggerPrintWidth:n=80,descriptor:r=XWt,unknown:o=ZWt,invalid:s=$Wt,deprecated:a=eUt,missing:l=()=>!1,required:c=()=>!1,preprocess:u=h=>h,postprocess:d=()=>bK}=e||{};this._utils={descriptor:r,logger:t||{warn:()=>{}},loggerPrintWidth:n,schemas:VWt(i,"name"),normalizeDefaultResult:mYe,normalizeExpectedResult:mKe,normalizeDeprecatedResult:bYe,normalizeForwardResult:Tye,normalizeRedirectResult:AYe,normalizeValidateResult:gYe},this._unknownHandler=o,this._invalidHandler=GWt(s),this._deprecatedHandler=a,this._identifyMissing=(h,f)=>!(h in f)||l(h,f),this._identifyRequired=c,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=WWt()}normalize(i){let e={},t=[this._preprocess(i,this._utils)],n=()=>{for(;t.length!==0;){let r=t.shift(),o=this._applyNormalization(r,e);t.push(...o)}};n();for(let r of Object.keys(this._utils.schemas)){let o=this._utils.schemas[r];if(!(r in e)){let s=mYe(o.default(this._utils));"value"in s&&t.push({[r]:s.value})}}n();for(let r of Object.keys(this._utils.schemas)){if(!(r in e))continue;let o=this._utils.schemas[r],s=e[r],a=o.postprocess(s,this._utils);a!==bK&&(this._applyValidation(a,r,o),e[r]=a)}return this._applyPostprocess(e),this._applyRequiredCheck(e),e}_applyNormalization(i,e){let t=[],{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(i);for(let o of n){let s=this._utils.schemas[o],a=s.preprocess(i[o],this._utils);this._applyValidation(a,o,s);let l=({from:d,to:h})=>{t.push(typeof h=="string"?{[h]:d}:{[h.key]:h.value})},c=({value:d,redirectTo:h})=>{let f=bYe(s.deprecated(d,this._utils),a,!0);if(f!==!1)if(f===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,h,this._utils));else for(let{value:p}of f){let g={key:o,value:p};if(!this._hasDeprecationWarned(g)){let v=typeof h=="string"?{key:h,value:p}:h;this._utils.logger.warn(this._deprecatedHandler(g,v,this._utils))}}};Tye(s.forward(a,this._utils),a).forEach(l);let u=AYe(s.redirect(a,this._utils),a);if(u.redirect.forEach(l),"remain"in u){let d=u.remain;e[o]=o in e?s.overlap(e[o],d,this._utils):d,c({value:d})}for(let{from:d,to:h}of u.redirect)c({value:d,redirectTo:h})}for(let o of r){let s=i[o];this._applyUnknownHandler(o,s,e,(a,l)=>{t.push({[a]:l})})}return t}_applyRequiredCheck(i){for(let e of Object.keys(this._utils.schemas))if(this._identifyMissing(e,i)&&this._identifyRequired(e))throw this._invalidHandler(e,dKe,this._utils)}_partitionOptionKeys(i){let[e,t]=UWt(Object.keys(i).filter(n=>!this._identifyMissing(n,i)),n=>n in this._utils.schemas);return{knownKeys:e,unknownKeys:t}}_applyValidation(i,e,t){let n=gYe(t.validate(i,this._utils),i);if(n!==!0)throw this._invalidHandler(e,n.value,this._utils)}_applyUnknownHandler(i,e,t,n){let r=this._unknownHandler(i,e,this._utils);if(r)for(let o of Object.keys(r)){if(this._identifyMissing(o,r))continue;let s=r[o];o in this._utils.schemas?n(o,s):t[o]=s}}_applyPostprocess(i){let e=this._postprocess(i,this._utils);if(e!==bK){if(e.delete)for(let t of e.delete)delete i[t];if(e.override){let{knownKeys:t,unknownKeys:n}=this._partitionOptionKeys(e.override);for(let r of t){let o=e.override[r];this._applyValidation(o,r,this._utils.schemas[r]),i[r]=o}for(let r of n){let o=e.override[r];this._applyUnknownHandler(r,o,i,(s,a)=>{let l=this._utils.schemas[s];this._applyValidation(a,s,l),i[s]=a})}}}}};oUt=iUt,sUt=Array.prototype.findLast??function(i){for(let e=this.length-1;e>=0;e--){let t=this[e];if(i(t,e,this))return t}},aUt=t6("findLast",function(){if(Array.isArray(this))return sUt}),gKe=aUt,lUt=Symbol.for("PRETTIER_IS_FRONT_MATTER"),cUt=[];Wye=uUt,bKe=new Set(["yaml","toml"]),vKe=({node:i})=>Wye(i)&&bKe.has(i.language);fUt=hUt;mUt=pUt,AKe=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),gUt=i=>Object.keys(i).filter(e=>!AKe.has(e));wYe=bUt;wUt=new WeakMap;CUt=["clean","embed","print"],_Ut=Object.fromEntries(CUt.map(i=>[i,!1]));xYe={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};QM=DUt,CYe=/\r\n|[\n\r\u2028\u2029]/;n6=LUt;OUt=FUt;CKe=PUt;zUt=BUt,VUt=Array.prototype.findLastIndex??function(i){for(let e=this.length-1;e>=0;e--){let t=this[e];if(i(t,e,this))return e}return-1},HUt=t6("findLastIndex",function(){if(Array.isArray(this))return VUt}),WUt=HUt;_Ke=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),GUt=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);SKe="\uFEFF",DYe=Symbol("cursor");jye={};Iye(jye,{builders:()=>tjt,printer:()=>ijt,utils:()=>njt});tjt={join:HYe,line:WYe,softline:vHt,hardline:gw,literalline:jYe,group:VYe,conditionalGroup:pHt,fill:fHt,lineSuffix:Eye,lineSuffixBoundary:AHt,cursor:tk,breakParent:CK,ifBreak:mHt,trim:yHt,indent:vK,indentIfBreak:gHt,align:jM,addAlignmentToDoc:zYe,markAsRoot:BYe,dedentToRoot:dHt,dedent:hHt,hardlineWithoutBreakParent:Oye,literallineWithoutBreakParent:UYe,label:bHt,concat:i=>i},ijt={printDocToString:_K},njt={willBreak:eHt,traverseDoc:Rye,findInDoc:Fye,mapDoc:xK,removeLines:nHt,stripTrailingHardline:OYe,replaceEndOfLine:sHt,canBreak:lHt},kKe="3.9.6",Qye={};Iye(Qye,{addDanglingComment:()=>$T,addLeadingComment:()=>$5,addTrailingComment:()=>e6,getAlignmentSize:()=>Bye,getIndentSize:()=>cjt,getMaxContinuousCount:()=>hjt,getNextNonSpaceNonCommentCharacter:()=>pjt,getNextNonSpaceNonCommentCharacterIndex:()=>Cjt,getPreferredQuote:()=>bjt,getStringWidth:()=>Pye,hasNewline:()=>T_,hasNewlineInRange:()=>Ajt,hasSpaces:()=>wjt,isNextLineEmpty:()=>Tjt,isNextLineEmptyAfterIndex:()=>Kye,isPreviousLineEmpty:()=>Sjt,makeString:()=>Djt,skip:()=>i6,skipEverythingButNewLine:()=>ZYe,skipInlineComment:()=>Gye,skipNewline:()=>ik,skipSpaces:()=>I_,skipToLineEnd:()=>XYe,skipTrailingComment:()=>qye,skipWhitespace:()=>KHt});Gye=rjt;qye=ojt;Yye=sjt;Kye=ajt;cjt=ljt;hjt=djt;pjt=fjt,IKe=Object.freeze({character:"'",codePoint:39}),LKe=Object.freeze({character:'"',codePoint:34}),mjt=Object.freeze({preferred:IKe,alternate:LKe}),gjt=Object.freeze({preferred:LKe,alternate:IKe});Ajt=vjt;wjt=yjt;Jye=ek(TKe);MKe=ek(aKe,0),RKe={parse:ek(JUt),formatAST:ek(XUt),formatDoc:ek(ZUt),printToDoc:ek($Ut),printDocToString:ek(ejt)}});var fJe={};Ih(fJe,{default:()=>QKe,languages:()=>$Ke,options:()=>eJe,parsers:()=>r1e,printers:()=>hJe});function Mh(i){return a6(i),{type:Rjt,contents:i}}function zm(i,e={}){return a6(i),qKe(e.expandedStates,!0),{type:Fjt,id:e.id,contents:i,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function TA(i,e="",t={}){return a6(i),e!==""&&a6(e),{type:Ojt,breakContents:i,flatContents:e,groupId:t.groupId}}function Iu(i,e){a6(i),qKe(e);let t=[];for(let n=0;n{if(t===!1)return!1;let r=!!n?.backwards,{length:o}=e,s=t;for(;s>=0&&s!(c.leading||c.trailing||c.marker!==r||!o(c))));if(s.size===0)return"";let a=i.map(({node:c})=>s.has(c)?Gjt(i,e):"","comments").filter(Boolean),l=Iu(zl,a);return n?Mh([zl,l]):l}function qjt(i){return Array.isArray(i)&&i.length>0}function s6(i){if(r6!==null&&typeof r6.property){let e=r6;return r6=s6.prototype=null,e}return r6=s6.prototype=i??Object.create(null),new s6}function Xjt(i){return s6(i)}function Zjt(i,e="type"){Xjt(i);function t(n){let r=n[e],o=i[r];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:n});return o}return t}function ZKe(i,e){i.kind==="StringValue"&&i.block&&!i.value.includes(` -`)&&(e.value=i.value.trim())}function cQt(i,e){if(e===!1)return!1;if(i.charAt(e)==="/"&&i.charAt(e+1)==="*"){for(let t=e+2;t{let s=t();return!r&&pQt(e.originalText,XKe(o))?[s,zl]:s},n)}function PKe(i,e,t){let{node:n}=i;return Nf(n.arguments)?zm(["(",Mh([Vl,Iu([TA("",", "),Vl],DA(i,e,t,"arguments"))]),Vl,")"]):""}function mb(i,e,t){let{node:n}=i;if(!n.description)return"";let r=[t("description")];return n.kind==="InputValueDefinition"&&!n.description.block?r.push(GM):r.push(zl),r}function jd(i,e){let{node:t}=i;if(!Nf(t.directives))return"";let n=Iu(GM,i.map(e,"directives"));return t.kind==="FragmentDefinition"||t.kind==="OperationDefinition"?zm([GM,n]):[" ",zm(Mh([Vl,n]))]}function BKe(i,e){let{node:t}=i;return Nf(t.variableDefinitions)?zm(["(",Mh([Vl,Iu([TA("",", "),Vl],i.map(e,"variableDefinitions"))]),Vl,")"]):""}function mQt(i,e,t){let{node:n}=i;switch(n.kind){case"Document":return[...Iu(zl,DA(i,e,t,"definitions")),zl];case"OperationDefinition":{let r=e.originalText[JKe(n)]!=="{",o=!!n.name;return[mb(i,e,t),r?n.operation:"",r&&o?[" ",t("name")]:"",r&&!o&&Nf(n.variableDefinitions)?" ":"",BKe(i,t),jd(i,t),!r&&!o?"":" ",t("selectionSet")]}case"FragmentDefinition":return[mb(i,e,t),"fragment ",t("name"),BKe(i,t)," on ",t("typeCondition"),jd(i,t)," ",t("selectionSet")];case"SelectionSet":return["{",Mh([zl,Iu(zl,DA(i,e,t,"selections"))]),zl,"}"];case"Field":return zm([n.alias?[t("alias"),": "]:"",t("name"),Nf(n.arguments)?zm(["(",Mh([Vl,Iu([TA("",", "),Vl],DA(i,e,t,"arguments"))]),Vl,")"]):"",jd(i,t),n.selectionSet?" ":"",t("selectionSet")]);case"Name":return n.value;case"StringValue":if(n.block){let r=e1e(0,n.value,'"""','\\"""').split(` -`);return r.length===1&&(r[0]=r[0].trim()),r.every(o=>o==="")&&(r.length=0),Iu(zl,['"""',...r,'"""'])}return['"',e1e(0,e1e(0,n.value,/["\\]/g,"\\$&"),` -`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return n.value;case"BooleanValue":return n.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",t("name")];case"ListValue":{let r=!Nf(n.values);return zm(["[",OKe(i,e,{indent:!0}),r?"":Mh([Vl,Iu([TA("",", "),Vl],i.map(t,"values"))]),Vl,"]"])}case"ObjectValue":{let r=!Nf(n.fields),o=e.bracketSpacing&&!r?" ":"";return zm(["{",o,OKe(i,e,{indent:!0}),r?"":[Mh([Vl,Iu([TA("",", "),Vl],i.map(t,"fields"))])],Vl,TA("",o),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[t("name"),": ",t("value")];case"Directive":return["@",t("name"),PKe(i,e,t)];case"NamedType":return t("name");case"VariableDefinition":return[mb(i,e,t),t("variable"),": ",t("type"),n.defaultValue?[" = ",t("defaultValue")]:"",jd(i,t)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=n,o=[];return r.endsWith("TypeDefinition")?o.push(mb(i,e,t)):o.push("extend "),r.startsWith("ObjectType")?o.push("type"):r.startsWith("InputObjectType")?o.push("input"):o.push("interface"),o.push(" ",t("name")),!r.startsWith("InputObjectType")&&Nf(n.interfaces)&&o.push(" implements ",Mh([zm([Iu([" &",GM],i.map(t,"interfaces"))])])),o.push(jd(i,t)),Nf(n.fields)&&o.push([" {",Mh([zl,Iu(zl,DA(i,e,t,"fields"))]),zl,"}"]),o}case"FieldDefinition":return[mb(i,e,t),t("name"),Nf(n.arguments)?zm(["(",Mh([Vl,Iu([TA("",", "),Vl],DA(i,e,t,"arguments"))]),Vl,")"]):"",": ",t("type"),jd(i,t)];case"DirectiveDefinition":return[mb(i,e,t),"directive ","@",t("name"),Nf(n.arguments)?zm(["(",Mh([Vl,Iu([TA("",", "),Vl],DA(i,e,t,"arguments"))]),Vl,")"]):"",jd(i,t),n.repeatable?" repeatable":""," on ",...Iu(" | ",i.map(t,"locations"))];case"DirectiveExtension":return["extend directive @",t("name"),jd(i,t)];case"EnumTypeExtension":case"EnumTypeDefinition":return[mb(i,e,t),n.kind==="EnumTypeExtension"?"extend ":"","enum ",t("name"),jd(i,t),Nf(n.values)?[" {",Mh([zl,Iu(zl,DA(i,e,t,"values"))]),zl,"}"]:""];case"EnumValueDefinition":return[mb(i,e,t),t("name"),jd(i,t)];case"InputValueDefinition":return[mb(i,e,t),t("name"),": ",t("type"),n.defaultValue?[" = ",t("defaultValue")]:"",jd(i,t)];case"SchemaExtension":return["extend schema",jd(i,t),...Nf(n.operationTypes)?[" {",Mh([zl,Iu(zl,DA(i,e,t,"operationTypes"))]),zl,"}"]:[]];case"SchemaDefinition":return[mb(i,e,t),"schema",jd(i,t)," {",Nf(n.operationTypes)?Mh([zl,Iu(zl,DA(i,e,t,"operationTypes"))]):"",zl,"}"];case"OperationTypeDefinition":return[n.operation,": ",t("type")];case"FragmentSpread":return["...",t("name"),PKe(i,e,t),jd(i,t)];case"InlineFragment":return["...",n.typeCondition?[" on ",t("typeCondition")]:"",jd(i,t)," ",t("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return zm([mb(i,e,t),zm([n.kind==="UnionTypeExtension"?"extend ":"","union ",t("name"),jd(i,t),Nf(n.types)?[" =",TA(""," "),Mh([TA([GM,"| "]),Iu([GM,"| "],i.map(t,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[mb(i,e,t),n.kind==="ScalarTypeExtension"?"extend ":"","scalar ",t("name"),jd(i,t)];case"NonNullType":return[t("type"),"!"];case"ListType":return["[",t("type"),"]"];default:throw new Kjt(n,"Graphql","kind")}}function gQt(i){return i.kind!=="Comment"}function bQt({node:i}){if(i.kind==="Comment")return"#"+i.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(i))}function vQt(i){let{node:e}=i;return e?.comments?.some(t=>t.value.trim()==="prettier-ignore")}function CQt(i,e){return i?.__kind===e}function SQt(i){return typeof i=="object"&&i!==null}function EQt(i,e){if(!i)throw new Error(e??"Unexpected invariant triggered.")}function t1e(i,e){let t=0,n=1;for(let r of i.body.matchAll(DQt)){if(typeof r.index!="number"&&EQt(!1),r.index>=e)break;t=r.index+r[0].length,n+=1}return{line:n,column:e+1-t}}function TQt(i){return tJe(i.source,t1e(i.source,i.start))}function tJe(i,e){let t=i.locationOffset.column-1,n="".padStart(t)+i.body,r=e.line-1,o=i.locationOffset.line-1,s=e.line+o,a=e.line===1?t:0,l=e.column+a,c=`${i.name}:${s}:${l} -`,u=n.split(/\r\n|[\n\r]/g),d=u[r];if(d.length>120){let h=Math.floor(l/80),f=l%80,p=[];for(let g=0;g["|",g]),["|","^".padStart(f)],["|",p[h+1]]])}return c+zKe([[`${s-1} |`,u[r-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,u[r+1]]])}function zKe(i){let e=i.filter(([n,r])=>r!==void 0),t=Math.max(...e.map(([n])=>n.length));return e.map(([n,r])=>n.padStart(t)+(r?" "+r:"")).join(` -`)}function VKe(i){return i===void 0||i.length===0?void 0:i}function HKe(i,e){if(!i)throw new Error(e)}function TGt(i){return i===9||i===32}function qM(i){return i>=48&&i<=57}function oJe(i){return i>=97&&i<=122||i>=65&&i<=90}function sJe(i){return oJe(i)||i===95}function kGt(i){return oJe(i)||qM(i)||i===95}function IGt(i){let e=Number.MAX_SAFE_INTEGER,t=null,n=-1;for(let r=0;ro===0?r:r.slice(e)).slice(t??0,n+1)}function LGt(i){let e=0;for(;e=0&&i<=55295||i>=57344&&i<=1114111}function NK(i,e){return aJe(i.charCodeAt(e))&&lJe(i.charCodeAt(e+1))}function aJe(i){return i>=55296&&i<=56319}function lJe(i){return i>=56320&&i<=57343}function ok(i,e){let t=i.source.body.codePointAt(e);if(t===void 0)return ct.EOF;if(t>=32&&t<=126){let n=String.fromCodePoint(t);return n==='"'?`'"'`:`"${n}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function Wc(i,e,t,n,r){let o=i.line,s=1+t-i.lineStart;return new rJe(e,t,n,o,s,r)}function BGt(i,e){let t=i.source.body,n=t.length,r=e;for(;r=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function jGt(i,e){let t=i.source.body;switch(t.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw fc(i.source,e,`Invalid character escape sequence: "${t.slice(e,e+2)}".`)}function QGt(i,e){let t=i.source.body,n=t.length,r=i.lineStart,o=e+3,s=o,a="",l=[];for(;ojKe(i,e),{source:i}):jKe(i,e)}function jKe(i,e){let t=new KGt(i,e),n=t.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:t.tokenCount}),n}function kK(i){let e=i.value;return dJe(i.kind)+(e!=null?` "${e}"`:"")}function dJe(i){return PGt(i)?`"${i}"`:i}function JGt(i,e){let t=new SyntaxError(i+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(t,e)}function ZGt(i){let e=[],{startToken:t,endToken:n}=i.loc;for(let r=t;r!==n;r=r.next)r.kind==="Comment"&&e.push({...r,loc:{start:r.start,end:r.end}});return e}function eqt(i){if(!(i instanceof iJe))return i;let{message:e,locations:[t]}=i;return XGt(e,{loc:{start:t},cause:i})}function tqt(i){let e;try{e=YGt(i,$Gt)}catch(t){throw eqt(t)}return e.comments=ZGt(e),e}var kjt,i1e,QKe,Ijt,Ljt,Njt,e1e,Mjt,GKe,Rjt,Fjt,Ojt,n1e,Pjt,a6,qKe,Bjt,GM,Vl,zjt,zl,U6i,YKe,Vjt,Hjt,FKe,KKe,jjt,Qjt,Nf,Yjt,Kjt,r6,Jjt,$jt,Nh,eQt,tQt,iQt,JKe,XKe,nQt,rQt,oQt,sQt,aQt,lQt,uQt,hQt,pQt,AQt,yQt,$Ke,wQt,xQt,eJe,r1e,_Qt,DQt,iJe,kQt,IQt,LQt,rJe,TK,$i,NQt,MQt,RQt,FQt,OQt,PQt,BQt,zQt,VQt,HQt,WQt,UQt,jQt,QQt,GQt,qQt,YQt,KQt,JQt,XQt,ZQt,$Qt,eGt,tGt,iGt,nGt,rGt,oGt,sGt,aGt,lGt,cGt,uGt,dGt,hGt,fGt,pGt,mGt,gGt,bGt,vGt,AGt,yGt,wGt,xGt,CGt,_Gt,SGt,EGt,DGt,NGt,sk,WKe,j6i,Q6i,G6i,q6i,Y6i,K6i,RGt,ct,OGt,cJe,uJe,KGt,XGt,$Gt,iqt,hJe,pJe=D(()=>{kjt=Object.defineProperty,i1e=(i,e)=>{for(var t in e)kjt(i,t,{get:e[t],enumerable:!0})},QKe={};i1e(QKe,{languages:()=>$Ke,options:()=>eJe,parsers:()=>r1e,printers:()=>hJe});Ijt=(i,e)=>(t,n,...r)=>t|1&&n==null?void 0:(e.call(n)??n[i]).apply(n,r),Ljt=String.prototype.replaceAll??function(i,e){return i.global?this.replace(i,e):this.split(i).join(e)},Njt=Ijt("replaceAll",function(){if(typeof this=="string")return Ljt}),e1e=Njt,Mjt=()=>{},GKe=Mjt,Rjt="indent",Fjt="group",Ojt="if-break",n1e="line",Pjt="break-parent",a6=GKe,qKe=GKe;Bjt={type:Pjt};GM={type:n1e},Vl={type:n1e,soft:!0},zjt={type:n1e,hard:!0},zl=[zjt,Bjt];U6i=LK(/\s/),YKe=LK(" "),Vjt=LK(",; "),Hjt=LK(/[^\n\r]/),FKe=i=>i===` -`||i==="\r"||i==="\u2028"||i==="\u2029";KKe=Wjt;jjt=Ujt,Qjt=()=>!0;Nf=qjt,Yjt=class extends Error{name="UnexpectedNodeError";constructor(i,e,t="type"){super(`Unexpected ${e} node ${t}: ${JSON.stringify(i[t])}.`),this.node=i}},Kjt=Yjt,r6=null;Jjt=10;for(let i=0;i<=Jjt;i++)s6();$jt=Zjt,Nh=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],eQt={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:Nh[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:Nh[1],FragmentArgument:Nh[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:Nh[1],Directive:["name","arguments"],NamedType:Nh[0],ListType:Nh[2],NonNullType:Nh[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:Nh[2],ScalarTypeDefinition:Nh[3],ObjectTypeDefinition:Nh[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:Nh[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:Nh[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:Nh[5],ScalarTypeExtension:Nh[5],ObjectTypeExtension:Nh[6],InterfaceTypeExtension:Nh[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},tQt=$jt(eQt,"kind"),iQt=tQt,JKe=i=>i.loc.start,XKe=i=>i.loc.end;ZKe.ignoredProperties=new Set(["loc","comments"]);nQt="format",rQt=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,oQt=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,sQt=i=>oQt.test(i),aQt=i=>rQt.test(i),lQt=i=>`# @${nQt} - -${i}`;uQt=cQt;hQt=dQt;pQt=fQt;AQt={print:mQt,massageAstNode:ZKe,hasPrettierIgnore:vQt,insertPragma:lQt,printComment:bQt,canAttachComment:gQt,getVisitorKeys:iQt},yQt=AQt,$Ke=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],wQt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},xQt={bracketSpacing:wQt.bracketSpacing},eJe=xQt,r1e={};i1e(r1e,{graphql:()=>iqt});_Qt=CQt;DQt=/\r\n|[\n\r]/g;iJe=class nJe extends Error{constructor(e,t={}){let{nodes:n,source:r,positions:o,path:s,originalError:a,cause:l,extensions:c}=t,u="cause"in t,d=u?l:a,h=u||a!=null?{cause:d}:void 0;super(e,h),this.name="GraphQLError",this.path=s??void 0;let f=a??(l instanceof Error?l:void 0);this.originalError=f,this.nodes=VKe(Array.isArray(n)?n:n?[n]:void 0);let p=VKe(this.nodes?.map(v=>v.loc).filter(v=>v!=null));this.source=r??p?.[0]?.source,this.positions=o??p?.map(v=>v.start),this.locations=o&&r?o.map(v=>t1e(r,v)):p?.map(v=>t1e(v.source,v.start));let g=SQt(f?.extensions)?f.extensions:void 0;this.extensions=c??g??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),a?.stack!=null?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,nJe):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+=` - -`+TQt(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+=` - -`+tJe(this.source,t);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};kQt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),IQt=kQt,LQt=class{constructor(i,e,t){this.start=i.start,this.end=e.end,this.startToken=i,this.endToken=e,this.source=t}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},rJe=class{constructor(i,e,t,n,r,o){this.kind=i,this.start=e,this.end=t,this.line=n,this.column=r,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},TK={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},$i={};i1e($i,{ARGUMENT:()=>BQt,ARGUMENT_COORDINATE:()=>SGt,BOOLEAN:()=>qQt,DIRECTIVE:()=>$Qt,DIRECTIVE_ARGUMENT_COORDINATE:()=>DGt,DIRECTIVE_COORDINATE:()=>EGt,DIRECTIVE_DEFINITION:()=>pGt,DIRECTIVE_EXTENSION:()=>gGt,DOCUMENT:()=>MQt,ENUM:()=>KQt,ENUM_TYPE_DEFINITION:()=>dGt,ENUM_TYPE_EXTENSION:()=>wGt,ENUM_VALUE_DEFINITION:()=>hGt,FIELD:()=>PQt,FIELD_DEFINITION:()=>aGt,FLOAT:()=>QQt,FRAGMENT_ARGUMENT:()=>zQt,FRAGMENT_DEFINITION:()=>WQt,FRAGMENT_SPREAD:()=>VQt,INLINE_FRAGMENT:()=>HQt,INPUT_OBJECT_TYPE_DEFINITION:()=>fGt,INPUT_OBJECT_TYPE_EXTENSION:()=>xGt,INPUT_VALUE_DEFINITION:()=>lGt,INT:()=>jQt,INTERFACE_TYPE_DEFINITION:()=>cGt,INTERFACE_TYPE_EXTENSION:()=>AGt,LIST:()=>JQt,LIST_TYPE:()=>tGt,MEMBER_COORDINATE:()=>_Gt,NAME:()=>NQt,NAMED_TYPE:()=>eGt,NON_NULL_TYPE:()=>iGt,NULL:()=>YQt,OBJECT:()=>XQt,OBJECT_FIELD:()=>ZQt,OBJECT_TYPE_DEFINITION:()=>sGt,OBJECT_TYPE_EXTENSION:()=>vGt,OPERATION_DEFINITION:()=>RQt,OPERATION_TYPE_DEFINITION:()=>rGt,SCALAR_TYPE_DEFINITION:()=>oGt,SCALAR_TYPE_EXTENSION:()=>bGt,SCHEMA_DEFINITION:()=>nGt,SCHEMA_EXTENSION:()=>mGt,SELECTION_SET:()=>OQt,STRING:()=>GQt,TYPE_COORDINATE:()=>CGt,UNION_TYPE_DEFINITION:()=>uGt,UNION_TYPE_EXTENSION:()=>yGt,VARIABLE:()=>UQt,VARIABLE_DEFINITION:()=>FQt});NQt="Name",MQt="Document",RQt="OperationDefinition",FQt="VariableDefinition",OQt="SelectionSet",PQt="Field",BQt="Argument",zQt="FragmentArgument",VQt="FragmentSpread",HQt="InlineFragment",WQt="FragmentDefinition",UQt="Variable",jQt="IntValue",QQt="FloatValue",GQt="StringValue",qQt="BooleanValue",YQt="NullValue",KQt="EnumValue",JQt="ListValue",XQt="ObjectValue",ZQt="ObjectField",$Qt="Directive",eGt="NamedType",tGt="ListType",iGt="NonNullType",nGt="SchemaDefinition",rGt="OperationTypeDefinition",oGt="ScalarTypeDefinition",sGt="ObjectTypeDefinition",aGt="FieldDefinition",lGt="InputValueDefinition",cGt="InterfaceTypeDefinition",uGt="UnionTypeDefinition",dGt="EnumTypeDefinition",hGt="EnumValueDefinition",fGt="InputObjectTypeDefinition",pGt="DirectiveDefinition",mGt="SchemaExtension",gGt="DirectiveExtension",bGt="ScalarTypeExtension",vGt="ObjectTypeExtension",AGt="InterfaceTypeExtension",yGt="UnionTypeExtension",wGt="EnumTypeExtension",xGt="InputObjectTypeExtension",CGt="TypeCoordinate",_Gt="MemberCoordinate",SGt="ArgumentCoordinate",EGt="DirectiveCoordinate",DGt="DirectiveArgumentCoordinate";NGt={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};sk=MGt(),WKe=sk?.tracingChannel("graphql:parse"),j6i=sk?.tracingChannel("graphql:validate"),Q6i=sk?.tracingChannel("graphql:execute"),G6i=sk?.tracingChannel("graphql:execute:variableCoercion"),q6i=sk?.tracingChannel("graphql:execute:rootSelectionSet"),Y6i=sk?.tracingChannel("graphql:subscribe"),K6i=sk?.tracingChannel("graphql:resolve"),RGt=["start","end","asyncStart","asyncEnd","error"];ct={SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},OGt=class{constructor(i){let e=new rJe(ct.SOF,0,0,0,0);this.source=i,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let i=this.token;if(i.kind!==ct.EOF)do if(i.next)i=i.next;else{let e=BGt(this,i.end);i.next=e,e.prev=i,i=e}while(i.kind===ct.COMMENT);return i}};cJe=Symbol("Source"),uJe=class{constructor(i,e="GraphQL request",t={line:1,column:1}){this.__kind=cJe,this.body=i,this.name=e,this.locationOffset=t,this.locationOffset.line>0||HKe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||HKe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};KGt=class{constructor(i,e={}){let{lexer:t,...n}=e;if(t)this._lexer=t;else{let r=qGt(i)?i:new uJe(i);this._lexer=new OGt(r)}this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let i=this.expectToken(ct.NAME);return this.node(i,{kind:$i.NAME,value:i.value})}parseDocument(){return this.node(this._lexer.token,{kind:$i.DOCUMENT,definitions:this.many(ct.SOF,this.parseDefinition,ct.EOF)})}parseDefinition(){if(this.peek(ct.BRACE_L))return this.parseOperationDefinition();let i=this.peekDescription(),e=i?this._lexer.lookahead():this._lexer.token;if(i&&e.kind===ct.BRACE_L)throw fc(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(e.kind===ct.NAME){switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(i)throw fc(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(e.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(e)}parseOperationDefinition(){let i=this._lexer.token;if(this.peek(ct.BRACE_L))return this.node(i,{kind:$i.OPERATION_DEFINITION,operation:TK.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let e=this.parseDescription(),t=this.parseOperationType(),n;return this.peek(ct.NAME)&&(n=this.parseName()),this.node(i,{kind:$i.OPERATION_DEFINITION,operation:t,description:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let i=this.expectToken(ct.NAME);switch(i.value){case"query":return TK.QUERY;case"mutation":return TK.MUTATION;case"subscription":return TK.SUBSCRIPTION}throw this.unexpected(i)}parseVariableDefinitions(){return this.optionalMany(ct.PAREN_L,this.parseVariableDefinition,ct.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:$i.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(ct.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ct.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let i=this._lexer.token;return this.expectToken(ct.DOLLAR),this.node(i,{kind:$i.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:$i.SELECTION_SET,selections:this.many(ct.BRACE_L,this.parseSelection,ct.BRACE_R)})}parseSelection(){return this.peek(ct.SPREAD)?this.parseFragment():this.parseField()}parseField(){let i=this._lexer.token,e=this.parseName(),t,n;return this.expectOptionalToken(ct.COLON)?(t=e,n=this.parseName()):n=e,this.node(i,{kind:$i.FIELD,alias:t,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ct.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(i){let e=i?this.parseConstArgument:this.parseArgument;return this.optionalMany(ct.PAREN_L,e,ct.PAREN_R)}parseFragmentArguments(){let i=this.parseFragmentArgument;return this.optionalMany(ct.PAREN_L,i,ct.PAREN_R)}parseArgument(i=!1){let e=this._lexer.token,t=this.parseName();return this.expectToken(ct.COLON),this.node(e,{kind:$i.ARGUMENT,name:t,value:this.parseValueLiteral(i)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let i=this._lexer.token,e=this.parseName();return this.expectToken(ct.COLON),this.node(i,{kind:$i.FRAGMENT_ARGUMENT,name:e,value:this.parseValueLiteral(!1)})}parseFragment(){let i=this._lexer.token;this.expectToken(ct.SPREAD);let e=this.expectOptionalKeyword("on");if(!e&&this.peek(ct.NAME)){let t=this.parseFragmentName();return this.peek(ct.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(i,{kind:$i.FRAGMENT_SPREAD,name:t,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(i,{kind:$i.FRAGMENT_SPREAD,name:t,directives:this.parseDirectives(!1)})}return this.node(i,{kind:$i.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let i=this._lexer.token,e=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(i,{kind:$i.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(i,{kind:$i.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(i){let e=this._lexer.token;switch(e.kind){case ct.BRACKET_L:return this.parseList(i);case ct.BRACE_L:return this.parseObject(i);case ct.INT:return this.advanceLexer(),this.node(e,{kind:$i.INT,value:e.value});case ct.FLOAT:return this.advanceLexer(),this.node(e,{kind:$i.FLOAT,value:e.value});case ct.STRING:case ct.BLOCK_STRING:return this.parseStringLiteral();case ct.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:$i.BOOLEAN,value:!0});case"false":return this.node(e,{kind:$i.BOOLEAN,value:!1});case"null":return this.node(e,{kind:$i.NULL});default:return this.node(e,{kind:$i.ENUM,value:e.value})}case ct.DOLLAR:if(i)if(this.expectToken(ct.DOLLAR),this._lexer.token.kind===ct.NAME){let t=this._lexer.token.value;throw fc(this._lexer.source,e.start,`Unexpected variable "$${t}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let i=this._lexer.token;return this.advanceLexer(),this.node(i,{kind:$i.STRING,value:i.value,block:i.kind===ct.BLOCK_STRING})}parseList(i){let e=()=>this.parseValueLiteral(i);return this.node(this._lexer.token,{kind:$i.LIST,values:this.any(ct.BRACKET_L,e,ct.BRACKET_R)})}parseObject(i){let e=()=>this.parseObjectField(i);return this.node(this._lexer.token,{kind:$i.OBJECT,fields:this.any(ct.BRACE_L,e,ct.BRACE_R)})}parseObjectField(i){let e=this._lexer.token,t=this.parseName();return this.expectToken(ct.COLON),this.node(e,{kind:$i.OBJECT_FIELD,name:t,value:this.parseValueLiteral(i)})}parseDirectives(i){let e=[];for(;this.peek(ct.AT);)e.push(this.parseDirective(i));if(e.length)return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(i){let e=this._lexer.token;return this.expectToken(ct.AT),this.node(e,{kind:$i.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(i)})}parseTypeReference(){let i=this._lexer.token,e;if(this.expectOptionalToken(ct.BRACKET_L)){let t=this.parseTypeReference();this.expectToken(ct.BRACKET_R),e=this.node(i,{kind:$i.LIST_TYPE,type:t})}else e=this.parseNamedType();return this.expectOptionalToken(ct.BANG)?this.node(i,{kind:$i.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:$i.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ct.STRING)||this.peek(ct.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.many(ct.BRACE_L,this.parseOperationTypeDefinition,ct.BRACE_R);return this.node(i,{kind:$i.SCHEMA_DEFINITION,description:e,directives:t,operationTypes:n})}parseOperationTypeDefinition(){let i=this._lexer.token,e=this.parseOperationType();this.expectToken(ct.COLON);let t=this.parseNamedType();return this.node(i,{kind:$i.OPERATION_TYPE_DEFINITION,operation:e,type:t})}parseScalarTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();return this.node(i,{kind:$i.SCALAR_TYPE_DEFINITION,description:e,name:t,directives:n})}parseObjectTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(i,{kind:$i.OBJECT_TYPE_DEFINITION,description:e,name:t,interfaces:n,directives:r,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ct.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(ct.BRACE_L,this.parseFieldDefinition,ct.BRACE_R)}parseFieldDefinition(){let i=this._lexer.token,e=this.parseDescription(),t=this.parseName(),n=this.parseArgumentDefs();this.expectToken(ct.COLON);let r=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(i,{kind:$i.FIELD_DEFINITION,description:e,name:t,arguments:n,type:r,directives:o})}parseArgumentDefs(){return this.optionalMany(ct.PAREN_L,this.parseInputValueDef,ct.PAREN_R)}parseInputValueDef(){let i=this._lexer.token,e=this.parseDescription(),t=this.parseName();this.expectToken(ct.COLON);let n=this.parseTypeReference(),r;this.expectOptionalToken(ct.EQUALS)&&(r=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(i,{kind:$i.INPUT_VALUE_DEFINITION,description:e,name:t,type:n,defaultValue:r,directives:o})}parseInterfaceTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(i,{kind:$i.INTERFACE_TYPE_DEFINITION,description:e,name:t,interfaces:n,directives:r,fields:o})}parseUnionTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(i,{kind:$i.UNION_TYPE_DEFINITION,description:e,name:t,directives:n,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(ct.EQUALS)?this.delimitedMany(ct.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(i,{kind:$i.ENUM_TYPE_DEFINITION,description:e,name:t,directives:n,values:r})}parseEnumValuesDefinition(){return this.optionalMany(ct.BRACE_L,this.parseEnumValueDefinition,ct.BRACE_R)}parseEnumValueDefinition(){let i=this._lexer.token,e=this.parseDescription(),t=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(i,{kind:$i.ENUM_VALUE_DEFINITION,description:e,name:t,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw fc(this._lexer.source,this._lexer.token.start,`${kK(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(i,{kind:$i.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:t,directives:n,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(ct.BRACE_L,this.parseInputValueDef,ct.BRACE_R)}parseTypeSystemExtension(){let i=this._lexer.lookahead();if(i.kind===ct.NAME)switch(i.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(i)}parseSchemaExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),t=this.optionalMany(ct.BRACE_L,this.parseOperationTypeDefinition,ct.BRACE_R);if(e===void 0&&t===void 0)throw this.unexpected();return this.node(i,{kind:$i.SCHEMA_EXTENSION,directives:e,operationTypes:t})}parseScalarTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),t=this.parseConstDirectives();if(t===void 0)throw this.unexpected();return this.node(i,{kind:$i.SCALAR_TYPE_EXTENSION,name:e,directives:t})}parseObjectTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),t=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(t===void 0&&n===void 0&&r===void 0)throw this.unexpected();return this.node(i,{kind:$i.OBJECT_TYPE_EXTENSION,name:e,interfaces:t,directives:n,fields:r})}parseInterfaceTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),t=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(t===void 0&&n===void 0&&r===void 0)throw this.unexpected();return this.node(i,{kind:$i.INTERFACE_TYPE_EXTENSION,name:e,interfaces:t,directives:n,fields:r})}parseUnionTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),t=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(t===void 0&&n===void 0)throw this.unexpected();return this.node(i,{kind:$i.UNION_TYPE_EXTENSION,name:e,directives:t,types:n})}parseEnumTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),t=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(t===void 0&&n===void 0)throw this.unexpected();return this.node(i,{kind:$i.ENUM_TYPE_EXTENSION,name:e,directives:t,values:n})}parseInputObjectTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),t=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(t===void 0&&n===void 0)throw this.unexpected();return this.node(i,{kind:$i.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:t,fields:n})}parseDirectiveExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(ct.AT);let e=this.parseName(),t=this.parseConstDirectives();if(t===void 0)throw this.unexpected();return this.node(i,{kind:$i.DIRECTIVE_EXTENSION,name:e,directives:t})}parseDirectiveDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ct.AT);let t=this.parseName(),n=this.parseArgumentDefs(),r=this.parseConstDirectives(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(i,{kind:$i.DIRECTIVE_DEFINITION,description:e,name:t,arguments:n,directives:r,repeatable:o,locations:s})}parseDirectiveLocations(){return this.delimitedMany(ct.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let i=this._lexer.token,e=this.parseName();if(IQt(NGt,e.value))return e;throw this.unexpected(i)}parseSchemaCoordinate(){let i=this._lexer.token,e=this.expectOptionalToken(ct.AT),t=this.parseName(),n;!e&&this.expectOptionalToken(ct.DOT)&&(n=this.parseName());let r;return(e||n)&&this.expectOptionalToken(ct.PAREN_L)&&(r=this.parseName(),this.expectToken(ct.COLON),this.expectToken(ct.PAREN_R)),e?r?this.node(i,{kind:$i.DIRECTIVE_ARGUMENT_COORDINATE,name:t,argumentName:r}):this.node(i,{kind:$i.DIRECTIVE_COORDINATE,name:t}):n?r?this.node(i,{kind:$i.ARGUMENT_COORDINATE,name:t,fieldName:n,argumentName:r}):this.node(i,{kind:$i.MEMBER_COORDINATE,name:t,memberName:n}):this.node(i,{kind:$i.TYPE_COORDINATE,name:t})}node(i,e){return this._options.noLocation!==!0&&(e.loc=new LQt(i,this._lexer.lastToken,this._lexer.source)),e}peek(i){return this._lexer.token.kind===i}expectToken(i){let e=this._lexer.token;if(e.kind===i)return this.advanceLexer(),e;throw fc(this._lexer.source,e.start,`Expected ${dJe(i)}, found ${kK(e)}.`)}expectOptionalToken(i){return this._lexer.token.kind===i?(this.advanceLexer(),!0):!1}expectKeyword(i){let e=this._lexer.token;if(e.kind===ct.NAME&&e.value===i)this.advanceLexer();else throw fc(this._lexer.source,e.start,`Expected "${i}", found ${kK(e)}.`)}expectOptionalKeyword(i){let e=this._lexer.token;return e.kind===ct.NAME&&e.value===i?(this.advanceLexer(),!0):!1}unexpected(i){let e=i??this._lexer.token;return fc(this._lexer.source,e.start,`Unexpected ${kK(e)}.`)}any(i,e,t){this.expectToken(i);let n=[];for(;!this.expectOptionalToken(t);)n.push(e.call(this));return n}optionalMany(i,e,t){if(this.expectOptionalToken(i)){let n=[];do n.push(e.call(this));while(!this.expectOptionalToken(t));return n}}many(i,e,t){this.expectToken(i);let n=[];do n.push(e.call(this));while(!this.expectOptionalToken(t));return n}delimitedMany(i,e){this.expectOptionalToken(i);let t=[];do t.push(e.call(this));while(this.expectOptionalToken(i));return t}advanceLexer(){let{maxTokens:i}=this._options,e=this._lexer.advance();if(e.kind!==ct.EOF&&(++this._tokenCounter,i!==void 0&&this._tokenCounter>i))throw fc(this._lexer.source,e.start,`Document contains more than ${i} tokens. Parsing aborted.`)}};XGt=JGt;$Gt={experimentalFragmentArguments:!0};iqt={parse:tqt,astFormat:"graphql",hasPragma:sQt,hasIgnorePragma:aQt,locStart:JKe,locEnd:XKe},hJe={graphql:yQt}});var bJe=Ue((gJe,o1e)=>{(function(i){function e(){var n=i();return n.default||n}if(typeof gJe=="object"&&typeof o1e=="object")o1e.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var i=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,r=(P,Y)=>{for(var ee in Y)i(P,ee,{get:Y[ee],enumerable:!0})},o=(P,Y,ee,Ae)=>{if(Y&&typeof Y=="object"||typeof Y=="function")for(let ue of t(Y))!n.call(P,ue)&&ue!==ee&&i(P,ue,{get:()=>Y[ue],enumerable:!(Ae=e(Y,ue))||Ae.enumerable});return P},s=P=>o(i({},"__esModule",{value:!0}),P),a={};r(a,{languages:()=>Pi,options:()=>ie,parsers:()=>de,printers:()=>rAe});var l=(P,Y)=>(ee,Ae,...ue)=>ee|1&&Ae==null?void 0:(Y.call(Ae)??Ae[P]).apply(Ae,ue),c=String.prototype.replaceAll??function(P,Y){return P.global?this.replace(P,Y):this.split(P).join(Y)},u=l("replaceAll",function(){if(typeof this=="string")return c}),d=u,h=()=>{},f=h,p="indent",g="group",v="if-break",A="line",w="break-parent",C=f,_=f;function E(P){return C(P),{type:p,contents:P}}var I={type:w};function T(P,Y={}){return C(P),_(Y.expandedStates,!0),{type:g,id:Y.id,contents:P,break:!!Y.shouldBreak,expandedStates:Y.expandedStates}}function L(P,Y="",ee={}){return C(P),Y!==""&&C(Y),{type:v,breakContents:P,flatContents:Y,groupId:ee.groupId}}function M(P,Y){C(P),_(Y);let ee=[];for(let Ae=0;Ae{if(ee===!1)return!1;let ue=!!Ae?.backwards,{length:ot}=Y,on=ee;for(;on>=0&&onP===` -`||P==="\r"||P==="\u2028"||P==="\u2029";function oe(P,Y,ee){if(Y===!1)return!1;let Ae=!!ee?.backwards,ue=P.charAt(Y);if(Ae){if(P.charAt(Y-1)==="\r"&&ue===` -`)return Y-2;if(le(ue))return Y-1}else{if(ue==="\r"&&P.charAt(Y+1)===` -`)return Y+2;if(le(ue))return Y+1}return Y}var fe=oe;function Re(P,Y,ee={}){let Ae=ne(P,ee.backwards?Y-1:Y,ee),ue=fe(P,Ae,ee);return Ae!==ue}var ft=Re,At=()=>!0;function Dt(P,Y){let ee=P.node;return ee.printed=!0,Y.printer.printComment(P,Y)}function Ct(P,Y,ee={}){let{indent:Ae=!1,marker:ue,filter:ot=At}=ee,on=new Set(P.node?.comments?.filter(zc=>!(zc.leading||zc.trailing||zc.marker!==ue||!ot(zc))));if(on.size===0)return"";let us=P.map(({node:zc})=>on.has(zc)?Dt(P,Y):"","comments").filter(Boolean),lc=M(q,us);return Ae?E([q,lc]):lc}function Xt(P){return Array.isArray(P)&&P.length>0}var Be=Xt,Vt=class extends Error{name="UnexpectedNodeError";constructor(P,Y,ee="type"){super(`Unexpected ${Y} node ${ee}: ${JSON.stringify(P[ee])}.`),this.node=P}},Li=Vt,ei=null;function Ni(P){if(ei!==null&&typeof ei.property){let Y=ei;return ei=Ni.prototype=null,Y}return ei=Ni.prototype=P??Object.create(null),new Ni}var Ke=10;for(let P=0;P<=Ke;P++)Ni();function St(P){return Ni(P)}function yt(P,Y="type"){St(P);function ee(Ae){let ue=Ae[Y],ot=P[ue];if(!Array.isArray(ot))throw Object.assign(new Error(`Missing visitor keys for '${ue}'.`),{node:Ae});return ot}return ee}var at=yt,Je=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],xt={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:Je[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:Je[1],FragmentArgument:Je[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:Je[1],Directive:["name","arguments"],NamedType:Je[0],ListType:Je[2],NonNullType:Je[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:Je[2],ScalarTypeDefinition:Je[3],ObjectTypeDefinition:Je[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:Je[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:Je[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:Je[5],ScalarTypeExtension:Je[5],ObjectTypeExtension:Je[6],InterfaceTypeExtension:Je[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ti=at(xt,"kind"),Ut=Ti,xr=P=>P.loc.start,lr=P=>P.loc.end;function qo(P,Y){P.kind==="StringValue"&&P.block&&!P.value.includes(` -`)&&(Y.value=P.value.trim())}qo.ignoredProperties=new Set(["loc","comments"]);var As="format",Vr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,Ca=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,br=P=>Ca.test(P),Yo=P=>Vr.test(P),cr=P=>`# @${As} - -${P}`;function Wa(P,Y){if(Y===!1)return!1;if(P.charAt(Y)==="/"&&P.charAt(Y+1)==="*"){for(let ee=Y+2;ee{let on=ee();return!ue&&cs(Y.originalText,lr(ot))?[on,q]:on},Ae)}function ta(P,Y,ee){let{node:Ae}=P;return Be(Ae.arguments)?T(["(",E([H,M([L("",", "),H],No(P,Y,ee,"arguments"))]),H,")"]):""}function Ki(P,Y,ee){let{node:Ae}=P;if(!Ae.description)return"";let ue=[ee("description")];return Ae.kind==="InputValueDefinition"&&!Ae.description.block?ue.push(z):ue.push(q),ue}function Zr(P,Y){let{node:ee}=P;if(!Be(ee.directives))return"";let Ae=M(z,P.map(Y,"directives"));return ee.kind==="FragmentDefinition"||ee.kind==="OperationDefinition"?T([z,Ae]):[" ",T(E([H,Ae]))]}function $u(P,Y){let{node:ee}=P;return Be(ee.variableDefinitions)?T(["(",E([H,M([L("",", "),H],P.map(Y,"variableDefinitions"))]),H,")"]):""}function Cr(P,Y,ee){let{node:Ae}=P;switch(Ae.kind){case"Document":return[...M(q,No(P,Y,ee,"definitions")),q];case"OperationDefinition":{let ue=Y.originalText[xr(Ae)]!=="{",ot=!!Ae.name;return[Ki(P,Y,ee),ue?Ae.operation:"",ue&&ot?[" ",ee("name")]:"",ue&&!ot&&Be(Ae.variableDefinitions)?" ":"",$u(P,ee),Zr(P,ee),!ue&&!ot?"":" ",ee("selectionSet")]}case"FragmentDefinition":return[Ki(P,Y,ee),"fragment ",ee("name"),$u(P,ee)," on ",ee("typeCondition"),Zr(P,ee)," ",ee("selectionSet")];case"SelectionSet":return["{",E([q,M(q,No(P,Y,ee,"selections"))]),q,"}"];case"Field":return T([Ae.alias?[ee("alias"),": "]:"",ee("name"),Be(Ae.arguments)?T(["(",E([H,M([L("",", "),H],No(P,Y,ee,"arguments"))]),H,")"]):"",Zr(P,ee),Ae.selectionSet?" ":"",ee("selectionSet")]);case"Name":return Ae.value;case"StringValue":if(Ae.block){let ue=d(0,Ae.value,'"""','\\"""').split(` -`);return ue.length===1&&(ue[0]=ue[0].trim()),ue.every(ot=>ot==="")&&(ue.length=0),M(q,['"""',...ue,'"""'])}return['"',d(0,d(0,Ae.value,/["\\]/g,"\\$&"),` -`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return Ae.value;case"BooleanValue":return Ae.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",ee("name")];case"ListValue":{let ue=!Be(Ae.values);return T(["[",Ct(P,Y,{indent:!0}),ue?"":E([H,M([L("",", "),H],P.map(ee,"values"))]),H,"]"])}case"ObjectValue":{let ue=!Be(Ae.fields),ot=Y.bracketSpacing&&!ue?" ":"";return T(["{",ot,Ct(P,Y,{indent:!0}),ue?"":[E([H,M([L("",", "),H],P.map(ee,"fields"))])],H,L("",ot),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[ee("name"),": ",ee("value")];case"Directive":return["@",ee("name"),ta(P,Y,ee)];case"NamedType":return ee("name");case"VariableDefinition":return[Ki(P,Y,ee),ee("variable"),": ",ee("type"),Ae.defaultValue?[" = ",ee("defaultValue")]:"",Zr(P,ee)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:ue}=Ae,ot=[];return ue.endsWith("TypeDefinition")?ot.push(Ki(P,Y,ee)):ot.push("extend "),ue.startsWith("ObjectType")?ot.push("type"):ue.startsWith("InputObjectType")?ot.push("input"):ot.push("interface"),ot.push(" ",ee("name")),!ue.startsWith("InputObjectType")&&Be(Ae.interfaces)&&ot.push(" implements ",E([T([M([" &",z],P.map(ee,"interfaces"))])])),ot.push(Zr(P,ee)),Be(Ae.fields)&&ot.push([" {",E([q,M(q,No(P,Y,ee,"fields"))]),q,"}"]),ot}case"FieldDefinition":return[Ki(P,Y,ee),ee("name"),Be(Ae.arguments)?T(["(",E([H,M([L("",", "),H],No(P,Y,ee,"arguments"))]),H,")"]):"",": ",ee("type"),Zr(P,ee)];case"DirectiveDefinition":return[Ki(P,Y,ee),"directive ","@",ee("name"),Be(Ae.arguments)?T(["(",E([H,M([L("",", "),H],No(P,Y,ee,"arguments"))]),H,")"]):"",Zr(P,ee),Ae.repeatable?" repeatable":""," on ",...M(" | ",P.map(ee,"locations"))];case"DirectiveExtension":return["extend directive @",ee("name"),Zr(P,ee)];case"EnumTypeExtension":case"EnumTypeDefinition":return[Ki(P,Y,ee),Ae.kind==="EnumTypeExtension"?"extend ":"","enum ",ee("name"),Zr(P,ee),Be(Ae.values)?[" {",E([q,M(q,No(P,Y,ee,"values"))]),q,"}"]:""];case"EnumValueDefinition":return[Ki(P,Y,ee),ee("name"),Zr(P,ee)];case"InputValueDefinition":return[Ki(P,Y,ee),ee("name"),": ",ee("type"),Ae.defaultValue?[" = ",ee("defaultValue")]:"",Zr(P,ee)];case"SchemaExtension":return["extend schema",Zr(P,ee),...Be(Ae.operationTypes)?[" {",E([q,M(q,No(P,Y,ee,"operationTypes"))]),q,"}"]:[]];case"SchemaDefinition":return[Ki(P,Y,ee),"schema",Zr(P,ee)," {",Be(Ae.operationTypes)?E([q,M(q,No(P,Y,ee,"operationTypes"))]):"",q,"}"];case"OperationTypeDefinition":return[Ae.operation,": ",ee("type")];case"FragmentSpread":return["...",ee("name"),ta(P,Y,ee),Zr(P,ee)];case"InlineFragment":return["...",Ae.typeCondition?[" on ",ee("typeCondition")]:"",Zr(P,ee)," ",ee("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return T([Ki(P,Y,ee),T([Ae.kind==="UnionTypeExtension"?"extend ":"","union ",ee("name"),Zr(P,ee),Be(Ae.types)?[" =",L(""," "),E([L([z,"| "]),M([z,"| "],P.map(ee,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[Ki(P,Y,ee),Ae.kind==="ScalarTypeExtension"?"extend ":"","scalar ",ee("name"),Zr(P,ee)];case"NonNullType":return[ee("type"),"!"];case"ListType":return["[",ee("type"),"]"];default:throw new Li(Ae,"Graphql","kind")}}function Mo(P){return P.kind!=="Comment"}function Th({node:P}){if(P.kind==="Comment")return"#"+P.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(P))}function ob(P){let{node:Y}=P;return Y?.comments?.some(ee=>ee.value.trim()==="prettier-ignore")}var Df={print:Cr,massageAstNode:qo,hasPrettierIgnore:ob,insertPragma:cr,printComment:Th,canAttachComment:Mo,getVisitorKeys:Ut},kh=Df,Pi=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],J={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Z={bracketSpacing:J.bracketSpacing},ie=Z,de={};r(de,{graphql:()=>kq});function ve(P,Y){return P?.__kind===Y}var ze=ve;function $e(P){return typeof P=="object"&&P!==null}function Mt(P,Y){if(!P)throw new Error(Y??"Unexpected invariant triggered.")}var Zt=/\r\n|[\n\r]/g;function _i(P,Y){let ee=0,Ae=1;for(let ue of P.body.matchAll(Zt)){if(typeof ue.index!="number"&&Mt(!1),ue.index>=Y)break;ee=ue.index+ue[0].length,Ae+=1}return{line:Ae,column:Y+1-ee}}function pn(P){return Ln(P.source,_i(P.source,P.start))}function Ln(P,Y){let ee=P.locationOffset.column-1,Ae="".padStart(ee)+P.body,ue=Y.line-1,ot=P.locationOffset.line-1,on=Y.line+ot,us=Y.line===1?ee:0,lc=Y.column+us,zc=`${P.name}:${on}:${lc} -`,gA=Ae.split(/\r\n|[\n\r]/g),cw=gA[ue];if(cw.length>120){let CM=Math.floor(lc/80),WT=lc%80,bA=[];for(let Nm=0;Nm["|",Nm]),["|","^".padStart(WT)],["|",bA[CM+1]]])}return zc+fo([[`${on-1} |`,gA[ue-1]],[`${on} |`,cw],["|","^".padStart(lc)],[`${on+1} |`,gA[ue+1]]])}function fo(P){let Y=P.filter(([Ae,ue])=>ue!==void 0),ee=Math.max(...Y.map(([Ae])=>Ae.length));return Y.map(([Ae,ue])=>Ae.padStart(ee)+(ue?" "+ue:"")).join(` -`)}var vr=class mJe extends Error{constructor(Y,ee={}){let{nodes:Ae,source:ue,positions:ot,path:on,originalError:us,cause:lc,extensions:zc}=ee,gA="cause"in ee,cw=gA?lc:us,CM=gA||us!=null?{cause:cw}:void 0;super(Y,CM),this.name="GraphQLError",this.path=on??void 0;let WT=us??(lc instanceof Error?lc:void 0);this.originalError=WT,this.nodes=Ua(Array.isArray(Ae)?Ae:Ae?[Ae]:void 0);let bA=Ua(this.nodes?.map(_p=>_p.loc).filter(_p=>_p!=null));this.source=ue??bA?.[0]?.source,this.positions=ot??bA?.map(_p=>_p.start),this.locations=ot&&ue?ot.map(_p=>_i(ue,_p)):bA?.map(_p=>_i(_p.source,_p.start));let Nm=$e(WT?.extensions)?WT.extensions:void 0;this.extensions=zc??Nm??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),us?.stack!=null?Object.defineProperty(this,"stack",{value:us.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,mJe):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let Y=this.message;if(this.nodes)for(let ee of this.nodes)ee.loc&&(Y+=` - -`+pn(ee.loc));else if(this.source&&this.locations)for(let ee of this.locations)Y+=` - -`+Ln(this.source,ee);return Y}toJSON(){let Y={message:this.message};return this.locations!=null&&(Y.locations=this.locations),this.path!=null&&(Y.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(Y.extensions=this.extensions),Y}};function Ua(P){return P===void 0||P.length===0?void 0:P}var ia=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),ed=ia,gi=class{constructor(P,Y,ee){this.start=P.start,this.end=Y.end,this.startToken=P,this.endToken=Y,this.source=ee}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Ce=class{constructor(P,Y,ee,Ae,ue,ot){this.kind=P,this.start=Y,this.end=ee,this.line=Ae,this.column=ue,this.value=ot,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Et={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},nt={};r(nt,{ARGUMENT:()=>Bc,ARGUMENT_COORDINATE:()=>zve,BOOLEAN:()=>B0,DIRECTIVE:()=>Eve,DIRECTIVE_ARGUMENT_COORDINATE:()=>Hve,DIRECTIVE_COORDINATE:()=>Vve,DIRECTIVE_DEFINITION:()=>fq,DIRECTIVE_EXTENSION:()=>Mve,DOCUMENT:()=>zs,ENUM:()=>h_,ENUM_TYPE_DEFINITION:()=>Nve,ENUM_TYPE_EXTENSION:()=>Pve,ENUM_VALUE_DEFINITION:()=>o5,FIELD:()=>Cp,FIELD_DEFINITION:()=>uq,FLOAT:()=>wve,FRAGMENT_ARGUMENT:()=>vM,FRAGMENT_DEFINITION:()=>lq,FRAGMENT_SPREAD:()=>aw,INLINE_FRAGMENT:()=>d_,INPUT_OBJECT_TYPE_DEFINITION:()=>hq,INPUT_OBJECT_TYPE_EXTENSION:()=>wM,INPUT_VALUE_DEFINITION:()=>AM,INT:()=>r5,INTERFACE_TYPE_DEFINITION:()=>dq,INTERFACE_TYPE_EXTENSION:()=>Fve,LIST:()=>Cve,LIST_TYPE:()=>Dve,MEMBER_COORDINATE:()=>Bve,NAME:()=>Ht,NAMED_TYPE:()=>cq,NON_NULL_TYPE:()=>FT,NULL:()=>pA,OBJECT:()=>_ve,OBJECT_FIELD:()=>Sve,OBJECT_TYPE_DEFINITION:()=>Ive,OBJECT_TYPE_EXTENSION:()=>yM,OPERATION_DEFINITION:()=>Vs,OPERATION_TYPE_DEFINITION:()=>Tve,SCALAR_TYPE_DEFINITION:()=>kve,SCALAR_TYPE_EXTENSION:()=>Rve,SCHEMA_DEFINITION:()=>mA,SCHEMA_EXTENSION:()=>OT,SELECTION_SET:()=>Es,STRING:()=>xve,TYPE_COORDINATE:()=>pq,UNION_TYPE_DEFINITION:()=>Lve,UNION_TYPE_EXTENSION:()=>Ove,VARIABLE:()=>n5,VARIABLE_DEFINITION:()=>$n});var Ht="Name",zs="Document",Vs="OperationDefinition",$n="VariableDefinition",Es="SelectionSet",Cp="Field",Bc="Argument",vM="FragmentArgument",aw="FragmentSpread",d_="InlineFragment",lq="FragmentDefinition",n5="Variable",r5="IntValue",wve="FloatValue",xve="StringValue",B0="BooleanValue",pA="NullValue",h_="EnumValue",Cve="ListValue",_ve="ObjectValue",Sve="ObjectField",Eve="Directive",cq="NamedType",Dve="ListType",FT="NonNullType",mA="SchemaDefinition",Tve="OperationTypeDefinition",kve="ScalarTypeDefinition",Ive="ObjectTypeDefinition",uq="FieldDefinition",AM="InputValueDefinition",dq="InterfaceTypeDefinition",Lve="UnionTypeDefinition",Nve="EnumTypeDefinition",o5="EnumValueDefinition",hq="InputObjectTypeDefinition",fq="DirectiveDefinition",OT="SchemaExtension",Mve="DirectiveExtension",Rve="ScalarTypeExtension",yM="ObjectTypeExtension",Fve="InterfaceTypeExtension",Ove="UnionTypeExtension",Pve="EnumTypeExtension",wM="InputObjectTypeExtension",pq="TypeCoordinate",Bve="MemberCoordinate",zve="ArgumentCoordinate",Vve="DirectiveCoordinate",Hve="DirectiveArgumentCoordinate";function s5(P,Y){if(!P)throw new Error(Y)}function Wve(P){return P===9||P===32}function z0(P){return P>=48&&P<=57}function mq(P){return P>=97&&P<=122||P>=65&&P<=90}function PT(P){return mq(P)||P===95}function BT(P){return mq(P)||z0(P)||P===95}function gq(P){let Y=Number.MAX_SAFE_INTEGER,ee=null,Ae=-1;for(let ue=0;ueot===0?ue:ue.slice(Y)).slice(ee??0,Ae+1)}function Uve(P){let Y=0;for(;Y",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},qve=class{constructor(P){let Y=new Ce(ye.SOF,0,0,0,0);this.source=P,this.lastToken=Y,this.token=Y,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let P=this.token;if(P.kind!==ye.EOF)do if(P.next)P=P.next;else{let Y=Yve(this,P.end);P.next=Y,Y.prev=P,P=Y}while(P.kind===ye.COMMENT);return P}};function wq(P){return P===ye.BANG||P===ye.DOLLAR||P===ye.AMP||P===ye.PAREN_L||P===ye.PAREN_R||P===ye.DOT||P===ye.SPREAD||P===ye.COLON||P===ye.EQUALS||P===ye.AT||P===ye.BRACKET_L||P===ye.BRACKET_R||P===ye.BRACE_L||P===ye.PIPE||P===ye.BRACE_R}function f_(P){return P>=0&&P<=55295||P>=57344&&P<=1114111}function p_(P,Y){return xq(P.charCodeAt(Y))&&Cq(P.charCodeAt(Y+1))}function xq(P){return P>=55296&&P<=56319}function Cq(P){return P>=56320&&P<=57343}function lw(P,Y){let ee=P.source.body.codePointAt(Y);if(ee===void 0)return ye.EOF;if(ee>=32&&ee<=126){let Ae=String.fromCodePoint(ee);return Ae==='"'?`'"'`:`"${Ae}"`}return"U+"+ee.toString(16).toUpperCase().padStart(4,"0")}function hl(P,Y,ee,Ae,ue){let ot=P.line,on=1+ee-P.lineStart;return new Ce(Y,ee,Ae,ot,on,ue)}function Yve(P,Y){let ee=P.source.body,Ae=ee.length,ue=Y;for(;ue=48&&P<=57?P-48:P>=65&&P<=70?P-55:P>=97&&P<=102?P-87:-1}function Eq(P,Y){let ee=P.source.body;switch(ee.charCodeAt(Y+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw dl(P.source,Y,`Invalid character escape sequence: "${ee.slice(Y,Y+2)}".`)}function Zve(P,Y){let ee=P.source.body,Ae=ee.length,ue=P.lineStart,ot=Y+3,on=ot,us="",lc=[];for(;ot0||s5(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||s5(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function $ve(P){return ze(P,c5,u5)}function GQe(P,Y){return Gve(bq)?bq.traceSync(()=>m_(P,Y),{source:P}):m_(P,Y)}function m_(P,Y){let ee=new Tq(P,Y),Ae=ee.parseDocument();return Object.defineProperty(Ae,"tokenCount",{enumerable:!1,value:ee.tokenCount}),Ae}var Tq=class{constructor(P,Y={}){let{lexer:ee,...Ae}=Y;if(ee)this._lexer=ee;else{let ue=$ve(P)?P:new u5(P);this._lexer=new qve(ue)}this._options=Ae,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let P=this.expectToken(ye.NAME);return this.node(P,{kind:nt.NAME,value:P.value})}parseDocument(){return this.node(this._lexer.token,{kind:nt.DOCUMENT,definitions:this.many(ye.SOF,this.parseDefinition,ye.EOF)})}parseDefinition(){if(this.peek(ye.BRACE_L))return this.parseOperationDefinition();let P=this.peekDescription(),Y=P?this._lexer.lookahead():this._lexer.token;if(P&&Y.kind===ye.BRACE_L)throw dl(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(Y.kind===ye.NAME){switch(Y.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(Y.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(P)throw dl(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(Y.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(Y)}parseOperationDefinition(){let P=this._lexer.token;if(this.peek(ye.BRACE_L))return this.node(P,{kind:nt.OPERATION_DEFINITION,operation:Et.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let Y=this.parseDescription(),ee=this.parseOperationType(),Ae;return this.peek(ye.NAME)&&(Ae=this.parseName()),this.node(P,{kind:nt.OPERATION_DEFINITION,operation:ee,description:Y,name:Ae,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let P=this.expectToken(ye.NAME);switch(P.value){case"query":return Et.QUERY;case"mutation":return Et.MUTATION;case"subscription":return Et.SUBSCRIPTION}throw this.unexpected(P)}parseVariableDefinitions(){return this.optionalMany(ye.PAREN_L,this.parseVariableDefinition,ye.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:nt.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(ye.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ye.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let P=this._lexer.token;return this.expectToken(ye.DOLLAR),this.node(P,{kind:nt.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:nt.SELECTION_SET,selections:this.many(ye.BRACE_L,this.parseSelection,ye.BRACE_R)})}parseSelection(){return this.peek(ye.SPREAD)?this.parseFragment():this.parseField()}parseField(){let P=this._lexer.token,Y=this.parseName(),ee,Ae;return this.expectOptionalToken(ye.COLON)?(ee=Y,Ae=this.parseName()):Ae=Y,this.node(P,{kind:nt.FIELD,alias:ee,name:Ae,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ye.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(P){let Y=P?this.parseConstArgument:this.parseArgument;return this.optionalMany(ye.PAREN_L,Y,ye.PAREN_R)}parseFragmentArguments(){let P=this.parseFragmentArgument;return this.optionalMany(ye.PAREN_L,P,ye.PAREN_R)}parseArgument(P=!1){let Y=this._lexer.token,ee=this.parseName();return this.expectToken(ye.COLON),this.node(Y,{kind:nt.ARGUMENT,name:ee,value:this.parseValueLiteral(P)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let P=this._lexer.token,Y=this.parseName();return this.expectToken(ye.COLON),this.node(P,{kind:nt.FRAGMENT_ARGUMENT,name:Y,value:this.parseValueLiteral(!1)})}parseFragment(){let P=this._lexer.token;this.expectToken(ye.SPREAD);let Y=this.expectOptionalKeyword("on");if(!Y&&this.peek(ye.NAME)){let ee=this.parseFragmentName();return this.peek(ye.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(P,{kind:nt.FRAGMENT_SPREAD,name:ee,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(P,{kind:nt.FRAGMENT_SPREAD,name:ee,directives:this.parseDirectives(!1)})}return this.node(P,{kind:nt.INLINE_FRAGMENT,typeCondition:Y?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let P=this._lexer.token,Y=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(P,{kind:nt.FRAGMENT_DEFINITION,description:Y,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(P,{kind:nt.FRAGMENT_DEFINITION,description:Y,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(P){let Y=this._lexer.token;switch(Y.kind){case ye.BRACKET_L:return this.parseList(P);case ye.BRACE_L:return this.parseObject(P);case ye.INT:return this.advanceLexer(),this.node(Y,{kind:nt.INT,value:Y.value});case ye.FLOAT:return this.advanceLexer(),this.node(Y,{kind:nt.FLOAT,value:Y.value});case ye.STRING:case ye.BLOCK_STRING:return this.parseStringLiteral();case ye.NAME:switch(this.advanceLexer(),Y.value){case"true":return this.node(Y,{kind:nt.BOOLEAN,value:!0});case"false":return this.node(Y,{kind:nt.BOOLEAN,value:!1});case"null":return this.node(Y,{kind:nt.NULL});default:return this.node(Y,{kind:nt.ENUM,value:Y.value})}case ye.DOLLAR:if(P)if(this.expectToken(ye.DOLLAR),this._lexer.token.kind===ye.NAME){let ee=this._lexer.token.value;throw dl(this._lexer.source,Y.start,`Unexpected variable "$${ee}" in constant value.`)}else throw this.unexpected(Y);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let P=this._lexer.token;return this.advanceLexer(),this.node(P,{kind:nt.STRING,value:P.value,block:P.kind===ye.BLOCK_STRING})}parseList(P){let Y=()=>this.parseValueLiteral(P);return this.node(this._lexer.token,{kind:nt.LIST,values:this.any(ye.BRACKET_L,Y,ye.BRACKET_R)})}parseObject(P){let Y=()=>this.parseObjectField(P);return this.node(this._lexer.token,{kind:nt.OBJECT,fields:this.any(ye.BRACE_L,Y,ye.BRACE_R)})}parseObjectField(P){let Y=this._lexer.token,ee=this.parseName();return this.expectToken(ye.COLON),this.node(Y,{kind:nt.OBJECT_FIELD,name:ee,value:this.parseValueLiteral(P)})}parseDirectives(P){let Y=[];for(;this.peek(ye.AT);)Y.push(this.parseDirective(P));if(Y.length)return Y}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(P){let Y=this._lexer.token;return this.expectToken(ye.AT),this.node(Y,{kind:nt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(P)})}parseTypeReference(){let P=this._lexer.token,Y;if(this.expectOptionalToken(ye.BRACKET_L)){let ee=this.parseTypeReference();this.expectToken(ye.BRACKET_R),Y=this.node(P,{kind:nt.LIST_TYPE,type:ee})}else Y=this.parseNamedType();return this.expectOptionalToken(ye.BANG)?this.node(P,{kind:nt.NON_NULL_TYPE,type:Y}):Y}parseNamedType(){return this.node(this._lexer.token,{kind:nt.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ye.STRING)||this.peek(ye.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("schema");let ee=this.parseConstDirectives(),Ae=this.many(ye.BRACE_L,this.parseOperationTypeDefinition,ye.BRACE_R);return this.node(P,{kind:nt.SCHEMA_DEFINITION,description:Y,directives:ee,operationTypes:Ae})}parseOperationTypeDefinition(){let P=this._lexer.token,Y=this.parseOperationType();this.expectToken(ye.COLON);let ee=this.parseNamedType();return this.node(P,{kind:nt.OPERATION_TYPE_DEFINITION,operation:Y,type:ee})}parseScalarTypeDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("scalar");let ee=this.parseName(),Ae=this.parseConstDirectives();return this.node(P,{kind:nt.SCALAR_TYPE_DEFINITION,description:Y,name:ee,directives:Ae})}parseObjectTypeDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("type");let ee=this.parseName(),Ae=this.parseImplementsInterfaces(),ue=this.parseConstDirectives(),ot=this.parseFieldsDefinition();return this.node(P,{kind:nt.OBJECT_TYPE_DEFINITION,description:Y,name:ee,interfaces:Ae,directives:ue,fields:ot})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ye.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(ye.BRACE_L,this.parseFieldDefinition,ye.BRACE_R)}parseFieldDefinition(){let P=this._lexer.token,Y=this.parseDescription(),ee=this.parseName(),Ae=this.parseArgumentDefs();this.expectToken(ye.COLON);let ue=this.parseTypeReference(),ot=this.parseConstDirectives();return this.node(P,{kind:nt.FIELD_DEFINITION,description:Y,name:ee,arguments:Ae,type:ue,directives:ot})}parseArgumentDefs(){return this.optionalMany(ye.PAREN_L,this.parseInputValueDef,ye.PAREN_R)}parseInputValueDef(){let P=this._lexer.token,Y=this.parseDescription(),ee=this.parseName();this.expectToken(ye.COLON);let Ae=this.parseTypeReference(),ue;this.expectOptionalToken(ye.EQUALS)&&(ue=this.parseConstValueLiteral());let ot=this.parseConstDirectives();return this.node(P,{kind:nt.INPUT_VALUE_DEFINITION,description:Y,name:ee,type:Ae,defaultValue:ue,directives:ot})}parseInterfaceTypeDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("interface");let ee=this.parseName(),Ae=this.parseImplementsInterfaces(),ue=this.parseConstDirectives(),ot=this.parseFieldsDefinition();return this.node(P,{kind:nt.INTERFACE_TYPE_DEFINITION,description:Y,name:ee,interfaces:Ae,directives:ue,fields:ot})}parseUnionTypeDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("union");let ee=this.parseName(),Ae=this.parseConstDirectives(),ue=this.parseUnionMemberTypes();return this.node(P,{kind:nt.UNION_TYPE_DEFINITION,description:Y,name:ee,directives:Ae,types:ue})}parseUnionMemberTypes(){return this.expectOptionalToken(ye.EQUALS)?this.delimitedMany(ye.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("enum");let ee=this.parseName(),Ae=this.parseConstDirectives(),ue=this.parseEnumValuesDefinition();return this.node(P,{kind:nt.ENUM_TYPE_DEFINITION,description:Y,name:ee,directives:Ae,values:ue})}parseEnumValuesDefinition(){return this.optionalMany(ye.BRACE_L,this.parseEnumValueDefinition,ye.BRACE_R)}parseEnumValueDefinition(){let P=this._lexer.token,Y=this.parseDescription(),ee=this.parseEnumValueName(),Ae=this.parseConstDirectives();return this.node(P,{kind:nt.ENUM_VALUE_DEFINITION,description:Y,name:ee,directives:Ae})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw dl(this._lexer.source,this._lexer.token.start,`${xM(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("input");let ee=this.parseName(),Ae=this.parseConstDirectives(),ue=this.parseInputFieldsDefinition();return this.node(P,{kind:nt.INPUT_OBJECT_TYPE_DEFINITION,description:Y,name:ee,directives:Ae,fields:ue})}parseInputFieldsDefinition(){return this.optionalMany(ye.BRACE_L,this.parseInputValueDef,ye.BRACE_R)}parseTypeSystemExtension(){let P=this._lexer.lookahead();if(P.kind===ye.NAME)switch(P.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(P)}parseSchemaExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let Y=this.parseConstDirectives(),ee=this.optionalMany(ye.BRACE_L,this.parseOperationTypeDefinition,ye.BRACE_R);if(Y===void 0&&ee===void 0)throw this.unexpected();return this.node(P,{kind:nt.SCHEMA_EXTENSION,directives:Y,operationTypes:ee})}parseScalarTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let Y=this.parseName(),ee=this.parseConstDirectives();if(ee===void 0)throw this.unexpected();return this.node(P,{kind:nt.SCALAR_TYPE_EXTENSION,name:Y,directives:ee})}parseObjectTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let Y=this.parseName(),ee=this.parseImplementsInterfaces(),Ae=this.parseConstDirectives(),ue=this.parseFieldsDefinition();if(ee===void 0&&Ae===void 0&&ue===void 0)throw this.unexpected();return this.node(P,{kind:nt.OBJECT_TYPE_EXTENSION,name:Y,interfaces:ee,directives:Ae,fields:ue})}parseInterfaceTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let Y=this.parseName(),ee=this.parseImplementsInterfaces(),Ae=this.parseConstDirectives(),ue=this.parseFieldsDefinition();if(ee===void 0&&Ae===void 0&&ue===void 0)throw this.unexpected();return this.node(P,{kind:nt.INTERFACE_TYPE_EXTENSION,name:Y,interfaces:ee,directives:Ae,fields:ue})}parseUnionTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let Y=this.parseName(),ee=this.parseConstDirectives(),Ae=this.parseUnionMemberTypes();if(ee===void 0&&Ae===void 0)throw this.unexpected();return this.node(P,{kind:nt.UNION_TYPE_EXTENSION,name:Y,directives:ee,types:Ae})}parseEnumTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let Y=this.parseName(),ee=this.parseConstDirectives(),Ae=this.parseEnumValuesDefinition();if(ee===void 0&&Ae===void 0)throw this.unexpected();return this.node(P,{kind:nt.ENUM_TYPE_EXTENSION,name:Y,directives:ee,values:Ae})}parseInputObjectTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let Y=this.parseName(),ee=this.parseConstDirectives(),Ae=this.parseInputFieldsDefinition();if(ee===void 0&&Ae===void 0)throw this.unexpected();return this.node(P,{kind:nt.INPUT_OBJECT_TYPE_EXTENSION,name:Y,directives:ee,fields:Ae})}parseDirectiveExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(ye.AT);let Y=this.parseName(),ee=this.parseConstDirectives();if(ee===void 0)throw this.unexpected();return this.node(P,{kind:nt.DIRECTIVE_EXTENSION,name:Y,directives:ee})}parseDirectiveDefinition(){let P=this._lexer.token,Y=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ye.AT);let ee=this.parseName(),Ae=this.parseArgumentDefs(),ue=this.parseConstDirectives(),ot=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let on=this.parseDirectiveLocations();return this.node(P,{kind:nt.DIRECTIVE_DEFINITION,description:Y,name:ee,arguments:Ae,directives:ue,repeatable:ot,locations:on})}parseDirectiveLocations(){return this.delimitedMany(ye.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let P=this._lexer.token,Y=this.parseName();if(ed(a5,Y.value))return Y;throw this.unexpected(P)}parseSchemaCoordinate(){let P=this._lexer.token,Y=this.expectOptionalToken(ye.AT),ee=this.parseName(),Ae;!Y&&this.expectOptionalToken(ye.DOT)&&(Ae=this.parseName());let ue;return(Y||Ae)&&this.expectOptionalToken(ye.PAREN_L)&&(ue=this.parseName(),this.expectToken(ye.COLON),this.expectToken(ye.PAREN_R)),Y?ue?this.node(P,{kind:nt.DIRECTIVE_ARGUMENT_COORDINATE,name:ee,argumentName:ue}):this.node(P,{kind:nt.DIRECTIVE_COORDINATE,name:ee}):Ae?ue?this.node(P,{kind:nt.ARGUMENT_COORDINATE,name:ee,fieldName:Ae,argumentName:ue}):this.node(P,{kind:nt.MEMBER_COORDINATE,name:ee,memberName:Ae}):this.node(P,{kind:nt.TYPE_COORDINATE,name:ee})}node(P,Y){return this._options.noLocation!==!0&&(Y.loc=new gi(P,this._lexer.lastToken,this._lexer.source)),Y}peek(P){return this._lexer.token.kind===P}expectToken(P){let Y=this._lexer.token;if(Y.kind===P)return this.advanceLexer(),Y;throw dl(this._lexer.source,Y.start,`Expected ${HT(P)}, found ${xM(Y)}.`)}expectOptionalToken(P){return this._lexer.token.kind===P?(this.advanceLexer(),!0):!1}expectKeyword(P){let Y=this._lexer.token;if(Y.kind===ye.NAME&&Y.value===P)this.advanceLexer();else throw dl(this._lexer.source,Y.start,`Expected "${P}", found ${xM(Y)}.`)}expectOptionalKeyword(P){let Y=this._lexer.token;return Y.kind===ye.NAME&&Y.value===P?(this.advanceLexer(),!0):!1}unexpected(P){let Y=P??this._lexer.token;return dl(this._lexer.source,Y.start,`Unexpected ${xM(Y)}.`)}any(P,Y,ee){this.expectToken(P);let Ae=[];for(;!this.expectOptionalToken(ee);)Ae.push(Y.call(this));return Ae}optionalMany(P,Y,ee){if(this.expectOptionalToken(P)){let Ae=[];do Ae.push(Y.call(this));while(!this.expectOptionalToken(ee));return Ae}}many(P,Y,ee){this.expectToken(P);let Ae=[];do Ae.push(Y.call(this));while(!this.expectOptionalToken(ee));return Ae}delimitedMany(P,Y){this.expectOptionalToken(P);let ee=[];do ee.push(Y.call(this));while(this.expectOptionalToken(P));return ee}advanceLexer(){let{maxTokens:P}=this._options,Y=this._lexer.advance();if(Y.kind!==ye.EOF&&(++this._tokenCounter,P!==void 0&&this._tokenCounter>P))throw dl(this._lexer.source,Y.start,`Document contains more than ${P} tokens. Parsing aborted.`)}};function xM(P){let Y=P.value;return HT(P.kind)+(Y!=null?` "${Y}"`:"")}function HT(P){return wq(P)?`"${P}"`:P}function qQe(P,Y){let ee=new SyntaxError(P+" ("+Y.loc.start.line+":"+Y.loc.start.column+")");return Object.assign(ee,Y)}var eAe=qQe;function YQe(P){let Y=[],{startToken:ee,endToken:Ae}=P.loc;for(let ue=ee;ue!==Ae;ue=ue.next)ue.kind==="Comment"&&Y.push({...ue,loc:{start:ue.start,end:ue.end}});return Y}var tAe={experimentalFragmentArguments:!0};function iAe(P){if(!(P instanceof vr))return P;let{message:Y,locations:[ee]}=P;return eAe(Y,{loc:{start:ee},cause:P})}function nAe(P){let Y;try{Y=GQe(P,tAe)}catch(ee){throw iAe(ee)}return Y.comments=YQe(Y),Y}var kq={parse:nAe,astFormat:"graphql",hasPragma:br,hasIgnorePragma:Yo,locStart:xr,locEnd:lr},rAe={graphql:kh};return s(a)})});var MJe=Ue(JM=>{"use strict";Object.defineProperty(JM,"__esModule",{value:!0});JM.versionInfo=JM.version=void 0;var hqt="15.10.3";JM.version=hqt;var fqt=Object.freeze({major:15,minor:10,patch:3,preReleaseTag:null});JM.versionInfo=fqt});var MK=Ue(u1e=>{"use strict";Object.defineProperty(u1e,"__esModule",{value:!0});u1e.default=pqt;function pqt(i){return typeof i?.then=="function"}});var gb=Ue(d1e=>{"use strict";Object.defineProperty(d1e,"__esModule",{value:!0});d1e.default=mqt;function mqt(i,e){var t=!!i;if(!t)throw new Error(e)}});var LA=Ue(h1e=>{"use strict";Object.defineProperty(h1e,"__esModule",{value:!0});h1e.default=gqt;function RK(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?RK=function(t){return typeof t}:RK=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RK(i)}function gqt(i){return RK(i)=="object"&&i!==null}});var NA=Ue(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.SYMBOL_TO_STRING_TAG=F_.SYMBOL_ASYNC_ITERATOR=F_.SYMBOL_ITERATOR=void 0;var bqt=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator";F_.SYMBOL_ITERATOR=bqt;var vqt=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator";F_.SYMBOL_ASYNC_ITERATOR=vqt;var Aqt=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";F_.SYMBOL_TO_STRING_TAG=Aqt});var FK=Ue(f1e=>{"use strict";Object.defineProperty(f1e,"__esModule",{value:!0});f1e.getLocation=yqt;function yqt(i,e){for(var t=/\r\n|[\n\r]/g,n=1,r=e+1,o;(o=t.exec(i.body))&&o.index{"use strict";Object.defineProperty(PK,"__esModule",{value:!0});PK.printLocation=xqt;PK.printSourceLocation=FJe;var wqt=FK();function xqt(i){return FJe(i.source,(0,wqt.getLocation)(i.source,i.start))}function FJe(i,e){var t=i.locationOffset.column-1,n=OK(t)+i.body,r=e.line-1,o=i.locationOffset.line-1,s=e.line+o,a=e.line===1?t:0,l=e.column+a,c="".concat(i.name,":").concat(s,":").concat(l,` -`),u=n.split(/\r\n|[\n\r]/g),d=u[r];if(d.length>120){for(var h=Math.floor(l/80),f=l%80,p=[],g=0;g{"use strict";function BK(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?BK=function(t){return typeof t}:BK=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},BK(i)}Object.defineProperty(XM,"__esModule",{value:!0});XM.printError=jJe;XM.formatError=QJe;XM.GraphQLError=void 0;var _qt=HJe(gb()),Sqt=HJe(LA()),Eqt=NA(),OJe=FK(),PJe=p1e();function HJe(i){return i&&i.__esModule?i:{default:i}}function BJe(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Dqt(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Mqt(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function p6(i,e){return p6=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},p6(i,e)}function m6(i){return m6=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m6(i)}var Rqt=(function(i){Lqt(t,i);var e=Nqt(t);function t(n,r,o,s,a,l,c){var u,d,h,f;kqt(this,t),f=e.call(this,n),f.name="GraphQLError",f.originalError=l??void 0,f.nodes=VJe(Array.isArray(r)?r:r?[r]:void 0);for(var p=[],g=0,v=(A=f.nodes)!==null&&A!==void 0?A:[];g0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?(Object.defineProperty(f6(f),"stack",{value:l.stack,writable:!0,configurable:!0}),WJe(f)):(Error.captureStackTrace?Error.captureStackTrace(f6(f),t):Object.defineProperty(f6(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return Iqt(t,[{key:"toString",value:function(){return jJe(this)}},{key:"toJSON",value:function(){return QJe(this)}},{key:Eqt.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}]),t})(m1e(Error));XM.GraphQLError=Rqt;function VJe(i){return i===void 0||i.length===0?void 0:i}function jJe(i){var e=i.message;if(i.nodes)for(var t=0,n=i.nodes;t0?{message:t,locations:n,path:r,extensions:o}:{message:t,locations:n,path:r}}});var VK=Ue(g1e=>{"use strict";Object.defineProperty(g1e,"__esModule",{value:!0});g1e.syntaxError=Oqt;var Fqt=dn();function Oqt(i,e,t){return new Fqt.GraphQLError("Syntax Error: ".concat(t),void 0,i,[e])}});var Ds=Ue(HK=>{"use strict";Object.defineProperty(HK,"__esModule",{value:!0});HK.Kind=void 0;var Pqt=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});HK.Kind=Pqt});var Qd=Ue(b1e=>{"use strict";Object.defineProperty(b1e,"__esModule",{value:!0});b1e.default=Bqt;function Bqt(i,e){var t=!!i;if(!t)throw new Error(e??"Unexpected invariant triggered.")}});var v1e=Ue(WK=>{"use strict";Object.defineProperty(WK,"__esModule",{value:!0});WK.default=void 0;var zqt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,Vqt=zqt;WK.default=Vqt});var UK=Ue(A1e=>{"use strict";Object.defineProperty(A1e,"__esModule",{value:!0});A1e.default=Wqt;var Hqt=qJe(Qd()),GJe=qJe(v1e());function qJe(i){return i&&i.__esModule?i:{default:i}}function Wqt(i){var e=i.prototype.toJSON;typeof e=="function"||(0,Hqt.default)(0),i.prototype.inspect=e,GJe.default&&(i.prototype[GJe.default]=e)}});var ZM=Ue(ak=>{"use strict";Object.defineProperty(ak,"__esModule",{value:!0});ak.isNode=jqt;ak.Token=ak.Location=void 0;var YJe=Uqt(UK());function Uqt(i){return i&&i.__esModule?i:{default:i}}var KJe=(function(){function i(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}var e=i.prototype;return e.toJSON=function(){return{start:this.start,end:this.end}},i})();ak.Location=KJe;(0,YJe.default)(KJe);var JJe=(function(){function i(t,n,r,o,s,a,l){this.kind=t,this.start=n,this.end=r,this.line=o,this.column=s,this.value=l,this.prev=a,this.next=null}var e=i.prototype;return e.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},i})();ak.Token=JJe;(0,YJe.default)(JJe);function jqt(i){return i!=null&&typeof i.kind=="string"}});var $M=Ue(jK=>{"use strict";Object.defineProperty(jK,"__esModule",{value:!0});jK.TokenKind=void 0;var Qqt=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});jK.TokenKind=Qqt});var Oo=Ue(y1e=>{"use strict";Object.defineProperty(y1e,"__esModule",{value:!0});y1e.default=Kqt;var Gqt=qqt(v1e());function qqt(i){return i&&i.__esModule?i:{default:i}}function QK(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?QK=function(t){return typeof t}:QK=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},QK(i)}var Yqt=10,XJe=2;function Kqt(i){return GK(i,[])}function GK(i,e){switch(QK(i)){case"string":return JSON.stringify(i);case"function":return i.name?"[function ".concat(i.name,"]"):"[function]";case"object":return i===null?"null":Jqt(i,e);default:return String(i)}}function Jqt(i,e){if(e.indexOf(i)!==-1)return"[Circular]";var t=[].concat(e,[i]),n=$qt(i);if(n!==void 0){var r=n.call(i);if(r!==i)return typeof r=="string"?r:GK(r,t)}else if(Array.isArray(i))return Zqt(i,t);return Xqt(i,t)}function Xqt(i,e){var t=Object.keys(i);if(t.length===0)return"{}";if(e.length>XJe)return"["+eYt(i)+"]";var n=t.map(function(r){var o=GK(i[r],e);return r+": "+o});return"{ "+n.join(", ")+" }"}function Zqt(i,e){if(i.length===0)return"[]";if(e.length>XJe)return"[Array]";for(var t=Math.min(Yqt,i.length),n=i.length-t,r=[],o=0;o1&&r.push("... ".concat(n," more items")),"["+r.join(", ")+"]"}function $qt(i){var e=i[String(Gqt.default)];if(typeof e=="function")return e;if(typeof i.inspect=="function")return i.inspect}function eYt(i){var e=Object.prototype.toString.call(i).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof i.constructor=="function"){var t=i.constructor.name;if(typeof t=="string"&&t!=="")return t}return e}});var g6=Ue(qK=>{"use strict";Object.defineProperty(qK,"__esModule",{value:!0});qK.default=void 0;var B9i=tYt(Oo());function tYt(i){return i&&i.__esModule?i:{default:i}}var iYt=function(e,t){return e instanceof t};qK.default=iYt});var YK=Ue(b6=>{"use strict";Object.defineProperty(b6,"__esModule",{value:!0});b6.isSource=aYt;b6.Source=void 0;var nYt=NA(),rYt=x1e(Oo()),w1e=x1e(gb()),oYt=x1e(g6());function x1e(i){return i&&i.__esModule?i:{default:i}}function ZJe(i,e){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof e=="string"||(0,w1e.default)(0,"Body must be a string. Received: ".concat((0,rYt.default)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||(0,w1e.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,w1e.default)(0,"column in locationOffset is 1-indexed and must be positive.")}return sYt(i,[{key:nYt.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}]),i})();b6.Source=$Je;function aYt(i){return(0,oYt.default)(i,$Je)}});var eR=Ue(KK=>{"use strict";Object.defineProperty(KK,"__esModule",{value:!0});KK.DirectiveLocation=void 0;var lYt=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});KK.DirectiveLocation=lYt});var tR=Ue(v6=>{"use strict";Object.defineProperty(v6,"__esModule",{value:!0});v6.dedentBlockStringValue=cYt;v6.getBlockStringIndentation=tXe;v6.printBlockString=uYt;function cYt(i){var e=i.split(/\r\n|[\n\r]/g),t=tXe(i);if(t!==0)for(var n=1;nr&&eXe(e[o-1]);)--o;return e.slice(r,o).join(` -`)}function eXe(i){for(var e=0;e1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=i.indexOf(` -`)===-1,r=i[0]===" "||i[0]===" ",o=i[i.length-1]==='"',s=i[i.length-1]==="\\",a=!n||o||s||t,l="";return a&&!(n&&r)&&(l+=` -`+e),l+=e?i.replace(/\n/g,` -`+e):i,a&&(l+=` -`),'"""'+l.replace(/"""/g,'\\"""')+'"""'}});var XK=Ue(A6=>{"use strict";Object.defineProperty(A6,"__esModule",{value:!0});A6.isPunctuatorTokenKind=fYt;A6.Lexer=void 0;var MA=VK(),pc=ZM(),_r=$M(),dYt=tR(),hYt=(function(){function i(t){var n=new pc.Token(_r.TokenKind.SOF,0,0,0,0,null);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var e=i.prototype;return e.advance=function(){this.lastToken=this.token;var n=this.token=this.lookahead();return n},e.lookahead=function(){var n=this.token;if(n.kind!==_r.TokenKind.EOF)do{var r;n=(r=n.next)!==null&&r!==void 0?r:n.next=pYt(this,n)}while(n.kind===_r.TokenKind.COMMENT);return n},i})();A6.Lexer=hYt;function fYt(i){return i===_r.TokenKind.BANG||i===_r.TokenKind.DOLLAR||i===_r.TokenKind.AMP||i===_r.TokenKind.PAREN_L||i===_r.TokenKind.PAREN_R||i===_r.TokenKind.SPREAD||i===_r.TokenKind.COLON||i===_r.TokenKind.EQUALS||i===_r.TokenKind.AT||i===_r.TokenKind.BRACKET_L||i===_r.TokenKind.BRACKET_R||i===_r.TokenKind.BRACE_L||i===_r.TokenKind.PIPE||i===_r.TokenKind.BRACE_R}function lk(i){return isNaN(i)?_r.TokenKind.EOF:i<127?JSON.stringify(String.fromCharCode(i)):'"\\u'.concat(("00"+i.toString(16).toUpperCase()).slice(-4),'"')}function pYt(i,e){for(var t=i.source,n=t.body,r=n.length,o=e.end;o31||s===9));return new pc.Token(_r.TokenKind.COMMENT,e,a,t,n,r,o.slice(e+1,a))}function bYt(i,e,t,n,r,o){var s=i.body,a=t,l=e,c=!1;if(a===45&&(a=s.charCodeAt(++l)),a===48){if(a=s.charCodeAt(++l),a>=48&&a<=57)throw(0,MA.syntaxError)(i,l,"Invalid number, unexpected digit after 0: ".concat(lk(a),"."))}else l=C1e(i,l,a),a=s.charCodeAt(l);if(a===46&&(c=!0,a=s.charCodeAt(++l),l=C1e(i,l,a),a=s.charCodeAt(l)),(a===69||a===101)&&(c=!0,a=s.charCodeAt(++l),(a===43||a===45)&&(a=s.charCodeAt(++l)),l=C1e(i,l,a),a=s.charCodeAt(l)),a===46||xYt(a))throw(0,MA.syntaxError)(i,l,"Invalid number, expected digit but got: ".concat(lk(a),"."));return new pc.Token(c?_r.TokenKind.FLOAT:_r.TokenKind.INT,e,l,n,r,o,s.slice(e,l))}function C1e(i,e,t){var n=i.body,r=e,o=t;if(o>=48&&o<=57){do o=n.charCodeAt(++r);while(o>=48&&o<=57);return r}throw(0,MA.syntaxError)(i,r,"Invalid number, expected digit but got: ".concat(lk(o),"."))}function vYt(i,e,t,n,r){for(var o=i.body,s=e+1,a=s,l=0,c="";s=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function wYt(i,e,t,n,r){for(var o=i.body,s=o.length,a=e+1,l=0;a!==s&&!isNaN(l=o.charCodeAt(a))&&(l===95||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++a;return new pc.Token(_r.TokenKind.NAME,e,a,t,n,r,o.slice(e,a))}function xYt(i){return i===95||i>=65&&i<=90||i>=97&&i<=122}});var iR=Ue(ck=>{"use strict";Object.defineProperty(ck,"__esModule",{value:!0});ck.parse=SYt;ck.parseValue=EYt;ck.parseType=DYt;ck.Parser=void 0;var _1e=VK(),Sn=Ds(),CYt=ZM(),oi=$M(),iXe=YK(),_Yt=eR(),nXe=XK();function SYt(i,e){var t=new ZK(i,e);return t.parseDocument()}function EYt(i,e){var t=new ZK(i,e);t.expectToken(oi.TokenKind.SOF);var n=t.parseValueLiteral(!1);return t.expectToken(oi.TokenKind.EOF),n}function DYt(i,e){var t=new ZK(i,e);t.expectToken(oi.TokenKind.SOF);var n=t.parseTypeReference();return t.expectToken(oi.TokenKind.EOF),n}var ZK=(function(){function i(t,n){var r=(0,iXe.isSource)(t)?t:new iXe.Source(t);this._lexer=new nXe.Lexer(r),this._options=n}var e=i.prototype;return e.parseName=function(){var n=this.expectToken(oi.TokenKind.NAME);return{kind:Sn.Kind.NAME,value:n.value,loc:this.loc(n)}},e.parseDocument=function(){var n=this._lexer.token;return{kind:Sn.Kind.DOCUMENT,definitions:this.many(oi.TokenKind.SOF,this.parseDefinition,oi.TokenKind.EOF),loc:this.loc(n)}},e.parseDefinition=function(){if(this.peek(oi.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(oi.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},e.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(oi.TokenKind.BRACE_L))return{kind:Sn.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var r=this.parseOperationType(),o;return this.peek(oi.TokenKind.NAME)&&(o=this.parseName()),{kind:Sn.Kind.OPERATION_DEFINITION,operation:r,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseOperationType=function(){var n=this.expectToken(oi.TokenKind.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},e.parseVariableDefinitions=function(){return this.optionalMany(oi.TokenKind.PAREN_L,this.parseVariableDefinition,oi.TokenKind.PAREN_R)},e.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:Sn.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(oi.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(oi.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},e.parseVariable=function(){var n=this._lexer.token;return this.expectToken(oi.TokenKind.DOLLAR),{kind:Sn.Kind.VARIABLE,name:this.parseName(),loc:this.loc(n)}},e.parseSelectionSet=function(){var n=this._lexer.token;return{kind:Sn.Kind.SELECTION_SET,selections:this.many(oi.TokenKind.BRACE_L,this.parseSelection,oi.TokenKind.BRACE_R),loc:this.loc(n)}},e.parseSelection=function(){return this.peek(oi.TokenKind.SPREAD)?this.parseFragment():this.parseField()},e.parseField=function(){var n=this._lexer.token,r=this.parseName(),o,s;return this.expectOptionalToken(oi.TokenKind.COLON)?(o=r,s=this.parseName()):s=r,{kind:Sn.Kind.FIELD,alias:o,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(oi.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},e.parseArguments=function(n){var r=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(oi.TokenKind.PAREN_L,r,oi.TokenKind.PAREN_R)},e.parseArgument=function(){var n=this._lexer.token,r=this.parseName();return this.expectToken(oi.TokenKind.COLON),{kind:Sn.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(!1),loc:this.loc(n)}},e.parseConstArgument=function(){var n=this._lexer.token;return{kind:Sn.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(oi.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},e.parseFragment=function(){var n=this._lexer.token;this.expectToken(oi.TokenKind.SPREAD);var r=this.expectOptionalKeyword("on");return!r&&this.peek(oi.TokenKind.NAME)?{kind:Sn.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:Sn.Kind.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseFragmentDefinition=function(){var n,r=this._lexer.token;return this.expectKeyword("fragment"),((n=this._options)===null||n===void 0?void 0:n.experimentalFragmentVariables)===!0?{kind:Sn.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}:{kind:Sn.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},e.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},e.parseValueLiteral=function(n){var r=this._lexer.token;switch(r.kind){case oi.TokenKind.BRACKET_L:return this.parseList(n);case oi.TokenKind.BRACE_L:return this.parseObject(n);case oi.TokenKind.INT:return this._lexer.advance(),{kind:Sn.Kind.INT,value:r.value,loc:this.loc(r)};case oi.TokenKind.FLOAT:return this._lexer.advance(),{kind:Sn.Kind.FLOAT,value:r.value,loc:this.loc(r)};case oi.TokenKind.STRING:case oi.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case oi.TokenKind.NAME:switch(this._lexer.advance(),r.value){case"true":return{kind:Sn.Kind.BOOLEAN,value:!0,loc:this.loc(r)};case"false":return{kind:Sn.Kind.BOOLEAN,value:!1,loc:this.loc(r)};case"null":return{kind:Sn.Kind.NULL,loc:this.loc(r)};default:return{kind:Sn.Kind.ENUM,value:r.value,loc:this.loc(r)}}case oi.TokenKind.DOLLAR:if(!n)return this.parseVariable();break}throw this.unexpected()},e.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:Sn.Kind.STRING,value:n.value,block:n.kind===oi.TokenKind.BLOCK_STRING,loc:this.loc(n)}},e.parseList=function(n){var r=this,o=this._lexer.token,s=function(){return r.parseValueLiteral(n)};return{kind:Sn.Kind.LIST,values:this.any(oi.TokenKind.BRACKET_L,s,oi.TokenKind.BRACKET_R),loc:this.loc(o)}},e.parseObject=function(n){var r=this,o=this._lexer.token,s=function(){return r.parseObjectField(n)};return{kind:Sn.Kind.OBJECT,fields:this.any(oi.TokenKind.BRACE_L,s,oi.TokenKind.BRACE_R),loc:this.loc(o)}},e.parseObjectField=function(n){var r=this._lexer.token,o=this.parseName();return this.expectToken(oi.TokenKind.COLON),{kind:Sn.Kind.OBJECT_FIELD,name:o,value:this.parseValueLiteral(n),loc:this.loc(r)}},e.parseDirectives=function(n){for(var r=[];this.peek(oi.TokenKind.AT);)r.push(this.parseDirective(n));return r},e.parseDirective=function(n){var r=this._lexer.token;return this.expectToken(oi.TokenKind.AT),{kind:Sn.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(r)}},e.parseTypeReference=function(){var n=this._lexer.token,r;return this.expectOptionalToken(oi.TokenKind.BRACKET_L)?(r=this.parseTypeReference(),this.expectToken(oi.TokenKind.BRACKET_R),r={kind:Sn.Kind.LIST_TYPE,type:r,loc:this.loc(n)}):r=this.parseNamedType(),this.expectOptionalToken(oi.TokenKind.BANG)?{kind:Sn.Kind.NON_NULL_TYPE,type:r,loc:this.loc(n)}:r},e.parseNamedType=function(){var n=this._lexer.token;return{kind:Sn.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},e.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===oi.TokenKind.NAME)switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(n)},e.peekDescription=function(){return this.peek(oi.TokenKind.STRING)||this.peek(oi.TokenKind.BLOCK_STRING)},e.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},e.parseSchemaDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");var o=this.parseDirectives(!0),s=this.many(oi.TokenKind.BRACE_L,this.parseOperationTypeDefinition,oi.TokenKind.BRACE_R);return{kind:Sn.Kind.SCHEMA_DEFINITION,description:r,directives:o,operationTypes:s,loc:this.loc(n)}},e.parseOperationTypeDefinition=function(){var n=this._lexer.token,r=this.parseOperationType();this.expectToken(oi.TokenKind.COLON);var o=this.parseNamedType();return{kind:Sn.Kind.OPERATION_TYPE_DEFINITION,operation:r,type:o,loc:this.loc(n)}},e.parseScalarTypeDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");var o=this.parseName(),s=this.parseDirectives(!0);return{kind:Sn.Kind.SCALAR_TYPE_DEFINITION,description:r,name:o,directives:s,loc:this.loc(n)}},e.parseObjectTypeDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");var o=this.parseName(),s=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:Sn.Kind.OBJECT_TYPE_DEFINITION,description:r,name:o,interfaces:s,directives:a,fields:l,loc:this.loc(n)}},e.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLImplementsInterfaces)===!0){var r=[];this.expectOptionalToken(oi.TokenKind.AMP);do r.push(this.parseNamedType());while(this.expectOptionalToken(oi.TokenKind.AMP)||this.peek(oi.TokenKind.NAME));return r}return this.delimitedMany(oi.TokenKind.AMP,this.parseNamedType)},e.parseFieldsDefinition=function(){var n;return((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLEmptyFields)===!0&&this.peek(oi.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===oi.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(oi.TokenKind.BRACE_L,this.parseFieldDefinition,oi.TokenKind.BRACE_R)},e.parseFieldDefinition=function(){var n=this._lexer.token,r=this.parseDescription(),o=this.parseName(),s=this.parseArgumentDefs();this.expectToken(oi.TokenKind.COLON);var a=this.parseTypeReference(),l=this.parseDirectives(!0);return{kind:Sn.Kind.FIELD_DEFINITION,description:r,name:o,arguments:s,type:a,directives:l,loc:this.loc(n)}},e.parseArgumentDefs=function(){return this.optionalMany(oi.TokenKind.PAREN_L,this.parseInputValueDef,oi.TokenKind.PAREN_R)},e.parseInputValueDef=function(){var n=this._lexer.token,r=this.parseDescription(),o=this.parseName();this.expectToken(oi.TokenKind.COLON);var s=this.parseTypeReference(),a;this.expectOptionalToken(oi.TokenKind.EQUALS)&&(a=this.parseValueLiteral(!0));var l=this.parseDirectives(!0);return{kind:Sn.Kind.INPUT_VALUE_DEFINITION,description:r,name:o,type:s,defaultValue:a,directives:l,loc:this.loc(n)}},e.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");var o=this.parseName(),s=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:Sn.Kind.INTERFACE_TYPE_DEFINITION,description:r,name:o,interfaces:s,directives:a,fields:l,loc:this.loc(n)}},e.parseUnionTypeDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");var o=this.parseName(),s=this.parseDirectives(!0),a=this.parseUnionMemberTypes();return{kind:Sn.Kind.UNION_TYPE_DEFINITION,description:r,name:o,directives:s,types:a,loc:this.loc(n)}},e.parseUnionMemberTypes=function(){return this.expectOptionalToken(oi.TokenKind.EQUALS)?this.delimitedMany(oi.TokenKind.PIPE,this.parseNamedType):[]},e.parseEnumTypeDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");var o=this.parseName(),s=this.parseDirectives(!0),a=this.parseEnumValuesDefinition();return{kind:Sn.Kind.ENUM_TYPE_DEFINITION,description:r,name:o,directives:s,values:a,loc:this.loc(n)}},e.parseEnumValuesDefinition=function(){return this.optionalMany(oi.TokenKind.BRACE_L,this.parseEnumValueDefinition,oi.TokenKind.BRACE_R)},e.parseEnumValueDefinition=function(){var n=this._lexer.token,r=this.parseDescription(),o=this.parseName(),s=this.parseDirectives(!0);return{kind:Sn.Kind.ENUM_VALUE_DEFINITION,description:r,name:o,directives:s,loc:this.loc(n)}},e.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");var o=this.parseName(),s=this.parseDirectives(!0),a=this.parseInputFieldsDefinition();return{kind:Sn.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:o,directives:s,fields:a,loc:this.loc(n)}},e.parseInputFieldsDefinition=function(){return this.optionalMany(oi.TokenKind.BRACE_L,this.parseInputValueDef,oi.TokenKind.BRACE_R)},e.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===oi.TokenKind.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(n)},e.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var r=this.parseDirectives(!0),o=this.optionalMany(oi.TokenKind.BRACE_L,this.parseOperationTypeDefinition,oi.TokenKind.BRACE_R);if(r.length===0&&o.length===0)throw this.unexpected();return{kind:Sn.Kind.SCHEMA_EXTENSION,directives:r,operationTypes:o,loc:this.loc(n)}},e.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var r=this.parseName(),o=this.parseDirectives(!0);if(o.length===0)throw this.unexpected();return{kind:Sn.Kind.SCALAR_TYPE_EXTENSION,name:r,directives:o,loc:this.loc(n)}},e.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var r=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&a.length===0)throw this.unexpected();return{kind:Sn.Kind.OBJECT_TYPE_EXTENSION,name:r,interfaces:o,directives:s,fields:a,loc:this.loc(n)}},e.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var r=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&a.length===0)throw this.unexpected();return{kind:Sn.Kind.INTERFACE_TYPE_EXTENSION,name:r,interfaces:o,directives:s,fields:a,loc:this.loc(n)}},e.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var r=this.parseName(),o=this.parseDirectives(!0),s=this.parseUnionMemberTypes();if(o.length===0&&s.length===0)throw this.unexpected();return{kind:Sn.Kind.UNION_TYPE_EXTENSION,name:r,directives:o,types:s,loc:this.loc(n)}},e.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var r=this.parseName(),o=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return{kind:Sn.Kind.ENUM_TYPE_EXTENSION,name:r,directives:o,values:s,loc:this.loc(n)}},e.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var r=this.parseName(),o=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return{kind:Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:o,fields:s,loc:this.loc(n)}},e.parseDirectiveDefinition=function(){var n=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(oi.TokenKind.AT);var o=this.parseName(),s=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var l=this.parseDirectiveLocations();return{kind:Sn.Kind.DIRECTIVE_DEFINITION,description:r,name:o,arguments:s,repeatable:a,locations:l,loc:this.loc(n)}},e.parseDirectiveLocations=function(){return this.delimitedMany(oi.TokenKind.PIPE,this.parseDirectiveLocation)},e.parseDirectiveLocation=function(){var n=this._lexer.token,r=this.parseName();if(_Yt.DirectiveLocation[r.value]!==void 0)return r;throw this.unexpected(n)},e.loc=function(n){var r;if(((r=this._options)===null||r===void 0?void 0:r.noLocation)!==!0)return new CYt.Location(n,this._lexer.lastToken,this._lexer.source)},e.peek=function(n){return this._lexer.token.kind===n},e.expectToken=function(n){var r=this._lexer.token;if(r.kind===n)return this._lexer.advance(),r;throw(0,_1e.syntaxError)(this._lexer.source,r.start,"Expected ".concat(rXe(n),", found ").concat(S1e(r),"."))},e.expectOptionalToken=function(n){var r=this._lexer.token;if(r.kind===n)return this._lexer.advance(),r},e.expectKeyword=function(n){var r=this._lexer.token;if(r.kind===oi.TokenKind.NAME&&r.value===n)this._lexer.advance();else throw(0,_1e.syntaxError)(this._lexer.source,r.start,'Expected "'.concat(n,'", found ').concat(S1e(r),"."))},e.expectOptionalKeyword=function(n){var r=this._lexer.token;return r.kind===oi.TokenKind.NAME&&r.value===n?(this._lexer.advance(),!0):!1},e.unexpected=function(n){var r=n??this._lexer.token;return(0,_1e.syntaxError)(this._lexer.source,r.start,"Unexpected ".concat(S1e(r),"."))},e.any=function(n,r,o){this.expectToken(n);for(var s=[];!this.expectOptionalToken(o);)s.push(r.call(this));return s},e.optionalMany=function(n,r,o){if(this.expectOptionalToken(n)){var s=[];do s.push(r.call(this));while(!this.expectOptionalToken(o));return s}return[]},e.many=function(n,r,o){this.expectToken(n);var s=[];do s.push(r.call(this));while(!this.expectOptionalToken(o));return s},e.delimitedMany=function(n,r){this.expectOptionalToken(n);var o=[];do o.push(r.call(this));while(this.expectOptionalToken(n));return o},i})();ck.Parser=ZK;function S1e(i){var e=i.value;return rXe(i.kind)+(e!=null?' "'.concat(e,'"'):"")}function rXe(i){return(0,nXe.isPunctuatorTokenKind)(i)?'"'.concat(i,'"'):i}});var O_=Ue(_w=>{"use strict";Object.defineProperty(_w,"__esModule",{value:!0});_w.visit=IYt;_w.visitInParallel=LYt;_w.getVisitFn=$K;_w.BREAK=_w.QueryDocumentKeys=void 0;var TYt=kYt(Oo()),oXe=ZM();function kYt(i){return i&&i.__esModule?i:{default:i}}var sXe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};_w.QueryDocumentKeys=sXe;var nR=Object.freeze({});_w.BREAK=nR;function IYt(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sXe,n=void 0,r=Array.isArray(i),o=[i],s=-1,a=[],l=void 0,c=void 0,u=void 0,d=[],h=[],f=i;do{s++;var p=s===o.length,g=p&&a.length!==0;if(p){if(c=h.length===0?void 0:d[d.length-1],l=u,u=h.pop(),g){if(r)l=l.slice();else{for(var v={},A=0,w=Object.keys(l);A{"use strict";Object.defineProperty(eJ,"__esModule",{value:!0});eJ.default=void 0;var NYt=Array.prototype.find?function(i,e){return Array.prototype.find.call(i,e)}:function(i,e){for(var t=0;t{"use strict";Object.defineProperty(tJ,"__esModule",{value:!0});tJ.default=void 0;var RYt=Object.values||function(i){return Object.keys(i).map(function(e){return i[e]})},FYt=RYt;tJ.default=FYt});var y6=Ue(E1e=>{"use strict";Object.defineProperty(E1e,"__esModule",{value:!0});E1e.locatedError=zYt;var OYt=BYt(Oo()),PYt=dn();function BYt(i){return i&&i.__esModule?i:{default:i}}function zYt(i,e,t){var n,r=i instanceof Error?i:new Error("Unexpected error value: "+(0,OYt.default)(i));return Array.isArray(r.path)?r:new PYt.GraphQLError(r.message,(n=r.nodes)!==null&&n!==void 0?n:e,r.source,r.positions,t,r)}});var D1e=Ue(iJ=>{"use strict";Object.defineProperty(iJ,"__esModule",{value:!0});iJ.assertValidName=UYt;iJ.isValidNameError=lXe;var VYt=HYt(gb()),aXe=dn();function HYt(i){return i&&i.__esModule?i:{default:i}}var WYt=/^[_a-zA-Z][_a-zA-Z0-9]*$/;function UYt(i){var e=lXe(i);if(e)throw e;return i}function lXe(i){if(typeof i=="string"||(0,VYt.default)(0,"Expected name to be a string."),i.length>1&&i[0]==="_"&&i[1]==="_")return new aXe.GraphQLError('Name "'.concat(i,'" must not begin with "__", which is reserved by GraphQL introspection.'));if(!WYt.test(i))return new aXe.GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(i,'" does not.'))}});var oR=Ue(nJ=>{"use strict";Object.defineProperty(nJ,"__esModule",{value:!0});nJ.default=void 0;var jYt=Object.entries||function(i){return Object.keys(i).map(function(e){return[e,i[e]]})},QYt=jYt;nJ.default=QYt});var P_=Ue(T1e=>{"use strict";Object.defineProperty(T1e,"__esModule",{value:!0});T1e.default=GYt;function GYt(i,e){return i.reduce(function(t,n){return t[e(n)]=n,t},Object.create(null))}});var I1e=Ue(k1e=>{"use strict";Object.defineProperty(k1e,"__esModule",{value:!0});k1e.default=KYt;var qYt=YYt(oR());function YYt(i){return i&&i.__esModule?i:{default:i}}function KYt(i,e){for(var t=Object.create(null),n=0,r=(0,qYt.default)(i);n{"use strict";Object.defineProperty(L1e,"__esModule",{value:!0});L1e.default=ZYt;var JYt=XYt(oR());function XYt(i){return i&&i.__esModule?i:{default:i}}function ZYt(i){if(Object.getPrototypeOf(i)===null)return i;for(var e=Object.create(null),t=0,n=(0,JYt.default)(i);t{"use strict";Object.defineProperty(N1e,"__esModule",{value:!0});N1e.default=$Yt;function $Yt(i,e,t){return i.reduce(function(n,r){return n[e(r)]=t(r),n},Object.create(null))}});var B_=Ue(M1e=>{"use strict";Object.defineProperty(M1e,"__esModule",{value:!0});M1e.default=tKt;var eKt=5;function tKt(i,e){var t=typeof i=="string"?[i,e]:[void 0,i],n=t[0],r=t[1],o=" Did you mean ";n&&(o+=n+" ");var s=r.map(function(c){return'"'.concat(c,'"')});switch(s.length){case 0:return"";case 1:return o+s[0]+"?";case 2:return o+s[0]+" or "+s[1]+"?"}var a=s.slice(0,eKt),l=a.pop();return o+a.join(", ")+", or "+l+"?"}});var cXe=Ue(R1e=>{"use strict";Object.defineProperty(R1e,"__esModule",{value:!0});R1e.default=iKt;function iKt(i){return i}});var x6=Ue(O1e=>{"use strict";Object.defineProperty(O1e,"__esModule",{value:!0});O1e.default=nKt;function nKt(i,e){for(var t=0,n=0;t0);var a=0;do++n,a=a*10+o-F1e,o=e.charCodeAt(n);while(oJ(o)&&a>0);if(sa)return 1}else{if(ro)return 1;++t,++n}}return i.length-e.length}var F1e=48,rKt=57;function oJ(i){return!isNaN(i)&&F1e<=i&&i<=rKt}});var z_=Ue(P1e=>{"use strict";Object.defineProperty(P1e,"__esModule",{value:!0});P1e.default=aKt;var oKt=sKt(x6());function sKt(i){return i&&i.__esModule?i:{default:i}}function aKt(i,e){for(var t=Object.create(null),n=new lKt(i),r=Math.floor(i.length*.4)+1,o=0;or)){for(var d=this._rows,h=0;h<=u;h++)d[0][h]=h;for(var f=1;f<=c;f++){for(var p=d[(f-1)%3],g=d[f%3],v=g[0]=f,A=1;A<=u;A++){var w=s[f-1]===a[A-1]?0:1,C=Math.min(p[A]+1,g[A-1]+1,p[A-1]+w);if(f>1&&A>1&&s[f-1]===a[A-2]&&s[f-2]===a[A-1]){var _=d[(f-2)%3][A-2];C=Math.min(C,_+1)}Cr)return}var E=d[c%3][u];return E<=r?E:void 0}},i})();function uXe(i){for(var e=i.length,t=new Array(e),n=0;n{"use strict";Object.defineProperty(B1e,"__esModule",{value:!0});B1e.print=dKt;var cKt=O_(),uKt=tR();function dKt(i){return(0,cKt.visit)(i,{leave:fKt})}var hKt=80,fKt={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Ii(e.definitions,` - -`)+` -`},OperationDefinition:function(e){var t=e.operation,n=e.name,r=fl("(",Ii(e.variableDefinitions,", "),")"),o=Ii(e.directives," "),s=e.selectionSet;return!n&&!o&&!r&&t==="query"?s:Ii([t,Ii([n,r]),o,s]," ")},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+fl(" = ",r)+fl(" ",Ii(o," "))},SelectionSet:function(e){var t=e.selections;return G0(t)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,s=e.selectionSet,a=fl("",t,": ")+n,l=a+fl("(",Ii(r,", "),")");return l.length>hKt&&(l=a+fl(`( -`,sJ(Ii(r,` +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};vVt=Array.prototype.toReversed??function(){return[...this].reverse()},yVt=Q6("toReversed",function(){if(Array.isArray(this))return vVt}),wVt=yVt;CVt=xVt();DVt=i=>String(i).split(/[/\\]/).pop(),TVt=i=>String(i).startsWith("file:");IVt=void 0;MKe=LVt,xR={key:i=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(i)?i:JSON.stringify(i),value(i){if(i===null||typeof i!="object")return JSON.stringify(i);if(Array.isArray(i))return`[${i.map(t=>xR.value(t)).join(", ")}]`;let e=Object.keys(i);return e.length===0?"{}":`{ ${e.map(t=>`${xR.key(t)}: ${xR.value(i[t])}`).join(", ")} }`},pair:({key:i,value:e})=>xR.value({[i]:e})},RKe=new Proxy(String,{get:()=>RKe}),Uv=RKe,NVt=(i,e,{descriptor:t})=>{let n=[`${Uv.yellow(typeof i=="string"?t.key(i):t.pair(i))} is deprecated`];return e&&n.push(`we now treat it as ${Uv.blue(typeof e=="string"?t.key(e):t.pair(e))}`),n.join("; ")+"."},FKe=Symbol.for("vnopts.VALUE_NOT_EXIST"),KJ=Symbol.for("vnopts.VALUE_UNCHANGED"),OYe=" ".repeat(2),MVt=(i,e,t)=>{let{text:n,list:o}=t.normalizeExpectedResult(t.schemas[i].expected(t)),r=[];return n&&r.push(PYe(i,e,n,t.descriptor)),o&&r.push([PYe(i,e,o.title,t.descriptor)].concat(o.values.map(s=>OKe(s,t.loggerPrintWidth))).join(` +`)),PKe(r,t.loggerPrintWidth)};wR=[],B1e=[];BKe=(i,e,{descriptor:t,logger:n,schemas:o})=>{let r=[`Ignored unknown option ${Uv.yellow(t.pair({key:i,value:e}))}.`],s=RVt(i,Object.keys(o),{maxDistance:3});s&&r.push(`Did you mean ${Uv.blue(t.key(s))}?`),n.warn(r.join(" "))},FVt=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];iS=class{static create(i){return OVt(this,i)}constructor(i){this.name=i.name}default(i){}expected(i){return"nothing"}validate(i,e){return!1}deprecated(i,e){return!1}forward(i,e){}redirect(i,e){}overlap(i,e,t){return i}preprocess(i,e){return i}postprocess(i,e){return KJ}};BVt=class extends iS{constructor(i){super(i),this._sourceName=i.sourceName}expected(i){return i.schemas[this._sourceName].expected(i)}validate(i,e){return e.schemas[this._sourceName].validate(i,e)}redirect(i,e){return this._sourceName}},zVt=class extends iS{expected(){return"anything"}validate(){return!0}},VVt=class extends iS{constructor({valueSchema:i,name:e=i.name,...t}){super({...t,name:e}),this._valueSchema=i}expected(i){let{text:e,list:t}=i.normalizeExpectedResult(this._valueSchema.expected(i));return{text:e&&`an array of ${e}`,list:t&&{title:"an array of the following values",values:[{list:t}]}}}validate(i,e){if(!Array.isArray(i))return!1;let t=[];for(let n of i){let o=e.normalizeValidateResult(this._valueSchema.validate(n,e),n);o!==!0&&t.push(o.value)}return t.length===0?!0:{value:t}}deprecated(i,e){let t=[];for(let n of i){let o=e.normalizeDeprecatedResult(this._valueSchema.deprecated(n,e),n);o!==!1&&t.push(...o.map(({value:r})=>({value:[r]})))}return t}forward(i,e){let t=[];for(let n of i){let o=e.normalizeForwardResult(this._valueSchema.forward(n,e),n);t.push(...o.map(BYe))}return t}redirect(i,e){let t=[],n=[];for(let o of i){let r=e.normalizeRedirectResult(this._valueSchema.redirect(o,e),o);"remain"in r&&t.push(r.remain),n.push(...r.redirect.map(BYe))}return t.length===0?{redirect:n}:{redirect:n,remain:t}}overlap(i,e){return i.concat(e)}};HVt=class extends iS{expected(){return"true or false"}validate(i){return typeof i=="boolean"}};JVt=class extends iS{constructor(i){super(i),this._choices=UVt(i.choices.map(e=>e&&typeof e=="object"?e:{value:e}),"value")}expected({descriptor:i}){let e=Array.from(this._choices.keys()).map(o=>this._choices.get(o)).filter(({hidden:o})=>!o).map(o=>o.value).sort(qVt).map(i.value),t=e.slice(0,-2),n=e.slice(-2);return{text:t.concat(n.join(" or ")).join(", "),list:{title:"one of the following values",values:e}}}validate(i){return this._choices.has(i)}deprecated(i){let e=this._choices.get(i);return e&&e.deprecated?{value:i}:!1}forward(i){let e=this._choices.get(i);return e?e.forward:void 0}redirect(i){let e=this._choices.get(i);return e?e.redirect:void 0}},XVt=class extends iS{expected(){return"a number"}validate(i,e){return typeof i=="number"}},ZVt=class extends XVt{expected(){return"an integer"}validate(i,e){return e.normalizeValidateResult(super.validate(i,e),i)===!0&&GVt(i)}},jYe=class extends iS{expected(){return"a string"}validate(i){return typeof i=="string"}},$Vt=xR,eHt=BKe,tHt=MVt,iHt=NVt,nHt=class{constructor(i,e){let{logger:t=console,loggerPrintWidth:n=80,descriptor:o=$Vt,unknown:r=eHt,invalid:s=tHt,deprecated:a=iHt,missing:l=()=>!1,required:c=()=>!1,preprocess:u=h=>h,postprocess:d=()=>KJ}=e||{};this._utils={descriptor:o,logger:t||{warn:()=>{}},loggerPrintWidth:n,schemas:WVt(i,"name"),normalizeDefaultResult:zYe,normalizeExpectedResult:zKe,normalizeDeprecatedResult:HYe,normalizeForwardResult:j1e,normalizeRedirectResult:UYe,normalizeValidateResult:VYe},this._unknownHandler=r,this._invalidHandler=YVt(s),this._deprecatedHandler=a,this._identifyMissing=(h,f)=>!(h in f)||l(h,f),this._identifyRequired=c,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=jVt()}normalize(i){let e={},t=[this._preprocess(i,this._utils)],n=()=>{for(;t.length!==0;){let o=t.shift(),r=this._applyNormalization(o,e);t.push(...r)}};n();for(let o of Object.keys(this._utils.schemas)){let r=this._utils.schemas[o];if(!(o in e)){let s=zYe(r.default(this._utils));"value"in s&&t.push({[o]:s.value})}}n();for(let o of Object.keys(this._utils.schemas)){if(!(o in e))continue;let r=this._utils.schemas[o],s=e[o],a=r.postprocess(s,this._utils);a!==KJ&&(this._applyValidation(a,o,r),e[o]=a)}return this._applyPostprocess(e),this._applyRequiredCheck(e),e}_applyNormalization(i,e){let t=[],{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(i);for(let r of n){let s=this._utils.schemas[r],a=s.preprocess(i[r],this._utils);this._applyValidation(a,r,s);let l=({from:d,to:h})=>{t.push(typeof h=="string"?{[h]:d}:{[h.key]:h.value})},c=({value:d,redirectTo:h})=>{let f=HYe(s.deprecated(d,this._utils),a,!0);if(f!==!1)if(f===!0)this._hasDeprecationWarned(r)||this._utils.logger.warn(this._deprecatedHandler(r,h,this._utils));else for(let{value:p}of f){let g={key:r,value:p};if(!this._hasDeprecationWarned(g)){let A=typeof h=="string"?{key:h,value:p}:h;this._utils.logger.warn(this._deprecatedHandler(g,A,this._utils))}}};j1e(s.forward(a,this._utils),a).forEach(l);let u=UYe(s.redirect(a,this._utils),a);if(u.redirect.forEach(l),"remain"in u){let d=u.remain;e[r]=r in e?s.overlap(e[r],d,this._utils):d,c({value:d})}for(let{from:d,to:h}of u.redirect)c({value:d,redirectTo:h})}for(let r of o){let s=i[r];this._applyUnknownHandler(r,s,e,(a,l)=>{t.push({[a]:l})})}return t}_applyRequiredCheck(i){for(let e of Object.keys(this._utils.schemas))if(this._identifyMissing(e,i)&&this._identifyRequired(e))throw this._invalidHandler(e,FKe,this._utils)}_partitionOptionKeys(i){let[e,t]=QVt(Object.keys(i).filter(n=>!this._identifyMissing(n,i)),n=>n in this._utils.schemas);return{knownKeys:e,unknownKeys:t}}_applyValidation(i,e,t){let n=VYe(t.validate(i,this._utils),i);if(n!==!0)throw this._invalidHandler(e,n.value,this._utils)}_applyUnknownHandler(i,e,t,n){let o=this._unknownHandler(i,e,this._utils);if(o)for(let r of Object.keys(o)){if(this._identifyMissing(r,o))continue;let s=o[r];r in this._utils.schemas?n(r,s):t[r]=s}}_applyPostprocess(i){let e=this._postprocess(i,this._utils);if(e!==KJ){if(e.delete)for(let t of e.delete)delete i[t];if(e.override){let{knownKeys:t,unknownKeys:n}=this._partitionOptionKeys(e.override);for(let o of t){let r=e.override[o];this._applyValidation(r,o,this._utils.schemas[o]),i[o]=r}for(let o of n){let r=e.override[o];this._applyUnknownHandler(o,r,i,(s,a)=>{let l=this._utils.schemas[s];this._applyValidation(a,s,l),i[s]=a})}}}}};aHt=oHt,lHt=Array.prototype.findLast??function(i){for(let e=this.length-1;e>=0;e--){let t=this[e];if(i(t,e,this))return t}},cHt=Q6("findLast",function(){if(Array.isArray(this))return lHt}),VKe=cHt,uHt=Symbol.for("PRETTIER_IS_FRONT_MATTER"),dHt=[];owe=hHt,HKe=new Set(["yaml","toml"]),WKe=({node:i})=>owe(i)&&HKe.has(i.language);mHt=pHt;bHt=gHt,UKe=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),AHt=i=>Object.keys(i).filter(e=>!UKe.has(e));QYe=vHt;CHt=new WeakMap;SHt=["clean","embed","print"],EHt=Object.fromEntries(SHt.map(i=>[i,!1]));GYe={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};SR=kHt,qYe=/\r\n|[\n\r\u2028\u2029]/;q6=MHt;BHt=PHt;qKe=zHt;HHt=VHt,WHt=Array.prototype.findLastIndex??function(i){for(let e=this.length-1;e>=0;e--){let t=this[e];if(i(t,e,this))return e}return-1},UHt=Q6("findLastIndex",function(){if(Array.isArray(this))return WHt}),jHt=UHt;YKe=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),YHt=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);KKe="\uFEFF",XYe=Symbol("cursor");swe={};G1e(swe,{builders:()=>nWt,printer:()=>oWt,utils:()=>rWt});nWt={join:dKe,line:hKe,softline:yzt,hardline:Mw,literalline:pKe,group:uKe,conditionalGroup:gzt,fill:mzt,lineSuffix:W1e,lineSuffixBoundary:wzt,cursor:Sk,breakParent:tX,ifBreak:bzt,trim:xzt,indent:JJ,indentIfBreak:Azt,align:_R,addAlignmentToDoc:cKe,markAsRoot:lKe,dedentToRoot:fzt,dedent:pzt,hardlineWithoutBreakParent:Z1e,literallineWithoutBreakParent:fKe,label:vzt,concat:i=>i},oWt={printDocToString:iX},rWt={willBreak:izt,traverseDoc:J1e,findInDoc:X1e,mapDoc:eX,removeLines:rzt,stripTrailingHardline:sKe,replaceEndOfLine:lzt,canBreak:uzt},$Ke="3.9.6",awe={};G1e(awe,{addDanglingComment:()=>Ck,addLeadingComment:()=>U6,addTrailingComment:()=>j6,getAlignmentSize:()=>ewe,getIndentSize:()=>dWt,getMaxContinuousCount:()=>pWt,getNextNonSpaceNonCommentCharacter:()=>gWt,getNextNonSpaceNonCommentCharacterIndex:()=>SWt,getPreferredQuote:()=>vWt,getStringWidth:()=>$1e,hasNewline:()=>Z_,hasNewlineInRange:()=>wWt,hasSpaces:()=>CWt,isNextLineEmpty:()=>IWt,isNextLineEmptyAfterIndex:()=>dwe,isPreviousLineEmpty:()=>DWt,makeString:()=>kWt,skip:()=>G6,skipEverythingButNewLine:()=>xKe,skipInlineComment:()=>lwe,skipNewline:()=>Ek,skipSpaces:()=>eS,skipToLineEnd:()=>wKe,skipTrailingComment:()=>cwe,skipWhitespace:()=>Xzt});lwe=sWt;cwe=aWt;uwe=lWt;dwe=cWt;dWt=uWt;pWt=fWt;gWt=mWt,eJe=Object.freeze({character:"'",codePoint:39}),tJe=Object.freeze({character:'"',codePoint:34}),bWt=Object.freeze({preferred:eJe,alternate:tJe}),AWt=Object.freeze({preferred:tJe,alternate:eJe});wWt=yWt;CWt=xWt;hwe=_k(ZKe);nJe=_k(LKe,0),oJe={parse:_k(ZHt),formatAST:_k($Ht),formatDoc:_k(eWt),printToDoc:_k(tWt),printDocToString:_k(iWt)}});var PJe={};ad(PJe,{default:()=>mJe,languages:()=>CJe,options:()=>_Je,parsers:()=>ywe,printers:()=>OJe});function Vh(i){return X6(i),{type:OWt,contents:i}}function eg(i,e={}){return X6(i),bJe(e.expandedStates,!0),{type:PWt,id:e.id,contents:i,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Yv(i,e="",t={}){return X6(i),e!==""&&X6(e),{type:BWt,breakContents:i,flatContents:e,groupId:t.groupId}}function Bu(i,e){X6(i),bJe(e);let t=[];for(let n=0;n{if(t===!1)return!1;let o=!!n?.backwards,{length:r}=e,s=t;for(;s>=0&&s!(c.leading||c.trailing||c.marker!==o||!r(c))));if(s.size===0)return"";let a=i.map(({node:c})=>s.has(c)?YWt(i,e):"","comments").filter(Boolean),l=Bu(Ul,a);return n?Vh([Ul,l]):l}function KWt(i){return Array.isArray(i)&&i.length>0}function J6(i){if(Y6!==null&&typeof Y6.property){let e=Y6;return Y6=J6.prototype=null,e}return Y6=J6.prototype=i??Object.create(null),new J6}function $Wt(i){return J6(i)}function eUt(i,e="type"){$Wt(i);function t(n){let o=n[e],r=i[o];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:n});return r}return t}function xJe(i,e){i.kind==="StringValue"&&i.block&&!i.value.includes(` +`)&&(e.value=i.value.trim())}function dUt(i,e){if(e===!1)return!1;if(i.charAt(e)==="/"&&i.charAt(e+1)==="*"){for(let t=e+2;t{let s=t();return!o&&gUt(e.originalText,wJe(r))?[s,Ul]:s},n)}function aJe(i,e,t){let{node:n}=i;return Uf(n.arguments)?eg(["(",Vh([jl,Bu([Yv("",", "),jl],qv(i,e,t,"arguments"))]),jl,")"]):""}function kb(i,e,t){let{node:n}=i;if(!n.description)return"";let o=[t("description")];return n.kind==="InputValueDefinition"&&!n.description.block?o.push(ER):o.push(Ul),o}function $d(i,e){let{node:t}=i;if(!Uf(t.directives))return"";let n=Bu(ER,i.map(e,"directives"));return t.kind==="FragmentDefinition"||t.kind==="OperationDefinition"?eg([ER,n]):[" ",eg(Vh([jl,n]))]}function lJe(i,e){let{node:t}=i;return Uf(t.variableDefinitions)?eg(["(",Vh([jl,Bu([Yv("",", "),jl],i.map(e,"variableDefinitions"))]),jl,")"]):""}function bUt(i,e,t){let{node:n}=i;switch(n.kind){case"Document":return[...Bu(Ul,qv(i,e,t,"definitions")),Ul];case"OperationDefinition":{let o=e.originalText[yJe(n)]!=="{",r=!!n.name;return[kb(i,e,t),o?n.operation:"",o&&r?[" ",t("name")]:"",o&&!r&&Uf(n.variableDefinitions)?" ":"",lJe(i,t),$d(i,t),!o&&!r?"":" ",t("selectionSet")]}case"FragmentDefinition":return[kb(i,e,t),"fragment ",t("name"),lJe(i,t)," on ",t("typeCondition"),$d(i,t)," ",t("selectionSet")];case"SelectionSet":return["{",Vh([Ul,Bu(Ul,qv(i,e,t,"selections"))]),Ul,"}"];case"Field":return eg([n.alias?[t("alias"),": "]:"",t("name"),Uf(n.arguments)?eg(["(",Vh([jl,Bu([Yv("",", "),jl],qv(i,e,t,"arguments"))]),jl,")"]):"",$d(i,t),n.selectionSet?" ":"",t("selectionSet")]);case"Name":return n.value;case"StringValue":if(n.block){let o=gwe(0,n.value,'"""','\\"""').split(` +`);return o.length===1&&(o[0]=o[0].trim()),o.every(r=>r==="")&&(o.length=0),Bu(Ul,['"""',...o,'"""'])}return['"',gwe(0,gwe(0,n.value,/["\\]/g,"\\$&"),` +`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return n.value;case"BooleanValue":return n.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",t("name")];case"ListValue":{let o=!Uf(n.values);return eg(["[",sJe(i,e,{indent:!0}),o?"":Vh([jl,Bu([Yv("",", "),jl],i.map(t,"values"))]),jl,"]"])}case"ObjectValue":{let o=!Uf(n.fields),r=e.bracketSpacing&&!o?" ":"";return eg(["{",r,sJe(i,e,{indent:!0}),o?"":[Vh([jl,Bu([Yv("",", "),jl],i.map(t,"fields"))])],jl,Yv("",r),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[t("name"),": ",t("value")];case"Directive":return["@",t("name"),aJe(i,e,t)];case"NamedType":return t("name");case"VariableDefinition":return[kb(i,e,t),t("variable"),": ",t("type"),n.defaultValue?[" = ",t("defaultValue")]:"",$d(i,t)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:o}=n,r=[];return o.endsWith("TypeDefinition")?r.push(kb(i,e,t)):r.push("extend "),o.startsWith("ObjectType")?r.push("type"):o.startsWith("InputObjectType")?r.push("input"):r.push("interface"),r.push(" ",t("name")),!o.startsWith("InputObjectType")&&Uf(n.interfaces)&&r.push(" implements ",Vh([eg([Bu([" &",ER],i.map(t,"interfaces"))])])),r.push($d(i,t)),Uf(n.fields)&&r.push([" {",Vh([Ul,Bu(Ul,qv(i,e,t,"fields"))]),Ul,"}"]),r}case"FieldDefinition":return[kb(i,e,t),t("name"),Uf(n.arguments)?eg(["(",Vh([jl,Bu([Yv("",", "),jl],qv(i,e,t,"arguments"))]),jl,")"]):"",": ",t("type"),$d(i,t)];case"DirectiveDefinition":return[kb(i,e,t),"directive ","@",t("name"),Uf(n.arguments)?eg(["(",Vh([jl,Bu([Yv("",", "),jl],qv(i,e,t,"arguments"))]),jl,")"]):"",$d(i,t),n.repeatable?" repeatable":""," on ",...Bu(" | ",i.map(t,"locations"))];case"DirectiveExtension":return["extend directive @",t("name"),$d(i,t)];case"EnumTypeExtension":case"EnumTypeDefinition":return[kb(i,e,t),n.kind==="EnumTypeExtension"?"extend ":"","enum ",t("name"),$d(i,t),Uf(n.values)?[" {",Vh([Ul,Bu(Ul,qv(i,e,t,"values"))]),Ul,"}"]:""];case"EnumValueDefinition":return[kb(i,e,t),t("name"),$d(i,t)];case"InputValueDefinition":return[kb(i,e,t),t("name"),": ",t("type"),n.defaultValue?[" = ",t("defaultValue")]:"",$d(i,t)];case"SchemaExtension":return["extend schema",$d(i,t),...Uf(n.operationTypes)?[" {",Vh([Ul,Bu(Ul,qv(i,e,t,"operationTypes"))]),Ul,"}"]:[]];case"SchemaDefinition":return[kb(i,e,t),"schema",$d(i,t)," {",Uf(n.operationTypes)?Vh([Ul,Bu(Ul,qv(i,e,t,"operationTypes"))]):"",Ul,"}"];case"OperationTypeDefinition":return[n.operation,": ",t("type")];case"FragmentSpread":return["...",t("name"),aJe(i,e,t),$d(i,t)];case"InlineFragment":return["...",n.typeCondition?[" on ",t("typeCondition")]:"",$d(i,t)," ",t("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return eg([kb(i,e,t),eg([n.kind==="UnionTypeExtension"?"extend ":"","union ",t("name"),$d(i,t),Uf(n.types)?[" =",Yv(""," "),Vh([Yv([ER,"| "]),Bu([ER,"| "],i.map(t,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[kb(i,e,t),n.kind==="ScalarTypeExtension"?"extend ":"","scalar ",t("name"),$d(i,t)];case"NonNullType":return[t("type"),"!"];case"ListType":return["[",t("type"),"]"];default:throw new XWt(n,"Graphql","kind")}}function AUt(i){return i.kind!=="Comment"}function vUt({node:i}){if(i.kind==="Comment")return"#"+i.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(i))}function yUt(i){let{node:e}=i;return e?.comments?.some(t=>t.value.trim()==="prettier-ignore")}function SUt(i,e){return i?.__kind===e}function DUt(i){return typeof i=="object"&&i!==null}function TUt(i,e){if(!i)throw new Error(e??"Unexpected invariant triggered.")}function bwe(i,e){let t=0,n=1;for(let o of i.body.matchAll(kUt)){if(typeof o.index!="number"&&TUt(!1),o.index>=e)break;t=o.index+o[0].length,n+=1}return{line:n,column:e+1-t}}function IUt(i){return SJe(i.source,bwe(i.source,i.start))}function SJe(i,e){let t=i.locationOffset.column-1,n="".padStart(t)+i.body,o=e.line-1,r=i.locationOffset.line-1,s=e.line+r,a=e.line===1?t:0,l=e.column+a,c=`${i.name}:${s}:${l} +`,u=n.split(/\r\n|[\n\r]/g),d=u[o];if(d.length>120){let h=Math.floor(l/80),f=l%80,p=[];for(let g=0;g["|",g]),["|","^".padStart(f)],["|",p[h+1]]])}return c+cJe([[`${s-1} |`,u[o-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,u[o+1]]])}function cJe(i){let e=i.filter(([n,o])=>o!==void 0),t=Math.max(...e.map(([n])=>n.length));return e.map(([n,o])=>n.padStart(t)+(o?" "+o:"")).join(` +`)}function uJe(i){return i===void 0||i.length===0?void 0:i}function dJe(i,e){if(!i)throw new Error(e)}function Ijt(i){return i===9||i===32}function DR(i){return i>=48&&i<=57}function kJe(i){return i>=97&&i<=122||i>=65&&i<=90}function IJe(i){return kJe(i)||i===95}function Ljt(i){return kJe(i)||DR(i)||i===95}function Njt(i){let e=Number.MAX_SAFE_INTEGER,t=null,n=-1;for(let o=0;or===0?o:o.slice(e)).slice(t??0,n+1)}function Mjt(i){let e=0;for(;e=0&&i<=55295||i>=57344&&i<=1114111}function uX(i,e){return LJe(i.charCodeAt(e))&&NJe(i.charCodeAt(e+1))}function LJe(i){return i>=55296&&i<=56319}function NJe(i){return i>=56320&&i<=57343}function kk(i,e){let t=i.source.body.codePointAt(e);if(t===void 0)return ct.EOF;if(t>=32&&t<=126){let n=String.fromCodePoint(t);return n==='"'?`'"'`:`"${n}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function Yc(i,e,t,n,o){let r=i.line,s=1+t-i.lineStart;return new TJe(e,t,n,r,s,o)}function Vjt(i,e){let t=i.source.body,n=t.length,o=e;for(;o=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function Gjt(i,e){let t=i.source.body;switch(t.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw bc(i.source,e,`Invalid character escape sequence: "${t.slice(e,e+2)}".`)}function qjt(i,e){let t=i.source.body,n=t.length,o=i.lineStart,r=e+3,s=r,a="",l=[];for(;rpJe(i,e),{source:i}):pJe(i,e)}function pJe(i,e){let t=new Xjt(i,e),n=t.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:t.tokenCount}),n}function aX(i){let e=i.value;return FJe(i.kind)+(e!=null?` "${e}"`:"")}function FJe(i){return zjt(i)?`"${i}"`:i}function Zjt(i,e){let t=new SyntaxError(i+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(t,e)}function eQt(i){let e=[],{startToken:t,endToken:n}=i.loc;for(let o=t;o!==n;o=o.next)o.kind==="Comment"&&e.push({...o,loc:{start:o.start,end:o.end}});return e}function iQt(i){if(!(i instanceof EJe))return i;let{message:e,locations:[t]}=i;return $jt(e,{loc:{start:t},cause:i})}function nQt(i){let e;try{e=Jjt(i,tQt)}catch(t){throw iQt(t)}return e.comments=eQt(e),e}var LWt,Awe,mJe,NWt,MWt,RWt,gwe,FWt,gJe,OWt,PWt,BWt,vwe,zWt,X6,bJe,VWt,ER,jl,HWt,Ul,OMi,AJe,WWt,UWt,rJe,vJe,GWt,qWt,Uf,JWt,XWt,Y6,ZWt,tUt,zh,iUt,nUt,oUt,yJe,wJe,rUt,sUt,aUt,lUt,cUt,uUt,hUt,pUt,gUt,wUt,xUt,CJe,CUt,_Ut,_Je,ywe,EUt,kUt,EJe,LUt,NUt,MUt,TJe,sX,$i,RUt,FUt,OUt,PUt,BUt,zUt,VUt,HUt,WUt,UUt,jUt,QUt,GUt,qUt,YUt,KUt,JUt,XUt,ZUt,$Ut,ejt,tjt,ijt,njt,ojt,rjt,sjt,ajt,ljt,cjt,ujt,djt,hjt,fjt,pjt,mjt,gjt,bjt,Ajt,vjt,yjt,wjt,xjt,Cjt,_jt,Sjt,Ejt,Djt,Tjt,kjt,Rjt,Ik,hJe,PMi,BMi,zMi,VMi,HMi,WMi,Ojt,ct,Bjt,MJe,RJe,Xjt,$jt,tQt,oQt,OJe,BJe=D(()=>{LWt=Object.defineProperty,Awe=(i,e)=>{for(var t in e)LWt(i,t,{get:e[t],enumerable:!0})},mJe={};Awe(mJe,{languages:()=>CJe,options:()=>_Je,parsers:()=>ywe,printers:()=>OJe});NWt=(i,e)=>(t,n,...o)=>t|1&&n==null?void 0:(e.call(n)??n[i]).apply(n,o),MWt=String.prototype.replaceAll??function(i,e){return i.global?this.replace(i,e):this.split(i).join(e)},RWt=NWt("replaceAll",function(){if(typeof this=="string")return MWt}),gwe=RWt,FWt=()=>{},gJe=FWt,OWt="indent",PWt="group",BWt="if-break",vwe="line",zWt="break-parent",X6=gJe,bJe=gJe;VWt={type:zWt};ER={type:vwe},jl={type:vwe,soft:!0},HWt={type:vwe,hard:!0},Ul=[HWt,VWt];OMi=cX(/\s/),AJe=cX(" "),WWt=cX(",; "),UWt=cX(/[^\n\r]/),rJe=i=>i===` +`||i==="\r"||i==="\u2028"||i==="\u2029";vJe=jWt;GWt=QWt,qWt=()=>!0;Uf=KWt,JWt=class extends Error{name="UnexpectedNodeError";constructor(i,e,t="type"){super(`Unexpected ${e} node ${t}: ${JSON.stringify(i[t])}.`),this.node=i}},XWt=JWt,Y6=null;ZWt=10;for(let i=0;i<=ZWt;i++)J6();tUt=eUt,zh=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],iUt={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:zh[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:zh[1],FragmentArgument:zh[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:zh[1],Directive:["name","arguments"],NamedType:zh[0],ListType:zh[2],NonNullType:zh[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:zh[2],ScalarTypeDefinition:zh[3],ObjectTypeDefinition:zh[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:zh[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:zh[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:zh[5],ScalarTypeExtension:zh[5],ObjectTypeExtension:zh[6],InterfaceTypeExtension:zh[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},nUt=tUt(iUt,"kind"),oUt=nUt,yJe=i=>i.loc.start,wJe=i=>i.loc.end;xJe.ignoredProperties=new Set(["loc","comments"]);rUt="format",sUt=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,aUt=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,lUt=i=>aUt.test(i),cUt=i=>sUt.test(i),uUt=i=>`# @${rUt} + +${i}`;hUt=dUt;pUt=fUt;gUt=mUt;wUt={print:bUt,massageAstNode:xJe,hasPrettierIgnore:yUt,insertPragma:uUt,printComment:vUt,canAttachComment:AUt,getVisitorKeys:oUt},xUt=wUt,CJe=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],CUt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},_Ut={bracketSpacing:CUt.bracketSpacing},_Je=_Ut,ywe={};Awe(ywe,{graphql:()=>oQt});EUt=SUt;kUt=/\r\n|[\n\r]/g;EJe=class DJe extends Error{constructor(e,t={}){let{nodes:n,source:o,positions:r,path:s,originalError:a,cause:l,extensions:c}=t,u="cause"in t,d=u?l:a,h=u||a!=null?{cause:d}:void 0;super(e,h),this.name="GraphQLError",this.path=s??void 0;let f=a??(l instanceof Error?l:void 0);this.originalError=f,this.nodes=uJe(Array.isArray(n)?n:n?[n]:void 0);let p=uJe(this.nodes?.map(A=>A.loc).filter(A=>A!=null));this.source=o??p?.[0]?.source,this.positions=r??p?.map(A=>A.start),this.locations=r&&o?r.map(A=>bwe(o,A)):p?.map(A=>bwe(A.source,A.start));let g=DUt(f?.extensions)?f.extensions:void 0;this.extensions=c??g??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),a?.stack!=null?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,DJe):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+=` + +`+IUt(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+=` + +`+SJe(this.source,t);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};LUt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),NUt=LUt,MUt=class{constructor(i,e,t){this.start=i.start,this.end=e.end,this.startToken=i,this.endToken=e,this.source=t}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},TJe=class{constructor(i,e,t,n,o,r){this.kind=i,this.start=e,this.end=t,this.line=n,this.column=o,this.value=r,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},sX={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},$i={};Awe($i,{ARGUMENT:()=>VUt,ARGUMENT_COORDINATE:()=>Djt,BOOLEAN:()=>KUt,DIRECTIVE:()=>tjt,DIRECTIVE_ARGUMENT_COORDINATE:()=>kjt,DIRECTIVE_COORDINATE:()=>Tjt,DIRECTIVE_DEFINITION:()=>gjt,DIRECTIVE_EXTENSION:()=>Ajt,DOCUMENT:()=>FUt,ENUM:()=>XUt,ENUM_TYPE_DEFINITION:()=>fjt,ENUM_TYPE_EXTENSION:()=>Cjt,ENUM_VALUE_DEFINITION:()=>pjt,FIELD:()=>zUt,FIELD_DEFINITION:()=>cjt,FLOAT:()=>qUt,FRAGMENT_ARGUMENT:()=>HUt,FRAGMENT_DEFINITION:()=>jUt,FRAGMENT_SPREAD:()=>WUt,INLINE_FRAGMENT:()=>UUt,INPUT_OBJECT_TYPE_DEFINITION:()=>mjt,INPUT_OBJECT_TYPE_EXTENSION:()=>_jt,INPUT_VALUE_DEFINITION:()=>ujt,INT:()=>GUt,INTERFACE_TYPE_DEFINITION:()=>djt,INTERFACE_TYPE_EXTENSION:()=>wjt,LIST:()=>ZUt,LIST_TYPE:()=>njt,MEMBER_COORDINATE:()=>Ejt,NAME:()=>RUt,NAMED_TYPE:()=>ijt,NON_NULL_TYPE:()=>ojt,NULL:()=>JUt,OBJECT:()=>$Ut,OBJECT_FIELD:()=>ejt,OBJECT_TYPE_DEFINITION:()=>ljt,OBJECT_TYPE_EXTENSION:()=>yjt,OPERATION_DEFINITION:()=>OUt,OPERATION_TYPE_DEFINITION:()=>sjt,SCALAR_TYPE_DEFINITION:()=>ajt,SCALAR_TYPE_EXTENSION:()=>vjt,SCHEMA_DEFINITION:()=>rjt,SCHEMA_EXTENSION:()=>bjt,SELECTION_SET:()=>BUt,STRING:()=>YUt,TYPE_COORDINATE:()=>Sjt,UNION_TYPE_DEFINITION:()=>hjt,UNION_TYPE_EXTENSION:()=>xjt,VARIABLE:()=>QUt,VARIABLE_DEFINITION:()=>PUt});RUt="Name",FUt="Document",OUt="OperationDefinition",PUt="VariableDefinition",BUt="SelectionSet",zUt="Field",VUt="Argument",HUt="FragmentArgument",WUt="FragmentSpread",UUt="InlineFragment",jUt="FragmentDefinition",QUt="Variable",GUt="IntValue",qUt="FloatValue",YUt="StringValue",KUt="BooleanValue",JUt="NullValue",XUt="EnumValue",ZUt="ListValue",$Ut="ObjectValue",ejt="ObjectField",tjt="Directive",ijt="NamedType",njt="ListType",ojt="NonNullType",rjt="SchemaDefinition",sjt="OperationTypeDefinition",ajt="ScalarTypeDefinition",ljt="ObjectTypeDefinition",cjt="FieldDefinition",ujt="InputValueDefinition",djt="InterfaceTypeDefinition",hjt="UnionTypeDefinition",fjt="EnumTypeDefinition",pjt="EnumValueDefinition",mjt="InputObjectTypeDefinition",gjt="DirectiveDefinition",bjt="SchemaExtension",Ajt="DirectiveExtension",vjt="ScalarTypeExtension",yjt="ObjectTypeExtension",wjt="InterfaceTypeExtension",xjt="UnionTypeExtension",Cjt="EnumTypeExtension",_jt="InputObjectTypeExtension",Sjt="TypeCoordinate",Ejt="MemberCoordinate",Djt="ArgumentCoordinate",Tjt="DirectiveCoordinate",kjt="DirectiveArgumentCoordinate";Rjt={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};Ik=Fjt(),hJe=Ik?.tracingChannel("graphql:parse"),PMi=Ik?.tracingChannel("graphql:validate"),BMi=Ik?.tracingChannel("graphql:execute"),zMi=Ik?.tracingChannel("graphql:execute:variableCoercion"),VMi=Ik?.tracingChannel("graphql:execute:rootSelectionSet"),HMi=Ik?.tracingChannel("graphql:subscribe"),WMi=Ik?.tracingChannel("graphql:resolve"),Ojt=["start","end","asyncStart","asyncEnd","error"];ct={SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},Bjt=class{constructor(i){let e=new TJe(ct.SOF,0,0,0,0);this.source=i,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let i=this.token;if(i.kind!==ct.EOF)do if(i.next)i=i.next;else{let e=Vjt(this,i.end);i.next=e,e.prev=i,i=e}while(i.kind===ct.COMMENT);return i}};MJe=Symbol("Source"),RJe=class{constructor(i,e="GraphQL request",t={line:1,column:1}){this.__kind=MJe,this.body=i,this.name=e,this.locationOffset=t,this.locationOffset.line>0||dJe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||dJe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Xjt=class{constructor(i,e={}){let{lexer:t,...n}=e;if(t)this._lexer=t;else{let o=Kjt(i)?i:new RJe(i);this._lexer=new Bjt(o)}this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let i=this.expectToken(ct.NAME);return this.node(i,{kind:$i.NAME,value:i.value})}parseDocument(){return this.node(this._lexer.token,{kind:$i.DOCUMENT,definitions:this.many(ct.SOF,this.parseDefinition,ct.EOF)})}parseDefinition(){if(this.peek(ct.BRACE_L))return this.parseOperationDefinition();let i=this.peekDescription(),e=i?this._lexer.lookahead():this._lexer.token;if(i&&e.kind===ct.BRACE_L)throw bc(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(e.kind===ct.NAME){switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(i)throw bc(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(e.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(e)}parseOperationDefinition(){let i=this._lexer.token;if(this.peek(ct.BRACE_L))return this.node(i,{kind:$i.OPERATION_DEFINITION,operation:sX.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let e=this.parseDescription(),t=this.parseOperationType(),n;return this.peek(ct.NAME)&&(n=this.parseName()),this.node(i,{kind:$i.OPERATION_DEFINITION,operation:t,description:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let i=this.expectToken(ct.NAME);switch(i.value){case"query":return sX.QUERY;case"mutation":return sX.MUTATION;case"subscription":return sX.SUBSCRIPTION}throw this.unexpected(i)}parseVariableDefinitions(){return this.optionalMany(ct.PAREN_L,this.parseVariableDefinition,ct.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:$i.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(ct.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ct.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let i=this._lexer.token;return this.expectToken(ct.DOLLAR),this.node(i,{kind:$i.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:$i.SELECTION_SET,selections:this.many(ct.BRACE_L,this.parseSelection,ct.BRACE_R)})}parseSelection(){return this.peek(ct.SPREAD)?this.parseFragment():this.parseField()}parseField(){let i=this._lexer.token,e=this.parseName(),t,n;return this.expectOptionalToken(ct.COLON)?(t=e,n=this.parseName()):n=e,this.node(i,{kind:$i.FIELD,alias:t,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ct.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(i){let e=i?this.parseConstArgument:this.parseArgument;return this.optionalMany(ct.PAREN_L,e,ct.PAREN_R)}parseFragmentArguments(){let i=this.parseFragmentArgument;return this.optionalMany(ct.PAREN_L,i,ct.PAREN_R)}parseArgument(i=!1){let e=this._lexer.token,t=this.parseName();return this.expectToken(ct.COLON),this.node(e,{kind:$i.ARGUMENT,name:t,value:this.parseValueLiteral(i)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let i=this._lexer.token,e=this.parseName();return this.expectToken(ct.COLON),this.node(i,{kind:$i.FRAGMENT_ARGUMENT,name:e,value:this.parseValueLiteral(!1)})}parseFragment(){let i=this._lexer.token;this.expectToken(ct.SPREAD);let e=this.expectOptionalKeyword("on");if(!e&&this.peek(ct.NAME)){let t=this.parseFragmentName();return this.peek(ct.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(i,{kind:$i.FRAGMENT_SPREAD,name:t,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(i,{kind:$i.FRAGMENT_SPREAD,name:t,directives:this.parseDirectives(!1)})}return this.node(i,{kind:$i.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let i=this._lexer.token,e=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(i,{kind:$i.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(i,{kind:$i.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(i){let e=this._lexer.token;switch(e.kind){case ct.BRACKET_L:return this.parseList(i);case ct.BRACE_L:return this.parseObject(i);case ct.INT:return this.advanceLexer(),this.node(e,{kind:$i.INT,value:e.value});case ct.FLOAT:return this.advanceLexer(),this.node(e,{kind:$i.FLOAT,value:e.value});case ct.STRING:case ct.BLOCK_STRING:return this.parseStringLiteral();case ct.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:$i.BOOLEAN,value:!0});case"false":return this.node(e,{kind:$i.BOOLEAN,value:!1});case"null":return this.node(e,{kind:$i.NULL});default:return this.node(e,{kind:$i.ENUM,value:e.value})}case ct.DOLLAR:if(i)if(this.expectToken(ct.DOLLAR),this._lexer.token.kind===ct.NAME){let t=this._lexer.token.value;throw bc(this._lexer.source,e.start,`Unexpected variable "$${t}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let i=this._lexer.token;return this.advanceLexer(),this.node(i,{kind:$i.STRING,value:i.value,block:i.kind===ct.BLOCK_STRING})}parseList(i){let e=()=>this.parseValueLiteral(i);return this.node(this._lexer.token,{kind:$i.LIST,values:this.any(ct.BRACKET_L,e,ct.BRACKET_R)})}parseObject(i){let e=()=>this.parseObjectField(i);return this.node(this._lexer.token,{kind:$i.OBJECT,fields:this.any(ct.BRACE_L,e,ct.BRACE_R)})}parseObjectField(i){let e=this._lexer.token,t=this.parseName();return this.expectToken(ct.COLON),this.node(e,{kind:$i.OBJECT_FIELD,name:t,value:this.parseValueLiteral(i)})}parseDirectives(i){let e=[];for(;this.peek(ct.AT);)e.push(this.parseDirective(i));if(e.length)return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(i){let e=this._lexer.token;return this.expectToken(ct.AT),this.node(e,{kind:$i.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(i)})}parseTypeReference(){let i=this._lexer.token,e;if(this.expectOptionalToken(ct.BRACKET_L)){let t=this.parseTypeReference();this.expectToken(ct.BRACKET_R),e=this.node(i,{kind:$i.LIST_TYPE,type:t})}else e=this.parseNamedType();return this.expectOptionalToken(ct.BANG)?this.node(i,{kind:$i.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:$i.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ct.STRING)||this.peek(ct.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.many(ct.BRACE_L,this.parseOperationTypeDefinition,ct.BRACE_R);return this.node(i,{kind:$i.SCHEMA_DEFINITION,description:e,directives:t,operationTypes:n})}parseOperationTypeDefinition(){let i=this._lexer.token,e=this.parseOperationType();this.expectToken(ct.COLON);let t=this.parseNamedType();return this.node(i,{kind:$i.OPERATION_TYPE_DEFINITION,operation:e,type:t})}parseScalarTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();return this.node(i,{kind:$i.SCALAR_TYPE_DEFINITION,description:e,name:t,directives:n})}parseObjectTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),r=this.parseFieldsDefinition();return this.node(i,{kind:$i.OBJECT_TYPE_DEFINITION,description:e,name:t,interfaces:n,directives:o,fields:r})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ct.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(ct.BRACE_L,this.parseFieldDefinition,ct.BRACE_R)}parseFieldDefinition(){let i=this._lexer.token,e=this.parseDescription(),t=this.parseName(),n=this.parseArgumentDefs();this.expectToken(ct.COLON);let o=this.parseTypeReference(),r=this.parseConstDirectives();return this.node(i,{kind:$i.FIELD_DEFINITION,description:e,name:t,arguments:n,type:o,directives:r})}parseArgumentDefs(){return this.optionalMany(ct.PAREN_L,this.parseInputValueDef,ct.PAREN_R)}parseInputValueDef(){let i=this._lexer.token,e=this.parseDescription(),t=this.parseName();this.expectToken(ct.COLON);let n=this.parseTypeReference(),o;this.expectOptionalToken(ct.EQUALS)&&(o=this.parseConstValueLiteral());let r=this.parseConstDirectives();return this.node(i,{kind:$i.INPUT_VALUE_DEFINITION,description:e,name:t,type:n,defaultValue:o,directives:r})}parseInterfaceTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),r=this.parseFieldsDefinition();return this.node(i,{kind:$i.INTERFACE_TYPE_DEFINITION,description:e,name:t,interfaces:n,directives:o,fields:r})}parseUnionTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(i,{kind:$i.UNION_TYPE_DEFINITION,description:e,name:t,directives:n,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(ct.EQUALS)?this.delimitedMany(ct.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(i,{kind:$i.ENUM_TYPE_DEFINITION,description:e,name:t,directives:n,values:o})}parseEnumValuesDefinition(){return this.optionalMany(ct.BRACE_L,this.parseEnumValueDefinition,ct.BRACE_R)}parseEnumValueDefinition(){let i=this._lexer.token,e=this.parseDescription(),t=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(i,{kind:$i.ENUM_VALUE_DEFINITION,description:e,name:t,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw bc(this._lexer.source,this._lexer.token.start,`${aX(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(i,{kind:$i.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:t,directives:n,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(ct.BRACE_L,this.parseInputValueDef,ct.BRACE_R)}parseTypeSystemExtension(){let i=this._lexer.lookahead();if(i.kind===ct.NAME)switch(i.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(i)}parseSchemaExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),t=this.optionalMany(ct.BRACE_L,this.parseOperationTypeDefinition,ct.BRACE_R);if(e===void 0&&t===void 0)throw this.unexpected();return this.node(i,{kind:$i.SCHEMA_EXTENSION,directives:e,operationTypes:t})}parseScalarTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),t=this.parseConstDirectives();if(t===void 0)throw this.unexpected();return this.node(i,{kind:$i.SCALAR_TYPE_EXTENSION,name:e,directives:t})}parseObjectTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),t=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(t===void 0&&n===void 0&&o===void 0)throw this.unexpected();return this.node(i,{kind:$i.OBJECT_TYPE_EXTENSION,name:e,interfaces:t,directives:n,fields:o})}parseInterfaceTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),t=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(t===void 0&&n===void 0&&o===void 0)throw this.unexpected();return this.node(i,{kind:$i.INTERFACE_TYPE_EXTENSION,name:e,interfaces:t,directives:n,fields:o})}parseUnionTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),t=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(t===void 0&&n===void 0)throw this.unexpected();return this.node(i,{kind:$i.UNION_TYPE_EXTENSION,name:e,directives:t,types:n})}parseEnumTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),t=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(t===void 0&&n===void 0)throw this.unexpected();return this.node(i,{kind:$i.ENUM_TYPE_EXTENSION,name:e,directives:t,values:n})}parseInputObjectTypeExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),t=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(t===void 0&&n===void 0)throw this.unexpected();return this.node(i,{kind:$i.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:t,fields:n})}parseDirectiveExtension(){let i=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(ct.AT);let e=this.parseName(),t=this.parseConstDirectives();if(t===void 0)throw this.unexpected();return this.node(i,{kind:$i.DIRECTIVE_EXTENSION,name:e,directives:t})}parseDirectiveDefinition(){let i=this._lexer.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ct.AT);let t=this.parseName(),n=this.parseArgumentDefs(),o=this.parseConstDirectives(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(i,{kind:$i.DIRECTIVE_DEFINITION,description:e,name:t,arguments:n,directives:o,repeatable:r,locations:s})}parseDirectiveLocations(){return this.delimitedMany(ct.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let i=this._lexer.token,e=this.parseName();if(NUt(Rjt,e.value))return e;throw this.unexpected(i)}parseSchemaCoordinate(){let i=this._lexer.token,e=this.expectOptionalToken(ct.AT),t=this.parseName(),n;!e&&this.expectOptionalToken(ct.DOT)&&(n=this.parseName());let o;return(e||n)&&this.expectOptionalToken(ct.PAREN_L)&&(o=this.parseName(),this.expectToken(ct.COLON),this.expectToken(ct.PAREN_R)),e?o?this.node(i,{kind:$i.DIRECTIVE_ARGUMENT_COORDINATE,name:t,argumentName:o}):this.node(i,{kind:$i.DIRECTIVE_COORDINATE,name:t}):n?o?this.node(i,{kind:$i.ARGUMENT_COORDINATE,name:t,fieldName:n,argumentName:o}):this.node(i,{kind:$i.MEMBER_COORDINATE,name:t,memberName:n}):this.node(i,{kind:$i.TYPE_COORDINATE,name:t})}node(i,e){return this._options.noLocation!==!0&&(e.loc=new MUt(i,this._lexer.lastToken,this._lexer.source)),e}peek(i){return this._lexer.token.kind===i}expectToken(i){let e=this._lexer.token;if(e.kind===i)return this.advanceLexer(),e;throw bc(this._lexer.source,e.start,`Expected ${FJe(i)}, found ${aX(e)}.`)}expectOptionalToken(i){return this._lexer.token.kind===i?(this.advanceLexer(),!0):!1}expectKeyword(i){let e=this._lexer.token;if(e.kind===ct.NAME&&e.value===i)this.advanceLexer();else throw bc(this._lexer.source,e.start,`Expected "${i}", found ${aX(e)}.`)}expectOptionalKeyword(i){let e=this._lexer.token;return e.kind===ct.NAME&&e.value===i?(this.advanceLexer(),!0):!1}unexpected(i){let e=i??this._lexer.token;return bc(this._lexer.source,e.start,`Unexpected ${aX(e)}.`)}any(i,e,t){this.expectToken(i);let n=[];for(;!this.expectOptionalToken(t);)n.push(e.call(this));return n}optionalMany(i,e,t){if(this.expectOptionalToken(i)){let n=[];do n.push(e.call(this));while(!this.expectOptionalToken(t));return n}}many(i,e,t){this.expectToken(i);let n=[];do n.push(e.call(this));while(!this.expectOptionalToken(t));return n}delimitedMany(i,e){this.expectOptionalToken(i);let t=[];do t.push(e.call(this));while(this.expectOptionalToken(i));return t}advanceLexer(){let{maxTokens:i}=this._options,e=this._lexer.advance();if(e.kind!==ct.EOF&&(++this._tokenCounter,i!==void 0&&this._tokenCounter>i))throw bc(this._lexer.source,e.start,`Document contains more than ${i} tokens. Parsing aborted.`)}};$jt=Zjt;tQt={experimentalFragmentArguments:!0};oQt={parse:nQt,astFormat:"graphql",hasPragma:lUt,hasIgnorePragma:cUt,locStart:yJe,locEnd:wJe},OJe={graphql:xUt}});var HJe=la((VJe,wwe)=>{(function(i){function e(){var n=i();return n.default||n}if(typeof VJe=="object"&&typeof wwe=="object")wwe.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var i=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o=(P,K)=>{for(var oe in K)i(P,oe,{get:K[oe],enumerable:!0})},r=(P,K,oe,ye)=>{if(K&&typeof K=="object"||typeof K=="function")for(let he of t(K))!n.call(P,he)&&he!==oe&&i(P,he,{get:()=>K[he],enumerable:!(ye=e(K,he))||ye.enumerable});return P},s=P=>r(i({},"__esModule",{value:!0}),P),a={};o(a,{languages:()=>Ni,options:()=>le,parsers:()=>fe,printers:()=>wye});var l=(P,K)=>(oe,ye,...he)=>oe|1&&ye==null?void 0:(K.call(ye)??ye[P]).apply(ye,he),c=String.prototype.replaceAll??function(P,K){return P.global?this.replace(P,K):this.split(P).join(K)},u=l("replaceAll",function(){if(typeof this=="string")return c}),d=u,h=()=>{},f=h,p="indent",g="group",A="if-break",v="line",w="break-parent",C=f,_=f;function E(P){return C(P),{type:p,contents:P}}var I={type:w};function T(P,K={}){return C(P),_(K.expandedStates,!0),{type:g,id:K.id,contents:P,break:!!K.shouldBreak,expandedStates:K.expandedStates}}function N(P,K="",oe={}){return C(P),K!==""&&C(K),{type:A,breakContents:P,flatContents:K,groupId:oe.groupId}}function L(P,K){C(P),_(K);let oe=[];for(let ye=0;ye{if(oe===!1)return!1;let he=!!ye?.backwards,{length:st}=K,rn=oe;for(;rn>=0&&rnP===` +`||P==="\r"||P==="\u2028"||P==="\u2029";function re(P,K,oe){if(K===!1)return!1;let ye=!!oe?.backwards,he=P.charAt(K);if(ye){if(P.charAt(K-1)==="\r"&&he===` +`)return K-2;if($(he))return K-1}else{if(he==="\r"&&P.charAt(K+1)===` +`)return K+2;if($(he))return K+1}return K}var ue=re;function Ie(P,K,oe={}){let ye=ee(P,oe.backwards?K-1:K,oe),he=ue(P,ye,oe);return ye!==he}var nt=Ie,mt=()=>!0;function xt(P,K){let oe=P.node;return oe.printed=!0,K.printer.printComment(P,K)}function wt(P,K,oe={}){let{indent:ye=!1,marker:he,filter:st=mt}=oe,rn=new Set(P.node?.comments?.filter(Qc=>!(Qc.leading||Qc.trailing||Qc.marker!==he||!st(Qc))));if(rn.size===0)return"";let cs=P.map(({node:Qc})=>rn.has(Qc)?xt(P,K):"","comments").filter(Boolean),hc=L(Z,cs);return ye?E([Z,hc]):hc}function Ht(P){return Array.isArray(P)&&P.length>0}var Fe=Ht,zt=class extends Error{name="UnexpectedNodeError";constructor(P,K,oe="type"){super(`Unexpected ${K} node ${oe}: ${JSON.stringify(P[oe])}.`),this.node=P}},Fi=zt,Kt=null;function Li(P){if(Kt!==null&&typeof Kt.property){let K=Kt;return Kt=Li.prototype=null,K}return Kt=Li.prototype=P??Object.create(null),new Li}var Bn=10;for(let P=0;P<=Bn;P++)Li();function zn(P){return Li(P)}function yo(P,K="type"){zn(P);function oe(ye){let he=ye[K],st=P[he];if(!Array.isArray(st))throw Object.assign(new Error(`Missing visitor keys for '${he}'.`),{node:ye});return st}return oe}var Ei=yo,vt=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],ni={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:vt[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:vt[1],FragmentArgument:vt[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:vt[1],Directive:["name","arguments"],NamedType:vt[0],ListType:vt[2],NonNullType:vt[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:vt[2],ScalarTypeDefinition:vt[3],ObjectTypeDefinition:vt[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:vt[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:vt[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:vt[5],ScalarTypeExtension:vt[5],ObjectTypeExtension:vt[6],InterfaceTypeExtension:vt[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},mr=Ei(ni,"kind"),Wi=mr,xr=P=>P.loc.start,Do=P=>P.loc.end;function As(P,K){P.kind==="StringValue"&&P.block&&!P.value.includes(` +`)&&(K.value=P.value.trim())}As.ignoredProperties=new Set(["loc","comments"]);var ra="format",gr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,hl=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,Ro=P=>hl.test(P),vs=P=>gr.test(P),er=P=>`# @${ra} + +${P}`;function qa(P,K){if(K===!1)return!1;if(P.charAt(K)==="/"&&P.charAt(K+1)==="*"){for(let oe=K+2;oe{let rn=oe();return!he&&ls(K.originalText,Do(st))?[rn,Z]:rn},ye)}function sa(P,K,oe){let{node:ye}=P;return Fe(ye.arguments)?T(["(",E([z,L([N("",", "),z],Or(P,K,oe,"arguments"))]),z,")"]):""}function Yi(P,K,oe){let{node:ye}=P;if(!ye.description)return"";let he=[oe("description")];return ye.kind==="InputValueDefinition"&&!ye.description.block?he.push(B):he.push(Z),he}function ir(P,K){let{node:oe}=P;if(!Fe(oe.directives))return"";let ye=L(B,P.map(K,"directives"));return oe.kind==="FragmentDefinition"||oe.kind==="OperationDefinition"?T([B,ye]):[" ",T(E([z,ye]))]}function rd(P,K){let{node:oe}=P;return Fe(oe.variableDefinitions)?T(["(",E([z,L([N("",", "),z],P.map(K,"variableDefinitions"))]),z,")"]):""}function _o(P,K,oe){let{node:ye}=P;switch(ye.kind){case"Document":return[...L(Z,Or(P,K,oe,"definitions")),Z];case"OperationDefinition":{let he=K.originalText[xr(ye)]!=="{",st=!!ye.name;return[Yi(P,K,oe),he?ye.operation:"",he&&st?[" ",oe("name")]:"",he&&!st&&Fe(ye.variableDefinitions)?" ":"",rd(P,oe),ir(P,oe),!he&&!st?"":" ",oe("selectionSet")]}case"FragmentDefinition":return[Yi(P,K,oe),"fragment ",oe("name"),rd(P,oe)," on ",oe("typeCondition"),ir(P,oe)," ",oe("selectionSet")];case"SelectionSet":return["{",E([Z,L(Z,Or(P,K,oe,"selections"))]),Z,"}"];case"Field":return T([ye.alias?[oe("alias"),": "]:"",oe("name"),Fe(ye.arguments)?T(["(",E([z,L([N("",", "),z],Or(P,K,oe,"arguments"))]),z,")"]):"",ir(P,oe),ye.selectionSet?" ":"",oe("selectionSet")]);case"Name":return ye.value;case"StringValue":if(ye.block){let he=d(0,ye.value,'"""','\\"""').split(` +`);return he.length===1&&(he[0]=he[0].trim()),he.every(st=>st==="")&&(he.length=0),L(Z,['"""',...he,'"""'])}return['"',d(0,d(0,ye.value,/["\\]/g,"\\$&"),` +`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return ye.value;case"BooleanValue":return ye.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",oe("name")];case"ListValue":{let he=!Fe(ye.values);return T(["[",wt(P,K,{indent:!0}),he?"":E([z,L([N("",", "),z],P.map(oe,"values"))]),z,"]"])}case"ObjectValue":{let he=!Fe(ye.fields),st=K.bracketSpacing&&!he?" ":"";return T(["{",st,wt(P,K,{indent:!0}),he?"":[E([z,L([N("",", "),z],P.map(oe,"fields"))])],z,N("",st),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[oe("name"),": ",oe("value")];case"Directive":return["@",oe("name"),sa(P,K,oe)];case"NamedType":return oe("name");case"VariableDefinition":return[Yi(P,K,oe),oe("variable"),": ",oe("type"),ye.defaultValue?[" = ",oe("defaultValue")]:"",ir(P,oe)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:he}=ye,st=[];return he.endsWith("TypeDefinition")?st.push(Yi(P,K,oe)):st.push("extend "),he.startsWith("ObjectType")?st.push("type"):he.startsWith("InputObjectType")?st.push("input"):st.push("interface"),st.push(" ",oe("name")),!he.startsWith("InputObjectType")&&Fe(ye.interfaces)&&st.push(" implements ",E([T([L([" &",B],P.map(oe,"interfaces"))])])),st.push(ir(P,oe)),Fe(ye.fields)&&st.push([" {",E([Z,L(Z,Or(P,K,oe,"fields"))]),Z,"}"]),st}case"FieldDefinition":return[Yi(P,K,oe),oe("name"),Fe(ye.arguments)?T(["(",E([z,L([N("",", "),z],Or(P,K,oe,"arguments"))]),z,")"]):"",": ",oe("type"),ir(P,oe)];case"DirectiveDefinition":return[Yi(P,K,oe),"directive ","@",oe("name"),Fe(ye.arguments)?T(["(",E([z,L([N("",", "),z],Or(P,K,oe,"arguments"))]),z,")"]):"",ir(P,oe),ye.repeatable?" repeatable":""," on ",...L(" | ",P.map(oe,"locations"))];case"DirectiveExtension":return["extend directive @",oe("name"),ir(P,oe)];case"EnumTypeExtension":case"EnumTypeDefinition":return[Yi(P,K,oe),ye.kind==="EnumTypeExtension"?"extend ":"","enum ",oe("name"),ir(P,oe),Fe(ye.values)?[" {",E([Z,L(Z,Or(P,K,oe,"values"))]),Z,"}"]:""];case"EnumValueDefinition":return[Yi(P,K,oe),oe("name"),ir(P,oe)];case"InputValueDefinition":return[Yi(P,K,oe),oe("name"),": ",oe("type"),ye.defaultValue?[" = ",oe("defaultValue")]:"",ir(P,oe)];case"SchemaExtension":return["extend schema",ir(P,oe),...Fe(ye.operationTypes)?[" {",E([Z,L(Z,Or(P,K,oe,"operationTypes"))]),Z,"}"]:[]];case"SchemaDefinition":return[Yi(P,K,oe),"schema",ir(P,oe)," {",Fe(ye.operationTypes)?E([Z,L(Z,Or(P,K,oe,"operationTypes"))]):"",Z,"}"];case"OperationTypeDefinition":return[ye.operation,": ",oe("type")];case"FragmentSpread":return["...",oe("name"),sa(P,K,oe),ir(P,oe)];case"InlineFragment":return["...",ye.typeCondition?[" on ",oe("typeCondition")]:"",ir(P,oe)," ",oe("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return T([Yi(P,K,oe),T([ye.kind==="UnionTypeExtension"?"extend ":"","union ",oe("name"),ir(P,oe),Fe(ye.types)?[" =",N(""," "),E([N([B,"| "]),L([B,"| "],P.map(oe,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[Yi(P,K,oe),ye.kind==="ScalarTypeExtension"?"extend ":"","scalar ",oe("name"),ir(P,oe)];case"NonNullType":return[oe("type"),"!"];case"ListType":return["[",oe("type"),"]"];default:throw new Fi(ye,"Graphql","kind")}}function Pr(P){return P.kind!=="Comment"}function Oh({node:P}){if(P.kind==="Comment")return"#"+P.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(P))}function vb(P){let{node:K}=P;return K?.comments?.some(oe=>oe.value.trim()==="prettier-ignore")}var Bf={print:_o,massageAstNode:As,hasPrettierIgnore:vb,insertPragma:er,printComment:Oh,canAttachComment:Pr,getVisitorKeys:Wi},Ph=Bf,Ni=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],te={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},ne={bracketSpacing:te.bracketSpacing},le=ne,fe={};o(fe,{graphql:()=>sK});function ve(P,K){return P?.__kind===K}var Ve=ve;function $e(P){return typeof P=="object"&&P!==null}function It(P,K){if(!P)throw new Error(K??"Unexpected invariant triggered.")}var qt=/\r\n|[\n\r]/g;function yi(P,K){let oe=0,ye=1;for(let he of P.body.matchAll(qt)){if(typeof he.index!="number"&&It(!1),he.index>=K)break;oe=he.index+he[0].length,ye+=1}return{line:ye,column:K+1-oe}}function pn(P){return Mn(P.source,yi(P.source,P.start))}function Mn(P,K){let oe=P.locationOffset.column-1,ye="".padStart(oe)+P.body,he=K.line-1,st=P.locationOffset.line-1,rn=K.line+st,cs=K.line===1?oe:0,hc=K.column+cs,Qc=`${P.name}:${rn}:${hc} +`,Ov=ye.split(/\r\n|[\n\r]/g),Ew=Ov[he];if(Ew.length>120){let nR=Math.floor(hc/80),hk=hc%80,Pv=[];for(let qm=0;qm["|",qm]),["|","^".padStart(hk)],["|",Pv[nR+1]]])}return Qc+br([[`${rn-1} |`,Ov[he-1]],[`${rn} |`,Ew],["|","^".padStart(hc)],[`${rn+1} |`,Ov[he+1]]])}function br(P){let K=P.filter(([ye,he])=>he!==void 0),oe=Math.max(...K.map(([ye])=>ye.length));return K.map(([ye,he])=>ye.padStart(oe)+(he?" "+he:"")).join(` +`)}var wo=class zJe extends Error{constructor(K,oe={}){let{nodes:ye,source:he,positions:st,path:rn,originalError:cs,cause:hc,extensions:Qc}=oe,Ov="cause"in oe,Ew=Ov?hc:cs,nR=Ov||cs!=null?{cause:Ew}:void 0;super(K,nR),this.name="GraphQLError",this.path=rn??void 0;let hk=cs??(hc instanceof Error?hc:void 0);this.originalError=hk,this.nodes=Ya(Array.isArray(ye)?ye:ye?[ye]:void 0);let Pv=Ya(this.nodes?.map(Op=>Op.loc).filter(Op=>Op!=null));this.source=he??Pv?.[0]?.source,this.positions=st??Pv?.map(Op=>Op.start),this.locations=st&&he?st.map(Op=>yi(he,Op)):Pv?.map(Op=>yi(Op.source,Op.start));let qm=$e(hk?.extensions)?hk.extensions:void 0;this.extensions=Qc??qm??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),cs?.stack!=null?Object.defineProperty(this,"stack",{value:cs.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,zJe):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let K=this.message;if(this.nodes)for(let oe of this.nodes)oe.loc&&(K+=` + +`+pn(oe.loc));else if(this.source&&this.locations)for(let oe of this.locations)K+=` + +`+Mn(this.source,oe);return K}toJSON(){let K={message:this.message};return this.locations!=null&&(K.locations=this.locations),this.path!=null&&(K.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(K.extensions=this.extensions),K}};function Ya(P){return P===void 0||P.length===0?void 0:P}var aa=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),sd=aa,di=class{constructor(P,K,oe){this.start=P.start,this.end=K.end,this.startToken=P,this.endToken=K,this.source=oe}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},_e=class{constructor(P,K,oe,ye,he,st){this.kind=P,this.start=K,this.end=oe,this.line=ye,this.column=he,this.value=st,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},_t={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},ot={};o(ot,{ARGUMENT:()=>jc,ARGUMENT_COORDINATE:()=>iye,BOOLEAN:()=>X0,DIRECTIVE:()=>Uve,DIRECTIVE_ARGUMENT_COORDINATE:()=>oye,DIRECTIVE_COORDINATE:()=>nye,DIRECTIVE_DEFINITION:()=>jY,DIRECTIVE_EXTENSION:()=>Jve,DOCUMENT:()=>js,ENUM:()=>O_,ENUM_TYPE_DEFINITION:()=>Kve,ENUM_TYPE_EXTENSION:()=>eye,ENUM_VALUE_DEFINITION:()=>K5,FIELD:()=>Fp,FIELD_DEFINITION:()=>HY,FLOAT:()=>Bve,FRAGMENT_ARGUMENT:()=>ZM,FRAGMENT_DEFINITION:()=>zY,FRAGMENT_SPREAD:()=>_w,INLINE_FRAGMENT:()=>F_,INPUT_OBJECT_TYPE_DEFINITION:()=>UY,INPUT_OBJECT_TYPE_EXTENSION:()=>tR,INPUT_VALUE_DEFINITION:()=>$M,INT:()=>Y5,INTERFACE_TYPE_DEFINITION:()=>WY,INTERFACE_TYPE_EXTENSION:()=>Zve,LIST:()=>Vve,LIST_TYPE:()=>jve,MEMBER_COORDINATE:()=>tye,NAME:()=>Pt,NAMED_TYPE:()=>VY,NON_NULL_TYPE:()=>rk,NULL:()=>Rv,OBJECT:()=>Hve,OBJECT_FIELD:()=>Wve,OBJECT_TYPE_DEFINITION:()=>qve,OBJECT_TYPE_EXTENSION:()=>eR,OPERATION_DEFINITION:()=>Qs,OPERATION_TYPE_DEFINITION:()=>Qve,SCALAR_TYPE_DEFINITION:()=>Gve,SCALAR_TYPE_EXTENSION:()=>Xve,SCHEMA_DEFINITION:()=>Fv,SCHEMA_EXTENSION:()=>sk,SELECTION_SET:()=>ks,STRING:()=>zve,TYPE_COORDINATE:()=>QY,UNION_TYPE_DEFINITION:()=>Yve,UNION_TYPE_EXTENSION:()=>$ve,VARIABLE:()=>q5,VARIABLE_DEFINITION:()=>no});var Pt="Name",js="Document",Qs="OperationDefinition",no="VariableDefinition",ks="SelectionSet",Fp="Field",jc="Argument",ZM="FragmentArgument",_w="FragmentSpread",F_="InlineFragment",zY="FragmentDefinition",q5="Variable",Y5="IntValue",Bve="FloatValue",zve="StringValue",X0="BooleanValue",Rv="NullValue",O_="EnumValue",Vve="ListValue",Hve="ObjectValue",Wve="ObjectField",Uve="Directive",VY="NamedType",jve="ListType",rk="NonNullType",Fv="SchemaDefinition",Qve="OperationTypeDefinition",Gve="ScalarTypeDefinition",qve="ObjectTypeDefinition",HY="FieldDefinition",$M="InputValueDefinition",WY="InterfaceTypeDefinition",Yve="UnionTypeDefinition",Kve="EnumTypeDefinition",K5="EnumValueDefinition",UY="InputObjectTypeDefinition",jY="DirectiveDefinition",sk="SchemaExtension",Jve="DirectiveExtension",Xve="ScalarTypeExtension",eR="ObjectTypeExtension",Zve="InterfaceTypeExtension",$ve="UnionTypeExtension",eye="EnumTypeExtension",tR="InputObjectTypeExtension",QY="TypeCoordinate",tye="MemberCoordinate",iye="ArgumentCoordinate",nye="DirectiveCoordinate",oye="DirectiveArgumentCoordinate";function J5(P,K){if(!P)throw new Error(K)}function rye(P){return P===9||P===32}function Z0(P){return P>=48&&P<=57}function GY(P){return P>=97&&P<=122||P>=65&&P<=90}function ak(P){return GY(P)||P===95}function lk(P){return GY(P)||Z0(P)||P===95}function qY(P){let K=Number.MAX_SAFE_INTEGER,oe=null,ye=-1;for(let he=0;hest===0?he:he.slice(K)).slice(oe??0,ye+1)}function sye(P){let K=0;for(;K",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},uye=class{constructor(P){let K=new _e(we.SOF,0,0,0,0);this.source=P,this.lastToken=K,this.token=K,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let P=this.token;if(P.kind!==we.EOF)do if(P.next)P=P.next;else{let K=dye(this,P.end);P.next=K,K.prev=P,P=K}while(P.kind===we.COMMENT);return P}};function ZY(P){return P===we.BANG||P===we.DOLLAR||P===we.AMP||P===we.PAREN_L||P===we.PAREN_R||P===we.DOT||P===we.SPREAD||P===we.COLON||P===we.EQUALS||P===we.AT||P===we.BRACKET_L||P===we.BRACKET_R||P===we.BRACE_L||P===we.PIPE||P===we.BRACE_R}function P_(P){return P>=0&&P<=55295||P>=57344&&P<=1114111}function B_(P,K){return $Y(P.charCodeAt(K))&&eK(P.charCodeAt(K+1))}function $Y(P){return P>=55296&&P<=56319}function eK(P){return P>=56320&&P<=57343}function Sw(P,K){let oe=P.source.body.codePointAt(K);if(oe===void 0)return we.EOF;if(oe>=32&&oe<=126){let ye=String.fromCodePoint(oe);return ye==='"'?`'"'`:`"${ye}"`}return"U+"+oe.toString(16).toUpperCase().padStart(4,"0")}function gl(P,K,oe,ye,he){let st=P.line,rn=1+oe-P.lineStart;return new _e(K,oe,ye,st,rn,he)}function dye(P,K){let oe=P.source.body,ye=oe.length,he=K;for(;he=48&&P<=57?P-48:P>=65&&P<=70?P-55:P>=97&&P<=102?P-87:-1}function nK(P,K){let oe=P.source.body;switch(oe.charCodeAt(K+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ml(P.source,K,`Invalid character escape sequence: "${oe.slice(K,K+2)}".`)}function mye(P,K){let oe=P.source.body,ye=oe.length,he=P.lineStart,st=K+3,rn=st,cs="",hc=[];for(;st0||J5(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||J5(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function gye(P){return Ve(P,$5,e6)}function mGe(P,K){return cye(YY)?YY.traceSync(()=>z_(P,K),{source:P}):z_(P,K)}function z_(P,K){let oe=new rK(P,K),ye=oe.parseDocument();return Object.defineProperty(ye,"tokenCount",{enumerable:!1,value:oe.tokenCount}),ye}var rK=class{constructor(P,K={}){let{lexer:oe,...ye}=K;if(oe)this._lexer=oe;else{let he=gye(P)?P:new e6(P);this._lexer=new uye(he)}this._options=ye,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let P=this.expectToken(we.NAME);return this.node(P,{kind:ot.NAME,value:P.value})}parseDocument(){return this.node(this._lexer.token,{kind:ot.DOCUMENT,definitions:this.many(we.SOF,this.parseDefinition,we.EOF)})}parseDefinition(){if(this.peek(we.BRACE_L))return this.parseOperationDefinition();let P=this.peekDescription(),K=P?this._lexer.lookahead():this._lexer.token;if(P&&K.kind===we.BRACE_L)throw ml(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(K.kind===we.NAME){switch(K.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(K.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(P)throw ml(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(K.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(K)}parseOperationDefinition(){let P=this._lexer.token;if(this.peek(we.BRACE_L))return this.node(P,{kind:ot.OPERATION_DEFINITION,operation:_t.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let K=this.parseDescription(),oe=this.parseOperationType(),ye;return this.peek(we.NAME)&&(ye=this.parseName()),this.node(P,{kind:ot.OPERATION_DEFINITION,operation:oe,description:K,name:ye,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let P=this.expectToken(we.NAME);switch(P.value){case"query":return _t.QUERY;case"mutation":return _t.MUTATION;case"subscription":return _t.SUBSCRIPTION}throw this.unexpected(P)}parseVariableDefinitions(){return this.optionalMany(we.PAREN_L,this.parseVariableDefinition,we.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ot.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(we.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(we.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let P=this._lexer.token;return this.expectToken(we.DOLLAR),this.node(P,{kind:ot.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ot.SELECTION_SET,selections:this.many(we.BRACE_L,this.parseSelection,we.BRACE_R)})}parseSelection(){return this.peek(we.SPREAD)?this.parseFragment():this.parseField()}parseField(){let P=this._lexer.token,K=this.parseName(),oe,ye;return this.expectOptionalToken(we.COLON)?(oe=K,ye=this.parseName()):ye=K,this.node(P,{kind:ot.FIELD,alias:oe,name:ye,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(we.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(P){let K=P?this.parseConstArgument:this.parseArgument;return this.optionalMany(we.PAREN_L,K,we.PAREN_R)}parseFragmentArguments(){let P=this.parseFragmentArgument;return this.optionalMany(we.PAREN_L,P,we.PAREN_R)}parseArgument(P=!1){let K=this._lexer.token,oe=this.parseName();return this.expectToken(we.COLON),this.node(K,{kind:ot.ARGUMENT,name:oe,value:this.parseValueLiteral(P)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let P=this._lexer.token,K=this.parseName();return this.expectToken(we.COLON),this.node(P,{kind:ot.FRAGMENT_ARGUMENT,name:K,value:this.parseValueLiteral(!1)})}parseFragment(){let P=this._lexer.token;this.expectToken(we.SPREAD);let K=this.expectOptionalKeyword("on");if(!K&&this.peek(we.NAME)){let oe=this.parseFragmentName();return this.peek(we.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(P,{kind:ot.FRAGMENT_SPREAD,name:oe,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(P,{kind:ot.FRAGMENT_SPREAD,name:oe,directives:this.parseDirectives(!1)})}return this.node(P,{kind:ot.INLINE_FRAGMENT,typeCondition:K?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let P=this._lexer.token,K=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(P,{kind:ot.FRAGMENT_DEFINITION,description:K,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(P,{kind:ot.FRAGMENT_DEFINITION,description:K,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(P){let K=this._lexer.token;switch(K.kind){case we.BRACKET_L:return this.parseList(P);case we.BRACE_L:return this.parseObject(P);case we.INT:return this.advanceLexer(),this.node(K,{kind:ot.INT,value:K.value});case we.FLOAT:return this.advanceLexer(),this.node(K,{kind:ot.FLOAT,value:K.value});case we.STRING:case we.BLOCK_STRING:return this.parseStringLiteral();case we.NAME:switch(this.advanceLexer(),K.value){case"true":return this.node(K,{kind:ot.BOOLEAN,value:!0});case"false":return this.node(K,{kind:ot.BOOLEAN,value:!1});case"null":return this.node(K,{kind:ot.NULL});default:return this.node(K,{kind:ot.ENUM,value:K.value})}case we.DOLLAR:if(P)if(this.expectToken(we.DOLLAR),this._lexer.token.kind===we.NAME){let oe=this._lexer.token.value;throw ml(this._lexer.source,K.start,`Unexpected variable "$${oe}" in constant value.`)}else throw this.unexpected(K);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let P=this._lexer.token;return this.advanceLexer(),this.node(P,{kind:ot.STRING,value:P.value,block:P.kind===we.BLOCK_STRING})}parseList(P){let K=()=>this.parseValueLiteral(P);return this.node(this._lexer.token,{kind:ot.LIST,values:this.any(we.BRACKET_L,K,we.BRACKET_R)})}parseObject(P){let K=()=>this.parseObjectField(P);return this.node(this._lexer.token,{kind:ot.OBJECT,fields:this.any(we.BRACE_L,K,we.BRACE_R)})}parseObjectField(P){let K=this._lexer.token,oe=this.parseName();return this.expectToken(we.COLON),this.node(K,{kind:ot.OBJECT_FIELD,name:oe,value:this.parseValueLiteral(P)})}parseDirectives(P){let K=[];for(;this.peek(we.AT);)K.push(this.parseDirective(P));if(K.length)return K}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(P){let K=this._lexer.token;return this.expectToken(we.AT),this.node(K,{kind:ot.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(P)})}parseTypeReference(){let P=this._lexer.token,K;if(this.expectOptionalToken(we.BRACKET_L)){let oe=this.parseTypeReference();this.expectToken(we.BRACKET_R),K=this.node(P,{kind:ot.LIST_TYPE,type:oe})}else K=this.parseNamedType();return this.expectOptionalToken(we.BANG)?this.node(P,{kind:ot.NON_NULL_TYPE,type:K}):K}parseNamedType(){return this.node(this._lexer.token,{kind:ot.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(we.STRING)||this.peek(we.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("schema");let oe=this.parseConstDirectives(),ye=this.many(we.BRACE_L,this.parseOperationTypeDefinition,we.BRACE_R);return this.node(P,{kind:ot.SCHEMA_DEFINITION,description:K,directives:oe,operationTypes:ye})}parseOperationTypeDefinition(){let P=this._lexer.token,K=this.parseOperationType();this.expectToken(we.COLON);let oe=this.parseNamedType();return this.node(P,{kind:ot.OPERATION_TYPE_DEFINITION,operation:K,type:oe})}parseScalarTypeDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("scalar");let oe=this.parseName(),ye=this.parseConstDirectives();return this.node(P,{kind:ot.SCALAR_TYPE_DEFINITION,description:K,name:oe,directives:ye})}parseObjectTypeDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("type");let oe=this.parseName(),ye=this.parseImplementsInterfaces(),he=this.parseConstDirectives(),st=this.parseFieldsDefinition();return this.node(P,{kind:ot.OBJECT_TYPE_DEFINITION,description:K,name:oe,interfaces:ye,directives:he,fields:st})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(we.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(we.BRACE_L,this.parseFieldDefinition,we.BRACE_R)}parseFieldDefinition(){let P=this._lexer.token,K=this.parseDescription(),oe=this.parseName(),ye=this.parseArgumentDefs();this.expectToken(we.COLON);let he=this.parseTypeReference(),st=this.parseConstDirectives();return this.node(P,{kind:ot.FIELD_DEFINITION,description:K,name:oe,arguments:ye,type:he,directives:st})}parseArgumentDefs(){return this.optionalMany(we.PAREN_L,this.parseInputValueDef,we.PAREN_R)}parseInputValueDef(){let P=this._lexer.token,K=this.parseDescription(),oe=this.parseName();this.expectToken(we.COLON);let ye=this.parseTypeReference(),he;this.expectOptionalToken(we.EQUALS)&&(he=this.parseConstValueLiteral());let st=this.parseConstDirectives();return this.node(P,{kind:ot.INPUT_VALUE_DEFINITION,description:K,name:oe,type:ye,defaultValue:he,directives:st})}parseInterfaceTypeDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("interface");let oe=this.parseName(),ye=this.parseImplementsInterfaces(),he=this.parseConstDirectives(),st=this.parseFieldsDefinition();return this.node(P,{kind:ot.INTERFACE_TYPE_DEFINITION,description:K,name:oe,interfaces:ye,directives:he,fields:st})}parseUnionTypeDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("union");let oe=this.parseName(),ye=this.parseConstDirectives(),he=this.parseUnionMemberTypes();return this.node(P,{kind:ot.UNION_TYPE_DEFINITION,description:K,name:oe,directives:ye,types:he})}parseUnionMemberTypes(){return this.expectOptionalToken(we.EQUALS)?this.delimitedMany(we.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("enum");let oe=this.parseName(),ye=this.parseConstDirectives(),he=this.parseEnumValuesDefinition();return this.node(P,{kind:ot.ENUM_TYPE_DEFINITION,description:K,name:oe,directives:ye,values:he})}parseEnumValuesDefinition(){return this.optionalMany(we.BRACE_L,this.parseEnumValueDefinition,we.BRACE_R)}parseEnumValueDefinition(){let P=this._lexer.token,K=this.parseDescription(),oe=this.parseEnumValueName(),ye=this.parseConstDirectives();return this.node(P,{kind:ot.ENUM_VALUE_DEFINITION,description:K,name:oe,directives:ye})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ml(this._lexer.source,this._lexer.token.start,`${iR(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("input");let oe=this.parseName(),ye=this.parseConstDirectives(),he=this.parseInputFieldsDefinition();return this.node(P,{kind:ot.INPUT_OBJECT_TYPE_DEFINITION,description:K,name:oe,directives:ye,fields:he})}parseInputFieldsDefinition(){return this.optionalMany(we.BRACE_L,this.parseInputValueDef,we.BRACE_R)}parseTypeSystemExtension(){let P=this._lexer.lookahead();if(P.kind===we.NAME)switch(P.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(P)}parseSchemaExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let K=this.parseConstDirectives(),oe=this.optionalMany(we.BRACE_L,this.parseOperationTypeDefinition,we.BRACE_R);if(K===void 0&&oe===void 0)throw this.unexpected();return this.node(P,{kind:ot.SCHEMA_EXTENSION,directives:K,operationTypes:oe})}parseScalarTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let K=this.parseName(),oe=this.parseConstDirectives();if(oe===void 0)throw this.unexpected();return this.node(P,{kind:ot.SCALAR_TYPE_EXTENSION,name:K,directives:oe})}parseObjectTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let K=this.parseName(),oe=this.parseImplementsInterfaces(),ye=this.parseConstDirectives(),he=this.parseFieldsDefinition();if(oe===void 0&&ye===void 0&&he===void 0)throw this.unexpected();return this.node(P,{kind:ot.OBJECT_TYPE_EXTENSION,name:K,interfaces:oe,directives:ye,fields:he})}parseInterfaceTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let K=this.parseName(),oe=this.parseImplementsInterfaces(),ye=this.parseConstDirectives(),he=this.parseFieldsDefinition();if(oe===void 0&&ye===void 0&&he===void 0)throw this.unexpected();return this.node(P,{kind:ot.INTERFACE_TYPE_EXTENSION,name:K,interfaces:oe,directives:ye,fields:he})}parseUnionTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let K=this.parseName(),oe=this.parseConstDirectives(),ye=this.parseUnionMemberTypes();if(oe===void 0&&ye===void 0)throw this.unexpected();return this.node(P,{kind:ot.UNION_TYPE_EXTENSION,name:K,directives:oe,types:ye})}parseEnumTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let K=this.parseName(),oe=this.parseConstDirectives(),ye=this.parseEnumValuesDefinition();if(oe===void 0&&ye===void 0)throw this.unexpected();return this.node(P,{kind:ot.ENUM_TYPE_EXTENSION,name:K,directives:oe,values:ye})}parseInputObjectTypeExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let K=this.parseName(),oe=this.parseConstDirectives(),ye=this.parseInputFieldsDefinition();if(oe===void 0&&ye===void 0)throw this.unexpected();return this.node(P,{kind:ot.INPUT_OBJECT_TYPE_EXTENSION,name:K,directives:oe,fields:ye})}parseDirectiveExtension(){let P=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(we.AT);let K=this.parseName(),oe=this.parseConstDirectives();if(oe===void 0)throw this.unexpected();return this.node(P,{kind:ot.DIRECTIVE_EXTENSION,name:K,directives:oe})}parseDirectiveDefinition(){let P=this._lexer.token,K=this.parseDescription();this.expectKeyword("directive"),this.expectToken(we.AT);let oe=this.parseName(),ye=this.parseArgumentDefs(),he=this.parseConstDirectives(),st=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let rn=this.parseDirectiveLocations();return this.node(P,{kind:ot.DIRECTIVE_DEFINITION,description:K,name:oe,arguments:ye,directives:he,repeatable:st,locations:rn})}parseDirectiveLocations(){return this.delimitedMany(we.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let P=this._lexer.token,K=this.parseName();if(sd(X5,K.value))return K;throw this.unexpected(P)}parseSchemaCoordinate(){let P=this._lexer.token,K=this.expectOptionalToken(we.AT),oe=this.parseName(),ye;!K&&this.expectOptionalToken(we.DOT)&&(ye=this.parseName());let he;return(K||ye)&&this.expectOptionalToken(we.PAREN_L)&&(he=this.parseName(),this.expectToken(we.COLON),this.expectToken(we.PAREN_R)),K?he?this.node(P,{kind:ot.DIRECTIVE_ARGUMENT_COORDINATE,name:oe,argumentName:he}):this.node(P,{kind:ot.DIRECTIVE_COORDINATE,name:oe}):ye?he?this.node(P,{kind:ot.ARGUMENT_COORDINATE,name:oe,fieldName:ye,argumentName:he}):this.node(P,{kind:ot.MEMBER_COORDINATE,name:oe,memberName:ye}):this.node(P,{kind:ot.TYPE_COORDINATE,name:oe})}node(P,K){return this._options.noLocation!==!0&&(K.loc=new di(P,this._lexer.lastToken,this._lexer.source)),K}peek(P){return this._lexer.token.kind===P}expectToken(P){let K=this._lexer.token;if(K.kind===P)return this.advanceLexer(),K;throw ml(this._lexer.source,K.start,`Expected ${dk(P)}, found ${iR(K)}.`)}expectOptionalToken(P){return this._lexer.token.kind===P?(this.advanceLexer(),!0):!1}expectKeyword(P){let K=this._lexer.token;if(K.kind===we.NAME&&K.value===P)this.advanceLexer();else throw ml(this._lexer.source,K.start,`Expected "${P}", found ${iR(K)}.`)}expectOptionalKeyword(P){let K=this._lexer.token;return K.kind===we.NAME&&K.value===P?(this.advanceLexer(),!0):!1}unexpected(P){let K=P??this._lexer.token;return ml(this._lexer.source,K.start,`Unexpected ${iR(K)}.`)}any(P,K,oe){this.expectToken(P);let ye=[];for(;!this.expectOptionalToken(oe);)ye.push(K.call(this));return ye}optionalMany(P,K,oe){if(this.expectOptionalToken(P)){let ye=[];do ye.push(K.call(this));while(!this.expectOptionalToken(oe));return ye}}many(P,K,oe){this.expectToken(P);let ye=[];do ye.push(K.call(this));while(!this.expectOptionalToken(oe));return ye}delimitedMany(P,K){this.expectOptionalToken(P);let oe=[];do oe.push(K.call(this));while(this.expectOptionalToken(P));return oe}advanceLexer(){let{maxTokens:P}=this._options,K=this._lexer.advance();if(K.kind!==we.EOF&&(++this._tokenCounter,P!==void 0&&this._tokenCounter>P))throw ml(this._lexer.source,K.start,`Document contains more than ${P} tokens. Parsing aborted.`)}};function iR(P){let K=P.value;return dk(P.kind)+(K!=null?` "${K}"`:"")}function dk(P){return ZY(P)?`"${P}"`:P}function gGe(P,K){let oe=new SyntaxError(P+" ("+K.loc.start.line+":"+K.loc.start.column+")");return Object.assign(oe,K)}var bye=gGe;function bGe(P){let K=[],{startToken:oe,endToken:ye}=P.loc;for(let he=oe;he!==ye;he=he.next)he.kind==="Comment"&&K.push({...he,loc:{start:he.start,end:he.end}});return K}var Aye={experimentalFragmentArguments:!0};function vye(P){if(!(P instanceof wo))return P;let{message:K,locations:[oe]}=P;return bye(K,{loc:{start:oe},cause:P})}function yye(P){let K;try{K=mGe(P,Aye)}catch(oe){throw vye(oe)}return K.comments=bGe(K),K}var sK={parse:yye,astFormat:"graphql",hasPragma:Ro,hasIgnorePragma:vs,locStart:xr,locEnd:Do},wye={graphql:Ph};return s(a)})});var nXe,oXe,rXe=D(()=>{nXe="17.0.2",oXe=Object.freeze({major:17,minor:0,patch:2,preReleaseTag:null})});function Xe(i){return dX(i,[])}function dX(i,e){switch(typeof i){case"string":return JSON.stringify(i);case"function":return i.name?`[function ${i.name}]`:"[function]";case"object":return pQt(i,e);default:return String(i)}}function pQt(i,e){if(i===null)return"null";if(e.includes(i))return"[Circular]";let t=[...e,i];if(mQt(i)){let n=i.toJSON();if(n!==i)return typeof n=="string"?n:dX(n,t)}else if(Array.isArray(i))return bQt(i,t);return gQt(i,t)}function mQt(i){return typeof i.toJSON=="function"}function gQt(i,e){let t=Object.entries(i);return t.length===0?"{}":e.length>2?"["+AQt(i)+"]":"{ "+t.map(([o,r])=>o+": "+dX(r,e)).join(", ")+" }"}function bQt(i,e){if(i.length===0)return"[]";if(e.length>2)return"[Array]";let t=Math.min(10,i.length),n=i.length-t,o=[];for(let r=0;r1&&o.push(`... ${n} more items`),"["+o.join(", ")+"]"}function AQt(i){let e=Object.prototype.toString.call(i).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof i.constructor=="function"){let t=i.constructor.name;if(typeof t=="string"&&t!=="")return t}return e}var Is=D(()=>{});function vQt(i,e,t){if(i?.__kind===e)return!0;if(typeof i=="object"&&i!==null){let n=t.prototype[Symbol.toStringTag],o=Symbol.toStringTag in i?i[Symbol.toStringTag]:i.constructor?.name;if(n===o){let r=Xe(i);throw new Error(`Cannot use ${n} "${r}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`)}}return!1}function yQt(i,e){return i?.__kind===e}function sXe(){Kc=vQt}var Kc,IR=D(()=>{Is();Kc=yQt});function lXe(){aXe=!0,sXe()}function cXe(){return aXe}var aXe,uXe=D(()=>{IR();aXe=!1});function En(i){return i instanceof Promise}function Hh(i){return typeof i?.then=="function"}var Wp=D(()=>{});function hX(i){return i instanceof Error?i:new Ewe(i)}var Ewe,Dwe=D(()=>{Is();Ewe=class extends Error{constructor(e){super("Unexpected error value: "+Xe(e)),this.name="NonErrorThrown",this.thrownValue=e}}});function Ma(i){return typeof i=="object"&&i!==null}var oA=D(()=>{});function Di(i,e){if(!i)throw new Error(e??"Unexpected invariant triggered.")}var Za=D(()=>{});function rS(i,e){let t=0,n=1;for(let o of i.body.matchAll(wQt)){if(typeof o.index!="number"&&Di(!1),o.index>=e)break;t=o.index+o[0].length,n+=1}return{line:n,column:e+1-t}}var wQt,fX=D(()=>{Za();wQt=/\r\n|[\n\r]/g});function n9(i){return LR(i.source,rS(i.source,i.start))}function LR(i,e){let t=i.locationOffset.column-1,n="".padStart(t)+i.body,o=e.line-1,r=i.locationOffset.line-1,s=e.line+r,a=e.line===1?t:0,l=e.column+a,c=`${i.name}:${s}:${l} +`,u=n.split(/\r\n|[\n\r]/g),d=u[o];if(d.length>120){let h=Math.floor(l/80),f=l%80,p=[];for(let g=0;g["|",g]),["|","^".padStart(f)],["|",p[h+1]]])}return c+dXe([[`${s-1} |`,u[o-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,u[o+1]]])}function dXe(i){let e=i.filter(([n,o])=>o!==void 0),t=Math.max(...e.map(([n])=>n.length));return e.map(([n,o])=>n.padStart(t)+(o?" "+o:"")).join(` +`)}var Twe=D(()=>{fX()});function hXe(i){return i===void 0||i.length===0?void 0:i}var Se,Ki=D(()=>{oA();fX();Twe();Se=class i extends Error{constructor(e,t={}){let{nodes:n,source:o,positions:r,path:s,originalError:a,cause:l,extensions:c}=t,u="cause"in t,d=u?l:a,h=u||a!=null?{cause:d}:void 0;super(e,h),this.name="GraphQLError",this.path=s??void 0;let f=a??(l instanceof Error?l:void 0);this.originalError=f,this.nodes=hXe(Array.isArray(n)?n:n?[n]:void 0);let p=hXe(this.nodes?.map(A=>A.loc).filter(A=>A!=null));this.source=o??p?.[0]?.source,this.positions=r??p?.map(A=>A.start),this.locations=r&&o?r.map(A=>rS(o,A)):p?.map(A=>rS(A.source,A.start));let g=Ma(f?.extensions)?f.extensions:void 0;this.extensions=c??g??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),a?.stack!=null?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+=` + +`+n9(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+=` + +`+LR(this.source,t);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}});function Ac(i){if(i instanceof Se)return i;let e=hX(i);return new Se(e.message,{originalError:e})}var sS=D(()=>{Dwe();Ki()});var Jc,NR=D(()=>{Jc=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(e,t){let n=this.get(e);n===void 0?this.set(e,[t]):n.push(t)}}});function fXe(i){return i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()}var pXe=D(()=>{});function mXe(i){return bXe("or",i)}function gXe(i){return bXe("and",i)}function bXe(i,e){switch(e.length===0&&Di(!1),e.length){case 1:return e[0];case 2:return e[0]+" "+i+" "+e[1]}let t=e.slice(0,-1),n=e.at(-1);return t.join(", ")+", "+i+" "+n}var kwe=D(()=>{Za()});function Up(i){return typeof i=="object"&&typeof i?.[Symbol.iterator]=="function"}var Lk=D(()=>{});function Hw(i,e){let t=Object.create(null);for(let n of i)t[e(n)]=n;return t}var o9=D(()=>{});function Xv(i,e){let t=Object.create(null);for(let n of Object.keys(i))t[n]=e(i[n],n);return t}var pX=D(()=>{});function Nk(i){return i.length===0?"":` at ${i.map(e=>typeof e=="number"?`[${e}]`:`.${e}`).join("")}`}var Iwe=D(()=>{});function s9(i){let e=i?.kind;return typeof e=="string"&&xQt.has(e)}var Mk,Zv,r9,xQt,Ar,eh=D(()=>{Mk=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Zv=class{constructor(e,t,n,o,r,s){this.kind=e,this.start=t,this.end=n,this.line=o,this.column=r,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},r9={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentArgument:["name","value"],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},xQt=new Set(Object.keys(r9));Ar={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"}});var W={};ad(W,{ARGUMENT:()=>kQt,ARGUMENT_COORDINATE:()=>gGt,BOOLEAN:()=>BQt,DIRECTIVE:()=>jQt,DIRECTIVE_ARGUMENT_COORDINATE:()=>AGt,DIRECTIVE_COORDINATE:()=>bGt,DIRECTIVE_DEFINITION:()=>rGt,DIRECTIVE_EXTENSION:()=>aGt,DOCUMENT:()=>_Qt,ENUM:()=>VQt,ENUM_TYPE_DEFINITION:()=>iGt,ENUM_TYPE_EXTENSION:()=>hGt,ENUM_VALUE_DEFINITION:()=>nGt,FIELD:()=>TQt,FIELD_DEFINITION:()=>ZQt,FLOAT:()=>OQt,FRAGMENT_ARGUMENT:()=>IQt,FRAGMENT_DEFINITION:()=>MQt,FRAGMENT_SPREAD:()=>LQt,INLINE_FRAGMENT:()=>NQt,INPUT_OBJECT_TYPE_DEFINITION:()=>oGt,INPUT_OBJECT_TYPE_EXTENSION:()=>fGt,INPUT_VALUE_DEFINITION:()=>$Qt,INT:()=>FQt,INTERFACE_TYPE_DEFINITION:()=>eGt,INTERFACE_TYPE_EXTENSION:()=>uGt,LIST:()=>HQt,LIST_TYPE:()=>GQt,MEMBER_COORDINATE:()=>mGt,NAME:()=>CQt,NAMED_TYPE:()=>QQt,NON_NULL_TYPE:()=>qQt,NULL:()=>zQt,OBJECT:()=>WQt,OBJECT_FIELD:()=>UQt,OBJECT_TYPE_DEFINITION:()=>XQt,OBJECT_TYPE_EXTENSION:()=>cGt,OPERATION_DEFINITION:()=>SQt,OPERATION_TYPE_DEFINITION:()=>KQt,SCALAR_TYPE_DEFINITION:()=>JQt,SCALAR_TYPE_EXTENSION:()=>lGt,SCHEMA_DEFINITION:()=>YQt,SCHEMA_EXTENSION:()=>sGt,SELECTION_SET:()=>DQt,STRING:()=>PQt,TYPE_COORDINATE:()=>pGt,UNION_TYPE_DEFINITION:()=>tGt,UNION_TYPE_EXTENSION:()=>dGt,VARIABLE:()=>RQt,VARIABLE_DEFINITION:()=>EQt});var CQt,_Qt,SQt,EQt,DQt,TQt,kQt,IQt,LQt,NQt,MQt,RQt,FQt,OQt,PQt,BQt,zQt,VQt,HQt,WQt,UQt,jQt,QQt,GQt,qQt,YQt,KQt,JQt,XQt,ZQt,$Qt,eGt,tGt,iGt,nGt,oGt,rGt,sGt,aGt,lGt,cGt,uGt,dGt,hGt,fGt,pGt,mGt,gGt,bGt,AGt,AXe=D(()=>{CQt="Name",_Qt="Document",SQt="OperationDefinition",EQt="VariableDefinition",DQt="SelectionSet",TQt="Field",kQt="Argument",IQt="FragmentArgument",LQt="FragmentSpread",NQt="InlineFragment",MQt="FragmentDefinition",RQt="Variable",FQt="IntValue",OQt="FloatValue",PQt="StringValue",BQt="BooleanValue",zQt="NullValue",VQt="EnumValue",HQt="ListValue",WQt="ObjectValue",UQt="ObjectField",jQt="Directive",QQt="NamedType",GQt="ListType",qQt="NonNullType",YQt="SchemaDefinition",KQt="OperationTypeDefinition",JQt="ScalarTypeDefinition",XQt="ObjectTypeDefinition",ZQt="FieldDefinition",$Qt="InputValueDefinition",eGt="InterfaceTypeDefinition",tGt="UnionTypeDefinition",iGt="EnumTypeDefinition",nGt="EnumValueDefinition",oGt="InputObjectTypeDefinition",rGt="DirectiveDefinition",sGt="SchemaExtension",aGt="DirectiveExtension",lGt="ScalarTypeExtension",cGt="ObjectTypeExtension",uGt="InterfaceTypeExtension",dGt="UnionTypeExtension",hGt="EnumTypeExtension",fGt="InputObjectTypeExtension",pGt="TypeCoordinate",mGt="MemberCoordinate",gGt="ArgumentCoordinate",bGt="DirectiveCoordinate",AGt="DirectiveArgumentCoordinate"});var so=D(()=>{AXe()});function jp(i,e){if(!i)throw new Error(e)}var MR=D(()=>{});function Wh(i,e){let[t,n]=e?[i,e]:[void 0,i];if(n.length===0)return"";let o=" Did you mean ";t!=null&&(o+=t+" ");let r=mXe(n.slice(0,vGt).map(s=>`"${s}"`));return o+r+"?"}var vGt,Rk=D(()=>{kwe();vGt=5});function Lwe(i){return i}var vXe=D(()=>{});function rA(i,e,t){let n=Object.create(null);for(let o of i)n[e(o)]=t(o);return n}var a9=D(()=>{});function Ww(i,e){let t=0,n=0;for(;t0);let a=0;do++n,a=a*10+r-Nwe,r=e.charCodeAt(n);while(mX(r)&&a>0);if(sa)return 1}else{if(or)return 1;++t,++n}}return i.length-e.length}function mX(i){return!isNaN(i)&&Nwe<=i&&i<=yGt}var Nwe,yGt,l9=D(()=>{Nwe=48,yGt=57});function Qf(i,e){let t=Object.create(null),n=new Mwe(i),o=Math.floor(i.length*.4)+1;for(let r of e){let s=n.measure(r,o);s!==void 0&&(t[r]=s)}return Object.keys(t).sort((r,s)=>{let a=t[r]-t[s];return a!==0?a:Ww(r,s)})}function yXe(i){let e=i.length,t=new Array(e);for(let n=0;n{l9();Mwe=class{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=yXe(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;let n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let o=yXe(n),r=this._inputArray;if(o.lengtht)return;let l=this._rows;for(let u=0;u<=a;u++)l[0][u]=u;for(let u=1;u<=s;u++){let d=l[(u-1)%3],h=l[u%3],f=h[0]=u;for(let p=1;p<=a;p++){let g=o[u-1]===r[p-1]?0:1,A=Math.min(d[p]+1,h[p-1]+1,d[p-1]+g);if(u>1&&p>1&&o[u-1]===r[p-2]&&o[u-2]===r[p-1]){let v=l[(u-2)%3][p-2];A=Math.min(A,v+1)}At)return}let c=l[s%3][a];return c<=t?c:void 0}}});function Gf(i){if(i==null)return Object.create(null);if(Object.getPrototypeOf(i)===null)return i;let e=Object.create(null);for(let[t,n]of Object.entries(i))e[t]=n;for(let t of Object.getOwnPropertySymbols(i))e[t]=i[t];return e}var gX=D(()=>{});function bX(i){return i===9||i===32}function Ok(i){return i>=48&&i<=57}function wXe(i){return i>=97&&i<=122||i>=65&&i<=90}function Pk(i){return wXe(i)||i===95}function AX(i){return wXe(i)||Ok(i)||i===95}var c9=D(()=>{});function xXe(i){let e=Number.MAX_SAFE_INTEGER,t=null,n=-1;for(let o=0;or===0?o:o.slice(e)).slice(t??0,n+1)}function wGt(i){let e=0;for(;e1&&n.slice(1).every(f=>f.length===0||bX(f.charCodeAt(0))),s=t.endsWith('\\"""'),a=i.endsWith('"')&&!s,l=i.endsWith("\\"),c=a||l,u=!e?.minimize&&(!o||i.length>70||c||r||s),d="",h=o&&bX(i.charCodeAt(0));return(u&&!h||r)&&(d+=` +`),d+=t,(u||c)&&(d+=` +`),'"""'+d+'"""'}var u9=D(()=>{c9()});function _Xe(i){return`"${i.replace(xGt,CGt)}"`}function CGt(i){return _Gt[i.charCodeAt(0)]}var xGt,_Gt,SXe=D(()=>{xGt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;_Gt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});function ca(i,e,t=r9){let n=new Map;for(let p of Object.values(W))n.set(p,aS(e,p));let o,r=Array.isArray(i),s=[i],a=-1,l=[],c=i,u,d,h=[],f=[];do{a++;let p=a===s.length,g=p&&l.length!==0;if(p){if(u=f.length===0?void 0:h[h.length-1],c=d,d=f.pop(),g)if(r){c=c.slice();let v=0;for(let[w,C]of l){let _=w-v;C===null?(c.splice(_,1),v++):c[_]=C}}else{c={...c};for(let[v,w]of l)c[v]=w}a=o.index,s=o.keys,l=o.edits,r=o.inArray,o=o.prev}else if(d!=null){if(u=r?a:s[a],c=d[u],c==null)continue;h.push(u)}let A;if(!Array.isArray(c)){if(s9(c)||jp(!1,`Invalid AST Node: ${Xe(c)}.`),A=(p?n.get(c.kind)?.leave:n.get(c.kind)?.enter)?.call(e,c,u,d,h,f),A===$v)break;if(A===!1){if(!p){h.pop();continue}}else if(A!==void 0&&(l.push([u,A]),!p))if(s9(A))c=A;else{h.pop();continue}}A===void 0&&g&&l.push([u,c]),p?h.pop():(o={inArray:r,index:a,keys:s,edits:l,prev:o},r=Array.isArray(c),s=r?c:t[c.kind]??[],a=-1,l=[],d!=null&&f.push(d),d=c)}while(o!==void 0);return l.length!==0?l.at(-1)[1]:i}function RR(i){let e=new Array(i.length).fill(null),t=Object.create(null);for(let n of Object.values(W)){let o=!1,r=new Array(i.length).fill(void 0),s=new Array(i.length).fill(void 0);for(let l=0;l{MR();Is();eh();so();$v=Object.freeze({})});function Rn(i){return ca(i,SGt)}function ri(i,e=""){return i?.filter(t=>t!==void 0&&t!=="").join(e)??""}function Ib(i){return Dn(`{ +`,d9(ri(i,` `)),` -)`)),Ii([l,Ii(o," "),s]," ")},Argument:function(e){var t=e.name,n=e.value;return t+": "+n},FragmentSpread:function(e){var t=e.name,n=e.directives;return"..."+t+fl(" ",Ii(n," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Ii(["...",fl("on ",t),Ii(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,s=e.selectionSet;return"fragment ".concat(t).concat(fl("(",Ii(r,", "),")")," ")+"on ".concat(n," ").concat(fl("",Ii(o," ")," "))+s},IntValue:function(e){var t=e.value;return t},FloatValue:function(e){var t=e.value;return t},StringValue:function(e,t){var n=e.value,r=e.block;return r?(0,uKt.printBlockString)(n,t==="description"?"":" "):JSON.stringify(n)},BooleanValue:function(e){var t=e.value;return t?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){var t=e.value;return t},ListValue:function(e){var t=e.values;return"["+Ii(t,", ")+"]"},ObjectValue:function(e){var t=e.fields;return"{"+Ii(t,", ")+"}"},ObjectField:function(e){var t=e.name,n=e.value;return t+": "+n},Directive:function(e){var t=e.name,n=e.arguments;return"@"+t+fl("(",Ii(n,", "),")")},NamedType:function(e){var t=e.name;return t},ListType:function(e){var t=e.type;return"["+t+"]"},NonNullType:function(e){var t=e.type;return t+"!"},SchemaDefinition:Q0(function(i){var e=i.directives,t=i.operationTypes;return Ii(["schema",Ii(e," "),G0(t)]," ")}),OperationTypeDefinition:function(e){var t=e.operation,n=e.type;return t+": "+n},ScalarTypeDefinition:Q0(function(i){var e=i.name,t=i.directives;return Ii(["scalar",e,Ii(t," ")]," ")}),ObjectTypeDefinition:Q0(function(i){var e=i.name,t=i.interfaces,n=i.directives,r=i.fields;return Ii(["type",e,fl("implements ",Ii(t," & ")),Ii(n," "),G0(r)]," ")}),FieldDefinition:Q0(function(i){var e=i.name,t=i.arguments,n=i.type,r=i.directives;return e+(dXe(t)?fl(`( -`,sJ(Ii(t,` +}`)}function Dn(i,e,t=""){return e!=null&&e!==""?i+e+t:""}function d9(i){return Dn(" ",i.replaceAll(` +`,` + `))}function Rwe(i){return i?.some(e=>e.includes(` +`))??!1}function EXe(i,e){let t=i+Dn("(",ri(e,", "),")");return t.length>Fwe&&(t=i+Dn(`( +`,d9(ri(e,` `)),` -)`):fl("(",Ii(t,", "),")"))+": "+n+fl(" ",Ii(r," "))}),InputValueDefinition:Q0(function(i){var e=i.name,t=i.type,n=i.defaultValue,r=i.directives;return Ii([e+": "+t,fl("= ",n),Ii(r," ")]," ")}),InterfaceTypeDefinition:Q0(function(i){var e=i.name,t=i.interfaces,n=i.directives,r=i.fields;return Ii(["interface",e,fl("implements ",Ii(t," & ")),Ii(n," "),G0(r)]," ")}),UnionTypeDefinition:Q0(function(i){var e=i.name,t=i.directives,n=i.types;return Ii(["union",e,Ii(t," "),n&&n.length!==0?"= "+Ii(n," | "):""]," ")}),EnumTypeDefinition:Q0(function(i){var e=i.name,t=i.directives,n=i.values;return Ii(["enum",e,Ii(t," "),G0(n)]," ")}),EnumValueDefinition:Q0(function(i){var e=i.name,t=i.directives;return Ii([e,Ii(t," ")]," ")}),InputObjectTypeDefinition:Q0(function(i){var e=i.name,t=i.directives,n=i.fields;return Ii(["input",e,Ii(t," "),G0(n)]," ")}),DirectiveDefinition:Q0(function(i){var e=i.name,t=i.arguments,n=i.repeatable,r=i.locations;return"directive @"+e+(dXe(t)?fl(`( -`,sJ(Ii(t,` +)`)),t}var Fwe,SGt,tg=D(()=>{u9();SXe();Bk();Fwe=80,SGt={Name:{leave:i=>i.value},Variable:{leave:i=>"$"+i.name},Document:{leave:i=>ri(i.definitions,` + +`)},OperationDefinition:{leave(i){let e=Rwe(i.variableDefinitions)?Dn(`( +`,ri(i.variableDefinitions,` +`),` +)`):Dn("(",ri(i.variableDefinitions,", "),")"),t=Dn("",i.description,` +`)+ri([i.operation,ri([i.name,e]),ri(i.directives," ")]," ");return(t==="query"?"":t+" ")+i.selectionSet}},VariableDefinition:{leave:({variable:i,type:e,defaultValue:t,directives:n,description:o})=>Dn("",o,` +`)+i+": "+e+Dn(" = ",t)+Dn(" ",ri(n," "))},SelectionSet:{leave:({selections:i})=>Ib(i)},Field:{leave({alias:i,name:e,arguments:t,directives:n,selectionSet:o}){let r=ri([Dn("",i,": "),e],"");return ri([EXe(r,t),Dn(" ",ri(n," ")),Dn(" ",o)])}},Argument:{leave:({name:i,value:e})=>i+": "+e},FragmentArgument:{leave:({name:i,value:e})=>i+": "+e},FragmentSpread:{leave:({name:i,arguments:e,directives:t})=>{let n="..."+i;return EXe(n,e)+Dn(" ",ri(t," "))}},InlineFragment:{leave:({typeCondition:i,directives:e,selectionSet:t})=>ri(["...",Dn("on ",i),ri(e," "),t]," ")},FragmentDefinition:{leave:({name:i,typeCondition:e,variableDefinitions:t,directives:n,selectionSet:o,description:r})=>Dn("",r,` +`)+`fragment ${i}${Dn("(",ri(t,", "),")")} on ${e} ${Dn("",ri(n," ")," ")}`+o},IntValue:{leave:({value:i})=>i},FloatValue:{leave:({value:i})=>i},StringValue:{leave:({value:i,block:e})=>e===!0?vX(i):_Xe(i)},BooleanValue:{leave:({value:i})=>i?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:i})=>i},ListValue:{leave:({values:i})=>{let e="["+ri(i,", ")+"]";return e.length>Fwe?`[ +`+d9(ri(i,` +`))+` +]`:e}},ObjectValue:{leave:({fields:i})=>{let e="{ "+ri(i,", ")+" }";return e.length>Fwe?Ib(i):e}},ObjectField:{leave:({name:i,value:e})=>i+": "+e},Directive:{leave:({name:i,arguments:e})=>"@"+i+Dn("(",ri(e,", "),")")},NamedType:{leave:({name:i})=>i},ListType:{leave:({type:i})=>"["+i+"]"},NonNullType:{leave:({type:i})=>i+"!"},SchemaDefinition:{leave:({description:i,directives:e,operationTypes:t})=>Dn("",i,` +`)+ri(["schema",ri(e," "),Ib(t)]," ")},OperationTypeDefinition:{leave:({operation:i,type:e})=>i+": "+e},ScalarTypeDefinition:{leave:({description:i,name:e,directives:t})=>Dn("",i,` +`)+ri(["scalar",e,ri(t," ")]," ")},ObjectTypeDefinition:{leave:({description:i,name:e,interfaces:t,directives:n,fields:o})=>Dn("",i,` +`)+ri(["type",e,Dn("implements ",ri(t," & ")),ri(n," "),Ib(o)]," ")},FieldDefinition:{leave:({description:i,name:e,arguments:t,type:n,directives:o})=>Dn("",i,` +`)+e+(Rwe(t)?Dn(`( +`,d9(ri(t,` `)),` -)`):fl("(",Ii(t,", "),")"))+(n?" repeatable":"")+" on "+Ii(r," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Ii(["extend schema",Ii(t," "),G0(n)]," ")},ScalarTypeExtension:function(e){var t=e.name,n=e.directives;return Ii(["extend scalar",t,Ii(n," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return Ii(["extend type",t,fl("implements ",Ii(n," & ")),Ii(r," "),G0(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return Ii(["extend interface",t,fl("implements ",Ii(n," & ")),Ii(r," "),G0(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Ii(["extend union",t,Ii(n," "),r&&r.length!==0?"= "+Ii(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Ii(["extend enum",t,Ii(n," "),G0(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Ii(["extend input",t,Ii(n," "),G0(r)]," ")}};function Q0(i){return function(e){return Ii([e.description,i(e)],` -`)}}function Ii(i){var e,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(e=i?.filter(function(n){return n}).join(t))!==null&&e!==void 0?e:""}function G0(i){return fl(`{ -`,sJ(Ii(i,` +)`):Dn("(",ri(t,", "),")"))+": "+n+Dn(" ",ri(o," "))},InputValueDefinition:{leave:({description:i,name:e,type:t,defaultValue:n,directives:o})=>Dn("",i,` +`)+ri([e+": "+t,Dn("= ",n),ri(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:i,name:e,interfaces:t,directives:n,fields:o})=>Dn("",i,` +`)+ri(["interface",e,Dn("implements ",ri(t," & ")),ri(n," "),Ib(o)]," ")},UnionTypeDefinition:{leave:({description:i,name:e,directives:t,types:n})=>Dn("",i,` +`)+ri(["union",e,ri(t," "),Dn("= ",ri(n," | "))]," ")},EnumTypeDefinition:{leave:({description:i,name:e,directives:t,values:n})=>Dn("",i,` +`)+ri(["enum",e,ri(t," "),Ib(n)]," ")},EnumValueDefinition:{leave:({description:i,name:e,directives:t})=>Dn("",i,` +`)+ri([e,ri(t," ")]," ")},InputObjectTypeDefinition:{leave:({description:i,name:e,directives:t,fields:n})=>Dn("",i,` +`)+ri(["input",e,ri(t," "),Ib(n)]," ")},DirectiveDefinition:{leave:({description:i,name:e,arguments:t,directives:n,repeatable:o,locations:r})=>Dn("",i,` +`)+"directive @"+e+(Rwe(t)?Dn(`( +`,d9(ri(t,` `)),` -}`)}function fl(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return e!=null&&e!==""?i+e+t:""}function sJ(i){return fl(" ",i.replace(/\n/g,` - `))}function pKt(i){return i.indexOf(` -`)!==-1}function dXe(i){return i!=null&&i.some(pKt)}});var W1e=Ue(H1e=>{"use strict";Object.defineProperty(H1e,"__esModule",{value:!0});H1e.valueFromASTUntyped=z1e;var mKt=V1e(Oo()),gKt=V1e(Qd()),bKt=V1e(w6()),Sw=Ds();function V1e(i){return i&&i.__esModule?i:{default:i}}function z1e(i,e){switch(i.kind){case Sw.Kind.NULL:return null;case Sw.Kind.INT:return parseInt(i.value,10);case Sw.Kind.FLOAT:return parseFloat(i.value);case Sw.Kind.STRING:case Sw.Kind.ENUM:case Sw.Kind.BOOLEAN:return i.value;case Sw.Kind.LIST:return i.values.map(function(t){return z1e(t,e)});case Sw.Kind.OBJECT:return(0,bKt.default)(i.fields,function(t){return t.name.value},function(t){return z1e(t.value,e)});case Sw.Kind.VARIABLE:return e?.[i.name.value]}(0,gKt.default)(0,"Unexpected value node: "+(0,mKt.default)(i))}});var po=Ue(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.isType=U1e;en.assertType=bXe;en.isScalarType=uk;en.assertScalarType=_Kt;en.isObjectType=lR;en.assertObjectType=SKt;en.isInterfaceType=dk;en.assertInterfaceType=EKt;en.isUnionType=hk;en.assertUnionType=DKt;en.isEnumType=fk;en.assertEnumType=TKt;en.isInputObjectType=_6;en.assertInputObjectType=kKt;en.isListType=cJ;en.assertListType=IKt;en.isNonNullType=Q_;en.assertNonNullType=LKt;en.isInputType=j1e;en.assertInputType=NKt;en.isOutputType=Q1e;en.assertOutputType=MKt;en.isLeafType=vXe;en.assertLeafType=RKt;en.isCompositeType=AXe;en.assertCompositeType=FKt;en.isAbstractType=yXe;en.assertAbstractType=OKt;en.GraphQLList=V_;en.GraphQLNonNull=H_;en.isWrappingType=S6;en.assertWrappingType=PKt;en.isNullableType=wXe;en.assertNullableType=xXe;en.getNullableType=BKt;en.isNamedType=CXe;en.assertNamedType=zKt;en.getNamedType=VKt;en.argsToArgsConfig=DXe;en.isRequiredArgument=HKt;en.isRequiredInputField=QKt;en.GraphQLInputObjectType=en.GraphQLEnumType=en.GraphQLUnionType=en.GraphQLInterfaceType=en.GraphQLObjectType=en.GraphQLScalarType=void 0;var mXe=Wm(oR()),W_=NA(),Da=Wm(Oo()),vKt=Wm(P_()),lJ=Wm(I1e()),RA=Wm(rJ()),qa=Wm(gb()),gXe=Wm(w6()),U_=Wm(g6()),AKt=Wm(B_()),yKt=Wm(LA()),hXe=Wm(cXe()),j_=Wm(UK()),wKt=Wm(z_()),C6=dn(),xKt=Ds(),fXe=Hm(),CKt=W1e();function Wm(i){return i&&i.__esModule?i:{default:i}}function pXe(i,e){for(var t=0;t0?i:void 0}var G1e=(function(){function i(t){var n,r,o,s=(n=t.parseValue)!==null&&n!==void 0?n:hXe.default;this.name=t.name,this.description=t.description,this.specifiedByUrl=t.specifiedByUrl,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:hXe.default,this.parseValue=s,this.parseLiteral=(o=t.parseLiteral)!==null&&o!==void 0?o:function(a,l){return s((0,CKt.valueFromASTUntyped)(a,l))},this.extensions=t.extensions&&(0,RA.default)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=cR(t.extensionASTNodes),typeof t.name=="string"||(0,qa.default)(0,"Must provide name."),t.specifiedByUrl==null||typeof t.specifiedByUrl=="string"||(0,qa.default)(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat((0,Da.default)(t.specifiedByUrl),".")),t.serialize==null||typeof t.serialize=="function"||(0,qa.default)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,qa.default)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var e=i.prototype;return e.toConfig=function(){var n;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},e.toString=function(){return this.name},e.toJSON=function(){return this.toString()},aR(i,[{key:W_.SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLScalarType"}}]),i})();en.GraphQLScalarType=G1e;(0,j_.default)(G1e);var q1e=(function(){function i(t){this.name=t.name,this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=t.extensions&&(0,RA.default)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=cR(t.extensionASTNodes),this._fields=SXe.bind(void 0,t),this._interfaces=_Xe.bind(void 0,t),typeof t.name=="string"||(0,qa.default)(0,"Must provide name."),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,qa.default)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat((0,Da.default)(t.isTypeOf),"."))}var e=i.prototype;return e.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},e.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},e.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:EXe(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},e.toString=function(){return this.name},e.toJSON=function(){return this.toString()},aR(i,[{key:W_.SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLObjectType"}}]),i})();en.GraphQLObjectType=q1e;(0,j_.default)(q1e);function _Xe(i){var e,t=(e=uJ(i.interfaces))!==null&&e!==void 0?e:[];return Array.isArray(t)||(0,qa.default)(0,"".concat(i.name," interfaces must be an Array or a function which returns an Array.")),t}function SXe(i){var e=uJ(i.fields);return sR(e)||(0,qa.default)(0,"".concat(i.name," fields must be an object with field names as keys or a function which returns such an object.")),(0,lJ.default)(e,function(t,n){var r;sR(t)||(0,qa.default)(0,"".concat(i.name,".").concat(n," field config must be an object.")),!("isDeprecated"in t)||(0,qa.default)(0,"".concat(i.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),t.resolve==null||typeof t.resolve=="function"||(0,qa.default)(0,"".concat(i.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat((0,Da.default)(t.resolve),"."));var o=(r=t.args)!==null&&r!==void 0?r:{};sR(o)||(0,qa.default)(0,"".concat(i.name,".").concat(n," args must be an object with argument names as keys."));var s=(0,mXe.default)(o).map(function(a){var l=a[0],c=a[1];return{name:l,description:c.description,type:c.type,defaultValue:c.defaultValue,deprecationReason:c.deprecationReason,extensions:c.extensions&&(0,RA.default)(c.extensions),astNode:c.astNode}});return{name:n,description:t.description,type:t.type,args:s,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:t.deprecationReason!=null,deprecationReason:t.deprecationReason,extensions:t.extensions&&(0,RA.default)(t.extensions),astNode:t.astNode}})}function sR(i){return(0,yKt.default)(i)&&!Array.isArray(i)}function EXe(i){return(0,lJ.default)(i,function(e){return{description:e.description,type:e.type,args:DXe(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}})}function DXe(i){return(0,gXe.default)(i,function(e){return e.name},function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}})}function HKt(i){return Q_(i.type)&&i.defaultValue===void 0}var Y1e=(function(){function i(t){this.name=t.name,this.description=t.description,this.resolveType=t.resolveType,this.extensions=t.extensions&&(0,RA.default)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=cR(t.extensionASTNodes),this._fields=SXe.bind(void 0,t),this._interfaces=_Xe.bind(void 0,t),typeof t.name=="string"||(0,qa.default)(0,"Must provide name."),t.resolveType==null||typeof t.resolveType=="function"||(0,qa.default)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat((0,Da.default)(t.resolveType),"."))}var e=i.prototype;return e.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},e.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},e.toConfig=function(){var n;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:EXe(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},e.toString=function(){return this.name},e.toJSON=function(){return this.toString()},aR(i,[{key:W_.SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInterfaceType"}}]),i})();en.GraphQLInterfaceType=Y1e;(0,j_.default)(Y1e);var K1e=(function(){function i(t){this.name=t.name,this.description=t.description,this.resolveType=t.resolveType,this.extensions=t.extensions&&(0,RA.default)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=cR(t.extensionASTNodes),this._types=WKt.bind(void 0,t),typeof t.name=="string"||(0,qa.default)(0,"Must provide name."),t.resolveType==null||typeof t.resolveType=="function"||(0,qa.default)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat((0,Da.default)(t.resolveType),"."))}var e=i.prototype;return e.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},e.toConfig=function(){var n;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},e.toString=function(){return this.name},e.toJSON=function(){return this.toString()},aR(i,[{key:W_.SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLUnionType"}}]),i})();en.GraphQLUnionType=K1e;(0,j_.default)(K1e);function WKt(i){var e=uJ(i.types);return Array.isArray(e)||(0,qa.default)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(i.name,".")),e}var J1e=(function(){function i(t){this.name=t.name,this.description=t.description,this.extensions=t.extensions&&(0,RA.default)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=cR(t.extensionASTNodes),this._values=UKt(this.name,t.values),this._valueLookup=new Map(this._values.map(function(n){return[n.value,n]})),this._nameLookup=(0,vKt.default)(this._values,function(n){return n.name}),typeof t.name=="string"||(0,qa.default)(0,"Must provide name.")}var e=i.prototype;return e.getValues=function(){return this._values},e.getValue=function(n){return this._nameLookup[n]},e.serialize=function(n){var r=this._valueLookup.get(n);if(r===void 0)throw new C6.GraphQLError('Enum "'.concat(this.name,'" cannot represent value: ').concat((0,Da.default)(n)));return r.name},e.parseValue=function(n){if(typeof n!="string"){var r=(0,Da.default)(n);throw new C6.GraphQLError('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(r,".")+aJ(this,r))}var o=this.getValue(n);if(o==null)throw new C6.GraphQLError('Value "'.concat(n,'" does not exist in "').concat(this.name,'" enum.')+aJ(this,n));return o.value},e.parseLiteral=function(n,r){if(n.kind!==xKt.Kind.ENUM){var o=(0,fXe.print)(n);throw new C6.GraphQLError('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(o,".")+aJ(this,o),n)}var s=this.getValue(n.value);if(s==null){var a=(0,fXe.print)(n);throw new C6.GraphQLError('Value "'.concat(a,'" does not exist in "').concat(this.name,'" enum.')+aJ(this,a),n)}return s.value},e.toConfig=function(){var n,r=(0,gXe.default)(this.getValues(),function(o){return o.name},function(o){return{description:o.description,value:o.value,deprecationReason:o.deprecationReason,extensions:o.extensions,astNode:o.astNode}});return{name:this.name,description:this.description,values:r,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},e.toString=function(){return this.name},e.toJSON=function(){return this.toString()},aR(i,[{key:W_.SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLEnumType"}}]),i})();en.GraphQLEnumType=J1e;(0,j_.default)(J1e);function aJ(i,e){var t=i.getValues().map(function(r){return r.name}),n=(0,wKt.default)(e,t);return(0,AKt.default)("the enum value",n)}function UKt(i,e){return sR(e)||(0,qa.default)(0,"".concat(i," values must be an object with value names as keys.")),(0,mXe.default)(e).map(function(t){var n=t[0],r=t[1];return sR(r)||(0,qa.default)(0,"".concat(i,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat((0,Da.default)(r),".")),!("isDeprecated"in r)||(0,qa.default)(0,"".concat(i,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:r.value!==void 0?r.value:n,isDeprecated:r.deprecationReason!=null,deprecationReason:r.deprecationReason,extensions:r.extensions&&(0,RA.default)(r.extensions),astNode:r.astNode}})}var X1e=(function(){function i(t){this.name=t.name,this.description=t.description,this.extensions=t.extensions&&(0,RA.default)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=cR(t.extensionASTNodes),this._fields=jKt.bind(void 0,t),typeof t.name=="string"||(0,qa.default)(0,"Must provide name.")}var e=i.prototype;return e.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},e.toConfig=function(){var n,r=(0,lJ.default)(this.getFields(),function(o){return{description:o.description,type:o.type,defaultValue:o.defaultValue,deprecationReason:o.deprecationReason,extensions:o.extensions,astNode:o.astNode}});return{name:this.name,description:this.description,fields:r,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},e.toString=function(){return this.name},e.toJSON=function(){return this.toString()},aR(i,[{key:W_.SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInputObjectType"}}]),i})();en.GraphQLInputObjectType=X1e;(0,j_.default)(X1e);function jKt(i){var e=uJ(i.fields);return sR(e)||(0,qa.default)(0,"".concat(i.name," fields must be an object with field names as keys or a function which returns such an object.")),(0,lJ.default)(e,function(t,n){return!("resolve"in t)||(0,qa.default)(0,"".concat(i.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&(0,RA.default)(t.extensions),astNode:t.astNode}})}function QKt(i){return Q_(i.type)&&i.defaultValue===void 0}});var D6=Ue(E6=>{"use strict";Object.defineProperty(E6,"__esModule",{value:!0});E6.isEqualType=Z1e;E6.isTypeSubTypeOf=dJ;E6.doTypesOverlap=GKt;var Rh=po();function Z1e(i,e){return i===e?!0:(0,Rh.isNonNullType)(i)&&(0,Rh.isNonNullType)(e)||(0,Rh.isListType)(i)&&(0,Rh.isListType)(e)?Z1e(i.ofType,e.ofType):!1}function dJ(i,e,t){return e===t?!0:(0,Rh.isNonNullType)(t)?(0,Rh.isNonNullType)(e)?dJ(i,e.ofType,t.ofType):!1:(0,Rh.isNonNullType)(e)?dJ(i,e.ofType,t):(0,Rh.isListType)(t)?(0,Rh.isListType)(e)?dJ(i,e.ofType,t.ofType):!1:(0,Rh.isListType)(e)?!1:(0,Rh.isAbstractType)(t)&&((0,Rh.isInterfaceType)(e)||(0,Rh.isObjectType)(e))&&i.isSubType(t,e)}function GKt(i,e,t){return e===t?!0:(0,Rh.isAbstractType)(e)?(0,Rh.isAbstractType)(t)?i.getPossibleTypes(e).some(function(n){return i.isSubType(t,n)}):i.isSubType(e,t):(0,Rh.isAbstractType)(t)?i.isSubType(t,e):!1}});var $1e=Ue(hJ=>{"use strict";Object.defineProperty(hJ,"__esModule",{value:!0});hJ.default=void 0;var qKt=NA(),YKt=Array.from||function(i,e,t){if(i==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n=i[qKt.SYMBOL_ITERATOR];if(typeof n=="function"){for(var r=n.call(i),o=[],s,a=0;!(s=r.next()).done;++a)if(o.push(e.call(t,s.value,a)),a>9999999)throw new TypeError("Near-infinite iteration.");return o}var l=i.length;if(typeof l=="number"&&l>=0&&l%1===0){for(var c=[],u=0;u{"use strict";Object.defineProperty(fJ,"__esModule",{value:!0});fJ.default=void 0;var JKt=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},XKt=JKt;fJ.default=XKt});var mJ=Ue(twe=>{"use strict";Object.defineProperty(twe,"__esModule",{value:!0});twe.default=$Kt;var ZKt=NA();function pJ(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pJ=function(t){return typeof t}:pJ=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pJ(i)}function $Kt(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(u){return u};if(i==null||pJ(i)!=="object")return null;if(Array.isArray(i))return i.map(e);var t=i[ZKt.SYMBOL_ITERATOR];if(typeof t=="function"){for(var n=t.call(i),r=[],o,s=0;!(o=n.next()).done;++s)r.push(e(o.value,s));return r}var a=i.length;if(typeof a=="number"&&a>=0&&a%1===0){for(var l=[],c=0;c{"use strict";Object.defineProperty(gJ,"__esModule",{value:!0});gJ.default=void 0;var eJt=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i},tJt=eJt;gJ.default=tJt});var FA=Ue(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.isSpecifiedScalarType=hJt;Rf.specifiedScalarTypes=Rf.GraphQLID=Rf.GraphQLBoolean=Rf.GraphQLString=Rf.GraphQLFloat=Rf.GraphQLInt=void 0;var bJ=AJ(ewe()),vJ=AJ(TXe()),q0=AJ(Oo()),kXe=AJ(LA()),pk=Ds(),T6=Hm(),rd=dn(),k6=po();function AJ(i){return i&&i.__esModule?i:{default:i}}var iwe=2147483647,nwe=-2147483648;function iJt(i){var e=I6(i);if(typeof e=="boolean")return e?1:0;var t=e;if(typeof e=="string"&&e!==""&&(t=Number(e)),!(0,vJ.default)(t))throw new rd.GraphQLError("Int cannot represent non-integer value: ".concat((0,q0.default)(e)));if(t>iwe||tiwe||iiwe||t{"use strict";Object.defineProperty(rwe,"__esModule",{value:!0});rwe.astFromValue=N6;var fJt=uR(ewe()),pJt=uR(Vm()),OXe=uR(Oo()),mJt=uR(Qd()),gJt=uR(LA()),bJt=uR(mJ()),bb=Ds(),vJt=FA(),L6=po();function uR(i){return i&&i.__esModule?i:{default:i}}function N6(i,e){if((0,L6.isNonNullType)(e)){var t=N6(i,e.ofType);return t?.kind===bb.Kind.NULL?null:t}if(i===null)return{kind:bb.Kind.NULL};if(i===void 0)return null;if((0,L6.isListType)(e)){var n=e.ofType,r=(0,bJt.default)(i);if(r!=null){for(var o=[],s=0;s{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.isIntrospectionType=EJt;ys.introspectionTypes=ys.TypeNameMetaFieldDef=ys.TypeMetaFieldDef=ys.SchemaMetaFieldDef=ys.__TypeKind=ys.TypeKind=ys.__EnumValue=ys.__InputValue=ys.__Field=ys.__Type=ys.__DirectiveLocation=ys.__Directive=ys.__Schema=void 0;var owe=swe(Vm()),AJt=swe(Oo()),yJt=swe(Qd()),wJt=Hm(),Lu=eR(),xJt=M6(),js=FA(),Mi=po();function swe(i){return i&&i.__esModule?i:{default:i}}var awe=new Mi.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:js.GraphQLString,resolve:function(t){return t.description}},types:{description:"A list of all types supported by this server.",type:new Mi.GraphQLNonNull(new Mi.GraphQLList(new Mi.GraphQLNonNull(vb))),resolve:function(t){return(0,owe.default)(t.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Mi.GraphQLNonNull(vb),resolve:function(t){return t.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:vb,resolve:function(t){return t.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:vb,resolve:function(t){return t.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new Mi.GraphQLNonNull(new Mi.GraphQLList(new Mi.GraphQLNonNull(lwe))),resolve:function(t){return t.getDirectives()}}}}});ys.__Schema=awe;var lwe=new Mi.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +)`):Dn("(",ri(t,", "),")"))+Dn(" ",ri(n," "))+(o?" repeatable":"")+" on "+ri(r," | ")},SchemaExtension:{leave:({directives:i,operationTypes:e})=>ri(["extend schema",ri(i," "),Ib(e)]," ")},ScalarTypeExtension:{leave:({name:i,directives:e})=>ri(["extend scalar",i,ri(e," ")]," ")},ObjectTypeExtension:{leave:({name:i,interfaces:e,directives:t,fields:n})=>ri(["extend type",i,Dn("implements ",ri(e," & ")),ri(t," "),Ib(n)]," ")},InterfaceTypeExtension:{leave:({name:i,interfaces:e,directives:t,fields:n})=>ri(["extend interface",i,Dn("implements ",ri(e," & ")),ri(t," "),Ib(n)]," ")},UnionTypeExtension:{leave:({name:i,directives:e,types:t})=>ri(["extend union",i,ri(e," "),Dn("= ",ri(t," | "))]," ")},EnumTypeExtension:{leave:({name:i,directives:e,values:t})=>ri(["extend enum",i,ri(e," "),Ib(t)]," ")},InputObjectTypeExtension:{leave:({name:i,directives:e,fields:t})=>ri(["extend input",i,ri(e," "),Ib(t)]," ")},DirectiveExtension:{leave:({name:i,directives:e})=>ri(["extend directive @"+i,ri(e," ")]," ")},TypeCoordinate:{leave:({name:i})=>i},MemberCoordinate:{leave:({name:i,memberName:e})=>ri([i,Dn(".",e)])},ArgumentCoordinate:{leave:({name:i,fieldName:e,argumentName:t})=>ri([i,Dn(".",e),Dn("(",t,":)")])},DirectiveCoordinate:{leave:({name:i})=>ri(["@",i])},DirectiveArgumentCoordinate:{leave:({name:i,argumentName:e})=>ri(["@",i,Dn("(",e,":)")])}}});function zk(i,e){switch(i.kind){case W.NULL:return null;case W.INT:return parseInt(i.value,10);case W.FLOAT:return parseFloat(i.value);case W.STRING:case W.ENUM:case W.BOOLEAN:return i.value;case W.LIST:return i.values.map(t=>zk(t,e));case W.OBJECT:return rA(i.fields,t=>t.name.value,t=>zk(t.value,e));case W.VARIABLE:return e?.[i.name.value]}}var Owe=D(()=>{a9();so()});function Uh(i){if(i.length===0)throw new Se("Expected name to be a non-empty string.");for(let e=1;e{Ki();c9()});function Uw(i){return yc(i)||en(i)||cn(i)||ys(i)||Oo(i)||Bi(i)||Cn(i)||Si(i)}function Bwe(i){if(!Uw(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL type.`);return i}function yc(i){return Kc(i,DXe,dd)}function zwe(i){if(!yc(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Scalar type.`);return i}function en(i){return Kc(i,Pwe,vc)}function f9(i){if(!en(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Object type.`);return i}function _X(i){return Kc(i,TXe,lS)}function Vwe(i){if(!_X(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL field.`);return i}function OR(i){return Kc(i,kXe,FR)}function Hwe(i){if(!OR(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL argument.`);return i}function cn(i){return Kc(i,IXe,Qp)}function p9(i){if(!cn(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Interface type.`);return i}function ys(i){return Kc(i,LXe,Lb)}function Wwe(i){if(!ys(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Union type.`);return i}function Oo(i){return Kc(i,NXe,th)}function Uwe(i){if(!Oo(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Enum type.`);return i}function SX(i){return Kc(i,MXe,xX)}function jwe(i){if(!SX(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Enum value.`);return i}function Bi(i){return Kc(i,RXe,Gp)}function Qwe(i){if(!Bi(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Input Object type.`);return i}function EX(i){return Kc(i,FXe,CX)}function Gwe(i){if(!EX(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL input field.`);return i}function Cn(i){return Kc(i,OXe,Ks)}function qwe(i){if(!Cn(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL List type.`);return i}function Si(i){return Kc(i,PXe,Pi)}function Ywe(i){if(!Si(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL Non-Null type.`);return i}function Ql(i){return yc(i)||Oo(i)||Bi(i)||jw(i)&&Ql(i.ofType)}function Kwe(i){if(!Ql(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL input type.`);return i}function ig(i){return yc(i)||en(i)||cn(i)||ys(i)||Oo(i)||jw(i)&&ig(i.ofType)}function Jwe(i){if(!ig(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL output type.`);return i}function hd(i){return yc(i)||Oo(i)}function ng(i){if(!hd(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL leaf type.`);return i}function jh(i){return en(i)||cn(i)||ys(i)}function Xwe(i){if(!jh(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL composite type.`);return i}function zu(i){return cn(i)||ys(i)}function Zwe(i){if(!zu(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL abstract type.`);return i}function jw(i){return Cn(i)||Si(i)}function $we(i){if(!jw(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL wrapping type.`);return i}function PR(i){return Uw(i)&&!Si(i)}function m9(i){if(!PR(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL nullable type.`);return i}function Vk(i){if(i)return Si(i)?i.ofType:i}function og(i){return yc(i)||en(i)||cn(i)||ys(i)||Oo(i)||Bi(i)}function exe(i){if(!og(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL named type.`);return i}function Vr(i){if(i){let e=i;for(;jw(e);)e=e.ofType;return e}}function g9(i){return typeof i=="function"?i():i}function BR(i){return typeof i=="function"?i():i}function BXe(i){return g9(i??[])}function zXe(i,e){let t=BR(e);return Xv(t,(n,o)=>new lS(i,o,n))}function Qh(i){return Si(i.type)&&i.default===void 0&&i.defaultValue===void 0}function EGt(i){return g9(i)}function DGt(i,e){let t=BR(e);return Object.entries(t).map(([n,o])=>new xX(i,n,o))}function wX(i,e){let t=i.getValues().map(o=>o.name),n=Qf(e,t);return Wh("the enum value",n)}function TGt(i,e){let t=BR(e);return Xv(t,(n,o)=>new CX(i,o,n))}function Gh(i){return Si(i.type)&&i.defaultValue===void 0&&i.default===void 0}var DXe,Pwe,TXe,kXe,IXe,LXe,NXe,MXe,RXe,FXe,OXe,PXe,Ks,Pi,dd,vc,lS,FR,Qp,Lb,th,xX,Gp,CX,So=D(()=>{MR();Rk();vXe();Is();IR();o9();a9();pX();Fk();gX();Ki();so();tg();Owe();yX();DXe=Symbol("Scalar");Pwe=Symbol("Object");TXe=Symbol("Field");kXe=Symbol("Argument");IXe=Symbol("Interface");LXe=Symbol("Union");NXe=Symbol("Enum");MXe=Symbol("EnumValue");RXe=Symbol("InputObject");FXe=Symbol("InputField");OXe=Symbol("List");PXe=Symbol("NonNull");Ks=class{constructor(e){this.__kind=OXe,this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}},Pi=class{constructor(e){this.__kind=PXe,this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};dd=class{constructor(e){this.__kind=DXe,this.name=Uh(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=e.serialize??e.coerceOutputValue??Lwe,this.parseValue=e.parseValue??e.coerceInputValue??Lwe,this.parseLiteral=e.parseLiteral??((t,n)=>this.coerceInputValue(zk(t,n))),this.coerceOutputValue=e.coerceOutputValue??this.serialize,this.coerceInputValue=e.coerceInputValue??this.parseValue,this.coerceInputLiteral=e.coerceInputLiteral,this.valueToLiteral=e.valueToLiteral,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],e.parseLiteral&&(typeof e.parseValue=="function"&&typeof e.parseLiteral=="function"||jp(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)),e.coerceInputLiteral&&(typeof e.coerceInputValue=="function"&&typeof e.coerceInputLiteral=="function"||jp(!1,`${this.name} must provide both "coerceInputValue" and "coerceInputLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,coerceOutputValue:this.coerceOutputValue,coerceInputValue:this.coerceInputValue,coerceInputLiteral:this.coerceInputLiteral,valueToLiteral:this.valueToLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},vc=class{constructor(e){this.__kind=Pwe,this.__kind=Pwe,this.name=Uh(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],this._fields=zXe.bind(void 0,this,e.fields),this._interfaces=BXe.bind(void 0,e.interfaces)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Xv(this.getFields(),e=>e.toConfig()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};lS=class{constructor(e,t,n){this.__kind=TXe,this.parentType=e,this.name=Uh(t),this.description=n.description,this.type=n.type;let o=n.args;this.args=o?Object.entries(o).map(([r,s])=>new FR(this,r,s)):[],this.resolve=n.resolve,this.subscribe=n.subscribe,this.deprecationReason=n.deprecationReason,this.extensions=Gf(n.extensions),this.astNode=n.astNode}get[Symbol.toStringTag](){return"GraphQLField"}toConfig(){return{description:this.description,type:this.type,args:rA(this.args,e=>e.name,e=>e.toConfig()),resolve:this.resolve,subscribe:this.subscribe,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentType??""}.${this.name}`}toJSON(){return this.toString()}},FR=class{constructor(e,t,n){this.__kind=kXe,this.parent=e,this.name=Uh(t),this.description=n.description,this.type=n.type,this.defaultValue=n.defaultValue,this.default=n.default,this._memoizedCoercedDefaultValue=void 0,this.deprecationReason=n.deprecationReason,this.extensions=Gf(n.extensions),this.astNode=n.astNode}get[Symbol.toStringTag](){return"GraphQLArgument"}toConfig(){return{description:this.description,type:this.type,defaultValue:this.defaultValue,default:this.default,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parent}(${this.name}:)`}toJSON(){return this.toString()}};Qp=class{constructor(e){this.__kind=IXe,this.name=Uh(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],this._fields=zXe.bind(void 0,this,e.fields),this._interfaces=BXe.bind(void 0,e.interfaces)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Xv(this.getFields(),e=>e.toConfig()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},Lb=class{constructor(e){this.__kind=LXe,this.name=Uh(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],this._types=EGt.bind(void 0,e.types)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};th=class{constructor(e){this.__kind=NXe,this.name=Uh(e.name),this.description=e.description,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],this._values=DGt.bind(void 0,this,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=this._values()),this._values}getValue(e){return this._nameLookup??=Hw(this.getValues(),t=>t.name),this._nameLookup[e]}serialize(e){return this.coerceOutputValue(e)}coerceOutputValue(e){this._valueLookup??=new Map(this.getValues().map(n=>[n.value,n]));let t=this._valueLookup.get(e);if(t===void 0)throw new Se(`Enum "${this.name}" cannot represent value: ${Xe(e)}`);return t.name}parseValue(e,t){return this.coerceInputValue(e,t)}coerceInputValue(e,t){if(typeof e!="string"){let o=Xe(e);throw new Se(`Enum "${this.name}" cannot represent non-string value: ${o}.`+(t?"":wX(this,o)))}let n=this.getValue(e);if(n==null)throw new Se(`Value "${e}" does not exist in "${this.name}" enum.`+(t?"":wX(this,e)));return n.value}parseLiteral(e,t,n){return this.coerceInputLiteral(e,n)}coerceInputLiteral(e,t){if(e.kind!==W.ENUM){let o=Rn(e);throw new Se(`Enum "${this.name}" cannot represent non-enum value: ${o}.`+(t?"":wX(this,o)),{nodes:e})}let n=this.getValue(e.value);if(n==null){let o=Rn(e);throw new Se(`Value "${o}" does not exist in "${this.name}" enum.`+(t?"":wX(this,o)),{nodes:e})}return n.value}valueToLiteral(e){if(typeof e=="string"&&this.getValue(e))return{kind:W.ENUM,value:e}}toConfig(){return{name:this.name,description:this.description,values:rA(this.getValues(),e=>e.name,e=>e.toConfig()),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};xX=class{constructor(e,t,n){this.__kind=MXe,this.parentEnum=e,this.name=h9(t),this.description=n.description,this.value=n.value!==void 0?n.value:t,this.deprecationReason=n.deprecationReason,this.extensions=Gf(n.extensions),this.astNode=n.astNode}get[Symbol.toStringTag](){return"GraphQLEnumValue"}toConfig(){return{description:this.description,value:this.value,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentEnum.name}.${this.name}`}toJSON(){return this.toString()}},Gp=class{constructor(e){this.__kind=RXe,this.name=Uh(e.name),this.description=e.description,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],this.isOneOf=e.isOneOf??!1,this._fields=TGt.bind(void 0,this,e.fields)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){return{name:this.name,description:this.description,fields:Xv(this.getFields(),e=>e.toConfig()),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};CX=class{constructor(e,t,n){"resolve"in n&&jp(!1,`${e}.${t} field has a resolve property, but Input Types cannot define resolvers.`),this.__kind=FXe,this.parentType=e,this.name=Uh(t),this.description=n.description,this.type=n.type,this.defaultValue=n.defaultValue,this.default=n.default,this._memoizedCoercedDefaultValue=void 0,this.deprecationReason=n.deprecationReason,this.extensions=Gf(n.extensions),this.astNode=n.astNode}get[Symbol.toStringTag](){return"GraphQLInputField"}toConfig(){return{description:this.description,type:this.type,defaultValue:this.defaultValue,default:this.default,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentType}.${this.name}`}toJSON(){return this.toString()}}});function Hk(i,e){return i===e?!0:Si(i)&&Si(e)||Cn(i)&&Cn(e)?Hk(i.ofType,e.ofType):!1}function sA(i,e,t){return e===t?!0:Si(t)?Si(e)?sA(i,e.ofType,t.ofType):!1:Si(e)?sA(i,e.ofType,t):Cn(t)?Cn(e)?sA(i,e.ofType,t.ofType):!1:Cn(e)?!1:zu(t)&&(cn(e)||en(e))&&i.isSubType(t,e)}function zR(i,e,t){return e===t?!0:zu(e)?zu(t)?i.getPossibleTypes(e).some(n=>i.isSubType(t,n)):i.isSubType(e,t):zu(t)?i.isSubType(t,e):!1}var b9=D(()=>{So()});function fd(i,e,t){return{prev:i,key:e,typename:t}}function Ls(i){let e=[],t=i;for(;t;)e.push(t.key),t=t.prev;return e.reverse()}var cS=D(()=>{});function aA(i,e){if(Si(e))return i==null?void 0:aA(i,e.ofType);if(i==null)return{kind:W.NULL};if(Cn(e)){if(!Up(i))return aA(i,e.ofType);let n=[];for(let o of i){let r=aA(o,e.ofType);if(!r)return;n.push(r)}return{kind:W.LIST,values:n}}if(Bi(e)){if(!Ma(i))return;let n=[],o=e.getFields();if(Object.keys(i).some(s=>i[s]!==void 0&&!Object.hasOwn(o,s)))return;for(let s of Object.values(e.getFields()))if(i[s.name]===void 0){if(Gh(s))return}else{let l=aA(i[s.name],s.type);if(!l)return;n.push({kind:W.OBJECT_FIELD,name:{kind:W.NAME,value:s.name},value:l})}return{kind:W.OBJECT,fields:n}}let t=ng(e);if(t.valueToLiteral)try{return t.valueToLiteral(i)}catch{return}return Wk(i)}function Wk(i){if(i==null)return{kind:W.NULL};switch(typeof i){case"boolean":return{kind:W.BOOLEAN,value:i};case"string":return{kind:W.STRING,value:i,block:!1};case"bigint":return{kind:W.INT,value:i.toString()};case"number":{if(!Number.isFinite(i))return{kind:W.NULL};let e=String(i);return/^-?(?:0|[1-9][0-9]*)$/.test(e)?{kind:W.INT,value:e}:{kind:W.FLOAT,value:e}}case"object":{if(Up(i))return{kind:W.LIST,values:Array.from(i,Wk)};let e=i,t=[];for(let n of Object.keys(e)){let o=e[n];o!==void 0&&t.push({kind:W.OBJECT_FIELD,name:{kind:W.NAME,value:n},value:Wk(o)})}return{kind:W.OBJECT,fields:t}}}throw new TypeError(`Cannot convert value to AST: ${Xe(i)}.`)}var A9=D(()=>{Is();Lk();oA();so();So()});function ey(i,e,t){switch(i.kind){case W.VARIABLE:{let n=i.name.value,o=t?.sources[n];if(o){let s=o.value;if(s===void 0){let a=o.signature.default;return a!==void 0?a.literal:{kind:W.NULL}}return ey(s,e,o.fragmentVariableValues)}let r=e?.sources[n];if(r==null)return{kind:W.NULL};if(r.value===void 0){let s=r.signature.default;if(s!==void 0)return s.literal}return aA(r.value,r.signature.type)}case W.OBJECT:{let n=[];for(let o of i.fields){if(o.value.kind===W.VARIABLE){let s=t?.sources[o.value.name.value]??e?.sources[o.value.name.value];if(s?.value===void 0&&s?.signature.default===void 0)continue}let r=ey(o.value,e,t);n.push({...o,value:r})}return{...i,fields:n}}case W.LIST:{let n=[];for(let o of i.values){let r=ey(o,e,t);n.push(r)}return{...i,values:n}}default:return i}}var DX=D(()=>{so();A9()});function dS(i,e,t,n){return v9(i,e,t,n,void 0)}function v9(i,e,t,n,o){if(Si(e)){if(i===void 0){uS(t,`Expected a value of non-null type "${e}" to be provided.`,o);return}if(i===null){uS(t,`Expected value of non-null type "${e}" not to be null.`,o);return}return v9(i,e.ofType,t,n,o)}if(i!=null)if(Cn(e))if(!Up(i))v9(i,e.ofType,t,n,o);else{let r=0;for(let s of i)v9(s,e.ofType,t,n,fd(o,r++,void 0))}else if(Bi(e)){if(!Ma(i)||Array.isArray(i)){uS(t,`Expected value of type "${e}" to be an object, found: ${Xe(i)}.`,o);return}let r=e.getFields();for(let a of Object.values(r)){let l=i[a.name];l===void 0?Gh(a)&&uS(t,`Expected value of type "${e}" to include required field "${a.name}", found: ${Xe(i)}.`,o):v9(l,a.type,t,n,fd(o,a.name,e.name))}let s=[];for(let a of Object.keys(i))if(i[a]!==void 0){if(!Object.hasOwn(r,a)){let l=n?"":Wh(Qf(a,Object.keys(r)));uS(t,`Expected value of type "${e}" not to include unknown field "${a}"${l?`.${l} Found`:", found"}: ${Xe(i)}.`,o);continue}s.push(a)}if(e.isOneOf){s.length!==1&&uS(t,TX(e),o);let a=s[0];i[a]===null&&uS(t,TX(e),fd(o,a,e.name))}}else{ng(e);let r,s;try{r=e.coerceInputValue(i,n)}catch(a){if(a instanceof Se){t(a,Ls(o));return}s=a}r===void 0&&uS(t,`Expected value of type "${e}"${s!=null?`, but encountered error "${HXe(s)}"; found`:", found"}: ${Xe(i)}.`,o,Ac(s))}}function uS(i,e,t,n){i(new Se(e,{originalError:n}),Ls(t))}function Qw(i,e,t,n,o,r){return y9({static:!n&&!o,onError:t,variables:n,fragmentVariableValues:o},i,e,r,void 0)}function y9(i,e,t,n,o){if(e.kind===W.VARIABLE){if(i.static)return;let s=VXe(i,e)?.coerced[e.name.value];Si(t)&&(s===void 0?lA(i.onError,`Expected variable "$${e.name.value}" provided to type "${t}" to provide a runtime value.`,e,o):s===null&&lA(i.onError,`Expected variable "$${e.name.value}" provided to non-null type "${t}" not to be null.`,e,o));return}if(Si(t)){if(e.kind===W.NULL){lA(i.onError,`Expected value of non-null type "${t}" not to be null.`,e,o);return}return y9(i,e,t.ofType,n,o)}if(e.kind!==W.NULL)if(Cn(t))if(e.kind!==W.LIST)y9(i,e,t.ofType,n,o);else{let r=0;for(let s of e.values)y9(i,s,t.ofType,n,fd(o,r++,void 0))}else if(Bi(t)){if(e.kind!==W.OBJECT){lA(i.onError,`Expected value of type "${t}" to be an object, found: ${Rn(e)}.`,e,o);return}let r=t.getFields(),s=Hw(e.fields,c=>c.name.value);for(let c of Object.values(r)){let u=s[c.name];if(u===void 0)Gh(c)&&lA(i.onError,`Expected value of type "${t}" to include required field "${c.name}", found: ${Rn(e)}.`,e,o);else{let d=u.value;if(d.kind===W.VARIABLE&&!i.static){let h=VXe(i,d),f=d.name.value,p=h?.coerced[f];if(t.isOneOf)p===void 0?lA(i.onError,`Expected variable "$${f}" provided to field "${c.name}" for OneOf Input Object type "${t}" to provide a runtime value.`,e,o):p===null&&lA(i.onError,`Expected variable "$${f}" provided to field "${c.name}" for OneOf Input Object type "${t}" not to be null.`,e,o);else if(p===void 0&&!Gh(c))continue}y9(i,d,c.type,n,fd(o,c.name,t.name))}}let a=e.fields,l=[];for(let c of a){let u=c.name.value;if(Object.hasOwn(r,u))l.push(c);else{let d=n?"":Wh(Qf(u,Object.keys(r)));lA(i.onError,`Expected value of type "${t}" not to include unknown field "${u}"${d?`.${d} Found`:", found"}: ${Rn(e)}.`,c,o)}}if(t.isOneOf){if(l.length!==1){lA(i.onError,TX(t),e,o);return}if(l[0].value.kind===W.NULL){let d=l[0].name.value;lA(i.onError,TX(t),e,fd(o,d,void 0))}}}else{ng(t);let r,s;try{r=t.coerceInputLiteral?t.coerceInputLiteral(ey(e,i.variables,i.fragmentVariableValues),n):t.parseLiteral(e,void 0,n)}catch(a){if(a instanceof Se){i.onError(a,Ls(o));return}s=a}r===void 0&&lA(i.onError,`Expected value of type "${t}"${s!=null?`, but encountered error "${HXe(s)}"; found`:", found"}: ${Rn(e)}.`,e,o,Ac(s))}}function VXe(i,e){let t=e.name.value,{fragmentVariableValues:n,variables:o}=i;return n?.sources[t]?n:o}function lA(i,e,t,n,o){i(new Se(e,{nodes:t,originalError:o}),Ls(n))}function HXe(i){if(Ma(i)){let e=i.message;if(typeof e=="string"&&e!=="")return e}return String(i)}function TX(i){return`Within OneOf Input Object type "${i}", exactly one field must be specified, and the value for that field must be non-null.`}var w9=D(()=>{Rk();Is();Lk();oA();o9();cS();Fk();sS();Ki();so();tg();So();DX()});var pi,VR=D(()=>{pi={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"}});function Gw(i){return Nb.some(({name:e})=>i.name===e)}function x9(i){if(Ma(i)){if(typeof i.valueOf=="function"){let e=i.valueOf();if(!Ma(e))return e}if(typeof i.toJSON=="function")return i.toJSON()}return i}function WXe(i){if(!Number.isInteger(i))throw new Se(`Int cannot represent non-integer value: ${Xe(i)}`);if(i>hS||ihS||ehS||i{Is();oA();Ki();so();tg();A9();So();hS=2147483647,fS=-2147483648,HR=new dd({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",coerceOutputValue(i){let e=x9(i);if(typeof e=="number")return WXe(e);if(typeof e=="boolean")return e?1:0;if(typeof e=="string")return kGt(e);if(typeof e=="bigint")return UXe(e);throw new Se(`Int cannot represent non-integer value: ${Xe(e)}`)},coerceInputValue(i){if(typeof i=="number")return WXe(i);if(typeof i=="bigint")return UXe(i);throw new Se(`Int cannot represent non-integer value: ${Xe(i)}`)},coerceInputLiteral(i){if(i.kind!==W.INT)throw new Se(`Int cannot represent non-integer value: ${Rn(i)}`,{nodes:i});let e=parseInt(i.value,10);if(e>hS||e=fS)return{kind:W.INT,value:String(i)}}}),WR=new dd({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",coerceOutputValue(i){let e=x9(i);if(typeof e=="number")return jXe(e);if(typeof e=="boolean")return e?1:0;if(typeof e=="string")return IGt(e);if(typeof e=="bigint")return QXe(e);throw new Se(`Float cannot represent non numeric value: ${Xe(e)}`)},coerceInputValue(i){if(typeof i=="number")return jXe(i);if(typeof i=="bigint")return QXe(i);throw new Se(`Float cannot represent non numeric value: ${Xe(i)}`)},coerceInputLiteral(i){if(i.kind!==W.FLOAT&&i.kind!==W.INT)throw new Se(`Float cannot represent non numeric value: ${Rn(i)}`,{nodes:i});return parseFloat(i.value)},valueToLiteral(i){let e=Wk(i);if(e.kind===W.FLOAT||e.kind===W.INT)return e}}),ws=new dd({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",coerceOutputValue(i){let e=x9(i);if(typeof e=="string")return e;if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number")return LGt(e);if(typeof e=="bigint")return String(e);throw new Se(`String cannot represent value: ${Xe(i)}`)},coerceInputValue(i){if(typeof i!="string")throw new Se(`String cannot represent a non string value: ${Xe(i)}`);return i},coerceInputLiteral(i){if(i.kind!==W.STRING)throw new Se(`String cannot represent a non string value: ${Rn(i)}`,{nodes:i});return i.value},valueToLiteral(i){let e=Wk(i);if(e.kind===W.STRING)return e}}),Gl=new dd({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",coerceOutputValue(i){let e=x9(i);if(typeof e=="boolean")return e;if(typeof e=="number")return NGt(e);if(typeof e=="bigint")return e!==0n;throw new Se(`Boolean cannot represent a non boolean value: ${Xe(e)}`)},coerceInputValue(i){if(typeof i!="boolean")throw new Se(`Boolean cannot represent a non boolean value: ${Xe(i)}`);return i},coerceInputLiteral(i){if(i.kind!==W.BOOLEAN)throw new Se(`Boolean cannot represent a non boolean value: ${Rn(i)}`,{nodes:i});return i.value},valueToLiteral(i){let e=Wk(i);if(e.kind===W.BOOLEAN)return e}}),UR=new dd({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',coerceOutputValue(i){let e=x9(i);if(typeof e=="string")return e;if(typeof e=="number")return txe(e);if(typeof e=="bigint")return String(e);throw new Se(`ID cannot represent value: ${Xe(i)}`)},coerceInputValue(i){if(typeof i=="string")return i;if(typeof i=="number")return txe(i);if(typeof i=="bigint")return String(i);throw new Se(`ID cannot represent value: ${Xe(i)}`)},coerceInputLiteral(i){if(i.kind!==W.STRING&&i.kind!==W.INT)throw new Se("ID cannot represent a non-string and non-integer value: "+Rn(i),{nodes:i});return i.value},valueToLiteral(i){if(typeof i=="string")return/^-?(?:0|[1-9][0-9]*)$/.test(i)?{kind:W.INT,value:i}:{kind:W.STRING,value:i,block:!1};if(typeof i=="number")return{kind:W.INT,value:txe(i)};if(typeof i=="bigint")return{kind:W.INT,value:String(i)}}}),Nb=Object.freeze([ws,HR,WR,Gl,UR])});function pS(i){return Kc(i,GXe,wc)}function ixe(i){if(!pS(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL directive.`);return i}function gS(i){return qh.some(({name:e})=>e===i.name)}var GXe,wc,qw,Yw,uA,rg,jR,mS,QR,GR,qXe,qh,Xc=D(()=>{MR();Is();IR();oA();a9();gX();VR();yX();So();cA();GXe=Symbol("Directive");wc=class{constructor(e){this.__kind=GXe,this.name=Uh(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=e.isRepeatable??!1,this.deprecationReason=e.deprecationReason,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],Array.isArray(e.locations)||jp(!1,`@${this.name} locations must be an Array.`);let t=e.args??{};Ma(t)&&!Array.isArray(t)||jp(!1,`@${this.name} args must be an object with argument names as keys.`),this.args=Object.entries(t).map(([n,o])=>new FR(this,n,o))}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:rA(this.args,e=>e.name,e=>e.toConfig()),isRepeatable:this.isRepeatable,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return"@"+this.name}toJSON(){return this.toString()}},qw=new wc({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[pi.FIELD,pi.FRAGMENT_SPREAD,pi.INLINE_FRAGMENT],args:{if:{type:new Pi(Gl),description:"Included when true."}}}),Yw=new wc({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[pi.FIELD,pi.FRAGMENT_SPREAD,pi.INLINE_FRAGMENT],args:{if:{type:new Pi(Gl),description:"Skipped when true."}}}),uA=new wc({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[pi.FRAGMENT_SPREAD,pi.INLINE_FRAGMENT],args:{if:{type:new Pi(Gl),description:"Deferred when true or undefined.",default:{value:!0}},label:{type:ws,description:"Unique name"}}}),rg=new wc({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[pi.FIELD],args:{initialCount:{default:{value:0},type:new Pi(HR),description:"Number of items to return immediately"},if:{type:new Pi(Gl),description:"Stream when true or undefined.",default:{value:!0}},label:{type:ws,description:"Unique name"}}}),jR="No longer supported",mS=new wc({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[pi.FIELD_DEFINITION,pi.ARGUMENT_DEFINITION,pi.INPUT_FIELD_DEFINITION,pi.ENUM_VALUE,pi.DIRECTIVE_DEFINITION],args:{reason:{type:new Pi(ws),description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",default:{value:jR}}}}),QR=new wc({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[pi.SCALAR],args:{url:{type:new Pi(ws),description:"The URL that specifies the behavior of this scalar."}}}),GR=new wc({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[pi.INPUT_OBJECT],args:{}}),qXe=new wc({name:"experimental_disableErrorPropagation",description:"Disables error propagation.",locations:[pi.QUERY,pi.MUTATION,pi.SUBSCRIPTION]}),qh=Object.freeze([qw,Yw,mS,QR,GR])});function dA(i,e){if(Si(e)){let t=dA(i,e.ofType);return t?.kind===W.NULL?null:t}if(i===null)return{kind:W.NULL};if(i===void 0)return null;if(Cn(e)){let t=e.ofType;if(Up(i)){let n=[];for(let o of i){let r=dA(o,t);r!=null&&n.push(r)}return{kind:W.LIST,values:n}}return dA(i,t)}if(Bi(e)){if(!Ma(i))return null;let t=[];for(let n of Object.values(e.getFields())){let o=dA(i[n.name],n.type);o&&t.push({kind:W.OBJECT_FIELD,name:{kind:W.NAME,value:n.name},value:o})}return{kind:W.OBJECT,fields:t}}if(hd(e)){let t=e.coerceOutputValue(i);if(t==null)return null;if(typeof t=="boolean")return{kind:W.BOOLEAN,value:t};if(typeof t=="number"&&Number.isFinite(t)){let n=String(t);return YXe.test(n)?{kind:W.INT,value:n}:{kind:W.FLOAT,value:n}}if(typeof t=="bigint")return{kind:W.INT,value:String(t)};if(typeof t=="string")return Oo(e)?{kind:W.ENUM,value:t}:e===UR&&YXe.test(t)?{kind:W.INT,value:t}:{kind:W.STRING,value:t};throw new TypeError(`Cannot convert value to AST: ${Xe(t)}.`)}Di(!1,"Unexpected input type: "+Xe(e))}var YXe,nxe=D(()=>{Is();Za();Lk();oA();so();So();cA();YXe=/^-?(?:0|[1-9][0-9]*)$/});function qR(i){let e=i.type,t=i.default;if(t){let o=t.literal??aA(t.value,e);return o==null&&Di(!1,"Invalid default value"),o}let n=i.defaultValue;if(n!==void 0){let o=dA(n,e);return o==null&&Di(!1,"Invalid default value"),o}}var kX=D(()=>{Za();nxe();A9()});function Rb(i){return Mb.some(({name:e})=>i.name===e)}var Uk,C9,_9,qp,S9,jk,E9,xs,D9,Kw,Jw,Xw,Mb,ty=D(()=>{Is();Za();VR();tg();kX();So();cA();Uk=new vc({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:ws,resolve:i=>i.description},types:{description:"A list of all types supported by this server.",type:new Pi(new Ks(new Pi(qp))),resolve(i){return Object.values(i.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Pi(qp),resolve:i=>i.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:qp,resolve:i=>i.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:qp,resolve:i=>i.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Pi(new Ks(new Pi(C9))),args:{includeDeprecated:{type:new Pi(Gl),default:{value:!1}}},resolve:(i,{includeDeprecated:e})=>e===!0?i.getDirectives():i.getDirectives().filter(t=>t.deprecationReason==null)}})}),C9=new vc({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new Mi.GraphQLNonNull(js.GraphQLString),resolve:function(t){return t.name}},description:{type:js.GraphQLString,resolve:function(t){return t.description}},isRepeatable:{type:new Mi.GraphQLNonNull(js.GraphQLBoolean),resolve:function(t){return t.isRepeatable}},locations:{type:new Mi.GraphQLNonNull(new Mi.GraphQLList(new Mi.GraphQLNonNull(cwe))),resolve:function(t){return t.locations}},args:{type:new Mi.GraphQLNonNull(new Mi.GraphQLList(new Mi.GraphQLNonNull(R6))),args:{includeDeprecated:{type:js.GraphQLBoolean,defaultValue:!1}},resolve:function(t,n){var r=n.includeDeprecated;return r?t.args:t.args.filter(function(o){return o.deprecationReason==null})}}}}});ys.__Directive=lwe;var cwe=new Mi.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:Lu.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Lu.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Lu.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Lu.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Lu.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Lu.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Lu.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Lu.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Lu.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Lu.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Lu.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Lu.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Lu.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Lu.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Lu.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Lu.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Lu.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Lu.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Lu.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});ys.__DirectiveLocation=cwe;var vb=new Mi.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new Mi.GraphQLNonNull(hwe),resolve:function(t){if((0,Mi.isScalarType)(t))return Gd.SCALAR;if((0,Mi.isObjectType)(t))return Gd.OBJECT;if((0,Mi.isInterfaceType)(t))return Gd.INTERFACE;if((0,Mi.isUnionType)(t))return Gd.UNION;if((0,Mi.isEnumType)(t))return Gd.ENUM;if((0,Mi.isInputObjectType)(t))return Gd.INPUT_OBJECT;if((0,Mi.isListType)(t))return Gd.LIST;if((0,Mi.isNonNullType)(t))return Gd.NON_NULL;(0,yJt.default)(0,'Unexpected type: "'.concat((0,AJt.default)(t),'".'))}},name:{type:js.GraphQLString,resolve:function(t){return t.name!==void 0?t.name:void 0}},description:{type:js.GraphQLString,resolve:function(t){return t.description!==void 0?t.description:void 0}},specifiedByUrl:{type:js.GraphQLString,resolve:function(t){return t.specifiedByUrl!==void 0?t.specifiedByUrl:void 0}},fields:{type:new Mi.GraphQLList(new Mi.GraphQLNonNull(uwe)),args:{includeDeprecated:{type:js.GraphQLBoolean,defaultValue:!1}},resolve:function(t,n){var r=n.includeDeprecated;if((0,Mi.isObjectType)(t)||(0,Mi.isInterfaceType)(t)){var o=(0,owe.default)(t.getFields());return r?o:o.filter(function(s){return s.deprecationReason==null})}}},interfaces:{type:new Mi.GraphQLList(new Mi.GraphQLNonNull(vb)),resolve:function(t){if((0,Mi.isObjectType)(t)||(0,Mi.isInterfaceType)(t))return t.getInterfaces()}},possibleTypes:{type:new Mi.GraphQLList(new Mi.GraphQLNonNull(vb)),resolve:function(t,n,r,o){var s=o.schema;if((0,Mi.isAbstractType)(t))return s.getPossibleTypes(t)}},enumValues:{type:new Mi.GraphQLList(new Mi.GraphQLNonNull(dwe)),args:{includeDeprecated:{type:js.GraphQLBoolean,defaultValue:!1}},resolve:function(t,n){var r=n.includeDeprecated;if((0,Mi.isEnumType)(t)){var o=t.getValues();return r?o:o.filter(function(s){return s.deprecationReason==null})}}},inputFields:{type:new Mi.GraphQLList(new Mi.GraphQLNonNull(R6)),args:{includeDeprecated:{type:js.GraphQLBoolean,defaultValue:!1}},resolve:function(t,n){var r=n.includeDeprecated;if((0,Mi.isInputObjectType)(t)){var o=(0,owe.default)(t.getFields());return r?o:o.filter(function(s){return s.deprecationReason==null})}}},ofType:{type:vb,resolve:function(t){return t.ofType!==void 0?t.ofType:void 0}}}}});ys.__Type=vb;var uwe=new Mi.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new Mi.GraphQLNonNull(js.GraphQLString),resolve:function(t){return t.name}},description:{type:js.GraphQLString,resolve:function(t){return t.description}},args:{type:new Mi.GraphQLNonNull(new Mi.GraphQLList(new Mi.GraphQLNonNull(R6))),args:{includeDeprecated:{type:js.GraphQLBoolean,defaultValue:!1}},resolve:function(t,n){var r=n.includeDeprecated;return r?t.args:t.args.filter(function(o){return o.deprecationReason==null})}},type:{type:new Mi.GraphQLNonNull(vb),resolve:function(t){return t.type}},isDeprecated:{type:new Mi.GraphQLNonNull(js.GraphQLBoolean),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:js.GraphQLString,resolve:function(t){return t.deprecationReason}}}}});ys.__Field=uwe;var R6=new Mi.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new Mi.GraphQLNonNull(js.GraphQLString),resolve:function(t){return t.name}},description:{type:js.GraphQLString,resolve:function(t){return t.description}},type:{type:new Mi.GraphQLNonNull(vb),resolve:function(t){return t.type}},defaultValue:{type:js.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(t){var n=t.type,r=t.defaultValue,o=(0,xJt.astFromValue)(r,n);return o?(0,wJt.print)(o):null}},isDeprecated:{type:new Mi.GraphQLNonNull(js.GraphQLBoolean),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:js.GraphQLString,resolve:function(t){return t.deprecationReason}}}}});ys.__InputValue=R6;var dwe=new Mi.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new Mi.GraphQLNonNull(js.GraphQLString),resolve:function(t){return t.name}},description:{type:js.GraphQLString,resolve:function(t){return t.description}},isDeprecated:{type:new Mi.GraphQLNonNull(js.GraphQLBoolean),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:js.GraphQLString,resolve:function(t){return t.deprecationReason}}}}});ys.__EnumValue=dwe;var Gd=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"});ys.TypeKind=Gd;var hwe=new Mi.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Gd.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Gd.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Gd.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Gd.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Gd.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Gd.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Gd.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Gd.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});ys.__TypeKind=hwe;var CJt={name:"__schema",type:new Mi.GraphQLNonNull(awe),description:"Access the current type schema of this server.",args:[],resolve:function(e,t,n,r){var o=r.schema;return o},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0};ys.SchemaMetaFieldDef=CJt;var _Jt={name:"__type",type:vb,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Mi.GraphQLNonNull(js.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(e,t,n,r){var o=t.name,s=r.schema;return s.getType(o)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0};ys.TypeMetaFieldDef=_Jt;var SJt={name:"__typename",type:new Mi.GraphQLNonNull(js.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,t,n,r){var o=r.parentType;return o.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0};ys.TypeNameMetaFieldDef=SJt;var BXe=Object.freeze([awe,lwe,cwe,vb,uwe,R6,dwe,hwe]);ys.introspectionTypes=BXe;function EJt(i){return BXe.some(function(e){var t=e.name;return i.name===t})}});var Ip=Ue(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.isDirective=HXe;Nu.assertDirective=RJt;Nu.isSpecifiedDirective=FJt;Nu.specifiedDirectives=Nu.GraphQLSpecifiedByDirective=Nu.GraphQLDeprecatedDirective=Nu.DEFAULT_DEPRECATION_REASON=Nu.GraphQLSkipDirective=Nu.GraphQLIncludeDirective=Nu.GraphQLDirective=void 0;var DJt=mk(oR()),TJt=NA(),kJt=mk(Oo()),zXe=mk(rJ()),fwe=mk(gb()),IJt=mk(g6()),LJt=mk(LA()),NJt=mk(UK()),Y0=eR(),yJ=FA(),wJ=po();function mk(i){return i&&i.__esModule?i:{default:i}}function VXe(i,e){for(var t=0;t{"use strict";Object.defineProperty(dR,"__esModule",{value:!0});dR.isSchema=JXe;dR.assertSchema=jJt;dR.GraphQLSchema=void 0;var OJt=G_(rR()),PJt=G_($1e()),pwe=G_(Vm()),BJt=NA(),mwe=G_(Oo()),zJt=G_(rJ()),xJ=G_(gb()),VJt=G_(g6()),HJt=G_(LA()),WJt=Ab(),YXe=Ip(),K0=po();function G_(i){return i&&i.__esModule?i:{default:i}}function KXe(i,e){for(var t=0;t{"use strict";Object.defineProperty(CJ,"__esModule",{value:!0});CJ.validateSchema=rZe;CJ.assertValidSchema=JJt;var ZXe=bwe(rR()),O6=bwe(Vm()),Fh=bwe(Oo()),QJt=dn(),GJt=y6(),qJt=D1e(),$Xe=D6(),YJt=bk(),KJt=Ab(),nZe=Ip(),mc=po();function bwe(i){return i&&i.__esModule?i:{default:i}}function rZe(i){if((0,YJt.assertSchema)(i),i.__validationErrors)return i.__validationErrors;var e=new XJt(i);ZJt(e),$Jt(e),eXt(e);var t=e.getErrors();return i.__validationErrors=t,t}function JJt(i){var e=rZe(i);if(e.length!==0)throw new Error(e.map(function(t){return t.message}).join(` +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new Pi(ws),resolve:i=>i.name},description:{type:ws,resolve:i=>i.description},isRepeatable:{type:new Pi(Gl),resolve:i=>i.isRepeatable},locations:{type:new Pi(new Ks(new Pi(_9))),resolve:i=>i.locations},args:{type:new Pi(new Ks(new Pi(jk))),args:{includeDeprecated:{type:new Pi(Gl),default:{value:!1}}},resolve(i,{includeDeprecated:e}){return e===!0?i.args:i.args.filter(t=>t.deprecationReason==null)}},isDeprecated:{type:new Pi(Gl),resolve:i=>i.deprecationReason!=null},deprecationReason:{type:ws,resolve:i=>i.deprecationReason}})}),_9=new th({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:pi.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:pi.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:pi.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:pi.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:pi.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:pi.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:pi.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:pi.VARIABLE_DEFINITION,description:"Location adjacent to an operation variable definition."},FRAGMENT_VARIABLE_DEFINITION:{value:pi.FRAGMENT_VARIABLE_DEFINITION,description:"Location adjacent to a fragment variable definition."},SCHEMA:{value:pi.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:pi.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:pi.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:pi.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:pi.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:pi.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:pi.UNION,description:"Location adjacent to a union definition."},ENUM:{value:pi.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:pi.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:pi.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:pi.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."},DIRECTIVE_DEFINITION:{value:pi.DIRECTIVE_DEFINITION,description:"Location adjacent to a directive definition."}}}),qp=new vc({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Pi(D9),resolve(i){if(yc(i))return xs.SCALAR;if(en(i))return xs.OBJECT;if(cn(i))return xs.INTERFACE;if(ys(i))return xs.UNION;if(Oo(i))return xs.ENUM;if(Bi(i))return xs.INPUT_OBJECT;if(Cn(i))return xs.LIST;if(Si(i))return xs.NON_NULL;Di(!1,`Unexpected type: "${Xe(i)}".`)}},name:{type:ws,resolve:i=>"name"in i?i.name:void 0},description:{type:ws,resolve:i=>"description"in i?i.description:void 0},specifiedByURL:{type:ws,resolve:i=>"specifiedByURL"in i?i.specifiedByURL:void 0},fields:{type:new Ks(new Pi(S9)),args:{includeDeprecated:{type:new Pi(Gl),default:{value:!1}}},resolve(i,{includeDeprecated:e}){if(en(i)||cn(i)){let t=Object.values(i.getFields());return e===!0?t:t.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new Ks(new Pi(qp)),resolve(i){if(en(i)||cn(i))return i.getInterfaces()}},possibleTypes:{type:new Ks(new Pi(qp)),resolve(i,e,t,{schema:n}){if(zu(i))return n.getPossibleTypes(i)}},enumValues:{type:new Ks(new Pi(E9)),args:{includeDeprecated:{type:new Pi(Gl),default:{value:!1}}},resolve(i,{includeDeprecated:e}){if(Oo(i)){let t=i.getValues();return e===!0?t:t.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new Ks(new Pi(jk)),args:{includeDeprecated:{type:new Pi(Gl),default:{value:!1}}},resolve(i,{includeDeprecated:e}){if(Bi(i)){let t=Object.values(i.getFields());return e===!0?t:t.filter(n=>n.deprecationReason==null)}}},ofType:{type:qp,resolve:i=>"ofType"in i?i.ofType:void 0},isOneOf:{type:Gl,resolve:i=>{if(Bi(i))return i.isOneOf}}})}),S9=new vc({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Pi(ws),resolve:i=>i.name},description:{type:ws,resolve:i=>i.description},args:{type:new Pi(new Ks(new Pi(jk))),args:{includeDeprecated:{type:new Pi(Gl),default:{value:!1}}},resolve(i,{includeDeprecated:e}){return e===!0?i.args:i.args.filter(t=>t.deprecationReason==null)}},type:{type:new Pi(qp),resolve:i=>i.type},isDeprecated:{type:new Pi(Gl),resolve:i=>i.deprecationReason!=null},deprecationReason:{type:ws,resolve:i=>i.deprecationReason}})}),jk=new vc({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Pi(ws),resolve:i=>i.name},description:{type:ws,resolve:i=>i.description},type:{type:new Pi(qp),resolve:i=>i.type},defaultValue:{type:ws,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(i){let e=qR(i);return e?Rn(e):null}},isDeprecated:{type:new Pi(Gl),resolve:i=>i.deprecationReason!=null},deprecationReason:{type:ws,resolve:i=>i.deprecationReason}})}),E9=new vc({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Pi(ws),resolve:i=>i.name},description:{type:ws,resolve:i=>i.description},isDeprecated:{type:new Pi(Gl),resolve:i=>i.deprecationReason!=null},deprecationReason:{type:ws,resolve:i=>i.deprecationReason}})}),xs={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},D9=new th({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:xs.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:xs.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:xs.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:xs.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:xs.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:xs.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:xs.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:xs.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Kw=new lS(void 0,"__schema",{type:new Pi(Uk),description:"Access the current type schema of this server.",resolve:(i,e,t,{schema:n})=>n}),Jw=new lS(void 0,"__type",{type:qp,description:"Request the type information of a single type.",args:{name:{type:new Pi(ws)}},resolve:(i,{name:e},t,{schema:n})=>n.getType(e)}),Xw=new lS(void 0,"__typename",{type:new Pi(ws),description:"The name of the current Object type at runtime.",resolve:(i,e,t,{parentType:n})=>n.name}),Mb=Object.freeze([Uk,C9,_9,qp,S9,jk,E9,D9])});function YR(i){return Kc(i,KXe,Yp)}function Qk(i){if(!YR(i))throw new Error(`Expected ${Xe(i)} to be a GraphQL schema.`);return i}function hA(i,e){let t=Vr(i);if(!e.has(t)){if(e.add(t),ys(t))for(let n of t.getTypes())hA(n,e);else if(en(t)||cn(t)){for(let n of t.getInterfaces())hA(n,e);for(let n of Object.values(t.getFields())){hA(n.type,e);for(let o of n.args)hA(o.type,e)}}else if(Bi(t))for(let n of Object.values(t.getFields()))hA(n.type,e)}return e}var KXe,Yp,Gk=D(()=>{Is();IR();gX();eh();So();Xc();ty();KXe=Symbol("Schema"),Yp=class{constructor(e){this.__kind=KXe,this.assumeValid=e.assumeValid??!1,this.__validationErrors=e.assumeValid===!0?[]:void 0,this.description=e.description,this.extensions=Gf(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes??[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=e.directives??qh;let t=new Set(e.types);if(e.types!=null)for(let n of e.types)t.delete(n),hA(n,t);this._queryType!=null&&hA(this._queryType,t),this._mutationType!=null&&hA(this._mutationType,t),this._subscriptionType!=null&&hA(this._subscriptionType,t);for(let n of this._directives)if(pS(n))for(let o of n.args)hA(o.type,t);hA(Uk,t),this._typeMap=Object.create(null),this._subTypeMap=new Map,this._implementationsMap=Object.create(null);for(let n of t){if(n==null)continue;let o=n.name;if(this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=n,cn(n)){for(let r of n.getInterfaces())if(cn(r)){let s=this._implementationsMap[r.name];s??=this._implementationsMap[r.name]={objects:[],interfaces:[]},s.interfaces.push(n)}}else if(en(n)){for(let r of n.getInterfaces())if(cn(r)){let s=this._implementationsMap[r.name];s??=this._implementationsMap[r.name]={objects:[],interfaces:[]},s.objects.push(n)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case Ar.QUERY:return this.getQueryType();case Ar.MUTATION:return this.getMutationType();case Ar.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return ys(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){return this._implementationsMap[e.name]??{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap.get(e);if(n===void 0){if(ys(e))n=new Set(e.getTypes());else{let o=this.getImplementations(e);n=new Set([...o.objects,...o.interfaces])}this._subTypeMap.set(e,n)}return n.has(t)}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(t=>t.name===e)}getField(e,t){switch(t){case Kw.name:return this.getQueryType()===e?Kw:void 0;case Jw.name:return this.getQueryType()===e?Jw:void 0;case Xw.name:return Xw}if("getFields"in e)return e.getFields()[t]}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.assumeValid}}}});function bS(i){if(Qk(i),i.__validationErrors)return i.__validationErrors;let e=new oxe(i);MGt(e),RGt(e),FGt(e);let t=e.getErrors();return i.__validationErrors=t,t}function Yk(i){let e=bS(i);if(e.length!==0)throw new Error(e.map(t=>t.message).join(` -`))}var XJt=(function(){function i(t){this._errors=[],this.schema=t}var e=i.prototype;return e.reportError=function(n,r){var o=Array.isArray(r)?r.filter(Boolean):r;this.addError(new QJt.GraphQLError(n,o))},e.addError=function(n){this._errors.push(n)},e.getErrors=function(){return this._errors},i})();function ZJt(i){var e=i.schema,t=e.getQueryType();if(!t)i.reportError("Query root type must be provided.",e.astNode);else if(!(0,mc.isObjectType)(t)){var n;i.reportError("Query root type must be Object type, it cannot be ".concat((0,Fh.default)(t),"."),(n=gwe(e,"query"))!==null&&n!==void 0?n:t.astNode)}var r=e.getMutationType();if(r&&!(0,mc.isObjectType)(r)){var o;i.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat((0,Fh.default)(r),"."),(o=gwe(e,"mutation"))!==null&&o!==void 0?o:r.astNode)}var s=e.getSubscriptionType();if(s&&!(0,mc.isObjectType)(s)){var a;i.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat((0,Fh.default)(s),"."),(a=gwe(e,"subscription"))!==null&&a!==void 0?a:s.astNode)}}function gwe(i,e){for(var t=vwe(i,function(o){return o.operationTypes}),n=0;n{"use strict";Object.defineProperty(xwe,"__esModule",{value:!0});xwe.typeFromAST=wwe;var aXt=sZe(Oo()),lXt=sZe(Qd()),ywe=Ds(),oZe=po();function sZe(i){return i&&i.__esModule?i:{default:i}}function wwe(i,e){var t;if(e.kind===ywe.Kind.LIST_TYPE)return t=wwe(i,e.type),t&&new oZe.GraphQLList(t);if(e.kind===ywe.Kind.NON_NULL_TYPE)return t=wwe(i,e.type),t&&new oZe.GraphQLNonNull(t);if(e.kind===ywe.Kind.NAMED_TYPE)return i.getType(e.name.value);(0,lXt.default)(0,"Unexpected type node: "+(0,aXt.default)(e))}});var _J=Ue(B6=>{"use strict";Object.defineProperty(B6,"__esModule",{value:!0});B6.visitWithTypeInfo=pXt;B6.TypeInfo=void 0;var cXt=dXt(rR()),Hl=Ds(),uXt=ZM(),aZe=O_(),Wl=po(),fR=Ab(),lZe=OA();function dXt(i){return i&&i.__esModule?i:{default:i}}var hXt=(function(){function i(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??fXt,r&&((0,Wl.isInputType)(r)&&this._inputTypeStack.push(r),(0,Wl.isCompositeType)(r)&&this._parentTypeStack.push(r),(0,Wl.isOutputType)(r)&&this._typeStack.push(r))}var e=i.prototype;return e.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},e.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},e.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},e.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},e.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},e.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},e.getDirective=function(){return this._directive},e.getArgument=function(){return this._argument},e.getEnumValue=function(){return this._enumValue},e.enter=function(n){var r=this._schema;switch(n.kind){case Hl.Kind.SELECTION_SET:{var o=(0,Wl.getNamedType)(this.getType());this._parentTypeStack.push((0,Wl.isCompositeType)(o)?o:void 0);break}case Hl.Kind.FIELD:{var s=this.getParentType(),a,l;s&&(a=this._getFieldDef(r,s,n),a&&(l=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,Wl.isOutputType)(l)?l:void 0);break}case Hl.Kind.DIRECTIVE:this._directive=r.getDirective(n.name.value);break;case Hl.Kind.OPERATION_DEFINITION:{var c;switch(n.operation){case"query":c=r.getQueryType();break;case"mutation":c=r.getMutationType();break;case"subscription":c=r.getSubscriptionType();break}this._typeStack.push((0,Wl.isObjectType)(c)?c:void 0);break}case Hl.Kind.INLINE_FRAGMENT:case Hl.Kind.FRAGMENT_DEFINITION:{var u=n.typeCondition,d=u?(0,lZe.typeFromAST)(r,u):(0,Wl.getNamedType)(this.getType());this._typeStack.push((0,Wl.isOutputType)(d)?d:void 0);break}case Hl.Kind.VARIABLE_DEFINITION:{var h=(0,lZe.typeFromAST)(r,n.type);this._inputTypeStack.push((0,Wl.isInputType)(h)?h:void 0);break}case Hl.Kind.ARGUMENT:{var f,p,g,v=(f=this.getDirective())!==null&&f!==void 0?f:this.getFieldDef();v&&(p=(0,cXt.default)(v.args,function(L){return L.name===n.name.value}),p&&(g=p.type)),this._argument=p,this._defaultValueStack.push(p?p.defaultValue:void 0),this._inputTypeStack.push((0,Wl.isInputType)(g)?g:void 0);break}case Hl.Kind.LIST:{var A=(0,Wl.getNullableType)(this.getInputType()),w=(0,Wl.isListType)(A)?A.ofType:A;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,Wl.isInputType)(w)?w:void 0);break}case Hl.Kind.OBJECT_FIELD:{var C=(0,Wl.getNamedType)(this.getInputType()),_,E;(0,Wl.isInputObjectType)(C)&&(E=C.getFields()[n.name.value],E&&(_=E.type)),this._defaultValueStack.push(E?E.defaultValue:void 0),this._inputTypeStack.push((0,Wl.isInputType)(_)?_:void 0);break}case Hl.Kind.ENUM:{var I=(0,Wl.getNamedType)(this.getInputType()),T;(0,Wl.isEnumType)(I)&&(T=I.getValue(n.value)),this._enumValue=T;break}}},e.leave=function(n){switch(n.kind){case Hl.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Hl.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Hl.Kind.DIRECTIVE:this._directive=null;break;case Hl.Kind.OPERATION_DEFINITION:case Hl.Kind.INLINE_FRAGMENT:case Hl.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Hl.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Hl.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Hl.Kind.LIST:case Hl.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Hl.Kind.ENUM:this._enumValue=null;break}},i})();B6.TypeInfo=hXt;function fXt(i,e,t){var n=t.name.value;if(n===fR.SchemaMetaFieldDef.name&&i.getQueryType()===e)return fR.SchemaMetaFieldDef;if(n===fR.TypeMetaFieldDef.name&&i.getQueryType()===e)return fR.TypeMetaFieldDef;if(n===fR.TypeNameMetaFieldDef.name&&(0,Wl.isCompositeType)(e))return fR.TypeNameMetaFieldDef;if((0,Wl.isObjectType)(e)||(0,Wl.isInterfaceType)(e))return e.getFields()[n]}function pXt(i,e){return{enter:function(n){i.enter(n);var r=(0,aZe.getVisitFn)(e,n.kind,!1);if(r){var o=r.apply(e,arguments);return o!==void 0&&(i.leave(n),(0,uXt.isNode)(o)&&i.enter(o)),o}},leave:function(n){var r=(0,aZe.getVisitFn)(e,n.kind,!0),o;return r&&(o=r.apply(e,arguments)),i.leave(n),o}}}});var Ak=Ue(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.isDefinitionNode=mXt;X0.isExecutableDefinitionNode=cZe;X0.isSelectionNode=gXt;X0.isValueNode=bXt;X0.isTypeNode=vXt;X0.isTypeSystemDefinitionNode=uZe;X0.isTypeDefinitionNode=dZe;X0.isTypeSystemExtensionNode=hZe;X0.isTypeExtensionNode=fZe;var Po=Ds();function mXt(i){return cZe(i)||uZe(i)||hZe(i)}function cZe(i){return i.kind===Po.Kind.OPERATION_DEFINITION||i.kind===Po.Kind.FRAGMENT_DEFINITION}function gXt(i){return i.kind===Po.Kind.FIELD||i.kind===Po.Kind.FRAGMENT_SPREAD||i.kind===Po.Kind.INLINE_FRAGMENT}function bXt(i){return i.kind===Po.Kind.VARIABLE||i.kind===Po.Kind.INT||i.kind===Po.Kind.FLOAT||i.kind===Po.Kind.STRING||i.kind===Po.Kind.BOOLEAN||i.kind===Po.Kind.NULL||i.kind===Po.Kind.ENUM||i.kind===Po.Kind.LIST||i.kind===Po.Kind.OBJECT}function vXt(i){return i.kind===Po.Kind.NAMED_TYPE||i.kind===Po.Kind.LIST_TYPE||i.kind===Po.Kind.NON_NULL_TYPE}function uZe(i){return i.kind===Po.Kind.SCHEMA_DEFINITION||dZe(i)||i.kind===Po.Kind.DIRECTIVE_DEFINITION}function dZe(i){return i.kind===Po.Kind.SCALAR_TYPE_DEFINITION||i.kind===Po.Kind.OBJECT_TYPE_DEFINITION||i.kind===Po.Kind.INTERFACE_TYPE_DEFINITION||i.kind===Po.Kind.UNION_TYPE_DEFINITION||i.kind===Po.Kind.ENUM_TYPE_DEFINITION||i.kind===Po.Kind.INPUT_OBJECT_TYPE_DEFINITION}function hZe(i){return i.kind===Po.Kind.SCHEMA_EXTENSION||fZe(i)}function fZe(i){return i.kind===Po.Kind.SCALAR_TYPE_EXTENSION||i.kind===Po.Kind.OBJECT_TYPE_EXTENSION||i.kind===Po.Kind.INTERFACE_TYPE_EXTENSION||i.kind===Po.Kind.UNION_TYPE_EXTENSION||i.kind===Po.Kind.ENUM_TYPE_EXTENSION||i.kind===Po.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var _we=Ue(Cwe=>{"use strict";Object.defineProperty(Cwe,"__esModule",{value:!0});Cwe.ExecutableDefinitionsRule=wXt;var AXt=dn(),pZe=Ds(),yXt=Ak();function wXt(i){return{Document:function(t){for(var n=0,r=t.definitions;n{"use strict";Object.defineProperty(Swe,"__esModule",{value:!0});Swe.UniqueOperationNamesRule=CXt;var xXt=dn();function CXt(i){var e=Object.create(null);return{OperationDefinition:function(n){var r=n.name;return r&&(e[r.value]?i.reportError(new xXt.GraphQLError('There can be only one operation named "'.concat(r.value,'".'),[e[r.value],r])):e[r.value]=r),!1},FragmentDefinition:function(){return!1}}}});var Twe=Ue(Dwe=>{"use strict";Object.defineProperty(Dwe,"__esModule",{value:!0});Dwe.LoneAnonymousOperationRule=EXt;var _Xt=dn(),SXt=Ds();function EXt(i){var e=0;return{Document:function(n){e=n.definitions.filter(function(r){return r.kind===SXt.Kind.OPERATION_DEFINITION}).length},OperationDefinition:function(n){!n.name&&e>1&&i.reportError(new _Xt.GraphQLError("This anonymous operation must be the only defined operation.",n))}}}});var Iwe=Ue(kwe=>{"use strict";Object.defineProperty(kwe,"__esModule",{value:!0});kwe.SingleFieldSubscriptionsRule=TXt;var DXt=dn();function TXt(i){return{OperationDefinition:function(t){t.operation==="subscription"&&t.selectionSet.selections.length!==1&&i.reportError(new DXt.GraphQLError(t.name?'Subscription "'.concat(t.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",t.selectionSet.selections.slice(1)))}}}});var Mwe=Ue(Nwe=>{"use strict";Object.defineProperty(Nwe,"__esModule",{value:!0});Nwe.KnownTypeNamesRule=RXt;var kXt=mZe(B_()),IXt=mZe(z_()),LXt=dn(),Lwe=Ak(),NXt=FA(),MXt=Ab();function mZe(i){return i&&i.__esModule?i:{default:i}}function RXt(i){for(var e=i.getSchema(),t=e?e.getTypeMap():Object.create(null),n=Object.create(null),r=0,o=i.getDocument().definitions;r{"use strict";Object.defineProperty(Rwe,"__esModule",{value:!0});Rwe.FragmentsOnCompositeTypesRule=PXt;var bZe=dn(),vZe=Hm(),AZe=po(),yZe=OA();function PXt(i){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var r=(0,yZe.typeFromAST)(i.getSchema(),n);if(r&&!(0,AZe.isCompositeType)(r)){var o=(0,vZe.print)(n);i.reportError(new bZe.GraphQLError('Fragment cannot condition on non composite type "'.concat(o,'".'),n))}}},FragmentDefinition:function(t){var n=(0,yZe.typeFromAST)(i.getSchema(),t.typeCondition);if(n&&!(0,AZe.isCompositeType)(n)){var r=(0,vZe.print)(t.typeCondition);i.reportError(new bZe.GraphQLError('Fragment "'.concat(t.name.value,'" cannot condition on non composite type "').concat(r,'".'),t.typeCondition))}}}}});var Pwe=Ue(Owe=>{"use strict";Object.defineProperty(Owe,"__esModule",{value:!0});Owe.VariablesAreInputTypesRule=WXt;var BXt=dn(),zXt=Hm(),VXt=po(),HXt=OA();function WXt(i){return{VariableDefinition:function(t){var n=(0,HXt.typeFromAST)(i.getSchema(),t.type);if(n&&!(0,VXt.isInputType)(n)){var r=t.variable.name.value,o=(0,zXt.print)(t.type);i.reportError(new BXt.GraphQLError('Variable "$'.concat(r,'" cannot be non-input type "').concat(o,'".'),t.type))}}}}});var zwe=Ue(Bwe=>{"use strict";Object.defineProperty(Bwe,"__esModule",{value:!0});Bwe.ScalarLeafsRule=jXt;var wZe=UXt(Oo()),xZe=dn(),CZe=po();function UXt(i){return i&&i.__esModule?i:{default:i}}function jXt(i){return{Field:function(t){var n=i.getType(),r=t.selectionSet;if(n){if((0,CZe.isLeafType)((0,CZe.getNamedType)(n))){if(r){var o=t.name.value,s=(0,wZe.default)(n);i.reportError(new xZe.GraphQLError('Field "'.concat(o,'" must not have a selection since type "').concat(s,'" has no subfields.'),r))}}else if(!r){var a=t.name.value,l=(0,wZe.default)(n);i.reportError(new xZe.GraphQLError('Field "'.concat(a,'" of type "').concat(l,'" must have a selection of subfields. Did you mean "').concat(a,' { ... }"?'),t))}}}}}});var Hwe=Ue(Vwe=>{"use strict";Object.defineProperty(Vwe,"__esModule",{value:!0});Vwe.FieldsOnCorrectTypeRule=KXt;var QXt=SJ($1e()),_Ze=SJ(B_()),GXt=SJ(z_()),qXt=SJ(x6()),YXt=dn(),z6=po();function SJ(i){return i&&i.__esModule?i:{default:i}}function KXt(i){return{Field:function(t){var n=i.getParentType();if(n){var r=i.getFieldDef();if(!r){var o=i.getSchema(),s=t.name.value,a=(0,_Ze.default)("to use an inline fragment on",JXt(o,n,s));a===""&&(a=(0,_Ze.default)(XXt(n,s))),i.reportError(new YXt.GraphQLError('Cannot query field "'.concat(s,'" on type "').concat(n.name,'".')+a,t))}}}}}function JXt(i,e,t){if(!(0,z6.isAbstractType)(e))return[];for(var n=new Set,r=Object.create(null),o=0,s=i.getPossibleTypes(e);o{"use strict";Object.defineProperty(Wwe,"__esModule",{value:!0});Wwe.UniqueFragmentNamesRule=$Xt;var ZXt=dn();function $Xt(i){var e=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var r=n.name.value;return e[r]?i.reportError(new ZXt.GraphQLError('There can be only one fragment named "'.concat(r,'".'),[e[r],n.name])):e[r]=n.name,!1}}}});var Qwe=Ue(jwe=>{"use strict";Object.defineProperty(jwe,"__esModule",{value:!0});jwe.KnownFragmentNamesRule=tZt;var eZt=dn();function tZt(i){return{FragmentSpread:function(t){var n=t.name.value,r=i.getFragment(n);r||i.reportError(new eZt.GraphQLError('Unknown fragment "'.concat(n,'".'),t.name))}}}});var qwe=Ue(Gwe=>{"use strict";Object.defineProperty(Gwe,"__esModule",{value:!0});Gwe.NoUnusedFragmentsRule=nZt;var iZt=dn();function nZt(i){var e=[],t=[];return{OperationDefinition:function(r){return e.push(r),!1},FragmentDefinition:function(r){return t.push(r),!1},Document:{leave:function(){for(var r=Object.create(null),o=0;o{"use strict";Object.defineProperty(Kwe,"__esModule",{value:!0});Kwe.PossibleFragmentSpreadsRule=sZt;var EJ=oZt(Oo()),SZe=dn(),Ywe=po(),rZt=OA(),EZe=D6();function oZt(i){return i&&i.__esModule?i:{default:i}}function sZt(i){return{InlineFragment:function(t){var n=i.getType(),r=i.getParentType();if((0,Ywe.isCompositeType)(n)&&(0,Ywe.isCompositeType)(r)&&!(0,EZe.doTypesOverlap)(i.getSchema(),n,r)){var o=(0,EJ.default)(r),s=(0,EJ.default)(n);i.reportError(new SZe.GraphQLError('Fragment cannot be spread here as objects of type "'.concat(o,'" can never be of type "').concat(s,'".'),t))}},FragmentSpread:function(t){var n=t.name.value,r=aZt(i,n),o=i.getParentType();if(r&&o&&!(0,EZe.doTypesOverlap)(i.getSchema(),r,o)){var s=(0,EJ.default)(o),a=(0,EJ.default)(r);i.reportError(new SZe.GraphQLError('Fragment "'.concat(n,'" cannot be spread here as objects of type "').concat(s,'" can never be of type "').concat(a,'".'),t))}}}}function aZt(i,e){var t=i.getFragment(e);if(t){var n=(0,rZt.typeFromAST)(i.getSchema(),t.typeCondition);if((0,Ywe.isCompositeType)(n))return n}}});var Zwe=Ue(Xwe=>{"use strict";Object.defineProperty(Xwe,"__esModule",{value:!0});Xwe.NoFragmentCyclesRule=cZt;var lZt=dn();function cZt(i){var e=Object.create(null),t=[],n=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(s){return r(s),!1}};function r(o){if(!e[o.name.value]){var s=o.name.value;e[s]=!0;var a=i.getFragmentSpreads(o.selectionSet);if(a.length!==0){n[s]=t.length;for(var l=0;l{"use strict";Object.defineProperty($we,"__esModule",{value:!0});$we.UniqueVariableNamesRule=dZt;var uZt=dn();function dZt(i){var e=Object.create(null);return{OperationDefinition:function(){e=Object.create(null)},VariableDefinition:function(n){var r=n.variable.name.value;e[r]?i.reportError(new uZt.GraphQLError('There can be only one variable named "$'.concat(r,'".'),[e[r],n.variable.name])):e[r]=n.variable.name}}}});var ixe=Ue(txe=>{"use strict";Object.defineProperty(txe,"__esModule",{value:!0});txe.NoUndefinedVariablesRule=fZt;var hZt=dn();function fZt(i){var e=Object.create(null);return{OperationDefinition:{enter:function(){e=Object.create(null)},leave:function(n){for(var r=i.getRecursiveVariableUsages(n),o=0;o{"use strict";Object.defineProperty(nxe,"__esModule",{value:!0});nxe.NoUnusedVariablesRule=mZt;var pZt=dn();function mZt(i){var e=[];return{OperationDefinition:{enter:function(){e=[]},leave:function(n){for(var r=Object.create(null),o=i.getRecursiveVariableUsages(n),s=0;s{"use strict";Object.defineProperty(oxe,"__esModule",{value:!0});oxe.KnownDirectivesRule=vZt;var gZt=kZe(Oo()),TZe=kZe(Qd()),DZe=dn(),Ta=Ds(),Mu=eR(),bZt=Ip();function kZe(i){return i&&i.__esModule?i:{default:i}}function vZt(i){for(var e=Object.create(null),t=i.getSchema(),n=t?t.getDirectives():bZt.specifiedDirectives,r=0;r{"use strict";Object.defineProperty(lxe,"__esModule",{value:!0});lxe.UniqueDirectivesPerLocationRule=CZt;var wZt=dn(),axe=Ds(),IZe=Ak(),xZt=Ip();function CZt(i){for(var e=Object.create(null),t=i.getSchema(),n=t?t.getDirectives():xZt.specifiedDirectives,r=0;r{"use strict";Object.defineProperty(DJ,"__esModule",{value:!0});DJ.KnownArgumentNamesRule=DZt;DJ.KnownArgumentNamesOnDirectivesRule=PZe;var MZe=OZe(B_()),RZe=OZe(z_()),FZe=dn(),_Zt=Ds(),SZt=Ip();function OZe(i){return i&&i.__esModule?i:{default:i}}function LZe(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function NZe(i){for(var e=1;e{"use strict";Object.defineProperty(dxe,"__esModule",{value:!0});dxe.UniqueArgumentNamesRule=kZt;var TZt=dn();function kZt(i){var e=Object.create(null);return{Field:function(){e=Object.create(null)},Directive:function(){e=Object.create(null)},Argument:function(n){var r=n.name.value;return e[r]?i.reportError(new TZt.GraphQLError('There can be only one argument named "'.concat(r,'".'),[e[r],n.name])):e[r]=n.name,!1}}}});var pxe=Ue(fxe=>{"use strict";Object.defineProperty(fxe,"__esModule",{value:!0});fxe.ValuesOfCorrectTypeRule=RZt;var IZt=H6(Vm()),LZt=H6(P_()),V6=H6(Oo()),NZt=H6(B_()),MZt=H6(z_()),wk=dn(),TJ=Hm(),PA=po();function H6(i){return i&&i.__esModule?i:{default:i}}function RZt(i){return{ListValue:function(t){var n=(0,PA.getNullableType)(i.getParentInputType());if(!(0,PA.isListType)(n))return yk(i,t),!1},ObjectValue:function(t){var n=(0,PA.getNamedType)(i.getInputType());if(!(0,PA.isInputObjectType)(n))return yk(i,t),!1;for(var r=(0,LZt.default)(t.fields,function(u){return u.name.value}),o=0,s=(0,IZt.default)(n.getFields());o{"use strict";Object.defineProperty(IJ,"__esModule",{value:!0});IJ.ProvidedRequiredArgumentsRule=BZt;IJ.ProvidedRequiredArgumentsOnDirectivesRule=jZe;var VZe=UZe(Oo()),kJ=UZe(P_()),HZe=dn(),WZe=Ds(),FZt=Hm(),OZt=Ip(),mxe=po();function UZe(i){return i&&i.__esModule?i:{default:i}}function BZe(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function zZe(i){for(var e=1;e{"use strict";Object.defineProperty(bxe,"__esModule",{value:!0});bxe.VariablesInAllowedPositionRule=jZt;var QZe=UZt(Oo()),VZt=dn(),HZt=Ds(),GZe=po(),WZt=OA(),qZe=D6();function UZt(i){return i&&i.__esModule?i:{default:i}}function jZt(i){var e=Object.create(null);return{OperationDefinition:{enter:function(){e=Object.create(null)},leave:function(n){for(var r=i.getRecursiveVariableUsages(n),o=0;o{"use strict";Object.defineProperty(_xe,"__esModule",{value:!0});_xe.OverlappingFieldsCanBeMergedRule=KZt;var GZt=xxe(rR()),qZt=xxe(oR()),YZe=xxe(Oo()),YZt=dn(),Axe=Ds(),KZe=Hm(),Lp=po(),JZe=OA();function xxe(i){return i&&i.__esModule?i:{default:i}}function XZe(i){return Array.isArray(i)?i.map(function(e){var t=e[0],n=e[1];return'subfields "'.concat(t,'" conflict because ')+XZe(n)}).join(" and "):i}function KZt(i){var e=new i$t,t=new Map;return{SelectionSet:function(r){for(var o=JZt(i,t,e,i.getParentType(),r),s=0;s1)for(var u=0;u0)return[[e,i.map(function(r){var o=r[0];return o})],i.reduce(function(r,o){var s=o[1];return r.concat(s)},[t]),i.reduce(function(r,o){var s=o[2];return r.concat(s)},[n])]}var i$t=(function(){function i(){this._data=Object.create(null)}var e=i.prototype;return e.has=function(n,r,o){var s=this._data[n],a=s&&s[r];return a===void 0?!1:o===!1?a===!1:!0},e.add=function(n,r,o){this._pairSetAdd(n,r,o),this._pairSetAdd(r,n,o)},e._pairSetAdd=function(n,r,o){var s=this._data[n];s||(s=Object.create(null),this._data[n]=s),s[r]=o},i})()});var Dxe=Ue(Exe=>{"use strict";Object.defineProperty(Exe,"__esModule",{value:!0});Exe.UniqueInputFieldNamesRule=r$t;var n$t=dn();function r$t(i){var e=[],t=Object.create(null);return{ObjectValue:{enter:function(){e.push(t),t=Object.create(null)},leave:function(){t=e.pop()}},ObjectField:function(r){var o=r.name.value;t[o]?i.reportError(new n$t.GraphQLError('There can be only one input field named "'.concat(o,'".'),[t[o],r.name])):t[o]=r.name}}}});var kxe=Ue(Txe=>{"use strict";Object.defineProperty(Txe,"__esModule",{value:!0});Txe.MaxIntrospectionDepthRule=a$t;var o$t=dn(),e$e=Ds(),s$t=3;function a$t(i){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object.create(null),r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(t.kind===e$e.Kind.FRAGMENT_SPREAD){var o=t.name.value;if(n[o]===!0)return!1;var s=i.getFragment(o);if(!s)return!1;try{return n[o]=!0,e(s,n,r)}finally{n[o]=null}}if(t.kind===e$e.Kind.FIELD&&(t.name.value==="fields"||t.name.value==="interfaces"||t.name.value==="possibleTypes"||t.name.value==="inputFields")&&(r++,r>=s$t))return!0;if("selectionSet"in t&&t.selectionSet)for(var a=0,l=t.selectionSet.selections;a{"use strict";Object.defineProperty(Ixe,"__esModule",{value:!0});Ixe.LoneSchemaDefinitionRule=l$t;var t$e=dn();function l$t(i){var e,t,n,r=i.getSchema(),o=(e=(t=(n=r?.astNode)!==null&&n!==void 0?n:r?.getQueryType())!==null&&t!==void 0?t:r?.getMutationType())!==null&&e!==void 0?e:r?.getSubscriptionType(),s=0;return{SchemaDefinition:function(l){if(o){i.reportError(new t$e.GraphQLError("Cannot define a new schema within a schema extension.",l));return}s>0&&i.reportError(new t$e.GraphQLError("Must provide only one schema definition.",l)),++s}}}});var Mxe=Ue(Nxe=>{"use strict";Object.defineProperty(Nxe,"__esModule",{value:!0});Nxe.UniqueOperationTypesRule=c$t;var i$e=dn();function c$t(i){var e=i.getSchema(),t=Object.create(null),n=e?{query:e.getQueryType(),mutation:e.getMutationType(),subscription:e.getSubscriptionType()}:{};return{SchemaDefinition:r,SchemaExtension:r};function r(o){for(var s,a=(s=o.operationTypes)!==null&&s!==void 0?s:[],l=0;l{"use strict";Object.defineProperty(Rxe,"__esModule",{value:!0});Rxe.UniqueTypeNamesRule=u$t;var n$e=dn();function u$t(i){var e=Object.create(null),t=i.getSchema();return{ScalarTypeDefinition:n,ObjectTypeDefinition:n,InterfaceTypeDefinition:n,UnionTypeDefinition:n,EnumTypeDefinition:n,InputObjectTypeDefinition:n};function n(r){var o=r.name.value;if(t!=null&&t.getType(o)){i.reportError(new n$e.GraphQLError('Type "'.concat(o,'" already exists in the schema. It cannot also be defined in this type definition.'),r.name));return}return e[o]?i.reportError(new n$e.GraphQLError('There can be only one type named "'.concat(o,'".'),[e[o],r.name])):e[o]=r.name,!1}}});var Pxe=Ue(Oxe=>{"use strict";Object.defineProperty(Oxe,"__esModule",{value:!0});Oxe.UniqueEnumValueNamesRule=h$t;var r$e=dn(),d$t=po();function h$t(i){var e=i.getSchema(),t=e?e.getTypeMap():Object.create(null),n=Object.create(null);return{EnumTypeDefinition:r,EnumTypeExtension:r};function r(o){var s,a=o.name.value;n[a]||(n[a]=Object.create(null));for(var l=(s=o.values)!==null&&s!==void 0?s:[],c=n[a],u=0;u{"use strict";Object.defineProperty(zxe,"__esModule",{value:!0});zxe.UniqueFieldDefinitionNamesRule=f$t;var o$e=dn(),Bxe=po();function f$t(i){var e=i.getSchema(),t=e?e.getTypeMap():Object.create(null),n=Object.create(null);return{InputObjectTypeDefinition:r,InputObjectTypeExtension:r,InterfaceTypeDefinition:r,InterfaceTypeExtension:r,ObjectTypeDefinition:r,ObjectTypeExtension:r};function r(o){var s,a=o.name.value;n[a]||(n[a]=Object.create(null));for(var l=(s=o.fields)!==null&&s!==void 0?s:[],c=n[a],u=0;u{"use strict";Object.defineProperty(Hxe,"__esModule",{value:!0});Hxe.UniqueDirectiveNamesRule=m$t;var s$e=dn();function m$t(i){var e=Object.create(null),t=i.getSchema();return{DirectiveDefinition:function(r){var o=r.name.value;if(t!=null&&t.getDirective(o)){i.reportError(new s$e.GraphQLError('Directive "@'.concat(o,'" already exists in the schema. It cannot be redefined.'),r.name));return}return e[o]?i.reportError(new s$e.GraphQLError('There can be only one directive named "@'.concat(o,'".'),[e[o],r.name])):e[o]=r.name,!1}}}});var jxe=Ue(Uxe=>{"use strict";Object.defineProperty(Uxe,"__esModule",{value:!0});Uxe.PossibleTypeExtensionsRule=A$t;var l$e=RJ(Oo()),c$e=RJ(Qd()),g$t=RJ(B_()),b$t=RJ(z_()),a$e=dn(),Ya=Ds(),v$t=Ak(),pR=po(),q_;function RJ(i){return i&&i.__esModule?i:{default:i}}function mR(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function A$t(i){for(var e=i.getSchema(),t=Object.create(null),n=0,r=i.getDocument().definitions;n{"use strict";Object.defineProperty(Y_,"__esModule",{value:!0});Y_.specifiedSDLRules=Y_.specifiedRules=Y_.recommendedRules=void 0;var C$t=_we(),_$t=Ewe(),S$t=Twe(),E$t=Iwe(),u$e=Mwe(),D$t=Fwe(),T$t=Pwe(),k$t=zwe(),I$t=Hwe(),L$t=Uwe(),N$t=Qwe(),M$t=qwe(),R$t=Jwe(),F$t=Zwe(),O$t=exe(),P$t=ixe(),B$t=rxe(),d$e=sxe(),h$e=cxe(),f$e=uxe(),p$e=hxe(),z$t=pxe(),m$e=gxe(),V$t=vxe(),H$t=Sxe(),g$e=Dxe(),W$t=kxe(),U$t=Lxe(),j$t=Mxe(),Q$t=Fxe(),G$t=Pxe(),q$t=Vxe(),Y$t=Wxe(),K$t=jxe(),b$e=Object.freeze([W$t.MaxIntrospectionDepthRule]);Y_.recommendedRules=b$e;var J$t=Object.freeze([C$t.ExecutableDefinitionsRule,_$t.UniqueOperationNamesRule,S$t.LoneAnonymousOperationRule,E$t.SingleFieldSubscriptionsRule,u$e.KnownTypeNamesRule,D$t.FragmentsOnCompositeTypesRule,T$t.VariablesAreInputTypesRule,k$t.ScalarLeafsRule,I$t.FieldsOnCorrectTypeRule,L$t.UniqueFragmentNamesRule,N$t.KnownFragmentNamesRule,M$t.NoUnusedFragmentsRule,R$t.PossibleFragmentSpreadsRule,F$t.NoFragmentCyclesRule,O$t.UniqueVariableNamesRule,P$t.NoUndefinedVariablesRule,B$t.NoUnusedVariablesRule,d$e.KnownDirectivesRule,h$e.UniqueDirectivesPerLocationRule,f$e.KnownArgumentNamesRule,p$e.UniqueArgumentNamesRule,z$t.ValuesOfCorrectTypeRule,m$e.ProvidedRequiredArgumentsRule,V$t.VariablesInAllowedPositionRule,H$t.OverlappingFieldsCanBeMergedRule,g$e.UniqueInputFieldNamesRule].concat(b$e));Y_.specifiedRules=J$t;var X$t=Object.freeze([U$t.LoneSchemaDefinitionRule,j$t.UniqueOperationTypesRule,Q$t.UniqueTypeNamesRule,G$t.UniqueEnumValueNamesRule,q$t.UniqueFieldDefinitionNamesRule,Y$t.UniqueDirectiveNamesRule,u$e.KnownTypeNamesRule,d$e.KnownDirectivesRule,h$e.UniqueDirectivesPerLocationRule,K$t.PossibleTypeExtensionsRule,f$e.KnownArgumentNamesOnDirectivesRule,p$e.UniqueArgumentNamesRule,g$e.UniqueInputFieldNamesRule,m$e.ProvidedRequiredArgumentsOnDirectivesRule]);Y_.specifiedSDLRules=X$t});var qxe=Ue(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});K_.ValidationContext=K_.SDLValidationContext=K_.ASTValidationContext=void 0;var v$e=Ds(),Z$t=O_(),A$e=_J();function y$e(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var Gxe=(function(){function i(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}var e=i.prototype;return e.reportError=function(n){this._onError(n)},e.getDocument=function(){return this._ast},e.getFragment=function(n){var r=this._fragments;return r||(this._fragments=r=this.getDocument().definitions.reduce(function(o,s){return s.kind===v$e.Kind.FRAGMENT_DEFINITION&&(o[s.name.value]=s),o},Object.create(null))),r[n]},e.getFragmentSpreads=function(n){var r=this._fragmentSpreads.get(n);if(!r){r=[];for(var o=[n];o.length!==0;)for(var s=o.pop(),a=0,l=s.selections;a{"use strict";Object.defineProperty(gR,"__esModule",{value:!0});gR.validate=oei;gR.validateSDL=Yxe;gR.assertValidSDL=sei;gR.assertValidSDLExtension=aei;var tei=rei(gb()),iei=dn(),FJ=O_(),nei=P6(),w$e=_J(),x$e=Qxe(),C$e=qxe();function rei(i){return i&&i.__esModule?i:{default:i}}function oei(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x$e.specifiedRules,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new w$e.TypeInfo(i),r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{maxErrors:void 0};e||(0,tei.default)(0,"Must provide document."),(0,nei.assertValidSchema)(i);var o=Object.freeze({}),s=[],a=new C$e.ValidationContext(i,e,n,function(c){if(r.maxErrors!=null&&s.length>=r.maxErrors)throw s.push(new iei.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),o;s.push(c)}),l=(0,FJ.visitInParallel)(t.map(function(c){return c(a)}));try{(0,FJ.visit)(e,(0,w$e.visitWithTypeInfo)(n,l))}catch(c){if(c!==o)throw c}return s}function Yxe(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x$e.specifiedSDLRules,n=[],r=new C$e.SDLValidationContext(i,e,function(s){n.push(s)}),o=t.map(function(s){return s(r)});return(0,FJ.visit)(i,(0,FJ.visitInParallel)(o)),n}function sei(i){var e=Yxe(i);if(e.length!==0)throw new Error(e.map(function(t){return t.message}).join(` +`))}function MGt(i){let e=i.schema;e.getQueryType()==null&&i.reportError("Query root type must be provided.",e.astNode);let t=new Jc;for(let n of Object.values(Ar)){let o=e.getRootType(n);if(o!=null)if(en(o))t.add(o,n);else{let r=fXe(n),s=Xe(o);i.reportError(n===Ar.QUERY?`${r} root type must be Object type, it cannot be ${s}.`:`${r} root type must be Object type if provided, it cannot be ${s}.`,JXe(e,n)??o.astNode)}}for(let[n,o]of t)if(o.length>1){let r=gXe(o);i.reportError(`All root types must be different, "${n}" type is used as ${r} root types.`,o.map(s=>JXe(e,s)))}}function JXe(i,e){return[i.astNode,...i.extensionASTNodes].flatMap(t=>t?.operationTypes??[]).find(t=>t.operation===e)?.type}function RGt(i){for(let e of i.schema.getDirectives()){if(!pS(e)){i.reportError(`Expected directive but got: ${Xe(e)}.`,e?.astNode);continue}qk(i,e),e.locations.length===0&&i.reportError(`Directive ${e} must include 1 or more locations.`,e.astNode);for(let t of e.args)qk(i,t),Ql(t.type)||i.reportError(`The type of ${t} must be Input Type but got: ${Xe(t.type)}.`,t.astNode),Qh(t)&&t.deprecationReason!=null&&i.reportError(`Required argument ${t} cannot be deprecated.`,[IX(t.astNode),t.astNode?.type]),rxe(i,t)}}function rxe(i,e){let t=e.default;if(!t)return;let n=[];if(sxe(t,e.type,(o,r)=>{n.push([o,r])}),n.length!==0){if(!t.literal)try{let o=T9(t.value,e.type),r=[];if(dS(o,e.type,(s,a)=>{r.push([s,a])}),r.length===0){i.reportError(`${e} has invalid default value: ${Xe(t.value)}. Did you mean: ${Xe(o)}?`,e.astNode?.defaultValue);return}}catch{}for(let[o,r]of n)i.reportError(`${e} has invalid default value${Nk(r)}: ${o.message}`,o.nodes??e.astNode?.defaultValue)}}function sxe(i,e,t,n){if(i.literal){Qw(i.literal,e,t,void 0,void 0,n);return}dS(i.value,e,t,n)}function T9(i,e){if(Si(e))return T9(i,e.ofType);if(i===null)return null;if(Cn(e))return Up(i)?Array.from(i,t=>T9(t,e.ofType)):[T9(i,e.ofType)];if(Bi(e)){Ma(i)||Di(!1);let t=e.getFields();return Xv(i,(n,o)=>(o in t||Di(!1),T9(n,t[o].type)))}return ng(e),e.coerceOutputValue(i)}function qk(i,e){e.name.startsWith("__")&&i.reportError(`Name "${e.name}" must not begin with "__", which is reserved by GraphQL introspection.`,e.astNode)}function FGt(i){let e=jGt(i),t=i.schema.getTypeMap(),n=new Map;for(let r of Object.values(t)){if(!og(r)){i.reportError(`Expected GraphQL named type but got: ${Xe(r)}.`,r.astNode);continue}Rb(r)||qk(i,r),en(r)||cn(r)?(XXe(i,r),ZXe(i,r)):ys(r)?BGt(i,r):Oo(r)?zGt(i,r):Bi(r)&&(VGt(i,r),o(r),e(r))}WGt(i,n);function o(r){n.set(r,{inputObj:r,targets:[],dependents:[],unresolvedTargetCount:0,hasFiniteValue:!1})}}function XXe(i,e){let t=Object.values(e.getFields());t.length===0&&i.reportError(`Type ${e} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(let n of t){qk(i,n),ig(n.type)||i.reportError(`The type of ${n} must be Output Type but got: ${Xe(n.type)}.`,n.astNode?.type);for(let o of n.args)qk(i,o),Ql(o.type)||i.reportError(`The type of ${o} must be Input Type but got: ${Xe(o.type)}.`,o.astNode?.type),Qh(o)&&o.deprecationReason!=null&&i.reportError(`Required argument ${o} cannot be deprecated.`,[IX(o.astNode),o.astNode?.type]),rxe(i,o)}}function ZXe(i,e){let t=new Set;for(let n of e.getInterfaces()){if(!cn(n)){i.reportError(`Type ${e} must only implement Interface types, it cannot implement ${Xe(n)}.`,k9(e,n));continue}if(e===n){i.reportError(`Type ${e} cannot implement itself because it would create a circular reference.`,k9(e,n));continue}if(t.has(n.name)){i.reportError(`Type ${e} can only implement ${n} once.`,k9(e,n));continue}t.add(n.name),PGt(i,e,n),OGt(i,e,n)}}function OGt(i,e,t){let n=e.getFields();for(let o of Object.values(t.getFields())){let r=n[o.name];if(r==null){i.reportError(`Interface field ${o} expected but ${e} does not provide it.`,[o.astNode,e.astNode,...e.extensionASTNodes]);continue}sA(i.schema,r.type,o.type)||i.reportError(`Interface field ${o} expects type ${o.type} but ${r} is type ${r.type}.`,[o.astNode?.type,r.astNode?.type]);for(let s of o.args){let a=r.args.find(l=>l.name===s.name);if(!a){i.reportError(`Interface field argument ${s} expected but ${r} does not provide it.`,[s.astNode,r.astNode]);continue}Hk(s.type,a.type)||i.reportError(`Interface field argument ${s} expects type ${s.type} but ${a} is type ${a.type}.`,[s.astNode?.type,a.astNode?.type])}for(let s of r.args)Qh(s)&&(o.args.find(l=>l.name===s.name)||i.reportError(`Argument "${s}" must not be required type "${s.type}" if not provided by the Interface field "${o}".`,[s.astNode,o.astNode]));r.deprecationReason!=null&&o.deprecationReason==null&&i.reportError(`Interface field ${t.name}.${o.name} is not deprecated, so implementation field ${e.name}.${r.name} must not be deprecated.`,[IX(r.astNode),r.astNode?.type])}}function PGt(i,e,t){let n=e.getInterfaces();for(let o of t.getInterfaces())n.includes(o)||i.reportError(o===e?`Type ${e} cannot implement ${t} because it would create a circular reference.`:`Type ${e} must implement ${o} because it is implemented by ${t}.`,[...k9(t,o),...k9(e,t)])}function BGt(i,e){let t=e.getTypes();t.length===0&&i.reportError(`Union type ${e} must define one or more member types.`,[e.astNode,...e.extensionASTNodes]);let n=new Set;for(let o of t){if(n.has(o.name)){i.reportError(`Union type ${e} can only include type ${o} once.`,$Xe(e,o.name));continue}n.add(o.name),en(o)||i.reportError(`Union type ${e} can only include Object types, it cannot include ${Xe(o)}.`,$Xe(e,String(o)))}}function zGt(i,e){let t=e.getValues();t.length===0&&i.reportError(`Enum type ${e} must define one or more values.`,[e.astNode,...e.extensionASTNodes]);for(let n of t)qk(i,n)}function VGt(i,e){let t=Object.values(e.getFields());t.length===0&&i.reportError(`Input Object type ${e} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(let n of t)qk(i,n),Ql(n.type)||i.reportError(`The type of ${n} must be Input Type but got: ${Xe(n.type)}.`,n.astNode?.type),Gh(n)&&n.deprecationReason!=null&&i.reportError(`Required input field ${n} cannot be deprecated.`,[IX(n.astNode),n.astNode?.type]),rxe(i,n),e.isOneOf&&HGt(e,n,i)}function HGt(i,e,t){Si(e.type)&&t.reportError(`OneOf input field ${i}.${e.name} must be nullable.`,e.astNode?.type),(e.default!==void 0||e.defaultValue!==void 0)&&t.reportError(`OneOf input field ${i}.${e.name} cannot have a default value.`,e.astNode)}function WGt(i,e){let t=[];for(let c of e.values()){let u=c.inputObj,d=Object.values(u.getFields());for(let h of d){let f=UGt(u,h.type);if(f===void 0)continue;c.targets.push({field:h,target:f});let p=e.get(f);p!==void 0&&p.dependents.push(c)}u.isOneOf?(d.length===0||c.targets.lengthv.fieldStr).join(", ");i.reportError(`Input Object ${h} cannot be provided a finite value because it references itself through fields: ${A}.`,g.map(v=>v.astNode))}r.pop()}s.delete(u)}}}function UGt(i,e){if(i.isOneOf)return Bi(e)?e:void 0;if(Si(e)&&Bi(e.ofType))return e.ofType}function jGt(i){let e=Object.create(null),t=[],n=Object.create(null);return function(l){return o(l,Object.create(null))};function o(a,l){if(Up(l)){for(let c of l)o(a,c);return}else if(!Ma(l))return;for(let c of Object.values(a.getFields())){let u=Vr(c.type);Bi(u)&&(Object.hasOwn(l,c.name)?o(u,l[c.name]):s(c,u,`${a}.${c.name}`))}}function r(a,l){if(l.kind===W.LIST){for(let u of l.values)r(a,u);return}else if(l.kind!==W.OBJECT)return;let c=Hw(l.fields,u=>u.name.value);for(let u of Object.values(a.getFields())){let d=Vr(u.type);Bi(d)&&(Object.hasOwn(c,u.name)?r(d,c[u.name].value):s(u,d,`${a}.${u.name}`))}}function s(a,l,c){let u=a.default;if(u===void 0)return;let d=n[c];if(d!==void 0){i.reportError(`Invalid circular reference. The default value of Input Object field ${c} references itself${dh).join(", ")}`:""}.`,t.slice(d-1).map(([,h])=>h));return}e[c]===void 0&&(e[c]=!0,n[c]=t.push([c,a.astNode?.defaultValue]),u.literal?r(l,u.literal):o(l,u.value),t.pop(),n[c]=void 0)}}function k9(i,e){let{astNode:t,extensionASTNodes:n}=i;return(t!=null?[t,...n]:n).flatMap(r=>r.interfaces??[]).filter(r=>r.name.value===e.name)}function $Xe(i,e){let{astNode:t,extensionASTNodes:n}=i;return(t!=null?[t,...n]:n).flatMap(r=>r.types??[]).filter(r=>r.name.value===e)}function IX(i){return i?.directives?.find(e=>e.name.value===mS.name)}var oxe,I9=D(()=>{NR();pXe();kwe();Is();Za();Lk();oA();o9();pX();Iwe();Ki();eh();so();b9();w9();So();Xc();ty();Gk();oxe=class{constructor(e){this._errors=[],this.schema=e}reportError(e,t){let n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new Se(e,{nodes:n}))}getErrors(){return this._errors}}});function Ns(i,e,t){return new Se(`Syntax Error: ${t}`,{source:i,positions:[e]})}var L9=D(()=>{Ki()});function QGt(){let i;try{let e=globalThis.process;typeof e?.getBuiltinModule=="function"&&(i=e.getBuiltinModule("node:diagnostics_channel"))}catch{}return i}function Kp(i){if(i==null)return!1;let e=i.hasSubscribers;if(e!==void 0)return e;for(let t of GGt)if(i[t].hasSubscribers)return!0;return!1}function AS(i,e,t){let n=e;return i.start.runStores(n,()=>{let o;try{o=t()}catch(r){throw n.error=r,i.error.publish(n),i.end.publish(n),r}return Hh(o)?(i.end.publish(n),o.then(r=>(n.result=r,i.asyncStart.publish(n),i.asyncEnd.publish(n),r),r=>{throw n.error=r,i.error.publish(n),i.asyncStart.publish(n),i.asyncEnd.publish(n),r})):(n.result=o,i.end.publish(n),o)})}var Kk,axe,lxe,N9,eZe,cxe,uxe,Jk,GGt,M9=D(()=>{Wp();Kk=QGt(),axe=Kk?.tracingChannel("graphql:parse"),lxe=Kk?.tracingChannel("graphql:validate"),N9=Kk?.tracingChannel("graphql:execute"),eZe=Kk?.tracingChannel("graphql:execute:variableCoercion"),cxe=Kk?.tracingChannel("graphql:execute:rootSelectionSet"),uxe=Kk?.tracingChannel("graphql:subscribe"),Jk=Kk?.tracingChannel("graphql:resolve"),GGt=["start","end","asyncStart","asyncEnd","error"]});var Ke,KR=D(()=>{Ke={SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}});function NX(i){return i===Ke.BANG||i===Ke.DOLLAR||i===Ke.AMP||i===Ke.PAREN_L||i===Ke.PAREN_R||i===Ke.DOT||i===Ke.SPREAD||i===Ke.COLON||i===Ke.EQUALS||i===Ke.AT||i===Ke.BRACKET_L||i===Ke.BRACKET_R||i===Ke.BRACE_L||i===Ke.PIPE||i===Ke.BRACE_R}function JR(i){return i>=0&&i<=55295||i>=57344&&i<=1114111}function MX(i,e){return iZe(i.charCodeAt(e))&&nZe(i.charCodeAt(e+1))}function iZe(i){return i>=55296&&i<=56319}function nZe(i){return i>=56320&&i<=57343}function $w(i,e){let t=i.source.body.codePointAt(e);if(t===void 0)return Ke.EOF;if(t>=32&&t<=126){let n=String.fromCodePoint(t);return n==='"'?`'"'`:`"${n}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function Js(i,e,t,n,o){let r=i.line,s=1+t-i.lineStart;return new Zv(e,t,n,r,s,o)}function qGt(i,e){let t=i.source.body,n=t.length,o=e;for(;o=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function $Gt(i,e){let t=i.source.body;switch(t.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ns(i.source,e,`Invalid character escape sequence: "${t.slice(e,e+2)}".`)}function eqt(i,e){let t=i.source.body,n=t.length,o=i.lineStart,r=e+3,s=r,a="",l=[];for(;r{L9();eh();u9();c9();KR();Zw=class{constructor(e){let t=new Zv(Ke.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Ke.EOF)do if(e.next)e=e.next;else{let t=qGt(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===Ke.COMMENT);return e}}});function tqt(i,e){let t=i.source.body,n=t.length,o=e;if(o{L9();eh();c9();F9();KR();RX=class{constructor(e){this.line=1,this.lineStart=0;let t=new Zv(Ke.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t}get[Symbol.toStringTag](){return"SchemaCoordinateLexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Ke.EOF){let t=tqt(this,e.end);e.next=t,t.prev=e,e=t}return e}}});function O9(i){return Kc(i,rZe,fA)}var rZe,fA,FX=D(()=>{MR();IR();rZe=Symbol("Source"),fA=class{constructor(e,t="GraphQL request",n={line:1,column:1}){this.__kind=rZe,this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||jp(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||jp(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}});function Zc(i,e){return Kp(axe)?axe.traceSync(()=>sZe(i,e),{source:i}):sZe(i,e)}function sZe(i,e){let t=new Xk(i,e),n=t.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:t.tokenCount}),n}function hxe(i,e){let t=new Xk(i,e);t.expectToken(Ke.SOF);let n=t.parseValueLiteral(!1);return t.expectToken(Ke.EOF),n}function P9(i,e){let t=new Xk(i,e);t.expectToken(Ke.SOF);let n=t.parseConstValueLiteral();return t.expectToken(Ke.EOF),n}function fxe(i,e){let t=new Xk(i,e);t.expectToken(Ke.SOF);let n=t.parseTypeReference();return t.expectToken(Ke.EOF),n}function B9(i){let e=O9(i)?i:new fA(i),t=new RX(e),n=new Xk(i,{lexer:t});n.expectToken(Ke.SOF);let o=n.parseSchemaCoordinate();return n.expectToken(Ke.EOF),o}function OX(i){let e=i.value;return aZe(i.kind)+(e!=null?` "${e}"`:"")}function aZe(i){return NX(i)?`"${i}"`:i}var Xk,Zk=D(()=>{L9();M9();eh();VR();so();F9();oZe();FX();KR();Xk=class{constructor(e,t={}){let{lexer:n,...o}=t;if(n)this._lexer=n;else{let r=O9(e)?e:new fA(e);this._lexer=new Zw(r)}this._options=o,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(Ke.NAME);return this.node(e,{kind:W.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:W.DOCUMENT,definitions:this.many(Ke.SOF,this.parseDefinition,Ke.EOF)})}parseDefinition(){if(this.peek(Ke.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===Ke.BRACE_L)throw Ns(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===Ke.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw Ns(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(t.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){let e=this._lexer.token;if(this.peek(Ke.BRACE_L))return this.node(e,{kind:W.OPERATION_DEFINITION,operation:Ar.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let t=this.parseDescription(),n=this.parseOperationType(),o;return this.peek(Ke.NAME)&&(o=this.parseName()),this.node(e,{kind:W.OPERATION_DEFINITION,operation:n,description:t,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(Ke.NAME);switch(e.value){case"query":return Ar.QUERY;case"mutation":return Ar.MUTATION;case"subscription":return Ar.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Ke.PAREN_L,this.parseVariableDefinition,Ke.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:W.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(Ke.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ke.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(Ke.DOLLAR),this.node(e,{kind:W.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:W.SELECTION_SET,selections:this.many(Ke.BRACE_L,this.parseSelection,Ke.BRACE_R)})}parseSelection(){return this.peek(Ke.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e=this._lexer.token,t=this.parseName(),n,o;return this.expectOptionalToken(Ke.COLON)?(n=t,o=this.parseName()):o=t,this.node(e,{kind:W.FIELD,alias:n,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ke.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ke.PAREN_L,t,Ke.PAREN_R)}parseFragmentArguments(){let e=this.parseFragmentArgument;return this.optionalMany(Ke.PAREN_L,e,Ke.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(Ke.COLON),this.node(t,{kind:W.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let e=this._lexer.token,t=this.parseName();return this.expectToken(Ke.COLON),this.node(e,{kind:W.FRAGMENT_ARGUMENT,name:t,value:this.parseValueLiteral(!1)})}parseFragment(){let e=this._lexer.token;this.expectToken(Ke.SPREAD);let t=this.expectOptionalKeyword("on");if(!t&&this.peek(Ke.NAME)){let n=this.parseFragmentName();return this.peek(Ke.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(e,{kind:W.FRAGMENT_SPREAD,name:n,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(e,{kind:W.FRAGMENT_SPREAD,name:n,directives:this.parseDirectives(!1)})}return this.node(e,{kind:W.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(e,{kind:W.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:W.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case Ke.BRACKET_L:return this.parseList(e);case Ke.BRACE_L:return this.parseObject(e);case Ke.INT:return this.advanceLexer(),this.node(t,{kind:W.INT,value:t.value});case Ke.FLOAT:return this.advanceLexer(),this.node(t,{kind:W.FLOAT,value:t.value});case Ke.STRING:case Ke.BLOCK_STRING:return this.parseStringLiteral();case Ke.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:W.BOOLEAN,value:!0});case"false":return this.node(t,{kind:W.BOOLEAN,value:!1});case"null":return this.node(t,{kind:W.NULL});default:return this.node(t,{kind:W.ENUM,value:t.value})}case Ke.DOLLAR:if(e)if(this.expectToken(Ke.DOLLAR),this._lexer.token.kind===Ke.NAME){let n=this._lexer.token.value;throw Ns(this._lexer.source,t.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:W.STRING,value:e.value,block:e.kind===Ke.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:W.LIST,values:this.any(Ke.BRACKET_L,t,Ke.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:W.OBJECT,fields:this.any(Ke.BRACE_L,t,Ke.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(Ke.COLON),this.node(t,{kind:W.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(Ke.AT);)t.push(this.parseDirective(e));if(t.length)return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(Ke.AT),this.node(t,{kind:W.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e=this._lexer.token,t;if(this.expectOptionalToken(Ke.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(Ke.BRACKET_R),t=this.node(e,{kind:W.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Ke.BANG)?this.node(e,{kind:W.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:W.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Ke.STRING)||this.peek(Ke.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),o=this.many(Ke.BRACE_L,this.parseOperationTypeDefinition,Ke.BRACE_R);return this.node(e,{kind:W.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:o})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(Ke.COLON);let n=this.parseNamedType();return this.node(e,{kind:W.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),o=this.parseConstDirectives();return this.node(e,{kind:W.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:o})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),o=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:W.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:o,directives:r,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Ke.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(Ke.BRACE_L,this.parseFieldDefinition,Ke.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),o=this.parseArgumentDefs();this.expectToken(Ke.COLON);let r=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:W.FIELD_DEFINITION,description:t,name:n,arguments:o,type:r,directives:s})}parseArgumentDefs(){return this.optionalMany(Ke.PAREN_L,this.parseInputValueDef,Ke.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Ke.COLON);let o=this.parseTypeReference(),r;this.expectOptionalToken(Ke.EQUALS)&&(r=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(e,{kind:W.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:r,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),o=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:W.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:o,directives:r,fields:s})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),o=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(e,{kind:W.UNION_TYPE_DEFINITION,description:t,name:n,directives:o,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(Ke.EQUALS)?this.delimitedMany(Ke.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),o=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(e,{kind:W.ENUM_TYPE_DEFINITION,description:t,name:n,directives:o,values:r})}parseEnumValuesDefinition(){return this.optionalMany(Ke.BRACE_L,this.parseEnumValueDefinition,Ke.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(e,{kind:W.ENUM_VALUE_DEFINITION,description:t,name:n,directives:o})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Ns(this._lexer.source,this._lexer.token.start,`${OX(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),o=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(e,{kind:W.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:o,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(Ke.BRACE_L,this.parseInputValueDef,Ke.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===Ke.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.optionalMany(Ke.BRACE_L,this.parseOperationTypeDefinition,Ke.BRACE_R);if(t===void 0&&n===void 0)throw this.unexpected();return this.node(e,{kind:W.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();if(n===void 0)throw this.unexpected();return this.node(e,{kind:W.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(n===void 0&&o===void 0&&r===void 0)throw this.unexpected();return this.node(e,{kind:W.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:o,fields:r})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(n===void 0&&o===void 0&&r===void 0)throw this.unexpected();return this.node(e,{kind:W.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:o,fields:r})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(n===void 0&&o===void 0)throw this.unexpected();return this.node(e,{kind:W.UNION_TYPE_EXTENSION,name:t,directives:n,types:o})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(n===void 0&&o===void 0)throw this.unexpected();return this.node(e,{kind:W.ENUM_TYPE_EXTENSION,name:t,directives:n,values:o})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(n===void 0&&o===void 0)throw this.unexpected();return this.node(e,{kind:W.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:o})}parseDirectiveExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(Ke.AT);let t=this.parseName(),n=this.parseConstDirectives();if(n===void 0)throw this.unexpected();return this.node(e,{kind:W.DIRECTIVE_EXTENSION,name:t,directives:n})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ke.AT);let n=this.parseName(),o=this.parseArgumentDefs(),r=this.parseConstDirectives(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(e,{kind:W.DIRECTIVE_DEFINITION,description:t,name:n,arguments:o,directives:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(Ke.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.hasOwn(pi,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e=this._lexer.token,t=this.expectOptionalToken(Ke.AT),n=this.parseName(),o;!t&&this.expectOptionalToken(Ke.DOT)&&(o=this.parseName());let r;return(t||o)&&this.expectOptionalToken(Ke.PAREN_L)&&(r=this.parseName(),this.expectToken(Ke.COLON),this.expectToken(Ke.PAREN_R)),t?r?this.node(e,{kind:W.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:r}):this.node(e,{kind:W.DIRECTIVE_COORDINATE,name:n}):o?r?this.node(e,{kind:W.ARGUMENT_COORDINATE,name:n,fieldName:o,argumentName:r}):this.node(e,{kind:W.MEMBER_COORDINATE,name:n,memberName:o}):this.node(e,{kind:W.TYPE_COORDINATE,name:n})}node(e,t){return this._options.noLocation!==!0&&(t.loc=new Mk(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ns(this._lexer.source,t.start,`Expected ${aZe(e)}, found ${OX(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){let t=this._lexer.token;if(t.kind===Ke.NAME&&t.value===e)this.advanceLexer();else throw Ns(this._lexer.source,t.start,`Expected "${e}", found ${OX(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===Ke.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){let t=e??this._lexer.token;return Ns(this._lexer.source,t.start,`Unexpected ${OX(t)}.`)}any(e,t,n){this.expectToken(e);let o=[];for(;!this.expectOptionalToken(n);)o.push(t.call(this));return o}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let o=[];do o.push(t.call(this));while(!this.expectOptionalToken(n));return o}}many(e,t,n){this.expectToken(e);let o=[];do o.push(t.call(this));while(!this.expectOptionalToken(n));return o}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==Ke.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw Ns(this._lexer.source,t.start,`Document contains more than ${e} tokens. Parsing aborted.`)}}});function Cs(i,e){switch(e.kind){case W.LIST_TYPE:{let t=Cs(i,e.type);return t&&new Ks(t)}case W.NON_NULL_TYPE:{let t=Cs(i,e.type);return t&&new Pi(t)}case W.NAMED_TYPE:return i.getType(e.name.value)}}var pA=D(()=>{so();So()});function iqt(i){let e=new Map;for(let t of i.definitions)if(t.kind===W.FRAGMENT_DEFINITION){let n=new Map;if(t.variableDefinitions)for(let r of t.variableDefinitions)n.set(r.variable.name.value,r);let o={definition:t,variableDefinitions:n};e.set(t.name.value,o)}return e}function ex(i,e){return{enter(...t){let n=t[0];i.enter(n);let o=aS(e,n.kind).enter;if(o){let r=o.apply(e,t);return r!==void 0&&(i.leave(n),s9(r)&&i.enter(r)),r}},leave(...t){let n=t[0],o=aS(e,n.kind).leave,r;return o&&(r=o.apply(e,t)),i.leave(n),r}}}var sg,PX=D(()=>{eh();so();Bk();So();pA();sg=class{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._fragmentSignaturesByName=n??(()=>null),this._fragmentSignature=null,this._fragmentArgument=null,t&&(Ql(t)&&this._inputTypeStack.push(t),jh(t)&&this._parentTypeStack.push(t),ig(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){return this._typeStack.at(-1)}getParentType(){return this._parentTypeStack.at(-1)}getInputType(){return this._inputTypeStack.at(-1)}getParentInputType(){return this._inputTypeStack.at(-2)}getFieldDef(){return this._fieldDefStack.at(-1)}getDefaultValue(){return this._defaultValueStack.at(-1)}getDirective(){return this._directive}getArgument(){return this._argument}getFragmentSignature(){return this._fragmentSignature}getFragmentSignatureByName(){return this._fragmentSignaturesByName}getFragmentArgument(){return this._fragmentArgument}getEnumValue(){return this._enumValue}enter(e){let t=this._schema;switch(e.kind){case W.DOCUMENT:{let n=iqt(e);this._fragmentSignaturesByName=o=>n.get(o);break}case W.SELECTION_SET:{let n=Vr(this.getType());this._parentTypeStack.push(jh(n)?n:void 0);break}case W.FIELD:{let n=this.getParentType(),o,r;n&&(o=t.getField(n,e.name.value),o&&(r=o.type)),this._fieldDefStack.push(o),this._typeStack.push(ig(r)?r:void 0);break}case W.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case W.OPERATION_DEFINITION:{let n=t.getRootType(e.operation);this._typeStack.push(en(n)?n:void 0);break}case W.FRAGMENT_SPREAD:{this._fragmentSignature=this.getFragmentSignatureByName()(e.name.value);break}case W.INLINE_FRAGMENT:case W.FRAGMENT_DEFINITION:{let n=e.typeCondition,o=n?Cs(t,n):Vr(this.getType());this._typeStack.push(ig(o)?o:void 0);break}case W.VARIABLE_DEFINITION:{let n=Cs(t,e.type);this._inputTypeStack.push(Ql(n)?n:void 0);break}case W.ARGUMENT:{let n,o,r=this.getDirective()??this.getFieldDef();r&&(n=r.args.find(s=>s.name===e.name.value),n&&(o=n.type)),this._argument=n,this._defaultValueStack.push(n?.default??n?.defaultValue??void 0),this._inputTypeStack.push(Ql(o)?o:void 0);break}case W.FRAGMENT_ARGUMENT:{let o=this.getFragmentSignature()?.variableDefinitions.get(e.name.value);this._fragmentArgument=o;let r;o&&(r=Cs(this._schema,o.type)),this._inputTypeStack.push(Ql(r)?r:void 0);break}case W.LIST:{let n=Vk(this.getInputType()),o=Cn(n)?n.ofType:void 0;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Ql(o)?o:void 0);break}case W.OBJECT_FIELD:{let n=Vr(this.getInputType()),o,r;Bi(n)&&(r=n.getFields()[e.name.value],r!=null&&(o=r.type)),this._defaultValueStack.push(r?.default??r?.defaultValue??void 0),this._inputTypeStack.push(Ql(o)?o:void 0);break}case W.ENUM:{let n=Vr(this.getInputType()),o;Oo(n)&&(o=n.getValue(e.value)),this._enumValue=o;break}default:}}leave(e){switch(e.kind){case W.DOCUMENT:this._fragmentSignaturesByName=()=>null;break;case W.SELECTION_SET:this._parentTypeStack.pop();break;case W.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case W.DIRECTIVE:this._directive=null;break;case W.FRAGMENT_SPREAD:this._fragmentSignature=null;break;case W.OPERATION_DEFINITION:case W.INLINE_FRAGMENT:case W.FRAGMENT_DEFINITION:this._typeStack.pop();break;case W.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case W.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case W.FRAGMENT_ARGUMENT:{this._fragmentArgument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break}case W.LIST:case W.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case W.ENUM:this._enumValue=null;break;default:}}}});function z9(i){let e=new Map;return{Directive(t){if(t.name.value===uA.name||t.name.value===rg.name){let o=t.arguments?.find(s=>s.name.value==="label")?.value;if(!o||o.kind===W.NULL)return;if(o.kind!==W.STRING){i.reportError(new Se(`Argument "@${t.name.value}(label:)" must be a static string.`,{nodes:t}));return}let r=e.get(o.value);r!=null?i.reportError(new Se('Value for arguments "defer(label:)" and "stream(label:)" must be unique across all Defer/Stream directive usages.',{nodes:[r,t]})):e.set(o.value,t)}}}}var pxe=D(()=>{Ki();so();Xc()});function V9(i){return{OperationDefinition(e){let t=i.getDocument(),n=new Map;for(let s of t.definitions)s.kind===W.FRAGMENT_DEFINITION&&n.set(s.name.value,s);if(e.operation!=="subscription"&&e.operation!=="mutation")return;let r=i.getSchema().getRootType(e.operation);r&&mxe({context:i,operationType:e.operation,rootType:r,fragments:n,selectionSet:e.selectionSet,visitedFragments:new Set})}}}function mxe({context:i,operationType:e,rootType:t,fragments:n,selectionSet:o,visitedFragments:r}){for(let s of o.selections)if(s.kind==="Field"){let a=s.directives?.find(l=>l.name.value===rg.name);a&&i.reportError(new Se(`Stream directive cannot be used on root ${e} type "${t}".`,{nodes:a}))}else if(s.kind==="FragmentSpread"){let a=s.name.value;if(r.has(a))continue;let l=n.get(a);if(l){let c=lZe(s);c!==void 0&&i.reportError(new Se(`Defer directive cannot be used on root ${e} type "${t}".`,{nodes:c})),mxe({context:i,operationType:e,rootType:t,fragments:n,selectionSet:l.selectionSet,visitedFragments:r})}r.add(a)}else if(s.kind==="InlineFragment"){let a=lZe(s);a!==void 0&&i.reportError(new Se(`Defer directive cannot be used on root ${e} type "${t}".`,{nodes:a})),mxe({context:i,operationType:e,rootType:t,fragments:n,selectionSet:s.selectionSet,visitedFragments:r})}}function lZe(i){return i.directives?.find(e=>e.name.value===uA.name)}var gxe=D(()=>{Ki();so();Xc()});function cZe(i){let e=i.arguments?.find(t=>t.name.value==="if");if(!e)return!1;if(e.value.kind===W.BOOLEAN){if(e.value.value)return!1}else if(e.value.kind!==W.VARIABLE)return!1;return!0}function nqt(i){let e=i.arguments?.find(t=>t.name.value==="if");return e&&e.value.kind===W.BOOLEAN?!!e.value.value:!0}function oqt(i){let e=i.arguments?.find(t=>t.name.value==="if");return e?e?.value.kind===W.BOOLEAN?!e.value.value:!0:!1}function H9(i){return{OperationDefinition(e){if(e.operation!==Ar.SUBSCRIPTION)return;let t=i.getDocument(),n=new Map;for(let r of t.definitions)r.kind===W.FRAGMENT_DEFINITION&&n.set(r.name.value,r);let o=new Set;bxe({context:i,fragments:n,selectionSet:e.selectionSet,parentNodes:[],visitedFragments:o})}}}function bxe({context:i,fragments:e,selectionSet:t,parentNodes:n,visitedFragments:o}){for(let r of t.selections){let s=r.directives?.find(l=>l.name.value===Yw.name);if(s&&nqt(s))continue;let a=r.directives?.find(l=>l.name.value===qw.name);if(!(a&&oqt(a))){for(let l of r.directives??[])l.name.value===uA.name?cZe(l)||i.reportError(new Se("Defer directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.",{nodes:[l,...n]})):l.name.value===rg.name&&(cZe(l)||i.reportError(new Se("Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.",{nodes:[l,...n]})));if(r.kind==="FragmentSpread"){let l=r.name.value;if(o.has(l))continue;o.add(l);let c=e.get(l);c&&bxe({context:i,fragments:e,parentNodes:[r,...n],selectionSet:c?.selectionSet,visitedFragments:o})}else r.selectionSet&&bxe({context:i,fragments:e,selectionSet:r.selectionSet,parentNodes:n,visitedFragments:o})}}}var Axe=D(()=>{Ki();eh();so();Xc()});function vxe(i){return XR(i)||ZR(i)||$R(i)}function XR(i){return i.kind===W.OPERATION_DEFINITION||i.kind===W.FRAGMENT_DEFINITION}function U9(i){return i.operation===Ar.SUBSCRIPTION}function yxe(i){return i.kind===W.FIELD||i.kind===W.FRAGMENT_SPREAD||i.kind===W.INLINE_FRAGMENT}function BX(i){return i.kind===W.VARIABLE||i.kind===W.INT||i.kind===W.FLOAT||i.kind===W.STRING||i.kind===W.BOOLEAN||i.kind===W.NULL||i.kind===W.ENUM||i.kind===W.LIST||i.kind===W.OBJECT}function W9(i){return BX(i)&&(i.kind===W.LIST?i.values.some(W9):i.kind===W.OBJECT?i.fields.some(e=>W9(e.value)):i.kind!==W.VARIABLE)}function wxe(i){return i.kind===W.NAMED_TYPE||i.kind===W.LIST_TYPE||i.kind===W.NON_NULL_TYPE}function ZR(i){return i.kind===W.SCHEMA_DEFINITION||iy(i)||i.kind===W.DIRECTIVE_DEFINITION}function iy(i){return i.kind===W.SCALAR_TYPE_DEFINITION||i.kind===W.OBJECT_TYPE_DEFINITION||i.kind===W.INTERFACE_TYPE_DEFINITION||i.kind===W.UNION_TYPE_DEFINITION||i.kind===W.ENUM_TYPE_DEFINITION||i.kind===W.INPUT_OBJECT_TYPE_DEFINITION}function $R(i){return i.kind===W.SCHEMA_EXTENSION||i.kind===W.DIRECTIVE_EXTENSION||eF(i)}function eF(i){return i.kind===W.SCALAR_TYPE_EXTENSION||i.kind===W.OBJECT_TYPE_EXTENSION||i.kind===W.INTERFACE_TYPE_EXTENSION||i.kind===W.UNION_TYPE_EXTENSION||i.kind===W.ENUM_TYPE_EXTENSION||i.kind===W.INPUT_OBJECT_TYPE_EXTENSION}function xxe(i){return i.kind===W.TYPE_COORDINATE||i.kind===W.MEMBER_COORDINATE||i.kind===W.ARGUMENT_COORDINATE||i.kind===W.DIRECTIVE_COORDINATE||i.kind===W.DIRECTIVE_ARGUMENT_COORDINATE}var $k=D(()=>{eh();so()});function j9(i){return{Document(e){for(let t of e.definitions)if(!XR(t)){let n=t.kind===W.SCHEMA_DEFINITION||t.kind===W.SCHEMA_EXTENSION?"schema":'"'+t.name.value+'"';i.reportError(new Se(`The ${n} definition is not executable.`,{nodes:t}))}return!1}}}var Cxe=D(()=>{Ki();so();$k()});function Q9(i){return{Field(e){let t=i.getParentType();if(t&&!i.getFieldDef()){let o=i.getSchema(),r=e.name.value,s=Wh("to use an inline fragment on",i.hideSuggestions?[]:rqt(o,t,r));s===""&&(s=Wh(i.hideSuggestions?[]:sqt(t,r))),i.reportError(new Se(`Cannot query field "${r}" on type "${t}".`+s,{nodes:e}))}}}}function rqt(i,e,t){if(!zu(e))return[];let n=new Set,o=Object.create(null);for(let r of i.getPossibleTypes(e))if(r.getFields()[t]!=null){n.add(r),o[r.name]=1;for(let s of r.getInterfaces())s.getFields()[t]!=null&&(n.add(s),o[s.name]=(o[s.name]??0)+1)}return[...n].sort((r,s)=>{let a=o[s.name]-o[r.name];return a!==0?a:cn(r)&&i.isSubType(r,s)?-1:cn(s)&&i.isSubType(s,r)?1:Ww(r.name,s.name)}).map(r=>r.name)}function sqt(i,e){if(en(i)||cn(i)){let t=Object.keys(i.getFields());return Qf(e,t)}return[]}var _xe=D(()=>{Rk();l9();Fk();Ki();So()});function G9(i){return{InlineFragment(e){let t=e.typeCondition;if(t){let n=Cs(i.getSchema(),t);if(n&&!jh(n)){let o=Rn(t);i.reportError(new Se(`Fragment cannot condition on non composite type "${o}".`,{nodes:t}))}}},FragmentDefinition(e){let t=Cs(i.getSchema(),e.typeCondition);if(t&&!jh(t)){let n=Rn(e.typeCondition);i.reportError(new Se(`Fragment "${e.name.value}" cannot condition on non composite type "${n}".`,{nodes:e.typeCondition}))}}}}var Sxe=D(()=>{Ki();tg();So();pA()});function q9(i){return{...Exe(i),FragmentArgument(e){let t=i.getFragmentSignature();if(t&&!t.variableDefinitions.get(e.name.value)){let o=e.name.value,r=i.hideSuggestions?[]:Qf(o,Array.from(t.variableDefinitions.values()).map(s=>s.variable.name.value));i.reportError(new Se(`Unknown argument "${o}" on fragment "${t.definition.name.value}".`+Wh(r),{nodes:e}))}},Argument(e){let t=i.getArgument(),n=i.getFieldDef();if(!t&&n){let o=e.name.value,r=i.hideSuggestions?[]:Qf(o,n.args.map(s=>s.name));i.reportError(new Se(`Unknown argument "${o}" on field "${n}".`+Wh(r),{nodes:e}))}}}}function Exe(i){let e=new Map,t=i.getSchema(),n=t?t.getDirectives():qh;for(let r of n)e.set(r.name,r.args.map(s=>s.name));let o=i.getDocument().definitions;for(let r of o)if(r.kind===W.DIRECTIVE_DEFINITION){let s=r.arguments??[];e.set(r.name.value,s.map(a=>a.name.value))}return{Directive(r){let s=r.name.value,a=e.get(s);if(r.arguments!=null&&a!=null)for(let l of r.arguments){let c=l.name.value;if(!a.includes(c)){let u=Qf(c,a);i.reportError(new Se(`Unknown argument "${c}" on directive "@${s}".`+(i.hideSuggestions?"":Wh(u)),{nodes:l}))}}return!1}}}var Dxe=D(()=>{Rk();Fk();Ki();so();Xc()});function tF(i){let e=new Map,t=i.getSchema(),n=t?t.getDirectives():qh;for(let r of n)e.set(r.name,r.locations);let o=i.getDocument().definitions;for(let r of o)r.kind===W.DIRECTIVE_DEFINITION&&e.set(r.name.value,r.locations.map(s=>s.value));return{Directive(r,s,a,l,c){let u=r.name.value,d=e.get(u);if(d==null){i.reportError(new Se(`Unknown directive "@${u}".`,{nodes:r}));return}let h=aqt(c);h!=null&&!d.includes(h)&&i.reportError(new Se(`Directive "@${u}" may not be used on ${h}.`,{nodes:r}))}}}function aqt(i){let e=i.at(-1);switch(e!=null&&"kind"in e||Di(!1),e.kind){case W.OPERATION_DEFINITION:return lqt(e.operation);case W.FIELD:return pi.FIELD;case W.FRAGMENT_SPREAD:return pi.FRAGMENT_SPREAD;case W.INLINE_FRAGMENT:return pi.INLINE_FRAGMENT;case W.FRAGMENT_DEFINITION:return pi.FRAGMENT_DEFINITION;case W.VARIABLE_DEFINITION:{let t=i[i.length-3];return"kind"in t||Di(!1),t.kind===W.OPERATION_DEFINITION?pi.VARIABLE_DEFINITION:pi.FRAGMENT_VARIABLE_DEFINITION}case W.SCHEMA_DEFINITION:case W.SCHEMA_EXTENSION:return pi.SCHEMA;case W.SCALAR_TYPE_DEFINITION:case W.SCALAR_TYPE_EXTENSION:return pi.SCALAR;case W.OBJECT_TYPE_DEFINITION:case W.OBJECT_TYPE_EXTENSION:return pi.OBJECT;case W.FIELD_DEFINITION:return pi.FIELD_DEFINITION;case W.INTERFACE_TYPE_DEFINITION:case W.INTERFACE_TYPE_EXTENSION:return pi.INTERFACE;case W.UNION_TYPE_DEFINITION:case W.UNION_TYPE_EXTENSION:return pi.UNION;case W.ENUM_TYPE_DEFINITION:case W.ENUM_TYPE_EXTENSION:return pi.ENUM;case W.ENUM_VALUE_DEFINITION:return pi.ENUM_VALUE;case W.INPUT_OBJECT_TYPE_DEFINITION:case W.INPUT_OBJECT_TYPE_EXTENSION:return pi.INPUT_OBJECT;case W.INPUT_VALUE_DEFINITION:{let t=i.at(-3);return t!=null&&"kind"in t||Di(!1),t.kind===W.INPUT_OBJECT_TYPE_DEFINITION||t.kind===W.INPUT_OBJECT_TYPE_EXTENSION?pi.INPUT_FIELD_DEFINITION:pi.ARGUMENT_DEFINITION}case W.DIRECTIVE_DEFINITION:case W.DIRECTIVE_EXTENSION:return pi.DIRECTIVE_DEFINITION;default:Di(!1,"Unexpected kind: "+Xe(e.kind))}}function lqt(i){switch(i){case Ar.QUERY:return pi.QUERY;case Ar.MUTATION:return pi.MUTATION;case Ar.SUBSCRIPTION:return pi.SUBSCRIPTION}}var Txe=D(()=>{Is();Za();Ki();eh();VR();so();Xc()});function Y9(i){return{FragmentSpread(e){let t=e.name.value;i.getFragment(t)||i.reportError(new Se(`Unknown fragment "${t}".`,{nodes:e.name}))}}}var kxe=D(()=>{Ki()});function K9(i){let e=i.getSchema();return{OperationDefinition(t){let n=t.operation;e.getRootType(n)||i.reportError(new Se(`The ${n} operation is not supported by the schema.`,{nodes:t}))}}}var Ixe=D(()=>{Ki()});function iF(i){let{definitions:e}=i.getDocument(),t=i.getSchema()?.getTypeMap()??{},n=new Set([...Object.keys(t),...e.filter(iy).map(o=>o.name.value)]);return{NamedType(o,r,s,a,l){let c=o.name.value;if(!n.has(c)){let u=l[2]??s,d=u!=null&&cqt(u);if(d&&uZe.has(c))return;let h=i.hideSuggestions?[]:Qf(c,d?[...uZe,...n]:[...n]);i.reportError(new Se(`Unknown type "${c}".`+Wh(h),{nodes:o}))}}}}function cqt(i){return"kind"in i&&(ZR(i)||$R(i))}var uZe,Lxe=D(()=>{Rk();Fk();Ki();$k();ty();cA();uZe=new Set([...Nb,...Mb].map(i=>i.name))});function J9(i){let e=0;return{Document(t){e=t.definitions.filter(n=>n.kind===W.OPERATION_DEFINITION).length},OperationDefinition(t){!t.name&&e>1&&i.reportError(new Se("This anonymous operation must be the only defined operation.",{nodes:t}))}}}var Nxe=D(()=>{Ki();so()});function X9(i){let e=i.getSchema(),t=e?.astNode??e?.getQueryType()??e?.getMutationType()??e?.getSubscriptionType(),n=0;return{SchemaDefinition(o){if(t){i.reportError(new Se("Cannot define a new schema within a schema extension.",{nodes:o}));return}n>0&&i.reportError(new Se("Must provide only one schema definition.",{nodes:o})),++n}}}var Mxe=D(()=>{Ki()});function Z9(i){function e(t,n=Object.create(null),o=0){if(t.kind===W.FRAGMENT_SPREAD){let r=t.name.value;if(n[r]===!0)return!1;let s=i.getFragment(r);if(!s)return!1;try{return n[r]=!0,e(s,n,o)}finally{n[r]=void 0}}if(t.kind===W.FIELD&&(t.name.value==="fields"||t.name.value==="interfaces"||t.name.value==="possibleTypes"||t.name.value==="inputFields")&&(o++,o>=uqt))return!0;if("selectionSet"in t&&t.selectionSet){for(let r of t.selectionSet.selections)if(e(r,n,o))return!0}return!1}return{Field(t){if((t.name.value==="__schema"||t.name.value==="__type")&&e(t))return i.reportError(new Se("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}var uqt,Rxe=D(()=>{Ki();so();uqt=3});function $9(i){let e=new Set,t=[],n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(r){return o(r),!1}};function o(r){if(e.has(r.name.value))return;let s=r.name.value;e.add(s);let a=i.getFragmentSpreads(r.selectionSet);if(a.length!==0){n[s]=t.length;for(let l of a){let c=l.name.value,u=n[c];if(t.push(l),u===void 0){let d=i.getFragment(c);d&&o(d)}else{let d=t.slice(u),h=d.slice(0,-1).map(f=>'"'+f.name.value+'"').join(", ");i.reportError(new Se(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}t.pop()}n[s]=void 0}}}var Fxe=D(()=>{Ki()});function e7(i){return{OperationDefinition(e){let t=new Set(e.variableDefinitions?.map(o=>o.variable.name.value)),n=i.getRecursiveVariableUsages(e);for(let{node:o,fragmentVariableDefinition:r}of n){if(r)continue;let s=o.name.value;t.has(s)||i.reportError(new Se(e.name?`Variable "$${s}" is not defined by operation "${e.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[o,e]}))}}}}var Oxe=D(()=>{Ki()});function t7(i){let e=new Set,t=[];return{OperationDefinition(n){for(let o of i.getRecursivelyReferencedFragments(n))e.add(o.name.value);return!1},FragmentDefinition(n){return t.push(n),!1},Document:{leave(){for(let n of t){let o=n.name.value;e.has(o)||i.reportError(new Se(`Fragment "${o}" is never used.`,{nodes:n}))}}}}}var Pxe=D(()=>{Ki()});function i7(i){return{FragmentDefinition(e){let t=i.getVariableUsages(e),n=new Set(t.map(({node:r})=>r.name.value)),o=e.variableDefinitions??[];for(let r of o){let s=r.variable.name.value;n.has(s)||i.reportError(new Se(`Variable "$${s}" is never used in fragment "${e.name.value}".`,{nodes:r}))}},OperationDefinition(e){let t=i.getRecursiveVariableUsages(e),n=new Set;for(let{node:r,fragmentVariableDefinition:s}of t){let a=r.name.value;s||n.add(a)}let o=e.variableDefinitions??[];for(let r of o){let s=r.variable.name.value;n.has(s)||i.reportError(new Se(e.name?`Variable "$${s}" is never used in operation "${e.name.value}".`:`Variable "$${s}" is never used.`,{nodes:r}))}}}}var Bxe=D(()=>{Ki()});function eI(i){switch(i.kind){case W.OBJECT:return{...i,fields:dqt(i.fields)};case W.LIST:return{...i,values:i.values.map(eI)};case W.INT:case W.FLOAT:case W.STRING:case W.BOOLEAN:case W.NULL:case W.ENUM:case W.VARIABLE:return i}}function dqt(i){return i.map(e=>({...e,value:eI(e.value)})).sort((e,t)=>Ww(e.name.value,t.name.value))}var zxe=D(()=>{l9();so()});function fZe(i){return Array.isArray(i)?i.map(([e,t])=>`subfields "${e}" conflict because `+fZe(t)).join(" and "):i}function o7(i){let e=new WX,t=new Wxe,n=new Map;return{SelectionSet(o){let r=hqt(i,n,e,t,i.getParentType(),o);for(let[[s,a],l,c]of r){let u=fZe(a);i.reportError(new Se(`Fields "${s}" conflict because ${u}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:l.concat(c)}))}}}}function hqt(i,e,t,n,o,r){let s=[],[a,l]=HX(i,e,o,r,void 0);if(pqt(i,s,e,t,n,a),l.length!==0)for(let c=0;c1)for(let l=0;l[r.value,n===void 0?s:n7(s,n)]));return i.every(r=>{let s=r.value;e&&(s=n7(s,e));let a=o.get(r.name.value);return a===void 0?!1:dZe(s)===dZe(a)})}function n7(i,e){switch(i.kind){case W.VARIABLE:return e.get(i.name.value)??i;case W.LIST:return{...i,values:i.values.map(t=>n7(t,e))};case W.OBJECT:return{...i,fields:i.fields.map(t=>({...t,value:n7(t.value,e)}))};default:return i}}function dZe(i){return Rn(eI(i))}function hZe(i){return i?.find(e=>e.name.value==="stream")}function mqt(i,e,t,n){let o=hZe(i),r=hZe(t);if(!(!o&&!r))return o&&r&&jxe(o.arguments,e,r.arguments,n)?"they have overlapping stream directives. See https://github.com/graphql/defer-stream-wg/discussions/100":"they have overlapping stream directives"}function Vxe(i,e){return Cn(i)?Cn(e)?Vxe(i.ofType,e.ofType):!0:Cn(e)?!0:Si(i)?Si(e)?Vxe(i.ofType,e.ofType):!0:Si(e)?!0:hd(i)||hd(e)?i!==e:!1}function HX(i,e,t,n,o){let r=e.get(n);if(r)return r;let s=new Map,a=new Map;mZe(i,t,n,s,a,o);let l=[s,Array.from(a.values())];return e.set(n,l),l}function Hxe(i,e,t,n){let o=e.get(t.selectionSet);if(o)return o;let r=Cs(i.getSchema(),t.typeCondition);return HX(i,e,r,t.selectionSet,n)}function mZe(i,e,t,n,o,r){for(let s of t.selections)switch(s.kind){case W.FIELD:{let a=s.name.value,l;(en(e)||cn(e))&&(l=e.getFields()[a]);let c=s.alias?s.alias.value:a,u=n.get(c);u==null&&(u=[],n.set(c,u)),u.push([e,s,l]);break}case W.FRAGMENT_SPREAD:{let a=gqt(i,s,r);o.set(a.key,a);break}case W.INLINE_FRAGMENT:{let a=s.typeCondition,l=a?Cs(i.getSchema(),a):e;mZe(i,l,s.selectionSet,n,o,r);break}}}function gqt(i,e,t){let n="",o=new Map,r=i.getFragmentSignatureByName()(e.name.value),s=new Map;if(e.arguments)for(let a of e.arguments)s.set(a.name.value,a.value);if(r?.variableDefinitions){n+=e.name.value+"(";for(let[a,l]of r.variableDefinitions){let c=s.get(a);c&&(n+=a+": "+Rn(eI(c)));let u=s.get(a);u!==void 0?o.set(a,t!==void 0?n7(u,t):u):l.defaultValue&&o.set(a,l.defaultValue)}n+=")"}return{key:n,node:e,varMap:o.size>0?o:void 0}}function bqt(i,e,t,n){if(i.length>0)return[[e,i.map(([o])=>o)],[t,...i.map(([,o])=>o).flat()],[n,...i.map(([,,o])=>o).flat()]]}var WX,Wxe,Qxe=D(()=>{Is();Ki();so();tg();So();zxe();pA();WX=class{constructor(){this._data=new Map}has(e,t,n){let o=this._data.get(e)?.get(t);return o===void 0?!1:n?!0:n===o}add(e,t,n){let o=this._data.get(e);o===void 0?this._data.set(e,new Map([[t,n]])):o.set(t,n)}},Wxe=class{constructor(){this._orderedPairSet=new WX}has(e,t,n){return e{Is();Ki();So();b9();pA()});function s7(i){let e=i.getSchema(),t=new Map;for(let o of i.getDocument().definitions)iy(o)&&t.set(o.name.value,o);return{ScalarTypeExtension:n,ObjectTypeExtension:n,InterfaceTypeExtension:n,UnionTypeExtension:n,EnumTypeExtension:n,InputObjectTypeExtension:n};function n(o){let r=o.name.value,s=t.get(r),a=e?.getType(r),l;if(s!=null?l=vqt[s.kind]:a&&(l=yqt(a)),l!=null){if(l!==o.kind){let c=wqt(o.kind);i.reportError(new Se(`Cannot extend non-${c} type "${r}".`,{nodes:s?[s,o]:o}))}}else{let c=[...t.keys(),...Object.keys(e?.getTypeMap()??{})];i.reportError(new Se(`Cannot extend type "${r}" because it is not defined.`+Wh(Qf(r,c)),{nodes:o.name}))}}}function yqt(i){if(yc(i))return W.SCALAR_TYPE_EXTENSION;if(en(i))return W.OBJECT_TYPE_EXTENSION;if(cn(i))return W.INTERFACE_TYPE_EXTENSION;if(ys(i))return W.UNION_TYPE_EXTENSION;if(Oo(i))return W.ENUM_TYPE_EXTENSION;if(Bi(i))return W.INPUT_OBJECT_TYPE_EXTENSION;Di(!1,"Unexpected type: "+Xe(i))}function wqt(i){switch(i){case W.SCALAR_TYPE_EXTENSION:return"scalar";case W.OBJECT_TYPE_EXTENSION:return"object";case W.INTERFACE_TYPE_EXTENSION:return"interface";case W.UNION_TYPE_EXTENSION:return"union";case W.ENUM_TYPE_EXTENSION:return"enum";case W.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:Di(!1,"Unexpected kind: "+Xe(i))}}var vqt,qxe=D(()=>{Rk();Is();Za();Fk();Ki();so();$k();So();vqt={[W.SCALAR_TYPE_DEFINITION]:W.SCALAR_TYPE_EXTENSION,[W.OBJECT_TYPE_DEFINITION]:W.OBJECT_TYPE_EXTENSION,[W.INTERFACE_TYPE_DEFINITION]:W.INTERFACE_TYPE_EXTENSION,[W.UNION_TYPE_DEFINITION]:W.UNION_TYPE_EXTENSION,[W.ENUM_TYPE_DEFINITION]:W.ENUM_TYPE_EXTENSION,[W.INPUT_OBJECT_TYPE_DEFINITION]:W.INPUT_OBJECT_TYPE_EXTENSION}});function a7(i){return{...Yxe(i),Field:{leave(e){let t=i.getFieldDef();if(!t)return!1;let n=new Set(e.arguments?.map(o=>o.name.value));for(let o of t.args)!n.has(o.name)&&Qh(o)&&i.reportError(new Se(`Argument "${o}" of type "${o.type}" is required, but it was not provided.`,{nodes:e}))}},FragmentSpread:{leave(e){let t=i.getFragmentSignature();if(!t)return!1;let n=new Set(e.arguments?.map(o=>o.name.value));for(let[o,r]of t.variableDefinitions)if(!n.has(o)&&gZe(r)){let s=Cs(i.getSchema(),r.type),a=Xe(s);i.reportError(new Se(`Fragment "${e.name.value}" argument "${o}" of type "${a}" is required, but it was not provided.`,{nodes:e}))}}}}}function Yxe(i){let e=new Map,n=i.getSchema()?.getDirectives()??qh;for(let r of n)e.set(r.name,new Map(r.args.filter(Qh).map(s=>[s.name,s])));let o=i.getDocument().definitions;for(let r of o)if(r.kind===W.DIRECTIVE_DEFINITION){let s=r.arguments??[];e.set(r.name.value,new Map(s.filter(gZe).map(a=>[a.name.value,a])))}return{Directive:{leave(r){let s=r.name.value,a=e.get(s);if(a!=null){let l=r.arguments??[],c=new Set(l.map(u=>u.name.value));for(let[u,d]of a.entries())if(!c.has(u)){let h=Uw(d.type)?Xe(d.type):Rn(d.type);i.reportError(new Se(`Argument "@${s}(${u}:)" of type "${h}" is required, but it was not provided.`,{nodes:r}))}}}}}}function gZe(i){return i.type.kind===W.NON_NULL_TYPE&&i.defaultValue==null}var Kxe=D(()=>{Is();Ki();so();tg();So();Xc();pA()});function l7(i){return{Field(e){let t=i.getType(),n=e.selectionSet;if(t)if(hd(Vr(t))){if(n){let o=e.name.value,r=Xe(t);i.reportError(new Se(`Field "${o}" must not have a selection since type "${r}" has no subfields.`,{nodes:n}))}}else if(n){if(n.selections.length===0){let o=e.name.value,r=Xe(t);i.reportError(new Se(`Field "${o}" of type "${r}" must have at least one field selected.`,{nodes:e}))}}else{let o=e.name.value,r=Xe(t);i.reportError(new Se(`Field "${o}" of type "${r}" must have a selection of subfields. Did you mean "${o} { ... }"?`,{nodes:e}))}}}}var Jxe=D(()=>{Is();Ki();So()});function ny(i,e){if(Si(e))return i==null?void 0:ny(i,e.ofType);if(i==null)return null;if(Cn(e)){if(!Up(i)){let o=ny(i,e.ofType);return o===void 0?void 0:[o]}let n=[];for(let o of i){let r=ny(o,e.ofType);if(r===void 0)return;n.push(r)}return n}if(Bi(e)){if(!Ma(i)||Array.isArray(i))return;let n=Object.create(null),o=e.getFields(),r=0;for(let s of Object.keys(i))if(i[s]!==void 0&&(r++,!Object.hasOwn(o,s)))return;for(let s of Object.values(o)){let a=i[s.name];if(a===void 0){if(Gh(s))return;let l=UX(s);l!==void 0&&(n[s.name]=l)}else{let l=ny(a,s.type);if(l===void 0)return;n[s.name]=l}}if(e.isOneOf){let s=Object.keys(n);if(r!==1||s.length!==1)return;let a=s[0];if(n[a]===null)return}return n}let t=ng(e);try{return t.coerceInputValue(i)}catch{}}function oy(i,e,t,n){if(i.kind===W.VARIABLE){let r=bZe(i,t,n);return r==null&&Si(e)?void 0:r}if(Si(e))return i.kind===W.NULL?void 0:oy(i,e.ofType,t,n);if(i.kind===W.NULL)return null;if(Cn(e)){if(i.kind!==W.LIST){let s=oy(i,e.ofType,t,n);return s===void 0?void 0:[s]}let r=[];for(let s of i.values){let a=oy(s,e.ofType,t,n);if(a===void 0)if(s.kind===W.VARIABLE&&bZe(s,t,n)==null&&!Si(e.ofType))a=null;else return;r.push(a)}return r}if(Bi(e)){if(i.kind!==W.OBJECT)return;let r=Object.create(null),s=e.getFields();if(i.fields.some(c=>!Object.hasOwn(s,c.name.value)))return;let l=new Map(i.fields.map(c=>[c.name.value,c]));for(let c of Object.values(s)){let u=l.get(c.name);if(!u||u.value.kind===W.VARIABLE&&xqt(u.value,t,n)){if(Gh(c))return;let d=UX(c);d!==void 0&&(r[c.name]=d)}else{let d=oy(u.value,c.type,t,n);if(d===void 0)return;r[c.name]=d}}if(e.isOneOf){let c=Object.keys(r);if(l.size!==1||c.length!==1)return;for(let[u,d]of l)if(d.value.kind===W.NULL||r[u]===null)return}return r}let o=ng(e);try{return o.coerceInputLiteral?o.coerceInputLiteral(ey(i,t,n)):o.parseLiteral(i,t?.coerced)}catch{}}function bZe(i,e,t){let n=i.name.value;return t?.sources[n]!==void 0?t.coerced[n]:e?.coerced[n]}function xqt(i,e,t){let n=i.name.value;return(t?.sources[n]!==void 0?t.coerced:e?.coerced)?.[n]===void 0}function UX(i){let e=i._memoizedCoercedDefaultValue;if(e!==void 0)return e;let t=i.default;if(t!==void 0)return e=t.literal?oy(t.literal,i.type):ny(t.value,i.type),e===void 0&&Di(!1,`Expected value of type "${i.type}" to be valid, found: ${Xe(t.literal??t.value)}.`),i._memoizedCoercedDefaultValue=e,e;let n=i.defaultValue;return n!==void 0&&(i._memoizedCoercedDefaultValue=n),n}var Xxe=D(()=>{Is();Za();Lk();oA();so();So();DX()});function jX(i,e){let t=e.variable.name.value,n=Cs(i,e.type);if(!Ql(n)){let r=Rn(e.type);return new Se(`Variable "$${t}" expected value of type "${r}" which cannot be used as an input type.`,{nodes:e.type})}let o=e.defaultValue;return{name:t,type:n,default:o&&{literal:o}}}var Zxe=D(()=>{Ki();tg();So();pA()});function nF(i,e,t,n){let o=[],r=n?.maxErrors;try{let s=Cqt(i,e,t,a=>{if(r!=null&&o.length>=r)throw new Se("Too many errors processing variables, error limit reached. Execution aborted.");o.push(a)},n?.hideSuggestions);if(o.length===0)return{variableValues:s}}catch(s){o.push(Ac(s))}return{errors:o}}function Cqt(i,e,t,n,o){let r=Object.create(null),s=Object.create(null);for(let a of e){let l=jX(i,a);if(l instanceof Se){n(l);continue}let{name:c,type:u}=l,d=Object.hasOwn(t,c)?t[c]:void 0;if(d===void 0){if(r[c]={signature:l},a.defaultValue){eCe(s,c,l,(f,p)=>{n(new Se(`Variable "$${c}" has invalid default value${Nk(p)}: ${f.message}`,{nodes:a}))},o);continue}else if(!Si(u))continue}else r[c]={signature:l,value:d};let h=ny(d,u);h!==void 0?s[c]=h:dS(d,u,(f,p)=>{n(new Se(`Variable "$${c}" has invalid value${Nk(p)}: ${f.message}`,{nodes:a,originalError:f}))},o)}return{sources:r,coerced:s}}function eCe(i,e,t,n,o){try{let r=UX(t);r!==void 0&&(i[e]=r)}catch(r){let s=t.default;if(s===void 0)throw r;let a=!1;sxe(s,t.type,(l,c)=>{a=!0,n(l,c)},o),a||n(Ac(r),[])}}function AZe(i,e,t,n,o){let r=i.arguments??[],s=new Map(r.map(c=>[c.name.value,c])),a=Object.create(null),l=Object.create(null);for(let[c,u]of Object.entries(e)){let d=s.get(c);d!==void 0?a[c]=n==null?{signature:u,value:d.value}:{signature:u,value:d.value,fragmentVariableValues:n}:a[c]={signature:u},vZe(l,i,c,u,d,t,n,o)}return{sources:a,coerced:l}}function mA(i,e,t,n,o){let r=Object.create(null),s=e.arguments??[],a=new Map(s.map(l=>[l.name.value,l]));for(let l of i.args){let c=l.name;vZe(r,e,c,l,a.get(l.name),t,n,o)}return r}function vZe(i,e,t,n,o,r,s,a){let l=n.type,c=(h,f)=>{throw new Se(`${$xe(n,e)} has invalid default value${Nk(f)}: ${h.message}`,{nodes:e})};if(!o){if(Qh(n))throw new Se(`${$xe(n,e)} of required type "${l}" was not provided.`,{nodes:e});eCe(i,t,n,c,a);return}let u=o.value;if(u.kind===W.VARIABLE){let h=u.name.value,f=s?.sources[h]?s:r;if((f==null||!Object.hasOwn(f.coerced,h))&&!Qh(n)){eCe(i,t,n,c,a);return}}let d=oy(u,l,r,s);d===void 0&&(Qw(u,l,(h,f)=>{throw h.message=`${$xe(n,e)} has invalid value${Nk(f)}: ${h.message}`,h},r,s,a),Di(!1,"Invalid argument")),i[t]=d}function $xe(i,e){return OR(i)?`Argument "${i}"`:`Variable "$${i.name}" defined by fragment "${e.name.value}"`}function gA(i,e,t,n,o){let r=e.directives?.find(s=>s.name.value===i.name);if(r)return mA(i,r,t,n,o)}var tI=D(()=>{Za();Iwe();sS();Ki();so();So();I9();Xxe();w9();Zxe()});function oF(i,e,t,n,o,r,s=!1){let a=new Jc,l=[],c={schema:i,fragments:e,variableValues:t,runtimeType:n,visitedFragmentNames:new Map,hideSuggestions:r,forbiddenDirectiveInstances:[],forbidSkipAndInclude:s};return c7(c,o,a,l),{groupedFieldSet:a,newDeferUsages:l,forbiddenDirectiveInstances:c.forbiddenDirectiveInstances}}function xZe(i,e,t,n,o,r){let s={schema:i,fragments:e,variableValues:t,runtimeType:n,visitedFragmentNames:new Map,hideSuggestions:r,forbiddenDirectiveInstances:[],forbidSkipAndInclude:!1},a=new Jc,l=[];for(let c of o){let u=c.node.selectionSet;if(u){let{deferUsage:d,fragmentVariableValues:h}=c;c7(s,u,a,l,d,h)}}return{groupedFieldSet:a,newDeferUsages:l}}function c7(i,e,t,n,o,r){let{schema:s,fragments:a,variableValues:l,runtimeType:c,visitedFragmentNames:u,hideSuggestions:d}=i;for(let h of e.selections)switch(h.kind){case W.FIELD:{if(!tCe(i,h,l,r))continue;t.add(_qt(h),{node:h,deferUsage:o,fragmentVariableValues:r});break}case W.INLINE_FRAGMENT:{if(!tCe(i,h,l,r)||!wZe(s,h,c))continue;let f=yZe(l,r,h,o);f?(n.push(f),c7(i,h.selectionSet,t,n,f,r)):c7(i,h.selectionSet,t,n,o,r);break}case W.FRAGMENT_SPREAD:{let f=h.name.value;if(!tCe(i,h,l,r))continue;let p=a[f];if(p==null||!wZe(s,p.definition,c))continue;let g=yZe(l,r,h,o),A=u.get(f),v;if(g){if(A!==void 0)continue;u.set(f,!0),n.push(g),v=g}else{if(A===!1)continue;u.set(f,!1),v=o}let w=p.variableSignatures,C;w&&(C=AZe(h,w,l,r,d)),c7(i,p.definition.selectionSet,t,n,v,C);break}}}function yZe(i,e,t,n){let o=gA(uA,t,i,e);if(o&&o.if!==!1)return{label:typeof o.label=="string"?o.label:void 0,parentDeferUsage:n}}function tCe(i,e,t,n){let o=e.directives?.find(l=>l.name.value===Yw.name);if(o&&i.forbidSkipAndInclude)return i.forbiddenDirectiveInstances.push(o),!1;if((o?mA(Yw,o,t,n,i.hideSuggestions):void 0)?.if===!0)return!1;let s=e.directives?.find(l=>l.name.value===qw.name);return s&&i.forbidSkipAndInclude?(i.forbiddenDirectiveInstances.push(s),!1):(s?mA(qw,s,t,n,i.hideSuggestions):void 0)?.if!==!1}function wZe(i,e,t){let n=e.typeCondition;if(!n)return!0;let o=Cs(i,n);return o===t?!0:zu(o)?i.isSubType(o,t):!1}function _qt(i){return i.alias?i.alias.value:i.name.value}var QX=D(()=>{NR();so();So();Xc();pA();tI()});function iCe(i){return i.map(e=>e.node)}function u7(i){return{OperationDefinition(e){if(e.operation==="subscription"){let t=i.getSchema(),n=t.getSubscriptionType();if(n){let o=e.name?e.name.value:null,r=Object.create(null),s=i.getDocument(),a=Object.create(null);for(let u of s.definitions)u.kind===W.FRAGMENT_DEFINITION&&(a[u.name.value]={definition:u});let{groupedFieldSet:l,forbiddenDirectiveInstances:c}=oF(t,a,r,n,e.selectionSet,i.hideSuggestions,!0);if(c.length>0){i.reportError(new Se(o!=null?`Subscription "${o}" must not use \`@skip\` or \`@include\` directives in the top level selection.`:"Anonymous Subscription must not use `@skip` or `@include` directives in the top level selection.",{nodes:c}));return}if(l.size>1){let h=[...l.values()].slice(1).flatMap(f=>iCe(f));i.reportError(new Se(o!=null?`Subscription "${o}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:h}))}for(let u of l.values())iCe(u)[0].name.value.startsWith("__")&&i.reportError(new Se(o!=null?`Subscription "${o}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:iCe(u)}))}}}}}var nCe=D(()=>{Ki();so();QX()});function d7(i){return{Directive(e){let t=i.getFieldDef(),n=i.getParentType();t&&n&&e.name.value===rg.name&&!(Cn(t.type)||jw(t.type)&&Cn(t.type.ofType))&&i.reportError(new Se(`Directive "@stream" cannot be used on non-list field "${n}.${t.name}".`,{nodes:e}))}}}var oCe=D(()=>{Ki();So();Xc()});function rF(i,e){let t=new Jc;for(let n of i)t.add(e(n),n);return t}var GX=D(()=>{NR()});function h7(i){return{DirectiveDefinition(n){let o=n.arguments??[];return t(`@${n.name.value}`,o)},InterfaceTypeDefinition:e,InterfaceTypeExtension:e,ObjectTypeDefinition:e,ObjectTypeExtension:e};function e(n){let o=n.name.value,r=n.fields??[];for(let s of r){let a=s.name.value,l=s.arguments??[];t(`${o}.${a}`,l)}return!1}function t(n,o){let r=rF(o,s=>s.name.value);for(let[s,a]of r)a.length>1&&i.reportError(new Se(`Argument "${n}(${s}:)" can only be defined once.`,{nodes:a.map(l=>l.name)}));return!1}}var rCe=D(()=>{GX();Ki()});function sF(i){return{Field:e,Directive:e};function e(t){let n=t.arguments??[],o=rF(n,r=>r.name.value);for(let[r,s]of o)s.length>1&&i.reportError(new Se(`There can be only one argument named "${r}".`,{nodes:s.map(a=>a.name)}))}}var sCe=D(()=>{GX();Ki()});function f7(i){let e=new Map,t=i.getSchema();return{DirectiveDefinition(n){let o=n.name.value;if(t?.getDirective(o)){i.reportError(new Se(`Directive "@${o}" already exists in the schema. It cannot be redefined.`,{nodes:n.name}));return}let r=e.get(o);return r?i.reportError(new Se(`There can be only one directive named "@${o}".`,{nodes:[r,n.name]})):e.set(o,n.name),!1}}}var aCe=D(()=>{Ki()});function aF(i){let e=new Map,t=i.getSchema(),n=t?t.getDirectives():qh;for(let l of n)e.set(l.name,!l.isRepeatable);let o=i.getDocument().definitions;for(let l of o)l.kind===W.DIRECTIVE_DEFINITION&&e.set(l.name.value,!l.repeatable);let r=new Map,s=new Map,a=new Map;return{enter(l){if(!("directives"in l)||!l.directives)return;let c;if(l.kind===W.SCHEMA_DEFINITION||l.kind===W.SCHEMA_EXTENSION)c=r;else if(iy(l)||eF(l)){let u=l.name.value;c=s.get(u),c===void 0&&(c=new Map,s.set(u,c))}else if(l.kind===W.DIRECTIVE_DEFINITION||l.kind===W.DIRECTIVE_EXTENSION){let u=l.name.value;c=a.get(u),c===void 0&&(c=new Map,a.set(u,c))}else c=new Map;for(let u of l.directives){let d=u.name.value;if(e.get(d)===!0){let h=c.get(d);h!=null?i.reportError(new Se(`The directive "@${d}" can only be used once at this location.`,{nodes:[h,u]})):c.set(d,u)}}}}}var lCe=D(()=>{Ki();so();$k();Xc()});function p7(i){let e=i.getSchema(),t=e?e.getTypeMap():Object.create(null),n=new Map;return{EnumTypeDefinition:o,EnumTypeExtension:o};function o(r){let s=r.name.value,a=n.get(s);a==null&&(a=new Map,n.set(s,a));let l=r.values??[];for(let c of l){let u=c.name.value,d=t[s];if(Oo(d)&&d.getValue(u)){i.reportError(new Se(`Enum value "${s}.${u}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:c.name}));continue}let h=a.get(u);h!=null?i.reportError(new Se(`Enum value "${s}.${u}" can only be defined once.`,{nodes:[h,c.name]})):a.set(u,c.name)}return!1}}var cCe=D(()=>{Ki();So()});function m7(i){let e=i.getSchema(),t=e?e.getTypeMap():Object.create(null),n=new Map;return{InputObjectTypeDefinition:o,InputObjectTypeExtension:o,InterfaceTypeDefinition:o,InterfaceTypeExtension:o,ObjectTypeDefinition:o,ObjectTypeExtension:o};function o(r){let s=r.name.value,a=n.get(s);a==null&&(a=new Map,n.set(s,a));let l=r.fields??[];for(let c of l){let u=c.name.value;if(Sqt(t[s],u)){i.reportError(new Se(`Field "${s}.${u}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:c.name}));continue}let d=a.get(u);d!=null?i.reportError(new Se(`Field "${s}.${u}" can only be defined once.`,{nodes:[d,c.name]})):a.set(u,c.name)}return!1}}function Sqt(i,e){return en(i)||cn(i)||Bi(i)?i.getFields()[e]!=null:!1}var uCe=D(()=>{Ki();So()});function g7(i){let e=new Map;return{OperationDefinition:()=>!1,FragmentDefinition(t){let n=t.name.value,o=e.get(n);return o!=null?i.reportError(new Se(`There can be only one fragment named "${n}".`,{nodes:[o,t.name]})):e.set(n,t.name),!1}}}var dCe=D(()=>{Ki()});function lF(i){let e=[],t=new Map;return{ObjectValue:{enter(){e.push(t),t=new Map},leave(){let n=e.pop();n==null&&Di(!1),t=n}},ObjectField(n){let o=n.name.value,r=t.get(o);r!=null?i.reportError(new Se(`There can be only one input field named "${o}".`,{nodes:[r,n.name]})):t.set(o,n.name)}}}var hCe=D(()=>{Za();Ki()});function b7(i){let e=new Map;return{OperationDefinition(t){let n=t.name;if(n!=null){let o=e.get(n.value);o!=null?i.reportError(new Se(`There can be only one operation named "${n.value}".`,{nodes:[o,n]})):e.set(n.value,n)}return!1},FragmentDefinition:()=>!1}}var fCe=D(()=>{Ki()});function A7(i){let e=i.getSchema(),t=new Map,n=e?{query:e.getQueryType(),mutation:e.getMutationType(),subscription:e.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(r){let s=r.operationTypes??[];for(let a of s){let l=a.operation,c=t.get(l);n[l]?i.reportError(new Se(`Type for ${l} already defined in the schema. It cannot be redefined.`,{nodes:a})):c?i.reportError(new Se(`There can be only one ${l} type in schema.`,{nodes:[c,a]})):t.set(l,a)}return!1}}var pCe=D(()=>{Ki()});function v7(i){let e=new Map,t=i.getSchema();return{ScalarTypeDefinition:n,ObjectTypeDefinition:n,InterfaceTypeDefinition:n,UnionTypeDefinition:n,EnumTypeDefinition:n,InputObjectTypeDefinition:n};function n(o){let r=o.name.value;if(t?.getType(r)){i.reportError(new Se(`Type "${r}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:o.name}));return}let s=e.get(r);return s!=null?i.reportError(new Se(`There can be only one type named "${r}".`,{nodes:[s,o.name]})):e.set(r,o.name),!1}}var mCe=D(()=>{Ki()});function y7(i){return{OperationDefinition(e){let t=e.variableDefinitions??[],n=rF(t,o=>o.variable.name.value);for(let[o,r]of n)r.length>1&&i.reportError(new Se(`There can be only one variable named "$${o}".`,{nodes:r.map(s=>s.variable.name)}))}}}var gCe=D(()=>{GX();Ki()});function w7(i){return{NullValue:e=>vS(i,e,i.getInputType()),ListValue:e=>vS(i,e,i.getParentInputType()),ObjectValue:e=>vS(i,e,i.getInputType()),EnumValue:e=>vS(i,e,i.getInputType()),IntValue:e=>vS(i,e,i.getInputType()),FloatValue:e=>vS(i,e,i.getInputType()),StringValue:e=>vS(i,e,i.getInputType()),BooleanValue:e=>vS(i,e,i.getInputType())}}function vS(i,e,t){return t&&Qw(e,t,n=>{i.reportError(n)},void 0,void 0,i.hideSuggestions),!1}var bCe=D(()=>{w9()});function x7(i){return{VariableDefinition(e){let t=Cs(i.getSchema(),e.type);if(t!==void 0&&!Ql(t)){let n=e.variable.name.value,o=Rn(e.type);i.reportError(new Se(`Variable "$${n}" cannot be non-input type "${o}".`,{nodes:e.type}))}}}}var ACe=D(()=>{Ki();tg();So();pA()});function C7(i){let e;return{OperationDefinition:{enter(){e=new Map},leave(t){let n=i.getRecursiveVariableUsages(t);for(let{node:o,type:r,parentType:s,defaultValue:a,fragmentVariableDefinition:l}of n){let c=o.name.value,u=l;if(u??=e.get(c),u&&r){let d=i.getSchema(),h=Cs(d,u.type);h&&!Eqt(d,h,u.defaultValue,r,a)&&i.reportError(new Se(`Variable "$${c}" of type "${h}" used in position expecting type "${r}".`,{nodes:[u,o]})),Bi(s)&&s.isOneOf&&PR(h)&&i.reportError(new Se(`Variable "$${c}" is of type "${h}" but must be non-nullable to be used for OneOf Input Object "${s}".`,{nodes:[u,o]}))}}}},VariableDefinition(t){e.set(t.variable.name.value,t)}}}function Eqt(i,e,t,n,o){if(Si(n)&&!Si(e)){if(!(t!=null&&t.kind!==W.NULL)&&!(o!==void 0))return!1;let a=n.ofType;return sA(i,e,a)}return sA(i,e,n)}var vCe=D(()=>{Ki();so();So();b9();pA()});var qX,_7,CZe,yCe=D(()=>{pxe();gxe();Axe();Cxe();_xe();Sxe();Dxe();Txe();kxe();Ixe();Lxe();Nxe();Mxe();Rxe();Fxe();Oxe();Pxe();Bxe();Qxe();Gxe();qxe();Kxe();Jxe();nCe();oCe();rCe();sCe();aCe();lCe();cCe();uCe();dCe();hCe();fCe();pCe();mCe();gCe();bCe();ACe();vCe();qX=Object.freeze([Z9]),_7=Object.freeze([j9,K9,b7,J9,u7,iF,G9,x7,l7,Q9,g7,Y9,t7,r7,$9,y7,e7,i7,tF,aF,V9,H9,z9,d7,q9,sF,w7,a7,C7,o7,lF,...qX]),CZe=Object.freeze([X9,A7,v7,p7,m7,h7,f7,iF,tF,aF,s7,Exe,sF,lF,Yxe])});var YX,KX,iI,wCe=D(()=>{so();Bk();PX();YX=class{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(let n of this.getDocument().definitions)n.kind===W.FRAGMENT_DEFINITION&&(t[n.name.value]=n);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){t=[];let n=[e],o;for(;o=n.pop();)for(let r of o.selections)r.kind===W.FRAGMENT_SPREAD?t.push(r):r.selectionSet&&n.push(r.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];let n=new Set,o=[e.selectionSet],r;for(;r=o.pop();)for(let s of this.getFragmentSpreads(r)){let a=s.name.value;if(!n.has(a)){n.add(a);let l=this.getFragment(a);l&&(t.push(l),o.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}},KX=class extends YX{constructor(e,t,n){super(e,n),this._schema=t}get hideSuggestions(){return!1}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}},iI=class extends YX{constructor(e,t,n,o,r){super(t,o),this._schema=e,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map,this._hideSuggestions=r??!1}get[Symbol.toStringTag](){return"ValidationContext"}get hideSuggestions(){return this._hideSuggestions}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){let n=[],o=new sg(this._schema,void 0,this._typeInfo.getFragmentSignatureByName()),r=e.kind===W.FRAGMENT_DEFINITION?e:void 0;ca(e,ex(o,{VariableDefinition:()=>!1,Variable(s){let a;r?(a=o.getFragmentSignatureByName()(r.name.value)?.variableDefinitions.get(s.name.value),n.push({node:s,type:o.getInputType(),parentType:o.getParentInputType(),defaultValue:void 0,fragmentVariableDefinition:a})):n.push({node:s,type:o.getInputType(),parentType:o.getParentInputType(),defaultValue:o.getDefaultValue(),fragmentVariableDefinition:void 0})}})),t=n,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(let n of this.getRecursivelyReferencedFragments(e))t=t.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(e,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getFragmentSignature(){return this._typeInfo.getFragmentSignature()}getFragmentSignatureByName(){return this._typeInfo.getFragmentSignatureByName()}getEnumValue(){return this._typeInfo.getEnumValue()}}});function S7(i,e,t=_7,n){return Kp(lxe)?lxe.traceSync(()=>_Ze(i,e,t,n),{schema:i,document:e}):_Ze(i,e,t,n)}function _Ze(i,e,t,n){let o=n?.maxErrors??100,r=n?.hideSuggestions??!1;Yk(i);let s=[],a=new sg(i),l=new iI(i,e,a,u=>{if(s.length>=o)throw xCe;s.push(u)},r),c=RR(t.map(u=>u(l)));try{ca(e,ex(a,c),Dqt)}catch(u){if(u===xCe)s.push(xCe);else throw u}return s}function SZe(i,e,t=CZe){let n=[],o=new KX(i,e,s=>{n.push(s)}),r=t.map(s=>s(o));return ca(i,RR(r)),n}function EZe(i){let e=SZe(i);if(e.length!==0)throw new Error(e.map(t=>t.message).join(` -`))}function aei(i,e){var t=Yxe(i,e);if(t.length!==0)throw new Error(t.map(function(n){return n.message}).join(` +`))}function DZe(i,e){let t=SZe(i,e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}});var _$e=Ue(Kxe=>{"use strict";Object.defineProperty(Kxe,"__esModule",{value:!0});Kxe.default=lei;function lei(i){var e;return function(n,r,o){e||(e=new WeakMap);var s=e.get(n),a;if(s){if(a=s.get(r),a){var l=a.get(o);if(l!==void 0)return l}}else s=new WeakMap,e.set(n,s);a||(a=new WeakMap,s.set(r,a));var c=i(n,r,o);return a.set(o,c),c}}});var S$e=Ue(Jxe=>{"use strict";Object.defineProperty(Jxe,"__esModule",{value:!0});Jxe.default=dei;var cei=uei(MK());function uei(i){return i&&i.__esModule?i:{default:i}}function dei(i,e,t){return i.reduce(function(n,r){return(0,cei.default)(n)?n.then(function(o){return e(o,r)}):e(n,r)},t)}});var E$e=Ue(Xxe=>{"use strict";Object.defineProperty(Xxe,"__esModule",{value:!0});Xxe.default=hei;function hei(i){var e=Object.keys(i),t=e.map(function(n){return i[n]});return Promise.all(t).then(function(n){return n.reduce(function(r,o,s){return r[e[s]]=o,r},Object.create(null))})}});var W6=Ue(OJ=>{"use strict";Object.defineProperty(OJ,"__esModule",{value:!0});OJ.addPath=fei;OJ.pathToArray=pei;function fei(i,e,t){return{prev:i,key:e,typename:t}}function pei(i){for(var e=[],t=i;t;)e.push(t.key),t=t.prev;return e.reverse()}});var BJ=Ue(Zxe=>{"use strict";Object.defineProperty(Zxe,"__esModule",{value:!0});Zxe.getOperationRootType=mei;var PJ=dn();function mei(i,e){if(e.operation==="query"){var t=i.getQueryType();if(!t)throw new PJ.GraphQLError("Schema does not define the required query root type.",e);return t}if(e.operation==="mutation"){var n=i.getMutationType();if(!n)throw new PJ.GraphQLError("Schema is not configured for mutations.",e);return n}if(e.operation==="subscription"){var r=i.getSubscriptionType();if(!r)throw new PJ.GraphQLError("Schema is not configured for subscriptions.",e);return r}throw new PJ.GraphQLError("Can only have query, mutation and subscription operations.",e)}});var eCe=Ue($xe=>{"use strict";Object.defineProperty($xe,"__esModule",{value:!0});$xe.default=gei;function gei(i){return i.map(function(e){return typeof e=="number"?"["+e.toString()+"]":"."+e}).join("")}});var j6=Ue(tCe=>{"use strict";Object.defineProperty(tCe,"__esModule",{value:!0});tCe.valueFromAST=U6;var bei=zJ(Vm()),vei=zJ(P_()),Aei=zJ(Oo()),yei=zJ(Qd()),vR=Ds(),xk=po();function zJ(i){return i&&i.__esModule?i:{default:i}}function U6(i,e,t){if(i){if(i.kind===vR.Kind.VARIABLE){var n=i.name.value;if(t==null||t[n]===void 0)return;var r=t[n];return r===null&&(0,xk.isNonNullType)(e)?void 0:r}if((0,xk.isNonNullType)(e))return i.kind===vR.Kind.NULL?void 0:U6(i,e.ofType,t);if(i.kind===vR.Kind.NULL)return null;if((0,xk.isListType)(e)){var o=e.ofType;if(i.kind===vR.Kind.LIST){for(var s=[],a=0,l=i.values;a{"use strict";Object.defineProperty(iCe,"__esModule",{value:!0});iCe.coerceInputValue=Iei;var wei=J_(Vm()),VJ=J_(Oo()),xei=J_(Qd()),Cei=J_(B_()),_ei=J_(LA()),Sei=J_(mJ()),Eei=J_(z_()),Dei=J_(eCe()),Ew=W6(),Ck=dn(),Q6=po();function J_(i){return i&&i.__esModule?i:{default:i}}function T$e(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Tei(i){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:Lei;return G6(i,e,t)}function Lei(i,e,t){var n="Invalid value "+(0,VJ.default)(e);throw i.length>0&&(n+=' at "value'.concat((0,Dei.default)(i),'"')),t.message=n+": "+t.message,t}function G6(i,e,t,n){if((0,Q6.isNonNullType)(e)){if(i!=null)return G6(i,e.ofType,t,n);t((0,Ew.pathToArray)(n),i,new Ck.GraphQLError('Expected non-nullable type "'.concat((0,VJ.default)(e),'" not to be null.')));return}if(i==null)return null;if((0,Q6.isListType)(e)){var r=e.ofType,o=(0,Sei.default)(i,function(w,C){var _=(0,Ew.addPath)(n,C,void 0);return G6(w,r,t,_)});return o??[G6(i,r,t,n)]}if((0,Q6.isInputObjectType)(e)){if(!(0,_ei.default)(i)){t((0,Ew.pathToArray)(n),i,new Ck.GraphQLError('Expected type "'.concat(e.name,'" to be an object.')));return}for(var s=Object.create(null),a=e.getFields(),l=0,c=(0,wei.default)(a);l{"use strict";Object.defineProperty(q6,"__esModule",{value:!0});q6.getVariableValues=Bei;q6.getArgumentValues=R$e;q6.getDirectiveValues=Vei;var Nei=HJ(rR()),Mei=HJ(P_()),AR=HJ(Oo()),Rei=HJ(eCe()),Dw=dn(),k$e=Ds(),L$e=Hm(),yR=po(),Fei=OA(),N$e=j6(),Oei=nCe();function HJ(i){return i&&i.__esModule?i:{default:i}}function I$e(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function M$e(i){for(var e=1;e=o)throw new Dw.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");r.push(a)});if(r.length===0)return{coerced:s}}catch(a){r.push(a)}return{errors:r}}function zei(i,e,t,n){for(var r=Object.create(null),o=function(c){var u=e[c],d=u.variable.name.value,h=(0,Fei.typeFromAST)(i,u.type);if(!(0,yR.isInputType)(h)){var f=(0,L$e.print)(u.type);return n(new Dw.GraphQLError('Variable "$'.concat(d,'" expected value of type "').concat(f,'" which cannot be used as an input type.'),u.type)),"continue"}if(!F$e(t,d)){if(u.defaultValue)r[d]=(0,N$e.valueFromAST)(u.defaultValue,h);else if((0,yR.isNonNullType)(h)){var p=(0,AR.default)(h);n(new Dw.GraphQLError('Variable "$'.concat(d,'" of required type "').concat(p,'" was not provided.'),u))}return"continue"}var g=t[d];if(g===null&&(0,yR.isNonNullType)(h)){var v=(0,AR.default)(h);return n(new Dw.GraphQLError('Variable "$'.concat(d,'" of non-null type "').concat(v,'" must not be null.'),u)),"continue"}r[d]=(0,Oei.coerceInputValue)(g,h,function(A,w,C){var _='Variable "$'.concat(d,'" got invalid value ')+(0,AR.default)(w);A.length>0&&(_+=' at "'.concat(d).concat((0,Rei.default)(A),'"')),n(new Dw.GraphQLError(_+"; "+C.message,u,void 0,void 0,void 0,C.originalError))})},s=0;s{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.execute=Yei;Um.executeSync=Kei;Um.assertValidExecutionArguments=j$e;Um.buildExecutionContext=Q$e;Um.collectFields=J6;Um.buildResolveInfo=Y$e;Um.getFieldDef=X$e;Um.defaultFieldResolver=Um.defaultTypeResolver=void 0;var xR=kw(Oo()),Hei=kw(_$e()),Wei=kw(Qd()),O$e=kw(gb()),yb=kw(MK()),aCe=kw(LA()),Uei=kw(mJ()),jei=kw(S$e()),P$e=kw(E$e()),_k=W6(),BA=dn(),WJ=y6(),K6=Ds(),Qei=P6(),wR=Ab(),B$e=Ip(),Tw=po(),Gei=OA(),qei=BJ(),UJ=Y6();function kw(i){return i&&i.__esModule?i:{default:i}}function Yei(i,e,t,n,r,o,s,a){return arguments.length===1?oCe(i):oCe({schema:i,document:e,rootValue:t,contextValue:n,variableValues:r,operationName:o,fieldResolver:s,typeResolver:a})}function Kei(i){var e=oCe(i);if((0,yb.default)(e))throw new Error("GraphQL execution failed to complete synchronously.");return e}function oCe(i){var e=i.schema,t=i.document,n=i.rootValue,r=i.contextValue,o=i.variableValues,s=i.operationName,a=i.fieldResolver,l=i.typeResolver;j$e(e,t,o);var c=Q$e(e,t,n,r,o,s,a,l);if(Array.isArray(c))return{errors:c};var u=Jei(c,c.operation,n);return U$e(c,u)}function U$e(i,e){return(0,yb.default)(e)?e.then(function(t){return U$e(i,t)}):i.errors.length===0?{data:e}:{errors:i.errors,data:e}}function j$e(i,e,t){e||(0,O$e.default)(0,"Must provide document."),(0,Qei.assertValidSchema)(i),t==null||(0,aCe.default)(t)||(0,O$e.default)(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Q$e(i,e,t,n,r,o,s,a){for(var l,c,u,d=Object.create(null),h=0,f=e.definitions;h{"use strict";Object.defineProperty(GJ,"__esModule",{value:!0});GJ.graphql=uti;GJ.graphqlSync=dti;var rti=cti(MK()),oti=iR(),sti=bR(),ati=P6(),lti=Z6();function cti(i){return i&&i.__esModule?i:{default:i}}function uti(i,e,t,n,r,o,s,a){var l=arguments;return new Promise(function(c){return c(l.length===1?QJ(i):QJ({schema:i,source:e,rootValue:t,contextValue:n,variableValues:r,operationName:o,fieldResolver:s,typeResolver:a}))})}function dti(i,e,t,n,r,o,s,a){var l=arguments.length===1?QJ(i):QJ({schema:i,source:e,rootValue:t,contextValue:n,variableValues:r,operationName:o,fieldResolver:s,typeResolver:a});if((0,rti.default)(l))throw new Error("GraphQL execution failed to complete synchronously.");return l}function QJ(i){var e=i.schema,t=i.source,n=i.rootValue,r=i.contextValue,o=i.variableValues,s=i.operationName,a=i.fieldResolver,l=i.typeResolver,c=(0,ati.validateSchema)(e);if(c.length>0)return{errors:c};var u;try{u=(0,oti.parse)(t)}catch(h){return{errors:[h]}}var d=(0,sti.validate)(e,u);return d.length>0?{errors:d}:(0,lti.execute)({schema:e,document:u,rootValue:n,contextValue:r,variableValues:o,operationName:s,fieldResolver:a,typeResolver:l})}});var eet=Ue(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Object.defineProperty(Kt,"isSchema",{enumerable:!0,get:function(){return lCe.isSchema}});Object.defineProperty(Kt,"assertSchema",{enumerable:!0,get:function(){return lCe.assertSchema}});Object.defineProperty(Kt,"GraphQLSchema",{enumerable:!0,get:function(){return lCe.GraphQLSchema}});Object.defineProperty(Kt,"isType",{enumerable:!0,get:function(){return Nn.isType}});Object.defineProperty(Kt,"isScalarType",{enumerable:!0,get:function(){return Nn.isScalarType}});Object.defineProperty(Kt,"isObjectType",{enumerable:!0,get:function(){return Nn.isObjectType}});Object.defineProperty(Kt,"isInterfaceType",{enumerable:!0,get:function(){return Nn.isInterfaceType}});Object.defineProperty(Kt,"isUnionType",{enumerable:!0,get:function(){return Nn.isUnionType}});Object.defineProperty(Kt,"isEnumType",{enumerable:!0,get:function(){return Nn.isEnumType}});Object.defineProperty(Kt,"isInputObjectType",{enumerable:!0,get:function(){return Nn.isInputObjectType}});Object.defineProperty(Kt,"isListType",{enumerable:!0,get:function(){return Nn.isListType}});Object.defineProperty(Kt,"isNonNullType",{enumerable:!0,get:function(){return Nn.isNonNullType}});Object.defineProperty(Kt,"isInputType",{enumerable:!0,get:function(){return Nn.isInputType}});Object.defineProperty(Kt,"isOutputType",{enumerable:!0,get:function(){return Nn.isOutputType}});Object.defineProperty(Kt,"isLeafType",{enumerable:!0,get:function(){return Nn.isLeafType}});Object.defineProperty(Kt,"isCompositeType",{enumerable:!0,get:function(){return Nn.isCompositeType}});Object.defineProperty(Kt,"isAbstractType",{enumerable:!0,get:function(){return Nn.isAbstractType}});Object.defineProperty(Kt,"isWrappingType",{enumerable:!0,get:function(){return Nn.isWrappingType}});Object.defineProperty(Kt,"isNullableType",{enumerable:!0,get:function(){return Nn.isNullableType}});Object.defineProperty(Kt,"isNamedType",{enumerable:!0,get:function(){return Nn.isNamedType}});Object.defineProperty(Kt,"isRequiredArgument",{enumerable:!0,get:function(){return Nn.isRequiredArgument}});Object.defineProperty(Kt,"isRequiredInputField",{enumerable:!0,get:function(){return Nn.isRequiredInputField}});Object.defineProperty(Kt,"assertType",{enumerable:!0,get:function(){return Nn.assertType}});Object.defineProperty(Kt,"assertScalarType",{enumerable:!0,get:function(){return Nn.assertScalarType}});Object.defineProperty(Kt,"assertObjectType",{enumerable:!0,get:function(){return Nn.assertObjectType}});Object.defineProperty(Kt,"assertInterfaceType",{enumerable:!0,get:function(){return Nn.assertInterfaceType}});Object.defineProperty(Kt,"assertUnionType",{enumerable:!0,get:function(){return Nn.assertUnionType}});Object.defineProperty(Kt,"assertEnumType",{enumerable:!0,get:function(){return Nn.assertEnumType}});Object.defineProperty(Kt,"assertInputObjectType",{enumerable:!0,get:function(){return Nn.assertInputObjectType}});Object.defineProperty(Kt,"assertListType",{enumerable:!0,get:function(){return Nn.assertListType}});Object.defineProperty(Kt,"assertNonNullType",{enumerable:!0,get:function(){return Nn.assertNonNullType}});Object.defineProperty(Kt,"assertInputType",{enumerable:!0,get:function(){return Nn.assertInputType}});Object.defineProperty(Kt,"assertOutputType",{enumerable:!0,get:function(){return Nn.assertOutputType}});Object.defineProperty(Kt,"assertLeafType",{enumerable:!0,get:function(){return Nn.assertLeafType}});Object.defineProperty(Kt,"assertCompositeType",{enumerable:!0,get:function(){return Nn.assertCompositeType}});Object.defineProperty(Kt,"assertAbstractType",{enumerable:!0,get:function(){return Nn.assertAbstractType}});Object.defineProperty(Kt,"assertWrappingType",{enumerable:!0,get:function(){return Nn.assertWrappingType}});Object.defineProperty(Kt,"assertNullableType",{enumerable:!0,get:function(){return Nn.assertNullableType}});Object.defineProperty(Kt,"assertNamedType",{enumerable:!0,get:function(){return Nn.assertNamedType}});Object.defineProperty(Kt,"getNullableType",{enumerable:!0,get:function(){return Nn.getNullableType}});Object.defineProperty(Kt,"getNamedType",{enumerable:!0,get:function(){return Nn.getNamedType}});Object.defineProperty(Kt,"GraphQLScalarType",{enumerable:!0,get:function(){return Nn.GraphQLScalarType}});Object.defineProperty(Kt,"GraphQLObjectType",{enumerable:!0,get:function(){return Nn.GraphQLObjectType}});Object.defineProperty(Kt,"GraphQLInterfaceType",{enumerable:!0,get:function(){return Nn.GraphQLInterfaceType}});Object.defineProperty(Kt,"GraphQLUnionType",{enumerable:!0,get:function(){return Nn.GraphQLUnionType}});Object.defineProperty(Kt,"GraphQLEnumType",{enumerable:!0,get:function(){return Nn.GraphQLEnumType}});Object.defineProperty(Kt,"GraphQLInputObjectType",{enumerable:!0,get:function(){return Nn.GraphQLInputObjectType}});Object.defineProperty(Kt,"GraphQLList",{enumerable:!0,get:function(){return Nn.GraphQLList}});Object.defineProperty(Kt,"GraphQLNonNull",{enumerable:!0,get:function(){return Nn.GraphQLNonNull}});Object.defineProperty(Kt,"isDirective",{enumerable:!0,get:function(){return zA.isDirective}});Object.defineProperty(Kt,"assertDirective",{enumerable:!0,get:function(){return zA.assertDirective}});Object.defineProperty(Kt,"GraphQLDirective",{enumerable:!0,get:function(){return zA.GraphQLDirective}});Object.defineProperty(Kt,"isSpecifiedDirective",{enumerable:!0,get:function(){return zA.isSpecifiedDirective}});Object.defineProperty(Kt,"specifiedDirectives",{enumerable:!0,get:function(){return zA.specifiedDirectives}});Object.defineProperty(Kt,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return zA.GraphQLIncludeDirective}});Object.defineProperty(Kt,"GraphQLSkipDirective",{enumerable:!0,get:function(){return zA.GraphQLSkipDirective}});Object.defineProperty(Kt,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return zA.GraphQLDeprecatedDirective}});Object.defineProperty(Kt,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return zA.GraphQLSpecifiedByDirective}});Object.defineProperty(Kt,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return zA.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(Kt,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Sk.isSpecifiedScalarType}});Object.defineProperty(Kt,"specifiedScalarTypes",{enumerable:!0,get:function(){return Sk.specifiedScalarTypes}});Object.defineProperty(Kt,"GraphQLInt",{enumerable:!0,get:function(){return Sk.GraphQLInt}});Object.defineProperty(Kt,"GraphQLFloat",{enumerable:!0,get:function(){return Sk.GraphQLFloat}});Object.defineProperty(Kt,"GraphQLString",{enumerable:!0,get:function(){return Sk.GraphQLString}});Object.defineProperty(Kt,"GraphQLBoolean",{enumerable:!0,get:function(){return Sk.GraphQLBoolean}});Object.defineProperty(Kt,"GraphQLID",{enumerable:!0,get:function(){return Sk.GraphQLID}});Object.defineProperty(Kt,"isIntrospectionType",{enumerable:!0,get:function(){return Np.isIntrospectionType}});Object.defineProperty(Kt,"introspectionTypes",{enumerable:!0,get:function(){return Np.introspectionTypes}});Object.defineProperty(Kt,"__Schema",{enumerable:!0,get:function(){return Np.__Schema}});Object.defineProperty(Kt,"__Directive",{enumerable:!0,get:function(){return Np.__Directive}});Object.defineProperty(Kt,"__DirectiveLocation",{enumerable:!0,get:function(){return Np.__DirectiveLocation}});Object.defineProperty(Kt,"__Type",{enumerable:!0,get:function(){return Np.__Type}});Object.defineProperty(Kt,"__Field",{enumerable:!0,get:function(){return Np.__Field}});Object.defineProperty(Kt,"__InputValue",{enumerable:!0,get:function(){return Np.__InputValue}});Object.defineProperty(Kt,"__EnumValue",{enumerable:!0,get:function(){return Np.__EnumValue}});Object.defineProperty(Kt,"__TypeKind",{enumerable:!0,get:function(){return Np.__TypeKind}});Object.defineProperty(Kt,"TypeKind",{enumerable:!0,get:function(){return Np.TypeKind}});Object.defineProperty(Kt,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Np.SchemaMetaFieldDef}});Object.defineProperty(Kt,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Np.TypeMetaFieldDef}});Object.defineProperty(Kt,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Np.TypeNameMetaFieldDef}});Object.defineProperty(Kt,"validateSchema",{enumerable:!0,get:function(){return $$e.validateSchema}});Object.defineProperty(Kt,"assertValidSchema",{enumerable:!0,get:function(){return $$e.assertValidSchema}});var lCe=bk(),Nn=po(),zA=Ip(),Sk=FA(),Np=Ab(),$$e=P6()});var net=Ue(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});Object.defineProperty(ws,"Source",{enumerable:!0,get:function(){return hti.Source}});Object.defineProperty(ws,"getLocation",{enumerable:!0,get:function(){return fti.getLocation}});Object.defineProperty(ws,"printLocation",{enumerable:!0,get:function(){return tet.printLocation}});Object.defineProperty(ws,"printSourceLocation",{enumerable:!0,get:function(){return tet.printSourceLocation}});Object.defineProperty(ws,"Kind",{enumerable:!0,get:function(){return pti.Kind}});Object.defineProperty(ws,"TokenKind",{enumerable:!0,get:function(){return mti.TokenKind}});Object.defineProperty(ws,"Lexer",{enumerable:!0,get:function(){return gti.Lexer}});Object.defineProperty(ws,"parse",{enumerable:!0,get:function(){return cCe.parse}});Object.defineProperty(ws,"parseValue",{enumerable:!0,get:function(){return cCe.parseValue}});Object.defineProperty(ws,"parseType",{enumerable:!0,get:function(){return cCe.parseType}});Object.defineProperty(ws,"print",{enumerable:!0,get:function(){return bti.print}});Object.defineProperty(ws,"visit",{enumerable:!0,get:function(){return qJ.visit}});Object.defineProperty(ws,"visitInParallel",{enumerable:!0,get:function(){return qJ.visitInParallel}});Object.defineProperty(ws,"getVisitFn",{enumerable:!0,get:function(){return qJ.getVisitFn}});Object.defineProperty(ws,"BREAK",{enumerable:!0,get:function(){return qJ.BREAK}});Object.defineProperty(ws,"Location",{enumerable:!0,get:function(){return iet.Location}});Object.defineProperty(ws,"Token",{enumerable:!0,get:function(){return iet.Token}});Object.defineProperty(ws,"isDefinitionNode",{enumerable:!0,get:function(){return Iw.isDefinitionNode}});Object.defineProperty(ws,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Iw.isExecutableDefinitionNode}});Object.defineProperty(ws,"isSelectionNode",{enumerable:!0,get:function(){return Iw.isSelectionNode}});Object.defineProperty(ws,"isValueNode",{enumerable:!0,get:function(){return Iw.isValueNode}});Object.defineProperty(ws,"isTypeNode",{enumerable:!0,get:function(){return Iw.isTypeNode}});Object.defineProperty(ws,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Iw.isTypeSystemDefinitionNode}});Object.defineProperty(ws,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Iw.isTypeDefinitionNode}});Object.defineProperty(ws,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Iw.isTypeSystemExtensionNode}});Object.defineProperty(ws,"isTypeExtensionNode",{enumerable:!0,get:function(){return Iw.isTypeExtensionNode}});Object.defineProperty(ws,"DirectiveLocation",{enumerable:!0,get:function(){return vti.DirectiveLocation}});var hti=YK(),fti=FK(),tet=p1e(),pti=Ds(),mti=$M(),gti=XK(),cCe=iR(),bti=Hm(),qJ=O_(),iet=ZM(),Iw=Ak(),vti=eR()});var ret=Ue(X_=>{"use strict";Object.defineProperty(X_,"__esModule",{value:!0});Object.defineProperty(X_,"responsePathAsArray",{enumerable:!0,get:function(){return Ati.pathToArray}});Object.defineProperty(X_,"execute",{enumerable:!0,get:function(){return YJ.execute}});Object.defineProperty(X_,"executeSync",{enumerable:!0,get:function(){return YJ.executeSync}});Object.defineProperty(X_,"defaultFieldResolver",{enumerable:!0,get:function(){return YJ.defaultFieldResolver}});Object.defineProperty(X_,"defaultTypeResolver",{enumerable:!0,get:function(){return YJ.defaultTypeResolver}});Object.defineProperty(X_,"getDirectiveValues",{enumerable:!0,get:function(){return yti.getDirectiveValues}});var Ati=W6(),YJ=Z6(),yti=Y6()});var oet=Ue(uCe=>{"use strict";Object.defineProperty(uCe,"__esModule",{value:!0});uCe.default=xti;var wti=NA();function xti(i){return typeof i?.[wti.SYMBOL_ASYNC_ITERATOR]=="function"}});var uet=Ue(dCe=>{"use strict";Object.defineProperty(dCe,"__esModule",{value:!0});dCe.default=_ti;var set=NA();function Cti(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function _ti(i,e,t){var n=i[set.SYMBOL_ASYNC_ITERATOR],r=n.call(i),o,s;typeof r.return=="function"&&(o=r.return,s=function(d){var h=function(){return Promise.reject(d)};return o.call(r).then(h,h)});function a(u){return u.done?u:aet(u.value,e).then(cet,s)}var l;if(t){var c=t;l=function(d){return aet(d,c).then(cet,s)}}return Cti({next:function(){return r.next().then(a,l)},return:function(){return o?o.call(r).then(a,l):Promise.resolve({value:void 0,done:!0})},throw:function(d){return typeof r.throw=="function"?r.throw(d).then(a,l):Promise.reject(d).catch(s)}},set.SYMBOL_ASYNC_ITERATOR,function(){return this})}function aet(i,e){return new Promise(function(t){return t(e(i))})}function cet(i){return{value:i,done:!1}}});var bet=Ue(KJ=>{"use strict";Object.defineProperty(KJ,"__esModule",{value:!0});KJ.subscribe=kti;KJ.createSourceEventStream=get;var Sti=fCe(Oo()),fet=fCe(oet()),hCe=W6(),pet=dn(),det=y6(),Eti=Y6(),CR=Z6(),Dti=BJ(),Tti=fCe(uet());function fCe(i){return i&&i.__esModule?i:{default:i}}function kti(i,e,t,n,r,o,s,a){return arguments.length===1?het(i):het({schema:i,document:e,rootValue:t,contextValue:n,variableValues:r,operationName:o,fieldResolver:s,subscribeFieldResolver:a})}function met(i){if(i instanceof pet.GraphQLError)return{errors:[i]};throw i}function het(i){var e=i.schema,t=i.document,n=i.rootValue,r=i.contextValue,o=i.variableValues,s=i.operationName,a=i.fieldResolver,l=i.subscribeFieldResolver,c=get(e,t,n,r,o,s,l),u=function(h){return(0,CR.execute)({schema:e,document:t,rootValue:h,contextValue:r,variableValues:o,operationName:s,fieldResolver:a})};return c.then(function(d){return(0,fet.default)(d)?(0,Tti.default)(d,u,met):d})}function get(i,e,t,n,r,o,s){return(0,CR.assertValidExecutionArguments)(i,e,r),new Promise(function(a){var l=(0,CR.buildExecutionContext)(i,e,t,n,r,o,s);a(Array.isArray(l)?{errors:l}:Iti(l))}).catch(met)}function Iti(i){var e=i.schema,t=i.operation,n=i.variableValues,r=i.rootValue,o=(0,Dti.getOperationRootType)(e,t),s=(0,CR.collectFields)(i,o,t.selectionSet,Object.create(null),Object.create(null)),a=Object.keys(s),l=a[0],c=s[l],u=c[0],d=u.name.value,h=(0,CR.getFieldDef)(e,o,d);if(!h)throw new pet.GraphQLError('The subscription field "'.concat(d,'" is not defined.'),c);var f=(0,hCe.addPath)(void 0,l,o.name),p=(0,CR.buildResolveInfo)(i,h,c,o,f);return new Promise(function(g){var v,A=(0,Eti.getArgumentValues)(h,c[0],n),w=i.contextValue,C=(v=h.subscribe)!==null&&v!==void 0?v:i.fieldResolver;g(C(r,A,w,p))}).then(function(g){if(g instanceof Error)throw(0,det.locatedError)(g,c,(0,hCe.pathToArray)(f));if(!(0,fet.default)(g))throw new Error("Subscription field must return Async Iterable. "+"Received: ".concat((0,Sti.default)(g),"."));return g},function(g){throw(0,det.locatedError)(g,c,(0,hCe.pathToArray)(f))})}});var Aet=Ue(JJ=>{"use strict";Object.defineProperty(JJ,"__esModule",{value:!0});Object.defineProperty(JJ,"subscribe",{enumerable:!0,get:function(){return vet.subscribe}});Object.defineProperty(JJ,"createSourceEventStream",{enumerable:!0,get:function(){return vet.createSourceEventStream}});var vet=bet()});var bCe=Ue(gCe=>{"use strict";Object.defineProperty(gCe,"__esModule",{value:!0});gCe.NoDeprecatedCustomRule=Nti;var pCe=Lti(Qd()),$6=dn(),mCe=po();function Lti(i){return i&&i.__esModule?i:{default:i}}function Nti(i){return{Field:function(t){var n=i.getFieldDef(),r=n?.deprecationReason;if(n&&r!=null){var o=i.getParentType();o!=null||(0,pCe.default)(0),i.reportError(new $6.GraphQLError("The field ".concat(o.name,".").concat(n.name," is deprecated. ").concat(r),t))}},Argument:function(t){var n=i.getArgument(),r=n?.deprecationReason;if(n&&r!=null){var o=i.getDirective();if(o!=null)i.reportError(new $6.GraphQLError('Directive "@'.concat(o.name,'" argument "').concat(n.name,'" is deprecated. ').concat(r),t));else{var s=i.getParentType(),a=i.getFieldDef();s!=null&&a!=null||(0,pCe.default)(0),i.reportError(new $6.GraphQLError('Field "'.concat(s.name,".").concat(a.name,'" argument "').concat(n.name,'" is deprecated. ').concat(r),t))}}},ObjectField:function(t){var n=(0,mCe.getNamedType)(i.getParentInputType());if((0,mCe.isInputObjectType)(n)){var r=n.getFields()[t.name.value],o=r?.deprecationReason;o!=null&&i.reportError(new $6.GraphQLError("The input field ".concat(n.name,".").concat(r.name," is deprecated. ").concat(o),t))}},EnumValue:function(t){var n=i.getEnumValue(),r=n?.deprecationReason;if(n&&r!=null){var o=(0,mCe.getNamedType)(i.getInputType());o!=null||(0,pCe.default)(0),i.reportError(new $6.GraphQLError('The enum value "'.concat(o.name,".").concat(n.name,'" is deprecated. ').concat(r),t))}}}}});var yet=Ue(vCe=>{"use strict";Object.defineProperty(vCe,"__esModule",{value:!0});vCe.NoSchemaIntrospectionCustomRule=Oti;var Mti=dn(),Rti=po(),Fti=Ab();function Oti(i){return{Field:function(t){var n=(0,Rti.getNamedType)(i.getType());n&&(0,Fti.isIntrospectionType)(n)&&i.reportError(new Mti.GraphQLError('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(t.name.value,'".'),t))}}}});var xet=Ue(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});Object.defineProperty(ir,"validate",{enumerable:!0,get:function(){return Pti.validate}});Object.defineProperty(ir,"ValidationContext",{enumerable:!0,get:function(){return Bti.ValidationContext}});Object.defineProperty(ir,"specifiedRules",{enumerable:!0,get:function(){return wet.specifiedRules}});Object.defineProperty(ir,"recommendedRules",{enumerable:!0,get:function(){return wet.recommendedRules}});Object.defineProperty(ir,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return zti.ExecutableDefinitionsRule}});Object.defineProperty(ir,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Vti.FieldsOnCorrectTypeRule}});Object.defineProperty(ir,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Hti.FragmentsOnCompositeTypesRule}});Object.defineProperty(ir,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return Wti.KnownArgumentNamesRule}});Object.defineProperty(ir,"KnownDirectivesRule",{enumerable:!0,get:function(){return Uti.KnownDirectivesRule}});Object.defineProperty(ir,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return jti.KnownFragmentNamesRule}});Object.defineProperty(ir,"KnownTypeNamesRule",{enumerable:!0,get:function(){return Qti.KnownTypeNamesRule}});Object.defineProperty(ir,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return Gti.LoneAnonymousOperationRule}});Object.defineProperty(ir,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return qti.NoFragmentCyclesRule}});Object.defineProperty(ir,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return Yti.NoUndefinedVariablesRule}});Object.defineProperty(ir,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return Kti.NoUnusedFragmentsRule}});Object.defineProperty(ir,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return Jti.NoUnusedVariablesRule}});Object.defineProperty(ir,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return Xti.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(ir,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return Zti.PossibleFragmentSpreadsRule}});Object.defineProperty(ir,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return $ti.ProvidedRequiredArgumentsRule}});Object.defineProperty(ir,"ScalarLeafsRule",{enumerable:!0,get:function(){return eii.ScalarLeafsRule}});Object.defineProperty(ir,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return tii.SingleFieldSubscriptionsRule}});Object.defineProperty(ir,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return iii.UniqueArgumentNamesRule}});Object.defineProperty(ir,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return nii.UniqueDirectivesPerLocationRule}});Object.defineProperty(ir,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return rii.UniqueFragmentNamesRule}});Object.defineProperty(ir,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return oii.UniqueInputFieldNamesRule}});Object.defineProperty(ir,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return sii.UniqueOperationNamesRule}});Object.defineProperty(ir,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return aii.UniqueVariableNamesRule}});Object.defineProperty(ir,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return lii.ValuesOfCorrectTypeRule}});Object.defineProperty(ir,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return cii.VariablesAreInputTypesRule}});Object.defineProperty(ir,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return uii.VariablesInAllowedPositionRule}});Object.defineProperty(ir,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return dii.MaxIntrospectionDepthRule}});Object.defineProperty(ir,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return hii.LoneSchemaDefinitionRule}});Object.defineProperty(ir,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return fii.UniqueOperationTypesRule}});Object.defineProperty(ir,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return pii.UniqueTypeNamesRule}});Object.defineProperty(ir,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return mii.UniqueEnumValueNamesRule}});Object.defineProperty(ir,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return gii.UniqueFieldDefinitionNamesRule}});Object.defineProperty(ir,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return bii.UniqueDirectiveNamesRule}});Object.defineProperty(ir,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return vii.PossibleTypeExtensionsRule}});Object.defineProperty(ir,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Aii.NoDeprecatedCustomRule}});Object.defineProperty(ir,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return yii.NoSchemaIntrospectionCustomRule}});var Pti=bR(),Bti=qxe(),wet=Qxe(),zti=_we(),Vti=Hwe(),Hti=Fwe(),Wti=uxe(),Uti=sxe(),jti=Qwe(),Qti=Mwe(),Gti=Twe(),qti=Zwe(),Yti=ixe(),Kti=qwe(),Jti=rxe(),Xti=Sxe(),Zti=Jwe(),$ti=gxe(),eii=zwe(),tii=Iwe(),iii=hxe(),nii=cxe(),rii=Uwe(),oii=Dxe(),sii=Ewe(),aii=exe(),lii=pxe(),cii=Pwe(),uii=vxe(),dii=kxe(),hii=Lxe(),fii=Mxe(),pii=Fxe(),mii=Pxe(),gii=Vxe(),bii=Wxe(),vii=jxe(),Aii=bCe(),yii=yet()});var Cet=Ue(ACe=>{"use strict";Object.defineProperty(ACe,"__esModule",{value:!0});Object.defineProperty(ACe,"formatError",{enumerable:!0,get:function(){return wii.formatError}});var wii=dn()});var Eet=Ue(Ek=>{"use strict";Object.defineProperty(Ek,"__esModule",{value:!0});Object.defineProperty(Ek,"GraphQLError",{enumerable:!0,get:function(){return _et.GraphQLError}});Object.defineProperty(Ek,"printError",{enumerable:!0,get:function(){return _et.printError}});Object.defineProperty(Ek,"syntaxError",{enumerable:!0,get:function(){return xii.syntaxError}});Object.defineProperty(Ek,"locatedError",{enumerable:!0,get:function(){return Cii.locatedError}});Object.defineProperty(Ek,"formatError",{enumerable:!0,get:function(){return _ii.formatError}});var _et=dn(),xii=VK(),Cii=y6(),_ii=Cet()});var wCe=Ue(yCe=>{"use strict";Object.defineProperty(yCe,"__esModule",{value:!0});yCe.getIntrospectionQuery=Dii;function Det(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Sii(i){for(var e=1;e{pX();Ki();eh();Bk();I9();PX();M9();yCe();wCe();Dqt=Xv(r9,i=>i.filter(e=>e!=="description")),xCe=new Se("Too many validation errors, error limit reached. Validation aborted.")});function cF(i){return typeof i?.[Symbol.asyncIterator]=="function"}var CCe=D(()=>{});function bA(i,e,t){let n=hX(i);return Tqt(n)?n:new Se(n.message,{nodes:n.nodes??e,source:n.source,positions:n.positions,path:t,originalError:n})}function Tqt(i){return Array.isArray(i.path)}var D7=D(()=>{Dwe();Ki()});var _Ce=D(()=>{Gk();So();Xc();cA();ty();I9();yX()});function T7(i,e){let t=null;for(let n of i.definitions)if(n.kind===W.OPERATION_DEFINITION){if(e==null){if(t)return null;t=n}else if(n.name?.value===e)return n}return t}var SCe=D(()=>{so()});function JX(i,e,t,n,o,r,s){let{schema:a,fragmentDefinitions:l,rootValue:c,operation:u,variableValues:d}=i;return{fieldName:e.name,fieldNodes:t,returnType:e.type,parentType:n,path:o,schema:a,fragments:l,rootValue:c,operation:u,variableValues:d,getAbortSignal:r,getAsyncHelpers:s}}var ECe=D(()=>{});function nI(){let i,e;return{promise:new Promise((n,o)=>{i=n,e=o}),resolve:i,reject:e}}var DCe=D(()=>{});function TCe(i){let{promise:e,resolve:t,reject:n}=nI(),o=!1,r=a=>{o||(o=!0,t(a))},s=a=>{o||(o=!0,n(a))};return i.then(r,s),{promise:e,abort(a){s(a)}}}function kCe(i,e){let t=TCe(i);if(e.aborted)return t.abort(e.reason),t.promise;let n=()=>{e.removeEventListener("abort",n),t.abort(e.reason)};return e.addEventListener("abort",n),t.promise.then(()=>{e.removeEventListener("abort",n)},()=>{e.removeEventListener("abort",n)}),t.promise}var ICe=D(()=>{DCe()});var XX,TZe=D(()=>{Wp();XX=class{constructor(){this.pendingAsyncWork=new Set}add(e){let t=this.pendingAsyncWork,n=e.then(()=>{t.delete(n)},()=>{t.delete(n)});t.add(n)}addValues(e){for(let t of e)Hh(t)&&this.add(t)}wait(){if(this.pendingAsyncWork.size!==0)return this.waitForPendingAsyncWork()}promiseAllTrackOnReject(e){let t=Promise.all(e);return t.then(void 0,()=>{this.addValues(e)}),t}async waitForPendingAsyncWork(){for(;this.pendingAsyncWork.size>0;)await Promise.allSettled(Array.from(this.pendingAsyncWork))}}});function ZX(i){let e=new XX,t,n=r=>e.promiseAllTrackOnReject(r);return{asyncWorkTracker:e,getAbortSignal:()=>i,getAsyncHelpers:()=>t??={promiseAll:n,track:r=>e.addValues(r)},promiseAll:n}}var LCe=D(()=>{TZe()});function uF(i){let e;return function(n,o){e??=new WeakMap;let r=e.get(n);r===void 0&&(r=new WeakMap,e.set(n,r));let s=r.get(o);return s===void 0&&(s=i(n,o),r.set(o,s)),s}}var $X=D(()=>{});function kZe(i){let e;return function(n,o,r){e??=new WeakMap;let s=e.get(n);s===void 0&&(s=new WeakMap,e.set(n,s));let a=s.get(o);a===void 0&&(a=new WeakMap,s.set(o,a));let l=a.get(r);return l===void 0&&(l=i(n,o,r),a.set(r,l)),l}}var IZe=D(()=>{});function LZe(i,e){let t=Object.keys(i),n=Object.values(i);return e(n).then(o=>{let r=Object.create(null);for(let s=0;s{});function MZe(i,e,t){let n=t;for(let o of i)n=En(n)?n.then(r=>e(r,o)):e(n,o);return n}var RZe=D(()=>{Wp()});function kqt(i){return i instanceof Error||typeof i=="object"&&i!==null&&"message"in i&&typeof i.message=="string"?i.message:String(i)}var oI,NCe=D(()=>{oI=class extends Error{constructor(e,t){super(kqt(e),{cause:e}),this.name="AbortedGraphQLExecutionError",this.abortedResult=t}get[Symbol.toStringTag](){return"AbortedGraphQLExecutionError"}}});function eZ(i){let e=[];try{for(;;){let t=i.next();if(t.done)return e;Hh(t.value)&&e.push(t.value)}}catch{return e}}var MCe=D(()=>{Wp()});function FZe(i,e){let{operation:t,variableValues:n}=i,o=gA(rg,e[0].node,n,e[0].fragmentVariableValues);if(!o||o.if===!1)return;typeof o.initialCount!="number"&&Di(!1,"initialCount must be a number"),o.initialCount>=0||Di(!1,"initialCount must be a positive integer"),t.operation===Ar.SUBSCRIPTION&&Di(!1,"`@stream` directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.");let r=e.map(s=>({node:s.node,deferUsage:void 0,fragmentVariableValues:s.fragmentVariableValues}));return{initialCount:o.initialCount,label:typeof o.label=="string"?o.label:void 0,fieldDetailsList:r}}var OZe=D(()=>{Za();eh();Xc();tI()});function PZe(i,e){try{i?.(e)}catch{}}function BZe(i,e,t){let n=e.asyncWorkTracker.wait();if(n===void 0){PZe(t,{validatedExecutionArgs:i});return}n.then(()=>{PZe(t,{validatedExecutionArgs:i})}).catch(()=>{})}var zZe=D(()=>{});async function k7(i){try{await i.return?.()}catch{}}var RCe=D(()=>{});function yS(i){return i.map(e=>e.node)}var Iqt,tZ,FCe,Lqt,dF,OCe=D(()=>{Is();Za();CCe();Lk();Wp();$X();IZe();cS();NZe();RZe();sS();Ki();D7();eh();So();M9();NCe();ECe();ICe();QX();MCe();LCe();OZe();zZe();RCe();tI();Iqt=kZe((i,e,t)=>{let{schema:n,fragments:o,variableValues:r,hideSuggestions:s}=i;return xZe(n,o,r,e,t,s)}),tZ=uF((i,e)=>FZe(i,e)),FCe=class{constructor(){this._errorPositions=new Set,this._errors=[]}get errors(){return this._errors}add(e,t){this.hasNulledPosition(t)||(this._errorPositions.add(t),this._errors.push(e))}hasNulledPosition(e){let t=e;for(;t!==void 0;){if(this._errorPositions.has(t))return!0;t=t.prev}return this._errorPositions.has(void 0)}},Lqt=new Error("This operation was aborted"),dF=class{constructor(e,t){this.validatedExecutionArgs=e,this.aborted=!1,this.abortReason=Lqt,this.collectedErrors=new FCe,t===void 0?(this.resolverAbortController=new AbortController,this.sharedExecutionContext=ZX(this.resolverAbortController.signal)):this.sharedExecutionContext=t;let{getAbortSignal:n,getAsyncHelpers:o,promiseAll:r}=this.sharedExecutionContext;this.getAbortSignal=n,this.getAsyncHelpers=o,this.promiseAll=r}executeRootSelectionSet(e){return Kp(cxe)?AS(cxe,this.buildExecuteContextFromValidatedArgs(this.validatedExecutionArgs),()=>this.executeRootSelectionSetImpl(e)):this.executeRootSelectionSetImpl(e)}buildExecuteContextFromValidatedArgs(e){return{schema:e.schema,document:e.document,operation:e.operation,rawVariableValues:e.rawVariableValues,operationName:e.operation.name?.value,operationType:e.operation.operation}}executeRootSelectionSetImpl(e){let t=this.validatedExecutionArgs.externalAbortSignal,n;if(t){t.throwIfAborted();let s=()=>{this.abort(t.reason)};n=()=>t.removeEventListener("abort",s),t.addEventListener("abort",s)}let o=()=>{n?.()},r;try{let{schema:s,fragments:a,rootValue:l,operation:c,variableValues:u,hideSuggestions:d}=this.validatedExecutionArgs,{operation:h,selectionSet:f}=c,p=s.getRootType(h);if(p==null)throw new Se(`Schema is not configured to execute ${h} operation.`,{nodes:c});let{groupedFieldSet:g,newDeferUsages:A}=oF(s,a,u,p,f,d);if(r=this.executeCollectedRootFields(p,l,g,e??h===Ar.MUTATION,A),En(r)){let v=r.then(_=>(o(),this.buildResponse(_)),_=>(o(),this.collectedErrors.add(Ac(_),void 0),this.buildResponse(null)));this.sharedExecutionContext.asyncWorkTracker.add(v);let{promise:w,abort:C}=TCe(v.then(_=>this.finish(_)));return this.abortResultPromise=()=>{C(this.createAbortedExecutionError(v))},this.aborted&&this.abortResultPromise(),w}o()}catch(s){return o(),this.collectedErrors.add(Ac(s),void 0),this.finish(this.buildResponse(null))}return this.finish(this.buildResponse(r))}abort(e){this.aborted||(this.aborted=!0,e!==void 0&&(this.abortReason=e),this.abortResultPromise?.(),this.resolverAbortController?.abort(this.abortReason))}finish(e){if(this.aborted)throw this.createAbortedExecutionError(e);return this.aborted=!0,e}createAbortedExecutionError(e){return new oI(this.abortReason,e)}getFinishSharedExecution(){let e=this.resolverAbortController,t=this.validatedExecutionArgs.hooks?.asyncWorkFinished;if(t===void 0)return()=>e?.abort();let n=this.validatedExecutionArgs,o=this.sharedExecutionContext;return()=>{e?.abort(),BZe(n,o,t)}}buildResponse(e){this.getFinishSharedExecution()();let t=this.collectedErrors.errors;return t.length?{errors:t,data:e}:{data:e}}executeCollectedRootFields(e,t,n,o,r){return this.executeRootGroupedFieldSet(e,t,n,o,void 0)}executeRootGroupedFieldSet(e,t,n,o,r){return o?this.executeFieldsSerially(e,t,void 0,n,r):this.executeFields(e,t,void 0,n,r)}executeFieldsSerially(e,t,n,o,r){let s=Kp(Jk)?Jk:void 0;return MZe(o,(a,[l,c])=>{if(this.aborted)throw new Error("Aborted!");let u=fd(n,l,e.name),d=this.executeField(e,t,c,u,r,s);return d===void 0?a:En(d)?d.then(h=>(a[l]=h,s=Kp(Jk)?Jk:void 0,a)):(a[l]=d,a)},Object.create(null))}executeFields(e,t,n,o,r){let s=Object.create(null),a=!1,l=Kp(Jk)?Jk:void 0;try{for(let[c,u]of o){let d=fd(n,c,e.name),h=this.executeField(e,t,u,d,r,l);h!==void 0&&(s[c]=h,En(h)&&(a=!0))}}catch(c){throw a&&this.sharedExecutionContext.asyncWorkTracker.addValues(Object.values(s)),c}return a?LZe(s,this.promiseAll):s}executeField(e,t,n,o,r,s){let a=this.validatedExecutionArgs,{schema:l,contextValue:c,variableValues:u,hideSuggestions:d}=a,h=n[0],f=h.node,p=f.name.value,g=l.getField(e,p);if(!g)return;let A=g.type,v=g.resolve??a.fieldResolver;if(s!==void 0){let C=v;v=(_,E,I,T)=>AS(s,this.buildResolveContext(E,T,g.resolve===void 0),()=>C(_,E,I,T))}let w=JX(a,g,yS(n),e,o,this.getAbortSignal,this.getAsyncHelpers);try{let C=mA(g,f,u,h.fragmentVariableValues,d),_=v(t,C,c,w);if(Hh(_))return this.completePromisedValue(A,n,w,o,_,r);let E=this.completeValue(A,n,w,o,_,r);return En(E)?E.then(void 0,I=>(this.handleFieldError(I,A,n,o),null)):E}catch(C){return this.handleFieldError(C,A,n,o),null}}buildResolveContext(e,t,n){let o;return{fieldName:t.fieldName,alias:String(t.path.key),parentType:t.parentType.name,fieldType:String(t.returnType),args:e,isDefaultResolver:n,get fieldPath(){return o??=Ls(t.path).join("."),o}}}handleFieldError(e,t,n,o){let r=bA(e,yS(n),Ls(o));if(this.validatedExecutionArgs.errorPropagation&&Si(t))throw r;this.collectedErrors.add(r,o)}completeValue(e,t,n,o,r,s){if(r instanceof Error)throw r;if(Si(e)){let a=this.completeValue(e.ofType,t,n,o,r,s);if(a===null)throw new Error(`Cannot return null for non-nullable field ${n.parentType}.${n.fieldName}.`);return a}if(r==null)return null;if(Cn(e))return this.completeListValue(e,t,n,o,r,s);if(hd(e))return this.completeLeafValue(e,r);if(zu(e))return this.completeAbstractValue(e,t,n,o,r,s);if(en(e))return this.completeObjectValue(e,t,n,o,r,s);Di(!1,"Cannot complete value of unexpected output type: "+Xe(e))}async completePromisedValue(e,t,n,o,r,s){try{let a=await r;if(this.aborted)throw new Error("Aborted!");let l=this.completeValue(e,t,n,o,a,s);return En(l)&&(l=await l),l}catch(a){return this.handleFieldError(a,e,t,o),null}}async completeAsyncIterableValue(e,t,n,o,r,s){let a=typeof o.key=="number"?void 0:tZ(this.validatedExecutionArgs,t),l=!1,c=[],u=r[Symbol.asyncIterator](),d=0,h;try{for(;!(a?.initialCount===d&&this.handleStream(d,o,{handle:u,isAsync:!0},a,n,e));){let f=fd(o,d,void 0);try{h=await u.next()}catch(g){throw bA(g,yS(t),Ls(o))}if(this.aborted||h.done)break;let p=h.value;this.completeMaybePromisedListItemValue(p,c,e,t,n,f,s)&&(l=!0),d++}}catch(f){throw this.sharedExecutionContext.asyncWorkTracker.add(k7(u)),l&&this.sharedExecutionContext.asyncWorkTracker.addValues(c),f}if(this.aborted)throw h?.done||this.sharedExecutionContext.asyncWorkTracker.add(k7(u)),new Error("Aborted!");return l?this.promiseAll(c):c}handleStream(e,t,n,o,r,s){return!1}completeListValue(e,t,n,o,r,s){let a=e.ofType;if(cF(r))return this.completeAsyncIterableValue(a,t,n,o,r,s);if(!Up(r))throw new Se(`Expected Iterable, but did not find one for field "${n.parentType}.${n.fieldName}".`);return this.completeIterableValue(a,t,n,o,r,s)}completeIterableValue(e,t,n,o,r,s){let a=typeof o.key=="number"?void 0:tZ(this.validatedExecutionArgs,t),l=!1,c=[],u=0,d=r[Symbol.iterator]();try{for(;!(a?.initialCount===u&&this.handleStream(u,o,{handle:d},a,n,e));){let h=d.next();if(h.done)break;let f=h.value,p=fd(o,u,void 0);this.completeMaybePromisedListItemValue(f,c,e,t,n,p,s)&&(l=!0),u++}}catch(h){let f=this.sharedExecutionContext.asyncWorkTracker;throw l&&f.addValues(c),f.addValues(eZ(d)),h}return l?this.promiseAll(c):c}completeMaybePromisedListItemValue(e,t,n,o,r,s,a){return Hh(e)?(t.push(this.completePromisedListItemValue(e,n,o,r,s,a)),!0):!!this.completeListItemValue(e,t,n,o,r,s,a)}completeListItemValue(e,t,n,o,r,s,a){try{let l=this.completeValue(n,o,r,s,e,a);if(En(l))return t.push(l.then(void 0,c=>(this.handleFieldError(c,n,o,s),null))),!0;t.push(l)}catch(l){this.handleFieldError(l,n,o,s),t.push(null)}return!1}async completePromisedListItemValue(e,t,n,o,r,s){try{let a=await e;if(this.aborted)throw new Error("Aborted!");let l=this.completeValue(t,n,o,r,a,s);return En(l)&&(l=await l),l}catch(a){return this.handleFieldError(a,t,n,r),null}}completeLeafValue(e,t){let n=e.coerceOutputValue(t);if(n==null)throw new Error(`Expected \`${Xe(e)}.coerceOutputValue(${Xe(t)})\` to return non-nullable value, returned: ${Xe(n)}`);return n}completeAbstractValue(e,t,n,o,r,s){let a=this.validatedExecutionArgs,{schema:l,contextValue:c}=a,d=(e.resolveType??a.typeResolver)(r,c,n,e);return Hh(d)?d.then(h=>{if(this.aborted)throw new Error("Aborted!");return this.completeObjectValue(this.ensureValidRuntimeType(h,l,e,t,n,r),t,n,o,r,s)}):this.completeObjectValue(this.ensureValidRuntimeType(d,l,e,t,n,r),t,n,o,r,s)}ensureValidRuntimeType(e,t,n,o,r,s){if(e==null)throw new Se(`Abstract type "${n}" must resolve to an Object type at runtime for field "${r.parentType}.${r.fieldName}". Either the "${n}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,{nodes:yS(o)});if(typeof e!="string")throw new Se(`Abstract type "${n}" must resolve to an Object type at runtime for field "${r.parentType}.${r.fieldName}" with value ${Xe(s)}, received "${Xe(e)}", which is not a valid Object type name.`);let a=t.getType(e);if(a==null)throw new Se(`Abstract type "${n}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:yS(o)});if(!en(a))throw new Se(`Abstract type "${n}" was resolved to a non-object type "${e}".`,{nodes:yS(o)});if(!t.isSubType(n,a))throw new Se(`Runtime Object type "${a}" is not a possible type for "${n}".`,{nodes:yS(o)});return a}completeObjectValue(e,t,n,o,r,s){if(e.isTypeOf){let a=e.isTypeOf(r,this.validatedExecutionArgs.contextValue,n);if(Hh(a))return a.then(l=>{if(this.aborted)throw new Error("Aborted!");if(!l)throw this.invalidReturnTypeError(e,r,t);return this.collectAndExecuteSubfields(e,t,o,r,s)});if(!a)throw this.invalidReturnTypeError(e,r,t)}return this.collectAndExecuteSubfields(e,t,o,r,s)}invalidReturnTypeError(e,t,n){return new Se(`Expected value of type "${e}" but got: ${Xe(t)}.`,{nodes:yS(n)})}collectAndExecuteSubfields(e,t,n,o,r){let{groupedFieldSet:s,newDeferUsages:a}=Iqt(this.validatedExecutionArgs,e,t);return this.executeCollectedSubfields(e,o,n,s,a,r)}executeCollectedSubfields(e,t,n,o,r,s){return this.executeFields(e,t,n,o,void 0)}}});var PCe,I7,VZe=D(()=>{Za();eh();OCe();PCe="Executing this GraphQL operation would unexpectedly produce multiple payloads (due to @defer or @stream directive)",I7=class extends dF{executeCollectedRootFields(e,t,n,o,r){if(r.length>0){this.validatedExecutionArgs.operation.operation===Ar.SUBSCRIPTION&&Di(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.");let s=new Error(PCe);throw this.abort(s),s}return this.executeRootGroupedFieldSet(e,t,n,o,void 0)}executeCollectedSubfields(e,t,n,o,r){if(r.length>0){this.validatedExecutionArgs.operation.operation===Ar.SUBSCRIPTION&&Di(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.");let s=new Error(PCe);throw this.abort(s),s}return this.executeFields(e,t,n,o,void 0)}completeListValue(e,t,n,o,r,s){if(tZ(this.validatedExecutionArgs,t)!==void 0){this.validatedExecutionArgs.operation.operation===Ar.SUBSCRIPTION&&Di(!1,"`@stream` directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.");let l=new Error(PCe);throw this.abort(l),l}return super.completeListValue(e,t,n,o,r,s)}}});function iZ(i){let e;return function(n){e??=new WeakMap;let o=e.get(n);return o===void 0&&(o=i(n),e.set(n,o)),o}}var BCe=D(()=>{});function hF(i,e){if(i.size!==e.size)return!1;for(let t of i)if(!e.has(t))return!1;return!0}var nZ=D(()=>{});function oZ(i,e){for(let t of i.keys())if(hF(t,e))return i.get(t)}var zCe=D(()=>{nZ()});function VCe(i,e=new Set){let t=new Map,n=new Map;for(let[o,r]of i){let s=Nqt(r);if(hF(s,e)){t.set(o,r);continue}let a=oZ(n,s);a===void 0&&(a=new Map,n.set(s,a)),a.set(o,r)}return{groupedFieldSet:t,newGroupedFieldSets:n}}function Nqt(i){let e=new Set;for(let t of i){let n=t.deferUsage;if(n===void 0)return e.clear(),e;e.add(n)}for(let t of e){let n=t.parentDeferUsage;for(;n!==void 0;){if(e.has(n)){e.delete(t);break}n=n.parentDeferUsage}}return e}var HZe=D(()=>{zCe();nZ()});var rZ,WZe=D(()=>{Wp();rZ=class{constructor(e,t){this._fn=e,this._onAbort=t}prime(){if(this._maybePromise)return this._maybePromise;try{let e=this._fn();En(e)?(this._maybePromise={status:"pending",promise:e},e.then(t=>{this._maybePromise={status:"fulfilled",value:t}},t=>{this._maybePromise={status:"rejected",reason:t}})):this._maybePromise={status:"fulfilled",value:e}}catch(e){this._maybePromise={status:"rejected",reason:e}}return this._maybePromise}result(){let e=this.prime();switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;case"pending":return e.promise}}abort(e){let t=this._maybePromise;if(!t){this._maybePromise={status:"rejected",reason:e};return}if(t.status==="pending"&&(this._maybePromise={status:"rejected",reason:e},this._onAbort))return this._onAbort(e)}}});function wS(i,e,t=e){let n=!1,o=!1,r=s=>{if(!(n||o))return o=!0,Mqt(s)};return{[Symbol.asyncIterator](){return this},next(){let s=i.next();return s.then(a=>{a.done&&(n=!0)}).catch(()=>{}),s},async return(){return await r(e),i.return()},async throw(s){return await r(()=>t(s)),i.throw(s)},async[HCe](){await r(e),typeof i[HCe]=="function"&&await i[HCe]()}}}function Mqt(i){try{let e=i();if(En(e))return e.catch(()=>{})}catch{}}var HCe,L7=D(()=>{Wp();HCe=Symbol.asyncDispose??Symbol.for("Symbol.asyncDispose")});function rI(i,e){let t=i[Symbol.asyncIterator](),n=t.return?.bind(t),o=t.throw?.bind(t),r=n?()=>UZe(n):()=>Promise.resolve(),s=o?a=>UZe(()=>o(a)):r;return wS(Rqt(i,e),r,s)}async function UZe(i){try{await i()}catch{}}async function*Rqt(i,e){for await(let t of i){let n=e(t);if(En(n)){yield await n;continue}yield n}}var sZ=D(()=>{Wp();L7()});var fF,WCe=D(()=>{Za();Wp();DCe();L7();fF=class{constructor(e,t=1){this._backlog=0,this._waiters=[],this._entries=[],this._isStopped=!1,this._stopRequested=!1,this._stopCleanupCallbacks=[],this._batchRequests=new Set,this._capacity=this._normalizeCapacity(t);let{promise:n,resolve:o}=nI();this._resolveStarted=o;try{let r=e({push:this._push.bind(this),stop:this._stop.bind(this),onStop:this._onStop.bind(this),started:n});En(r)&&r.catch(this._stop.bind(this))}catch(r){let s=this._stop(r);En(s)&&s.catch(()=>{})}}subscribe(e=t=>Array.from(t)){let t=this._iteratorLoop(e);return wS(t,()=>this.cancel(),this.abort.bind(this))}cancel(){return this._stopRequested?this._stopCompletion:this._terminate(void 0,()=>{this._isStopped=!0,this._batchRequests.forEach(e=>e.resolve(void 0)),this._batchRequests.clear()})}abort(e){return this._stopRequested?this._stopCompletion:this._terminate(e,()=>{if(this._isStopped=!0,this._batchRequests.size){this._batchRequests.forEach(t=>t.reject(e)),this._batchRequests.clear();return}this._entries.push({kind:"item",settled:{status:"rejected",reason:e}})})}async forEachBatch(e){let t=this.subscribe(async n=>{let{promise:o,resolve:r}=nI(),s=(function*(){yield*n,r()})();await Promise.all([e(s),o])});for await(let n of t);}setCapacity(e){this._capacity=this._normalizeCapacity(e),this._flush()}getCapacity(){return this._capacity}isStopped(){return this._isStopped}_normalizeCapacity(e){return Math.max(1,Math.floor(e))}_flush(){for(;this._waiters.length>0&&this._backlog0&&(this._backlog-=1),this._flush()}_onStop(e){if(this._stopRequested)throw new Error("Cannot register onStop cleanup after stop has been requested.");this._stopCleanupCallbacks.push(e)}_runStopCleanup(e,t){this._stopRequested=!0;let n=this._stopCleanupCallbacks.flatMap(r=>{try{let s=r(e);return En(s)?[s]:[]}catch{return[]}}),o=n.length>0?Promise.allSettled(n).then(()=>{}):void 0;if(En(o))return this._stopCompletion=o.then(t,t).then(()=>{}),this._stopCompletion;t()}async*_iteratorLoop(e){this._resolveStarted();let t;for(;t=await this._waitForNextBatch();){let n=e(t);En(n)&&(n=await n),n!==void 0&&(yield n)}}_waitForNextBatch(){let{promise:e,resolve:t,reject:n}=nI();return this._batchRequests.add({resolve:t,reject:n}),this._deliverBatchIfReady(),e}_push(e){if(this._stopRequested)return;let t=this._reserve();if(En(e)){let n={kind:"item"};this._entries.push(n),e.then(o=>{n.settled={status:"fulfilled",value:o},this._deliverBatchIfReady()},o=>{n.settled={status:"rejected",reason:o},this._deliverBatchIfReady()})}else this._entries.push({kind:"item",settled:{status:"fulfilled",value:e}}),this._deliverBatchIfReady();return t}_terminate(e,t){for(let n of this._entries)n.kind==="item"&&this._release();return this._entries.length=0,this._runStopCleanup(e,t)}_stop(e){if(this._stopRequested)return this._stopCompletion;let t=this._runStopCleanup(e,()=>{if(e===void 0){if(this._entries.length===0){this._isStopped=!0,this._deliverBatchIfReady();return}this._entries.push({kind:"stop"}),this._deliverBatchIfReady();return}this._entries.push({kind:"item",settled:{status:"rejected",reason:e}}),this._entries.push({kind:"stop"}),this._deliverBatchIfReady()});return En(t)&&t.catch(()=>{}),t}_deliverBatchIfReady(){if(!this._batchRequests.size)return;let e=this._entries[0],t=this._batchRequests;if(e!==void 0){e.kind==="stop"&&Di(!1);let n=e.settled;if(n!==void 0){if(n.status==="fulfilled"){this._batchRequests=new Set,t.forEach(o=>o.resolve(this._drainBatch()));return}this._entries.shift(),this._release(),this._isStopped=!0,this._batchRequests=new Set,t.forEach(o=>o.reject(n.reason))}}else this._isStopped&&(this._batchRequests=new Set,t.forEach(n=>n.resolve(void 0)))}*_drainBatch(){for(;;){let e=this._entries[0];if(e===void 0)return;if(e.kind==="stop"){this._isStopped=!0,this._entries.shift();return}let t=e.settled;if(t===void 0||t.status==="rejected")return;this._entries.shift(),this._release(),yield t.value}}}});function aZ(i){let e=new Set,t=new Set,n=new Map,o=new Map,r,s,{newGroups:a,newStreams:l}=g(i),c=_(a);for(let X of c)e.add(X);for(let X of l)t.add(X);let u=new fF(({push:X,stop:Y,onStop:$,started:re})=>{r=X,s=Y,re.then(()=>{for(let ue of e)I(ue);for(let ue of t)N(ue)}),$(ue=>d(ue))},1).subscribe(X=>L(X));return{initialGroups:c,initialStreams:l,events:u};function d(X){let Y=[];for(let $ of e)h($,X,Y);for(let $ of t)p($,X,Y);if(Y.length>0)return Promise.allSettled(Y).then(()=>{})}function h(X,Y,$){let re=n.get(X);if(re){for(let ue of re.tasks)f(ue,Y,$);for(let ue of re.childGroups)h(ue,Y,$)}}function f(X,Y,$){let re=X.computation.abort(Y);En(re)&&$.push(re);let ue=o.get(X);if(ue)for(let Ie of ue.childStreams)p(Ie,Y,$)}function p(X,Y,$){let re=X.queue.abort(Y);En(re)&&$.push(re)}function g(X,Y){if(!X)return{newGroups:[],newStreams:[]};let{groups:$,tasks:re,streams:ue}=X,Ie=$?A($,Y):[];if(re)for(let mt of re)w(mt);let nt=ue?C(ue,Y):[];return{newGroups:Ie,newStreams:nt}}function A(X,Y){let $=new Set(X),re=new Set,ue=[];for(let Ie of X)v(Ie,$,ue,re,Y);return ue}function v(X,Y,$,re,ue){if(re.has(X))return;re.add(X);let Ie=X.parent;Ie!==void 0&&Y.has(Ie)&&v(Ie,Y,$,re,ue);let nt={childGroups:[],tasks:new Set,pending:0};n.set(X,nt),ue===void 0&&!Ie?$.push(X):Ie&&n.get(Ie)?.childGroups.push(X)}function w(X){for(let Y of X.groups){let $=n.get(Y);$&&($.tasks.add(X),$.pending++,e.has(Y)&&T(X))}}function C(X,Y){if(!Y)return X;let $=o.get(Y);return $&&$.childStreams.push(...X),[]}function _(X,Y=[]){for(let $ of X){let re=n.get($);re&&(re.pending===0?(n.delete($),_(re.childGroups,Y)):Y.push($))}return Y}function E(X,Y){for(let $ of X)e.add($),I($);for(let $ of Y)t.add($),N($)}function I(X){let Y=n.get(X);if(Y)for(let $ of Y.tasks)T($)}function T(X){if(!o.has(X)){o.set(X,{value:void 0,childStreams:[]});try{let Y=X.computation.result();En(Y)?Y.then($=>{r({kind:"TASK_SUCCESS",task:X,result:$})},$=>{r({kind:"TASK_FAILURE",task:X,error:$})}):r({kind:"TASK_SUCCESS",task:X,result:Y})}catch(Y){r({kind:"TASK_FAILURE",task:X,error:Y})}}}async function N(X){try{await X.queue.forEachBatch(async Y=>{let $=r({kind:"STREAM_ITEMS",stream:X,items:Y});En($)&&await $}),r({kind:"STREAM_SUCCESS",stream:X})}catch(Y){r({kind:"STREAM_FAILURE",stream:X,error:Y})}}function L(X){let Y=[];for(let $ of X)switch($.kind){case"TASK_SUCCESS":Y.push(...B($));break;case"TASK_FAILURE":Y.push(...z($));break;case"STREAM_ITEMS":Y.push(...Q($));break;case"STREAM_SUCCESS":t.has($.stream)&&(t.delete($.stream),Y.push($));break;case"STREAM_FAILURE":t.delete($.stream),Y.push($);break}return e.size===0&&t.size===0&&(s(),Y.push({kind:"WORK_QUEUE_TERMINATION"})),Y.length>0?Y:void 0}function B(X){let{task:Y,result:$}=X,{value:re,work:ue}=$,Ie=o.get(Y);Ie&&(Ie.value=re),g(ue,Y);let nt=[],mt=[],xt=[];for(let wt of Y.groups){let Ht=n.get(wt);if(Ht&&(Ht.pending--,e.has(wt)&&Ht.pending===0)){let{groupValuesEvent:Fe,groupSuccessEvent:zt,newGroups:Fi,newStreams:Kt}=Z(wt,Ht);Fe&&nt.push(Fe),nt.push(zt),mt.push(...Fi),xt.push(...Kt)}}return E(mt,xt),nt}function z(X){let{task:Y,error:$}=X;o.delete(Y);let re=[];for(let ue of Y.groups){let Ie=n.get(ue);Ie&&re.push(U(ue,Ie,$))}return re}function Q(X){let{stream:Y,items:$}=X,re=[],ue=[],Ie=[];for(let{value:mt,work:xt}of $){let{newGroups:wt,newStreams:Ht}=g(xt),Fe=_(wt);E(Fe,Ht),re.push(mt),ue.push(...Fe),Ie.push(...Ht)}let nt={kind:"STREAM_VALUES",stream:Y,values:re,newGroups:ue,newStreams:Ie};return Y.queue.isStopped()?(t.delete(Y),[nt,{kind:"STREAM_SUCCESS",stream:Y}]):[nt]}function Z(X,Y){n.delete(X);let $=[],re=[];for(let Ie of Y.tasks){let nt=o.get(Ie);if(nt){let{value:mt,childStreams:xt}=nt;mt!==void 0&&$.push(mt);for(let wt of xt)re.push(wt);ee(Ie)}}let ue=_(Y.childGroups);return e.delete(X),{groupValuesEvent:$.length?{kind:"GROUP_VALUES",group:X,values:$}:void 0,groupSuccessEvent:{kind:"GROUP_SUCCESS",group:X,newGroups:ue,newStreams:re},newGroups:ue,newStreams:re}}function U(X,Y,$){return M(X,Y),e.delete(X),{kind:"GROUP_FAILURE",group:X,error:$}}function M(X,Y){n.delete(X);for(let $ of Y.tasks)$.groups.every(re=>!n.has(re))&&ee($);for(let $ of Y.childGroups){let re=n.get($);re&&M($,re)}}function ee(X){for(let Y of X.groups)n.get(Y)?.tasks.delete(X);o.delete(X)}}var UCe=D(()=>{Wp();WCe()});var lZ,jZe=D(()=>{cS();sS();sZ();L7();UCe();lZ=class{constructor(){this._ids=new Map,this._nextId=0}buildResponse(e,t,n,o,r){let{initialGroups:s,initialStreams:a,events:l}=aZ(n);function c(){f.throw(o?.reason).catch(()=>{})}o&&o.addEventListener("abort",c);let u=()=>{r(),o?.removeEventListener("abort",c)},d=this._toPendingResults(s,a),h=t.length?{errors:t,data:e,pending:d,hasNext:!0}:{data:e,pending:d,hasNext:!0},f=wS(rI(l,p=>this._handleBatch(p,u)),()=>u());return{initialResult:h,subsequentResults:f}}_ensureId(e){let t=this._ids.get(e);return t!==void 0||(t=String(this._nextId++),this._ids.set(e,t)),t}_toPendingResults(e,t){let n=[];for(let o of[e,t])for(let r of o){let a={id:this._ensureId(r),path:Ls(r.path)};r.label!==void 0&&(a.label=r.label),n.push(a)}return n}_handleBatch(e,t){let n={pending:[],incremental:[],completed:[],hasNext:!0};for(let c of e)this._handleWorkQueueEvent(c,n,t);let{incremental:o,completed:r,pending:s,hasNext:a}=n,l={hasNext:a};return s.length>0&&(l.pending=s),o.length>0&&(l.incremental=o),r.length>0&&(l.completed=r),l}_handleWorkQueueEvent(e,t,n){switch(e.kind){case"GROUP_VALUES":{let o=e.group,r=this._ensureId(o);for(let s of e.values){let{bestId:a,subPath:l}=this._getBestIdAndSubPath(r,o,s),c={id:a,data:s.data};s.errors!==void 0&&(c.errors=s.errors),l!==void 0&&(c.subPath=l),t.incremental.push(c)}break}case"GROUP_SUCCESS":{let o=e.group,r=this._ensureId(o);t.completed.push({id:r}),this._ids.delete(o),(e.newGroups.length>0||e.newStreams.length>0)&&t.pending.push(...this._toPendingResults(e.newGroups,e.newStreams));break}case"GROUP_FAILURE":{let{group:o,error:r}=e,s=this._ensureId(o);t.completed.push({id:s,errors:[Ac(r)]}),this._ids.delete(o);break}case"STREAM_VALUES":{let o=e.stream,r=this._ensureId(o),{values:s,newGroups:a,newStreams:l}=e,c=[],u=[];for(let d of s)c.push(d.item),d.errors!==void 0&&u.push(...d.errors);t.incremental.push(u.length>0?{id:r,items:c,errors:u}:{id:r,items:c}),(a.length>0||l.length>0)&&t.pending.push(...this._toPendingResults(a,l));break}case"STREAM_SUCCESS":{let o=e.stream;t.completed.push({id:this._ensureId(o)}),this._ids.delete(o);break}case"STREAM_FAILURE":{let o=e.stream;t.completed.push({id:this._ensureId(o),errors:[Ac(e.error)]}),this._ids.delete(o);break}case"WORK_QUEUE_TERMINATION":{n?.(),t.hasNext=!1;break}}}_getBestIdAndSubPath(e,t,n){let o=Ls(t.path).length,r=e;for(let a of n.deliveryGroups){if(a===t)continue;let l=this._ids.get(a);if(l===void 0)continue;let u=Ls(a.path).length;u>o&&(o=u,r=l)}let s=n.path.slice(o);return{bestId:r,subPath:s.length>0?s:void 0}}}});function Oqt(i){return i.map(e=>e.node)}function Pqt(i,e){return Array.from(i).map(t=>GZe(t,e))}function GZe(i,e){return e.get(i)}var QZe,Fqt,pF,jCe=D(()=>{Za();Wp();BCe();$X();cS();D7();eh();MCe();OCe();RCe();HZe();WZe();jZe();WCe();QZe=iZ(i=>VCe(i)),Fqt=uF((i,e)=>VCe(i,e)),pF=class i extends dF{constructor(e,t,n){super(e,t),this.deferUsageSet=n,this.groups=[],this.tasks=[],this.streams=[]}getCreateSubExecutor(){let e=this.validatedExecutionArgs,t=this.sharedExecutionContext;return n=>new i(e,t,n)}abort(e){super.abort(e);for(let t of this.tasks){let n=t.computation.abort(e);En(n)&&Di(!1)}for(let t of this.streams){let n=t.queue.abort(e);En(n)&&Di(!1)}}buildResponse(e){let t=this.getIncrementalWork(),{tasks:n,streams:o}=t;if(n?.length===0&&o?.length===0)return super.buildResponse(e);let r=this.collectedErrors.errors;return e===null&&Di(!1),new lZ().buildResponse(e,r,t,this.validatedExecutionArgs.externalAbortSignal,this.getFinishSharedExecution())}executeCollectedRootFields(e,t,n,o,r){if(r.length===0)return this.executeRootGroupedFieldSet(e,t,n,o,void 0);this.validatedExecutionArgs.operation.operation===Ar.SUBSCRIPTION&&Di(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.");let{newDeliveryGroups:s,newDeliveryGroupMap:a}=this.getNewDeliveryGroupMap(r,void 0,void 0),{groupedFieldSet:l,newGroupedFieldSets:c}=this.buildRootExecutionPlan(n),u=this.executeRootGroupedFieldSet(e,t,l,o,a);return this.groups.push(...s),c.size>0&&this.collectExecutionGroups(e,t,void 0,c,a),u}buildRootExecutionPlan(e){return QZe(e)}executeCollectedSubfields(e,t,n,o,r,s){if(r.length>0&&this.validatedExecutionArgs.operation.operation===Ar.SUBSCRIPTION&&Di(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`."),s===void 0&&r.length===0)return this.executeFields(e,t,n,o,s);let{newDeliveryGroups:a,newDeliveryGroupMap:l}=this.getNewDeliveryGroupMap(r,s,n),{groupedFieldSet:c,newGroupedFieldSets:u}=this.buildSubExecutionPlan(o),d=this.executeFields(e,t,n,c,l);return this.groups.push(...a),u.size>0&&this.collectExecutionGroups(e,t,n,u,l),d}buildSubExecutionPlan(e){return this.deferUsageSet===void 0?QZe(e):Fqt(e,this.deferUsageSet)}collectExecutionGroups(e,t,n,o,r){let s=this.getCreateSubExecutor();for(let[a,l]of o){let c=Pqt(a,r),u=s(a),d={groups:c,path:n,computation:new rZ(()=>u.executeExecutionGroup(c,e,t,n,l,r),f=>u.abort(f))},h=this.deferUsageSet;this.validatedExecutionArgs.enableEarlyExecution&&(this.shouldDefer(h,a)?Promise.resolve().then(()=>d.computation.prime()):d.computation.prime()),this.tasks.push(d)}}executeExecutionGroup(e,t,n,o,r,s){let a;try{a=this.executeFields(t,n,o,r,s)}catch(l){throw this.abort(),l}return En(a)?a.then(l=>this.buildExecutionGroupResult(e,o,l),l=>{throw this.abort(),l}):this.buildExecutionGroupResult(e,o,a)}buildExecutionGroupResult(e,t,n){let o=n,r=this.collectedErrors.errors;return this.finish({value:r.length?{deliveryGroups:e,path:Ls(t),errors:r,data:o}:{deliveryGroups:e,path:Ls(t),data:o},work:this.getIncrementalWork()})}getIncrementalWork(){let{groups:e,tasks:t,streams:n,collectedErrors:o}=this;if(o.errors.length===0)return{groups:e,tasks:t,streams:n};let r=new Error("Cancelled secondary to null within original result"),s=[];for(let l of t)if(o.hasNulledPosition(l.path)){let c=l.computation.abort(r);En(c)&&Di(!1)}else s.push(l);let a=[];for(let l of n)if(o.hasNulledPosition(l.path)){let c=l.queue.abort(r);En(c)&&Di(!1)}else a.push(l);return{groups:e,tasks:s,streams:a}}getNewDeliveryGroupMap(e,t,n){let o=[],r=new Map(t);for(let s of e){let a=s.parentDeferUsage,l=a===void 0?void 0:GZe(a,r),c={path:n,label:s.label,parent:l};o.push(c),r.set(s,c)}return{newDeliveryGroups:o,newDeliveryGroupMap:r}}shouldDefer(e,t){return e===void 0||!Array.from(t).every(n=>e.has(n))}handleStream(e,t,n,o,r,s){let{handle:a,isAsync:l}=n,c=this.buildStreamItemQueue(e,t,a,o.fieldDetailsList,r,s,l),u={label:o.label,path:t,queue:c,initialCount:e};return this.streams.push(u),!0}buildStreamItemQueue(e,t,n,o,r,s,a){let l=this.getCreateSubExecutor(),{enableEarlyExecution:c}=this.validatedExecutionArgs,u=this.sharedExecutionContext;return new fF(async({push:h,stop:f,onStop:p,started:g})=>{let A=new Set,v=!1,w=!1;if(p(_=>{if(w=!0,!v){for(let E of A)E(_);a?u.asyncWorkTracker.add(k7(n)):u.asyncWorkTracker.addValues(eZ(n))}}),await(c?Promise.resolve():g),w)return;let C=e;for(;;){let _;try{if(a){if(_=await n.next(),w)return}else _=n.next()}catch(L){throw bA(L,Oqt(o),Ls(t))}if(_.done){v=!0;let L=f();En(L)&&L.catch(()=>{});return}let E=fd(t,C,void 0),I=l(),T=I.completeStreamItem(E,_.value,o,r,s);if(En(T)){if(c){let L=B=>I.abort(B);A.add(L),T=T.finally(()=>{A.delete(L)})}else if(T=await T,w)return}let N=h(T);if(En(N)&&(await N,w))return;C+=1}},100)}completeStreamItem(e,t,n,o,r){if(Hh(t))return this.completePromisedValue(r,n,o,e,t,void 0).then(a=>this.buildStreamItemResult(a),a=>(this.handleFieldError(a,r,n,e),this.buildStreamItemResult(null))).then(void 0,a=>{throw this.abort(),a});let s;try{try{s=this.completeValue(r,n,o,e,t,void 0)}catch(a){return this.handleFieldError(a,r,n,e),this.buildStreamItemResult(null)}}catch(a){throw this.abort(),a}return En(s)?s.then(a=>this.buildStreamItemResult(a),a=>(this.handleFieldError(a,r,n,e),this.buildStreamItemResult(null))).then(void 0,a=>{throw this.abort(),a}):this.buildStreamItemResult(s)}buildStreamItemResult(e){let t=e,n=this.collectedErrors.errors,o=this.getIncrementalWork();return this.finish(n.length>0?{value:{item:t,errors:n},work:o}:{value:{item:t},work:o})}}});function R7(i){return Kp(N9)?AS(N9,QCe(i),()=>qZe(i)):qZe(i)}function QCe(i){let e,t=()=>(e===void 0&&(e=T7(i.document,i.operationName)),e);return{schema:i.schema,document:i.document,rawVariableValues:i.variableValues,get operationName(){return i.operationName??t()?.name?.value},get operationType(){return t()?.operation}}}function qZe(i){if(i.schema.getDirective("defer")||i.schema.getDirective("stream"))throw new Error(Bqt);let e=xS(i);return"schema"in e?uZ(e):{errors:e}}function cZ(i){return Kp(N9)?AS(N9,QCe(i),()=>YZe(i)):YZe(i)}function YZe(i){let e=xS(i);return"schema"in e?dZ(e):{errors:e}}function uZ(i){return new I7(i).executeRootSelectionSet()}function dZ(i){return new pF(i).executeRootSelectionSet()}function F7(i){let e=cZ(i);if(En(e)||"initialResult"in e)throw new Error("GraphQL execution failed to complete synchronously.");return e}function hZ(i){return new I7(i).executeRootSelectionSet(!1)}function O7(i){return Kp(uxe)?AS(uxe,QCe(i),()=>KZe(i)):KZe(i)}function KZe(i){let e=pZ(i);if(!("schema"in e))return{errors:e};let t=fZ(e);return En(t)?t.then(n=>cF(n)?M7(e,n):n):cF(t)?M7(e,t):t}function fZ(i){if(!("operation"in i))throw new Se("Passing ExecutionArgs to createSourceEventStream() was removed in graphql-js@17.0.0; call validateSubscriptionArgs() first and pass the result instead, or use subscribe() for the full subscription pipeline.");try{let e=Vqt(i);return En(e)?e.then(void 0,t=>({errors:[Ac(t)]})):e}catch(e){return{errors:[Ac(e)]}}}function xS(i){let{schema:e,document:t,rootValue:n,contextValue:o,variableValues:r,operationName:s,fieldResolver:a,typeResolver:l,subscribeFieldResolver:c,abortSignal:u,enableEarlyExecution:d,hooks:h,options:f}=i;Yk(e);let p,g=Object.create(null),A=Object.create(null),v=[];for(let L of t.definitions)switch(L.kind){case W.OPERATION_DEFINITION:if(s==null){if(p!==void 0)return[new Se("Must provide operation name if query contains multiple operations.")];p=L}else L.name?.value===s&&(p=L);break;case W.FRAGMENT_DEFINITION:{g[L.name.value]=L;let B;if(L.variableDefinitions){let z=Object.create(null);for(let Q of L.variableDefinitions){let Z=jX(e,Q);if(Z instanceof Se){v.push(Z);continue}z[Z.name]=Z}B=z}A[L.name.value]={definition:L,variableSignatures:B};break}default:}if(!p)return s!=null?[new Se(`Unknown operation named "${s}".`)]:[new Se("Must provide an operation.")];if(v.length>0)return v;let w=p.variableDefinitions??[],C=i.hideSuggestions??!1,_=r??{},E={maxErrors:f?.maxCoercionErrors??50,hideSuggestions:C},I=eZe,T=Kp(I)?AS(I,{schema:e,document:t,operation:p,rawVariableValues:r,operationName:p.name?.value,operationType:p.operation},()=>nF(e,w,_,E)):nF(e,w,_,E);if(T.errors)return T.errors;let N=!p.directives?.find(L=>L.name.value===qXe.name);return{schema:e,document:t,fragmentDefinitions:g,fragments:A,rootValue:n,contextValue:o,operation:p,variableValues:T.variableValues,fieldResolver:a??N7,typeResolver:l??mZ,subscribeFieldResolver:c??N7,hideSuggestions:C,errorPropagation:N,externalAbortSignal:u??void 0,enableEarlyExecution:d===!0,hooks:h??void 0,rawVariableValues:r}}function pZ(i){let e=xS(i);return"schema"in e&&zqt(e),e}function zqt(i){if(!U9(i.operation))throw new Se("Expected subscription operation.")}function M7(i,e,t=hZ){function n(r){let s={...i,rootValue:r};return t(s)}let o=i.externalAbortSignal;if(o){let r=rI(e,n);return{...r,next:()=>kCe(r.next(),o)}}return rI(e,n)}function Vqt(i){let{schema:e,fragments:t,rootValue:n,contextValue:o,operation:r,variableValues:s,hideSuggestions:a,externalAbortSignal:l}=i,c=e.getSubscriptionType();if(c==null)throw new Se("Schema is not configured to execute subscription operation.",{nodes:r});let{groupedFieldSet:u}=oF(e,t,s,c,r.selectionSet,a),d=u.entries().next().value,[h,f]=d,p=f[0],g=p.node,A=g.name.value,v=e.getField(c,A),w=f.map(I=>I.node);if(!v)throw new Se(`The subscription field "${A}" is not defined.`,{nodes:w});let C=ZX(l),_=fd(void 0,h,c.name),E=JX(i,v,w,c,_,C.getAbortSignal,C.getAsyncHelpers);try{let I=mA(v,g,s,p.fragmentVariableValues,a),N=(v.subscribe??i.subscribeFieldResolver)(n,I,o,E);if(Hh(N)){let L=Promise.resolve(N);return(l?kCe(L,l):L).then(JZe).then(void 0,z=>{throw bA(z,Hqt(f),Ls(_))})}return JZe(N)}catch(I){throw bA(I,w,Ls(_))}}function JZe(i){if(i instanceof Error)throw i;if(!cF(i))throw new Se(`Subscription field must return Async Iterable. Received: ${Xe(i)}.`);return i}function Hqt(i){return i.map(e=>e.node)}var Bqt,mZ,N7,P7=D(()=>{Is();CCe();oA();Wp();cS();sS();Ki();D7();so();$k();Xc();_Ce();SCe();M9();ECe();ICe();QX();LCe();VZe();Zxe();jCe();sZ();tI();Bqt="The provided schema unexpectedly contains experimental directives (@defer or @stream). These directives may only be utilized if experimental execution features are explicitly enabled.";mZ=function(i,e,t,n){if(Ma(i)&&typeof i.__typename=="string")return i.__typename;let o=t.schema.getPossibleTypes(n),r=[];try{for(let s=0;s{for(let a=0;a{Zk();E7();P7();gZ={parse:Zc,validate:S7,execute:R7,subscribe:O7}});function $Ze(i){return new Promise(e=>e(t$e(i)))}function e$e(i){let e=t$e(i);if(En(e))throw new Error("GraphQL execution failed to complete synchronously.");return e}function t$e(i){let e=i.harness??gZ,{schema:t,source:n}=i,o=bS(t);if(o.length>0)return{errors:o};let r;try{r=e.parse(n,i)}catch(s){return{errors:[Ac(s)]}}return En(r)?r.then(s=>XZe(e,i,t,s),s=>({errors:[Ac(s)]})):XZe(e,i,t,r)}function XZe(i,e,t,n){let o=i.validate(t,n,e.rules,e);return En(o)?o.then(r=>ZZe(i,e,r,n)):ZZe(i,e,o,n)}function ZZe(i,e,t,n){return t.length>0?{errors:t}:i.execute({...e,document:n})}var i$e=D(()=>{Wp();sS();I9();GCe()});var n$e=D(()=>{FX();fX();Twe();KR();F9();Zk();tg();Bk();eh();$k();VR()});function bZ(i,e,t){let n=i;return t!==void 0&&(n.errors=t),e!==void 0&&(n.label=e),n}var AZ,o$e=D(()=>{cS();sS();UCe();sZ();L7();AZ=class{constructor(){this._indices=new Map}buildResponse(e,t,n,o,r){let{initialStreams:s,events:a}=aZ(n);for(let h of s)this._indices.set(h,h.initialCount);function l(){d.throw(o?.reason).catch(()=>{})}o&&o.addEventListener("abort",l);let c=()=>{r(),o?.removeEventListener("abort",l)},u=t.length?{errors:t,data:e,hasNext:!0}:{data:e,hasNext:!0},d=wS(rI(a,h=>this._handleBatch(h,c)),()=>c());return{initialResult:u,subsequentResults:d}}_handleBatch(e,t){let n={incremental:[],hasNext:!0};for(let a of e)this._handleWorkQueueEvent(a,n,t);let{incremental:o,hasNext:r}=n,s={hasNext:r};return o.length>0&&(s.incremental=o),s}_handleWorkQueueEvent(e,t,n){switch(e.kind){case"GROUP_VALUES":{let o=e.group;for(let r of e.values)t.incremental.push(bZ({data:r.data,path:Ls(o.path)},o.label,r.errors));break}case"GROUP_SUCCESS":break;case"GROUP_FAILURE":{let o=e.group;t.incremental.push(bZ({data:null,path:Ls(o.path)},o.label,[Ac(e.error)]));break}case"STREAM_VALUES":{let o=e.stream,{values:r}=e,s=[],a=[];for(let c of r)s.push(c.item),c.errors!==void 0&&a.push(...c.errors);let l=this._indices.get(o);l===void 0&&(l=o.initialCount,this._indices.set(o,l)),this._indices.set(o,l+s.length),t.incremental.push(bZ({items:s,path:Ls(fd(o.path,l,void 0))},o.label,a.length>0?a:void 0));break}case"STREAM_SUCCESS":{this._indices.delete(e.stream);break}case"STREAM_FAILURE":{this._indices.delete(e.stream);let o=e.stream;t.incremental.push(bZ({items:null,path:Ls(o.path)},o.label,[Ac(e.error)]));break}case"WORK_QUEUE_TERMINATION":{n?.(),t.hasNext=!1;break}}}}});function s$e(i,e=new Set){let t=new Jc,n=new Map;for(let[o,r]of i)for(let s of r){let a=s.deferUsage,l=a===void 0?new Set:new Set([a]);if(hF(e,l))t.add(o,s);else{let c=oZ(n,l);c===void 0&&(c=new Jc,n.set(l,c)),c.add(o,s)}}return{groupedFieldSet:t,newGroupedFieldSets:n}}var r$e,Wqt,vZ,a$e=D(()=>{NR();zCe();Za();nZ();BCe();$X();jCe();o$e();r$e=iZ(i=>s$e(i)),Wqt=uF((i,e)=>s$e(i,e)),vZ=class i extends pF{getCreateSubExecutor(){let e=this.validatedExecutionArgs,t=this.sharedExecutionContext;return n=>new i(e,t,n)}buildResponse(e){let t=this.getIncrementalWork(),{tasks:n,streams:o}=t;if(n?.length===0&&o?.length===0)return super.buildResponse(e);let r=this.collectedErrors.errors;return e===null&&Di(!1),new AZ().buildResponse(e,r,t,this.validatedExecutionArgs.externalAbortSignal,this.getFinishSharedExecution())}buildRootExecutionPlan(e){return r$e(e)}buildSubExecutionPlan(e){return this.deferUsageSet===void 0?r$e(e):Wqt(e,this.deferUsageSet)}}});function qCe(i){let e=xS(i);return"schema"in e?yZ(e):{errors:e}}function yZ(i){return new vZ(i).executeRootSelectionSet()}var l$e=D(()=>{P7();a$e()});var c$e=D(()=>{cS();P7();l$e();NCe();tI()});function YCe(i){return{Field(e){let t=i.getFieldDef(),n=t?.deprecationReason;t&&n!=null&&i.reportError(new Se(`The field ${t} is deprecated. ${n}`,{nodes:e}))},Argument(e){let t=i.getArgument(),n=t?.deprecationReason;t&&n!=null&&i.reportError(new Se(`The argument "${t}" is deprecated. ${n}`,{nodes:e}))},ObjectField(e){let t=Vr(i.getParentInputType());if(Bi(t)){let n=t.getFields()[e.name.value],o=n?.deprecationReason;o!=null&&i.reportError(new Se(`The input field ${n} is deprecated. ${o}`,{nodes:e}))}},EnumValue(e){let t=i.getEnumValue(),n=t?.deprecationReason;t&&n!=null&&i.reportError(new Se(`The enum value "${t}" is deprecated. ${n}`,{nodes:e}))}}}var u$e=D(()=>{Ki();So()});function KCe(i){return{Field(e){let t=Vr(i.getType());t&&Rb(t)&&i.reportError(new Se(`GraphQL introspection has been disabled, but the requested query contained the field "${e.name.value}".`,{nodes:e}))}}}var d$e=D(()=>{Ki();So();ty()});var h$e=D(()=>{E7();wCe();yCe();pxe();gxe();Axe();Cxe();_xe();Sxe();Dxe();Txe();kxe();Ixe();Lxe();Nxe();Fxe();Oxe();Pxe();Bxe();Qxe();Gxe();Kxe();Jxe();nCe();oCe();sCe();lCe();dCe();hCe();fCe();gCe();bCe();ACe();vCe();Rxe();Mxe();pCe();mCe();cCe();uCe();rCe();aCe();qxe();u$e();d$e()});var f$e=D(()=>{Ki();L9();D7()});function tx(i){let e={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,experimentalDirectiveDeprecation:!1,oneOf:!1,typeDepth:9,...i},t=e.descriptions?"description":"",n=e.specifiedByUrl?"specifiedByURL":"",o=e.directiveIsRepeatable?"isRepeatable":"",r=e.schemaDescription?t:"";function s(u){return e.inputValueDeprecation?u:""}function a(u){return e.experimentalDirectiveDeprecation?u:""}let l=e.oneOf?"isOneOf":"";function c(u,d){if(u<=0)return"";if(u>100)throw new Error("Please set typeDepth to a reasonable value between 0 and 100; the default is 9.");return` +${d}ofType { +${d} name +${d} kind${c(u-1,d+" ")} +${d}}`}return` query IntrospectionQuery { __schema { - `.concat(o,` - queryType { name } - mutationType { name } - subscriptionType { name } + ${r} + queryType { name kind } + mutationType { name kind } + subscriptionType { name kind } types { ...FullType } - directives { + directives${a("(includeDeprecated: true)")} { name - `).concat(t,` - `).concat(r,` + ${t} + ${o} + ${a("isDeprecated")} + ${a("deprecationReason")} locations - args`).concat(s("(includeDeprecated: true)"),` { + args${s("(includeDeprecated: true)")} { ...InputValue } } @@ -130,12 +164,13 @@ In some cases, you need to provide options to alter GraphQL's execution behavior fragment FullType on __Type { kind name - `).concat(t,` - `).concat(n,` + ${t} + ${n} + ${l} fields(includeDeprecated: true) { name - `).concat(t,` - args`).concat(s("(includeDeprecated: true)"),` { + ${t} + args${s("(includeDeprecated: true)")} { ...InputValue } type { @@ -144,7 +179,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior isDeprecated deprecationReason } - inputFields`).concat(s("(includeDeprecated: true)"),` { + inputFields${s("(includeDeprecated: true)")} { ...InputValue } interfaces { @@ -152,7 +187,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } enumValues(includeDeprecated: true) { name - `).concat(t,` + ${t} isDeprecated deprecationReason } @@ -163,234 +198,199 @@ In some cases, you need to provide options to alter GraphQL's execution behavior fragment InputValue on __InputValue { name - `).concat(t,` + ${t} type { ...TypeRef } defaultValue - `).concat(s("isDeprecated"),` - `).concat(s("deprecationReason"),` + ${s("isDeprecated")} + ${s("deprecationReason")} } fragment TypeRef on __Type { kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - } - } - } - } - } - } - } + name${c(e.typeDepth," ")} } - `)}});var Tet=Ue(xCe=>{"use strict";Object.defineProperty(xCe,"__esModule",{value:!0});xCe.getOperationAST=kii;var Tii=Ds();function kii(i,e){for(var t=null,n=0,r=i.definitions;n{"use strict";Object.defineProperty(CCe,"__esModule",{value:!0});CCe.introspectionFromSchema=Pii;var Iii=Rii(Qd()),Lii=iR(),Nii=Z6(),Mii=wCe();function Rii(i){return i&&i.__esModule?i:{default:i}}function ket(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Fii(i){for(var e=1;e{"use strict";Object.defineProperty(_Ce,"__esModule",{value:!0});_Ce.buildClientSchema=Qii;var Bii=e9(Vm()),jm=e9(Oo()),zii=e9(gb()),XJ=e9(w6()),Let=e9(LA()),Vii=iR(),Hii=bk(),Wii=Ip(),Uii=FA(),VA=Ab(),Qm=po(),jii=j6();function e9(i){return i&&i.__esModule?i:{default:i}}function Qii(i,e){(0,Let.default)(i)&&(0,Let.default)(i.__schema)||(0,zii.default)(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '.concat((0,jm.default)(i),"."));for(var t=i.__schema,n=(0,XJ.default)(t.types,function(B){return B.name},function(B){return g(B)}),r=0,o=[].concat(Uii.specifiedScalarTypes,VA.introspectionTypes);r{"use strict";Object.defineProperty(i9,"__esModule",{value:!0});i9.extendSchema=$ii;i9.extendSchemaImpl=jet;i9.getDescription=Dk;var Gii=_R(Vm()),qii=_R(P_()),Met=_R(Oo()),t9=_R(I1e()),Ret=_R(Qd()),Yii=_R(gb()),wb=Ds(),Kii=$M(),Jii=tR(),Fet=Ak(),Xii=bR(),Het=Y6(),Oet=bk(),Wet=FA(),Uet=Ab(),$J=Ip(),Ka=po(),Pet=j6();function _R(i){return i&&i.__esModule?i:{default:i}}function Bet(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Bo(i){for(var e=1;e0?t.reverse().join(` -`):void 0}}});var qet=Ue(eX=>{"use strict";Object.defineProperty(eX,"__esModule",{value:!0});eX.buildASTSchema=Get;eX.buildSchema=lni;var tni=ani(gb()),ini=Ds(),nni=iR(),rni=bR(),oni=bk(),Qet=Ip(),sni=SCe();function ani(i){return i&&i.__esModule?i:{default:i}}function Get(i,e){i!=null&&i.kind===ini.Kind.DOCUMENT||(0,tni.default)(0,"Must provide valid Document AST."),e?.assumeValid!==!0&&e?.assumeValidSDL!==!0&&(0,rni.assertValidSDL)(i);var t={description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},n=(0,sni.extendSchemaImpl)(t,i,e);if(n.astNode==null)for(var r=0,o=n.types;r{"use strict";Object.defineProperty(TCe,"__esModule",{value:!0});TCe.lexicographicSortSchema=vni;var cni=n9(Vm()),uni=n9(Oo()),dni=n9(Qd()),hni=n9(w6()),fni=n9(x6()),pni=bk(),mni=Ip(),gni=Ab(),Ff=po();function n9(i){return i&&i.__esModule?i:{default:i}}function Yet(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Uc(i){for(var e=1;e{"use strict";Object.defineProperty(r9,"__esModule",{value:!0});r9.printSchema=wni;r9.printIntrospectionSchema=xni;r9.printType=$et;var ICe=FCe(Vm()),Ani=FCe(Oo()),Jet=FCe(Qd()),LCe=Hm(),yni=tR(),Xet=Ab(),NCe=FA(),MCe=Ip(),SR=po(),RCe=M6();function FCe(i){return i&&i.__esModule?i:{default:i}}function wni(i,e){return Zet(i,function(t){return!(0,MCe.isSpecifiedDirective)(t)},Cni,e)}function xni(i,e){return Zet(i,MCe.isSpecifiedDirective,Xet.isIntrospectionType,e)}function Cni(i){return!(0,NCe.isSpecifiedScalarType)(i)&&!(0,Xet.isIntrospectionType)(i)}function Zet(i,e,t,n){var r=i.getDirectives().filter(e),o=(0,ICe.default)(i.getTypeMap()).filter(t);return[_ni(i)].concat(r.map(function(s){return Nni(s,n)}),o.map(function(s){return $et(s,n)})).filter(Boolean).join(` + `}var JCe=D(()=>{});function XCe(i,e){let t={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,experimentalDirectiveDeprecation:!0,oneOf:!0,...e},n=Zc(tx(t)),o=F7({schema:i,document:n});return o.errors==null&&o.data!=null||Di(!1),o.data}var p$e=D(()=>{Za();Zk();P7();JCe()});function ix(i,e){Ma(i)&&Ma(i.__schema)||jp(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Xe(i)}.`);let t=i.__schema,n=new Map(t.types.map(L=>[L.name,h(L)]));for(let L of[...Nb,...Mb])n.has(L.name)&&n.set(L.name,L);let o=t.queryType!=null?u(t.queryType):null,r=t.mutationType!=null?u(t.mutationType):null,s=t.subscriptionType!=null?u(t.subscriptionType):null,a=t.directives!=null?t.directives.map(N):[];return new Yp({description:t.description,query:o,mutation:r,subscription:s,types:[...n.values()],directives:a,assumeValid:e?.assumeValid});function l(L){if(L.kind===xs.LIST){let B=L.ofType;if(B==null)throw new Error("Decorated type deeper than introspection query.");return new Ks(l(B))}if(L.kind===xs.NON_NULL){let B=L.ofType;if(B==null)throw new Error("Decorated type deeper than introspection query.");let z=l(B);return new Pi(m9(z))}return c(L)}function c(L){let B=L.name;if(!B)throw new Error(`Unknown type reference: ${Xe(L)}.`);let z=n.get(B);if(z==null)throw new Error(`Invalid or incomplete schema, unknown type: ${B}. Ensure that a full introspection query is used in order to build a client schema.`);return z}function u(L){return f9(c(L))}function d(L){return p9(c(L))}function h(L){switch(L.kind){case xs.SCALAR:return f(L);case xs.OBJECT:return g(L);case xs.INTERFACE:return A(L);case xs.UNION:return v(L);case xs.ENUM:return w(L);case xs.INPUT_OBJECT:return C(L);default:throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Xe(L)}.`)}}function f(L){return new dd({name:L.name,description:L.description,specifiedByURL:L.specifiedByURL})}function p(L){if(L.interfaces===null&&L.kind===xs.INTERFACE)return[];if(L.interfaces==null){let B=Xe(L);throw new Error(`Introspection result missing interfaces: ${B}.`)}return L.interfaces.map(d)}function g(L){return new vc({name:L.name,description:L.description,interfaces:()=>p(L),fields:()=>_(L)})}function A(L){return new Qp({name:L.name,description:L.description,interfaces:()=>p(L),fields:()=>_(L)})}function v(L){if(L.possibleTypes==null){let B=Xe(L);throw new Error(`Introspection result missing possibleTypes: ${B}.`)}return new Lb({name:L.name,description:L.description,types:()=>L.possibleTypes.map(u)})}function w(L){if(L.enumValues==null){let B=Xe(L);throw new Error(`Introspection result missing enumValues: ${B}.`)}return new th({name:L.name,description:L.description,values:rA(L.enumValues,B=>B.name,B=>({description:B.description,deprecationReason:B.deprecationReason}))})}function C(L){if(L.inputFields==null){let B=Xe(L);throw new Error(`Introspection result missing inputFields: ${B}.`)}return new Gp({name:L.name,description:L.description,fields:()=>I(L.inputFields),isOneOf:L.isOneOf})}function _(L){if(L.fields==null)throw new Error(`Introspection result missing fields: ${Xe(L)}.`);return rA(L.fields,B=>B.name,E)}function E(L){let B=l(L.type);if(!ig(B)){let z=Xe(B);throw new Error(`Introspection must provide output type for fields, but received: ${z}.`)}if(L.args==null){let z=Xe(L);throw new Error(`Introspection result missing field args: ${z}.`)}return{description:L.description,deprecationReason:L.deprecationReason,type:B,args:I(L.args)}}function I(L){return rA(L,B=>B.name,T)}function T(L){let B=l(L.type);if(!Ql(B)){let z=Xe(B);throw new Error(`Introspection must provide input type for arguments, but received: ${z}.`)}return{description:L.description,type:B,default:L.defaultValue!=null?{literal:P9(L.defaultValue)}:void 0,deprecationReason:L.deprecationReason}}function N(L){if(L.args==null){let B=Xe(L);throw new Error(`Introspection result missing directive args: ${B}.`)}if(L.locations==null){let B=Xe(L);throw new Error(`Introspection result missing directive locations: ${B}.`)}return new wc({name:L.name,description:L.description,isRepeatable:L.isRepeatable,deprecationReason:L.deprecationReason,locations:L.locations.slice(),args:I(L.args)})}}var m$e=D(()=>{MR();Is();oA();a9();Zk();So();Xc();ty();cA();Gk()});function wZ(i,e){let t=e({getNamedType:l,setNamedType:c,getNamedTypes:u}),n=new Map;for(let T of i.types){let N=T.name,L=d(T);L&&n.set(N,L)}let o=[];for(let T of i.directives){if(gS(T)){o.push(T);continue}let N=I(T.toConfig());N&&o.push(new wc(N))}let r={...i,query:i.query&&l(i.query.name),mutation:i.mutation&&l(i.mutation.name),subscription:i.subscription&&l(i.subscription.name),types:Array.from(n.values()),directives:o},s=t[_s.SCHEMA];return s==null?r:s(r);function a(T){return Cn(T)?new Ks(a(T.ofType)):Si(T)?new Pi(a(T.ofType)):l(T.name)}function l(T){let N=Uqt.get(T)??n.get(T);return N===void 0&&Di(!1,`Unknown type: "${T}".`),N}function c(T){n.set(T.name,T)}function u(){return Array.from(n.values())}function d(T){if(Rb(T)||Gw(T))return T;if(yc(T))return h(T);if(en(T))return f(T);if(cn(T))return A(T);if(ys(T))return v(T);if(Oo(T))return w(T);if(Bi(T))return _(T);Di(!1,"Unexpected type: "+Xe(T))}function h(T){let N=T.toConfig(),L=t[_s.SCALAR];return N=L==null?N:L(N),new dd(N)}function f(T){let N=T.toConfig(),L={...N,interfaces:()=>N.interfaces.map(z=>l(z.name)),fields:()=>p(N.fields,T.name)},B=t[_s.OBJECT];return L=B==null?L:B(L),new vc(L)}function p(T,N){let L=Object.create(null);for(let[B,z]of Object.entries(T)){let Q={...z,type:a(z.type),args:g(z.args,B,N)},Z=t[_s.FIELD];Z&&(Q=Z(Q,N)),L[B]=Q}return L}function g(T,N,L){let B=Object.create(null);for(let[z,Q]of Object.entries(T)){let Z={...Q,type:a(Q.type)},U=t[_s.ARGUMENT];U&&(Z=U(Z,N,L)),B[z]=Z}return B}function A(T){let N=T.toConfig(),L={...N,interfaces:()=>N.interfaces.map(z=>l(z.name)),fields:()=>p(N.fields,T.name)},B=t[_s.INTERFACE];return L=B==null?L:B(L),new Qp(L)}function v(T){let N=T.toConfig(),L={...N,types:()=>N.types.map(z=>l(z.name))},B=t[_s.UNION];return L=B==null?L:B(L),new Lb(L)}function w(T){let N=T.toConfig(),L={...N,values:()=>{let z=Object.create(null);for(let[Q,Z]of Object.entries(N.values)){let U=C(Z,Q,T.name);z[Q]=U}return z}},B=t[_s.ENUM];return L=B==null?L:B(L),new th(L)}function C(T,N,L){let B={...T},z=t[_s.ENUM_VALUE];return z==null?B:z(B,N,L)}function _(T){let N=T.toConfig(),L={...N,fields:()=>{let z=Object.create(null);for(let[Q,Z]of Object.entries(N.fields)){let U=E(Z,Q,T.name);z[Q]=U}return z}},B=t[_s.INPUT_OBJECT];return L=B==null?L:B(L),new Gp(L)}function E(T,N,L){let B={...T,type:a(T.type)},z=t[_s.INPUT_FIELD];return z==null?B:z(B,N,L)}function I(T){let N={...T,args:g(T.args,T.name,void 0)},L=t[_s.DIRECTIVE];return L==null?N:L(N)}}var _s,Uqt,ZCe=D(()=>{Is();Za();So();Xc();ty();cA();_s={SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD:"FIELD",ARGUMENT:"ARGUMENT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD:"INPUT_FIELD",DIRECTIVE:"DIRECTIVE"};Uqt=new Map([...Nb,...Mb].map(i=>[i.name,i]))});function e_e(i,e,t){Qk(i),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&DZe(e,i);let n=i.toConfig(),o=t_e(n,e,t);return n===o?i:new Yp(o)}function t_e(i,e,t){let n=[],o=new Jc,r=new Jc,s=new Jc,a=new Jc,l=new Jc,c=new Jc,u=new Jc,d=[],h,f=[],p=!1;for(let g of e.definitions){switch(g.kind){case W.SCHEMA_DEFINITION:h=g;break;case W.SCHEMA_EXTENSION:f.push(g);break;case W.DIRECTIVE_DEFINITION:d.push(g);break;case W.DIRECTIVE_EXTENSION:u.add(g.name.value,g);break;case W.SCALAR_TYPE_DEFINITION:case W.OBJECT_TYPE_DEFINITION:case W.INTERFACE_TYPE_DEFINITION:case W.UNION_TYPE_DEFINITION:case W.ENUM_TYPE_DEFINITION:case W.INPUT_OBJECT_TYPE_DEFINITION:n.push(g);break;case W.SCALAR_TYPE_EXTENSION:o.add(g.name.value,g);break;case W.OBJECT_TYPE_EXTENSION:r.add(g.name.value,g);break;case W.INTERFACE_TYPE_EXTENSION:s.add(g.name.value,g);break;case W.UNION_TYPE_EXTENSION:a.add(g.name.value,g);break;case W.ENUM_TYPE_EXTENSION:l.add(g.name.value,g);break;case W.INPUT_OBJECT_TYPE_EXTENSION:c.add(g.name.value,g);break;default:continue}p=!0}return p?wZ(i,g=>{let{getNamedType:A,setNamedType:v,getNamedTypes:w}=g;return{[_s.SCHEMA]:M=>{for(let X of n){let Y=jqt.get(X.name.value)??U(X);v(Y)}let ee={query:M.query&&A(M.query.name),mutation:M.mutation&&A(M.mutation.name),subscription:M.subscription&&A(M.subscription.name),...h&&C([h]),...C(f)};return{description:h?.description?.value??M.description,...ee,types:w(),directives:[...M.directives.map(T),...d.map(I)],extensions:M.extensions,astNode:h??M.astNode,extensionASTNodes:M.extensionASTNodes.concat(f),assumeValid:t?.assumeValid??!1}},[_s.INPUT_OBJECT]:M=>{let ee=c.get(M.name)??[];return{...M,fields:()=>({...M.fields(),...B(ee)}),extensionASTNodes:M.extensionASTNodes.concat(ee)}},[_s.ENUM]:M=>{let ee=l.get(M.name)??[];return{...M,values:()=>({...M.values(),...z(ee)}),extensionASTNodes:M.extensionASTNodes.concat(ee)}},[_s.SCALAR]:M=>{let ee=o.get(M.name)??[],X=M.specifiedByURL;for(let Y of ee)X=$Ce(Y)??X;return{...M,specifiedByURL:X,extensionASTNodes:M.extensionASTNodes.concat(ee)}},[_s.OBJECT]:M=>{let ee=r.get(M.name)??[];return{...M,interfaces:()=>[...M.interfaces(),...Q(ee)],fields:()=>({...M.fields(),...N(ee)}),extensionASTNodes:M.extensionASTNodes.concat(ee)}},[_s.INTERFACE]:M=>{let ee=s.get(M.name)??[];return{...M,interfaces:()=>[...M.interfaces(),...Q(ee)],fields:()=>({...M.fields(),...N(ee)}),extensionASTNodes:M.extensionASTNodes.concat(ee)}},[_s.UNION]:M=>{let ee=a.get(M.name)??[];return{...M,types:()=>[...M.types(),...Z(ee)],extensionASTNodes:M.extensionASTNodes.concat(ee)}}};function C(M){let ee={};for(let X of M){let Y=X.operationTypes??[];for(let $ of Y)ee[$.operation]=_($.type)}return ee}function _(M){let ee=M.name.value,X=A(ee);return X===void 0&&Di(!1,`Unknown type: "${ee}".`),X}function E(M){return M.kind===W.LIST_TYPE?new Ks(E(M.type)):M.kind===W.NON_NULL_TYPE?new Pi(E(M.type)):_(M)}function I(M){let ee=u.get(M.name.value)??[],X=sI(M)??ee.map(Y=>sI(Y)).find(Y=>Y!=null);return new wc({name:M.name.value,description:M.description?.value,locations:M.locations.map(({value:Y})=>Y),isRepeatable:M.repeatable,args:L(M.arguments),deprecationReason:X,astNode:M,extensionASTNodes:ee})}function T(M){let ee=u.get(M.name)??[];if(ee.length===0)return M;let X=M.deprecationReason??ee.map(Y=>sI(Y)).find(Y=>Y!=null);return new wc({...M.toConfig(),deprecationReason:X,extensionASTNodes:M.extensionASTNodes.concat(ee)})}function N(M){let ee=Object.create(null);for(let X of M){let Y=X.fields??[];for(let $ of Y)ee[$.name.value]={type:E($.type),description:$.description?.value,args:L($.arguments),deprecationReason:sI($),astNode:$}}return ee}function L(M){let ee=M??[],X=Object.create(null);for(let Y of ee){let $=E(Y.type);X[Y.name.value]={type:$,description:Y.description?.value,default:Y.defaultValue&&{literal:Y.defaultValue},deprecationReason:sI(Y),astNode:Y}}return X}function B(M){let ee=Object.create(null);for(let X of M){let Y=X.fields??[];for(let $ of Y){let re=E($.type);ee[$.name.value]={type:re,description:$.description?.value,default:$.defaultValue&&{literal:$.defaultValue},deprecationReason:sI($),astNode:$}}}return ee}function z(M){let ee=Object.create(null);for(let X of M){let Y=X.values??[];for(let $ of Y)ee[$.name.value]={description:$.description?.value,deprecationReason:sI($),astNode:$}}return ee}function Q(M){return M.flatMap(ee=>ee.interfaces?.map(_)??[])}function Z(M){return M.flatMap(ee=>ee.types?.map(_)??[])}function U(M){let ee=M.name.value;switch(M.kind){case W.OBJECT_TYPE_DEFINITION:{let X=r.get(ee)??[],Y=[M,...X];return new vc({name:ee,description:M.description?.value,interfaces:()=>Q(Y),fields:()=>N(Y),astNode:M,extensionASTNodes:X})}case W.INTERFACE_TYPE_DEFINITION:{let X=s.get(ee)??[],Y=[M,...X];return new Qp({name:ee,description:M.description?.value,interfaces:()=>Q(Y),fields:()=>N(Y),astNode:M,extensionASTNodes:X})}case W.ENUM_TYPE_DEFINITION:{let X=l.get(ee)??[],Y=[M,...X];return new th({name:ee,description:M.description?.value,values:()=>z(Y),astNode:M,extensionASTNodes:X})}case W.UNION_TYPE_DEFINITION:{let X=a.get(ee)??[],Y=[M,...X];return new Lb({name:ee,description:M.description?.value,types:()=>Z(Y),astNode:M,extensionASTNodes:X})}case W.SCALAR_TYPE_DEFINITION:{let X=o.get(ee)??[],Y=$Ce(M);for(let $ of X)Y=$Ce($)??Y;return new dd({name:ee,description:M.description?.value,specifiedByURL:Y,astNode:M,extensionASTNodes:X})}case W.INPUT_OBJECT_TYPE_DEFINITION:{let X=c.get(ee)??[],Y=[M,...X];return new Gp({name:ee,description:M.description?.value,fields:()=>B(Y),astNode:M,extensionASTNodes:X,isOneOf:Qqt(M)})}}}}):i}function sI(i){return gA(mS,i)?.reason}function $Ce(i){return gA(QR,i)?.url}function Qqt(i){return!!gA(GR,i)}var jqt,i_e=D(()=>{NR();Za();so();So();Xc();ty();cA();Gk();E7();tI();ZCe();jqt=new Map([...Nb,...Mb].map(i=>[i.name,i]))});function mF(i,e){e?.assumeValid!==!0&&e?.assumeValidSDL!==!0&&EZe(i);let n=t_e({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},i,e);if(n.astNode==null)for(let r of n.types)switch(r.name){case"Query":n.query=r;break;case"Mutation":n.mutation=r;break;case"Subscription":n.subscription=r;break}let o=[...n.directives,...qh.filter(r=>n.directives.every(s=>s.name!==r.name))];return new Yp({...n,directives:o})}function n_e(i,e){let t=Zc(i,{noLocation:e?.noLocation,experimentalFragmentArguments:e?.experimentalFragmentArguments});return mF(t,{assumeValidSDL:e?.assumeValidSDL,assumeValid:e?.assumeValid})}var g$e=D(()=>{Zk();Xc();Gk();E7();i_e()});function o_e(i){return new Yp(wZ(i.toConfig(),()=>({[_s.OBJECT]:e=>({...e,interfaces:()=>B7(e.interfaces()),fields:()=>gF(e.fields())}),[_s.FIELD]:e=>({...e,args:gF(e.args)}),[_s.INTERFACE]:e=>({...e,interfaces:()=>B7(e.interfaces()),fields:()=>gF(e.fields())}),[_s.UNION]:e=>({...e,types:()=>B7(e.types())}),[_s.ENUM]:e=>({...e,values:()=>gF(e.values())}),[_s.INPUT_OBJECT]:e=>({...e,fields:()=>gF(e.fields())}),[_s.DIRECTIVE]:e=>({...e,locations:b$e(e.locations,t=>t),args:gF(e.args)}),[_s.SCHEMA]:e=>({...e,types:B7(e.types),directives:B7(e.directives)})})))}function gF(i){let e=Object.create(null);for(let t of Object.keys(i).sort(Ww))e[t]=i[t];return e}function B7(i){return b$e(i,e=>e.name)}function b$e(i,e){return i.slice().sort((t,n)=>{let o=e(t),r=e(n);return Ww(o,r)})}var A$e=D(()=>{l9();Gk();ZCe()});function bF(i){return v$e(i,e=>!gS(e),Gqt)}function s_e(i){return v$e(i,gS,Rb)}function Gqt(i){return!Gw(i)&&!Rb(i)}function v$e(i,e,t){let n=i.getDirectives().filter(e),o=Object.values(i.getTypeMap()).filter(t);return[qqt(i),...n.map(r=>CZ(r)),...o.map(r=>xZ(r))].filter(Boolean).join(` -`)+` -`}function _ni(i){if(!(i.description==null&&Sni(i))){var e=[],t=i.getQueryType();t&&e.push(" query: ".concat(t.name));var n=i.getMutationType();n&&e.push(" mutation: ".concat(n.name));var r=i.getSubscriptionType();return r&&e.push(" subscription: ".concat(r.name)),xb({},i)+`schema { -`.concat(e.join(` -`),` -}`)}}function Sni(i){var e=i.getQueryType();if(e&&e.name!=="Query")return!1;var t=i.getMutationType();if(t&&t.name!=="Mutation")return!1;var n=i.getSubscriptionType();return!(n&&n.name!=="Subscription")}function $et(i,e){if((0,SR.isScalarType)(i))return Eni(i,e);if((0,SR.isObjectType)(i))return Dni(i,e);if((0,SR.isInterfaceType)(i))return Tni(i,e);if((0,SR.isUnionType)(i))return kni(i,e);if((0,SR.isEnumType)(i))return Ini(i,e);if((0,SR.isInputObjectType)(i))return Lni(i,e);(0,Jet.default)(0,"Unexpected type: "+(0,Ani.default)(i))}function Eni(i,e){return xb(e,i)+"scalar ".concat(i.name)+Mni(i)}function ett(i){var e=i.getInterfaces();return e.length?" implements "+e.map(function(t){return t.name}).join(" & "):""}function Dni(i,e){return xb(e,i)+"type ".concat(i.name)+ett(i)+ttt(e,i)}function Tni(i,e){return xb(e,i)+"interface ".concat(i.name)+ett(i)+ttt(e,i)}function kni(i,e){var t=i.getTypes(),n=t.length?" = "+t.join(" | "):"";return xb(e,i)+"union "+i.name+n}function Ini(i,e){var t=i.getValues().map(function(n,r){return xb(e,n," ",!r)+" "+n.name+PCe(n.deprecationReason)});return xb(e,i)+"enum ".concat(i.name)+OCe(t)}function Lni(i,e){var t=(0,ICe.default)(i.getFields()).map(function(n,r){return xb(e,n," ",!r)+" "+kCe(n)});return xb(e,i)+"input ".concat(i.name)+OCe(t)}function ttt(i,e){var t=(0,ICe.default)(e.getFields()).map(function(n,r){return xb(i,n," ",!r)+" "+n.name+itt(i,n.args," ")+": "+String(n.type)+PCe(n.deprecationReason)});return OCe(t)}function OCe(i){return i.length!==0?` { +`)}function qqt(i){let e=i.getQueryType(),t=i.getMutationType(),n=i.getSubscriptionType();if(!(!e&&!t&&!n)&&(i.description!=null||!Yqt(i)))return Fb(i)+`schema { +`+(e?` query: ${e} +`:"")+(t?` mutation: ${t} +`:"")+(n?` subscription: ${n} +`:"")+"}"}function Yqt(i){return i.getQueryType()==i.getType("Query")&&i.getMutationType()==i.getType("Mutation")&&i.getSubscriptionType()==i.getType("Subscription")}function xZ(i){if(yc(i))return Kqt(i);if(en(i))return Jqt(i);if(cn(i))return Xqt(i);if(ys(i))return Zqt(i);if(Oo(i))return $qt(i);if(Bi(i))return eYt(i);Di(!1,"Unexpected type: "+Xe(i))}function Kqt(i){return Fb(i)+`scalar ${i}`+tYt(i)}function y$e(i){let e=i.getInterfaces();return e.length?" implements "+e.map(t=>t.name).join(" & "):""}function Jqt(i){return Fb(i)+`type ${i}`+y$e(i)+w$e(i)}function Xqt(i){return Fb(i)+`interface ${i}`+y$e(i)+w$e(i)}function Zqt(i){let e=i.getTypes(),t=e.length?" = "+e.join(" | "):"";return Fb(i)+`union ${i.name}`+t}function $qt(i){let e=i.getValues().map((t,n)=>Fb(t," ",!n)+" "+t.name+_Z(t.deprecationReason));return Fb(i)+`enum ${i}`+a_e(e)}function eYt(i){let e=Object.values(i.getFields()).map((t,n)=>Fb(t," ",!n)+" "+r_e(t));return Fb(i)+`input ${i}`+(i.isOneOf?" @oneOf":"")+a_e(e)}function w$e(i){let e=Object.values(i.getFields()).map((t,n)=>Fb(t," ",!n)+" "+t.name+x$e(t.args," ")+": "+String(t.type)+_Z(t.deprecationReason));return a_e(e)}function a_e(i){return i.length!==0?` { `+i.join(` `)+` -}`:""}function itt(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return e.length===0?"":e.every(function(n){return!n.description})?"("+e.map(kCe).join(", ")+")":`( -`+e.map(function(n,r){return xb(i,n," "+t,!r)+" "+t+kCe(n)}).join(` +}`:""}function x$e(i,e=""){return i.length===0?"":i.every(t=>t.description==null)?"("+i.map(r_e).join(", ")+")":`( +`+i.map((t,n)=>Fb(t," "+e,!n)+" "+e+r_e(t)).join(` `)+` -`+t+")"}function kCe(i){var e=(0,RCe.astFromValue)(i.defaultValue,i.type),t=i.name+": "+String(i.type);return e&&(t+=" = ".concat((0,LCe.print)(e))),t+PCe(i.deprecationReason)}function Nni(i,e){return xb(e,i)+"directive @"+i.name+itt(e,i.args)+(i.isRepeatable?" repeatable":"")+" on "+i.locations.join(" | ")}function PCe(i){if(i==null)return"";var e=(0,RCe.astFromValue)(i,NCe.GraphQLString);return e&&i!==MCe.DEFAULT_DEPRECATION_REASON?" @deprecated(reason: "+(0,LCe.print)(e)+")":" @deprecated"}function Mni(i){if(i.specifiedByUrl==null)return"";var e=i.specifiedByUrl,t=(0,RCe.astFromValue)(e,NCe.GraphQLString);return t||(0,Jet.default)(0,"Unexpected null value returned from `astFromValue` for specifiedByUrl")," @specifiedBy(url: "+(0,LCe.print)(t)+")"}function xb(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r=e.description;if(r==null)return"";if(i?.commentDescriptions===!0)return Rni(r,t,n);var o=r.length>70,s=(0,yni.printBlockString)(r,"",o),a=t&&!n?` -`+t:t;return a+s.replace(/\n/g,` -`+t)+` -`}function Rni(i,e,t){var n=e&&!t?` -`:"",r=i.split(` -`).map(function(o){return e+(o!==""?"# "+o:"#")}).join(` -`);return n+r+` -`}});var rtt=Ue(BCe=>{"use strict";Object.defineProperty(BCe,"__esModule",{value:!0});BCe.concatAST=Fni;function Fni(i){for(var e=[],t=0;t{"use strict";Object.defineProperty(zCe,"__esModule",{value:!0});zCe.separateOperations=Pni;var iX=Ds(),Oni=O_();function Pni(i){for(var e=[],t=Object.create(null),n=0,r=i.definitions;n{"use strict";Object.defineProperty(HCe,"__esModule",{value:!0});HCe.stripIgnoredCharacters=Bni;var ltt=YK(),VCe=$M(),ctt=XK(),utt=tR();function Bni(i){for(var e=(0,ltt.isSource)(i)?i:new ltt.Source(i),t=e.body,n=new ctt.Lexer(e),r="",o=!1;n.advance().kind!==VCe.TokenKind.EOF;){var s=n.token,a=s.kind,l=!(0,ctt.isPunctuatorTokenKind)(s.kind);o&&(l||s.kind===VCe.TokenKind.SPREAD)&&(r+=" ");var c=t.slice(s.start,s.end);a===VCe.TokenKind.BLOCK_STRING?r+=zni(c):r+=c,o=l}return r}function zni(i){var e=i.slice(3,-3),t=(0,utt.dedentBlockStringValue)(e);(0,utt.getBlockStringIndentation)(t)>0&&(t=` -`+t);var n=t[t.length-1],r=n==='"'&&t.slice(-4)!=='\\"""';return(r||n==="\\")&&(t+=` -`),'"""'+t+'"""'}});var wtt=Ue(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});Z_.findBreakingChanges=qni;Z_.findDangerousChanges=Yni;Z_.DangerousChangeType=Z_.BreakingChangeType=void 0;var ER=a9(Vm()),htt=a9(P_()),Vni=a9(Oo()),Att=a9(Qd()),Hni=a9(x6()),Wni=Hm(),Uni=O_(),jni=FA(),zo=po(),Qni=M6();function a9(i){return i&&i.__esModule?i:{default:i}}function ftt(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function ptt(i){for(var e=1;e{"use strict";Object.defineProperty(WCe,"__esModule",{value:!0});WCe.findDeprecatedUsages=nri;var tri=bR(),iri=bCe();function nri(i,e){return(0,tri.validate)(i,e,[iri.NoDeprecatedCustomRule])}});var Dtt=Ue($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});Object.defineProperty($r,"getIntrospectionQuery",{enumerable:!0,get:function(){return rri.getIntrospectionQuery}});Object.defineProperty($r,"getOperationAST",{enumerable:!0,get:function(){return ori.getOperationAST}});Object.defineProperty($r,"getOperationRootType",{enumerable:!0,get:function(){return sri.getOperationRootType}});Object.defineProperty($r,"introspectionFromSchema",{enumerable:!0,get:function(){return ari.introspectionFromSchema}});Object.defineProperty($r,"buildClientSchema",{enumerable:!0,get:function(){return lri.buildClientSchema}});Object.defineProperty($r,"buildASTSchema",{enumerable:!0,get:function(){return Ctt.buildASTSchema}});Object.defineProperty($r,"buildSchema",{enumerable:!0,get:function(){return Ctt.buildSchema}});Object.defineProperty($r,"extendSchema",{enumerable:!0,get:function(){return _tt.extendSchema}});Object.defineProperty($r,"getDescription",{enumerable:!0,get:function(){return _tt.getDescription}});Object.defineProperty($r,"lexicographicSortSchema",{enumerable:!0,get:function(){return cri.lexicographicSortSchema}});Object.defineProperty($r,"printSchema",{enumerable:!0,get:function(){return UCe.printSchema}});Object.defineProperty($r,"printType",{enumerable:!0,get:function(){return UCe.printType}});Object.defineProperty($r,"printIntrospectionSchema",{enumerable:!0,get:function(){return UCe.printIntrospectionSchema}});Object.defineProperty($r,"typeFromAST",{enumerable:!0,get:function(){return uri.typeFromAST}});Object.defineProperty($r,"valueFromAST",{enumerable:!0,get:function(){return dri.valueFromAST}});Object.defineProperty($r,"valueFromASTUntyped",{enumerable:!0,get:function(){return hri.valueFromASTUntyped}});Object.defineProperty($r,"astFromValue",{enumerable:!0,get:function(){return fri.astFromValue}});Object.defineProperty($r,"TypeInfo",{enumerable:!0,get:function(){return Stt.TypeInfo}});Object.defineProperty($r,"visitWithTypeInfo",{enumerable:!0,get:function(){return Stt.visitWithTypeInfo}});Object.defineProperty($r,"coerceInputValue",{enumerable:!0,get:function(){return pri.coerceInputValue}});Object.defineProperty($r,"concatAST",{enumerable:!0,get:function(){return mri.concatAST}});Object.defineProperty($r,"separateOperations",{enumerable:!0,get:function(){return gri.separateOperations}});Object.defineProperty($r,"stripIgnoredCharacters",{enumerable:!0,get:function(){return bri.stripIgnoredCharacters}});Object.defineProperty($r,"isEqualType",{enumerable:!0,get:function(){return jCe.isEqualType}});Object.defineProperty($r,"isTypeSubTypeOf",{enumerable:!0,get:function(){return jCe.isTypeSubTypeOf}});Object.defineProperty($r,"doTypesOverlap",{enumerable:!0,get:function(){return jCe.doTypesOverlap}});Object.defineProperty($r,"assertValidName",{enumerable:!0,get:function(){return Ett.assertValidName}});Object.defineProperty($r,"isValidNameError",{enumerable:!0,get:function(){return Ett.isValidNameError}});Object.defineProperty($r,"BreakingChangeType",{enumerable:!0,get:function(){return nX.BreakingChangeType}});Object.defineProperty($r,"DangerousChangeType",{enumerable:!0,get:function(){return nX.DangerousChangeType}});Object.defineProperty($r,"findBreakingChanges",{enumerable:!0,get:function(){return nX.findBreakingChanges}});Object.defineProperty($r,"findDangerousChanges",{enumerable:!0,get:function(){return nX.findDangerousChanges}});Object.defineProperty($r,"findDeprecatedUsages",{enumerable:!0,get:function(){return vri.findDeprecatedUsages}});var rri=wCe(),ori=Tet(),sri=BJ(),ari=Iet(),lri=Net(),Ctt=qet(),_tt=SCe(),cri=Ket(),UCe=ntt(),uri=OA(),dri=j6(),hri=W1e(),fri=M6(),Stt=_J(),pri=nCe(),mri=rtt(),gri=att(),bri=dtt(),jCe=D6(),Ett=D1e(),nX=wtt(),vri=xtt()});var na=Ue(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});Object.defineProperty(_e,"version",{enumerable:!0,get:function(){return Ttt.version}});Object.defineProperty(_e,"versionInfo",{enumerable:!0,get:function(){return Ttt.versionInfo}});Object.defineProperty(_e,"graphql",{enumerable:!0,get:function(){return ktt.graphql}});Object.defineProperty(_e,"graphqlSync",{enumerable:!0,get:function(){return ktt.graphqlSync}});Object.defineProperty(_e,"GraphQLSchema",{enumerable:!0,get:function(){return ti.GraphQLSchema}});Object.defineProperty(_e,"GraphQLDirective",{enumerable:!0,get:function(){return ti.GraphQLDirective}});Object.defineProperty(_e,"GraphQLScalarType",{enumerable:!0,get:function(){return ti.GraphQLScalarType}});Object.defineProperty(_e,"GraphQLObjectType",{enumerable:!0,get:function(){return ti.GraphQLObjectType}});Object.defineProperty(_e,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ti.GraphQLInterfaceType}});Object.defineProperty(_e,"GraphQLUnionType",{enumerable:!0,get:function(){return ti.GraphQLUnionType}});Object.defineProperty(_e,"GraphQLEnumType",{enumerable:!0,get:function(){return ti.GraphQLEnumType}});Object.defineProperty(_e,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ti.GraphQLInputObjectType}});Object.defineProperty(_e,"GraphQLList",{enumerable:!0,get:function(){return ti.GraphQLList}});Object.defineProperty(_e,"GraphQLNonNull",{enumerable:!0,get:function(){return ti.GraphQLNonNull}});Object.defineProperty(_e,"specifiedScalarTypes",{enumerable:!0,get:function(){return ti.specifiedScalarTypes}});Object.defineProperty(_e,"GraphQLInt",{enumerable:!0,get:function(){return ti.GraphQLInt}});Object.defineProperty(_e,"GraphQLFloat",{enumerable:!0,get:function(){return ti.GraphQLFloat}});Object.defineProperty(_e,"GraphQLString",{enumerable:!0,get:function(){return ti.GraphQLString}});Object.defineProperty(_e,"GraphQLBoolean",{enumerable:!0,get:function(){return ti.GraphQLBoolean}});Object.defineProperty(_e,"GraphQLID",{enumerable:!0,get:function(){return ti.GraphQLID}});Object.defineProperty(_e,"specifiedDirectives",{enumerable:!0,get:function(){return ti.specifiedDirectives}});Object.defineProperty(_e,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ti.GraphQLIncludeDirective}});Object.defineProperty(_e,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ti.GraphQLSkipDirective}});Object.defineProperty(_e,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ti.GraphQLDeprecatedDirective}});Object.defineProperty(_e,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ti.GraphQLSpecifiedByDirective}});Object.defineProperty(_e,"TypeKind",{enumerable:!0,get:function(){return ti.TypeKind}});Object.defineProperty(_e,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ti.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(_e,"introspectionTypes",{enumerable:!0,get:function(){return ti.introspectionTypes}});Object.defineProperty(_e,"__Schema",{enumerable:!0,get:function(){return ti.__Schema}});Object.defineProperty(_e,"__Directive",{enumerable:!0,get:function(){return ti.__Directive}});Object.defineProperty(_e,"__DirectiveLocation",{enumerable:!0,get:function(){return ti.__DirectiveLocation}});Object.defineProperty(_e,"__Type",{enumerable:!0,get:function(){return ti.__Type}});Object.defineProperty(_e,"__Field",{enumerable:!0,get:function(){return ti.__Field}});Object.defineProperty(_e,"__InputValue",{enumerable:!0,get:function(){return ti.__InputValue}});Object.defineProperty(_e,"__EnumValue",{enumerable:!0,get:function(){return ti.__EnumValue}});Object.defineProperty(_e,"__TypeKind",{enumerable:!0,get:function(){return ti.__TypeKind}});Object.defineProperty(_e,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ti.SchemaMetaFieldDef}});Object.defineProperty(_e,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ti.TypeMetaFieldDef}});Object.defineProperty(_e,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ti.TypeNameMetaFieldDef}});Object.defineProperty(_e,"isSchema",{enumerable:!0,get:function(){return ti.isSchema}});Object.defineProperty(_e,"isDirective",{enumerable:!0,get:function(){return ti.isDirective}});Object.defineProperty(_e,"isType",{enumerable:!0,get:function(){return ti.isType}});Object.defineProperty(_e,"isScalarType",{enumerable:!0,get:function(){return ti.isScalarType}});Object.defineProperty(_e,"isObjectType",{enumerable:!0,get:function(){return ti.isObjectType}});Object.defineProperty(_e,"isInterfaceType",{enumerable:!0,get:function(){return ti.isInterfaceType}});Object.defineProperty(_e,"isUnionType",{enumerable:!0,get:function(){return ti.isUnionType}});Object.defineProperty(_e,"isEnumType",{enumerable:!0,get:function(){return ti.isEnumType}});Object.defineProperty(_e,"isInputObjectType",{enumerable:!0,get:function(){return ti.isInputObjectType}});Object.defineProperty(_e,"isListType",{enumerable:!0,get:function(){return ti.isListType}});Object.defineProperty(_e,"isNonNullType",{enumerable:!0,get:function(){return ti.isNonNullType}});Object.defineProperty(_e,"isInputType",{enumerable:!0,get:function(){return ti.isInputType}});Object.defineProperty(_e,"isOutputType",{enumerable:!0,get:function(){return ti.isOutputType}});Object.defineProperty(_e,"isLeafType",{enumerable:!0,get:function(){return ti.isLeafType}});Object.defineProperty(_e,"isCompositeType",{enumerable:!0,get:function(){return ti.isCompositeType}});Object.defineProperty(_e,"isAbstractType",{enumerable:!0,get:function(){return ti.isAbstractType}});Object.defineProperty(_e,"isWrappingType",{enumerable:!0,get:function(){return ti.isWrappingType}});Object.defineProperty(_e,"isNullableType",{enumerable:!0,get:function(){return ti.isNullableType}});Object.defineProperty(_e,"isNamedType",{enumerable:!0,get:function(){return ti.isNamedType}});Object.defineProperty(_e,"isRequiredArgument",{enumerable:!0,get:function(){return ti.isRequiredArgument}});Object.defineProperty(_e,"isRequiredInputField",{enumerable:!0,get:function(){return ti.isRequiredInputField}});Object.defineProperty(_e,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ti.isSpecifiedScalarType}});Object.defineProperty(_e,"isIntrospectionType",{enumerable:!0,get:function(){return ti.isIntrospectionType}});Object.defineProperty(_e,"isSpecifiedDirective",{enumerable:!0,get:function(){return ti.isSpecifiedDirective}});Object.defineProperty(_e,"assertSchema",{enumerable:!0,get:function(){return ti.assertSchema}});Object.defineProperty(_e,"assertDirective",{enumerable:!0,get:function(){return ti.assertDirective}});Object.defineProperty(_e,"assertType",{enumerable:!0,get:function(){return ti.assertType}});Object.defineProperty(_e,"assertScalarType",{enumerable:!0,get:function(){return ti.assertScalarType}});Object.defineProperty(_e,"assertObjectType",{enumerable:!0,get:function(){return ti.assertObjectType}});Object.defineProperty(_e,"assertInterfaceType",{enumerable:!0,get:function(){return ti.assertInterfaceType}});Object.defineProperty(_e,"assertUnionType",{enumerable:!0,get:function(){return ti.assertUnionType}});Object.defineProperty(_e,"assertEnumType",{enumerable:!0,get:function(){return ti.assertEnumType}});Object.defineProperty(_e,"assertInputObjectType",{enumerable:!0,get:function(){return ti.assertInputObjectType}});Object.defineProperty(_e,"assertListType",{enumerable:!0,get:function(){return ti.assertListType}});Object.defineProperty(_e,"assertNonNullType",{enumerable:!0,get:function(){return ti.assertNonNullType}});Object.defineProperty(_e,"assertInputType",{enumerable:!0,get:function(){return ti.assertInputType}});Object.defineProperty(_e,"assertOutputType",{enumerable:!0,get:function(){return ti.assertOutputType}});Object.defineProperty(_e,"assertLeafType",{enumerable:!0,get:function(){return ti.assertLeafType}});Object.defineProperty(_e,"assertCompositeType",{enumerable:!0,get:function(){return ti.assertCompositeType}});Object.defineProperty(_e,"assertAbstractType",{enumerable:!0,get:function(){return ti.assertAbstractType}});Object.defineProperty(_e,"assertWrappingType",{enumerable:!0,get:function(){return ti.assertWrappingType}});Object.defineProperty(_e,"assertNullableType",{enumerable:!0,get:function(){return ti.assertNullableType}});Object.defineProperty(_e,"assertNamedType",{enumerable:!0,get:function(){return ti.assertNamedType}});Object.defineProperty(_e,"getNullableType",{enumerable:!0,get:function(){return ti.getNullableType}});Object.defineProperty(_e,"getNamedType",{enumerable:!0,get:function(){return ti.getNamedType}});Object.defineProperty(_e,"validateSchema",{enumerable:!0,get:function(){return ti.validateSchema}});Object.defineProperty(_e,"assertValidSchema",{enumerable:!0,get:function(){return ti.assertValidSchema}});Object.defineProperty(_e,"Token",{enumerable:!0,get:function(){return Qs.Token}});Object.defineProperty(_e,"Source",{enumerable:!0,get:function(){return Qs.Source}});Object.defineProperty(_e,"Location",{enumerable:!0,get:function(){return Qs.Location}});Object.defineProperty(_e,"getLocation",{enumerable:!0,get:function(){return Qs.getLocation}});Object.defineProperty(_e,"printLocation",{enumerable:!0,get:function(){return Qs.printLocation}});Object.defineProperty(_e,"printSourceLocation",{enumerable:!0,get:function(){return Qs.printSourceLocation}});Object.defineProperty(_e,"Lexer",{enumerable:!0,get:function(){return Qs.Lexer}});Object.defineProperty(_e,"TokenKind",{enumerable:!0,get:function(){return Qs.TokenKind}});Object.defineProperty(_e,"parse",{enumerable:!0,get:function(){return Qs.parse}});Object.defineProperty(_e,"parseValue",{enumerable:!0,get:function(){return Qs.parseValue}});Object.defineProperty(_e,"parseType",{enumerable:!0,get:function(){return Qs.parseType}});Object.defineProperty(_e,"print",{enumerable:!0,get:function(){return Qs.print}});Object.defineProperty(_e,"visit",{enumerable:!0,get:function(){return Qs.visit}});Object.defineProperty(_e,"visitInParallel",{enumerable:!0,get:function(){return Qs.visitInParallel}});Object.defineProperty(_e,"getVisitFn",{enumerable:!0,get:function(){return Qs.getVisitFn}});Object.defineProperty(_e,"BREAK",{enumerable:!0,get:function(){return Qs.BREAK}});Object.defineProperty(_e,"Kind",{enumerable:!0,get:function(){return Qs.Kind}});Object.defineProperty(_e,"DirectiveLocation",{enumerable:!0,get:function(){return Qs.DirectiveLocation}});Object.defineProperty(_e,"isDefinitionNode",{enumerable:!0,get:function(){return Qs.isDefinitionNode}});Object.defineProperty(_e,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Qs.isExecutableDefinitionNode}});Object.defineProperty(_e,"isSelectionNode",{enumerable:!0,get:function(){return Qs.isSelectionNode}});Object.defineProperty(_e,"isValueNode",{enumerable:!0,get:function(){return Qs.isValueNode}});Object.defineProperty(_e,"isTypeNode",{enumerable:!0,get:function(){return Qs.isTypeNode}});Object.defineProperty(_e,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Qs.isTypeSystemDefinitionNode}});Object.defineProperty(_e,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Qs.isTypeDefinitionNode}});Object.defineProperty(_e,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Qs.isTypeSystemExtensionNode}});Object.defineProperty(_e,"isTypeExtensionNode",{enumerable:!0,get:function(){return Qs.isTypeExtensionNode}});Object.defineProperty(_e,"execute",{enumerable:!0,get:function(){return DR.execute}});Object.defineProperty(_e,"executeSync",{enumerable:!0,get:function(){return DR.executeSync}});Object.defineProperty(_e,"defaultFieldResolver",{enumerable:!0,get:function(){return DR.defaultFieldResolver}});Object.defineProperty(_e,"defaultTypeResolver",{enumerable:!0,get:function(){return DR.defaultTypeResolver}});Object.defineProperty(_e,"responsePathAsArray",{enumerable:!0,get:function(){return DR.responsePathAsArray}});Object.defineProperty(_e,"getDirectiveValues",{enumerable:!0,get:function(){return DR.getDirectiveValues}});Object.defineProperty(_e,"subscribe",{enumerable:!0,get:function(){return Itt.subscribe}});Object.defineProperty(_e,"createSourceEventStream",{enumerable:!0,get:function(){return Itt.createSourceEventStream}});Object.defineProperty(_e,"validate",{enumerable:!0,get:function(){return yr.validate}});Object.defineProperty(_e,"ValidationContext",{enumerable:!0,get:function(){return yr.ValidationContext}});Object.defineProperty(_e,"specifiedRules",{enumerable:!0,get:function(){return yr.specifiedRules}});Object.defineProperty(_e,"recommendedRules",{enumerable:!0,get:function(){return yr.recommendedRules}});Object.defineProperty(_e,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return yr.ExecutableDefinitionsRule}});Object.defineProperty(_e,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return yr.FieldsOnCorrectTypeRule}});Object.defineProperty(_e,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return yr.FragmentsOnCompositeTypesRule}});Object.defineProperty(_e,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return yr.KnownArgumentNamesRule}});Object.defineProperty(_e,"KnownDirectivesRule",{enumerable:!0,get:function(){return yr.KnownDirectivesRule}});Object.defineProperty(_e,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return yr.KnownFragmentNamesRule}});Object.defineProperty(_e,"KnownTypeNamesRule",{enumerable:!0,get:function(){return yr.KnownTypeNamesRule}});Object.defineProperty(_e,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return yr.LoneAnonymousOperationRule}});Object.defineProperty(_e,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return yr.NoFragmentCyclesRule}});Object.defineProperty(_e,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return yr.NoUndefinedVariablesRule}});Object.defineProperty(_e,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return yr.NoUnusedFragmentsRule}});Object.defineProperty(_e,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return yr.NoUnusedVariablesRule}});Object.defineProperty(_e,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return yr.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(_e,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return yr.PossibleFragmentSpreadsRule}});Object.defineProperty(_e,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return yr.ProvidedRequiredArgumentsRule}});Object.defineProperty(_e,"ScalarLeafsRule",{enumerable:!0,get:function(){return yr.ScalarLeafsRule}});Object.defineProperty(_e,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return yr.SingleFieldSubscriptionsRule}});Object.defineProperty(_e,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return yr.UniqueArgumentNamesRule}});Object.defineProperty(_e,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return yr.UniqueDirectivesPerLocationRule}});Object.defineProperty(_e,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return yr.UniqueFragmentNamesRule}});Object.defineProperty(_e,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return yr.UniqueInputFieldNamesRule}});Object.defineProperty(_e,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return yr.UniqueOperationNamesRule}});Object.defineProperty(_e,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return yr.UniqueVariableNamesRule}});Object.defineProperty(_e,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return yr.ValuesOfCorrectTypeRule}});Object.defineProperty(_e,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return yr.VariablesAreInputTypesRule}});Object.defineProperty(_e,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return yr.VariablesInAllowedPositionRule}});Object.defineProperty(_e,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return yr.MaxIntrospectionDepthRule}});Object.defineProperty(_e,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return yr.LoneSchemaDefinitionRule}});Object.defineProperty(_e,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return yr.UniqueOperationTypesRule}});Object.defineProperty(_e,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return yr.UniqueTypeNamesRule}});Object.defineProperty(_e,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return yr.UniqueEnumValueNamesRule}});Object.defineProperty(_e,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return yr.UniqueFieldDefinitionNamesRule}});Object.defineProperty(_e,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return yr.UniqueDirectiveNamesRule}});Object.defineProperty(_e,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return yr.PossibleTypeExtensionsRule}});Object.defineProperty(_e,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return yr.NoDeprecatedCustomRule}});Object.defineProperty(_e,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return yr.NoSchemaIntrospectionCustomRule}});Object.defineProperty(_e,"GraphQLError",{enumerable:!0,get:function(){return l9.GraphQLError}});Object.defineProperty(_e,"syntaxError",{enumerable:!0,get:function(){return l9.syntaxError}});Object.defineProperty(_e,"locatedError",{enumerable:!0,get:function(){return l9.locatedError}});Object.defineProperty(_e,"printError",{enumerable:!0,get:function(){return l9.printError}});Object.defineProperty(_e,"formatError",{enumerable:!0,get:function(){return l9.formatError}});Object.defineProperty(_e,"getIntrospectionQuery",{enumerable:!0,get:function(){return wo.getIntrospectionQuery}});Object.defineProperty(_e,"getOperationAST",{enumerable:!0,get:function(){return wo.getOperationAST}});Object.defineProperty(_e,"getOperationRootType",{enumerable:!0,get:function(){return wo.getOperationRootType}});Object.defineProperty(_e,"introspectionFromSchema",{enumerable:!0,get:function(){return wo.introspectionFromSchema}});Object.defineProperty(_e,"buildClientSchema",{enumerable:!0,get:function(){return wo.buildClientSchema}});Object.defineProperty(_e,"buildASTSchema",{enumerable:!0,get:function(){return wo.buildASTSchema}});Object.defineProperty(_e,"buildSchema",{enumerable:!0,get:function(){return wo.buildSchema}});Object.defineProperty(_e,"getDescription",{enumerable:!0,get:function(){return wo.getDescription}});Object.defineProperty(_e,"extendSchema",{enumerable:!0,get:function(){return wo.extendSchema}});Object.defineProperty(_e,"lexicographicSortSchema",{enumerable:!0,get:function(){return wo.lexicographicSortSchema}});Object.defineProperty(_e,"printSchema",{enumerable:!0,get:function(){return wo.printSchema}});Object.defineProperty(_e,"printType",{enumerable:!0,get:function(){return wo.printType}});Object.defineProperty(_e,"printIntrospectionSchema",{enumerable:!0,get:function(){return wo.printIntrospectionSchema}});Object.defineProperty(_e,"typeFromAST",{enumerable:!0,get:function(){return wo.typeFromAST}});Object.defineProperty(_e,"valueFromAST",{enumerable:!0,get:function(){return wo.valueFromAST}});Object.defineProperty(_e,"valueFromASTUntyped",{enumerable:!0,get:function(){return wo.valueFromASTUntyped}});Object.defineProperty(_e,"astFromValue",{enumerable:!0,get:function(){return wo.astFromValue}});Object.defineProperty(_e,"TypeInfo",{enumerable:!0,get:function(){return wo.TypeInfo}});Object.defineProperty(_e,"visitWithTypeInfo",{enumerable:!0,get:function(){return wo.visitWithTypeInfo}});Object.defineProperty(_e,"coerceInputValue",{enumerable:!0,get:function(){return wo.coerceInputValue}});Object.defineProperty(_e,"concatAST",{enumerable:!0,get:function(){return wo.concatAST}});Object.defineProperty(_e,"separateOperations",{enumerable:!0,get:function(){return wo.separateOperations}});Object.defineProperty(_e,"stripIgnoredCharacters",{enumerable:!0,get:function(){return wo.stripIgnoredCharacters}});Object.defineProperty(_e,"isEqualType",{enumerable:!0,get:function(){return wo.isEqualType}});Object.defineProperty(_e,"isTypeSubTypeOf",{enumerable:!0,get:function(){return wo.isTypeSubTypeOf}});Object.defineProperty(_e,"doTypesOverlap",{enumerable:!0,get:function(){return wo.doTypesOverlap}});Object.defineProperty(_e,"assertValidName",{enumerable:!0,get:function(){return wo.assertValidName}});Object.defineProperty(_e,"isValidNameError",{enumerable:!0,get:function(){return wo.isValidNameError}});Object.defineProperty(_e,"BreakingChangeType",{enumerable:!0,get:function(){return wo.BreakingChangeType}});Object.defineProperty(_e,"DangerousChangeType",{enumerable:!0,get:function(){return wo.DangerousChangeType}});Object.defineProperty(_e,"findBreakingChanges",{enumerable:!0,get:function(){return wo.findBreakingChanges}});Object.defineProperty(_e,"findDangerousChanges",{enumerable:!0,get:function(){return wo.findDangerousChanges}});Object.defineProperty(_e,"findDeprecatedUsages",{enumerable:!0,get:function(){return wo.findDeprecatedUsages}});var Ttt=MJe(),ktt=Z$e(),ti=eet(),Qs=net(),DR=ret(),Itt=Aet(),yr=xet(),l9=Eet(),wo=Dtt()});var mot={};Ih(mot,{default:()=>Fit,languages:()=>pot,options:()=>hot,printers:()=>fot});function Hri(i){return Array.isArray(i)&&i.length>0}function Ji(i){let e=new Set(i);return t=>e.has(t?.type)}function Uri(i){return this[i<0?this.length+i:i]}function Eb(i,e,t){if(!i.has(e)){let n=t(e);i.set(e,n)}return i.get(e)}function Qri(i){let e=[];return i.this&&e.push(i.this),e.push(...i.params),i.rest&&e.push(i.rest),e}function zf(i){return Eb(Gri,i,Qri)}function qri(i,e){let{node:t}=i,n=0,r=()=>e(i,n++);t.this&&i.call(r,"this"),i.each(r,"params"),t.rest&&i.call(r,"rest")}function Yri(i){if(i.rest)return!0;let e=zf(i);return Ur(0,e,-1)?.type==="RestElement"}function C_e({node:i,parent:e}){return i?.type!=="EmptyStatement"?!1:e.type==="IfStatement"?e.consequent===i||e.alternate===i:e.type==="DoWhileStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="ForStatement"||e.type==="LabeledStatement"||e.type==="WithStatement"||e.type==="WhileStatement"?e.body===i:!1}function PR(i){return i.method&&i.kind==="init"||i.kind==="get"||i.kind==="set"}function CX(i){return i.range?.[1]??i.end}function yn(i){let e=i.range?.[0]??i.start,t=(i.declaration?.decorators??i.decorators)?.[0];return t?Math.min(yn(t),e):e}function tn(i){let{type:e}=i;return e==="IfStatement"?tn(i.alternate??i.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?tn(i.body):eoi.get(e)?.(i)??CX(i)}function _X(i,e){let t=yn(i);return Pit(t)&&t===yn(e)}function ioi(i,e){let t=tn(i);return Pit(t)&&t===tn(e)}function noi(i,e){return _X(i,e)&&ioi(i,e)}function Ym(i){return i.extra?.raw??i.raw}function roi(i){return i.type==="BigIntLiteral"||i.type==="Literal"&&!!i.bigint}function ooi(i){return i.type==="BooleanLiteral"||i.type==="Literal"&&typeof i.value=="boolean"}function QA(i){return i.type==="NumericLiteral"||i.type==="Literal"&&typeof i.value=="number"}function zit(i){return i.type==="RegExpLiteral"||i.type==="Literal"&&!!i.regex}function Fu(i){return i?.type==="StringLiteral"||i?.type==="Literal"&&typeof i.value=="string"}function s_e(i){if(i.type!=="ImportSpecifier"&&i.type!=="ExportSpecifier")return!1;let{local:e,[i.type==="ImportSpecifier"?"imported":"exported"]:t}=i;return e.type!==t.type||!noi(e,t)?!1:Fu(e)?e.value===t.value&&Ym(e)===Ym(t):e.type==="Identifier"?e.name===t.name:!1}function poi(i,e){return uoi(i)||doi(i,e)||hoi(i,e)?!1:i.type==="EmptyStatement"?C_e({node:i,parent:e[0]}):!(foi(i,e)||i.type==="TSTypeAnnotation"&&e[0].type==="TSPropertySignature")}function goi(i){let e=i.type||i.kind||"(unknown type)",t=String(i.name||i.id&&(typeof i.id=="object"?i.id.name:i.id)||i.key&&(typeof i.key=="object"?i.key.name:i.key)||i.value&&(typeof i.value=="object"?"":String(i.value))||i.operator||"");return t.length>20&&(t=t.slice(0,19)+"\u2026"),e+(t?" "+t:"")}function E_e(i,e){(i.comments??(i.comments=[])).push(e),e.printed=!1,e.nodeDescription=goi(i)}function Qc(i,e){e.leading=!0,e.trailing=!1,E_e(i,e)}function Mp(i,e,t){e.leading=!1,e.trailing=!1,t&&(e.marker=t),E_e(i,e)}function ka(i,e){e.leading=!1,e.trailing=!0,E_e(i,e)}function SX(i){return(e,t,n)=>{if(t===!1)return!1;let r=!!n?.backwards,{length:o}=e,s=t;for(;s>=0&&se(i,0),"source"),t.options&&i.call(()=>e(i,1),"options")):t.type==="TSExternalModuleReference"?i.call(()=>e(i,0),"expression"):i.each(e,"arguments")}function $tt(i,e){if(i.type==="ImportExpression"||i.type==="TSImportType"){if(e===0||e===(i.options?-2:-1))return["source"];if(i.options&&(e===1||e===-1))return["options"];throw new RangeError("Invalid argument index")}if(i.type==="TSExternalModuleReference"){if(e===0||e===-1)return["expression"]}else if(e<0&&(e=i.arguments.length+e),e>=0&&eMoi(i.originalText,t))}function Hit(i,e){let t=tn(i)-1;if(e.originalText[t]===")")return t}function Foi(i,e){if(Hit(i,e)===void 0)return;let t=Tb(e),n=tn(i.typeArguments??i.callee),r=t.indexOf("(",n);if(r!==-1)return r}function Ooi(i,e,t){let n=Hit(i,t);if(n===void 0||tn(e)>n)return!1;let r=Foi(i,t);return r===void 0?!1:yn(e)>r}function oS(i){return i?.type==="ObjectProperty"||i?.type==="Property"&&!PR(i)}function kk(i){return i.value.trim()==="prettier-ignore"&&!i.unignore}function k_e(i){return Eb(Poi,i,e=>ev(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function I_e({comment:i,enclosingNode:e,followingNode:t,options:n}){if((e?.type==="ForInStatement"||e?.type==="ForOfStatement"||e?.type==="ForStatement")&&t&&t===e.body){let r=Tb(n).lastIndexOf(")",yn(t));if(yn(i)>r)return Qc(t,i),!0}return!1}function l_e(i,e){i.type==="BlockStatement"?T9(i,e):Qc(i,e)}function T9(i,e){let t=(i.body||i.properties).find(({type:n})=>n!=="EmptyStatement");t?Qc(t,e):Mp(i,e)}function N_e({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r,options:o}){return t?.type!=="IfStatement"||!n?!1:UA(r,tn(i))===")"?(ka(e,i),!0):n===t.consequent?(Qc(n,i),!0):e===t.consequent&&n===t.alternate?Boi({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r,options:o}):!1}function Boi({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r,options:o}){let s=Tb(o).indexOf("else",tn(t.consequent));return yn(i)>=s?(Qc(n,i),!0):e.type!=="BlockStatement"&&L_e(i,r)&&!Rp(r,tn(e),yn(i))?(ka(e,i),!0):(Mp(t,i),!0)}function M_e({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r}){return t?.type==="SwitchStatement"&&t.cases.length===0&&!n&&e===t.discriminant&&UA(r,tn(i))==="}"?(Mp(t,i),!0):!1}function R_e({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r}){return(t?.type==="WhileStatement"||t?.type==="WithStatement")&&n?UA(r,tn(i))===")"?(ka(e,i),!0):t.body===n?(Qc(n,i),!0):!1:!1}function Uit(i,{comment:e,text:t,options:n}){if(Jm(i)&&Wit(e,t)&&!kk(e)){let r=Tb(n).slice(tn(e),yn(i));return/^[ \t]*$/.test(r)}return!1}function eit(i,e){return Qc(Uit(i,e)?i.types[0]:i,e.comment),!0}function zoi(i){return[F_e,$it,Qit,Kit,Uoi,N_e,R_e,M_e,jit,Git,I_e,Joi,Xoi,O_e,Xit,$oi,qit,Jit,joi,ssi,P_e,B_e,tnt].some(e=>e(i))}function Voi(i){return[F_e,Woi,Kit,Qit,Xit,N_e,R_e,M_e,jit,Git,I_e,Jit,Koi,Zoi,O_e,Zit,rsi,osi,asi,P_e,usi,ent,lsi,B_e].some(e=>e(i))}function Hoi(i){return[F_e,$it,N_e,R_e,M_e,I_e,qit,O_e,Zit,P_e,qoi,Goi,isi,ent,B_e,tnt].some(e=>e(i))}function Woi({comment:i,followingNode:e}){return e&&k_e(i)?(Qc(e,i),!0):!1}function jit({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){return t?.type!=="TryStatement"&&t?.type!=="CatchClause"||!n?!1:t.type==="CatchClause"&&e?(ka(e,i),!0):n.type==="BlockStatement"?(T9(n,i),!0):n.type==="TryStatement"?(l_e(n.finalizer,i),!0):n.type==="CatchClause"?(l_e(n.body,i),!0):!1}function Uoi({comment:i,enclosingNode:e,followingNode:t}){return Gs(e)&&t?.type==="Identifier"?(Qc(e,i),!0):!1}function joi({comment:i,enclosingNode:e,followingNode:t,options:n}){return!n.experimentalTernaries||!(e?.type==="ConditionalExpression"||tS(e))?!1:t?.type==="ConditionalExpression"||tS(t)?(Mp(e,i),!0):!1}function Qit({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r,options:o}){let s=e&&!Rp(r,tn(e),yn(i));return(!e||!s)&&(t?.type==="ConditionalExpression"||tS(t))&&n?o.experimentalTernaries&&t.alternate===n&&!(ev(i)&&!Rp(o.originalText,yn(i),tn(i)))?(Mp(t,i),!0):(Qc(n,i),!0):!1}function Git({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){if(Qoi(t)){let{decorators:r}=t;if(qs(r)&&n?.type!=="Decorator")return ka(Ur(0,r,-1),i),!0;if(t.body&&n===t.body)return T9(t.body,i),!0;if(n){let{superClass:o}=t;if(o&&n===o&&e&&(e===t.id||e===t.typeParameters))return ka(e,i),!0;for(let s of["implements","extends","mixins"])if(t[s]&&n===t[s][0])return e&&(e===t.id||e===t.typeParameters||e===o)?ka(e,i):Mp(t,i,s),!0}}return!1}function qit({placement:i,comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:o}){return n&&t&&UA(o,tn(e))==="("&&(n.type==="Property"||n.type==="TSDeclareMethod"||n.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&n.key===t&&UA(o,tn(t))!==":"?(ka(t,e),!0):tit(n)&&!r&&i==="remaining"?(ka(UA(o,tn(e))==="("?t:n,e),!0):t?.type==="Decorator"&&tit(n)&&(rS(e)||i==="ownLine")?(ka(t,e),!0):!1}function Goi({comment:i,precedingNode:e,enclosingNode:t,text:n}){return UA(n,tn(i))!=="("?!1:e&&Yit(t)?(ka(e,i),!0):!1}function qoi({comment:i,enclosingNode:e,text:t}){if(e?.type!=="ArrowFunctionExpression")return!1;let n=EX(t,tn(i));return n!==!1&&t.slice(n,n+2)==="=>"?(Mp(e,i,"commentBeforeArrow"),!0):!1}function iit(i,e,t){let n=yn(e),r=tn(i);if(n>=r)return!1;let o=tn(e),s=yn(i);if(o<=s)return!1;let a=Tb(t);return a.slice(0,yn(e)).trimEnd().endsWith("(")&&a.slice(tn(e)).trimStart().startsWith(")")}function F_e({comment:i,enclosingNode:e,options:t}){if(!e)return!1;if(MR(e)&&Db(e).length===0&&iit(e,i,t))return Mp(e,i),!0;let n=int(e)||Yoi(e)||e.type==="HookTypeAnnotation"?e:e.type==="MethodDefinition"||e.type==="TSAbstractMethodDefinition"||e.type==="Property"&&PR(e)?e.value:void 0;return n&&zf(n).length===0&&iit(n,i,t)?(Mp(n,i),!0):!1}function Kit({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:r}){return e?.type==="FunctionTypeParam"&&t?.type==="FunctionTypeAnnotation"&&n?.type!=="FunctionTypeParam"||e?.type==="ComponentTypeParameter"&&(t?.type==="DeclareComponent"||t?.type==="ComponentTypeAnnotation")&&n?.type!=="ComponentTypeParameter"||(e?.type==="Identifier"||e?.type==="AssignmentPattern"||e?.type==="ObjectPattern"||e?.type==="ArrayPattern"||e?.type==="RestElement"||e?.type==="TSParameterProperty")&&(int(t)||(t?.type==="TSAbstractMethodDefinition"||t?.type==="MethodDefinition")&&t.value.type==="TSEmptyBodyFunctionExpression")&&UA(r,tn(i))===")"||(e?.type==="ComponentParameter"||e?.type==="RestElement")&&(t?.type==="ComponentDeclaration"||t?.type==="DeclareComponent")&&UA(r,tn(i))===")"?(ka(e,i),!0):!ev(i)&&n?.type==="BlockStatement"&&Yit(t)&&(t.type==="MethodDefinition"?t.value.body:t.body)===n&&EX(r,tn(i))===yn(n)?(T9(n,i),!0):!1}function Jit({comment:i,enclosingNode:e}){return e?.type==="LabeledStatement"?(Qc(e,i),!0):!1}function Koi({comment:i,precedingNode:e,enclosingNode:t,options:n}){return y9(t)&&t.callee===e&&t.arguments.length>0&&Ooi(t,i,n)?(Qc(t.arguments[0],i),!0):!1}function Joi({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){return Jm(t)?(kk(i)&&(n.prettierIgnore=!0,i.unignore=!0),e?(ka(e,i),!0):!1):(Jm(n)&&kk(i)&&(n.types[0].prettierIgnore=!0,i.unignore=!0),!1)}function Xoi({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){return t&&t.type==="MatchOrPattern"?(kk(i)&&(n.prettierIgnore=!0,i.unignore=!0),e?(ka(e,i),!0):!1):(n&&n.type==="MatchOrPattern"&&kk(i)&&(n.types[0].prettierIgnore=!0,i.unignore=!0),!1)}function Zoi({comment:i,enclosingNode:e}){return oS(e)?(Qc(e,i),!0):!1}function O_e({comment:i,enclosingNode:e,ast:t,isLastComment:n}){return t?.body?.length===0?(n?Mp(t,i):Qc(t,i),!0):e?.type==="Program"&&e.body.length===0&&!qs(e.directives)?(n?Mp(e,i):Qc(e,i),!0):!1}function Xit({comment:i,precedingNode:e,enclosingNode:t,text:n}){if(t?.type==="ImportSpecifier"||t?.type==="ExportSpecifier")return Qc(t,i),!0;let r=e?.type==="ImportSpecifier"&&t?.type==="ImportDeclaration",o=e?.type==="ExportSpecifier"&&t?.type==="ExportNamedDeclaration";return(r||o)&&Ru(n,tn(i))?(ka(e,i),!0):!1}function $oi({comment:i,enclosingNode:e}){return e?.type==="AssignmentPattern"?(Qc(e,i),!0):!1}function Zit(i){let{comment:e,enclosingNode:t,followingNode:n,options:r,placement:o}=i;if(esi(t)&&n&&o==="endOfLine"&&(tsi(n)||ev(e)))return eit(n,i);if(Vit(t)&&n){let s=t.id,a=Tb(r).indexOf("=",tn(s));if(yn(e)>=a)return eit(n,i)}return!1}function isi({comment:i,enclosingNode:e,precedingNode:t,followingNode:n,text:r}){return!n&&(e?.type==="TSMethodSignature"||e?.type==="TSDeclareFunction"||e?.type==="TSAbstractMethodDefinition")&&(!t||t!==e.returnType)&&UA(r,tn(i))===";"?(ka(e,i),!0):!1}function $it({comment:i,enclosingNode:e,followingNode:t}){if(kk(i)&&e?.type==="TSMappedType"&&t===e.key)return e.prettierIgnore=!0,i.unignore=!0,!0}function nsi(i,e,t){let n=Tb(t).indexOf("[",yn(i));return tn(e)",yn(e.body));return tn(i)o.type==="ForOfStatement"||o.type==="ForInStatement")?.left;if(r&&Of(r,o=>o===e))return!0}if(t==="object"&&e.name==="let"&&n.type==="MemberExpression"&&n.computed&&!n.optional){let r=i.findAncestor(s=>s.type==="ExpressionStatement"||s.type==="ForStatement"||s.type==="ForInStatement"),o=r?r.type==="ExpressionStatement"?r.expression:r.type==="ForStatement"?r.init:r.left:void 0;if(o&&Of(o,s=>s===e))return!0}if(t==="expression")switch(e.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let r=i.findAncestor(o=>!Z0(o));if(r!==n&&r.type==="ExpressionStatement")return!0}}return!1}function Csi(i){return i!==null&&typeof i=="object"}function*_si(i,e){let{getVisitorKeys:t,filter:n=()=>!0}=e,r=o=>ont(o)&&n(o);for(let o of t(i)){let s=i[o];if(Array.isArray(s))for(let a of s)r(a)&&(yield a);else r(s)&&(yield s)}}function*Ssi(i,e){let t=[i];for(let n=0;nRu(i,tn(t)))}function Msi(i,e){if(Rw(e.originalText,i)||$t(i,fi.Leading,t=>Rp(e.originalText,yn(t),tn(t)))&&!sd(i))return!0;if(V_e(i)){let t=i,n;for(;n=Nsi(t);)if(t=n,Rw(e.originalText,t))return!0}return!1}function cnt(i,e){return Eb(Rsi,i,t=>Msi(t,e))}function sS(i){for(;Mk(i);)i=i.expression;return i}function Fsi(i,e,t){let{node:n,key:r,parent:o}=i;switch(o.type){case"ReturnStatement":case"ThrowStatement":if(Osi(i,e))return!1;break;case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(r==="superClass"){let s=sS(n);if(s.type==="ArrowFunctionExpression"||s.type==="AssignmentExpression"||s.type==="AwaitExpression"||s.type==="BinaryExpression"||s.type==="ConditionalExpression"||s.type==="LogicalExpression"||s.type==="NewExpression"||s.type==="ObjectExpression"||s.type==="SequenceExpression"||s.type==="TaggedTemplateExpression"||s.type==="UnaryExpression"||s.type==="UpdateExpression"||s.type==="YieldExpression"||s.type==="ClassExpression"&&qs(s.decorators))return!0}break;case"ExportDefaultDeclaration":if(unt(i,e,t))return!0;break;case"Decorator":if(r==="expression"&&!Psi(n))return!0;break;case"TypeAnnotation":if(i.match(void 0,void 0,(s,a)=>a==="returnType"&&s.type==="ArrowFunctionExpression")&&!(n.type==="NullableTypeAnnotation"&&i.call(()=>t(i,e),"typeAnnotation"))&&Bsi(n))return!0;break;case"VariableDeclarator":if(r==="init"&&i.match(void 0,void 0,(s,a)=>a==="declarations"&&s.type==="VariableDeclaration",(s,a)=>a==="left"&&s.type==="ForInStatement"))return!0;break;case"TSInstantiationExpression":if(r==="expression"&&(n.type==="AwaitExpression"||n.type==="YieldExpression"))return!0;break}}function Osi(i,e){let{key:t,parent:n}=i;if(!(t==="argument"&&NR(n)))return!1;let{node:r}=i;return!!((r.type==="SequenceExpression"||r.type==="AssignmentExpression")&&cnt(r,e))}function unt(i,e,t){let{node:n,parent:r}=i;return n.type==="FunctionExpression"||n.type==="ClassExpression"?r.type==="ExportDefaultDeclaration"||!t(i,e):!V_e(n)||r.type!=="ExportDefaultDeclaration"&&t(i,e)?!1:i.call(()=>unt(i,e,t),...lnt(n))}function Psi(i){return i.type==="ChainExpression"&&(i=i.expression),d_e(i)||Ts(i)&&!i.optional&&d_e(i.callee)}function d_e(i){return i.type==="Identifier"?!0:Gs(i)?!i.computed&&!i.optional&&i.property.type==="Identifier"&&d_e(i.object):!1}function Bsi(i){return u_e(i,e=>e.type==="ObjectTypeAnnotation"&&u_e(e,t=>t.type==="FunctionTypeAnnotation"))}function dnt(i,e){if(i.isRoot)return!1;let{node:t,key:n,parent:r}=i;if(e.__isInHtmlInterpolation&&!e.bracketSpacing&&Hsi(t)&&m9(i))return!0;if(zsi(t))return!1;if(t.type==="Identifier")return xsi(i);if(t.type==="ObjectExpression"||t.type==="FunctionExpression"||t.type==="ClassExpression"||t.type==="DoExpression"){let s=i.findAncestor(a=>a.type==="ExpressionStatement")?.expression;if(s&&Of(s,a=>a===t))return!0}if(t.type==="ObjectExpression"){let s=i.findAncestor(a=>a.type==="ArrowFunctionExpression")?.body;if(s&&s.type!=="SequenceExpression"&&s.type!=="AssignmentExpression"&&Of(s,a=>a===t))return!0}let o=Fsi(i,e,dnt);if(typeof o=="boolean")return o;switch(t.type){case"UpdateExpression":if(r.type==="UnaryExpression")return t.prefix&&(t.operator==="++"&&r.operator==="+"||t.operator==="--"&&r.operator==="-");case"UnaryExpression":switch(r.type){case"UnaryExpression":return t.operator===r.operator&&(t.operator==="+"||t.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&t.type==="UnaryExpression"&&(r.operator==="in"||r.operator==="instanceof")?!0:n==="left"&&r.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(r.type==="UpdateExpression"||t.operator==="in"&&Vsi(i))return!0;if(t.operator==="|>"&&t.extra?.parenthesized){let s=i.grandparent;if(s.type==="BinaryExpression"&&s.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Z0(t);case"ConditionalExpression":return Z0(t)||bsi(t);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"UnaryExpression":if(!$t(t))return!0;break;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(t.type==="TSTypeAssertion"||Z0(t));case"LogicalExpression":if(t.type==="LogicalExpression")return r.operator!==t.operator;case"BinaryExpression":{let{operator:s,type:a}=t;if(!s&&a!=="TSTypeAssertion")return!0;let l=gX(s),c=r.operator,u=gX(c);return!!(u>l||n==="right"&&u===l||u===l&&!z_e(c,s)||u");default:return!1}case"TSFunctionType":if(i.match(s=>s.type==="TSFunctionType",(s,a)=>a==="typeAnnotation"&&s.type==="TSTypeAnnotation",(s,a)=>a==="returnType"&&s.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":case"ConditionalTypeAnnotation":if(n==="extendsType"&&tS(t)&&r.type===t.type||n==="constraint"&&t.type==="TSConditionalType"&&r.type==="TSTypeParameter"||n==="typeAnnotation"&&t.type==="ConditionalTypeAnnotation"&&r.type==="TypeAnnotation"&&i.grandparent.type==="TypeParameter"&&i.grandparent.bound===r&&i.grandparent.usesExtendsBound||n==="checkType"&&tS(r))return!0;if(n==="extendsType"&&r.type==="TSConditionalType"){let{typeAnnotation:s}=t.returnType||t.typeAnnotation;if(s.type==="TSTypePredicate"&&s.typeAnnotation&&(s=s.typeAnnotation.typeAnnotation),s.type==="TSInferType"&&s.typeParameter.constraint)return!0}case"TSUnionType":case"TSIntersectionType":if(Jm(r)||D9(r))return!0;case"TSInferType":if(t.type==="TSInferType"){if(r.type==="TSRestType")return!1;if(n==="types"&&(r.type==="TSUnionType"||r.type==="TSIntersectionType")&&t.typeParameter.type==="TSTypeParameter"&&t.typeParameter.constraint)return!0}case"TSTypeOperator":return r.type==="TSArrayType"||r.type==="TSOptionalType"||r.type==="TSRestType"||n==="objectType"&&r.type==="TSIndexedAccessType"||r.type==="TSTypeOperator"||r.type==="TSTypeAnnotation"&&i.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&r.type==="TSIndexedAccessType"||n==="elementType"&&r.type==="TSArrayType";case"TypeOperator":return r.type==="ArrayTypeAnnotation"||r.type==="NullableTypeAnnotation"||n==="objectType"&&(r.type==="IndexedAccessType"||r.type==="OptionalIndexedAccessType")||r.type==="TypeOperator";case"TypeofTypeAnnotation":case"KeyofTypeAnnotation":return n==="objectType"&&(r.type==="IndexedAccessType"||r.type==="OptionalIndexedAccessType")||n==="elementType"&&r.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return r.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return r.type==="TypeOperator"||r.type==="KeyofTypeAnnotation"||r.type==="ArrayTypeAnnotation"||r.type==="NullableTypeAnnotation"||r.type==="IntersectionTypeAnnotation"||r.type==="UnionTypeAnnotation"||n==="objectType"&&(r.type==="IndexedAccessType"||r.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":if(r.type==="ArrayTypeAnnotation"||n==="objectType"&&(r.type==="IndexedAccessType"||r.type==="OptionalIndexedAccessType"))return!0;break;case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(t.type==="ComponentTypeAnnotation"&&(t.rendersType===null||t.rendersType===void 0))return!1;if(i.match(void 0,(a,l)=>l==="typeAnnotation"&&a.type==="TypeAnnotation",(a,l)=>l==="returnType"&&a.type==="ArrowFunctionExpression")||i.match(void 0,(a,l)=>l==="typeAnnotation"&&a.type==="NullableTypeAnnotation",(a,l)=>l==="typeAnnotation"&&a.type==="TypeAnnotation",(a,l)=>l==="returnType"&&a.type==="ArrowFunctionExpression")||i.match(void 0,(a,l)=>l==="typeAnnotation"&&a.type==="TypePredicate",(a,l)=>l==="typeAnnotation"&&a.type==="TypeAnnotation",(a,l)=>l==="returnType"&&a.type==="ArrowFunctionExpression"))return!0;let s=r.type==="NullableTypeAnnotation"?i.grandparent:r;return s.type==="UnionTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="checkType"&&r.type==="ConditionalTypeAnnotation"||n==="extendsType"&&r.type==="ConditionalTypeAnnotation"&&t.returnType?.type==="InferTypeAnnotation"&&t.returnType.typeParameter.bound||s.type==="NullableTypeAnnotation"||r.type==="FunctionTypeParam"&&r.name===null&&zf(t).some(a=>a.typeAnnotation?.type==="NullableTypeAnnotation")}case"OptionalIndexedAccessType":return n==="objectType"&&r.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof t.value=="string"&&r.type==="ExpressionStatement"&&typeof r.directive!="string"){let s=i.grandparent;return s.type==="Program"||s.type==="BlockStatement"}return n==="object"&&Gs(r)&&QA(t);case"AssignmentExpression":return!((n==="init"||n==="update")&&r.type==="ForStatement"||n==="expression"&&t.left.type!=="ObjectPattern"&&r.type==="ExpressionStatement"||n==="key"&&r.type==="TSPropertySignature"||r.type==="AssignmentExpression"||n==="expressions"&&r.type==="SequenceExpression"&&i.match(void 0,void 0,(s,a)=>(a==="init"||a==="update")&&s.type==="ForStatement")||n==="value"&&r.type==="Property"&&i.match(void 0,void 0,(s,a)=>a==="properties"&&s.type==="ObjectPattern")||r.type==="NGChainedExpression"||n==="node"&&r.type==="JsExpressionRoot");case"ConditionalExpression":switch(r.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return e.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(r.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;case"ExportDefaultDeclaration":return n==="declaration";default:return!1}case"ArrowFunctionExpression":switch(r.type){case"BinaryExpression":return r.operator!=="|>"||t.extra?.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":case"MatchExpressionCase":return!0;case"TSInstantiationExpression":return n==="expression";case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(r.type){case"NewExpression":return n==="callee";case"ExportDefaultDeclaration":return n==="declaration";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"ChainExpression":case"TSNonNullExpression":if(wsi(i))return!0;case"CallExpression":case"MemberExpression":case"TaggedTemplateExpression":case"ImportExpression":if(n==="callee"&&(r.type==="BindExpression"||r.type==="NewExpression")){let s=t;for(;s;)switch(s.type){case"CallExpression":case"ImportExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":s=s.object;break;case"TaggedTemplateExpression":s=s.tag;break;case"TSNonNullExpression":s=s.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(r.type==="BindExpression"||r.type==="NewExpression")||n==="object"&&Gs(r);case"NGPipeExpression":return!(r.type==="NGRoot"||r.type==="NGMicrosyntaxExpression"||r.type==="ObjectProperty"&&!t.extra?.parenthesized||Kd(r)||n==="arguments"&&Ts(r)||n==="right"&&r.type==="NGPipeExpression"||n==="property"&&r.type==="MemberExpression"||r.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&r.type==="BinaryExpression"&&r.operator==="<"||!Kd(r)&&r.type!=="ArrowFunctionExpression"&&r.type!=="AssignmentExpression"&&r.type!=="AssignmentPattern"&&r.type!=="BinaryExpression"&&r.type!=="ConditionalExpression"&&r.type!=="ExpressionStatement"&&r.type!=="JsExpressionRoot"&&r.type!=="JSXAttribute"&&r.type!=="JSXElement"&&r.type!=="JSXExpressionContainer"&&r.type!=="JSXFragment"&&r.type!=="LogicalExpression"&&!y9(r)&&!oS(r)&&!NR(r)&&r.type!=="TypeCastExpression"&&r.type!=="VariableDeclarator"&&r.type!=="YieldExpression"&&r.type!=="MatchExpressionCase"&&!(n==="declaration"&&r.type==="ExportDefaultDeclaration");case"TSInstantiationExpression":return n==="object"&&Gs(r);case"MatchOrPattern":return r.type==="MatchAsPattern"}return!1}function Vsi(i){let e=0,{node:t}=i;for(;t;){let n=i.getParentNode(e++);if(n?.type==="ForStatement"&&n.init===t)return!0;t=n}return!1}function Hsi(i){return $0(i)}function m9(i){let{parent:e,key:t}=i;switch(e.type){case"NGPipeExpression":if(t==="arguments"&&i.isLast)return i.callParent(m9);break;case"ObjectProperty":if(t==="value")return i.callParent(()=>i.key==="properties"&&i.isLast);break;case"BinaryExpression":case"LogicalExpression":if(t==="right")return i.callParent(m9);break;case"ConditionalExpression":if(t==="alternate")return i.callParent(m9);break;case"UnaryExpression":if(e.prefix&&i.callParent(m9))return!0;break}return!1}function Wsi(i){if(typeof i=="string")return Rk;if(Array.isArray(i))return Ow;if(!i)return;let{type:e}=i;if(hnt.has(e))return e}function jsi(i){let e=i===null?"null":typeof i;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(cS(i))throw new Error("doc is valid.");let t=Object.prototype.toString.call(i);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=Usi([...hnt].map(r=>`'${r}'`));return`Unexpected doc.type '${i.type}'. -Expected it to be ${n}.`}function Gsi(i,e,t,n){let r=[i];for(;r.length>0;){let o=r.pop();if(o===oit){t(r.pop());continue}t&&r.push(o,oit);let s=cS(o);if(!s)throw new w9(o);if(e?.(o)!==!1)switch(s){case Ow:case aS:{let a=s===Ow?o:o.parts;for(let l=a.length,c=l-1;c>=0;--c)r.push(a[c]);break}case jA:r.push(o.flatContents,o.breakContents);break;case _b:if(n&&o.expandedStates)for(let a=o.expandedStates.length,l=a-1;l>=0;--l)r.push(o.expandedStates[l]);else r.push(o.contents);break;case Ok:case Fk:case Bk:case Bw:case zk:r.push(o.contents);break;case Rk:case BR:case Pk:case lS:case Fp:case zw:break;default:throw new w9(o)}}}function zR(i,e){if(typeof i=="string")return e(i);let t=new Map;return n(i);function n(o){return Eb(t,o,r)}function r(o){switch(cS(o)){case Ow:return e(o.map(n));case aS:return e({...o,parts:o.parts.map(n)});case jA:return e({...o,breakContents:n(o.breakContents),flatContents:n(o.flatContents)});case _b:{let{expandedStates:s,contents:a}=o;return s?(s=s.map(n),a=s[0]):a=n(a),e({...o,contents:a,expandedStates:s})}case Ok:case Fk:case Bk:case Bw:case zk:return e({...o,contents:n(o.contents)});case Rk:case BR:case Pk:case lS:case Fp:case zw:return e(o);default:throw new w9(o)}}}function fnt(i,e,t){let n=t,r=!1;function o(s){if(r)return!1;let a=e(s);a!==void 0&&(r=!0,n=a)}return H_e(i,o),n}function qsi(i){if(i.type===_b&&i.break||i.type===Fp&&i.hard||i.type===zw)return!0}function Pf(i){return fnt(i,qsi,!1)}function sit(i){if(i.length>0){let e=Ur(0,i,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function Ysi(i){let e=new Set,t=[];function n(o){if(o.type===zw&&sit(t),o.type===_b){if(t.push(o),e.has(o))return!1;e.add(o)}}function r(o){o.type===_b&&t.pop().break&&sit(t)}H_e(i,n,r,!0)}function Ksi(i){return i.type===Fp&&!i.hard?i.soft?"":" ":i.type===jA?i.flatContents:i}function bX(i){return zR(i,Ksi)}function Jsi(i){switch(cS(i)){case aS:{let{parts:e}=i;if(e.every(t=>t===""))return"";if(e.length===1)return e[0];break}case _b:if(!i.contents&&!i.id&&!i.break&&!i.expandedStates)return"";if(i.contents.type===_b&&i.contents.id===i.id&&i.contents.break===i.break&&i.contents.expandedStates===i.expandedStates)return i.contents;break;case Ok:case Fk:case Bk:case zk:if(!i.contents)return"";break;case jA:if(!i.flatContents&&!i.breakContents)return"";break;case Ow:{let e=[];for(let t of i){if(!t)continue;let[n,...r]=Array.isArray(t)?t:[t];typeof n=="string"&&typeof Ur(0,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...r)}return e.length===0?"":e.length===1?e[0]:e}case Rk:case BR:case Pk:case lS:case Fp:case Bw:case zw:break;default:throw new w9(i)}return i}function W_e(i){return zR(i,e=>Jsi(e))}function Ik(i,e=U_e){return zR(i,t=>typeof t=="string"?jr(e,t.split(` -`)):t)}function Xsi(i){if(i.type===Fp)return!0}function Zsi(i){return fnt(i,Xsi,!1)}function pnt(i,e){return i.type===Bw?{...i,contents:e(i.contents)}:e(i)}function $si(i){let e=!0;return H_e(i,t=>{switch(cS(t)){case Rk:if(t==="")break;case Pk:case lS:case Fp:case zw:return e=!1,!1}}),e}function bt(i){return GA(i),{type:Fk,contents:i}}function Xm(i,e){return tai(i),GA(e),{type:Ok,contents:e,n:i}}function iai(i){return Xm(Number.NEGATIVE_INFINITY,i)}function nai(i){return Xm({type:"root"},i)}function gnt(i){return Xm(-1,i)}function rai(i,e,t){GA(i);let n=i;if(e>0){for(let r=0;r=r&&lit<=o)return[r,o];o-r>t-e&&(e=r,t=o)}return[e,t]}function Dai(i){if(!i)return 0;if(!Eai.test(i))return i.length;let e=0;i=i.replace(fai(),t=>(e+=Sai(t)?1:2,""));for(let t of i){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(e+=xai(n)||Cai(n)?2:1)}return e}function xnt(i,e,t){let n=e.type===1?i.queue.slice(0,-1):[...i.queue,e],r="",o=0,s=0,a=0;for(let p of n)switch(p.type){case 0:u(),t.useTabs?l(1):c(t.tabWidth);break;case 3:{let{string:g}=p;u(),r+=g,o+=g.length;break}case 2:{let{width:g}=p;s+=1,a+=g;break}default:throw new Error(`Unexpected indent comment '${p.type}'.`)}return h(),{...i,value:r,length:o,queue:n};function l(p){r+=" ".repeat(p),o+=t.tabWidth*p}function c(p){r+=" ".repeat(p),o+=p}function u(){t.useTabs?d():h()}function d(){s>0&&l(s),f()}function h(){a>0&&c(a),f()}function f(){s=0,a=0}}function Iai(i,e,t){if(!e)return i;if(e.type==="root")return{...i,root:i};if(e===Number.NEGATIVE_INFINITY)return i.root;let n;return typeof e=="number"?e<0?n=kai:n={type:2,width:e}:n={type:3,string:e},xnt(i,n,t)}function Lai(i,e){return xnt(i,Tai,e)}function Nai(i){let e=0;for(let t=i.length-1;t>=0;t--){let n=i[t];if(n===" "||n===" ")e++;else break}return e}function Cnt(i){let e=Nai(i);return{text:e===0?i:i.slice(0,i.length-e),count:e}}function hX(i,e,t,n,r,o){if(t===Number.POSITIVE_INFINITY)return!0;let s=e.length,a=!1,l=[i],c="";for(;t>=0;){if(l.length===0){if(s===0)return!0;l.push(e[--s]);continue}let{mode:u,doc:d}=l.pop(),h=cS(d);switch(h){case Rk:d&&(a&&(c+=" ",t-=1,a=!1),c+=d,t-=OR(d));break;case Ow:case aS:{let f=h===Ow?d:d.parts,p=d[h_e]??0;for(let g=f.length-1;g>=p;g--)l.push({mode:u,doc:f[g]});break}case Fk:case Ok:case Bk:case Bw:l.push({mode:u,doc:d.contents});break;case Pk:{let{text:f,count:p}=Cnt(c);c=f,t+=p;break}case _b:{if(o&&d.break)return!1;let f=d.break?Cb:u,p=d.expandedStates&&f===Cb?Ur(0,d.expandedStates,-1):d.contents;l.push({mode:f,doc:p});break}case jA:{let f=(d.groupId?r[d.groupId]||HA:u)===Cb?d.breakContents:d.flatContents;f&&l.push({mode:u,doc:f});break}case Fp:if(u===Cb||d.hard)return!0;d.soft||(a=!0);break;case zk:n=!0;break;case lS:if(n)return!1;break}}return!1}function _nt(i,e){let t=Object.create(null),n=e.printWidth,r=hai(e.endOfLine),o=0,s=[{indent:wnt,mode:Cb,doc:i}],a=!1,l=[],c=new Rai;for(Ysi(i);s.length>0;){let{indent:p,mode:g,doc:v}=s.pop();switch(cS(v)){case Rk:{let A=r!==` -`?od(0,v,` -`,r):v;A&&(c.write(A),s.length>0&&(o+=OR(A)));break}case Ow:for(let A=v.length-1;A>=0;A--)s.push({indent:p,mode:g,doc:v[A]});break;case BR:c.markPosition();break;case Fk:s.push({indent:Lai(p,e),mode:g,doc:v.contents});break;case Ok:s.push({indent:Iai(p,v.n,e),mode:g,doc:v.contents});break;case Pk:o-=c.trim();break;case _b:{let A=(function(){if(g===HA&&!a)return{indent:p,mode:v.break?Cb:HA,doc:v.contents};a=!1;let w=n-o,C=l.length>0,_={indent:p,mode:HA,doc:v.contents};if(!v.break&&hX(_,s,w,C,t))return _;if(!v.expandedStates)return{indent:p,mode:Cb,doc:v.contents};if(!v.break)for(let E=1;E0,t,!0);if(_===1){M?s.push(T):s.push(L);break}let z={indent:p,mode:HA,doc:I},H={indent:p,mode:Cb,doc:I};if(_===2){M?s.push(z,T):s.push(H,L);break}let B=C[w+2],q={indent:p,mode:g,doc:{...v,[h_e]:w+2}},U=hX({indent:p,mode:HA,doc:[E,I,B]},[],A,l.length>0,t,!0);s.push(q),U?s.push(z,T):M?s.push(H,T):s.push(H,L);break}case jA:case Bk:{let A=v.groupId?t[v.groupId]:g;if(A===Cb){let w=v.type===jA?v.breakContents:v.negate?v.contents:bt(v.contents);w&&s.push({indent:p,mode:g,doc:w})}if(A===HA){let w=v.type===jA?v.flatContents:v.negate?bt(v.contents):v.contents;w&&s.push({indent:p,mode:g,doc:w})}break}case zk:l.push({indent:p,mode:g,doc:v.contents});break;case lS:l.length>0&&s.push({indent:p,mode:g,doc:vnt});break;case Fp:switch(g){case HA:if(!v.hard){v.soft||(c.write(" "),o+=1);break}a=!0;case Cb:if(l.length>0){s.push({indent:p,mode:g,doc:v},...l.reverse()),l.length=0;break}v.literal?(c.write(r),o=0,p.root&&(p.root.value&&c.write(p.root.value),o=p.root.length)):(c.trim(),c.write(r+p.value),o=p.length);break}break;case Bw:s.push({indent:p,mode:g,doc:v.contents});break;case zw:break;default:throw new w9(v)}s.length===0&&l.length>0&&(s.push(...l.reverse()),l.length=0)}let{text:u,positions:d}=c.finish();if(d.length!==2)return{formatted:u};let[h,f]=d;return{formatted:u,cursorNodeStart:h,cursorNodeText:u.slice(h,f)}}function j_e(i){return(i.type==="ObjectTypeProperty"||i.type==="ObjectTypeInternalSlot")&&!i.static&&!i.method&&i.kind!=="get"&&i.kind!=="set"&&i.value.type==="FunctionTypeAnnotation"}function Fai(i,e){let t=null,n=e;for(;n!==t;)t=n,n=boi(i,n),n=D_e(i,n),n=RR(i,n);return n=T_e(i,n),n=FR(i,n),n!==!1&&Ru(i,n)}function Bai({type:i}){return i.startsWith("TS")&&i.endsWith("Keyword")}function Q_e(i){return Ent(i)||Snt(i)||Pai(i)||i.type==="GenericTypeAnnotation"&&!i.typeParameters||i.type==="TSTypeReference"&&!i.typeArguments}function zai(i){return(i.type==="TypeAnnotation"||i.type==="TSTypeAnnotation")&&i.typeAnnotation.type==="FunctionTypeAnnotation"&&!i.static&&!_X(i,i.typeAnnotation)}function Vai(i,e){let t=e.split(".");for(let n=t.length-1;n>=0;n--){let r=t[n];if(n===0)return i.type==="Identifier"&&i.name===r;if(n===1&&i.type==="MetaProperty"&&i.property.type==="Identifier"&&i.property.name===r){i=i.meta;continue}if(i.type==="MemberExpression"&&!i.optional&&!i.computed&&i.property.type==="Identifier"&&i.property.name===r){i=i.object;continue}return!1}}function G_e(i,e){return e.some(t=>Vai(i,t))}function Wai(i){return G_e(i,Hai)}function Uai(i){return i.type==="Identifier"&&(i.name==="beforeEach"||i.name==="beforeAll"||i.name==="afterEach"||i.name==="afterAll")}function ZCe(i){return Ts(i)&&i.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(i.callee.name)}function jai(i){return i.type==="FunctionExpression"||i.type==="ArrowFunctionExpression"&&i.body.type==="BlockStatement"}function TX(i,e){if(i?.type!=="CallExpression"||i.optional)return!1;let t=Db(i);if(t.length===1){if(ZCe(i)&&TX(e))return A9(t[0]);if(Uai(i.callee))return ZCe(t[0])}else if((t.length===2||t.length===3)&&(t[0].type==="TemplateLiteral"||Fu(t[0]))&&Wai(i.callee))return t[2]&&!QA(t[2])?!1:(t.length===2?A9(t[1]):jai(t[1])&&zf(t[1]).length<=1)||ZCe(t[1]);return!1}function Qai(i,e){let t=e-1;t=RR(i,t,{backwards:!0}),t=FR(i,t,{backwards:!0}),t=RR(i,t,{backwards:!0});let n=FR(i,t,{backwards:!0});return t!==n}function Y_e(i,e){let t=i.node;return t.printed=!0,e.printer.printComment(i,e)}function Gai(i,e){let t=i.node,n=[Y_e(i,e)],{printer:r,originalText:o,locStart:s,locEnd:a}=e;if(r.isBlockComment?.(t)){let c=" ";Ru(o,a(t))&&(Ru(o,s(t),{backwards:!0})?c=gt:c=li),n.push(c)}else n.push(gt);let l=FR(o,RR(o,a(t)));return l!==!1&&Ru(o,l)&&n.push(gt),n}function qai(i,e,t){let n=i.node,r=Y_e(i,e),{printer:o,originalText:s,locStart:a}=e,l=o.isBlockComment?.(n);if(t?.hasLineSuffix&&!t?.isBlock||Ru(s,a(n),{backwards:!0})){let c=Dnt(s,a(n));return{doc:ait([gt,c?gt:"",r]),isBlock:l,hasLineSuffix:!0}}return!l||t?.hasLineSuffix?{doc:[ait([" ",r]),Pw],isBlock:l,hasLineSuffix:!0}:{doc:[" ",r],isBlock:l,hasLineSuffix:!1}}function Gc(i,e,t={}){let{indent:n=!1,marker:r,filter:o=q_e}=t,s=new Set(i.node?.comments?.filter(c=>!(c.leading||c.trailing||c.marker!==r||!o(c))));if(s.size===0)return"";let a=i.map(({node:c})=>s.has(c)?Y_e(i,e):"","comments").filter(Boolean),l=jr(gt,a);return n?bt([gt,l]):l}function K_e(i,e,t){let n=e[Symbol.for("printedComments")],r=t?.filter??q_e,o=new Set(i.node?.comments?.filter(s=>!n?.has(s)&&s.leading&&r(s)));return o.size===0?"":i.map(({node:s})=>o.has(s)?Gai(i,e):"","comments").filter(Boolean)}function Tnt(i,e,t){let n=i.node?.comments,r=new Set(n?.filter(u=>u.trailing)),o=e[Symbol.for("printedComments")],s=t?.filter??q_e,a=new Set(n?.filter(u=>r.has(u)&&!o?.has(u)&&s(u)));if(a.size===0)return"";let l=[],c;return i.each(({node:u})=>{r.has(u)&&(c=qai(i,e,c),a.has(u)&&l.push(c.doc))},"comments"),l}function knt(i,e,t){return{leading:K_e(i,e,t),trailing:Tnt(i,e,t)}}function Oh(i,e,t,n){let r=K_e(i,t,n),o=Tnt(i,t,n);return r||o?pnt(e,s=>[r,s,o]):e}function Int(i,e="es5"){return i.trailingComma==="es5"&&e==="es5"||i.trailingComma==="all"&&(e==="all"||e==="es5")}function Bf(i){let{node:e}=i;return!e.optional||e.type==="Identifier"&&e===i.parent.key?"":Ts(e)||Gs(e)&&e.computed||e.type==="OptionalIndexedAccessType"?"?.":"?"}function Lnt(i){return i.node.definite||i.match(void 0,(e,t)=>t==="id"&&e.type==="VariableDeclarator"&&e.definite)?"!":""}function Zm(i){return Kai(i)?"declare ":""}function kX({node:i}){return i.abstract||Jai(i)?"abstract ":""}function IX(i){return i.accessibility?i.accessibility+" ":""}function Xai(i){return $t(i)||!cit(i)?!1:(i=i.argument,i=cit(i)?i.argument:i,i.type==="LogicalExpression")}function J_e(i,e,t){let{node:n}=i,r=n.type==="WithStatement"?"object":"test",o=t(r);return Xai(n[r])?o:je([bt([dt,o]),dt])}function LX(i,e,t){let{node:n}=i;return $t(n,fi.Dangling,t)?[bt([dt,Gc(i,e,{filter:t})]),$t(n,fi.Dangling|fi.Line,t)?gt:dt]:""}function uS(i,e="es5"){return Int(i,e)?wr(","):""}function pl(i){return i.semi?";":""}function Vk(i,e,t,n,r){let o=i.node,s=zf(o),a=r&&o.typeParameters?t("typeParameters"):"";if(s.length===0)return[a,"(",LX(i,e,Zai),")"];let{parent:l}=i,c=TX(l),u=Nnt(o),d=[];if(qri(i,(f,p)=>{let g=p===s.length-1;g&&o.rest&&d.push("..."),d.push(t()),!g&&(d.push(","),c||u?d.push(" "):qA(s[p],e)?d.push(gt,gt):d.push(li))}),n&&!eli(i)){if(Pf(a)||Pf(d))throw new vX;return je([bX(a),"(",bX(d),")"])}let h=s.every(f=>!qs(f.decorators));return u&&h?[a,"(",...d,")"]:c?[a,"(",...d,")"]:(j_e(l)||zai(l)||l.type==="TypeAlias"||l.type==="UnionTypeAnnotation"||l.type==="IntersectionTypeAnnotation"||l.type==="FunctionTypeAnnotation"&&l.returnType===o)&&s.length===1&&s[0].name===null&&o.this!==s[0]&&s[0].typeAnnotation&&o.typeParameters===null&&Q_e(s[0].typeAnnotation)&&!o.rest?e.arrowParens==="always"||o.type==="HookTypeAnnotation"?["(",...d,")"]:d:[a,"(",bt([dt,...d]),!Yri(o)&&i.root.type!=="NGRoot"?uS(e,"all"):"",dt,")"]}function Nnt(i){if(!i)return!1;let e=zf(i);if(e.length!==1)return!1;let[t]=e;return!$t(t)&&(t.type==="ObjectPattern"||t.type==="ArrayPattern"||t.type==="Identifier"&&t.typeAnnotation&&(t.typeAnnotation.type==="TypeAnnotation"||t.typeAnnotation.type==="TSTypeAnnotation")&&iS(t.typeAnnotation.typeAnnotation)||t.type==="FunctionTypeParam"&&iS(t.typeAnnotation)&&t!==i.rest||t.type==="AssignmentPattern"&&(t.left.type==="ObjectPattern"||t.left.type==="ArrayPattern")&&(t.right.type==="Identifier"||$0(t.right)&&t.right.properties.length===0||Kd(t.right)&&t.right.elements.length===0))}function $ai(i){let e;return i.returnType?(e=i.returnType,e.typeAnnotation&&(e=e.typeAnnotation)):i.typeAnnotation&&(e=i.typeAnnotation),e}function I9(i,e){let t=$ai(i);if(!t)return!1;let n=i.typeParameters?.params;if(n){if(n.length>1)return!1;if(n.length===1){let r=n[0];if(r.constraint||r.default)return!1}}return zf(i).length===1&&(iS(t)||Pf(e))}function eli(i){return i.match(e=>e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement",(e,t)=>{if(e.type==="CallExpression"&&t==="arguments"&&e.arguments.length===1&&e.callee.type==="CallExpression"){let n=e.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(e,t)=>e.type==="VariableDeclarator"&&t==="init"||e.type==="ExportDefaultDeclaration"&&t==="declaration"||e.type==="TSExportAssignment"&&t==="expression"||e.type==="AssignmentExpression"&&t==="right"&&e.left.type==="MemberExpression"&&e.left.object.type==="Identifier"&&e.left.object.name==="module"&&e.left.property.type==="Identifier"&&e.left.property.name==="exports",e=>e.type!=="VariableDeclaration"||e.kind==="const"&&e.declarations.length===1)}function tli(i){let e=zf(i);return e.length>1&&e.some(t=>t.type==="TSParameterProperty")}function b9(i,e){return(e==="params"||e==="this"||e==="rest")&&Nnt(i)}function oli(i){return i.length===1?i:i.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}function Fnt(i,e){let{preferred:t,alternate:n}=e===!0||e==="'"?sli:ali,{length:r}=i,o=0,s=0;for(let a=0;as?n:t).character}function cli(i,e){let t=e==='"'?"'":'"',n=od(0,i,lli,(r,o,s)=>o?o===t?t:r:s===e?"\\"+s:s);return e+n+e}function dli(i,e){Nk(/^(?["']).*\k$/s.test(i));let t=i.slice(1,-1),n;return e.parser==="json"||e.parser==="jsonc"||e.parser==="json-stringify"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?n='"':e.__isInHtmlAttribute?n="'":n=Fnt(t,e.singleQuote),i.charAt(0)===n?i:uli(t,n)}function znt(i){return/^(?:\d+|\d+\.\d+)$/.test(i)}function fli(i,e){let t=_9(i);if(t.type==="Identifier")return!0;if(!QA(t)||hli(e))return!1;let n=C9(Ym(t));return String(t.value)===n&&znt(n)}function Vnt(i,e){let{parser:t}=e;if(t==="json"||t==="jsonc")return!1;let n=_9(i);if(!Fu(n))return!1;let{value:r}=n;return Lk(Ym(n),e).slice(1,-1)!==r||i.type==="TSMethodSignature"&&r==="new"?!1:!!(!(t==="babel-ts"&&i.type==="ClassProperty"||(t==="typescript"||t==="oxc-ts"||t==="yuku-ts")&&i.type==="PropertyDefinition")&&rli(r)||(t==="babel"||t==="acorn"||t==="oxc"||t==="yuku"||t==="espree"||t==="meriyah"||t==="__babel_estree")&&i.type!=="ImportAttribute"&&znt(r)&&String(Number(r))===r)}function Hnt(i,e){return Eb(pli,i.parent,()=>i.siblings.some(t=>{if(Bnt(t))return!1;let n=_9(t);return Fu(n)&&!Vnt(t,e)}))}function mli(i,e){return(e.parser==="json"||e.parser==="jsonc"||e.quoteProps==="consistent"&&Hnt(i,e))&&fli(i.node,e)}function gli(i,e){return(e.quoteProps==="as-needed"||e.quoteProps==="consistent"&&!Hnt(i,e))&&Vnt(i.node,e)}function nS(i,e,t){let{node:n}=i,r=Pnt(n);if(Bnt(n))return["[",t(r),"]"];if(mli(i,e)){let o=_9(n),s=Lk(JSON.stringify(o.type==="Identifier"?o.name:String(o.value)),e);return i.call(()=>Oh(i,s,e),r)}if(gli(i,e)){let{value:o}=_9(n),s=/^\d/.test(o)?C9(o):o;return i.call(()=>Oh(i,s,e),r)}return t(r)}function Wnt(i){return i.key==="elementTypes"&&__e(i.parent)&&i.parent.elementTypes.length>1}function NX(i){let{types:e}=i;if(e.some(n=>$t(n)))return!1;let t=e.find(n=>vli(n));return t?e.every(n=>n===t||bli(n)):!1}function Unt(i){let{key:e,node:t,parent:n}=i;return!(NX(t)||e==="types"&&Jm(n)||e==="types"&&D9(n)||Wnt(i))}function jnt(i,e,t,n){let{node:r}=i;if(NX(r))return jr(" | ",i.map(t,"types"));let o=je(i.map(({isFirst:s})=>{let a=s?wr("| "):[li,"| "],l=t();return $t(i.node,fi.Leading)?[a,Xm(2,Oh(i,l,e))]:[a,Oh(i,Xm(2,l),e)]},"types"));return Unt(i)&&(o=Oh(i,o,e)),qm(i,e)?je([bt([dt,o]),dt]):Wnt(i)?je([bt([wr(["(",dt]),o]),dt,wr(")")]):n?.assignmentLayout==="break-after-operator"||!Ali(i)?o:je(bt([dt,o]))}function Ali(i){let{key:e,parent:t}=i;return!(e==="typeAnnotation"&&t.type==="TSTypeAssertion"||e==="elementTypes"&&__e(t)||(e==="trueType"||e==="falseType")&&tS(t)||e==="params"&&coi(t)||e==="typeAnnotation"&&t.type==="FunctionTypeParam"&&!t.name&&i.grandparent.this!==t||i.match(void 0,(n,r)=>r==="typeAnnotation"&&n.type==="FunctionTypeParam",(n,r)=>r==="params"&&n.type==="FunctionTypeAnnotation",(n,r)=>r==="value"&&n.type==="ObjectTypeProperty"&&j_e(n)))}function yli(i){return Q_e(i)||iS(i)?!0:Jm(i)?NX(i):!1}function Yd(i,e,t="typeAnnotation"){let{node:{[t]:n}}=i;if(!n)return"";let r=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let o=i.call(Qnt,t);(o==="=>"||o===":"&&$t(n,fi.Leading))&&(r=!0),wli.add(n)}return r?[" ",e(t)]:e(t)}function Gnt(i,e,t){let n=Qnt(i);return n?[n," ",t("typeAnnotation")]:t("typeAnnotation")}function X_e(i,e,t,n){if(xli(i))return Z_e(i,e,t);let{node:r}=i,o=!1;if(r.type==="FunctionExpression"&&n?.expandLastArg){let{parent:u}=i;Ts(u)&&(Db(u).length>1||zf(r).every(d=>d.type==="Identifier"&&!d.typeAnnotation))&&(o=!0)}let s=Vk(i,e,t,o),a=$_e(i,t),l=I9(r,a),c=r.type==="HookDeclaration"?"hook":"function";return[Zm(i),r.async?"async ":"",c,r.generator?"*":""," ",r.id?t("id"):"",t("typeParameters"),je([l?je(s):s,a]),r.body?" ":"",t("body"),r.declare||!r.body?pl(e):""]}function f_e(i,e,t){let{node:n}=i,{kind:r}=n,o=n.value||n,s=[];return!r||r==="init"||r==="method"||r==="constructor"?o.async&&s.push("async "):(Nk(r==="get"||r==="set"),s.push(r," ")),o.generator&&s.push("*"),s.push(nS(i,e,t),n.optional?"?":"",n===o?Z_e(i,e,t):t("value")),s}function Z_e(i,e,t){let{node:n}=i,r=Vk(i,e,t),o=$_e(i,t),s=tli(n),a=I9(n,o),l=[t("typeParameters"),je([s?je(r,{shouldBreak:!0}):a?je(r):r,o])];return n.body?l.push(" ",t("body")):l.push(pl(e)),l}function Cli(i){let e=zf(i);return e.length===1&&!i.typeParameters&&!$t(i,fi.Dangling)&&e[0].type==="Identifier"&&!e[0].typeAnnotation&&!$t(e[0])&&!e[0].optional&&!i.predicate&&!i.returnType}function qnt(i,e){if(e.arrowParens==="always")return!1;if(e.arrowParens==="avoid"){let{node:t}=i;return Cli(t)}return!1}function $_e(i,e){let{node:t}=i,n=[Yd(i,e,"returnType")];return t.predicate&&n.push(e("predicate")),n}function eSe(i,e){if(e.semi)return!1;let{node:t}=i;if(t.type!=="ExpressionStatement"||Knt(i,e)||Xnt(i,e)||Jnt(i,e))return!1;let{key:n,parent:r}=i;return!!((n==="body"&&(r.type==="Program"||r.type==="BlockStatement"||r.type==="StaticBlock"||r.type==="TSModuleBlock")||n==="consequent"&&r.type==="SwitchCase")&&i.call(()=>Ynt(i,e),"expression"))}function Ynt(i,e){let{node:t}=i;switch(t.type){case"ParenthesizedExpression":case"TypeCastExpression":case"TSTypeAssertion":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!qnt(i,e))return!0;break;case"UnaryExpression":{let{prefix:n,operator:r}=t;if(n&&(r==="+"||r==="-"))return!0;break}case"BindExpression":if(!t.object)return!0;break;case"Literal":if(t.regex)return!0;break;default:if(sd(t))return!0}return qm(i,e)?!0:V_e(t)?i.call(()=>Ynt(i,e),...lnt(t)):!1}function Knt(i,e){return(e.parentParser==="markdown"||e.parentParser==="mdx")&&tSe(i)&&sd(i.node.expression)}function Jnt(i,e){return e.__isHtmlInlineEventHandler&&tSe(i)}function Xnt(i,e){return(e.parser==="__vue_event_binding"||e.parser==="__vue_ts_event_binding")&&tSe(i)}function Znt(i,e){if(!eSe(i,e))return!1;let t=Ur(0,Km(i.node,fi.Leading),-1);return!!(t&&k_e(t))}function Sli(i,e){let{key:t,parent:n}=i;if(t==="types"&&Jm(n)||t==="argument"&&n.type==="JSXSpreadAttribute"||t==="expression"&&n.type==="JSXSpreadChild"||t==="superClass"&&(n.type==="ClassDeclaration"||n.type==="ClassExpression")||(t==="id"||t==="typeParameters")&&_li(n)||t==="patterns"&&n.type==="MatchOrPattern"||rnt(i))return!0;let{node:r}=i;return DX(r)?!1:r.type==="ExpressionStatement"?Znt(i,e):Jm(r)?Unt(i):!!sd(r)}function Dli(i,e,t=0){let n=0;for(let r=t;r[t(),o?"":n[s]],"quasis");return[Sb,"`",...r,"`"]}function Lli(i,e,t){let n=t("quasi"),{node:r}=i,o="",s=Km(r.quasi,fi.Leading)[0];return s&&(Rp(e.originalText,tn(r.typeArguments??r.tag),yn(s))?o=dt:o=" "),k9(n.label&&{tagged:!0,...n.label},[t("tag"),t("typeArguments"),o,Sb,n])}function Nli(i,e,t){let{node:n}=i,r=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(r.length>1||r.some(o=>o.length>0)){e.__inJestEach=!0;let o=L9(i,e,t);e.__inJestEach=!1;let s=o.map(d=>_nt(d,{...e,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted),a=[{hasLineBreak:!1,cells:[]}];for(let d=1;d{Is();Za();u9();so();tg();So();Xc();ty();cA();kX()});function aI(i,e,t){if(i){if(i.kind===W.VARIABLE){let n=i.name.value;if(t==null||!Object.hasOwn(t,n))return;let o=t[n];return o===void 0||o===null&&Si(e)?void 0:o}if(Si(e))return i.kind===W.NULL?void 0:aI(i,e.ofType,t);if(i.kind===W.NULL)return null;if(Cn(e)){let n=e.ofType;if(i.kind===W.LIST){let r=[];for(let s of i.values)if(_$e(s,t)){if(Si(n))return;r.push(null)}else{let a=aI(s,n,t);if(a===void 0)return;r.push(a)}return r}let o=aI(i,n,t);return o===void 0?void 0:[o]}if(Bi(e)){if(i.kind!==W.OBJECT)return;let n=Object.create(null),o=e.getFields();if(i.fields.some(a=>!Object.hasOwn(o,a.name.value)))return;let s=new Map(i.fields.map(a=>[a.name.value,a]));for(let a of Object.values(o)){let l=s.get(a.name);if(l==null||_$e(l.value,t)){if(a.defaultValue!==void 0)n[a.name]=a.defaultValue;else if(Si(a.type))return;continue}let c=aI(l.value,a.type,t);if(c===void 0)return;n[a.name]=c}if(e.isOneOf){let a=Object.keys(n);if(s.size!==1||a.length!==1)return;for(let[l,c]of s)if(c.value.kind===W.NULL||n[l]===null)return}return n}if(hd(e)){let n;try{n=e.parseLiteral(i,t)}catch{return}return n===void 0?void 0:n}Di(!1,"Unexpected input type: "+Xe(e))}}function _$e(i,e){return i.kind===W.VARIABLE&&(e?.[i.name.value]===void 0||!Object.hasOwn(e,i.name.value))}var S$e=D(()=>{Is();Za();so();So()});function l_e(i){let e=[];for(let t of i)e.push(...t.definitions);return{kind:W.DOCUMENT,definitions:e}}var E$e=D(()=>{so()});function c_e(i){let e=[],t=Object.create(null);for(let o of i.definitions)switch(o.kind){case W.OPERATION_DEFINITION:e.push(o);break;case W.FRAGMENT_DEFINITION:t[o.name.value]=D$e(o.selectionSet);break;default:}let n=Object.create(null);for(let o of e){let r=new Set;for(let a of D$e(o.selectionSet))T$e(r,t,a);let s=o.name?o.name.value:"";n[s]={kind:W.DOCUMENT,definitions:i.definitions.filter(a=>a===o||a.kind===W.FRAGMENT_DEFINITION&&r.has(a.name.value))}}return n}function T$e(i,e,t){if(!i.has(t)){i.add(t);let n=e[t];if(n!==void 0)for(let o of n)T$e(i,e,o)}}function D$e(i){let e=[];return ca(i,{FragmentSpread(t){e.push(t.name.value)}}),e}var k$e=D(()=>{so();Bk()});function u_e(i){let e=O9(i)?i:new fA(i),t=e.body,n=new Zw(e),o="",r=!1;for(;n.advance().kind!==Ke.EOF;){let s=n.token,a=s.kind,l=!NX(s.kind);r&&(l||s.kind===Ke.SPREAD)&&(o+=" ");let c=t.slice(s.start,s.end);a===Ke.BLOCK_STRING?o+=vX(s.value,{minimize:!0}):o+=c,r=l}return o}var I$e=D(()=>{u9();F9();FX();KR()});function d_e(i,e){return V7(i,e).filter(t=>t.type in Al)}function h_e(i,e){return V7(i,e).filter(t=>t.type in qf)}function V7(i,e){return[...nYt(i,e),...iYt(i,e)]}function iYt(i,e){let t=[],n=nx(i.getDirectives(),e.getDirectives());for(let o of n.removed)t.push({type:Al.DIRECTIVE_REMOVED,description:`Directive ${o} was removed.`});for(let o of n.added)t.push({type:bl.DIRECTIVE_ADDED,description:`Directive @${o.name} was added.`});for(let[o,r]of n.persisted){let s=nx(o.args,r.args);for(let a of s.added)Qh(a)?t.push({type:Al.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required argument ${a} was added.`}):t.push({type:bl.OPTIONAL_DIRECTIVE_ARG_ADDED,description:`An optional argument @${o.name}(${a.name}:) was added.`});for(let a of s.removed)t.push({type:Al.DIRECTIVE_ARG_REMOVED,description:`Argument ${a} was removed.`});for(let[a,l]of s.persisted){let c=AF(a.type,l.type),u=vF(a),d=vF(l);c?u!==void 0?d===void 0?t.push({type:qf.ARG_DEFAULT_VALUE_CHANGE,description:`@${o.name}(${a.name}:) defaultValue was removed.`}):u!==d&&t.push({type:qf.ARG_DEFAULT_VALUE_CHANGE,description:`@${o.name}(${a.name}:) has changed defaultValue from ${u} to ${d}.`}):d!==void 0&&u===void 0?t.push({type:bl.ARG_DEFAULT_VALUE_ADDED,description:`@${o.name}(${a.name}:) added a defaultValue ${d}.`}):a.type.toString()!==l.type.toString()&&t.push({type:bl.ARG_CHANGED_KIND_SAFE,description:`Argument @${o.name}(${a.name}:) has changed type from ${String(a.type)} to ${String(l.type)}.`}):t.push({type:Al.ARG_CHANGED_KIND,description:`Argument @${o.name}(${a.name}:) has changed type from ${String(a.type)} to ${String(l.type)}.`}),a.description!==l.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of @${o.name}(${o.name}) has changed to "${l.description}".`})}o.isRepeatable&&!r.isRepeatable?t.push({type:Al.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${o}.`}):r.isRepeatable&&!o.isRepeatable&&t.push({type:bl.DIRECTIVE_REPEATABLE_ADDED,description:`Repeatable flag was added to @${o.name}.`}),o.description!==r.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of @${o.name} has changed to "${r.description}".`});for(let a of o.locations)r.locations.includes(a)||t.push({type:Al.DIRECTIVE_LOCATION_REMOVED,description:`${a} was removed from ${o}.`});for(let a of r.locations)o.locations.includes(a)||t.push({type:bl.DIRECTIVE_LOCATION_ADDED,description:`${a} was added to @${o.name}.`})}return t}function nYt(i,e){let t=[],n=nx(Object.values(i.getTypeMap()),Object.values(e.getTypeMap()));for(let o of n.removed)t.push({type:Al.TYPE_REMOVED,description:Gw(o)?`Standard scalar ${o} was removed because it is not referenced anymore.`:`${o} was removed.`});for(let o of n.added)t.push({type:bl.TYPE_ADDED,description:`${o} was added.`});for(let[o,r]of n.persisted)o.description!==r.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of ${o.name} has changed to "${r.description}".`}),Oo(o)&&Oo(r)?t.push(...sYt(o,r)):ys(o)&&ys(r)?t.push(...rYt(o,r)):Bi(o)&&Bi(r)?t.push(...oYt(o,r)):en(o)&&en(r)?t.push(...N$e(o,r),...L$e(o,r)):cn(o)&&cn(r)?t.push(...N$e(o,r),...L$e(o,r)):o.constructor!==r.constructor&&t.push({type:Al.TYPE_CHANGED_KIND,description:`${o} changed from ${M$e(o)} to ${M$e(r)}.`});return t}function oYt(i,e){let t=[],n=nx(Object.values(i.getFields()),Object.values(e.getFields()));for(let o of n.added)Gh(o)?t.push({type:Al.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${o} was added.`}):t.push({type:qf.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${o} was added.`});for(let o of n.removed)t.push({type:Al.FIELD_REMOVED,description:`Field ${o} was removed.`});for(let[o,r]of n.persisted){let s=AF(o.type,r.type),a=vF(o),l=vF(r);s?a!==void 0?l===void 0?t.push({type:qf.INPUT_FIELD_DEFAULT_VALUE_CHANGE,description:`${o} defaultValue was removed.`}):a!==l&&t.push({type:qf.INPUT_FIELD_DEFAULT_VALUE_CHANGE,description:`${o} has changed defaultValue from ${a} to ${l}.`}):l!==void 0&&a===void 0?t.push({type:bl.INPUT_FIELD_DEFAULT_VALUE_ADDED,description:`${o} added a defaultValue ${l}.`}):o.type.toString()!==r.type.toString()&&t.push({type:bl.FIELD_CHANGED_KIND_SAFE,description:`Field ${i}.${o.name} changed type from ${String(o.type)} to ${String(r.type)}.`}):t.push({type:Al.FIELD_CHANGED_KIND,description:`Field ${r} changed type from ${o.type} to ${r.type}.`}),o.description!==r.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of input-field ${e}.${r.name} has changed to "${r.description}".`})}return t}function rYt(i,e){let t=[],n=nx(i.getTypes(),e.getTypes());for(let o of n.added)t.push({type:qf.TYPE_ADDED_TO_UNION,description:`${o} was added to union type ${i}.`});for(let o of n.removed)t.push({type:Al.TYPE_REMOVED_FROM_UNION,description:`${o} was removed from union type ${i}.`});return t}function sYt(i,e){let t=[],n=nx(i.getValues(),e.getValues());for(let o of n.added)t.push({type:qf.VALUE_ADDED_TO_ENUM,description:`Enum value ${o} was added.`});for(let o of n.removed)t.push({type:Al.VALUE_REMOVED_FROM_ENUM,description:`Enum value ${o} was removed.`});for(let[o,r]of n.persisted)o.description!==r.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of enum value ${i}.${o.name} has changed to "${r.description}".`});return t}function L$e(i,e){let t=[],n=nx(i.getInterfaces(),e.getInterfaces());for(let o of n.added)t.push({type:qf.IMPLEMENTED_INTERFACE_ADDED,description:`${o} added to interfaces implemented by ${i}.`});for(let o of n.removed)t.push({type:Al.IMPLEMENTED_INTERFACE_REMOVED,description:`${i} no longer implements interface ${o}.`});return t}function N$e(i,e){let t=[],n=nx(Object.values(i.getFields()),Object.values(e.getFields()));for(let o of n.removed)t.push({type:Al.FIELD_REMOVED,description:`Field ${o} was removed.`});for(let o of n.added)t.push({type:bl.FIELD_ADDED,description:`Field ${i}.${o.name} was added.`});for(let[o,r]of n.persisted)t.push(...aYt(o,r)),z7(o.type,r.type)?o.type.toString()!==r.type.toString()&&t.push({type:bl.FIELD_CHANGED_KIND_SAFE,description:`Field ${i}.${o.name} changed type from ${String(o.type)} to ${String(r.type)}.`}):t.push({type:Al.FIELD_CHANGED_KIND,description:`Field ${r} changed type from ${o.type} to ${r.type}.`}),o.description!==r.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of field ${i}.${o.name} has changed to "${r.description}".`});return t}function aYt(i,e){let t=[],n=nx(i.args,e.args);for(let o of n.removed)t.push({type:Al.ARG_REMOVED,description:`Argument ${o} was removed.`});for(let[o,r]of n.persisted){let s=AF(o.type,r.type),a=vF(o),l=vF(r);s?a!==void 0?l===void 0?t.push({type:qf.ARG_DEFAULT_VALUE_CHANGE,description:`${o} defaultValue was removed.`}):a!==l&&t.push({type:qf.ARG_DEFAULT_VALUE_CHANGE,description:`${o} has changed defaultValue from ${a} to ${l}.`}):l!==void 0&&a===void 0?t.push({type:bl.ARG_DEFAULT_VALUE_ADDED,description:`${o} added a defaultValue ${l}.`}):o.type.toString()!==r.type.toString()&&t.push({type:bl.ARG_CHANGED_KIND_SAFE,description:`Argument ${o} has changed type from ${String(o.type)} to ${String(r.type)}.`}):t.push({type:Al.ARG_CHANGED_KIND,description:`Argument ${r} has changed type from ${o.type} to ${r.type}.`}),o.description!==r.description&&t.push({type:bl.DESCRIPTION_CHANGED,description:`Description of argument ${o} has changed to "${r.description}".`})}for(let o of n.added)Qh(o)?t.push({type:Al.REQUIRED_ARG_ADDED,description:`A required argument ${o} was added.`}):t.push({type:qf.OPTIONAL_ARG_ADDED,description:`An optional argument ${o} was added.`});return t}function z7(i,e){return Cn(i)?Cn(e)&&z7(i.ofType,e.ofType)||Si(e)&&z7(i,e.ofType):Si(i)?Si(e)&&z7(i.ofType,e.ofType):og(e)&&i.name===e.name||Si(e)&&z7(i,e.ofType)}function AF(i,e){return Cn(i)?Cn(e)&&AF(i.ofType,e.ofType):Si(i)?Si(e)&&AF(i.ofType,e.ofType)||!Si(e)&&AF(i.ofType,e):og(e)&&i.name===e.name}function M$e(i){if(yc(i))return"a Scalar type";if(en(i))return"an Object type";if(cn(i))return"an Interface type";if(ys(i))return"a Union type";if(Oo(i))return"an Enum type";if(Bi(i))return"an Input type";Di(!1,"Unexpected type: "+Xe(i))}function vF(i){let e=qR(i);if(e)return Rn(eI(e))}function nx(i,e){let t=[],n=[],o=[],r=Hw(i,({name:a})=>a),s=Hw(e,({name:a})=>a);for(let a of i){let l=s[a.name];l===void 0?n.push(a):o.push([a,l])}for(let a of e)r[a.name]===void 0&&t.push(a);return{added:t,persisted:o,removed:n}}var Al,qf,bl,R$e=D(()=>{Is();Za();o9();tg();So();cA();kX();zxe();Al={TYPE_REMOVED:"TYPE_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",REQUIRED_INPUT_FIELD_ADDED:"REQUIRED_INPUT_FIELD_ADDED",IMPLEMENTED_INTERFACE_REMOVED:"IMPLEMENTED_INTERFACE_REMOVED",FIELD_REMOVED:"FIELD_REMOVED",FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",REQUIRED_ARG_ADDED:"REQUIRED_ARG_ADDED",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",REQUIRED_DIRECTIVE_ARG_ADDED:"REQUIRED_DIRECTIVE_ARG_ADDED",DIRECTIVE_REPEATABLE_REMOVED:"DIRECTIVE_REPEATABLE_REMOVED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED"},qf={VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",IMPLEMENTED_INTERFACE_ADDED:"IMPLEMENTED_INTERFACE_ADDED",ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE",INPUT_FIELD_DEFAULT_VALUE_CHANGE:"INPUT_FIELD_DEFAULT_VALUE_CHANGE"},bl={DESCRIPTION_CHANGED:"DESCRIPTION_CHANGED",TYPE_ADDED:"TYPE_ADDED",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",DIRECTIVE_ADDED:"DIRECTIVE_ADDED",FIELD_ADDED:"FIELD_ADDED",DIRECTIVE_REPEATABLE_ADDED:"DIRECTIVE_REPEATABLE_ADDED",DIRECTIVE_LOCATION_ADDED:"DIRECTIVE_LOCATION_ADDED",OPTIONAL_DIRECTIVE_ARG_ADDED:"OPTIONAL_DIRECTIVE_ARG_ADDED",FIELD_CHANGED_KIND_SAFE:"FIELD_CHANGED_KIND_SAFE",ARG_CHANGED_KIND_SAFE:"ARG_CHANGED_KIND_SAFE",ARG_DEFAULT_VALUE_ADDED:"ARG_DEFAULT_VALUE_ADDED",INPUT_FIELD_DEFAULT_VALUE_ADDED:"INPUT_FIELD_DEFAULT_VALUE_ADDED"}});function f_e(i,e){return SZ(i,B9(e))}function lYt(i,e){let t=e.name.value,n=i.getType(t);if(n!=null)return{kind:"NamedType",type:n}}function cYt(i,e){let t=e.name.value,n=i.getType(t);if(!n)throw new Error(`Expected ${Xe(t)} to be defined as a type in the schema.`);if(!Oo(n)&&!Bi(n)&&!en(n)&&!cn(n))throw new Error(`Expected ${Xe(t)} to be an Enum, Input Object, Object or Interface type.`);if(Oo(n)){let s=e.memberName.value,a=n.getValue(s);return a==null?void 0:{kind:"EnumValue",type:n,enumValue:a}}if(Bi(n)){let s=e.memberName.value,a=n.getFields()[s];return a==null?void 0:{kind:"InputField",type:n,inputField:a}}let o=e.memberName.value,r=i.getField(n,o);if(r!=null)return{kind:"Field",type:n,field:r}}function uYt(i,e){let t=e.name.value,n=i.getType(t);if(n==null)throw new Error(`Expected ${Xe(t)} to be defined as a type in the schema.`);if(!en(n)&&!cn(n))throw new Error(`Expected ${Xe(t)} to be an object type or interface type.`);let o=e.fieldName.value,r=i.getField(n,o);if(r==null)throw new Error(`Expected ${Xe(o)} to exist as a field of type ${Xe(t)} in the schema.`);let s=e.argumentName.value,a=r.args.find(l=>l.name===s);if(a!=null)return{kind:"FieldArgument",type:n,field:r,fieldArgument:a}}function dYt(i,e){let t=e.name.value,n=i.getDirective(t);if(n)return{kind:"Directive",directive:n}}function hYt(i,e){let t=e.name.value,n=i.getDirective(t);if(!n)throw new Error(`Expected ${Xe(t)} to be defined as a directive in the schema.`);let{argumentName:{value:o}}=e,r=n.args.find(s=>s.name===o);if(r)return{kind:"DirectiveArgument",directive:n,directiveArgument:r}}function SZ(i,e){switch(e.kind){case W.TYPE_COORDINATE:return lYt(i,e);case W.MEMBER_COORDINATE:return cYt(i,e);case W.ARGUMENT_COORDINATE:return uYt(i,e);case W.DIRECTIVE_COORDINATE:return dYt(i,e);case W.DIRECTIVE_ARGUMENT_COORDINATE:return hYt(i,e)}}var F$e=D(()=>{Is();so();Zk();So()});var O$e=D(()=>{JCe();SCe();p$e();m$e();g$e();i_e();A$e();C$e();pA();S$e();Owe();nxe();PX();DX();A9();Xxe();w9();E$e();k$e();I$e();b9();R$e();F$e()});var P$e={};ad(P$e,{AbortedGraphQLExecutionError:()=>oI,BREAK:()=>$v,BreakingChangeType:()=>Al,DEFAULT_DEPRECATION_REASON:()=>jR,DangerousChangeType:()=>qf,DeferStreamDirectiveLabelRule:()=>z9,DeferStreamDirectiveOnRootFieldRule:()=>V9,DeferStreamDirectiveOnValidOperationsRule:()=>H9,DirectiveLocation:()=>pi,ExecutableDefinitionsRule:()=>j9,FieldsOnCorrectTypeRule:()=>Q9,FragmentsOnCompositeTypesRule:()=>G9,GRAPHQL_MAX_INT:()=>hS,GRAPHQL_MIN_INT:()=>fS,GraphQLBoolean:()=>Gl,GraphQLDeferDirective:()=>uA,GraphQLDeprecatedDirective:()=>mS,GraphQLDirective:()=>wc,GraphQLEnumType:()=>th,GraphQLError:()=>Se,GraphQLFloat:()=>WR,GraphQLID:()=>UR,GraphQLIncludeDirective:()=>qw,GraphQLInputObjectType:()=>Gp,GraphQLInt:()=>HR,GraphQLInterfaceType:()=>Qp,GraphQLList:()=>Ks,GraphQLNonNull:()=>Pi,GraphQLObjectType:()=>vc,GraphQLOneOfDirective:()=>GR,GraphQLScalarType:()=>dd,GraphQLSchema:()=>Yp,GraphQLSkipDirective:()=>Yw,GraphQLSpecifiedByDirective:()=>QR,GraphQLStreamDirective:()=>rg,GraphQLString:()=>ws,GraphQLUnionType:()=>Lb,Kind:()=>W,KnownArgumentNamesRule:()=>q9,KnownDirectivesRule:()=>tF,KnownFragmentNamesRule:()=>Y9,KnownOperationTypesRule:()=>K9,KnownTypeNamesRule:()=>iF,Lexer:()=>Zw,Location:()=>Mk,LoneAnonymousOperationRule:()=>J9,LoneSchemaDefinitionRule:()=>X9,MaxIntrospectionDepthRule:()=>Z9,NoDeprecatedCustomRule:()=>YCe,NoFragmentCyclesRule:()=>$9,NoSchemaIntrospectionCustomRule:()=>KCe,NoUndefinedVariablesRule:()=>e7,NoUnusedFragmentsRule:()=>t7,NoUnusedVariablesRule:()=>i7,OperationTypeNode:()=>Ar,OverlappingFieldsCanBeMergedRule:()=>o7,PossibleFragmentSpreadsRule:()=>r7,PossibleTypeExtensionsRule:()=>s7,ProvidedRequiredArgumentsRule:()=>a7,SafeChangeType:()=>bl,ScalarLeafsRule:()=>l7,SchemaMetaFieldDef:()=>Kw,SingleFieldSubscriptionsRule:()=>u7,Source:()=>fA,StreamDirectiveOnListFieldRule:()=>d7,Token:()=>Zv,TokenKind:()=>Ke,TypeInfo:()=>sg,TypeKind:()=>xs,TypeMetaFieldDef:()=>Jw,TypeNameMetaFieldDef:()=>Xw,UniqueArgumentDefinitionNamesRule:()=>h7,UniqueArgumentNamesRule:()=>sF,UniqueDirectiveNamesRule:()=>f7,UniqueDirectivesPerLocationRule:()=>aF,UniqueEnumValueNamesRule:()=>p7,UniqueFieldDefinitionNamesRule:()=>m7,UniqueFragmentNamesRule:()=>g7,UniqueInputFieldNamesRule:()=>lF,UniqueOperationNamesRule:()=>b7,UniqueOperationTypesRule:()=>A7,UniqueTypeNamesRule:()=>v7,UniqueVariableNamesRule:()=>y7,ValidationContext:()=>iI,ValuesOfCorrectTypeRule:()=>w7,VariablesAreInputTypesRule:()=>x7,VariablesInAllowedPositionRule:()=>C7,__Directive:()=>C9,__DirectiveLocation:()=>_9,__EnumValue:()=>E9,__Field:()=>S9,__InputValue:()=>jk,__Schema:()=>Uk,__Type:()=>qp,__TypeKind:()=>D9,assertAbstractType:()=>Zwe,assertArgument:()=>Hwe,assertCompositeType:()=>Xwe,assertDirective:()=>ixe,assertEnumType:()=>Uwe,assertEnumValue:()=>jwe,assertEnumValueName:()=>h9,assertField:()=>Vwe,assertInputField:()=>Gwe,assertInputObjectType:()=>Qwe,assertInputType:()=>Kwe,assertInterfaceType:()=>p9,assertLeafType:()=>ng,assertListType:()=>qwe,assertName:()=>Uh,assertNamedType:()=>exe,assertNonNullType:()=>Ywe,assertNullableType:()=>m9,assertObjectType:()=>f9,assertOutputType:()=>Jwe,assertScalarType:()=>zwe,assertSchema:()=>Qk,assertType:()=>Bwe,assertUnionType:()=>Wwe,assertValidSchema:()=>Yk,assertWrappingType:()=>$we,astFromValue:()=>dA,buildASTSchema:()=>mF,buildClientSchema:()=>ix,buildSchema:()=>n_e,coerceInputLiteral:()=>oy,coerceInputValue:()=>ny,concatAST:()=>l_e,createSourceEventStream:()=>fZ,defaultFieldResolver:()=>N7,defaultHarness:()=>gZ,defaultTypeResolver:()=>mZ,doTypesOverlap:()=>zR,enableDevMode:()=>lXe,execute:()=>R7,executeRootSelectionSet:()=>uZ,executeSubscriptionEvent:()=>hZ,executeSync:()=>F7,experimentalExecuteIncrementally:()=>cZ,experimentalExecuteRootSelectionSet:()=>dZ,extendSchema:()=>e_e,findBreakingChanges:()=>d_e,findDangerousChanges:()=>h_e,findSchemaChanges:()=>V7,getArgumentValues:()=>mA,getDirectiveValues:()=>gA,getEnterLeaveForKind:()=>aS,getIntrospectionQuery:()=>tx,getLocation:()=>rS,getNamedType:()=>Vr,getNullableType:()=>Vk,getOperationAST:()=>T7,getVariableValues:()=>nF,graphql:()=>$Ze,graphqlSync:()=>e$e,introspectionFromSchema:()=>XCe,introspectionTypes:()=>Mb,isAbstractType:()=>zu,isArgument:()=>OR,isCompositeType:()=>jh,isConstValueNode:()=>W9,isDefinitionNode:()=>vxe,isDevModeEnabled:()=>cXe,isDirective:()=>pS,isEnumType:()=>Oo,isEnumValue:()=>SX,isEqualType:()=>Hk,isExecutableDefinitionNode:()=>XR,isField:()=>_X,isInputField:()=>EX,isInputObjectType:()=>Bi,isInputType:()=>Ql,isInterfaceType:()=>cn,isIntrospectionType:()=>Rb,isLeafType:()=>hd,isListType:()=>Cn,isNamedType:()=>og,isNonNullType:()=>Si,isNullableType:()=>PR,isObjectType:()=>en,isOutputType:()=>ig,isRequiredArgument:()=>Qh,isRequiredInputField:()=>Gh,isScalarType:()=>yc,isSchema:()=>YR,isSchemaCoordinateNode:()=>xxe,isSelectionNode:()=>yxe,isSpecifiedDirective:()=>gS,isSpecifiedScalarType:()=>Gw,isSubscriptionOperationDefinitionNode:()=>U9,isType:()=>Uw,isTypeDefinitionNode:()=>iy,isTypeExtensionNode:()=>eF,isTypeNode:()=>wxe,isTypeSubTypeOf:()=>sA,isTypeSystemDefinitionNode:()=>ZR,isTypeSystemExtensionNode:()=>$R,isUnionType:()=>ys,isValueNode:()=>BX,isWrappingType:()=>jw,legacyExecuteIncrementally:()=>qCe,legacyExecuteRootSelectionSet:()=>yZ,lexicographicSortSchema:()=>o_e,locatedError:()=>bA,mapSourceToResponseEvent:()=>M7,parse:()=>Zc,parseConstValue:()=>P9,parseSchemaCoordinate:()=>B9,parseType:()=>fxe,parseValue:()=>hxe,print:()=>Rn,printDirective:()=>CZ,printIntrospectionSchema:()=>s_e,printLocation:()=>n9,printSchema:()=>bF,printSourceLocation:()=>LR,printType:()=>xZ,recommendedRules:()=>qX,replaceVariables:()=>ey,resolveASTSchemaCoordinate:()=>SZ,resolveObjMapThunk:()=>BR,resolveReadonlyArrayThunk:()=>g9,resolveSchemaCoordinate:()=>f_e,responsePathAsArray:()=>Ls,separateOperations:()=>c_e,specifiedDirectives:()=>qh,specifiedRules:()=>_7,specifiedScalarTypes:()=>Nb,stripIgnoredCharacters:()=>u_e,subscribe:()=>O7,syntaxError:()=>Ns,typeFromAST:()=>Cs,validate:()=>S7,validateExecutionArgs:()=>xS,validateInputLiteral:()=>Qw,validateInputValue:()=>dS,validateSchema:()=>bS,validateSubscriptionArgs:()=>pZ,valueFromAST:()=>aI,valueFromASTUntyped:()=>zk,valueToLiteral:()=>aA,version:()=>nXe,versionInfo:()=>oXe,visit:()=>ca,visitInParallel:()=>RR,visitWithTypeInfo:()=>ex});var ua=D(()=>{rXe();uXe();i$e();GCe();_Ce();so();n$e();c$e();h$e();f$e();O$e()});var Cnt={};ad(Cnt,{default:()=>Uet,languages:()=>xnt,options:()=>ynt,printers:()=>wnt});function FYt(i){return Array.isArray(i)&&i.length>0}function Ji(i){let e=new Set(i);return t=>e.has(t?.type)}function PYt(i){return this[i<0?this.length+i:i]}function zb(i,e,t){if(!i.has(e)){let n=t(e);i.set(e,n)}return i.get(e)}function zYt(i){let e=[];return i.this&&e.push(i.this),e.push(...i.params),i.rest&&e.push(i.rest),e}function Xf(i){return zb(VYt,i,zYt)}function HYt(i,e){let{node:t}=i,n=0,o=()=>e(i,n++);t.this&&i.call(o,"this"),i.each(o,"params"),t.rest&&i.call(o,"rest")}function WYt(i){if(i.rest)return!0;let e=Xf(i);return Go(0,e,-1)?.type==="RestElement"}function G_e({node:i,parent:e}){return i?.type!=="EmptyStatement"?!1:e.type==="IfStatement"?e.consequent===i||e.alternate===i:e.type==="DoWhileStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="ForStatement"||e.type==="LabeledStatement"||e.type==="WithStatement"||e.type==="WhileStatement"?e.body===i:!1}function kF(i){return i.method&&i.kind==="init"||i.kind==="get"||i.kind==="set"}function QZ(i){return i.range?.[1]??i.end}function yn(i){let e=i.range?.[0]??i.start,t=(i.declaration?.decorators??i.decorators)?.[0];return t?Math.min(yn(t),e):e}function tn(i){let{type:e}=i;return e==="IfStatement"?tn(i.alternate??i.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?tn(i.body):YYt.get(e)?.(i)??QZ(i)}function GZ(i,e){let t=yn(i);return Qet(t)&&t===yn(e)}function JYt(i,e){let t=tn(i);return Qet(t)&&t===tn(e)}function XYt(i,e){return GZ(i,e)&&JYt(i,e)}function lg(i){return i.extra?.raw??i.raw}function ZYt(i){return i.type==="BigIntLiteral"||i.type==="Literal"&&!!i.bigint}function $Yt(i){return i.type==="BooleanLiteral"||i.type==="Literal"&&typeof i.value=="boolean"}function cy(i){return i.type==="NumericLiteral"||i.type==="Literal"&&typeof i.value=="number"}function qet(i){return i.type==="RegExpLiteral"||i.type==="Literal"&&!!i.regex}function Hu(i){return i?.type==="StringLiteral"||i?.type==="Literal"&&typeof i.value=="string"}function k_e(i){if(i.type!=="ImportSpecifier"&&i.type!=="ExportSpecifier")return!1;let{local:e,[i.type==="ImportSpecifier"?"imported":"exported"]:t}=i;return e.type!==t.type||!XYt(e,t)?!1:Hu(e)?e.value===t.value&&lg(e)===lg(t):e.type==="Identifier"?e.name===t.name:!1}function lKt(i,e){return oKt(i)||rKt(i,e)||sKt(i,e)?!1:i.type==="EmptyStatement"?G_e({node:i,parent:e[0]}):!(aKt(i,e)||i.type==="TSTypeAnnotation"&&e[0].type==="TSPropertySignature")}function uKt(i){let e=i.type||i.kind||"(unknown type)",t=String(i.name||i.id&&(typeof i.id=="object"?i.id.name:i.id)||i.key&&(typeof i.key=="object"?i.key.name:i.key)||i.value&&(typeof i.value=="object"?"":String(i.value))||i.operator||"");return t.length>20&&(t=t.slice(0,19)+"\u2026"),e+(t?" "+t:"")}function K_e(i,e){(i.comments??(i.comments=[])).push(e),e.printed=!1,e.nodeDescription=uKt(i)}function $c(i,e){e.leading=!0,e.trailing=!1,K_e(i,e)}function Jp(i,e,t){e.leading=!1,e.trailing=!1,t&&(e.marker=t),K_e(i,e)}function Ra(i,e){e.leading=!1,e.trailing=!0,K_e(i,e)}function qZ(i){return(e,t,n)=>{if(t===!1)return!1;let o=!!n?.backwards,{length:r}=e,s=t;for(;s>=0&&se(i,0),"source"),t.options&&i.call(()=>e(i,1),"options")):t.type==="TSExternalModuleReference"?i.call(()=>e(i,0),"expression"):i.each(e,"arguments")}function ret(i,e){if(i.type==="ImportExpression"||i.type==="TSImportType"){if(e===0||e===(i.options?-2:-1))return["source"];if(i.options&&(e===1||e===-1))return["options"];throw new RangeError("Invalid argument index")}if(i.type==="TSExternalModuleReference"){if(e===0||e===-1)return["expression"]}else if(e<0&&(e=i.arguments.length+e),e>=0&&eDKt(i.originalText,t))}function Ket(i,e){let t=tn(i)-1;if(e.originalText[t]===")")return t}function kKt(i,e){if(Ket(i,e)===void 0)return;let t=Hb(e),n=tn(i.typeArguments??i.callee),o=t.indexOf("(",n);if(o!==-1)return o}function IKt(i,e,t){let n=Ket(i,t);if(n===void 0||tn(e)>n)return!1;let o=kKt(i,t);return o===void 0?!1:yn(e)>o}function kS(i){return i?.type==="ObjectProperty"||i?.type==="Property"&&!kF(i)}function cI(i){return i.value.trim()==="prettier-ignore"&&!i.unignore}function Z_e(i){return zb(LKt,i,e=>yA(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function $_e({comment:i,enclosingNode:e,followingNode:t,options:n}){if((e?.type==="ForInStatement"||e?.type==="ForOfStatement"||e?.type==="ForStatement")&&t&&t===e.body){let o=Hb(n).lastIndexOf(")",yn(t));if(yn(i)>o)return $c(t,i),!0}return!1}function L_e(i,e){i.type==="BlockStatement"?sz(i,e):$c(i,e)}function sz(i,e){let t=(i.body||i.properties).find(({type:n})=>n!=="EmptyStatement");t?$c(t,e):Jp(i,e)}function tSe({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o,options:r}){return t?.type!=="IfStatement"||!n?!1:ay(o,tn(i))===")"?(Ra(e,i),!0):n===t.consequent?($c(n,i),!0):e===t.consequent&&n===t.alternate?NKt({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o,options:r}):!1}function NKt({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o,options:r}){let s=Hb(r).indexOf("else",tn(t.consequent));return yn(i)>=s?($c(n,i),!0):e.type!=="BlockStatement"&&eSe(i,o)&&!Xp(o,tn(e),yn(i))?(Ra(e,i),!0):(Jp(t,i),!0)}function iSe({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o}){return t?.type==="SwitchStatement"&&t.cases.length===0&&!n&&e===t.discriminant&&ay(o,tn(i))==="}"?(Jp(t,i),!0):!1}function nSe({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o}){return(t?.type==="WhileStatement"||t?.type==="WithStatement")&&n?ay(o,tn(i))===")"?(Ra(e,i),!0):t.body===n?($c(n,i),!0):!1:!1}function Xet(i,{comment:e,text:t,options:n}){if(ug(i)&&Jet(e,t)&&!cI(e)){let o=Hb(n).slice(tn(e),yn(i));return/^[ \t]*$/.test(o)}return!1}function set(i,e){return $c(Xet(i,e)?i.types[0]:i,e.comment),!0}function MKt(i){return[oSe,att,$et,ntt,PKt,tSe,nSe,iSe,Zet,ett,$_e,jKt,QKt,rSe,rtt,qKt,ttt,ott,BKt,eJt,sSe,aSe,ctt].some(e=>e(i))}function RKt(i){return[oSe,OKt,ntt,$et,rtt,tSe,nSe,iSe,Zet,ett,$_e,ott,UKt,GKt,rSe,stt,ZKt,$Kt,tJt,sSe,oJt,ltt,iJt,aSe].some(e=>e(i))}function FKt(i){return[oSe,att,tSe,nSe,iSe,$_e,ttt,rSe,stt,sSe,HKt,VKt,JKt,ltt,aSe,ctt].some(e=>e(i))}function OKt({comment:i,followingNode:e}){return e&&Z_e(i)?($c(e,i),!0):!1}function Zet({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){return t?.type!=="TryStatement"&&t?.type!=="CatchClause"||!n?!1:t.type==="CatchClause"&&e?(Ra(e,i),!0):n.type==="BlockStatement"?(sz(n,i),!0):n.type==="TryStatement"?(L_e(n.finalizer,i),!0):n.type==="CatchClause"?(L_e(n.body,i),!0):!1}function PKt({comment:i,enclosingNode:e,followingNode:t}){return Xs(e)&&t?.type==="Identifier"?($c(e,i),!0):!1}function BKt({comment:i,enclosingNode:e,followingNode:t,options:n}){return!n.experimentalTernaries||!(e?.type==="ConditionalExpression"||SS(e))?!1:t?.type==="ConditionalExpression"||SS(t)?(Jp(e,i),!0):!1}function $et({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o,options:r}){let s=e&&!Xp(o,tn(e),yn(i));return(!e||!s)&&(t?.type==="ConditionalExpression"||SS(t))&&n?r.experimentalTernaries&&t.alternate===n&&!(yA(i)&&!Xp(r.originalText,yn(i),tn(i)))?(Jp(t,i),!0):($c(n,i),!0):!1}function ett({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){if(zKt(t)){let{decorators:o}=t;if(Zs(o)&&n?.type!=="Decorator")return Ra(Go(0,o,-1),i),!0;if(t.body&&n===t.body)return sz(t.body,i),!0;if(n){let{superClass:r}=t;if(r&&n===r&&e&&(e===t.id||e===t.typeParameters))return Ra(e,i),!0;for(let s of["implements","extends","mixins"])if(t[s]&&n===t[s][0])return e&&(e===t.id||e===t.typeParameters||e===r)?Ra(e,i):Jp(t,i,s),!0}}return!1}function ttt({placement:i,comment:e,precedingNode:t,enclosingNode:n,followingNode:o,text:r}){return n&&t&&ay(r,tn(e))==="("&&(n.type==="Property"||n.type==="TSDeclareMethod"||n.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&n.key===t&&ay(r,tn(t))!==":"?(Ra(t,e),!0):aet(n)&&!o&&i==="remaining"?(Ra(ay(r,tn(e))==="("?t:n,e),!0):t?.type==="Decorator"&&aet(n)&&(TS(e)||i==="ownLine")?(Ra(t,e),!0):!1}function VKt({comment:i,precedingNode:e,enclosingNode:t,text:n}){return ay(n,tn(i))!=="("?!1:e&&itt(t)?(Ra(e,i),!0):!1}function HKt({comment:i,enclosingNode:e,text:t}){if(e?.type!=="ArrowFunctionExpression")return!1;let n=YZ(t,tn(i));return n!==!1&&t.slice(n,n+2)==="=>"?(Jp(e,i,"commentBeforeArrow"),!0):!1}function cet(i,e,t){let n=yn(e),o=tn(i);if(n>=o)return!1;let r=tn(e),s=yn(i);if(r<=s)return!1;let a=Hb(t);return a.slice(0,yn(e)).trimEnd().endsWith("(")&&a.slice(tn(e)).trimStart().startsWith(")")}function oSe({comment:i,enclosingNode:e,options:t}){if(!e)return!1;if(SF(e)&&Vb(e).length===0&&cet(e,i,t))return Jp(e,i),!0;let n=utt(e)||WKt(e)||e.type==="HookTypeAnnotation"?e:e.type==="MethodDefinition"||e.type==="TSAbstractMethodDefinition"||e.type==="Property"&&kF(e)?e.value:void 0;return n&&Xf(n).length===0&&cet(n,i,t)?(Jp(n,i),!0):!1}function ntt({comment:i,precedingNode:e,enclosingNode:t,followingNode:n,text:o}){return e?.type==="FunctionTypeParam"&&t?.type==="FunctionTypeAnnotation"&&n?.type!=="FunctionTypeParam"||e?.type==="ComponentTypeParameter"&&(t?.type==="DeclareComponent"||t?.type==="ComponentTypeAnnotation")&&n?.type!=="ComponentTypeParameter"||(e?.type==="Identifier"||e?.type==="AssignmentPattern"||e?.type==="ObjectPattern"||e?.type==="ArrayPattern"||e?.type==="RestElement"||e?.type==="TSParameterProperty")&&(utt(t)||(t?.type==="TSAbstractMethodDefinition"||t?.type==="MethodDefinition")&&t.value.type==="TSEmptyBodyFunctionExpression")&&ay(o,tn(i))===")"||(e?.type==="ComponentParameter"||e?.type==="RestElement")&&(t?.type==="ComponentDeclaration"||t?.type==="DeclareComponent")&&ay(o,tn(i))===")"?(Ra(e,i),!0):!yA(i)&&n?.type==="BlockStatement"&&itt(t)&&(t.type==="MethodDefinition"?t.value.body:t.body)===n&&YZ(o,tn(i))===yn(n)?(sz(n,i),!0):!1}function ott({comment:i,enclosingNode:e}){return e?.type==="LabeledStatement"?($c(e,i),!0):!1}function UKt({comment:i,precedingNode:e,enclosingNode:t,options:n}){return Z7(t)&&t.callee===e&&t.arguments.length>0&&IKt(t,i,n)?($c(t.arguments[0],i),!0):!1}function jKt({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){return ug(t)?(cI(i)&&(n.prettierIgnore=!0,i.unignore=!0),e?(Ra(e,i),!0):!1):(ug(n)&&cI(i)&&(n.types[0].prettierIgnore=!0,i.unignore=!0),!1)}function QKt({comment:i,precedingNode:e,enclosingNode:t,followingNode:n}){return t&&t.type==="MatchOrPattern"?(cI(i)&&(n.prettierIgnore=!0,i.unignore=!0),e?(Ra(e,i),!0):!1):(n&&n.type==="MatchOrPattern"&&cI(i)&&(n.types[0].prettierIgnore=!0,i.unignore=!0),!1)}function GKt({comment:i,enclosingNode:e}){return kS(e)?($c(e,i),!0):!1}function rSe({comment:i,enclosingNode:e,ast:t,isLastComment:n}){return t?.body?.length===0?(n?Jp(t,i):$c(t,i),!0):e?.type==="Program"&&e.body.length===0&&!Zs(e.directives)?(n?Jp(e,i):$c(e,i),!0):!1}function rtt({comment:i,precedingNode:e,enclosingNode:t,text:n}){if(t?.type==="ImportSpecifier"||t?.type==="ExportSpecifier")return $c(t,i),!0;let o=e?.type==="ImportSpecifier"&&t?.type==="ImportDeclaration",r=e?.type==="ExportSpecifier"&&t?.type==="ExportNamedDeclaration";return(o||r)&&Vu(n,tn(i))?(Ra(e,i),!0):!1}function qKt({comment:i,enclosingNode:e}){return e?.type==="AssignmentPattern"?($c(e,i),!0):!1}function stt(i){let{comment:e,enclosingNode:t,followingNode:n,options:o,placement:r}=i;if(YKt(t)&&n&&r==="endOfLine"&&(KKt(n)||yA(e)))return set(n,i);if(Yet(t)&&n){let s=t.id,a=Hb(o).indexOf("=",tn(s));if(yn(e)>=a)return set(n,i)}return!1}function JKt({comment:i,enclosingNode:e,precedingNode:t,followingNode:n,text:o}){return!n&&(e?.type==="TSMethodSignature"||e?.type==="TSDeclareFunction"||e?.type==="TSAbstractMethodDefinition")&&(!t||t!==e.returnType)&&ay(o,tn(i))===";"?(Ra(e,i),!0):!1}function att({comment:i,enclosingNode:e,followingNode:t}){if(cI(i)&&e?.type==="TSMappedType"&&t===e.key)return e.prettierIgnore=!0,i.unignore=!0,!0}function XKt(i,e,t){let n=Hb(t).indexOf("[",yn(i));return tn(e)",yn(e.body));return tn(i)r.type==="ForOfStatement"||r.type==="ForInStatement")?.left;if(o&&Yf(o,r=>r===e))return!0}if(t==="object"&&e.name==="let"&&n.type==="MemberExpression"&&n.computed&&!n.optional){let o=i.findAncestor(s=>s.type==="ExpressionStatement"||s.type==="ForStatement"||s.type==="ForInStatement"),r=o?o.type==="ExpressionStatement"?o.expression:o.type==="ForStatement"?o.init:o.left:void 0;if(r&&Yf(r,s=>s===e))return!0}if(t==="expression")switch(e.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let o=i.findAncestor(r=>!AA(r));if(o!==n&&o.type==="ExpressionStatement")return!0}}return!1}function bJt(i){return i!==null&&typeof i=="object"}function*AJt(i,e){let{getVisitorKeys:t,filter:n=()=>!0}=e,o=r=>ftt(r)&&n(r);for(let r of t(i)){let s=i[r];if(Array.isArray(s))for(let a of s)o(a)&&(yield a);else o(s)&&(yield s)}}function*vJt(i,e){let t=[i];for(let n=0;nVu(i,tn(t)))}function DJt(i,e){if(rx(e.originalText,i)||Yt(i,li.Leading,t=>Xp(e.originalText,yn(t),tn(t)))&&!md(i))return!0;if(cSe(i)){let t=i,n;for(;n=EJt(t);)if(t=n,rx(e.originalText,t))return!0}return!1}function btt(i,e){return zb(TJt,i,t=>DJt(t,e))}function IS(i){for(;fI(i);)i=i.expression;return i}function kJt(i,e,t){let{node:n,key:o,parent:r}=i;switch(r.type){case"ReturnStatement":case"ThrowStatement":if(IJt(i,e))return!1;break;case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(o==="superClass"){let s=IS(n);if(s.type==="ArrowFunctionExpression"||s.type==="AssignmentExpression"||s.type==="AwaitExpression"||s.type==="BinaryExpression"||s.type==="ConditionalExpression"||s.type==="LogicalExpression"||s.type==="NewExpression"||s.type==="ObjectExpression"||s.type==="SequenceExpression"||s.type==="TaggedTemplateExpression"||s.type==="UnaryExpression"||s.type==="UpdateExpression"||s.type==="YieldExpression"||s.type==="ClassExpression"&&Zs(s.decorators))return!0}break;case"ExportDefaultDeclaration":if(Att(i,e,t))return!0;break;case"Decorator":if(o==="expression"&&!LJt(n))return!0;break;case"TypeAnnotation":if(i.match(void 0,void 0,(s,a)=>a==="returnType"&&s.type==="ArrowFunctionExpression")&&!(n.type==="NullableTypeAnnotation"&&i.call(()=>t(i,e),"typeAnnotation"))&&NJt(n))return!0;break;case"VariableDeclarator":if(o==="init"&&i.match(void 0,void 0,(s,a)=>a==="declarations"&&s.type==="VariableDeclaration",(s,a)=>a==="left"&&s.type==="ForInStatement"))return!0;break;case"TSInstantiationExpression":if(o==="expression"&&(n.type==="AwaitExpression"||n.type==="YieldExpression"))return!0;break}}function IJt(i,e){let{key:t,parent:n}=i;if(!(t==="argument"&&_F(n)))return!1;let{node:o}=i;return!!((o.type==="SequenceExpression"||o.type==="AssignmentExpression")&&btt(o,e))}function Att(i,e,t){let{node:n,parent:o}=i;return n.type==="FunctionExpression"||n.type==="ClassExpression"?o.type==="ExportDefaultDeclaration"||!t(i,e):!cSe(n)||o.type!=="ExportDefaultDeclaration"&&t(i,e)?!1:i.call(()=>Att(i,e,t),...gtt(n))}function LJt(i){return i.type==="ChainExpression"&&(i=i.expression),R_e(i)||Ms(i)&&!i.optional&&R_e(i.callee)}function R_e(i){return i.type==="Identifier"?!0:Xs(i)?!i.computed&&!i.optional&&i.property.type==="Identifier"&&R_e(i.object):!1}function NJt(i){return M_e(i,e=>e.type==="ObjectTypeAnnotation"&&M_e(e,t=>t.type==="FunctionTypeAnnotation"))}function vtt(i,e){if(i.isRoot)return!1;let{node:t,key:n,parent:o}=i;if(e.__isInHtmlInterpolation&&!e.bracketSpacing&&FJt(t)&&q7(i))return!0;if(MJt(t))return!1;if(t.type==="Identifier")return gJt(i);if(t.type==="ObjectExpression"||t.type==="FunctionExpression"||t.type==="ClassExpression"||t.type==="DoExpression"){let s=i.findAncestor(a=>a.type==="ExpressionStatement")?.expression;if(s&&Yf(s,a=>a===t))return!0}if(t.type==="ObjectExpression"){let s=i.findAncestor(a=>a.type==="ArrowFunctionExpression")?.body;if(s&&s.type!=="SequenceExpression"&&s.type!=="AssignmentExpression"&&Yf(s,a=>a===t))return!0}let r=kJt(i,e,vtt);if(typeof r=="boolean")return r;switch(t.type){case"UpdateExpression":if(o.type==="UnaryExpression")return t.prefix&&(t.operator==="++"&&o.operator==="+"||t.operator==="--"&&o.operator==="-");case"UnaryExpression":switch(o.type){case"UnaryExpression":return t.operator===o.operator&&(t.operator==="+"||t.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&t.type==="UnaryExpression"&&(o.operator==="in"||o.operator==="instanceof")?!0:n==="left"&&o.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(o.type==="UpdateExpression"||t.operator==="in"&&RJt(i))return!0;if(t.operator==="|>"&&t.extra?.parenthesized){let s=i.grandparent;if(s.type==="BinaryExpression"&&s.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(o.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!AA(t);case"ConditionalExpression":return AA(t)||dJt(t);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"UnaryExpression":if(!Yt(t))return!0;break;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(t.type==="TSTypeAssertion"||AA(t));case"LogicalExpression":if(t.type==="LogicalExpression")return o.operator!==t.operator;case"BinaryExpression":{let{operator:s,type:a}=t;if(!s&&a!=="TSTypeAssertion")return!0;let l=BZ(s),c=o.operator,u=BZ(c);return!!(u>l||n==="right"&&u===l||u===l&&!lSe(c,s)||u");default:return!1}case"TSFunctionType":if(i.match(s=>s.type==="TSFunctionType",(s,a)=>a==="typeAnnotation"&&s.type==="TSTypeAnnotation",(s,a)=>a==="returnType"&&s.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":case"ConditionalTypeAnnotation":if(n==="extendsType"&&SS(t)&&o.type===t.type||n==="constraint"&&t.type==="TSConditionalType"&&o.type==="TSTypeParameter"||n==="typeAnnotation"&&t.type==="ConditionalTypeAnnotation"&&o.type==="TypeAnnotation"&&i.grandparent.type==="TypeParameter"&&i.grandparent.bound===o&&i.grandparent.usesExtendsBound||n==="checkType"&&SS(o))return!0;if(n==="extendsType"&&o.type==="TSConditionalType"){let{typeAnnotation:s}=t.returnType||t.typeAnnotation;if(s.type==="TSTypePredicate"&&s.typeAnnotation&&(s=s.typeAnnotation.typeAnnotation),s.type==="TSInferType"&&s.typeParameter.constraint)return!0}case"TSUnionType":case"TSIntersectionType":if(ug(o)||rz(o))return!0;case"TSInferType":if(t.type==="TSInferType"){if(o.type==="TSRestType")return!1;if(n==="types"&&(o.type==="TSUnionType"||o.type==="TSIntersectionType")&&t.typeParameter.type==="TSTypeParameter"&&t.typeParameter.constraint)return!0}case"TSTypeOperator":return o.type==="TSArrayType"||o.type==="TSOptionalType"||o.type==="TSRestType"||n==="objectType"&&o.type==="TSIndexedAccessType"||o.type==="TSTypeOperator"||o.type==="TSTypeAnnotation"&&i.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&o.type==="TSIndexedAccessType"||n==="elementType"&&o.type==="TSArrayType";case"TypeOperator":return o.type==="ArrayTypeAnnotation"||o.type==="NullableTypeAnnotation"||n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType")||o.type==="TypeOperator";case"TypeofTypeAnnotation":case"KeyofTypeAnnotation":return n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType")||n==="elementType"&&o.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return o.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return o.type==="TypeOperator"||o.type==="KeyofTypeAnnotation"||o.type==="ArrayTypeAnnotation"||o.type==="NullableTypeAnnotation"||o.type==="IntersectionTypeAnnotation"||o.type==="UnionTypeAnnotation"||n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":if(o.type==="ArrayTypeAnnotation"||n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType"))return!0;break;case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(t.type==="ComponentTypeAnnotation"&&(t.rendersType===null||t.rendersType===void 0))return!1;if(i.match(void 0,(a,l)=>l==="typeAnnotation"&&a.type==="TypeAnnotation",(a,l)=>l==="returnType"&&a.type==="ArrowFunctionExpression")||i.match(void 0,(a,l)=>l==="typeAnnotation"&&a.type==="NullableTypeAnnotation",(a,l)=>l==="typeAnnotation"&&a.type==="TypeAnnotation",(a,l)=>l==="returnType"&&a.type==="ArrowFunctionExpression")||i.match(void 0,(a,l)=>l==="typeAnnotation"&&a.type==="TypePredicate",(a,l)=>l==="typeAnnotation"&&a.type==="TypeAnnotation",(a,l)=>l==="returnType"&&a.type==="ArrowFunctionExpression"))return!0;let s=o.type==="NullableTypeAnnotation"?i.grandparent:o;return s.type==="UnionTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="checkType"&&o.type==="ConditionalTypeAnnotation"||n==="extendsType"&&o.type==="ConditionalTypeAnnotation"&&t.returnType?.type==="InferTypeAnnotation"&&t.returnType.typeParameter.bound||s.type==="NullableTypeAnnotation"||o.type==="FunctionTypeParam"&&o.name===null&&Xf(t).some(a=>a.typeAnnotation?.type==="NullableTypeAnnotation")}case"OptionalIndexedAccessType":return n==="objectType"&&o.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof t.value=="string"&&o.type==="ExpressionStatement"&&typeof o.directive!="string"){let s=i.grandparent;return s.type==="Program"||s.type==="BlockStatement"}return n==="object"&&Xs(o)&&cy(t);case"AssignmentExpression":return!((n==="init"||n==="update")&&o.type==="ForStatement"||n==="expression"&&t.left.type!=="ObjectPattern"&&o.type==="ExpressionStatement"||n==="key"&&o.type==="TSPropertySignature"||o.type==="AssignmentExpression"||n==="expressions"&&o.type==="SequenceExpression"&&i.match(void 0,void 0,(s,a)=>(a==="init"||a==="update")&&s.type==="ForStatement")||n==="value"&&o.type==="Property"&&i.match(void 0,void 0,(s,a)=>a==="properties"&&s.type==="ObjectPattern")||o.type==="NGChainedExpression"||n==="node"&&o.type==="JsExpressionRoot");case"ConditionalExpression":switch(o.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return e.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(o.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;case"ExportDefaultDeclaration":return n==="declaration";default:return!1}case"ArrowFunctionExpression":switch(o.type){case"BinaryExpression":return o.operator!=="|>"||t.extra?.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":case"MatchExpressionCase":return!0;case"TSInstantiationExpression":return n==="expression";case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(o.type){case"NewExpression":return n==="callee";case"ExportDefaultDeclaration":return n==="declaration";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"ChainExpression":case"TSNonNullExpression":if(mJt(i))return!0;case"CallExpression":case"MemberExpression":case"TaggedTemplateExpression":case"ImportExpression":if(n==="callee"&&(o.type==="BindExpression"||o.type==="NewExpression")){let s=t;for(;s;)switch(s.type){case"CallExpression":case"ImportExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":s=s.object;break;case"TaggedTemplateExpression":s=s.tag;break;case"TSNonNullExpression":s=s.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(o.type==="BindExpression"||o.type==="NewExpression")||n==="object"&&Xs(o);case"NGPipeExpression":return!(o.type==="NGRoot"||o.type==="NGMicrosyntaxExpression"||o.type==="ObjectProperty"&&!t.extra?.parenthesized||nh(o)||n==="arguments"&&Ms(o)||n==="right"&&o.type==="NGPipeExpression"||n==="property"&&o.type==="MemberExpression"||o.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&o.type==="BinaryExpression"&&o.operator==="<"||!nh(o)&&o.type!=="ArrowFunctionExpression"&&o.type!=="AssignmentExpression"&&o.type!=="AssignmentPattern"&&o.type!=="BinaryExpression"&&o.type!=="ConditionalExpression"&&o.type!=="ExpressionStatement"&&o.type!=="JsExpressionRoot"&&o.type!=="JSXAttribute"&&o.type!=="JSXElement"&&o.type!=="JSXExpressionContainer"&&o.type!=="JSXFragment"&&o.type!=="LogicalExpression"&&!Z7(o)&&!kS(o)&&!_F(o)&&o.type!=="TypeCastExpression"&&o.type!=="VariableDeclarator"&&o.type!=="YieldExpression"&&o.type!=="MatchExpressionCase"&&!(n==="declaration"&&o.type==="ExportDefaultDeclaration");case"TSInstantiationExpression":return n==="object"&&Xs(o);case"MatchOrPattern":return o.type==="MatchAsPattern"}return!1}function RJt(i){let e=0,{node:t}=i;for(;t;){let n=i.getParentNode(e++);if(n?.type==="ForStatement"&&n.init===t)return!0;t=n}return!1}function FJt(i){return vA(i)}function q7(i){let{parent:e,key:t}=i;switch(e.type){case"NGPipeExpression":if(t==="arguments"&&i.isLast)return i.callParent(q7);break;case"ObjectProperty":if(t==="value")return i.callParent(()=>i.key==="properties"&&i.isLast);break;case"BinaryExpression":case"LogicalExpression":if(t==="right")return i.callParent(q7);break;case"ConditionalExpression":if(t==="alternate")return i.callParent(q7);break;case"UnaryExpression":if(e.prefix&&i.callParent(q7))return!0;break}return!1}function OJt(i){if(typeof i=="string")return pI;if(Array.isArray(i))return ax;if(!i)return;let{type:e}=i;if(ytt.has(e))return e}function BJt(i){let e=i===null?"null":typeof i;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(MS(i))throw new Error("doc is valid.");let t=Object.prototype.toString.call(i);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=PJt([...ytt].map(o=>`'${o}'`));return`Unexpected doc.type '${i.type}'. +Expected it to be ${n}.`}function VJt(i,e,t,n){let o=[i];for(;o.length>0;){let r=o.pop();if(r===het){t(o.pop());continue}t&&o.push(r,het);let s=MS(r);if(!s)throw new $7(r);if(e?.(r)!==!1)switch(s){case ax:case LS:{let a=s===ax?r:r.parts;for(let l=a.length,c=l-1;c>=0;--c)o.push(a[c]);break}case ly:o.push(r.flatContents,r.breakContents);break;case Pb:if(n&&r.expandedStates)for(let a=r.expandedStates.length,l=a-1;l>=0;--l)o.push(r.expandedStates[l]);else o.push(r.contents);break;case gI:case mI:case AI:case cx:case vI:o.push(r.contents);break;case pI:case IF:case bI:case NS:case Zp:case ux:break;default:throw new $7(r)}}}function LF(i,e){if(typeof i=="string")return e(i);let t=new Map;return n(i);function n(r){return zb(t,r,o)}function o(r){switch(MS(r)){case ax:return e(r.map(n));case LS:return e({...r,parts:r.parts.map(n)});case ly:return e({...r,breakContents:n(r.breakContents),flatContents:n(r.flatContents)});case Pb:{let{expandedStates:s,contents:a}=r;return s?(s=s.map(n),a=s[0]):a=n(a),e({...r,contents:a,expandedStates:s})}case gI:case mI:case AI:case cx:case vI:return e({...r,contents:n(r.contents)});case pI:case IF:case bI:case NS:case Zp:case ux:return e(r);default:throw new $7(r)}}}function wtt(i,e,t){let n=t,o=!1;function r(s){if(o)return!1;let a=e(s);a!==void 0&&(o=!0,n=a)}return uSe(i,r),n}function HJt(i){if(i.type===Pb&&i.break||i.type===Zp&&i.hard||i.type===ux)return!0}function Kf(i){return wtt(i,HJt,!1)}function fet(i){if(i.length>0){let e=Go(0,i,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function WJt(i){let e=new Set,t=[];function n(r){if(r.type===ux&&fet(t),r.type===Pb){if(t.push(r),e.has(r))return!1;e.add(r)}}function o(r){r.type===Pb&&t.pop().break&&fet(t)}uSe(i,n,o,!0)}function UJt(i){return i.type===Zp&&!i.hard?i.soft?"":" ":i.type===ly?i.flatContents:i}function zZ(i){return LF(i,UJt)}function jJt(i){switch(MS(i)){case LS:{let{parts:e}=i;if(e.every(t=>t===""))return"";if(e.length===1)return e[0];break}case Pb:if(!i.contents&&!i.id&&!i.break&&!i.expandedStates)return"";if(i.contents.type===Pb&&i.contents.id===i.id&&i.contents.break===i.break&&i.contents.expandedStates===i.expandedStates)return i.contents;break;case gI:case mI:case AI:case vI:if(!i.contents)return"";break;case ly:if(!i.flatContents&&!i.breakContents)return"";break;case ax:{let e=[];for(let t of i){if(!t)continue;let[n,...o]=Array.isArray(t)?t:[t];typeof n=="string"&&typeof Go(0,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...o)}return e.length===0?"":e.length===1?e[0]:e}case pI:case IF:case bI:case NS:case Zp:case cx:case ux:break;default:throw new $7(i)}return i}function dSe(i){return LF(i,e=>jJt(e))}function uI(i,e=hSe){return LF(i,t=>typeof t=="string"?qo(e,t.split(` +`)):t)}function QJt(i){if(i.type===Zp)return!0}function GJt(i){return wtt(i,QJt,!1)}function xtt(i,e){return i.type===cx?{...i,contents:e(i.contents)}:e(i)}function qJt(i){let e=!0;return uSe(i,t=>{switch(MS(t)){case pI:if(t==="")break;case bI:case NS:case Zp:case ux:return e=!1,!1}}),e}function bt(i){return uy(i),{type:mI,contents:i}}function dg(i,e){return KJt(i),uy(e),{type:gI,contents:e,n:i}}function JJt(i){return dg(Number.NEGATIVE_INFINITY,i)}function XJt(i){return dg({type:"root"},i)}function _tt(i){return dg(-1,i)}function ZJt(i,e,t){uy(i);let n=i;if(e>0){for(let o=0;o=o&&met<=r)return[o,r];r-o>t-e&&(e=o,t=r)}return[e,t]}function wXt(i){if(!i)return 0;if(!yXt.test(i))return i.length;let e=0;i=i.replace(aXt(),t=>(e+=vXt(t)?1:2,""));for(let t of i){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(e+=gXt(n)||bXt(n)?2:1)}return e}function Itt(i,e,t){let n=e.type===1?i.queue.slice(0,-1):[...i.queue,e],o="",r=0,s=0,a=0;for(let p of n)switch(p.type){case 0:u(),t.useTabs?l(1):c(t.tabWidth);break;case 3:{let{string:g}=p;u(),o+=g,r+=g.length;break}case 2:{let{width:g}=p;s+=1,a+=g;break}default:throw new Error(`Unexpected indent comment '${p.type}'.`)}return h(),{...i,value:o,length:r,queue:n};function l(p){o+=" ".repeat(p),r+=t.tabWidth*p}function c(p){o+=" ".repeat(p),r+=p}function u(){t.useTabs?d():h()}function d(){s>0&&l(s),f()}function h(){a>0&&c(a),f()}function f(){s=0,a=0}}function _Xt(i,e,t){if(!e)return i;if(e.type==="root")return{...i,root:i};if(e===Number.NEGATIVE_INFINITY)return i.root;let n;return typeof e=="number"?e<0?n=CXt:n={type:2,width:e}:n={type:3,string:e},Itt(i,n,t)}function SXt(i,e){return Itt(i,xXt,e)}function EXt(i){let e=0;for(let t=i.length-1;t>=0;t--){let n=i[t];if(n===" "||n===" ")e++;else break}return e}function Ltt(i){let e=EXt(i);return{text:e===0?i:i.slice(0,i.length-e),count:e}}function RZ(i,e,t,n,o,r){if(t===Number.POSITIVE_INFINITY)return!0;let s=e.length,a=!1,l=[i],c="";for(;t>=0;){if(l.length===0){if(s===0)return!0;l.push(e[--s]);continue}let{mode:u,doc:d}=l.pop(),h=MS(d);switch(h){case pI:d&&(a&&(c+=" ",t-=1,a=!1),c+=d,t-=TF(d));break;case ax:case LS:{let f=h===ax?d:d.parts,p=d[F_e]??0;for(let g=f.length-1;g>=p;g--)l.push({mode:u,doc:f[g]});break}case mI:case gI:case AI:case cx:l.push({mode:u,doc:d.contents});break;case bI:{let{text:f,count:p}=Ltt(c);c=f,t+=p;break}case Pb:{if(r&&d.break)return!1;let f=d.break?Ob:u,p=d.expandedStates&&f===Ob?Go(0,d.expandedStates,-1):d.contents;l.push({mode:f,doc:p});break}case ly:{let f=(d.groupId?o[d.groupId]||ry:u)===Ob?d.breakContents:d.flatContents;f&&l.push({mode:u,doc:f});break}case Zp:if(u===Ob||d.hard)return!0;d.soft||(a=!0);break;case vI:n=!0;break;case NS:if(n)return!1;break}}return!1}function Ntt(i,e){let t=Object.create(null),n=e.printWidth,o=sXt(e.endOfLine),r=0,s=[{indent:ktt,mode:Ob,doc:i}],a=!1,l=[],c=new TXt;for(WJt(i);s.length>0;){let{indent:p,mode:g,doc:A}=s.pop();switch(MS(A)){case pI:{let v=o!==` +`?pd(0,A,` +`,o):A;v&&(c.write(v),s.length>0&&(r+=TF(v)));break}case ax:for(let v=A.length-1;v>=0;v--)s.push({indent:p,mode:g,doc:A[v]});break;case IF:c.markPosition();break;case mI:s.push({indent:SXt(p,e),mode:g,doc:A.contents});break;case gI:s.push({indent:_Xt(p,A.n,e),mode:g,doc:A.contents});break;case bI:r-=c.trim();break;case Pb:{let v=(function(){if(g===ry&&!a)return{indent:p,mode:A.break?Ob:ry,doc:A.contents};a=!1;let w=n-r,C=l.length>0,_={indent:p,mode:ry,doc:A.contents};if(!A.break&&RZ(_,s,w,C,t))return _;if(!A.expandedStates)return{indent:p,mode:Ob,doc:A.contents};if(!A.break)for(let E=1;E0,t,!0);if(_===1){L?s.push(T):s.push(N);break}let B={indent:p,mode:ry,doc:I},z={indent:p,mode:Ob,doc:I};if(_===2){L?s.push(B,T):s.push(z,N);break}let Q=C[w+2],Z={indent:p,mode:g,doc:{...A,[F_e]:w+2}},U=RZ({indent:p,mode:ry,doc:[E,I,Q]},[],v,l.length>0,t,!0);s.push(Z),U?s.push(B,T):L?s.push(z,T):s.push(z,N);break}case ly:case AI:{let v=A.groupId?t[A.groupId]:g;if(v===Ob){let w=A.type===ly?A.breakContents:A.negate?A.contents:bt(A.contents);w&&s.push({indent:p,mode:g,doc:w})}if(v===ry){let w=A.type===ly?A.flatContents:A.negate?bt(A.contents):A.contents;w&&s.push({indent:p,mode:g,doc:w})}break}case vI:l.push({indent:p,mode:g,doc:A.contents});break;case NS:l.length>0&&s.push({indent:p,mode:g,doc:Ett});break;case Zp:switch(g){case ry:if(!A.hard){A.soft||(c.write(" "),r+=1);break}a=!0;case Ob:if(l.length>0){s.push({indent:p,mode:g,doc:A},...l.reverse()),l.length=0;break}A.literal?(c.write(o),r=0,p.root&&(p.root.value&&c.write(p.root.value),r=p.root.length)):(c.trim(),c.write(o+p.value),r=p.length);break}break;case cx:s.push({indent:p,mode:g,doc:A.contents});break;case ux:break;default:throw new $7(A)}s.length===0&&l.length>0&&(s.push(...l.reverse()),l.length=0)}let{text:u,positions:d}=c.finish();if(d.length!==2)return{formatted:u};let[h,f]=d;return{formatted:u,cursorNodeStart:h,cursorNodeText:u.slice(h,f)}}function fSe(i){return(i.type==="ObjectTypeProperty"||i.type==="ObjectTypeInternalSlot")&&!i.static&&!i.method&&i.kind!=="get"&&i.kind!=="set"&&i.value.type==="FunctionTypeAnnotation"}function kXt(i,e){let t=null,n=e;for(;n!==t;)t=n,n=dKt(i,n),n=J_e(i,n),n=EF(i,n);return n=X_e(i,n),n=DF(i,n),n!==!1&&Vu(i,n)}function NXt({type:i}){return i.startsWith("TS")&&i.endsWith("Keyword")}function pSe(i){return Rtt(i)||Mtt(i)||LXt(i)||i.type==="GenericTypeAnnotation"&&!i.typeParameters||i.type==="TSTypeReference"&&!i.typeArguments}function MXt(i){return(i.type==="TypeAnnotation"||i.type==="TSTypeAnnotation")&&i.typeAnnotation.type==="FunctionTypeAnnotation"&&!i.static&&!GZ(i,i.typeAnnotation)}function RXt(i,e){let t=e.split(".");for(let n=t.length-1;n>=0;n--){let o=t[n];if(n===0)return i.type==="Identifier"&&i.name===o;if(n===1&&i.type==="MetaProperty"&&i.property.type==="Identifier"&&i.property.name===o){i=i.meta;continue}if(i.type==="MemberExpression"&&!i.optional&&!i.computed&&i.property.type==="Identifier"&&i.property.name===o){i=i.object;continue}return!1}}function mSe(i,e){return e.some(t=>RXt(i,t))}function OXt(i){return mSe(i,FXt)}function PXt(i){return i.type==="Identifier"&&(i.name==="beforeEach"||i.name==="beforeAll"||i.name==="afterEach"||i.name==="afterAll")}function w_e(i){return Ms(i)&&i.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(i.callee.name)}function BXt(i){return i.type==="FunctionExpression"||i.type==="ArrowFunctionExpression"&&i.body.type==="BlockStatement"}function JZ(i,e){if(i?.type!=="CallExpression"||i.optional)return!1;let t=Vb(i);if(t.length===1){if(w_e(i)&&JZ(e))return X7(t[0]);if(PXt(i.callee))return w_e(t[0])}else if((t.length===2||t.length===3)&&(t[0].type==="TemplateLiteral"||Hu(t[0]))&&OXt(i.callee))return t[2]&&!cy(t[2])?!1:(t.length===2?X7(t[1]):BXt(t[1])&&Xf(t[1]).length<=1)||w_e(t[1]);return!1}function zXt(i,e){let t=e-1;t=EF(i,t,{backwards:!0}),t=DF(i,t,{backwards:!0}),t=EF(i,t,{backwards:!0});let n=DF(i,t,{backwards:!0});return t!==n}function bSe(i,e){let t=i.node;return t.printed=!0,e.printer.printComment(i,e)}function VXt(i,e){let t=i.node,n=[bSe(i,e)],{printer:o,originalText:r,locStart:s,locEnd:a}=e;if(o.isBlockComment?.(t)){let c=" ";Vu(r,a(t))&&(Vu(r,s(t),{backwards:!0})?c=gt:c=ti),n.push(c)}else n.push(gt);let l=DF(r,EF(r,a(t)));return l!==!1&&Vu(r,l)&&n.push(gt),n}function HXt(i,e,t){let n=i.node,o=bSe(i,e),{printer:r,originalText:s,locStart:a}=e,l=r.isBlockComment?.(n);if(t?.hasLineSuffix&&!t?.isBlock||Vu(s,a(n),{backwards:!0})){let c=Ftt(s,a(n));return{doc:pet([gt,c?gt:"",o]),isBlock:l,hasLineSuffix:!0}}return!l||t?.hasLineSuffix?{doc:[pet([" ",o]),lx],isBlock:l,hasLineSuffix:!0}:{doc:[" ",o],isBlock:l,hasLineSuffix:!1}}function eu(i,e,t={}){let{indent:n=!1,marker:o,filter:r=gSe}=t,s=new Set(i.node?.comments?.filter(c=>!(c.leading||c.trailing||c.marker!==o||!r(c))));if(s.size===0)return"";let a=i.map(({node:c})=>s.has(c)?bSe(i,e):"","comments").filter(Boolean),l=qo(gt,a);return n?bt([gt,l]):l}function ASe(i,e,t){let n=e[Symbol.for("printedComments")],o=t?.filter??gSe,r=new Set(i.node?.comments?.filter(s=>!n?.has(s)&&s.leading&&o(s)));return r.size===0?"":i.map(({node:s})=>r.has(s)?VXt(i,e):"","comments").filter(Boolean)}function Ott(i,e,t){let n=i.node?.comments,o=new Set(n?.filter(u=>u.trailing)),r=e[Symbol.for("printedComments")],s=t?.filter??gSe,a=new Set(n?.filter(u=>o.has(u)&&!r?.has(u)&&s(u)));if(a.size===0)return"";let l=[],c;return i.each(({node:u})=>{o.has(u)&&(c=HXt(i,e,c),a.has(u)&&l.push(c.doc))},"comments"),l}function Ptt(i,e,t){return{leading:ASe(i,e,t),trailing:Ott(i,e,t)}}function Yh(i,e,t,n){let o=ASe(i,t,n),r=Ott(i,t,n);return o||r?xtt(e,s=>[o,s,r]):e}function Btt(i,e="es5"){return i.trailingComma==="es5"&&e==="es5"||i.trailingComma==="all"&&(e==="all"||e==="es5")}function Jf(i){let{node:e}=i;return!e.optional||e.type==="Identifier"&&e===i.parent.key?"":Ms(e)||Xs(e)&&e.computed||e.type==="OptionalIndexedAccessType"?"?.":"?"}function ztt(i){return i.node.definite||i.match(void 0,(e,t)=>t==="id"&&e.type==="VariableDeclarator"&&e.definite)?"!":""}function hg(i){return UXt(i)?"declare ":""}function XZ({node:i}){return i.abstract||jXt(i)?"abstract ":""}function ZZ(i){return i.accessibility?i.accessibility+" ":""}function QXt(i){return Yt(i)||!get(i)?!1:(i=i.argument,i=get(i)?i.argument:i,i.type==="LogicalExpression")}function vSe(i,e,t){let{node:n}=i,o=n.type==="WithStatement"?"object":"test",r=t(o);return QXt(n[o])?r:je([bt([dt,r]),dt])}function $Z(i,e,t){let{node:n}=i;return Yt(n,li.Dangling,t)?[bt([dt,eu(i,e,{filter:t})]),Yt(n,li.Dangling|li.Line,t)?gt:dt]:""}function RS(i,e="es5"){return Btt(i,e)?Co(","):""}function vl(i){return i.semi?";":""}function yI(i,e,t,n,o){let r=i.node,s=Xf(r),a=o&&r.typeParameters?t("typeParameters"):"";if(s.length===0)return[a,"(",$Z(i,e,GXt),")"];let{parent:l}=i,c=JZ(l),u=Vtt(r),d=[];if(HYt(i,(f,p)=>{let g=p===s.length-1;g&&r.rest&&d.push("..."),d.push(t()),!g&&(d.push(","),c||u?d.push(" "):dy(s[p],e)?d.push(gt,gt):d.push(ti))}),n&&!YXt(i)){if(Kf(a)||Kf(d))throw new VZ;return je([zZ(a),"(",zZ(d),")"])}let h=s.every(f=>!Zs(f.decorators));return u&&h?[a,"(",...d,")"]:c?[a,"(",...d,")"]:(fSe(l)||MXt(l)||l.type==="TypeAlias"||l.type==="UnionTypeAnnotation"||l.type==="IntersectionTypeAnnotation"||l.type==="FunctionTypeAnnotation"&&l.returnType===r)&&s.length===1&&s[0].name===null&&r.this!==s[0]&&s[0].typeAnnotation&&r.typeParameters===null&&pSe(s[0].typeAnnotation)&&!r.rest?e.arrowParens==="always"||r.type==="HookTypeAnnotation"?["(",...d,")"]:d:[a,"(",bt([dt,...d]),!WYt(r)&&i.root.type!=="NGRoot"?RS(e,"all"):"",dt,")"]}function Vtt(i){if(!i)return!1;let e=Xf(i);if(e.length!==1)return!1;let[t]=e;return!Yt(t)&&(t.type==="ObjectPattern"||t.type==="ArrayPattern"||t.type==="Identifier"&&t.typeAnnotation&&(t.typeAnnotation.type==="TypeAnnotation"||t.typeAnnotation.type==="TSTypeAnnotation")&&ES(t.typeAnnotation.typeAnnotation)||t.type==="FunctionTypeParam"&&ES(t.typeAnnotation)&&t!==i.rest||t.type==="AssignmentPattern"&&(t.left.type==="ObjectPattern"||t.left.type==="ArrayPattern")&&(t.right.type==="Identifier"||vA(t.right)&&t.right.properties.length===0||nh(t.right)&&t.right.elements.length===0))}function qXt(i){let e;return i.returnType?(e=i.returnType,e.typeAnnotation&&(e=e.typeAnnotation)):i.typeAnnotation&&(e=i.typeAnnotation),e}function lz(i,e){let t=qXt(i);if(!t)return!1;let n=i.typeParameters?.params;if(n){if(n.length>1)return!1;if(n.length===1){let o=n[0];if(o.constraint||o.default)return!1}}return Xf(i).length===1&&(ES(t)||Kf(e))}function YXt(i){return i.match(e=>e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement",(e,t)=>{if(e.type==="CallExpression"&&t==="arguments"&&e.arguments.length===1&&e.callee.type==="CallExpression"){let n=e.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(e,t)=>e.type==="VariableDeclarator"&&t==="init"||e.type==="ExportDefaultDeclaration"&&t==="declaration"||e.type==="TSExportAssignment"&&t==="expression"||e.type==="AssignmentExpression"&&t==="right"&&e.left.type==="MemberExpression"&&e.left.object.type==="Identifier"&&e.left.object.name==="module"&&e.left.property.type==="Identifier"&&e.left.property.name==="exports",e=>e.type!=="VariableDeclaration"||e.kind==="const"&&e.declarations.length===1)}function KXt(i){let e=Xf(i);return e.length>1&&e.some(t=>t.type==="TSParameterProperty")}function K7(i,e){return(e==="params"||e==="this"||e==="rest")&&Vtt(i)}function $Xt(i){return i.length===1?i:i.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}function Utt(i,e){let{preferred:t,alternate:n}=e===!0||e==="'"?eZt:tZt,{length:o}=i,r=0,s=0;for(let a=0;as?n:t).character}function nZt(i,e){let t=e==='"'?"'":'"',n=pd(0,i,iZt,(o,r,s)=>r?r===t?t:o:s===e?"\\"+s:s);return e+n+e}function rZt(i,e){hI(/^(?["']).*\k$/s.test(i));let t=i.slice(1,-1),n;return e.parser==="json"||e.parser==="jsonc"||e.parser==="json-stringify"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?n='"':e.__isInHtmlAttribute?n="'":n=Utt(t,e.singleQuote),i.charAt(0)===n?i:oZt(t,n)}function qtt(i){return/^(?:\d+|\d+\.\d+)$/.test(i)}function aZt(i,e){let t=iz(i);if(t.type==="Identifier")return!0;if(!cy(t)||sZt(e))return!1;let n=tz(lg(t));return String(t.value)===n&&qtt(n)}function Ytt(i,e){let{parser:t}=e;if(t==="json"||t==="jsonc")return!1;let n=iz(i);if(!Hu(n))return!1;let{value:o}=n;return dI(lg(n),e).slice(1,-1)!==o||i.type==="TSMethodSignature"&&o==="new"?!1:!!(!(t==="babel-ts"&&i.type==="ClassProperty"||(t==="typescript"||t==="oxc-ts"||t==="yuku-ts")&&i.type==="PropertyDefinition")&&ZXt(o)||(t==="babel"||t==="acorn"||t==="oxc"||t==="yuku"||t==="espree"||t==="meriyah"||t==="__babel_estree")&&i.type!=="ImportAttribute"&&qtt(o)&&String(Number(o))===o)}function Ktt(i,e){return zb(lZt,i.parent,()=>i.siblings.some(t=>{if(Gtt(t))return!1;let n=iz(t);return Hu(n)&&!Ytt(t,e)}))}function cZt(i,e){return(e.parser==="json"||e.parser==="jsonc"||e.quoteProps==="consistent"&&Ktt(i,e))&&aZt(i.node,e)}function uZt(i,e){return(e.quoteProps==="as-needed"||e.quoteProps==="consistent"&&!Ktt(i,e))&&Ytt(i.node,e)}function DS(i,e,t){let{node:n}=i,o=Qtt(n);if(Gtt(n))return["[",t(o),"]"];if(cZt(i,e)){let r=iz(n),s=dI(JSON.stringify(r.type==="Identifier"?r.name:String(r.value)),e);return i.call(()=>Yh(i,s,e),o)}if(uZt(i,e)){let{value:r}=iz(n),s=/^\d/.test(r)?tz(r):r;return i.call(()=>Yh(i,s,e),o)}return t(o)}function Jtt(i){return i.key==="elementTypes"&&q_e(i.parent)&&i.parent.elementTypes.length>1}function e$(i){let{types:e}=i;if(e.some(n=>Yt(n)))return!1;let t=e.find(n=>hZt(n));return t?e.every(n=>n===t||dZt(n)):!1}function Xtt(i){let{key:e,node:t,parent:n}=i;return!(e$(t)||e==="types"&&ug(n)||e==="types"&&rz(n)||Jtt(i))}function Ztt(i,e,t,n){let{node:o}=i;if(e$(o))return qo(" | ",i.map(t,"types"));let r=je(i.map(({isFirst:s})=>{let a=s?Co("| "):[ti,"| "],l=t();return Yt(i.node,li.Leading)?[a,dg(2,Yh(i,l,e))]:[a,Yh(i,dg(2,l),e)]},"types"));return Xtt(i)&&(r=Yh(i,r,e)),ag(i,e)?je([bt([dt,r]),dt]):Jtt(i)?je([bt([Co(["(",dt]),r]),dt,Co(")")]):n?.assignmentLayout==="break-after-operator"||!fZt(i)?r:je(bt([dt,r]))}function fZt(i){let{key:e,parent:t}=i;return!(e==="typeAnnotation"&&t.type==="TSTypeAssertion"||e==="elementTypes"&&q_e(t)||(e==="trueType"||e==="falseType")&&SS(t)||e==="params"&&nKt(t)||e==="typeAnnotation"&&t.type==="FunctionTypeParam"&&!t.name&&i.grandparent.this!==t||i.match(void 0,(n,o)=>o==="typeAnnotation"&&n.type==="FunctionTypeParam",(n,o)=>o==="params"&&n.type==="FunctionTypeAnnotation",(n,o)=>o==="value"&&n.type==="ObjectTypeProperty"&&fSe(n)))}function pZt(i){return pSe(i)||ES(i)?!0:ug(i)?e$(i):!1}function ih(i,e,t="typeAnnotation"){let{node:{[t]:n}}=i;if(!n)return"";let o=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let r=i.call($tt,t);(r==="=>"||r===":"&&Yt(n,li.Leading))&&(o=!0),mZt.add(n)}return o?[" ",e(t)]:e(t)}function eit(i,e,t){let n=$tt(i);return n?[n," ",t("typeAnnotation")]:t("typeAnnotation")}function ySe(i,e,t,n){if(gZt(i))return wSe(i,e,t);let{node:o}=i,r=!1;if(o.type==="FunctionExpression"&&n?.expandLastArg){let{parent:u}=i;Ms(u)&&(Vb(u).length>1||Xf(o).every(d=>d.type==="Identifier"&&!d.typeAnnotation))&&(r=!0)}let s=yI(i,e,t,r),a=xSe(i,t),l=lz(o,a),c=o.type==="HookDeclaration"?"hook":"function";return[hg(i),o.async?"async ":"",c,o.generator?"*":""," ",o.id?t("id"):"",t("typeParameters"),je([l?je(s):s,a]),o.body?" ":"",t("body"),o.declare||!o.body?vl(e):""]}function O_e(i,e,t){let{node:n}=i,{kind:o}=n,r=n.value||n,s=[];return!o||o==="init"||o==="method"||o==="constructor"?r.async&&s.push("async "):(hI(o==="get"||o==="set"),s.push(o," ")),r.generator&&s.push("*"),s.push(DS(i,e,t),n.optional?"?":"",n===r?wSe(i,e,t):t("value")),s}function wSe(i,e,t){let{node:n}=i,o=yI(i,e,t),r=xSe(i,t),s=KXt(n),a=lz(n,r),l=[t("typeParameters"),je([s?je(o,{shouldBreak:!0}):a?je(o):o,r])];return n.body?l.push(" ",t("body")):l.push(vl(e)),l}function bZt(i){let e=Xf(i);return e.length===1&&!i.typeParameters&&!Yt(i,li.Dangling)&&e[0].type==="Identifier"&&!e[0].typeAnnotation&&!Yt(e[0])&&!e[0].optional&&!i.predicate&&!i.returnType}function tit(i,e){if(e.arrowParens==="always")return!1;if(e.arrowParens==="avoid"){let{node:t}=i;return bZt(t)}return!1}function xSe(i,e){let{node:t}=i,n=[ih(i,e,"returnType")];return t.predicate&&n.push(e("predicate")),n}function CSe(i,e){if(e.semi)return!1;let{node:t}=i;if(t.type!=="ExpressionStatement"||nit(i,e)||rit(i,e)||oit(i,e))return!1;let{key:n,parent:o}=i;return!!((n==="body"&&(o.type==="Program"||o.type==="BlockStatement"||o.type==="StaticBlock"||o.type==="TSModuleBlock")||n==="consequent"&&o.type==="SwitchCase")&&i.call(()=>iit(i,e),"expression"))}function iit(i,e){let{node:t}=i;switch(t.type){case"ParenthesizedExpression":case"TypeCastExpression":case"TSTypeAssertion":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!tit(i,e))return!0;break;case"UnaryExpression":{let{prefix:n,operator:o}=t;if(n&&(o==="+"||o==="-"))return!0;break}case"BindExpression":if(!t.object)return!0;break;case"Literal":if(t.regex)return!0;break;default:if(md(t))return!0}return ag(i,e)?!0:cSe(t)?i.call(()=>iit(i,e),...gtt(t)):!1}function nit(i,e){return(e.parentParser==="markdown"||e.parentParser==="mdx")&&_Se(i)&&md(i.node.expression)}function oit(i,e){return e.__isHtmlInlineEventHandler&&_Se(i)}function rit(i,e){return(e.parser==="__vue_event_binding"||e.parser==="__vue_ts_event_binding")&&_Se(i)}function sit(i,e){if(!CSe(i,e))return!1;let t=Go(0,cg(i.node,li.Leading),-1);return!!(t&&Z_e(t))}function vZt(i,e){let{key:t,parent:n}=i;if(t==="types"&&ug(n)||t==="argument"&&n.type==="JSXSpreadAttribute"||t==="expression"&&n.type==="JSXSpreadChild"||t==="superClass"&&(n.type==="ClassDeclaration"||n.type==="ClassExpression")||(t==="id"||t==="typeParameters")&&AZt(n)||t==="patterns"&&n.type==="MatchOrPattern"||htt(i))return!0;let{node:o}=i;return KZ(o)?!1:o.type==="ExpressionStatement"?sit(i,e):ug(o)?Xtt(i):!!md(o)}function wZt(i,e,t=0){let n=0;for(let o=t;o[t(),r?"":n[s]],"quasis");return[Bb,"`",...o,"`"]}function SZt(i,e,t){let n=t("quasi"),{node:o}=i,r="",s=cg(o.quasi,li.Leading)[0];return s&&(Xp(e.originalText,tn(o.typeArguments??o.tag),yn(s))?r=dt:r=" "),az(n.label&&{tagged:!0,...n.label},[t("tag"),t("typeArguments"),r,Bb,n])}function EZt(i,e,t){let{node:n}=i,o=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(o.length>1||o.some(r=>r.length>0)){e.__inJestEach=!0;let r=cz(i,e,t);e.__inJestEach=!1;let s=r.map(d=>Ntt(d,{...e,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted),a=[{hasLineBreak:!1,cells:[]}];for(let d=1;dd.cells.length)),c=Array.from({length:l},()=>0),u=[{cells:r},...a.filter(d=>d.cells.length>0)];for(let d of u)if(!d.hasLineBreak)for(let[h,f]of d.cells.entries())c[h]=Math.max(c[h],OR(f));return[Sb,"`",bt([gt,jr(gt,u.map(d=>jr(" | ",d.cells.map((h,f)=>d.hasLineBreak?h:h+" ".repeat(c[f]-OR(h))))))]),gt,"`"]}}function Rli(i,e){let{parent:t,index:n}=i;return Eb(Mli,t,r=>{let{tabWidth:o}=e,s=0;return r.quasis.map(a=>{let l=a.value.raw,c=l.includes(` -`)?Ili(l,o):s;return s=c,{indentSize:c,previousQuasiText:l}})})[n]}function Fli(i,e,t){let{node:n,index:r}=i,o=t(),s=i.parent,{quasis:a}=s,l=tn(a[r]),c=yn(a[r+1]),u=Rp(e.originalText,l,c);if(!u){let f=_nt(o,{...e,printWidth:Number.POSITIVE_INFINITY}).formatted;f.includes(` -`)?u=!0:o=f}u&&($t(n)||n.type==="Identifier"||Gs(sS(n))||n.type==="ConditionalExpression"||n.type==="SequenceExpression"||Z0(n)||Fw(n))&&(o=[bt([dt,o]),dt]);let{indentSize:d,previousQuasiText:h}=Rli(i,e);return e.__inJestEach&&(d=Math.max(d,e.tabWidth)),o=d===0&&h.endsWith(` -`)?Xm(Number.NEGATIVE_INFINITY,o):rai(o,d,e.tabWidth),je(["${",o,Sb,"}"])}function L9(i,e,t){return i.map(()=>Fli(i,e,t),i.node.type==="TSTemplateLiteralType"?"types":"expressions")}function ert(i,e){return zR(i,t=>typeof t=="string"?e?od(0,t,/(\\*)`/g,"$1$1\\`"):trt(t):t)}function trt(i){return od(0,i,/([\\`]|\$\{)/g,"\\$1")}function Oli({node:i,parent:e}){return i.type==="TemplateLiteral"&&e.type==="TaggedTemplateExpression"&&e.quasi===i&&e.tag.type==="MemberExpression"&&e.tag.property.type==="Identifier"&&e.tag.property.name==="each"&&(e.tag.object.type==="Identifier"&&uit.test(e.tag.object.name)||e.tag.object.type==="MemberExpression"&&e.tag.object.property.type==="Identifier"&&(e.tag.object.property.name==="only"||e.tag.object.property.name==="skip")&&e.tag.object.object.type==="Identifier"&&uit.test(e.tag.object.object.name))}function Pli(i){let e=n=>n.type==="TemplateLiteral",t=(n,r)=>oS(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&r==="value";return i.match(e,(n,r)=>Kd(n)&&r==="elements",t,...p_e)||i.match(e,t,...p_e)}function Bli(i){return i.match(e=>e.type==="TemplateLiteral",(e,t)=>oS(e)&&!e.computed&&e.key.type==="Identifier"&&e.key.name==="template"&&t==="value",...p_e)}function $Ce(i,e){return $t(i,fi.Block|fi.Leading,({value:t})=>t===` ${e} `)}function irt({node:i,parent:e},t){return $Ce(i,t)||zli(e)&&$Ce(e,t)||e.type==="ExpressionStatement"&&$Ce(e,t)}function zli(i){return i.type==="AsConstExpression"||i.type==="TSAsExpression"&&i.typeAnnotation.type==="TSTypeReference"&&i.typeAnnotation.typeName.type==="Identifier"&&i.typeAnnotation.typeName.name==="const"}async function Vli(i,e,t,n){let{node:r}=t,o="";for(let[c,u]of r.quasis.entries()){let{raw:d}=u.value;c>0&&(o+="@prettier-placeholder-"+(c-1)+"-id"),o+=d}let s=await i(o,{parser:"scss"}),a=L9(t,n,e),l=Hli(s,a);if(!l)throw new Error("Couldn't insert all the expressions");return["`",bt([gt,l]),dt,"`"]}function Hli(i,e){if(!qs(e))return i;let t=0,n=zR(W_e(i),r=>typeof r!="string"||!r.includes("@prettier-placeholder")?r:r.split(/@prettier-placeholder-(\d+)-id/).map((o,s)=>s%2===0?Ik(o):(t++,e[o])));return e.length===t?n:null}function Wli(i){return i.match(void 0,(e,t)=>t==="quasi"&&e.type==="TaggedTemplateExpression"&&G_e(e.tag,["css","css.global","css.resolve"]))||i.match(void 0,(e,t)=>t==="expression"&&e.type==="JSXExpressionContainer",(e,t)=>t==="children"&&e.type==="JSXElement"&&e.openingElement.name.type==="JSXIdentifier"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function fX(i){return i.type==="Identifier"&&i.name==="styled"}function dit(i){return/^[A-Z]/.test(i.object.name)&&i.property.name==="extend"}function Uli({parent:i}){if(!i||i.type!=="TaggedTemplateExpression")return!1;let e=i.tag.type==="ParenthesizedExpression"?i.tag.expression:i.tag;switch(e.type){case"MemberExpression":return fX(e.object)||dit(e);case"CallExpression":return fX(e.callee)||e.callee.type==="MemberExpression"&&(e.callee.object.type==="MemberExpression"&&(fX(e.callee.object.object)||dit(e.callee.object))||e.callee.object.type==="CallExpression"&&fX(e.callee.object.callee));case"Identifier":return e.name==="css";default:return!1}}function jli({parent:i,grandparent:e}){return e?.type==="JSXAttribute"&&i.type==="JSXExpressionContainer"&&e.name.type==="JSXIdentifier"&&e.name.name==="css"}async function Gli(i,e,t,n){let{node:r}=t,o=r.quasis.length,s=L9(t,n,e),a=[];for(let l=0;l2&&f[0].trim()===""&&f[1].trim()==="",v=p>2&&f[p-1].trim()===""&&f[p-2].trim()==="",A=f.every(C=>/^\s*(?:#[^\n\r]*)?$/.test(C)),w;A?w=qli(f):w=await i(h,{parser:"graphql"}),w?(w=ert(w,!1),!u&&g&&a.push(""),a.push(w),!d&&v&&a.push("")):!u&&!d&&g&&a.push(""),d||a.push(s[l])}return["`",bt([gt,jr(gt,a)]),gt,"`"]}function qli(i){let e=[],t=!1,n=i.map(r=>r.trim());for(let[r,o]of n.entries())o!==""&&(n[r-1]===""&&t?e.push([gt,o]):e.push(o),t=!0);return e.length===0?null:jr(gt,e)}function Yli({node:i,parent:e}){return irt({node:i,parent:e},"GraphQL")||e&&(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"&&e.tag.object.name==="graphql"&&e.tag.property.name==="experimental"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"))||e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="graphql")}async function nrt(i,e,t,n,r){let{node:o}=n,s=e_e;e_e=e_e+1>>>0;let a=A=>`PRETTIER_HTML_PLACEHOLDER_${A}_${s}_IN_JS`,l=o.quasis.map((A,w,C)=>w===C.length-1?A.value.cooked:A.value.cooked+a(w)).join(""),c=L9(n,r,t),u=new RegExp(a("(\\d+)"),"g"),d=0,h=await e(l,{parser:i,__onHtmlRoot(A){d=A.children.length}}),f=zR(h,A=>{if(typeof A!="string")return A;let w=[],C=A.split(u);for(let _=0;_1?bt(je(f)):je(f),g,"`"]))}function Kli(i){return irt(i,"HTML")||i.match(e=>e.type==="TemplateLiteral",(e,t)=>e.type==="TaggedTemplateExpression"&&e.tag.type==="Identifier"&&e.tag.name==="html"&&t==="quasi")}async function Zli(i,e,t){let{node:n}=t,r=od(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(l,c)=>"\\".repeat(c.length/2)+"`"),o=$li(r),s=o!=="";s&&(r=od(0,r,new RegExp(`^${o}`,"gm"),""));let a=ert(await i(r,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",s?bt([dt,a]):[U_e,iai(a)],dt,"`"]}function $li(i){let e=i.match(/^([^\S\n]*)\S/m);return e===null?"":e[1]}function eci({node:i,parent:e}){return e?.type==="TaggedTemplateExpression"&&i.quasis.length===1&&e.tag.type==="Identifier"&&(e.tag.name==="md"||e.tag.name==="markdown")}function ici(i){let{node:e}=i;if(e.type!=="TemplateLiteral"||rci(e))return;let t=tci.find(({test:n})=>n(i));if(t)return e.quasis.length===1&&e.quasis[0].value.raw.trim()===""?"``":t.print}function nci(i){return async(...e)=>{let t=await i(...e);return t&&k9({embed:!0,...t.label},t)}}function rci({quasis:i}){return i.some(({value:{cooked:e}})=>e===null)}function sci(i,e){i.type==="ChainExpression"?aci(e):(i.type==="OptionalMemberExpression"||i.type==="OptionalCallExpression")&&lci(e)}function rrt(i){if(Gs(i))return"object";if(Ts(i))return"callee";if(Mk(i))return"expression"}function yX(i){let e=rrt(i);if(e)return i[e]}function aci(i){for(i=yX(i);i.type==="MemberExpression"||i.type==="CallExpression"||i.type==="TSNonNullExpression";i=yX(i)){let e=rrt(i),t=i[e];t.type==="ChainExpression"&&(i[e]=t.expression)}}function lci(i){for(i=yX(i);i.type==="MemberExpression"||i.type==="CallExpression";i=yX(i))i.type=`Optional${i.type}`}function hit(i,e,t){let n=e[t];(Fu(n)||QA(n))&&(i[t]=String(n.value)),n.type==="Identifier"&&(i[t]=n.name)}function cci(i,e){(i.type==="Property"||i.type==="ObjectProperty"||i.type==="MethodDefinition"||i.type==="ClassProperty"||i.type==="ClassMethod"||i.type==="PropertyDefinition"||i.type==="TSDeclareMethod"||i.type==="TSPropertySignature"||i.type==="TSMethodSignature"||i.type==="ObjectTypeProperty"||i.type==="ImportAttribute"||i.type==="RecordDeclarationProperty"||i.type==="RecordDeclarationStaticProperty")&&!i.computed&&hit(e,i,"key"),i.type==="TSEnumMember"&&hit(e,i,"id")}function uci(i,e){i.type==="RegExpLiteral"&&(e.flags=[...i.flags].sort().join("")),i.type==="Literal"&&"regex"in i&&(e.regex.flags=[...i.regex.flags].sort().join(""))}function ort(i,e,t){if(i.type==="Program"&&delete e.sourceType,sci(i,e),cci(i,e),uci(i,e),(roi(i)||i.type==="BigIntLiteralTypeAnnotation")&&"bigint"in i&&(e.bigint=i.bigint.toLowerCase()),i.type==="EmptyStatement"&&!C_e({node:i,parent:t})||i.type==="JSXText"||i.type==="JSXExpressionContainer"&&(i.expression.type==="Literal"||i.expression.type==="StringLiteral")&&i.expression.value===" ")return null;if(i.type==="JSXElement"&&i.openingElement.name.type==="JSXIdentifier"&&i.openingElement.name.name==="style"&&i.openingElement.attributes.some(r=>r.type==="JSXAttribute"&&r.name.name==="jsx"))for(let{type:r,expression:o}of e.children)r==="JSXExpressionContainer"&&o.type==="TemplateLiteral"&&IR(o);i.type==="JSXAttribute"&&i.name.name==="css"&&i.value.type==="JSXExpressionContainer"&&i.value.expression.type==="TemplateLiteral"&&IR(e.value.expression),i.type==="JSXAttribute"&&Fu(i.value)&&/["']|"|'/.test(i.value.value)&&(e.value.value=od(0,i.value.value,/["']|"|'/g,'"'));let n=i.expression||i.callee;if(i.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let r=i.expression.arguments[0].properties;for(let[o,s]of e.expression.arguments[0].properties.entries())switch(r[o].key.name){case"styles":Kd(s.value)&&IR(s.value.elements[0]);break;case"template":s.value.type==="TemplateLiteral"&&IR(s.value);break}}i.type==="TaggedTemplateExpression"&&(i.tag.type==="MemberExpression"||i.tag.type==="Identifier"&&(i.tag.name==="gql"||i.tag.name==="graphql"||i.tag.name==="css"||i.tag.name==="md"||i.tag.name==="markdown"||i.tag.name==="html")||i.tag.type==="CallExpression")&&IR(e.quasi),(i.type==="CallExpression"||i.type==="MemberExpression")&&!i.optional&&delete e.optional,i.type==="TemplateLiteral"&&IR(e)}function bci(i){let e=i.match(srt);return e?e[0].trimStart():""}function vci(i){let e=i.match(srt)?.[0];return e==null?i:i.slice(e.length)}function Aci(i){i=od(0,i.replace(fci,"").replace(hci,""),gci,"$1");let e="";for(;e!==i;)e=i,i=od(0,i,mci,` +`)&&a.push({hasLineBreak:!1,cells:[]})}let l=Math.max(o.length,...a.map(d=>d.cells.length)),c=Array.from({length:l},()=>0),u=[{cells:o},...a.filter(d=>d.cells.length>0)];for(let d of u)if(!d.hasLineBreak)for(let[h,f]of d.cells.entries())c[h]=Math.max(c[h],TF(f));return[Bb,"`",bt([gt,qo(gt,u.map(d=>qo(" | ",d.cells.map((h,f)=>d.hasLineBreak?h:h+" ".repeat(c[f]-TF(h))))))]),gt,"`"]}}function TZt(i,e){let{parent:t,index:n}=i;return zb(DZt,t,o=>{let{tabWidth:r}=e,s=0;return o.quasis.map(a=>{let l=a.value.raw,c=l.includes(` +`)?_Zt(l,r):s;return s=c,{indentSize:c,previousQuasiText:l}})})[n]}function kZt(i,e,t){let{node:n,index:o}=i,r=t(),s=i.parent,{quasis:a}=s,l=tn(a[o]),c=yn(a[o+1]),u=Xp(e.originalText,l,c);if(!u){let f=Ntt(r,{...e,printWidth:Number.POSITIVE_INFINITY}).formatted;f.includes(` +`)?u=!0:r=f}u&&(Yt(n)||n.type==="Identifier"||Xs(IS(n))||n.type==="ConditionalExpression"||n.type==="SequenceExpression"||AA(n)||sx(n))&&(r=[bt([dt,r]),dt]);let{indentSize:d,previousQuasiText:h}=TZt(i,e);return e.__inJestEach&&(d=Math.max(d,e.tabWidth)),r=d===0&&h.endsWith(` +`)?dg(Number.NEGATIVE_INFINITY,r):ZJt(r,d,e.tabWidth),je(["${",r,Bb,"}"])}function cz(i,e,t){return i.map(()=>kZt(i,e,t),i.node.type==="TSTemplateLiteralType"?"types":"expressions")}function lit(i,e){return LF(i,t=>typeof t=="string"?e?pd(0,t,/(\\*)`/g,"$1$1\\`"):cit(t):t)}function cit(i){return pd(0,i,/([\\`]|\$\{)/g,"\\$1")}function IZt({node:i,parent:e}){return i.type==="TemplateLiteral"&&e.type==="TaggedTemplateExpression"&&e.quasi===i&&e.tag.type==="MemberExpression"&&e.tag.property.type==="Identifier"&&e.tag.property.name==="each"&&(e.tag.object.type==="Identifier"&&bet.test(e.tag.object.name)||e.tag.object.type==="MemberExpression"&&e.tag.object.property.type==="Identifier"&&(e.tag.object.property.name==="only"||e.tag.object.property.name==="skip")&&e.tag.object.object.type==="Identifier"&&bet.test(e.tag.object.object.name))}function LZt(i){let e=n=>n.type==="TemplateLiteral",t=(n,o)=>kS(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&o==="value";return i.match(e,(n,o)=>nh(n)&&o==="elements",t,...P_e)||i.match(e,t,...P_e)}function NZt(i){return i.match(e=>e.type==="TemplateLiteral",(e,t)=>kS(e)&&!e.computed&&e.key.type==="Identifier"&&e.key.name==="template"&&t==="value",...P_e)}function x_e(i,e){return Yt(i,li.Block|li.Leading,({value:t})=>t===` ${e} `)}function uit({node:i,parent:e},t){return x_e(i,t)||MZt(e)&&x_e(e,t)||e.type==="ExpressionStatement"&&x_e(e,t)}function MZt(i){return i.type==="AsConstExpression"||i.type==="TSAsExpression"&&i.typeAnnotation.type==="TSTypeReference"&&i.typeAnnotation.typeName.type==="Identifier"&&i.typeAnnotation.typeName.name==="const"}async function RZt(i,e,t,n){let{node:o}=t,r="";for(let[c,u]of o.quasis.entries()){let{raw:d}=u.value;c>0&&(r+="@prettier-placeholder-"+(c-1)+"-id"),r+=d}let s=await i(r,{parser:"scss"}),a=cz(t,n,e),l=FZt(s,a);if(!l)throw new Error("Couldn't insert all the expressions");return["`",bt([gt,l]),dt,"`"]}function FZt(i,e){if(!Zs(e))return i;let t=0,n=LF(dSe(i),o=>typeof o!="string"||!o.includes("@prettier-placeholder")?o:o.split(/@prettier-placeholder-(\d+)-id/).map((r,s)=>s%2===0?uI(r):(t++,e[r])));return e.length===t?n:null}function OZt(i){return i.match(void 0,(e,t)=>t==="quasi"&&e.type==="TaggedTemplateExpression"&&mSe(e.tag,["css","css.global","css.resolve"]))||i.match(void 0,(e,t)=>t==="expression"&&e.type==="JSXExpressionContainer",(e,t)=>t==="children"&&e.type==="JSXElement"&&e.openingElement.name.type==="JSXIdentifier"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function FZ(i){return i.type==="Identifier"&&i.name==="styled"}function Aet(i){return/^[A-Z]/.test(i.object.name)&&i.property.name==="extend"}function PZt({parent:i}){if(!i||i.type!=="TaggedTemplateExpression")return!1;let e=i.tag.type==="ParenthesizedExpression"?i.tag.expression:i.tag;switch(e.type){case"MemberExpression":return FZ(e.object)||Aet(e);case"CallExpression":return FZ(e.callee)||e.callee.type==="MemberExpression"&&(e.callee.object.type==="MemberExpression"&&(FZ(e.callee.object.object)||Aet(e.callee.object))||e.callee.object.type==="CallExpression"&&FZ(e.callee.object.callee));case"Identifier":return e.name==="css";default:return!1}}function BZt({parent:i,grandparent:e}){return e?.type==="JSXAttribute"&&i.type==="JSXExpressionContainer"&&e.name.type==="JSXIdentifier"&&e.name.name==="css"}async function VZt(i,e,t,n){let{node:o}=t,r=o.quasis.length,s=cz(t,n,e),a=[];for(let l=0;l2&&f[0].trim()===""&&f[1].trim()==="",A=p>2&&f[p-1].trim()===""&&f[p-2].trim()==="",v=f.every(C=>/^\s*(?:#[^\n\r]*)?$/.test(C)),w;v?w=HZt(f):w=await i(h,{parser:"graphql"}),w?(w=lit(w,!1),!u&&g&&a.push(""),a.push(w),!d&&A&&a.push("")):!u&&!d&&g&&a.push(""),d||a.push(s[l])}return["`",bt([gt,qo(gt,a)]),gt,"`"]}function HZt(i){let e=[],t=!1,n=i.map(o=>o.trim());for(let[o,r]of n.entries())r!==""&&(n[o-1]===""&&t?e.push([gt,r]):e.push(r),t=!0);return e.length===0?null:qo(gt,e)}function WZt({node:i,parent:e}){return uit({node:i,parent:e},"GraphQL")||e&&(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"&&e.tag.object.name==="graphql"&&e.tag.property.name==="experimental"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"))||e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="graphql")}async function dit(i,e,t,n,o){let{node:r}=n,s=C_e;C_e=C_e+1>>>0;let a=v=>`PRETTIER_HTML_PLACEHOLDER_${v}_${s}_IN_JS`,l=r.quasis.map((v,w,C)=>w===C.length-1?v.value.cooked:v.value.cooked+a(w)).join(""),c=cz(n,o,t),u=new RegExp(a("(\\d+)"),"g"),d=0,h=await e(l,{parser:i,__onHtmlRoot(v){d=v.children.length}}),f=LF(h,v=>{if(typeof v!="string")return v;let w=[],C=v.split(u);for(let _=0;_1?bt(je(f)):je(f),g,"`"]))}function UZt(i){return uit(i,"HTML")||i.match(e=>e.type==="TemplateLiteral",(e,t)=>e.type==="TaggedTemplateExpression"&&e.tag.type==="Identifier"&&e.tag.name==="html"&&t==="quasi")}async function GZt(i,e,t){let{node:n}=t,o=pd(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(l,c)=>"\\".repeat(c.length/2)+"`"),r=qZt(o),s=r!=="";s&&(o=pd(0,o,new RegExp(`^${r}`,"gm"),""));let a=lit(await i(o,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",s?bt([dt,a]):[hSe,JJt(a)],dt,"`"]}function qZt(i){let e=i.match(/^([^\S\n]*)\S/m);return e===null?"":e[1]}function YZt({node:i,parent:e}){return e?.type==="TaggedTemplateExpression"&&i.quasis.length===1&&e.tag.type==="Identifier"&&(e.tag.name==="md"||e.tag.name==="markdown")}function JZt(i){let{node:e}=i;if(e.type!=="TemplateLiteral"||ZZt(e))return;let t=KZt.find(({test:n})=>n(i));if(t)return e.quasis.length===1&&e.quasis[0].value.raw.trim()===""?"``":t.print}function XZt(i){return async(...e)=>{let t=await i(...e);return t&&az({embed:!0,...t.label},t)}}function ZZt({quasis:i}){return i.some(({value:{cooked:e}})=>e===null)}function e$t(i,e){i.type==="ChainExpression"?t$t(e):(i.type==="OptionalMemberExpression"||i.type==="OptionalCallExpression")&&i$t(e)}function hit(i){if(Xs(i))return"object";if(Ms(i))return"callee";if(fI(i))return"expression"}function WZ(i){let e=hit(i);if(e)return i[e]}function t$t(i){for(i=WZ(i);i.type==="MemberExpression"||i.type==="CallExpression"||i.type==="TSNonNullExpression";i=WZ(i)){let e=hit(i),t=i[e];t.type==="ChainExpression"&&(i[e]=t.expression)}}function i$t(i){for(i=WZ(i);i.type==="MemberExpression"||i.type==="CallExpression";i=WZ(i))i.type=`Optional${i.type}`}function vet(i,e,t){let n=e[t];(Hu(n)||cy(n))&&(i[t]=String(n.value)),n.type==="Identifier"&&(i[t]=n.name)}function n$t(i,e){(i.type==="Property"||i.type==="ObjectProperty"||i.type==="MethodDefinition"||i.type==="ClassProperty"||i.type==="ClassMethod"||i.type==="PropertyDefinition"||i.type==="TSDeclareMethod"||i.type==="TSPropertySignature"||i.type==="TSMethodSignature"||i.type==="ObjectTypeProperty"||i.type==="ImportAttribute"||i.type==="RecordDeclarationProperty"||i.type==="RecordDeclarationStaticProperty")&&!i.computed&&vet(e,i,"key"),i.type==="TSEnumMember"&&vet(e,i,"id")}function o$t(i,e){i.type==="RegExpLiteral"&&(e.flags=[...i.flags].sort().join("")),i.type==="Literal"&&"regex"in i&&(e.regex.flags=[...i.regex.flags].sort().join(""))}function fit(i,e,t){if(i.type==="Program"&&delete e.sourceType,e$t(i,e),n$t(i,e),o$t(i,e),(ZYt(i)||i.type==="BigIntLiteralTypeAnnotation")&&"bigint"in i&&(e.bigint=i.bigint.toLowerCase()),i.type==="EmptyStatement"&&!G_e({node:i,parent:t})||i.type==="JSXText"||i.type==="JSXExpressionContainer"&&(i.expression.type==="Literal"||i.expression.type==="StringLiteral")&&i.expression.value===" ")return null;if(i.type==="JSXElement"&&i.openingElement.name.type==="JSXIdentifier"&&i.openingElement.name.name==="style"&&i.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"))for(let{type:o,expression:r}of e.children)o==="JSXExpressionContainer"&&r.type==="TemplateLiteral"&&xF(r);i.type==="JSXAttribute"&&i.name.name==="css"&&i.value.type==="JSXExpressionContainer"&&i.value.expression.type==="TemplateLiteral"&&xF(e.value.expression),i.type==="JSXAttribute"&&Hu(i.value)&&/["']|"|'/.test(i.value.value)&&(e.value.value=pd(0,i.value.value,/["']|"|'/g,'"'));let n=i.expression||i.callee;if(i.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let o=i.expression.arguments[0].properties;for(let[r,s]of e.expression.arguments[0].properties.entries())switch(o[r].key.name){case"styles":nh(s.value)&&xF(s.value.elements[0]);break;case"template":s.value.type==="TemplateLiteral"&&xF(s.value);break}}i.type==="TaggedTemplateExpression"&&(i.tag.type==="MemberExpression"||i.tag.type==="Identifier"&&(i.tag.name==="gql"||i.tag.name==="graphql"||i.tag.name==="css"||i.tag.name==="md"||i.tag.name==="markdown"||i.tag.name==="html")||i.tag.type==="CallExpression")&&xF(e.quasi),(i.type==="CallExpression"||i.type==="MemberExpression")&&!i.optional&&delete e.optional,i.type==="TemplateLiteral"&&xF(e)}function d$t(i){let e=i.match(pit);return e?e[0].trimStart():""}function h$t(i){let e=i.match(pit)?.[0];return e==null?i:i.slice(e.length)}function f$t(i){i=pd(0,i.replace(a$t,"").replace(s$t,""),u$t,"$1");let e="";for(;e!==i;)e=i,i=pd(0,i,c$t,` $1 $2 -`);i=i.replace(fit,"").trimEnd();let t=Object.create(null),n=od(0,i,pit,"").replace(fit,"").trimEnd(),r;for(;r=pit.exec(i);){let o=od(0,r[2],pci,"");if(typeof t[r[1]]=="string"||Array.isArray(t[r[1]])){let s=t[r[1]];t[r[1]]=[...art,...Array.isArray(s)?s:[s],o]}else t[r[1]]=o}return{comments:n,pragmas:t}}function yci({comments:i="",pragmas:e={}}){let t=Object.keys(e),n=t.flatMap(o=>mit(o,e[o])).map(o=>` * ${o} -`).join("");if(!i){if(t.length===0)return"";if(t.length===1&&!Array.isArray(e[t[0]])){let o=e[t[0]];return`/** ${mit(t[0],o)[0]} */`}}let r=i.split(` -`).map(o=>` * ${o}`).join(` +`);i=i.replace(yet,"").trimEnd();let t=Object.create(null),n=pd(0,i,wet,"").replace(yet,"").trimEnd(),o;for(;o=wet.exec(i);){let r=pd(0,o[2],l$t,"");if(typeof t[o[1]]=="string"||Array.isArray(t[o[1]])){let s=t[o[1]];t[o[1]]=[...mit,...Array.isArray(s)?s:[s],r]}else t[o[1]]=r}return{comments:n,pragmas:t}}function p$t({comments:i="",pragmas:e={}}){let t=Object.keys(e),n=t.flatMap(r=>xet(r,e[r])).map(r=>` * ${r} +`).join("");if(!i){if(t.length===0)return"";if(t.length===1&&!Array.isArray(e[t[0]])){let r=e[t[0]];return`/** ${xet(t[0],r)[0]} */`}}let o=i.split(` +`).map(r=>` * ${r}`).join(` `)+` `;return`/** -`+(i?r:"")+(i&&t.length>0?` * -`:"")+n+" */"}function mit(i,e){return[...art,...Array.isArray(e)?e:[e]].map(t=>`@${i} ${t}`.trim())}function xci(i){if(!i.startsWith("#!"))return"";let e=i.indexOf(` -`);return e===-1?i:i.slice(0,e)}function _ci(i){let e=Cci(i);e&&(i=i.slice(e.length+1));let t=bci(i),{pragmas:n,comments:r}=Aci(t);return{shebang:e,text:i,pragmas:n,comments:r}}function Sci(i){let{shebang:e,text:t,pragmas:n,comments:r}=_ci(i),o=vci(t),s=yci({pragmas:{[wci]:"",...n},comments:r.trimStart()});return(e?`${e} -`:"")+s+(o.startsWith(` +`+(i?o:"")+(i&&t.length>0?` * +`:"")+n+" */"}function xet(i,e){return[...mit,...Array.isArray(e)?e:[e]].map(t=>`@${i} ${t}`.trim())}function g$t(i){if(!i.startsWith("#!"))return"";let e=i.indexOf(` +`);return e===-1?i:i.slice(0,e)}function A$t(i){let e=b$t(i);e&&(i=i.slice(e.length+1));let t=d$t(i),{pragmas:n,comments:o}=f$t(t);return{shebang:e,text:i,pragmas:n,comments:o}}function v$t(i){let{shebang:e,text:t,pragmas:n,comments:o}=A$t(i),r=h$t(t),s=p$t({pragmas:{[m$t]:"",...n},comments:o.trimStart()});return(e?`${e} +`:"")+s+(r.startsWith(` `)?` `:` -`)+o}function Eci(i){if(!ev(i))return[];if(!i.value.includes(` +`)+r}function y$t(i){if(!yA(i))return[];if(!i.value.includes(` `))return[];let e=[];for(let t of`*${i.value}*`.split(` -`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}function lrt(i){return Eb(Dci,i,Eci)}function crt(i){return lrt(i).length>0}function Tci(i,e){let t=i.node;if(rS(t))return e.originalText.slice(yn(t),tn(t)).trimEnd();if(crt(t))return kci(t);if(ev(t))return["/*",Ik(t.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(t))}function kci(i){let e=lrt(i),t=i.value[0]==="*"&&i.value[1]!=="*";return["/",e.map((n,r)=>{if(r===0)return[n.trimEnd(),gt];if(r===e.length-1)return[" ",n];let o=n.trimEnd(),s=[" ",o];return t&&o!=="*"&&n.endsWith(" ")?[s," ",nai(U_e)]:[s,gt]}),"/"]}function Ici(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S9(i){return i.type==="JSXText"&&(pX.hasNonWhitespaceCharacter(Ym(i))||!/\n/.test(Ym(i)))}function Mci(i){let{node:e,parent:t}=i;if(!sd(e)||!sd(t))return!1;let{index:n,siblings:r}=i,o;for(let s=n;s>0;s--){let a=r[s-1];if(!(a.type==="JSXText"&&!S9(a))){o=a;break}}return o?.type==="JSXExpressionContainer"&&o.expression.type==="JSXEmptyExpression"&&DX(o.expression)}function Rci(i){return DX(i.node)||Mci(i)}function Oci(i){return i.type==="CallExpression"&&!i.optional&&i.arguments.length===1&&i.callee.type==="Identifier"&&i.callee.name==="Boolean"}function urt(i,e,t){let{node:n,parent:r,grandparent:o,key:s}=i,a=s!=="body"&&(r.type==="IfStatement"||r.type==="WhileStatement"||r.type==="SwitchStatement"||r.type==="DoWhileStatement"),l=n.operator==="|>"&&i.root.extra?.__isUsingHackPipeline,c=m_e(i,e,t,!1,a);if(a)return c;if(l)return je(c);if(s==="callee"&&y9(r)||r.type==="UnaryExpression"&&!$t(n)||Gs(r)&&!r.computed)return je([bt([dt,...c]),dt]);let u=NR(r)||r.type==="JSXExpressionContainer"&&o.type==="JSXAttribute"||n.operator!=="|"&&r.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(r.type==="NGRoot"&&e.parser==="__ng_binding"||r.type==="NGMicrosyntaxExpression"&&o.type==="NGMicrosyntax"&&o.body.length===1)||n===r.body&&r.type==="ArrowFunctionExpression"||n!==r.body&&r.type==="ForStatement"||r.type==="ConditionalExpression"&&!NR(o)&&!y9(o)||r.type==="TemplateLiteral"||s==="argument"&&r.type==="UnaryExpression"||s==="arguments"&&Oci(r),d=r.type==="AssignmentExpression"||r.type==="VariableDeclarator"||r.type==="ClassProperty"||r.type==="PropertyDefinition"||r.type==="TSAbstractPropertyDefinition"||r.type==="ClassPrivateProperty"||oS(r),h=Fw(n.left)&&z_e(n.operator,n.left.operator);if(u||E9(n)&&!h||!E9(n)&&d)return je(c);if(c.length===0)return"";let f=sd(n.right),p=c.findIndex(_=>typeof _!="string"&&!Array.isArray(_)&&_.type===_b),g=c.slice(0,p===-1?1:p+1),v=c.slice(g.length,f?-1:void 0),A=Symbol("logicalChain-"+ ++Pci),w=je([...g,bt(v)],{id:A});if(!f)return w;let C=Ur(0,c,-1);return je([w,x9(C,{groupId:A})])}function m_e(i,e,t,n,r){let{node:o}=i;if(!Fw(o))return[je(t())];let s=[];z_e(o.operator,o.left.operator)?s=i.call(()=>m_e(i,e,t,!0,r),"left"):s.push(je(t("left")));let a=E9(o),l=o.right.type==="ChainExpression"?o.right.expression:o.right,c=(o.type==="NGPipeExpression"||o.operator==="|>"||Bci(i,e))&&!Rw(e.originalText,l),u=!$t(l,fi.Leading,k_e)&&Rw(e.originalText,l),d=o.type==="NGPipeExpression"?"|":o.operator,h=o.type==="NGPipeExpression"&&o.arguments.length>0?je(bt([dt,": ",jr([li,": "],i.map(()=>Xm(2,je(t())),"arguments"))])):"",f;if(a)f=[d,Rw(e.originalText,l)?bt([li,t("right"),h]):[" ",t("right"),h]];else{let v=d==="|>"&&i.root.extra?.__isUsingHackPipeline?i.call(()=>m_e(i,e,t,!0,r),"right"):t("right");if(e.experimentalOperatorPosition==="start"){let A="";if(u)switch(cS(v)){case Ow:A=v[0],v.shift();break;case Bw:A=v.contents[0],v.contents.shift();break}f=[li,A,d," ",v,h]}else f=[c?li:"",d,c?" ":li,v,h]}let{parent:p}=i,g=$t(o.left,fi.Trailing|fi.Line);if((g||!(r&&o.type==="LogicalExpression")&&p.type!==o.type&&o.left.type!==o.type&&o.right.type!==o.type)&&(f=je(f,{shouldBreak:g})),e.experimentalOperatorPosition==="start"?s.push(a||u?" ":"",f):s.push(c?"":" ",f),n&&$t(o)){let v=W_e(Oh(i,s,e));return v.type===aS?v.parts:Array.isArray(v)?v:[v]}return s}function E9(i){return i.type!=="LogicalExpression"?!1:!!($0(i.right)&&i.right.properties.length>0||Kd(i.right)&&i.right.elements.length>0||sd(i.right))}function Bci(i,e){return(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&git(i.node)&&!i.hasAncestor(t=>!git(t)&&t.type!=="JsExpressionRoot")}function zci(i,e,t){let{node:n}=i;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return t("node");case"NGPipeExpression":return urt(i,e,t);case"NGChainedExpression":return je(jr([";",li],i.map(()=>Wci(i)?t():["(",t(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return i.map(()=>[i.isFirst?"":bit(i)?" ":[";",li],t()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[t("expression"),n.alias===null?"":[" as ",t("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:r,parent:o}=i,s=bit(i)||Vci(i)||(r===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||r===2&&(n.key.name==="else"&&o.body[r-1].type==="NGMicrosyntaxKeyedExpression"&&o.body[r-1].key.name==="then"||n.key.name==="track"))&&o.body[0].type==="NGMicrosyntaxExpression";return[t("key"),s?" ":": ",t("expression")]}case"NGMicrosyntaxLet":return["let ",t("key"),n.value===null?"":[" = ",t("value")]];case"NGMicrosyntaxAs":return[t("key")," as ",t("alias")];default:throw new VR(n,"Angular")}}function bit({node:i,index:e}){return i.type==="NGMicrosyntaxKeyedExpression"&&i.key.name==="of"&&e===1}function Vci(i){let{node:e}=i;return i.parent.body[1].key.name==="of"&&e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="track"&&e.key.type==="NGMicrosyntaxKey"}function Wci({node:i}){return u_e(i,Hci)}function drt(i,e,t){let{node:n}=i;return je([jr(li,i.map(t,"decorators")),frt(n,e)?gt:li])}function Uci(i,e,t){return prt(i.node)?[jr(gt,i.map(t,"declaration","decorators")),gt]:""}function hrt(i,e,t){let{node:n,parent:r}=i,{decorators:o}=n;if(!qs(o)||prt(r)||iSe(i))return"";let s=n.type==="ClassExpression"||n.type==="ClassDeclaration"||frt(n,e);return[i.key==="declaration"&&aoi(r)?gt:s?Pw:"",jr(li,i.map(t,"decorators")),li]}function frt(i,e){return i.decorators.some(t=>Ru(e.originalText,tn(t)))}function prt(i){if(i.type!=="ExportDefaultDeclaration"&&i.type!=="ExportNamedDeclaration"&&i.type!=="DeclareExportDeclaration")return!1;let e=i.declaration?.decorators;return qs(e)&&_X(i,e[0])}function mrt(i){return i.type==="UnaryExpression"&&(i.operator==="+"||i.operator==="-")&&QA(i.argument)}function nSe(i,e,t){let{node:n}=i,r=[],o=__e(n)?"elementTypes":"elements",s=n[o];if(s.length===0&&!n.inexact)r.push(je(["[",LX(i,e),"]"]));else{let a=Ur(0,s,-1),l=a?.type!=="RestElement"&&!n.inexact,c=a===null,u=Symbol("array"),d=!e.__inJestEach&&s.length>1&&s.every((p,g,v)=>{if(!Kd(p)&&!$0(p))return!1;let A=p?.type,w=v[g+1];if(w&&A!==w.type)return!1;let C=Kd(p)?"elements":"properties";return p[C]&&p[C].length>1})||$t(n,fi.Dangling|fi.Line),h=grt(n,e),f=l?c?",":Int(e)?h?wr(",","",{groupId:u}):wr(","):"":"";r.push(je(["[",bt([dt,h?Qci(i,e,t,f):[jci(i,e,t,o,n.inexact),f],Gc(i,e)]),dt,"]"],{shouldBreak:d,id:u}))}return r.push(Bf(i),Yd(i,t)),r}function grt(i,e){return Kd(i)&&i.elements.length>0&&i.elements.every(t=>t&&(QA(t)||mrt(t)&&!$t(t.argument))&&!$t(t,fi.Trailing|fi.Line,n=>!Ru(e.originalText,yn(n),{backwards:!0})))}function brt({node:i},{originalText:e}){let t=tn(i);if(t===yn(i))return!1;let{length:n}=e;for(;t{o.push(s?je(t()):""),(!a||r)&&o.push([",",li,s&&brt(i,e)?dt:""])},n),r&&o.push("..."),o}function Qci(i,e,t,n){let r=[];return i.each(({isLast:o,next:s})=>{r.push([t(),o?n:","]),o||r.push(brt(i,e)?[gt,gt]:$t(s,fi.Leading|fi.Line)?gt:li)},"elements"),bnt(r)}function vit(i){return i.quasis.some(e=>e.value.raw.includes(` -`))}function vrt(i,e){return(i.type==="TemplateLiteral"&&vit(i)||i.type==="TaggedTemplateExpression"&&vit(i.quasi))&&!Ru(e,yn(i),{backwards:!0})}function Art(i){return Eb(Gci,i,e=>e.type==="ConditionalExpression"&&!Of(e,t=>t.type==="ObjectExpression"))}function Yci(i,e,t,n={}){let r=[],o,s=[],a=!1,l=!n.expandLastArg&&i.node.body.type==="ArrowFunctionExpression",c;(function A(){let{node:w}=i,C=Kci(i,e,t,n);if(r.length===0)r.push(C);else{let{leading:_,trailing:E}=knt(i,e);r.push([_,C]),s.unshift(E)}l&&(a||(a=w.returnType&&zf(w).length>0||w.typeParameters||zf(w).some(_=>_.type!=="Identifier"))),!l||w.body.type!=="ArrowFunctionExpression"?(o=t("body",n),c=w.body):i.call(A,"body")})();let u=!Rw(e.originalText,c)&&(qci(c)||Jci(c,o,e)||!a&&Art(c)),d=i.key==="callee"&&MR(i.parent),h=Symbol("arrow-chain"),f=Xci(i,n,{signatureDocs:r,shouldBreak:a}),p=!1,g=!1,v=!1;return l&&(d||n.assignmentLayout)&&(g=!0,v=!$t(i.node,fi.Leading&fi.Line),p=n.assignmentLayout==="chain-tail-arrow-chain"||d&&!u),o=Zci(i,e,n,{bodyDoc:o,bodyComments:s,functionBody:c,shouldPutBodyOnSameLine:u}),je([je(g?bt([v?dt:"",f]):f,{shouldBreak:p,id:h})," =>",l?x9(o,{groupId:h}):je(o),l&&d?wr(dt,"",{groupId:h}):""])}function Kci(i,e,t,n){let{node:r}=i,o=[];if(r.async&&o.push("async "),qnt(i,e))o.push(t(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,l=$_e(i,t);if(a){if(Pf(l))throw new vX;l=je(bX(l))}o.push(je([Vk(i,e,t,a,!0),l]))}let s=Gc(i,e,{marker:"commentBeforeArrow"});return s&&o.push(" ",s),o}function Jci(i,e,t){return Kd(i)||$0(i)||i.type==="ArrowFunctionExpression"||i.type==="DoExpression"||i.type==="BlockStatement"||sd(i)||e.label?.hug!==!1&&(e.label?.embed||vrt(i,t.originalText))}function Xci(i,e,{signatureDocs:t,shouldBreak:n}){if(t.length===1)return t[0];let{parent:r,key:o}=i;return o!=="callee"&&MR(r)||Fw(r)?je([t[0]," =>",bt([li,jr([" =>",li],t.slice(1))])],{shouldBreak:n}):o==="callee"&&MR(r)||e.assignmentLayout?je(jr([" =>",li],t),{shouldBreak:n}):je(bt(jr([" =>",li],t)),{shouldBreak:n})}function Zci(i,e,t,{bodyDoc:n,bodyComments:r,functionBody:o,shouldPutBodyOnSameLine:s}){let{node:a,parent:l}=i,c=t.expandLastArg?uS(e,"all"):"",u=(t.expandLastArg||l.type==="JSXExpressionContainer")&&!$t(a)?dt:"";return s&&Art(o)?[" ",je([wr("","("),bt([dt,n]),wr("",")"),c,u]),r]:s?[" ",n,r]:[bt([li,n,r]),c,u]}function rSe(i,e){let{printWidth:t}=e;if($t(i))return!1;let n=t*$ci;if(i.type==="ThisExpression"||i.type==="Identifier"&&i.name.length<=n||mrt(i)&&!$t(i.argument))return!0;let r=i.type==="Literal"&&"regex"in i&&i.regex.pattern||i.type==="RegExpLiteral"&&i.pattern;return r?r.length<=n:Fu(i)?Lk(Ym(i),e).length<=n:i.type==="TemplateLiteral"?i.expressions.length===0&&i.quasis[0].value.raw.length<=n&&!i.quasis[0].value.raw.includes(` -`):i.type==="UnaryExpression"?rSe(i.argument,{printWidth:t}):i.type==="CallExpression"&&i.arguments.length===0&&i.callee.type==="Identifier"?i.callee.name.length<=n-2:S_e(i)}function LR(i){return Gs(i)||i.type==="BindExpression"&&!!i.object}function eui(i){if(i.length<=1)return!1;let e=0;for(let t of i)if(A9(t)){if(e+=1,e>1)return!0}else if(t=sS(t),Ts(t)){for(let n of Db(t))if(A9(n))return!0}return!1}function yrt(i){let{node:e,parent:t,key:n}=i;return n==="callee"&&Ts(e)&&Ts(t)&&t.arguments.length>0&&e.arguments.length>t.arguments.length}function WA(i,e=2){if(e<=0)return!1;let t=n=>WA(n,e-1);if(i=sS(i),zit(i))return OR(i.pattern??i.regex.pattern)<=5;if(S_e(i)||iui(i)||i.type==="ArgumentPlaceholder")return!0;if(i.type==="TemplateLiteral")return i.quasis.every(n=>!n.value.raw.includes(` -`))&&i.expressions.every(t);if($0(i))return i.properties.every(n=>!n.computed&&(n.shorthand||n.value&&t(n.value)));if(Kd(i))return i.elements.every(n=>n===null||t(n));if(MR(i)){if(i.type==="ImportExpression"||WA(i.callee,e)){let n=Db(i);return n.length<=e&&n.every(t)}return!1}return Gs(i)?WA(i.object,e)&&WA(i.property,e):i.type==="UnaryExpression"&&tui.has(i.operator)||i.type==="UpdateExpression"?WA(i.argument,e):!1}function nui(i,e,t){let{node:n}=i,r=Db(n);if(r.length===0)return je(["(",LX(i,e),")"]);let o=r.length-1;if(sui(r)){let d=["("];return a_e(i,(h,f)=>{d.push(t()),f!==o&&d.push(", ")}),d.push(")"),d}let s=!1,a=[];a_e(i,({node:d},h)=>{let f=t();h===o||(qA(d,e)?(s=!0,f=[f,",",gt,gt]):f=[f,",",li]),a.push(f)});let l=i.root.type!=="NGRoot"&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"?uS(e,"all"):"";function c(){return je(["(",bt([li,...a]),l,li,")"],{shouldBreak:!0})}if(s||i.parent.type!=="Decorator"&&eui(r))return c();if(oui(r)){let d=a.slice(1);if(d.some(Pf))return c();let h;try{h=t($tt(n,0),{expandFirstArg:!0})}catch(f){if(f instanceof vX)return c();throw f}return Pf(h)?[Pw,Tk([["(",je(h,{shouldBreak:!0}),", ",...d,")"],c()])]:Tk([["(",h,", ",...d,")"],["(",je(h,{shouldBreak:!0}),", ",...d,")"],c()])}if(rui(r,a,e)){let d=a.slice(0,-1);if(d.some(Pf))return c();let h;try{h=t($tt(n,-1),{expandLastArg:!0})}catch(f){if(f instanceof vX)return c();throw f}return Pf(h)?[Pw,Tk([["(",...d,je(h,{shouldBreak:!0}),")"],c()])]:Tk([["(",...d,h,")"],["(",...d,je(h,{shouldBreak:!0}),")"],c()])}let u=["(",bt([dt,...a]),l,dt,")"];return yrt(i)?u:je(u,{shouldBreak:a.some(Pf)||s})}function wX(i,e=!1){if($0(i)&&(i.properties.length>0||$t(i))||Kd(i)&&(i.elements.length>0||$t(i))||(Z0(i)||i.type==="TSTypeAssertion")&&wX(i.expression)||i.type==="FunctionExpression"||i.type==="DoExpression"||i.type==="ModuleExpression")return!0;if(i.type==="ArrowFunctionExpression"){let{body:t}=i;if(t.type==="BlockStatement"||sd(t)||$0(t)||Kd(t)||t.type==="ArrowFunctionExpression"&&wX(t,!0)||!e&&(t.type==="ConditionalExpression"||Ts(sS(t))))return!0}return!1}function rui(i,e,t){if(i.length===1){let o=Ur(0,e,-1);if(o.label?.embed&&o.label?.hug!==!1)return!0}let n=Ur(0,i,-1),r=Ur(0,i,-2);return!$t(n,fi.Leading)&&!$t(n,fi.Trailing)&&wX(n)&&(!r||r.type!==n.type)&&(i.length!==2||r.type!=="ArrowFunctionExpression"||!Kd(n))&&!(i.length>1&&grt(n,t))}function oui(i){if(i.length!==2)return!1;let[e,t]=i;return e.type==="ModuleExpression"&&aui(t)?!0:!$t(e)&&(e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement")&&t.type!=="FunctionExpression"&&t.type!=="ArrowFunctionExpression"&&t.type!=="ConditionalExpression"&&wrt(t)&&!wX(t)}function wrt(i){if(i.type==="ParenthesizedExpression")return wrt(i.expression);if(Z0(i)||i.type==="TypeCastExpression"){let{typeAnnotation:e}=i;if(e.type==="TypeAnnotation"&&(e=e.typeAnnotation),e.type==="TSArrayType"&&(e=e.elementType,e.type==="TSArrayType"&&(e=e.elementType)),e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference"){let t=e.type==="GenericTypeAnnotation"?e.typeParameters:e.typeArguments;t?.params.length===1&&(e=t.params[0])}return Q_e(e)&&WA(i.expression,1)}return MR(i)&&Db(i).length>1?!1:Fw(i)?WA(i.left,1)&&WA(i.right,1):zit(i)||WA(i)}function sui(i){return i.length===2?Ait(i,0):i.length===3?i[0].type==="Identifier"&&Ait(i,1):!1}function Ait(i,e){let t=i[e],n=i[e+1];return t.type==="ArrowFunctionExpression"&&zf(t).length===0&&t.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&i.every(r=>!$t(r))}function aui(i){if(!(i.type==="ObjectExpression"&&i.properties.length===1))return!1;let[e]=i.properties;return oS(e)?!e.computed&&(e.key.type==="Identifier"&&e.key.name==="type"||Fu(e.key)&&e.key.value==="type")&&Fu(e.value)&&e.value.value==="module":!1}function lui(i,e,t){return[t("object"),je(bt([dt,xrt(i,e,t)]))]}function xrt(i,e,t){return["::",t("callee")]}function uui(i){let{node:e,ancestors:t}=i;for(let n of t){if(!(Gs(n)&&n.object===e||n.type==="TSNonNullExpression"&&n.expression===e))return n.type==="NewExpression"&&n.callee===e;e=n}return!1}function dui(i,e,t){let n=t("object"),r=Crt(i,e,t),{node:o}=i,s=i.findAncestor(c=>!(Gs(c)||c.type==="TSNonNullExpression")),a=i.findAncestor(c=>!Mk(c)),l=s.type==="BindExpression"||s.type==="AssignmentExpression"&&s.left.type!=="Identifier"||uui(i)||o.computed||o.object.type==="Identifier"&&o.property.type==="Identifier"&&!Gs(a)||(a.type==="AssignmentExpression"||a.type==="VariableDeclarator")&&(cui(sS(o.object))||n.label?.memberChain);return k9(n.label,[n,Sb,l?r:je(bt([dt,r]))])}function Crt(i,e,t){let n=t("property"),{node:r}=i,o=Bf(i);return r.computed?!r.property||QA(r.property)?[o,"[",n,"]"]:je([o,"[",bt([dt,n]),dt,"]"]):[o,".",n]}function hui(i,e,t){let n=(i.parent.type==="ChainExpression"?i.grandparent:i.parent).type==="ExpressionStatement",r=[];function o(q){let{originalText:U}=e,F=EX(U,tn(q));return U.charAt(F)===")"?F!==!1&&AX(U,F+1):qA(q,e)}function s(){let{node:q}=i;if(Ts(q)&&(LR(q.callee)||Ts(q.callee))&&!qm(i,e)){let U=o(q);r.unshift({node:q,hasTrailingEmptyLine:U,printed:[Oh(i,[Bf(i),t("typeArguments"),g_e(i,e,t)],e),U?gt:""]}),i.call(s,"callee")}else LR(q)&&!qm(i,e)?(r.unshift({node:q,printed:Oh(i,Gs(q)?Crt(i,e,t):xrt(i,e,t),e)}),i.call(s,"object")):q.type==="ChainExpression"&&!qm(i,e)?i.call(s,"expression"):q.type==="TSNonNullExpression"&&!qm(i,e)?(r.unshift({node:q,printed:Oh(i,"!",e)}),i.call(s,"expression")):r.unshift({node:q,printed:t()})}let{node:a}=i;r.unshift({node:a,printed:[Bf(i),t("typeArguments"),g_e(i,e,t)]}),a.callee&&i.call(s,"callee");let l=[],c=[r[0]],u=1;for(;u0&&l.push(c);function h(q){return/^[A-Z]|^[$_]+$/.test(q)}function f(q){return q.length<=e.tabWidth}function p(q){let U=q[1][0]?.node.computed;if(q[0].length===1){let ne=q[0][0].node;return ne.type==="ThisExpression"||ne.type==="Identifier"&&(h(ne.name)||n&&f(ne.name)||U)}let F=Ur(0,q[0],-1).node;return Gs(F)&&F.property.type==="Identifier"&&(h(F.property.name)||U)}let g=l.length>=2&&!$t(l[1][0].node)&&p(l);function v(q){return q.map(U=>U.printed)}function A(q){return q.length===0?"":bt([gt,jr(gt,q.map(v))])}let w=l.map(v),C=w,_=g?3:2,E=l.flat(),I=E.slice(1,-1).some(q=>$t(q.node,fi.Leading))||E.slice(0,-1).some(q=>$t(q.node,fi.Trailing))||l[_]&&$t(l[_][0].node,fi.Leading);if(l.length<=_&&!I&&l.every(q=>!Ur(0,q,-1).hasTrailingEmptyLine))return yrt(i)?C:je(C);let T=Ur(0,l[g?1:0],-1).node,L=!Ts(T)&&o(T),M=[v(l[0]),g?l.slice(1,2).map(v):"",L?gt:"",A(l.slice(g?2:1))],z=r.map(({node:q})=>q).filter(Ts);function H(){let q=Ur(0,Ur(0,l,-1),-1).node,U=Ur(0,w,-1);return Ts(q)&&Pf(U)&&z.slice(0,-1).some(F=>F.arguments.some(A9))}let B;return I||z.length>2&&z.some(q=>q.arguments.some(U=>!WA(U)))||w.slice(0,-1).some(Pf)||H()?B=je(M):B=[Pf(C)||L?Pw:"",Tk([C,M])],k9({memberChain:!0},B)}function xX(i,e,t){let{node:n}=i,r=n.type==="NewExpression",o=Bf(i),s=Db(n),a=n.type!=="TSImportType"&&n.typeArguments?[t("typeArguments"),Sb]:"",l=s.length===1&&vrt(s[0],e.originalText);if(l||mui(i)||gui(i)||TX(n,i.parent)){let d=[];if(a_e(i,()=>{d.push(t())}),!(l&&d[0].label?.embed))return[yit(i,t),o,a,"(",jr(", ",d),")"]}let c=n.type==="ImportExpression"||n.type==="TSImportType"||n.type==="TSExternalModuleReference";if(!c&&!r&&LR(n.callee)&&!i.call(()=>qm(i,e),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return fui(i,e,t);let u=[yit(i,t),o,a,g_e(i,e,t)];return c||Ts(n.callee)?je(u):u}function yit(i,e){let{node:t}=i;return t.type==="ImportExpression"?`import${t.phase?`.${t.phase}`:""}`:t.type==="TSImportType"?"import":t.type==="TSExternalModuleReference"?"require":[t.type==="NewExpression"?"new ":"",e("callee"),Sb]}function mui(i){let{node:e}=i;if(!(e.type==="ImportExpression"||e.type==="TSImportType"||e.type==="TSExternalModuleReference"||e.type==="CallExpression"&&!e.optional&&G_e(e.callee,pui)))return!1;let t=Db(e);return t.length===1&&Fu(t[0])&&!$t(t[0])}function gui(i){let{node:e}=i;if(e.type!=="CallExpression"||e.optional||e.callee.type!=="Identifier")return!1;let t=Db(e);return e.callee.name==="require"?(t.length===1&&Fu(t[0])||t.length>1)&&!$t(t[0]):e.callee.name==="define"&&i.parent.type==="ExpressionStatement"?t.length===1||t.length===2&&t[0].type==="ArrayExpression"||t.length===3&&Fu(t[0])&&t[1].type==="ArrayExpression":!1}function N9(i,e,t,n,r,o){let s=Aui(i,e,t,n,o),a=o?t(o,{assignmentLayout:s}):"";switch(s){case"break-after-operator":return je([je(n),r,je(bt([li,a]))]);case"never-break-after-operator":return je([je(n),r," ",a]);case"fluid":{let l=Symbol("assignment");return je([je(n),r,je(bt(li),{id:l}),Sb,x9(a,{groupId:l})])}case"break-lhs":return je([n,r," ",je(a)]);case"chain":return[je(n),r,li,a];case"chain-tail":return[je(n),r,bt([li,a])];case"chain-tail-arrow-chain":return[je(n),r,a];case"only-left":return n}}function bui(i,e,t){let{node:n}=i;return N9(i,e,t,t("left"),[" ",n.operator],"right")}function vui(i,e,t){return N9(i,e,t,t("id")," =","init")}function Aui(i,e,t,n,r){let{node:o}=i,s=o[r];if(!s)return"only-left";let a=!mX(s);if(i.match(mX,_rt,u=>!a||u.type!=="ExpressionStatement"&&u.type!=="VariableDeclaration"))return a?s.type==="ArrowFunctionExpression"&&s.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&mX(s.right)||Jm(s)&&!NX(s)||Rw(e.originalText,s)||$t(s,fi.Leading,crt))return"break-after-operator";if(o.type==="ImportAttribute"||s.type==="CallExpression"&&s.callee.name==="require"||i.root.type==="JsonRoot")return"never-break-after-operator";let l=Zsi(n);if(wui(o)||_ui(o)||Srt(o)&&l)return"break-lhs";let c=Sui(o,n,e);return i.call(()=>yui(i,e,t,c),r)?"break-after-operator":xui(o)?"break-lhs":!l&&(c||s.type==="TemplateLiteral"||s.type==="TaggedTemplateExpression"||ooi(s)||QA(s)||s.type==="ClassExpression")?"never-break-after-operator":"fluid"}function yui(i,e,t,n){let r=i.node;if(Fw(r)&&!E9(r))return!0;switch(r.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!e.experimentalTernaries&&!Dui(r))break;return!0;case"ConditionalExpression":{if(!e.experimentalTernaries){let{test:c}=r;return Fw(c)&&!E9(c)}let{consequent:a,alternate:l}=r;return a.type==="ConditionalExpression"||l.type==="ConditionalExpression"}case"ClassExpression":return qs(r.decorators)}if(n)return!1;let o=r,s=[];for(;;)if(o.type==="UnaryExpression"||o.type==="AwaitExpression"||o.type==="YieldExpression"&&o.argument!==null)o=o.argument,s.push("argument");else if(o.type==="TSNonNullExpression")o=o.expression,s.push("expression");else break;return!!(Fu(o)||i.call(()=>Ert(i,e,t),...s))}function wui(i){if(_rt(i)){let e=i.left||i.id;return e.type==="ObjectPattern"&&e.properties.length>2&&e.properties.some(t=>oS(t)&&(!t.shorthand||t.value?.type==="AssignmentPattern"))}return!1}function mX(i){return i.type==="AssignmentExpression"}function _rt(i){return mX(i)||i.type==="VariableDeclarator"}function xui(i){let e=Cui(i);if(qs(e)){let t=i.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(e.length>1&&e.some(n=>n[t]||n.default))return!0}return!1}function Cui(i){if(Vit(i))return i.typeParameters?.params}function _ui(i){if(i.type!=="VariableDeclarator")return!1;let{typeAnnotation:e}=i.id;if(!e||!e.typeAnnotation)return!1;let t=wit(e.typeAnnotation);return qs(t)&&t.length>1&&t.some(n=>qs(wit(n))||n.type==="TSConditionalType")}function Srt(i){return i.type==="VariableDeclarator"&&i.init?.type==="ArrowFunctionExpression"}function wit(i){let e;switch(i.type){case"GenericTypeAnnotation":e=i.typeParameters;break;case"TSTypeReference":e=i.typeArguments;break}return e?.params}function Ert(i,e,t,n=!1){let{node:r}=i,o=()=>Ert(i,e,t,!0);if(Mk(r))return i.call(o,"expression");if(Ts(r)){if(xX(i,e,t).label?.memberChain)return!1;let s=Db(r);return!(s.length===0||s.length===1&&rSe(s[0],e))||Eui(r,t)?!1:i.call(o,"callee")}return Gs(r)?i.call(o,"object"):n&&(r.type==="Identifier"||r.type==="ThisExpression")}function Sui(i,e,t){return oS(i)?(e=W_e(e),typeof e=="string"&&OR(e)1)return!0;if(t.length===1){let n=t[0];if(Jm(n)||D9(n)||n.type==="TSTypeLiteral"||n.type==="ObjectTypeAnnotation")return!0}if(Pf(e("typeArguments")))return!0}return!1}function xit(i){switch(i.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!i.typeParameters;case"TSTypeReference":return!!i.typeArguments;default:return!1}}function Dui(i){return xit(i.checkType)||xit(i.extendsType)}function Tui(i,e,t){let{node:n}=i,r=["await"];if(n.argument){r.push(" ",t("argument"));let{parent:o}=i;if(Ts(o)&&o.callee===n||Gs(o)&&o.object===n){r=[bt([dt,...r]),dt];let s=i.findAncestor(a=>a.type==="AwaitExpression"||a.type==="BlockStatement");if(s?.type!=="AwaitExpression"||!Of(s.argument,a=>a===n))return je(r)}}return r}function b_e(i,e,t,n){let{node:r}=i,o=[],s=Lui(0,r[n],a=>a.type!=="EmptyStatement");return i.each(({node:a})=>{a.type!=="EmptyStatement"&&(o.push(t()),a!==s&&(o.push(gt),qA(a,e)&&o.push(gt)))},n),o}function Drt(i,e,t){let n=Nui(i,e,t),{node:r,parent:o}=i;if(r.type==="Program"&&o?.type!=="ModuleExpression")return n?[n,gt]:"";let s=[];if(r.type==="StaticBlock"&&s.push("static "),s.push("{"),n)s.push(bt([gt,n]),gt);else{let a=i.grandparent;o.type==="ArrowFunctionExpression"||o.type==="FunctionExpression"||o.type==="FunctionDeclaration"||o.type==="ComponentDeclaration"||o.type==="HookDeclaration"||o.type==="ObjectMethod"||o.type==="ClassMethod"||o.type==="ClassPrivateMethod"||o.type==="ForStatement"||o.type==="WhileStatement"||o.type==="DoWhileStatement"||o.type==="DoExpression"||o.type==="ModuleExpression"||o.type==="CatchClause"&&!a.finalizer||o.type==="TSModuleDeclaration"||o.type==="DeclareModule"||o.type==="MatchStatementCase"||r.type==="StaticBlock"||s.push(gt)}return s.push("}"),s}function Nui(i,e,t){let{node:n}=i,r=qs(n.directives),o=n.body.some(l=>l.type!=="EmptyStatement"),s=$t(n,fi.Dangling);if(!r&&!o&&!s)return"";let a=[];return r&&(a.push(b_e(i,e,t,"directives")),(o||s)&&(a.push(gt),qA(Ur(0,n.directives,-1),e)&&a.push(gt))),o&&a.push(b_e(i,e,t,"body")),s&&a.push(Gc(i,e)),a}function Mui(i){let e=new WeakMap;return t=>Eb(e,t,()=>Symbol(i))}function Fui(i,e){let{node:t}=i;if(t.type==="ClassBody"||t.type==="TSInterfaceBody"){i.each(e,"body");return}if(t.type==="TSTypeLiteral"){i.each(e,"members");return}if(t.type==="RecordDeclarationBody"){i.each(e,"elements");return}if(t.type==="ObjectTypeAnnotation"){let n=Trt.flatMap(r=>i.map(({node:o,index:s})=>({node:o,loc:yn(o),selector:[r,s]}),r)).sort((r,o)=>r.loc-o.loc);for(let[r,{node:o,selector:s}]of n.entries())i.call(()=>e({node:o,next:n[r+1]?.node,isLast:r===n.length-1}),...s)}}function Oui(i){if(i.type==="ObjectTypeAnnotation")return Trt.some(t=>qs(i[t]));let e=i.type==="RecordDeclarationBody"?i.elements:i.body;return qs(e)}function oSe(i,e,t){let{node:n}=i,r=[],o=n.type==="ObjectTypeAnnotation",s=n.type==="RecordDeclarationBody",a=!krt(i),l=a?li:gt,c=$t(n,fi.Dangling),[u,d]=o&&n.exact?["{|","|}"]:"{}",h=!0,f;if(Fui(i,({node:p,next:g,isLast:v})=>{if(f??(f=p),h&&(h=!1),r.push(t()),!s&&a&&o){let{parent:A}=i;A.inexact||!v?r.push(","):r.push(uS(e))}s&&p.type!=="MethodDefinition"&&r.push(","),!s&&!a&&(Pui({node:p,next:g},e)||Lrt({node:p,next:g},e))&&r.push(";"),v||(r.push(l),qA(p,e)&&r.push(gt))}),c&&r.push(Gc(i,e)),n.type==="ObjectTypeAnnotation"&&n.inexact){h&&(h=!1);let p;$t(n,fi.Dangling)?p=[$t(n,fi.Line)||Ru(e.originalText,tn(Ur(0,Km(n),-1)))?gt:li,"..."]:p=[f?li:"","..."],r.push(p)}if(a){let p=$t(n,fi.Dangling|fi.Line)||e.objectWrap==="preserve"&&f&&Rp(e.originalText,yn(n),yn(f)),g;if(r.length===0)g=u+d;else{let v=!e.bracketSpacing||h&&!p?dt:li;g=[u,bt([v,...r]),v,d]}return i.match(void 0,(v,A)=>A==="typeAnnotation",(v,A)=>A==="typeAnnotation",b9)||i.match(void 0,(v,A)=>v.type==="FunctionTypeParam"&&A==="typeAnnotation",b9)?g:je(g,{shouldBreak:p})}return[u,r.length>0?[bt([gt,r]),gt]:"",d]}function krt(i){let{node:e}=i;if(e.type==="ObjectTypeAnnotation"){let{key:t,parent:n}=i;return t==="body"&&(n.type==="InterfaceDeclaration"||n.type==="DeclareInterface"||n.type==="DeclareClass")}return e.type==="ClassBody"||e.type==="TSInterfaceBody"||e.type==="RecordDeclarationBody"}function Mw(i,e){let{parent:t}=i;return i.callParent(krt)?t.type==="ObjectTypeAnnotation"?";":pl(e):t.type==="TSTypeLiteral"?i.isLast?e.semi?wr(";"):"":e.semi||Lrt({node:i.node,next:i.next},e)?";":wr("",";"):""}function Pui({node:i,next:e},t){if(t.semi||!Cit(i))return!1;if(!i.value&&Irt(i))return!0;if(!e||e.static||e.accessibility||e.readonly)return!1;if(!e.computed){let n=e.key?.name;if(n==="in"||n==="instanceof")return!0}if(Cit(e)&&!e.static&&e.variance&&!e.declare)return!0;switch(e.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return e.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((e.value?e.value.async:e.async)||e.kind==="get"||e.kind==="set")return!1;let n=e.value?e.value.generator:e.generator;return!!(e.computed||n)}case"TSIndexSignature":return!0}return!1}function Lrt({node:i,next:e},t){return t.semi||!Bui(i)?!1:Irt(i)?!0:e&&e.type==="TSCallSignatureDeclaration"?!(i.type==="TSPropertySignature"&&i.typeAnnotation):!1}function sSe(i,e,t){let n=Hui(i,e,t),{node:r}=i;if(r.type==="ClassExpression"&&qs(r.decorators)){let o=hrt(i,e,t);return qm(i,e)?[bt([dt,o,n]),dt]:[o,n]}return n}function Hui(i,e,t){let{node:n}=i,r=Vui(n),o=n.type==="RecordDeclaration",s=r?"interface":o?"record":"class",a=[Zm(i),kX(i),s],l=Mrt(i),c=[],u=[];if(n.type!=="InterfaceTypeAnnotation"){n.id&&c.push(" ");for(let h of["id","typeParameters"])if(n[h]){let{leading:f,trailing:p}=i.call(()=>knt(i,e),h);c.push(f,t(h),bt(p))}}if(n.superClass){let h=[jui(i,e,t),t("superTypeArguments")],f=i.call(()=>["extends ",Oh(i,h,e)],"superClass");l?u.push(li,je(f)):u.push(" ",f)}else u.push(t_e(i,e,t,"extends"));u.push(t_e(i,e,t,"mixins"),t_e(i,e,t,"implements"));let d;return l?(d=zui(n),a.push(je([...c,bt(u)],{id:d}))):a.push(...c,...u),!r&&l&&Oui(n.body)?a.push(wr(gt," ",{groupId:d})):a.push(" "),a.push(t("body")),a}function Nrt(i){let e=i.superClass?1:0;for(let t of["extends","mixins","implements"])if(Array.isArray(i[t])&&(e+=i[t].length),e>1)return!0;return e>1}function Wui(i){let{node:e}=i;if($t(e.id,fi.Trailing)||$t(e.typeParameters,fi.Trailing)||$t(e.superClass)||Nrt(e))return!0;if(e.superClass)return i.parent.type==="AssignmentExpression"?!1:!e.superTypeArguments&&Gs(sS(e.superClass));let t=e.extends?.[0]??e.mixins?.[0]??e.implements?.[0];return t?t.type==="InterfaceExtends"&&t.id.type==="QualifiedTypeIdentifier"&&!t.typeParameters||(t.type==="TSClassImplements"||t.type==="TSInterfaceHeritage")&&Gs(t.expression)&&!t.typeArguments:!1}function Mrt(i){return Eb(Uui,i.node,()=>Wui(i))}function t_e(i,e,t,n){let{node:r}=i;if(!qs(r[n]))return"";let o=Gc(i,e,{marker:n}),s=jr([",",li],i.map(t,n));if(!Nrt(r)){let a=[`${n} `,o,s];return Mrt(i)?[li,je(a)]:[" ",a]}return[li,o,o&>,n,je(bt([li,s]))]}function jui(i,e,t){let n=t("superClass"),{parent:r}=i;return r.type==="AssignmentExpression"?je(wr(["(",bt([dt,n]),dt,")"],n)):n}function Rrt(i,e,t){let{node:n}=i,r=[];return qs(n.decorators)&&r.push(drt(i,e,t)),r.push(IX(n)),n.static&&r.push("static "),r.push(kX(i)),n.override&&r.push("override "),r.push(f_e(i,e,t)),r}function Frt(i,e,t){let{node:n}=i,r=[];qs(n.decorators)&&r.push(drt(i,e,t)),r.push(Zm(i),IX(n)),n.static&&r.push("static "),r.push(kX(i)),n.override&&r.push("override "),n.readonly&&r.push("readonly "),n.variance&&r.push(t("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&r.push("accessor "),r.push(nS(i,e,t),Bf(i),Lnt(i),Yd(i,t));let o=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[N9(i,e,t,r," =",o?void 0:"value"),pl(e)]}function Qui(i,e){let t=Km(i,fi.Leading);if(t.length===0)return!1;let[n]=t,r=e.originalText,o=yn(n);return Rp(r,o,tn(n))||Ru(r,o,{backwards:!0})}function HR(i,e,t,n="body"){return i.call(({node:r})=>{let o=t();if(r.type==="EmptyStatement")return $t(r,fi.Leading)?[" ",o]:o;let s=r.type==="BlockStatement";return Qui(r,e)?s?[gt,o]:bt([gt,o]):s||r.type==="IfStatement"&&i.parent.type==="IfStatement"&&i.key==="alternate"?[" ",o]:bt([li,o])},n)}function Yui(i,e,t){return[je(["do",HR(i,e,t)]),i.node.body.type==="BlockStatement"?" ":gt,"while (",J_e(i,e,t),")",pl(e)]}function Ort(i){return Kui(i)?Ort(i.expression):i}function Xui(i){return i.type==="MemberExpression"||i.type==="OptionalMemberExpression"||i.type==="Identifier"&&i.name!=="undefined"}function Zui(i,e){if(Xnt(i,e)){let t=Ort(i.node.expression);return Jui(t)||Xui(t)}return!(!e.semi||Knt(i,e)||Jnt(i,e))}function $ui(i,e,t){let n=[t("expression")];if(eSe(i,e)){if(Znt(i,e)){let{node:r}=i,o=Ur(0,Km(r,fi.Leading),-1),s=K_e(i,e,{filter:a=>a===o});return Oh(i,[";",s,...n],e,{filter:a=>a!==o})}n.unshift(";")}else Zui(i,e)&&n.push(";");return n}function edi(i,e,t){let{node:n}=i,r=HR(i,e,t),o=Gc(i,e),s=o?[o,dt]:"";return!n.init&&!n.test&&!n.update?[s,je(["for (;;)",r])]:[s,je(["for (",je([bt([dt,t("init"),";",li,t("test"),";",n.update?[li,t("update")]:""]),dt]),")",r])]}function tdi(i,e,t){let{node:n}=i,r=n.type==="ForOfStatement";return je(["for",r&&n.await?" await":""," (",t("left")," ",r?"of":"in"," ",t("right"),")",HR(i,e,t)])}function idi(i,e,t){if(e.__isVueBindings||e.__isVueForBindingLeft){let n=i.map(t,"program","body",0,"params");if(n.length===1)return n[0];let r=jr([",",li],n);return e.__isVueForBindingLeft?["(",bt([dt,je(r)]),dt,")"]:r}if(e.__isEmbeddedTypescriptGenericParameters){let n=i.map(t,"program","body",0,"typeParameters","params");return jr([",",li],n)}}function Prt(i){return rS(Ur(0,Km(i,fi.Dangling),-1))}function rdi(i,e,t){let{node:n}=i,r=je(["if (",J_e(i,e,t),")",Gui(i,e,t)]);if(!n.alternate)return r;let{consequent:o}=n,s=o.type==="BlockStatement",a=[r],l=s;s||(a.push(gt),l=!1);let c=Km(n,fi.Dangling);if(c.length>0){let[u]=c;ndi(u,e)?a.push(s?[gt,gt]:gt):Ru(e.originalText,yn(u),{backwards:!0})?a.push(s?gt:""):a.push(" "),a.push(Gc(i,e),Prt(n)||Ru(e.originalText,tn(Ur(0,c,-1)))?gt:" "),l=!1}return a.push(l?" ":"","else",je(qui(i,e,t))),a}function odi(i,e){let{node:t}=i;switch(t.type){case"RegExpLiteral":return _it(t);case"BigIntLiteral":return v_e(t.extra.raw);case"NumericLiteral":return C9(t.extra.raw);case"StringLiteral":return Ik(Lk(t.extra.raw,e));case"NullLiteral":return"null";case"BooleanLiteral":return String(t.value);case"DirectiveLiteral":return Sit(t.extra.raw,e);case"Literal":{if(t.regex)return _it(t.regex);if(t.bigint)return v_e(t.raw);let{value:n}=t;return typeof n=="number"?C9(t.raw):typeof n=="string"?sdi(i)?Sit(t.raw,e):Ik(Lk(t.raw,e)):String(n)}}}function sdi(i){if(i.key!=="expression")return;let{parent:e}=i;return e.type==="ExpressionStatement"&&typeof e.directive=="string"}function v_e(i){return i.toLowerCase()}function _it({pattern:i,flags:e}){return e=[...e].sort().join(""),`/${i}/${e}`}function Sit(i,e){let t=i.slice(1,-1);if(t===adi||!(t.includes('"')||t.includes("'"))){let n=e.singleQuote?"'":'"';return n+t+n}return i}function WR(i,e,t){let{node:n,parent:r}=i,o=ldi(n),s=n.type==="TSEnumBody"||o,a=Brt(n),l=o&&n.hasUnknownMembers,c=s?"members":a?"attributes":"properties",u=n[c],d=s||n.type==="ObjectPattern"&&r.type!=="FunctionDeclaration"&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ObjectMethod"&&r.type!=="ClassMethod"&&r.type!=="ClassPrivateMethod"&&r.type!=="AssignmentPattern"&&r.type!=="CatchClause"&&n.properties.some(v=>v.value&&(v.value.type==="ObjectPattern"||v.value.type==="ArrayPattern"))||n.type!=="ObjectPattern"&&e.objectWrap==="preserve"&&u.length>0&&cdi(n,u[0],e),h=[],f=i.map(({node:v})=>{let A=[...h,t()];return h=[",",li],qA(v,e)&&h.push(gt),A},c);if(l){let v;if($t(n,fi.Dangling)){let A=$t(n,fi.Line);v=[Gc(i,e),A||Ru(e.originalText,tn(Ur(0,Km(n),-1)))?gt:li,"..."]}else v=["..."];f.push([...h,...v])}let p=!(l||Ur(0,u,-1)?.type==="RestElement"),g;if(f.length===0)g=je(["{",LX(i,e),"}",Bf(i),Yd(i,t)]);else{let v=e.bracketSpacing?li:dt;g=["{",bt([v,...f]),p?uS(e):"",v,"}",Bf(i),Yd(i,t)]}return i.match(v=>v.type==="ObjectPattern"&&!qs(v.decorators),b9)||iS(n)&&(i.match(void 0,(v,A)=>A==="typeAnnotation",(v,A)=>A==="typeAnnotation",b9)||i.match(void 0,(v,A)=>v.type==="FunctionTypeParam"&&A==="typeAnnotation",b9))||!d&&i.match(v=>v.type==="ObjectPattern",v=>v.type==="AssignmentExpression"||v.type==="VariableDeclarator")?g:je(g,{shouldBreak:d})}function cdi(i,e,t){let n=t.originalText,r=yn(e),o=yn(i);return Brt(i)&&(o=Tb(t).lastIndexOf("{",r)),Rp(n,o,r)}function udi(i,e,t){let{node:n}=i;return["import",n.phase?` ${n.phase}`:"",Hrt(n),Urt(i,e,t),Wrt(i,e,t),Qrt(i,e,t),pl(e)]}function Vrt(i,e,t){let{node:n}=i,r=[Uci(i,e,t),Zm(i),"export",zrt(n)?" default":""],{declaration:o,exported:s}=n;return $t(n,fi.Dangling)&&(r.push(" ",Gc(i,e)),Prt(n)&&r.push(gt)),o?r.push(" ",t("declaration")):(r.push(fdi(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(r.push(" *"),s&&r.push(" as ",t("exported"))):r.push(Urt(i,e,t)),r.push(Wrt(i,e,t),Qrt(i,e,t))),r.push(hdi(n,e)),r}function hdi(i,e){return!i.declaration||zrt(i)&&!ddi(i.declaration)?pl(e):""}function aSe(i,e=!0){return i&&i!=="value"?`${e?" ":""}${i}${e?"":" "}`:""}function Hrt(i,e){return aSe(i.importKind,e)}function fdi(i){return aSe(i.exportKind)}function Wrt(i,e,t){let{node:n}=i;return n.source?[jrt(n,e)?" from":""," ",t("source")]:""}function Urt(i,e,t){let{node:n}=i;if(!jrt(n,e))return"";let r=[" "];if(qs(n.specifiers)){let o=[],s=[];i.each(()=>{let a=i.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")o.push(t());else if(a==="ExportSpecifier"||a==="ImportSpecifier")s.push(t());else throw new VR(n,"specifier")},"specifiers"),r.push(jr(", ",o)),s.length>0&&(o.length>0&&r.push(", "),s.length>1||o.length>0||n.specifiers.some(a=>$t(a))?r.push(je(["{",bt([e.bracketSpacing?li:dt,jr([",",li],s)]),uS(e),e.bracketSpacing?li:dt,"}"])):r.push(["{",e.bracketSpacing?" ":"",...s,e.bracketSpacing?" ":"","}"]))}else r.push("{}");return r}function jrt(i,e){return i.type!=="ImportDeclaration"||qs(i.specifiers)||i.importKind==="type"?!0:Tb(e).slice(yn(i),yn(i.source)).trimEnd().endsWith("from")}function pdi(i,e){let t=Tb(e).slice(tn(i.source),i.attributes?.[0]?yn(i.attributes[0]):tn(i)).trimStart();return t.startsWith("assert")?"assert":t.startsWith("with")||qs(i.attributes)?"with":void 0}function Qrt(i,e,t){let{node:n}=i;if(!n.source)return"";let r=pdi(n,e);if(!r)return"";let o=WR(i,e,t);return mdi(n)&&(o=bX(o)),[` ${r} `,o]}function gdi(i,e,t){let{node:n}=i,{type:r}=n,o=r.startsWith("Import"),s=o?"imported":"local",a=o?"local":"exported",l=n[s],c=n[a],u="",d="";return r==="ExportNamespaceSpecifier"||r==="ImportNamespaceSpecifier"?u="*":l&&(u=t(s)),c&&!s_e(n)&&(d=t(a)),[aSe(r==="ImportSpecifier"?n.importKind:n.exportKind,!1),u,u&&d?" as ":"",d]}function i_e(i,e,t){let{node:n}=i;return n.shorthand?t("value"):N9(i,e,t,nS(i,e,t),":","value")}function A_e(i,e){return["...",e("argument"),Yd(i,e)]}function bdi(i,e,t){let{node:n}=i,r=t();return cnt(n,e)?["(",bt([gt,r]),gt,")"]:Fw(n)||e.experimentalTernaries&&n.type==="ConditionalExpression"&&(n.consequent.type==="ConditionalExpression"||n.alternate.type==="ConditionalExpression")?je([wr("("),bt([dt,r]),dt,wr(")")]):r}function Eit(i,e,t){let{node:n}=i;return[n.type==="ThrowStatement"?"throw":"return",n.argument?[" ",i.call(()=>bdi(i,e,t),"argument")]:"",pl(e)]}function vdi(i,e){let{key:t,parent:n}=i;return!!(t==="argument"&&NR(n)&&qm(i,e)||t==="body"&&n.type==="ArrowFunctionExpression")}function Adi(i,e,t){let{parent:n}=i;if(n.type==="ExpressionStatement"||n.type==="ForStatement"){let o=[];return i.each(({isFirst:s})=>{s?o.push(t()):o.push(",",bt([li,t()]))},"expressions"),je(o)}let r=jr([",",li],i.map(t,"expressions"));return vdi(i,e)?je(wr([bt([dt,r]),dt],r)):je(r)}function ydi(i,e,t){return[je(["switch (",bt([dt,t("discriminant")]),dt,")"])," {",i.node.cases.length>0?bt([gt,jr(gt,i.map(({node:n,isLast:r})=>[t(),!r&&qA(n,e)?gt:""],"cases"))]):Gc(i,e,{indent:!0}),gt,"}"]}function wdi(i,e,t){let{node:n}=i,r=[];n.test?r.push("case ",t("test"),":"):r.push("default:"),$t(n,fi.Dangling)&&r.push(" ",Gc(i,e));let o=n.consequent.filter(s=>s.type!=="EmptyStatement");if(o.length>0){let s=b_e(i,e,t,"consequent");r.push(o.length===1&&o[0].type==="BlockStatement"?[" ",s]:bt([gt,s]))}return r}function Grt(i,e){let t=0;for(let n in i){let r=i[n];if(ont(r)&&typeof r.type=="string"&&(t++,t+=Grt(r,e-t)),t>e)return t}return t}function Dit(i,e=5){return Grt(i,e)<=e}function xdi(i){let e=[i];for(let t=0;th[L]===n),p=h.type===n.type&&!f,g,v,A=0;do v=g||n,g=i.getParentNode(A),A++;while(g&&g.type===n.type&&a.every(L=>g[L]!==v));let w=g||h,C=v;if(r&&(sd(n[a[0]])||sd(l)||sd(c)||xdi(C))){d=!0,p=!0;let L=z=>[wr("("),bt([dt,z]),dt,wr(")")],M=z=>z.type==="NullLiteral"||z.type==="Literal"&&z.value===null||z.type==="Identifier"&&z.name==="undefined";u.push(" ? ",M(l)?t(o):L(t(o))," : ",c.type===n.type||M(c)?t(s):L(t(s)))}else{let L=z=>e.useTabs?bt(t(z)):Xm(2,t(z)),M=[li,"? ",l.type===n.type?wr("","("):"",L(o),l.type===n.type?wr("",")"):"",li,": ",L(s)];u.push(h.type!==n.type||h[s]===n||f?M:e.useTabs?gnt(bt(M)):Xm(Math.max(0,e.tabWidth-2),M))}let _=L=>h===w?je(L):L,E=!d&&(Gs(h)||h.type==="NGPipeExpression"&&h.left===n)&&!h.computed,I=Sdi(i),T=_([Cdi(i,e,t),p?u:bt(u),r&&E&&!I?dt:""]);return f||I?je([bt([dt,T]),dt]):T}function Ddi(i,e){return(Gs(e)||e.type==="NGPipeExpression"&&e.left===i)&&!e.computed}function Tdi(i,e,t,n){return[...i.map(r=>Km(r)),Km(e),Km(t)].flat().some(r=>ev(r)&&Rp(n.originalText,yn(r),tn(r)))}function Idi(i){let{node:e}=i;if(e.type!=="ConditionalExpression")return!1;let t,n=e;for(let r=0;!t;r++){let o=i.getParentNode(r);if(Mk(o)&&o.expression===n||Ts(o)&&o.callee===n||Gs(o)&&o.object===n){n=o;continue}o.type==="NewExpression"&&o.callee===n||Z0(o)&&o.expression===n?(t=i.getParentNode(r+1),n=o):t=o}return n===e?!1:t[kdi.get(t.type)]===n}function lSe(i,e,t,n){if(!e.experimentalTernaries)return Edi(i,e,t);let{node:r}=i,o=r.type==="ConditionalExpression",s=tS(r),a=o?"consequent":"trueType",l=o?"alternate":"falseType",c=o?["test"]:["checkType","extendsType"],u=r[a],d=r[l],h=c.map(ei=>r[ei]),{parent:f}=i,p=f.type===r.type,g=p&&c.some(ei=>f[ei]===r),v=p&&f[l]===r,A=u.type===r.type,w=d.type===r.type,C=w||v,_=e.tabWidth>2||e.useTabs,E,I,T=0;do I=E||r,E=i.getParentNode(T),T++;while(E&&E.type===r.type&&c.every(ei=>E[ei]!==I));let L=E||f,M=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),z=NR(f)&&!(A||w),H=o&&L.type==="JSXExpressionContainer"&&i.grandparent.type!=="JSXAttribute",B=Idi(i),q=Ddi(r,f),U=s&&qm(i,e),F=_?e.useTabs?" ":" ".repeat(e.tabWidth-1):"",ne=Tdi(h,u,d,e)||A||w,ce=!C&&!p&&!s&&(H?u.type==="NullLiteral"||u.type==="Literal"&&u.value===null:rSe(u,e)&&Dit(r.test,3)),se=C||v||s&&!p||p&&o&&Dit(r.test,1)||ce,le=[];$t(r.test,fi.Dangling)&&i.call(()=>{le.push(Gc(i,e))},"test"),$t(r,fi.Dangling)&&le.push(Gc(i,e));let oe=Symbol("test"),fe=Symbol("consequent"),Re=Symbol("test-and-consequent"),ft=o?[n_e(t("test")),r.test.type==="ConditionalExpression"?Pw:""]:[t("checkType")," ","extends"," ",tS(r.extendsType)||r.extendsType.type==="TSMappedType"?t("extendsType"):je(n_e(t("extendsType")))],At=je([ft," ?"],{id:oe}),Dt=t(a),Ct=bt([A||H&&(sd(u)||p||C)?gt:li,Dt]),Xt=se?je([At,C?Ct:wr(Ct,je(Ct,{id:fe}),{groupId:oe})],{id:Re}):[At,Ct],Be=t(l),Vt=ce?wr(Be,gnt(n_e(Be)),{groupId:Re}):Be,Li=[Xt,le.length>0?[bt([gt,le]),gt]:w?gt:ce?wr(li," ",{groupId:Re}):li,":",w||!_?" ":se?wr(F,wr(C||ce?" ":F," "),{groupId:Re}):wr(F," "),w?Vt:je([bt(Vt),H&&!ce?dt:""]),q&&!B?dt:"",ne?Pw:""];return M&&!ne?je(bt([dt,je(Li)])):M||z?je(bt(Li)):B||s&&g?je([bt([dt,Li]),U?dt:""]):f===L?je(Li):Li}function Ldi(i,e,t){let{node:n}=i;return["try ",t("block"),n.handler?[" ",t("handler")]:"",n.finalizer?[" finally ",t("finalizer")]:""]}function Ndi(i,e,t){let{node:n}=i;if(n.param){let r=$t(n.param,s=>!ev(s)||s.leading&&Ru(e.originalText,tn(s))||s.trailing&&Ru(e.originalText,yn(s),{backwards:!0})),o=t("param");return["catch ",r?["(",bt([dt,o]),dt,") "]:["(",o,") "],t("body")]}return["catch ",t("body")]}function qrt(i,e,t){let{node:n}=i,r=i.map(t,"declarations"),o=i.key==="init"&&i.parent.type==="ForStatement"||i.key==="left"&&(i.parent.type==="ForInStatement"||i.parent.type==="ForOfStatement"),s=n.declarations.some(l=>l.init),a;return r.length===1&&!$t(n.declarations[0])?a=r[0]:a=bt(r[0]),je([Zm(i),n.kind,a?[" ",a]:"",bt(r.slice(1).map(l=>[",",s&&!o?gt:li,l])),o?"":pl(e)])}function Mdi(i,e,t){let{node:n}=i,r=n.type==="WithStatement"?"with":"while";return je([r," (",J_e(i,e,t),")",HR(i,e,t)])}function Rdi(i,e,t,n){let{node:r}=i;if(S_e(r))return odi(i,e);switch(r.type){case"JsExpressionRoot":return t("node");case"JsonRoot":return[Gc(i,e),t("node"),gt];case"File":return idi(i,e,t)??t("program");case"ExpressionStatement":return $ui(i,e,t);case"ChainExpression":return t("expression");case"ParenthesizedExpression":return!$t(r.expression)&&($0(r.expression)||Kd(r.expression))?["(",t("expression"),")"]:je(["(",bt([dt,t("expression")]),dt,")"]);case"AssignmentExpression":return bui(i,e,t);case"VariableDeclarator":return vui(i,e,t);case"BinaryExpression":case"LogicalExpression":return urt(i,e,t);case"AssignmentPattern":return[t("left")," = ",t("right")];case"OptionalMemberExpression":case"MemberExpression":return dui(i,e,t);case"MetaProperty":return[t("meta"),".",t("property")];case"BindExpression":return lui(i,e,t);case"Identifier":return[r.name,Bf(i),Lnt(i),Yd(i,t)];case"V8IntrinsicIdentifier":return["%",r.name];case"SpreadElement":return A_e(i,t);case"RestElement":return A_e(i,t);case"FunctionDeclaration":case"FunctionExpression":return X_e(i,e,t,n);case"ArrowFunctionExpression":return Yci(i,e,t,n);case"YieldExpression":return[`yield${r.delegate?"*":""}`,r.argument?[" ",t("argument")]:""];case"AwaitExpression":return Tui(i,e,t);case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Vrt(i,e,t);case"ImportDeclaration":return udi(i,e,t);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return gdi(i,e,t);case"ImportAttribute":return i_e(i,e,t);case"Program":case"BlockStatement":case"StaticBlock":return Drt(i,e,t);case"ClassBody":return oSe(i,e,t);case"ThrowStatement":return Eit(i,e,t);case"ReturnStatement":return Eit(i,e,t);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return xX(i,e,t);case"ObjectExpression":case"ObjectPattern":return WR(i,e,t);case"Property":return PR(r)?f_e(i,e,t):i_e(i,e,t);case"ObjectProperty":return i_e(i,e,t);case"ObjectMethod":return f_e(i,e,t);case"Decorator":return["@",t("expression")];case"ArrayExpression":case"ArrayPattern":return nSe(i,e,t);case"SequenceExpression":return Adi(i,e,t);case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[t("value"),pl(e)];case"UnaryExpression":{let o=[r.operator];/[a-z]$/.test(r.operator)&&o.push(" ");let s=t("argument");return $t(r.argument)?o.push(je(["(",bt([dt,s]),dt,")"])):o.push(s),o}case"UpdateExpression":return[r.prefix?r.operator:"",t("argument"),r.prefix?"":r.operator];case"ConditionalExpression":return lSe(i,e,t,n);case"VariableDeclaration":return qrt(i,e,t);case"IfStatement":return rdi(i,e,t);case"ForStatement":return edi(i,e,t);case"WithStatement":case"WhileStatement":return Mdi(i,e,t);case"DoWhileStatement":return Yui(i,e,t);case"ForInStatement":case"ForOfStatement":return tdi(i,e,t);case"DoExpression":return[r.async?"async ":"","do ",t("body")];case"BreakStatement":case"ContinueStatement":return[r.type==="BreakStatement"?"break":"continue",r.label?[" ",t("label")]:"",pl(e)];case"LabeledStatement":return[t("label"),`:${r.body.type==="EmptyStatement"&&!$t(r.body,fi.Leading)?"":" "}`,t("body")];case"TryStatement":return Ldi(i,e,t);case"CatchClause":return Ndi(i,e,t);case"SwitchStatement":return ydi(i,e,t);case"SwitchCase":return wdi(i,e,t);case"DebuggerStatement":return["debugger",pl(e)];case"ClassDeclaration":case"ClassExpression":return sSe(i,e,t);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Rrt(i,e,t);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Frt(i,e,t);case"TemplateElement":return Ik(r.value.raw);case"TemplateLiteral":return $nt(i,e,t);case"TaggedTemplateExpression":return Lli(i,e,t);case"PrivateIdentifier":return["#",r.name];case"PrivateName":return["#",t("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",t("body")];case"VoidPattern":return"void";case"EmptyStatement":if(C_e(i))return";";default:throw new VR(r,"ESTree")}}function Yrt(i){return[i("elementType"),"[]"]}function Krt(i,e,t){let{parent:n,node:r,key:o}=i,s=r.type==="AsConstExpression"?"const":t("typeAnnotation"),a=[t("expression")," ",soi(r)?"satisfies":"as"," ",s];return o==="callee"&&y9(n)||o==="object"&&Gs(n)?je([bt([dt,...a]),dt]):a}function Fdi(i,e,t){let{node:n}=i,r=[Zm(i),n.async?"async ":"","component"];n.id&&r.push(" ",t("id")),r.push(t("typeParameters"));let o=Vk(i,e,t);return n.rendersType?r.push(je([o," ",t("rendersType")])):r.push(je([o])),n.body&&r.push(" ",t("body")),n.type==="DeclareComponent"&&r.push(pl(e)),r}function Odi(i,e,t){let{node:n}=i;return n.shorthand?t("local"):[t("name")," as ",t("local")]}function Pdi(i,e,t){let{node:n}=i,r=[];return n.name&&r.push(t("name"),n.optional?"?: ":": "),r.push(t("typeAnnotation")),r}function Bdi(i,e,t){let{node:n}=i;return[n.explicitType?`of ${n.explicitType} `:"",WR(i,e,t)]}function zdi(i,e,t){let{node:n}=i;return[n.type==="EnumSymbolBody"||n.explicitType?`of ${n.type.slice(4,-4).toLowerCase()} `:"",WR(i,e,t)]}function Jrt(i,e,t){let{node:n}=i,r=n.type==="TSEnumMember",o=r?nS(i,e,t):t("id"),s=r?"initializer":"init";return n[s]?[o," = ",t(s)]:o}function Xrt(i,e){let{node:t}=i;return[Zm(i),t.const?"const ":"","enum ",e("id")," ",e("body")]}function Zrt(i,e,t){let{node:n}=i,r=[kX(i)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&r.push("new ");let o=Vk(i,e,t,!1,!0),s=[];return n.type==="FunctionTypeAnnotation"?s.push(Vdi(i)?" => ":": ",t("returnType")):s.push(Yd(i,t,"returnType")),I9(n,s)&&(o=je(o)),r.push(o,s),[je(r),n.type==="TSConstructSignatureDeclaration"||n.type==="TSCallSignatureDeclaration"?Mw(i,e):""]}function Vdi(i){let{node:e,parent:t}=i;return e.type==="FunctionTypeAnnotation"&&(j_e(t)||!((t.type==="ObjectTypeProperty"||t.type==="ObjectTypeInternalSlot")&&!t.variance&&!t.optional&&_X(t,e)||t.type==="ObjectTypeCallProperty"||i.getParentNode(2)?.type==="DeclareFunction"))}function Hdi(i,e,t){return[Zm(i),"hook",i.node.id?[" ",t("id")]:"",pl(e)]}function Tit(i){let{node:e}=i;return e.type==="HookTypeAnnotation"&&i.getParentNode(2)?.type==="DeclareHook"}function Wdi(i,e,t){let{node:n}=i,r=Vk(i,e,t,!1,!0),o=[Tit(i)?": ":" => ",t("returnType")];return je([Tit(i)?"":"hook ",I9(n,o)?je(r):r,o])}function $rt(i,e,t){return[t("objectType"),Bf(i),"[",t("indexType"),"]"]}function eot(i,e,t){return["infer ",t("typeParameter")]}function tot(i,e,t){let n=!1;return je(i.map(({isFirst:r,previous:o,node:s,index:a})=>{let l=t();if(r)return l;let c=iS(s),u=iS(o);return u&&c?[" & ",n?bt(l):l]:!u&&!c||Rw(e.originalText,s)?e.experimentalOperatorPosition==="start"?bt([li,"& ",l]):bt([" &",li,l]):(a>1&&(n=!0),[" & ",a>1?bt(l):l])},"types"))}function Udi(i){switch(i){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function jdi(i,e,t){let{node:n}=i;return[je([n.variance?t("variance"):"",je(["[",bt([dt,t("keyTparam")," in ",t("sourceType")]),dt,"]"]),Udi(n.optional),": ",t("propType")]),Mw(i,e)]}function kit(i,e){return i==="+"||i==="-"?i+e:e}function Qdi(i,e,t){let{node:n}=i,r=!1;if(e.objectWrap==="preserve"){let a=Tb(e),l=yn(n)+1,c=a.slice(l),u=l+c.search(/\S/);Rp(e.originalText,l,u)&&(r=!0)}let o=[],s=Km(n,fi.Dangling);if(s.length>0){let a=Ur(0,s,-1),l=Gc(i,e);o.push(...l.slice(0,-1),je([Ur(0,l,-1),rS(a)||Ru(e.originalText,tn(a))?gt:li]))}return je(["{",bt([e.bracketSpacing?li:dt,...o,n.readonly?[kit(n.readonly,"readonly")," "]:"",je(["[",bt([dt,t("key")," in ",t("constraint"),n.nameType?[" as ",t("nameType")]:""]),dt,"]"]),n.optional?kit(n.optional,"?"):"",n.typeAnnotation?": ":"",t("typeAnnotation"),e.semi?wr(";"):""]),e.bracketSpacing?li:dt,"}"],{shouldBreak:r})}function Gdi(i,e,t){let{node:n}=i;return[je(["match (",bt([dt,t("argument")]),dt,")"])," {",n.cases.length>0?bt([gt,jr(gt,i.map(({node:r,isLast:o})=>[t(),!o&&qA(r,e)?gt:""],"cases"))]):"",gt,"}"]}function qdi(i,e,t){let{node:n}=i,r=$t(n,fi.Dangling)?[" ",Gc(i,e)]:[],o=n.type==="MatchStatementCase"?[" ",t("body")]:bt([li,t("body"),","]);return[t("pattern"),n.guard?je([bt([li,"if (",t("guard"),")"])]):"",je([" =>",r,o])]}function Ydi(i,e,t){let{node:n}=i;switch(n.type){case"MatchOrPattern":return Zdi(i,e,t);case"MatchAsPattern":return[t("pattern")," as ",t("target")];case"MatchWildcardPattern":return["_"];case"MatchLiteralPattern":return t("literal");case"MatchUnaryPattern":return[n.operator,t("argument")];case"MatchIdentifierPattern":return t("id");case"MatchMemberPattern":{let r=n.property.type==="Identifier"?[".",t("property")]:["[",bt([dt,t("property")]),dt,"]"];return je([t("base"),r])}case"MatchBindingPattern":return[n.kind," ",t("id")];case"MatchObjectPattern":case"MatchInstanceObjectPattern":return Kdi(i,e,t);case"MatchInstancePattern":return je([t("targetConstructor")," ",t("properties")]);case"MatchArrayPattern":{let r=i.map(t,"elements");return n.rest&&r.push(t("rest")),je(["[",bt([dt,jr([",",li],r)]),n.rest?"":wr(","),dt,"]"])}case"MatchObjectPatternProperty":return n.shorthand?t("pattern"):je([t("key"),":",bt([li,t("pattern")])]);case"MatchRestPattern":{let r=["..."];return n.argument&&r.push(t("argument")),r}}}function Kdi(i,e,t){let{node:n}=i,r=i.map(t,"properties");return n.rest&&r.push(t("rest")),je(["{",bt([dt,jr([",",li],r)]),n.rest?"":wr(","),dt,"}"])}function Jdi(i){let{patterns:e}=i;if(e.some(n=>$t(n)))return!1;let t=e.find(n=>n.type==="MatchObjectPattern");return t?e.every(n=>n===t||iot(n)):!1}function Xdi(i){return iot(i)||i.type==="MatchObjectPattern"?!0:i.type==="MatchOrPattern"?Jdi(i):!1}function Zdi(i,e,t){let{node:n}=i,{parent:r}=i,o=r.type!=="MatchStatementCase"&&r.type!=="MatchExpressionCase"&&r.type!=="MatchArrayPattern"&&r.type!=="MatchObjectPatternProperty"&&!Rw(e.originalText,n),s=Xdi(n),a=i.map(()=>{let c=t();return s||(c=Xm(2,c)),Oh(i,c,e)},"patterns");if(s)return jr(" | ",a);let l=[wr(["| "]),jr([li,"| "],a)];return qm(i,e)?je([bt([wr([dt]),l]),dt]):r.type==="MatchArrayPattern"&&r.elements.length>1?je([bt([wr(["(",dt]),l]),dt,wr(")")]):je(o?bt(l):l)}function $di(i,e,t){let{node:n}=i,r=[Zm(i),"opaque type ",t("id"),t("typeParameters")];if(n.supertype&&r.push(": ",t("supertype")),n.lowerBound||n.upperBound){let o=[];n.lowerBound&&o.push(bt([li,"super ",t("lowerBound")])),n.upperBound&&o.push(bt([li,"extends ",t("upperBound")])),r.push(je(o))}return n.impltype&&r.push(" = ",t("impltype")),r.push(pl(e)),r}function not(i,e,t){let{node:n}=i;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[t("label"),": "]:[],t("typeAnnotation")]}function rot(i,e,t){let{node:n}=i;return[n.variance?t("variance"):"",t("label"),n.optional?"?":"",": ",t("elementType")]}function oot(i,e,t){let{node:n}=i,r=[Zm(i),"type ",t("id"),t("typeParameters")],o=n.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[N9(i,e,t,r," =",o),pl(e)]}function ehi(i,e,t){let{node:n}=i;return zf(n).length===1&&n.type.startsWith("TS")&&!n[t][0].constraint&&i.parent.type==="ArrowFunctionExpression"&&!(e.filepath&&/\.ts$/.test(e.filepath))}function v9(i,e,t,n){let{node:r}=i,o=r[n];if(!o)return"";if(!Array.isArray(o))return t(n);let s=TX(i.grandparent),a=i.match(c=>!(c[n].length===1&&iS(c[n][0])),void 0,(c,u)=>u==="typeAnnotation",c=>c.type==="Identifier",Srt);if(o.length===0||!a&&(s||o.length===1&&(o[0].type==="NullableTypeAnnotation"||yli(o[0])))&&!o.some(c=>{let u=Km(c,d=>d.leading||d.trailing);return u.length>0&&(u.some(d=>rS(d))||Ru(e.originalText,tn(Ur(0,u,-1))))}))return["<",jr(", ",i.map(t,n)),thi(i,e),">"];let l=r.type==="TSTypeParameterInstantiation"?"":ehi(i,e,n)?",":uS(e);return je(["<",bt([dt,jr([",",li],i.map(t,n))]),l,dt,">"])}function thi(i,e){let{node:t}=i;if(!$t(t,fi.Dangling))return"";let n=!$t(t,fi.Line),r=Gc(i,e,{indent:!n});return n?r:[r,gt]}function sot(i,e,t){let{node:n}=i,r=[n.const?"const ":""],o=n.type==="TSTypeParameter"?t("name"):n.name;if(n.variance&&r.push(t("variance")),n.in&&r.push("in "),n.out&&r.push("out "),r.push(o),n.bound&&(n.usesExtendsBound&&r.push(" extends "),r.push(Yd(i,t,"bound"))),n.constraint){let s=Symbol("constraint");r.push(" extends",je(bt(li),{id:s}),Sb,x9(t("constraint"),{groupId:s}))}if(n.default){let s=Symbol("default");r.push(" =",je(bt(li),{id:s}),Sb,x9(t("default"),{groupId:s}))}return je(r)}function aot(i,e){let{node:t}=i;return[t.type==="TSTypePredicate"&&t.asserts?"asserts ":t.type==="TypePredicate"&&t.kind?`${t.kind} `:"",e("parameterName"),t.typeAnnotation?[" is ",Yd(i,e)]:""]}function lot({node:i},e){let t=i.type==="TSTypeQuery"?"exprName":"argument";return["typeof ",e(t),e("typeArguments")]}function ihi(i,e,t,n){let{node:r}=i;if(Snt(r))return r.type.slice(0,-14).toLowerCase();switch(r.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return Fdi(i,e,t);case"ComponentParameter":return Odi(i,e,t);case"ComponentTypeParameter":return Pdi(i,e,t);case"HookDeclaration":return X_e(i,e,t);case"DeclareHook":return Hdi(i,e,t);case"HookTypeAnnotation":return Wdi(i,e,t);case"DeclareFunction":return[Zm(i),"function ",t("id"),t("predicate"),pl(e)];case"DeclareModule":return["declare module ",t("id")," ",t("body")];case"DeclareModuleExports":return["declare module.exports",Yd(i,t),pl(e)];case"DeclareNamespace":return["declare namespace ",t("id")," ",t("body")];case"DeclareVariable":return Array.isArray(r.declarations)?qrt(i,e,t):[Zm(i),r.kind??"var"," ",t("id"),pl(e)];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Vrt(i,e,t);case"DeclareOpaqueType":case"OpaqueType":return $di(i,e,t);case"DeclareTypeAlias":case"TypeAlias":return oot(i,e,t);case"IntersectionTypeAnnotation":return tot(i,e,t);case"UnionTypeAnnotation":return jnt(i,e,t,n);case"ConditionalTypeAnnotation":return lSe(i,e,t);case"InferTypeAnnotation":return eot(i,e,t);case"FunctionTypeAnnotation":return Zrt(i,e,t);case"TupleTypeAnnotation":return nSe(i,e,t);case"TupleTypeLabeledElement":return rot(i,e,t);case"TupleTypeSpreadElement":return not(i,e,t);case"GenericTypeAnnotation":return[t("id"),v9(i,e,t,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return $rt(i,e,t);case"TypeAnnotation":return Gnt(i,e,t);case"TypeParameter":return sot(i,e,t);case"TypeofTypeAnnotation":return lot(i,t);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Yrt(t);case"DeclareEnum":case"EnumDeclaration":return Xrt(i,t);case"EnumBody":return Bdi(i,e,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return zdi(i,e,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return Jrt(i,e,t);case"FunctionTypeParam":{let o=r.name?t("name"):i.parent.this===r?"this":"";return[o,Bf(i),o?": ":"",t("typeAnnotation")]}case"DeclareClass":case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"RecordDeclaration":return sSe(i,e,t);case"ObjectTypeAnnotation":case"RecordDeclarationBody":return oSe(i,e,t);case"ClassImplements":case"InterfaceExtends":return[t("id"),t("typeParameters")];case"RecordDeclarationImplements":return[t("id"),t("typeArguments")];case"NullableTypeAnnotation":return["?",t("typeAnnotation")];case"Variance":{let{kind:o}=r;return Nk(o==="plus"||o==="minus"||o==="readonly"||o==="writeonly"||o==="in"||o==="out"),o==="plus"?"+":o==="minus"?"-":`${o} `}case"KeyofTypeAnnotation":return["keyof ",t("argument")];case"ObjectTypeCallProperty":return[r.static?"static ":"",t("value"),Mw(i,e)];case"ObjectTypeMappedTypeProperty":return jdi(i,e,t);case"ObjectTypeIndexer":return[r.static?"static ":"",r.variance?t("variance"):"","[",t("id"),r.id?": ":"",t("key"),"]: ",t("value"),Mw(i,e)];case"ObjectTypeProperty":{let o="";return r.proto?o="proto ":r.static&&(o="static "),[o,r.kind!=="init"?r.kind+" ":"",r.variance?t("variance"):"",nS(i,e,t),Bf(i),PR(r)?"":": ",t("value"),Mw(i,e)]}case"ObjectTypeInternalSlot":return[r.static?"static ":"","[[",t("id"),"]]",Bf(i),r.method?"":": ",t("value"),Mw(i,e)];case"ObjectTypeSpreadProperty":return A_e(i,t);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[t("qualification"),".",t("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(r.value);case"StringLiteralTypeAnnotation":return Ik(Lk(Ym(r),e));case"NumberLiteralTypeAnnotation":return C9(Ym(r));case"BigIntLiteralTypeAnnotation":return v_e(Ym(r));case"TypeCastExpression":return["(",t("expression"),Yd(i,t),")"];case"TypePredicate":return aot(i,t);case"TypeOperator":return[r.operator," ",t("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return v9(i,e,t,"params");case"InferredPredicate":case"DeclaredPredicate":return[i.key==="predicate"&&i.parent.type!=="DeclareFunction"&&!i.parent.returnType?": ":" ","%checks",...r.type==="DeclaredPredicate"?["(",t("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return Krt(i,e,t);case"MatchExpression":case"MatchStatement":return Gdi(i,e,t);case"MatchExpressionCase":case"MatchStatementCase":return qdi(i,e,t);case"MatchOrPattern":case"MatchAsPattern":case"MatchWildcardPattern":case"MatchLiteralPattern":case"MatchUnaryPattern":case"MatchIdentifierPattern":case"MatchInstancePattern":case"MatchInstanceObjectPattern":case"MatchMemberPattern":case"MatchBindingPattern":case"MatchObjectPattern":case"MatchObjectPatternProperty":case"MatchRestPattern":case"MatchArrayPattern":return Ydi(i,e,t);case"RecordExpression":return[t("recordConstructor"),t("typeArguments")," ",t("properties")];case"RecordExpressionProperties":return WR(i,e,t);case"RecordDeclarationProperty":case"RecordDeclarationStaticProperty":{let o=r.type==="RecordDeclarationStaticProperty",s=o?"value":"defaultValue";return[o?"static ":"",nS(i,e,t),Yd(i,t),r[s]?[" = ",t(s)]:""]}}}function nhi(i,e){let{node:t}=i,n=e.originalText.slice(yn(t),tn(t));return e.semi&&o_e(t)?n+=";":eSe(i,e)&&(n=`;${n}`),t.type==="ClassExpression"&&qs(t.decorators)?[bt([dt,n]),dt]:n}function rhi(i,e,t){let{node:n}=i;if(n.type==="JSXElement"&&yhi(n))return[t("openingElement"),t("closingElement")];let r=n.type==="JSXElement"?t("openingElement"):t("openingFragment"),o=n.type==="JSXElement"?t("closingElement"):t("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[r,...i.map(t,"children"),o];n.children=n.children.map(C=>whi(C)?{type:"JSXText",value:" ",raw:" "}:C);let s=n.children.some(sd),a=n.children.filter(C=>C.type==="JSXExpressionContainer").length>1,l=n.type==="JSXElement"&&n.openingElement.attributes.length>1,c=Pf(r)||s||l||a,u=i.parent.rootMarker==="mdx",d=e.singleQuote?"{' '}":'{" "}',h=u?li:wr([d,dt]," "),f=n.openingElement?.name?.name==="fbt",p=ohi(i,e,t,h,f),g=n.children.some(C=>S9(C));for(let C=p.length-2;C>=0;C--){let _=p[C]===""&&p[C+1]==="",E=p[C]===gt&&p[C+1]===""&&p[C+2]===gt,I=(p[C]===dt||p[C]===gt)&&p[C+1]===""&&p[C+2]===h,T=p[C]===h&&p[C+1]===""&&(p[C+2]===dt||p[C+2]===gt),L=p[C]===h&&p[C+1]===""&&p[C+2]===h,M=p[C]===dt&&p[C+1]===""&&p[C+2]===gt||p[C]===gt&&p[C+1]===""&&p[C+2]===dt;E&&g||_||I||L||M?p.splice(C,2):T&&p.splice(C+1,2)}for(;p.length>0&&r_e(Ur(0,p,-1));)p.pop();for(;p.length>1&&r_e(p[0])&&r_e(p[1]);)p.shift(),p.shift();let v=[""];for(let[C,_]of p.entries()){if(_===h){if(C===1&&$si(p[C-1])){if(p.length===2){v.push([v.pop(),d]);continue}v.push([d,gt],"");continue}if(C===p.length-1){v.push([v.pop(),d]);continue}if(p[C-1]===""&&p[C-2]===gt){v.push([v.pop(),d]);continue}}C%2===0?v.push([v.pop(),_]):v.push(_,""),Pf(_)&&(c=!0)}let A=g?bnt(v):je(v,{shouldBreak:!0});if(e.cursorNode?.type==="JSXText"&&n.children.includes(e.cursorNode)?A=[dX,A,dX]:e.nodeBeforeCursor?.type==="JSXText"&&n.children.includes(e.nodeBeforeCursor)?A=[dX,A]:e.nodeAfterCursor?.type==="JSXText"&&n.children.includes(e.nodeAfterCursor)&&(A=[A,dX]),u)return A;let w=je([r,bt([gt,A]),gt,o]);return c?w:Tk([je([r,...p,o]),w])}function ohi(i,e,t,n,r){let o="",s=[o];function a(c){o=c,s.push([s.pop(),c])}function l(c){c!==""&&(o=c,s.push(c,""))}return i.each(({node:c,next:u})=>{if(c.type==="JSXText"){let d=Ym(c);if(S9(c)){let h=pX.split(d,!0);h[0]===""&&(h.shift(),/\n/.test(h[0])?l(Lit(r,h[1],c,u)):l(n),h.shift());let f;if(Ur(0,h,-1)===""&&(h.pop(),f=h.pop()),h.length===0)return;for(let[p,g]of h.entries())p%2===1?l(li):a(g);f!==void 0?/\n/.test(f)?l(Lit(r,o,c,u)):l(n):l(Iit(r,o,c,u))}else/\n/.test(d)?d.match(/\n/g).length>1&&l(gt):l(n)}else{let d=t();if(a(d),u&&S9(u)){let h=pX.trim(Ym(u)),[f]=pX.split(h);l(Iit(r,f,c,u))}else l(gt)}},"children"),s}function Iit(i,e,t,n){return i?"":t.type==="JSXElement"&&!t.closingElement||n?.type==="JSXElement"&&!n.closingElement?e.length===1?dt:gt:dt}function Lit(i,e,t,n){return i?gt:e.length===1?t.type==="JSXElement"&&!t.closingElement||n?.type==="JSXElement"&&!n.closingElement?gt:dt:gt}function ahi(i,e,t){let{parent:n}=i;if(shi(n))return e;let r=lhi(i),o=qm(i,t);return je([o?"":wr("("),bt([dt,e]),dt,o?"":wr(")")],{shouldBreak:r})}function lhi(i){return i.match(void 0,(e,t)=>t==="body"&&e.type==="ArrowFunctionExpression",(e,t)=>t==="arguments"&&Ts(e))&&(i.match(void 0,void 0,void 0,(e,t)=>t==="expression"&&e.type==="JSXExpressionContainer")||i.match(void 0,void 0,void 0,(e,t)=>t==="expression"&&e.type==="ChainExpression",(e,t)=>t==="expression"&&e.type==="JSXExpressionContainer"))}function chi(i,e,t){let{node:n}=i,r=[t("name")];if(n.value){let o;if(Fu(n.value)){let s=Ym(n.value),a=od(0,od(0,s.slice(1,-1),"'","'"),""",'"'),l=Fnt(a,e.jsxSingleQuote);a=l==='"'?od(0,a,'"',"""):od(0,a,"'","'"),o=i.call(()=>Oh(i,Ik(l+a+l),e),"value")}else o=t("value");r.push("=",o)}return r}function uhi(i,e,t){let{node:n}=i,r=(o,s)=>o.type==="JSXEmptyExpression"||!$t(o)&&(Kd(o)||$0(o)||o.type==="ArrowFunctionExpression"||o.type==="AwaitExpression"&&(r(o.argument,o)||o.argument.type==="JSXElement")||Ts(sS(o))||o.type==="FunctionExpression"||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||o.type==="DoExpression"||sd(s)&&(o.type==="ConditionalExpression"||Fw(o)));return r(n.expression,i.parent)?je(["{",t("expression"),Sb,"}"]):je(["{",bt([dt,t("expression")]),dt,Sb,"}"])}function dhi(i,e,t){let{node:n}=i,r=$t(n.name)||$t(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!r)return["<",t("name"),t("typeArguments")," />"];if(n.attributes?.length===1&&Fu(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` -`)&&!r&&!$t(n.attributes[0]))return je(["<",t("name"),t("typeArguments")," ",...i.map(t,"attributes"),n.selfClosing?" />":">"]);let o=n.attributes?.some(a=>Fu(a.value)&&a.value.value.includes(` -`)),s=e.singleAttributePerLine&&n.attributes.length>1?gt:li;return je(["<",t("name"),t("typeArguments"),bt(i.map(({isFirst:a,previous:l})=>[a?s:qA(l,e)?[gt,gt]:s,t()],"attributes")),...hhi(n,e,r)],{shouldBreak:o})}function hhi(i,e,t){return i.selfClosing?[li,"/>"]:fhi(i,e,t)?[">"]:[dt,">"]}function fhi(i,e,t){let n=i.attributes.length>0&&$t(Ur(0,i.attributes,-1),fi.Trailing);return i.attributes.length===0&&!t||(e.bracketSameLine||e.jsxBracketSameLine)&&(!t||i.attributes.length>0)&&!n}function phi(i,e,t){let{node:n}=i,r=[""),r}function mhi(i,e){let{node:t}=i,n=$t(t),r=$t(t,fi.Line),o=t.type==="JSXOpeningFragment";return[o?"<":""]}function ghi(i,e,t){let n=Oh(i,rhi(i,e,t),e);return ahi(i,n,e)}function bhi(i,e){let{node:t}=i,n=$t(t,fi.Line);return[Gc(i,e,{indent:n}),n?gt:""]}function vhi(i,e,t){let{node:n}=i;return["{",i.call(({node:r})=>{let o=["...",t()];return $t(r)?[bt([dt,Oh(i,o,e)]),dt]:o},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ahi(i,e,t){let{node:n}=i;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return chi(i,e,t);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return jr(":",[t("namespace"),t("name")]);case"JSXMemberExpression":return jr(".",[t("object"),t("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return vhi(i,e,t);case"JSXExpressionContainer":return uhi(i,e,t);case"JSXFragment":case"JSXElement":return ghi(i,e,t);case"JSXOpeningElement":return dhi(i,e,t);case"JSXClosingElement":return phi(i,e,t);case"JSXOpeningFragment":case"JSXClosingFragment":return mhi(i,e);case"JSXEmptyExpression":return bhi(i,e);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new VR(n,"JSX")}}function yhi(i){if(i.children.length===0)return!0;if(i.children.length>1)return!1;let e=i.children[0];return e.type==="JSXText"&&!S9(e)}function whi(i){return i.type==="JSXExpressionContainer"&&Fu(i.expression)&&i.expression.value===" "&&!$t(i.expression)}function xhi(i,e,t){let{node:n}=i,r=n.parameters.length>1?uS(e):"",o=je([bt([dt,jr([", ",dt],i.map(t,"parameters"))]),r,dt]);return[i.key==="body"&&i.parent.type==="ClassBody"&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?o:"","]",Yd(i,t),Mw(i,e)]}function Nit(i,e,t){let{node:n}=i;return[n.postfix?"":t,Yd(i,e),n.postfix?t:""]}function Chi(i,e,t){let{node:n}=i,r=[],o=n.kind&&n.kind!=="method"?`${n.kind} `:"";r.push(IX(n),o,nS(i,e,t),Bf(i));let s=Vk(i,e,t,!1,!0),a=Yd(i,t,"returnType"),l=I9(n,a);return r.push(l?je(s):s),n.returnType&&r.push(je(a)),[je(r),Mw(i,e)]}function _hi(i,e,t){let{node:n}=i;return[Zm(i),n.kind==="global"?"":`${n.kind} `,t("id"),n.body?[" ",je(t("body"))]:pl(e)]}function Shi(i,e,t){let{node:n}=i,r=!(Kd(n.expression)||$0(n.expression)),o=je(["<",bt([dt,t("typeAnnotation")]),dt,">"]),s=[wr("("),bt([dt,t("expression")]),dt,wr(")")];return r?Tk([[o,t("expression")],[o,je(s,{shouldBreak:!0})],[o,t("expression")]]):je([o,t("expression")])}function Ehi(i,e,t,n){let{node:r}=i;if(r.type.startsWith("TS")){if(Ent(r))return r.type.slice(2,-7).toLowerCase();switch(r.type){case"TSThisType":return"this";case"TSTypeAssertion":return Shi(i,e,t);case"TSDeclareFunction":return X_e(i,e,t);case"TSExportAssignment":return["export = ",t("expression"),pl(e)];case"TSModuleBlock":return Drt(i,e,t);case"TSInterfaceBody":case"TSTypeLiteral":return oSe(i,e,t);case"TSTypeAliasDeclaration":return oot(i,e,t);case"TSQualifiedName":return[t("left"),".",t("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Rrt(i,e,t);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Frt(i,e,t);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[t("expression"),t("typeArguments")];case"TSTemplateLiteralType":return $nt(i,e,t);case"TSNamedTupleMember":return rot(i,e,t);case"TSRestType":return not(i,e,t);case"TSOptionalType":return[t("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return sSe(i,e,t);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return v9(i,e,t,"params");case"TSTypeParameter":return sot(i,e,t);case"TSAsExpression":case"TSSatisfiesExpression":return Krt(i,e,t);case"TSArrayType":return Yrt(t);case"TSPropertySignature":return[r.readonly?"readonly ":"",nS(i,e,t),Bf(i),Yd(i,t),Mw(i,e)];case"TSParameterProperty":return[IX(r),r.static?"static ":"",r.override?"override ":"",r.readonly?"readonly ":"",t("parameter")];case"TSTypeQuery":return lot(i,t);case"TSIndexSignature":return xhi(i,e,t);case"TSTypePredicate":return aot(i,t);case"TSNonNullExpression":return[t("expression"),"!"];case"TSImportType":return[xX(i,e,t),r.qualifier?[".",t("qualifier")]:"",v9(i,e,t,"typeArguments")];case"TSLiteralType":return t("literal");case"TSIndexedAccessType":return $rt(i,e,t);case"TSTypeOperator":return[r.operator," ",t("typeAnnotation")];case"TSMappedType":return Qdi(i,e,t);case"TSMethodSignature":return Chi(i,e,t);case"TSNamespaceExportDeclaration":return["export as namespace ",t("id"),pl(e)];case"TSEnumDeclaration":return Xrt(i,t);case"TSEnumBody":return WR(i,e,t);case"TSEnumMember":return Jrt(i,e,t);case"TSImportEqualsDeclaration":return["import ",Hrt(r,!1),t("id")," = ",t("moduleReference"),pl(e)];case"TSExternalModuleReference":return xX(i,e,t);case"TSModuleDeclaration":return _hi(i,e,t);case"TSConditionalType":return lSe(i,e,t);case"TSInferType":return eot(i,e,t);case"TSIntersectionType":return tot(i,e,t);case"TSUnionType":return jnt(i,e,t,n);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return Zrt(i,e,t);case"TSTupleType":return nSe(i,e,t);case"TSTypeReference":return[t("typeName"),v9(i,e,t,"typeArguments")];case"TSTypeAnnotation":return Gnt(i,e,t);case"TSEmptyBodyFunctionExpression":return Z_e(i,e,t);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Nit(i,t,"?");case"TSJSDocNonNullableType":return Nit(i,t,"!");default:throw new VR(r,"TypeScript")}}}function Dhi(i,e,t,n){for(let r of[zci,Ahi,ihi,Ehi,Rdi]){let o=r(i,e,t,n);if(o!==void 0)return o}}function Mit(i,e,t,n){i.isRoot&&e.__onHtmlBindingRoot?.(i.node,e);let{node:r}=i,o=iSe(i)?nhi(i,e):Dhi(i,e,t,n);if(!o)return"";if(Thi(r))return o;o=khi(i,e,o);let s=r.type!=="ClassExpression"&&qs(r.decorators)?hrt(i,e,t):"",a=qm(i,e);return!s&&!a?o:pnt(o,l=>[a?"(":"",s?je([s,l]):l,a?")":""])}function khi(i,e,t){let{node:n}=i;return($t(n,fi.Leading)||$t(n,fi.Trailing))&&rnt(i)?[bt([dt,Oh(i,t,e)]),dt]:t}function y_e(i){return i.extra.raw}function dot(i,e){let{type:t}=i;if(t==="ObjectProperty"){let{key:n}=i;if(n.type==="Identifier"){let{name:r}=n;e.key={type:"StringLiteral",value:r,extra:{rawValue:r}}}else if(n.type==="NumericLiteral"){let r=y_e(n);String(Number(r))===r&&(e.key={type:"StringLiteral",value:r,extra:{rawValue:r}})}}if(t==="StringLiteral"&&delete e.extra.raw,t==="UnaryExpression"&&i.operator==="+")return e.argument;if((t==="ArrayExpression"||t==="ObjectExpression")&&(e.extra??(e.extra={}),i.extra?.trailingComma&&delete e.extra.trailingComma),t==="ArrayExpression"){for(let[n,r]of i.elements.entries())r===null&&e.elements.splice(n,0,{type:"NullLiteral"});return}if(t==="TemplateLiteral"){let n=i.quasis[0].value.cooked;return{type:"StringLiteral",value:n,extra:{rawValue:n}}}}function Ohi(i,e,t){let{node:n}=i;switch(n.type){case"JsonRoot":return[t("node"),gt];case"ArrayExpression":{if(n.elements.length===0)return"[]";let r=i.map(()=>i.node===null?"null":t(),"elements");return["[",bt([gt,jr([",",gt],r)]),gt,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",bt([gt,jr([",",gt],i.map(t,"properties"))]),gt,"}"];case"ObjectProperty":return[t("key"),": ",t("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,t("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return Lk(y_e(n),e);case"NumericLiteral":{let r=y_e(n);return Rit(i)&&String(Number(r))===r?`"${r}"`:r}case"Identifier":return Rit(i)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return t(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new VR(n,"JSON")}}function Rit(i){return i.key==="key"&&i.parent.type==="ObjectProperty"}var zri,w_e,Fit,Vri,Oit,qs,Wri,Nk,x_e,jri,Ur,Gri,Kri,Pit,Jri,Xri,Zri,Jtt,$ri,Bit,eoi,toi,o_e,Z0,soi,Jm,D9,__e,tS,Vit,NR,aoi,Kd,$0,S_e,iS,A9,sd,Fw,Ts,Gs,y9,MR,Mk,loi,coi,uoi,doi,hoi,Xtt,foi,moi,sHi,RR,boi,voi,D_e,Ztt,FR,T_e,EX,UA,Ru,Rp,Eoi,Toi,koi,Ioi,od,Noi,Roi,ev,rS,Poi,Wit,L_e,Qoi,tit,Yit,Yoi,esi,tsi,int,dsi,hsi,psi,fi,nnt,msi,nit,uX,c_e,rit,Asi,ont,f9,Dsi,snt,Ie,Isi,Lsi,ant,Rsi,zsi,qm,Rk,Ow,BR,Fk,Ok,Pk,_b,aS,jA,Bk,zk,lS,Fp,Bw,zw,hnt,cS,Usi,Qsi,w9,oit,H_e,GA,mnt,eai,tai,Pw,dX,li,dt,vnt,gt,oai,U_e,Sb,sai,aai,lai,cai,uai,dai,fai,pai,mai,gai,bai,vai,Ant,ynt,lit,Aai,yai,xai,Cai,_ai,Sai,Eai,OR,Tai,kai,wnt,Mai,Rai,Cb,HA,h_e,vX,AX,qA,Oai,Snt,Pai,Ent,Hai,Dnt,q_e,Yai,Kai,Jai,cit,Zai,ili,nli,rli,C9,Mnt,Rnt,sli,ali,lli,uli,Lk,Ont,Pnt,_9,Bnt,hli,pli,bli,vli,wli,Qnt,xli,tSe,_li,Eli,Tli,Ili,Mli,uit,p_e,Qli,e_e,Jli,Xli,tci,oci,dci,IR,hci,fci,srt,pci,fit,mci,pit,gci,art,wci,Cci,Dci,Lci,Nci,pX,iSe,Fci,VR,Pci,git,Hci,Gci,qci,$ci,tui,iui,g_e,cui,fui,pui,kui,Iui,Lui,Rui,Trt,Cit,Irt,Bui,zui,Vui,Uui,Gui,qui,Kui,Jui,ndi,adi,Brt,ldi,zrt,ddi,mdi,_di,kdi,n_e,iot,r_e,shi,Thi,Ihi,cot,Lhi,uot,Nhi,Mhi,Rhi,Fhi,Phi,p9,eS,Bhi,hot,fot,pot,got=D(()=>{zri=Object.defineProperty,w_e=(i,e)=>{for(var t in e)zri(i,t,{get:e[t],enumerable:!0})},Fit={};w_e(Fit,{languages:()=>pot,options:()=>hot,printers:()=>fot});Vri=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",aliases:["typescriptreact"],codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],Oit={};w_e(Oit,{estree:()=>cot});qs=Hri,Wri=()=>{},Nk=Wri;x_e=(i,e)=>(t,n,...r)=>t|1&&n==null?void 0:(e.call(n)??n[i]).apply(n,r);jri=x_e("at",function(){if(Array.isArray(this)||typeof this=="string")return Uri}),Ur=jri;Gri=new WeakMap;Kri=i=>i?.type==="TSAsExpression"&&i.typeAnnotation.type==="TSTypeReference"&&i.typeAnnotation.typeName.type==="Identifier"&&i.typeAnnotation.typeName.name==="const";Pit=i=>Number.isSafeInteger(i)&&i>=0;Jri=5,Xri=8,Zri=8,Jtt=i=>e=>e.label?tn(e.label):yn(e)+i,$ri=i=>i.__contentEnd??CX(i),Bit=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],eoi=new Map([["BreakStatement",Jtt(Jri)],["ContinueStatement",Jtt(Xri)],["DebuggerStatement",i=>yn(i)+Zri],["VariableDeclaration",i=>tn(Ur(0,i.declarations,-1))],...Bit.map(i=>[i,$ri])]),toi=Ji(Bit),o_e=i=>{if(toi(i)&&i.__contentEnd)return!0;let{type:e}=i;return e==="BreakStatement"||e==="ContinueStatement"||e==="DebuggerStatement"||e==="VariableDeclaration"?!0:e==="IfStatement"?o_e(i.alternate??i.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?o_e(i.body):!1};Z0=Ji(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),soi=Ji(["SatisfiesExpression","TSSatisfiesExpression"]),Jm=Ji(["TSUnionType","UnionTypeAnnotation"]),D9=Ji(["TSIntersectionType","IntersectionTypeAnnotation"]),__e=Ji(["TupleTypeAnnotation","TSTupleType"]),tS=Ji(["TSConditionalType","ConditionalTypeAnnotation"]),Vit=Ji(["TSTypeAliasDeclaration","TypeAlias"]),NR=Ji(["ReturnStatement","ThrowStatement"]),aoi=Ji(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Kd=Ji(["ArrayExpression"]),$0=Ji(["ObjectExpression"]),S_e=Ji(["Literal","BooleanLiteral","BigIntLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),iS=Ji(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),A9=Ji(["FunctionExpression","ArrowFunctionExpression"]),sd=Ji(["JSXElement","JSXFragment"]),Fw=Ji(["BinaryExpression","LogicalExpression","NGPipeExpression"]),Ts=Ji(["CallExpression","OptionalCallExpression"]),Gs=Ji(["MemberExpression","OptionalMemberExpression"]),y9=Ji(["CallExpression","OptionalCallExpression","NewExpression"]),MR=Ji(["CallExpression","OptionalCallExpression","NewExpression","ImportExpression"]),Mk=Ji(["ChainExpression","TSNonNullExpression"]),loi=Ji(["TSArrayType","ArrayTypeAnnotation"]),coi=Ji(["TSTypeParameterInstantiation","TypeParameterInstantiation"]);uoi=Ji(["File","TemplateElement","TSEmptyBodyFunctionExpression","ChainExpression"]),doi=(i,[e])=>e?.type==="ComponentParameter"&&e.shorthand&&e.name===i&&e.local!==e.name||e?.type==="MatchObjectPatternProperty"&&e.shorthand&&e.key===i||e?.type==="ObjectProperty"&&e.shorthand&&e.key===i&&e.value!==e.key||e?.type==="Property"&&e.shorthand&&e.key===i&&!PR(e)&&e.value!==e.key||e?.type==="ImportSpecifier"&&s_e(e)&&e.local===i&&e.local!==e.imported||e?.type==="ExportSpecifier"&&s_e(e)&&e.exported===i&&e.local!==e.exported,hoi=(i,[e])=>!!(i.type==="FunctionExpression"&&e.type==="MethodDefinition"&&e.value===i&&zf(i).length===0&&!i.returnType&&!qs(i.typeParameters)&&i.body),Xtt=(i,[e])=>e?.typeAnnotation===i&&Kri(e),foi=(i,[e,...t])=>Xtt(i,[e])||e?.typeName===i&&Xtt(e,t);moi=poi;sHi=SX(/\s/),RR=SX(" "),boi=SX(",; "),voi=SX(/[^\n\r]/);D_e=Aoi,Ztt=i=>i===` -`||i==="\r"||i==="\u2028"||i==="\u2029";FR=yoi;T_e=woi;EX=xoi;UA=Coi;Ru=_oi;Rp=Soi,Eoi=new WeakMap;Toi=Symbol.for("comments"),koi=String.prototype.replaceAll??function(i,e){return i.global?this.replace(i,e):this.split(i).join(e)},Ioi=x_e("replaceAll",function(){if(typeof this=="string")return koi}),od=Ioi;Noi=Loi;Roi=new WeakMap;ev=Ji(["Block","CommentBlock","MultiLine"]),rS=Ji(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);Poi=new WeakMap;Wit=(i,e)=>ev(i)&&!Rp(e,yn(i),tn(i)),L_e=(i,e)=>rS(i)||Wit(i,e);Qoi=Ji(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);tit=Ji(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);Yit=Ji(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);Yoi=Ji(["ComponentDeclaration","DeclareComponent","ComponentTypeAnnotation"]);esi=Ji(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),tsi=Ji(["ObjectExpression","ArrayExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);int=Ji(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod","HookDeclaration"]),dsi={endOfLine:Voi,ownLine:zoi,remaining:Hoi},hsi=dsi;psi=fsi,fi={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},nnt=(i,e)=>{if(typeof i=="function"&&(e=i,i=0),i||e)return(t,n,r)=>!(i&fi.Leading&&!t.leading||i&fi.Trailing&&!t.trailing||i&fi.Dangling&&(t.leading||t.trailing)||i&fi.Block&&!ev(t)||i&fi.Line&&!rS(t)||i&fi.First&&n!==0||i&fi.Last&&n!==r.length-1||i&fi.PrettierIgnore&&!kk(t)||e&&!e(t))};msi=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((i,e)=>i.map(t=>[t,e])));nit={"==":!0,"!=":!0,"===":!0,"!==":!0},uX={"*":!0,"/":!0,"%":!0},c_e={">>":!0,">>>":!0,"<<":!0};rit=i=>i.extra?.parenthesized,Asi=Ji(["OptionalCallExpression","OptionalMemberExpression"]);ont=Csi;f9=null;Dsi=10;for(let i=0;i<=Dsi;i++)g9();snt=ksi,Ie=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],Isi={ArrayExpression:Ie[0],AssignmentExpression:Ie[1],BinaryExpression:Ie[1],InterpreterDirective:[],Directive:Ie[2],DirectiveLiteral:[],BlockStatement:Ie[3],BreakStatement:Ie[4],CallExpression:Ie[5],CatchClause:["param","body"],ConditionalExpression:Ie[6],ContinueStatement:Ie[4],DebuggerStatement:[],DoWhileStatement:Ie[7],EmptyStatement:[],ExpressionStatement:Ie[8],File:["program"],ForInStatement:Ie[9],ForStatement:["init","test","update","body"],FunctionDeclaration:Ie[10],FunctionExpression:Ie[10],Identifier:["typeAnnotation","decorators"],IfStatement:Ie[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:Ie[1],MemberExpression:Ie[11],NewExpression:Ie[5],Program:Ie[3],ObjectExpression:Ie[12],ObjectMethod:Ie[13],ObjectProperty:Ie[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:Ie[15],SequenceExpression:Ie[16],ParenthesizedExpression:Ie[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:Ie[15],TryStatement:["block","handler","finalizer"],UnaryExpression:Ie[15],UpdateExpression:Ie[15],VariableDeclaration:["declarations"],VariableDeclarator:Ie[17],WhileStatement:Ie[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:Ie[18],ClassExpression:Ie[19],ClassDeclaration:Ie[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:Ie[20],ExportSpecifier:["local","exported"],ForOfStatement:Ie[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:Ie[21],ImportNamespaceSpecifier:Ie[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:Ie[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:Ie[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:Ie[15],AwaitExpression:Ie[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:Ie[22],OptionalMemberExpression:Ie[11],OptionalCallExpression:Ie[5],ClassProperty:Ie[23],ClassPrivateProperty:Ie[23],ClassPrivateMethod:Ie[13],PrivateName:Ie[24],StaticBlock:Ie[18],ImportAttribute:Ie[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:Ie[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:Ie[27],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:Ie[28],DeclareModule:Ie[29],DeclareModuleExports:Ie[30],DeclareTypeAlias:Ie[31],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareVariable:["id","declarations"],DeclareExportDeclaration:Ie[20],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:Ie[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:Ie[32],GenericTypeAnnotation:Ie[27],InferredPredicate:[],InterfaceExtends:Ie[27],InterfaceDeclaration:Ie[28],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:Ie[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:Ie[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:Ie[2],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:Ie[15],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],QualifiedTypeIdentifier:Ie[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:Ie[35],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:Ie[31],TypeAnnotation:Ie[30],TypeCastExpression:Ie[36],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:Ie[37],TypeParameterInstantiation:Ie[37],UnionTypeAnnotation:Ie[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:Ie[29],EnumBooleanBody:Ie[38],EnumNumberBody:Ie[38],EnumStringBody:Ie[38],EnumSymbolBody:Ie[38],EnumBooleanMember:Ie[17],EnumNumberMember:Ie[17],EnumStringMember:Ie[17],EnumDefaultedMember:Ie[24],IndexedAccessType:Ie[39],OptionalIndexedAccessType:Ie[39],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:Ie[8],JSXSpreadChild:Ie[8],JSXIdentifier:[],JSXMemberExpression:Ie[11],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXSpreadAttribute:Ie[15],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ClassAccessorProperty:Ie[40],Decorator:Ie[8],DoExpression:Ie[18],ExportDefaultSpecifier:Ie[22],ModuleExpression:Ie[18],TopicReference:[],VoidPattern:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:Ie[41],TSDeclareMethod:Ie[42],TSQualifiedName:Ie[1],TSCallSignatureDeclaration:Ie[43],TSConstructSignatureDeclaration:Ie[43],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:Ie[42],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:Ie[43],TSConstructorType:Ie[43],TSTypeReference:["typeName","typeArguments"],TSTypePredicate:Ie[44],TSTypeQuery:["exprName","typeArguments"],TSTypeLiteral:Ie[38],TSArrayType:Ie[26],TSTupleType:Ie[35],TSOptionalType:Ie[30],TSRestType:Ie[30],TSNamedTupleMember:["label","elementType"],TSUnionType:Ie[33],TSIntersectionType:Ie[33],TSConditionalType:Ie[45],TSInferType:Ie[46],TSParenthesizedType:Ie[30],TSTypeOperator:Ie[30],TSIndexedAccessType:Ie[39],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:Ie[47],TSClassImplements:Ie[48],TSInterfaceHeritage:Ie[48],TSInterfaceDeclaration:Ie[28],TSInterfaceBody:Ie[18],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:Ie[48],TSAsExpression:Ie[36],TSSatisfiesExpression:Ie[36],TSTypeAssertion:Ie[36],TSEnumBody:Ie[38],TSEnumDeclaration:Ie[29],TSEnumMember:["id","initializer"],TSModuleDeclaration:Ie[29],TSModuleBlock:Ie[18],TSImportType:["source","options","qualifier","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:Ie[8],TSNonNullExpression:Ie[8],TSExportAssignment:Ie[8],TSNamespaceExportDeclaration:Ie[24],TSTypeAnnotation:Ie[30],TSTypeParameterInstantiation:Ie[37],TSTypeParameterDeclaration:Ie[37],TSTypeParameter:["name","constraint","default"],ChainExpression:Ie[8],Literal:[],MethodDefinition:Ie[14],PrivateIdentifier:[],Property:Ie[25],PropertyDefinition:Ie[23],AccessorProperty:Ie[40],TSAbstractAccessorProperty:Ie[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:Ie[25],TSAbstractPropertyDefinition:Ie[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:Ie[8],AsExpression:Ie[36],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:Ie[32],ConditionalTypeAnnotation:Ie[45],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:Ie[29],DeclareHook:Ie[24],DeclareNamespace:Ie[29],EnumBigIntBody:Ie[38],EnumBigIntMember:Ie[17],EnumBody:Ie[38],HookDeclaration:Ie[41],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:Ie[46],KeyofTypeAnnotation:Ie[15],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:Ie[24],MatchExpression:Ie[50],MatchExpressionCase:Ie[51],MatchIdentifierPattern:Ie[24],MatchInstanceObjectPattern:Ie[52],MatchInstancePattern:["targetConstructor","properties"],MatchLiteralPattern:Ie[47],MatchMemberPattern:["base","property"],MatchObjectPattern:Ie[52],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:Ie[15],MatchStatement:Ie[50],MatchStatementCase:Ie[51],MatchUnaryPattern:Ie[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:Ie[34],RecordDeclaration:["id","typeParameters","implements","body"],RecordDeclarationBody:Ie[0],RecordDeclarationImplements:["id","typeArguments"],RecordDeclarationProperty:["key","typeAnnotation","defaultValue"],RecordDeclarationStaticProperty:["key","typeAnnotation","value"],RecordExpression:["recordConstructor","typeArguments","properties"],RecordExpressionProperties:Ie[12],SatisfiesExpression:Ie[36],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:Ie[30],TypePredicate:Ie[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:Ie[16],NGEmptyExpression:[],NGPipeExpression:["left","right","arguments"],NGMicrosyntax:Ie[18],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:Ie[25],NGRoot:Ie[53],JsExpressionRoot:Ie[53],JsonRoot:Ie[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:Ie[30],TSJSDocNonNullableType:Ie[30]},Lsi=snt(Isi),ant=Lsi;Rsi=new WeakMap;zsi=Ji(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);qm=dnt,Rk="string",Ow="array",BR="cursor",Fk="indent",Ok="align",Pk="trim",_b="group",aS="fill",jA="if-break",Bk="indent-if-break",zk="line-suffix",lS="line-suffix-boundary",Fp="line",Bw="label",zw="break-parent",hnt=new Set([BR,Fk,Ok,Pk,_b,aS,jA,Bk,zk,lS,Fp,Bw,zw]);cS=Wsi,Usi=i=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(i);Qsi=class extends Error{name="InvalidDocError";constructor(i){super(jsi(i)),this.doc=i}},w9=Qsi,oit={};H_e=Gsi;GA=Nk,mnt=Nk,eai=Nk,tai=Nk;Pw={type:zw},dX={type:BR};li={type:Fp},dt={type:Fp,soft:!0},vnt={type:Fp,hard:!0},gt=[vnt,Pw],oai={type:Fp,hard:!0,literal:!0},U_e=[oai,Pw];Sb={type:lS},sai="cr",aai="crlf",lai="\r",cai=`\r -`,uai=` -`,dai=uai;fai=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,pai=12288,mai=65510,gai=[12288,12288,65281,65376,65504,65510],bai=4352,vai=262141,Ant=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],ynt=(i,e)=>{let t=0,n=Math.floor(i.length/2)-1;for(;t<=n;){let r=Math.floor((t+n)/2),o=r*2;if(ei[o+1])t=r+1;else return!0}return!1},lit=19968,[Aai,yai]=wai(Ant);xai=i=>imai?!1:ynt(gai,i),Cai=i=>i>=Aai&&i<=yai?!0:ivai?!1:ynt(Ant,i),_ai=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,Sai=i=>_ai.test(i),Eai=/[^\x20-\x7F]/;OR=Dai,Tai={type:0},kai={type:1},wnt={value:"",length:0,queue:[],get root(){return wnt}};Mai=class{#e=[];#t="";#n=0;#r=[];#i=[];#o(){let i=this.#t;i!==""&&(this.#e.push(i),this.#n+=i.length,this.#t="");for(let e of this.#i)this.#r.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#r.length+this.#i.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#i.push(this.#n+this.#t.length)}write(i){this.#t+=i}trim(){let{text:i,count:e}=Cnt(this.#t);return this.#t=i,this.#o(),e}finish(){return this.#o(),{text:this.#e.join(""),positions:this.#r}}},Rai=Mai,Cb=Symbol("MODE_BREAK"),HA=Symbol("MODE_FLAT"),h_e=Symbol("DOC_FILL_PRINTED_LENGTH");vX=class extends Error{name="ArgExpansionBailout"};AX=Fai,qA=(i,{originalText:e})=>{let t=tn(i);if(AX(e,t))return!0;let n=CX(i);return n===t?!1:AX(e,n)},Oai=Ji(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Snt=Oai,Pai=Ji(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);Ent=Bai;Hai=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];Dnt=Qai,q_e=()=>!0;Yai=Ji(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]),Kai=i=>{let{node:e}=i;return Yai(e)?i.parent.type!=="DeclareExportDeclaration"&&!e.implicitDeclare:e.declare};Jai=Ji(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);cit=i=>i.type==="UnaryExpression"&&i.operator==="!";Zai=i=>i.mark!=="commentBeforeArrow";ili=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,nli=i=>ili.test(i),rli=nli;C9=oli,Mnt=Object.freeze({character:"'",codePoint:39}),Rnt=Object.freeze({character:'"',codePoint:34}),sli=Object.freeze({preferred:Mnt,alternate:Rnt}),ali=Object.freeze({preferred:Rnt,alternate:Mnt});lli=/\\(["'\\])|(["'])/g;uli=cli;Lk=dli,Ont=i=>i.type==="TSEnumMember",Pnt=i=>Ont(i)?"id":"key",_9=i=>i[Pnt(i)],Bnt=i=>!Ont(i)&&i.computed;hli=({parser:i})=>i==="typescript"||i==="babel-ts"||i==="oxc-ts"||i==="yuku-ts";pli=new WeakMap;bli=Ji(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),vli=Ji(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);wli=new WeakSet;Qnt=i=>i.match(e=>e.type==="TSTypeAnnotation",(e,t)=>(t==="returnType"||t==="typeAnnotation")&&(e.type==="TSFunctionType"||e.type==="TSConstructorType"))?"=>":i.match(e=>e.type==="TSTypeAnnotation",(e,t)=>t==="typeAnnotation"&&(e.type==="TSJSDocNullableType"||e.type==="TSJSDocNonNullableType"||e.type==="TSTypePredicate"))||i.match(e=>e.type==="TypeAnnotation",(e,t)=>t==="typeAnnotation"&&e.type==="Identifier",(e,t)=>t==="id"&&e.type==="DeclareFunction")||i.match(e=>e.type==="TypeAnnotation",(e,t)=>t==="typeAnnotation"&&e.type==="Identifier",(e,t)=>t==="id"&&e.type==="DeclareHook")||i.match(e=>e.type==="TypeAnnotation",(e,t)=>t==="bound"&&e.type==="TypeParameter"&&e.usesExtendsBound)?"":":";xli=({node:i,key:e,parent:t})=>e==="value"&&i.type==="FunctionExpression"&&(t.type==="ObjectMethod"||t.type==="ClassMethod"||t.type==="ClassPrivateMethod"||t.type==="MethodDefinition"||t.type==="TSAbstractMethodDefinition"||t.type==="TSDeclareMethod"||t.type==="Property"&&PR(t));tSe=({node:i,parent:e})=>i.type==="ExpressionStatement"&&e.type==="Program"&&e.body.length===1&&(Array.isArray(e.directives)&&e.directives.length===0||!e.directives);_li=Ji(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);Eli=Sli;Tli=Dli;Ili=kli;Mli=new WeakMap;uit=/^[fx]?(?:describe|it|test)$/;p_e=[(i,e)=>e==="properties"&&i.type==="ObjectExpression",(i,e)=>e==="arguments"&&i.type==="CallExpression"&&i.callee.type==="Identifier"&&i.callee.name==="Component",(i,e)=>e==="expression"&&i.type==="Decorator"];Qli=i=>Wli(i)||Uli(i)||jli(i)||Pli(i);e_e=0;Jli=nrt.bind(void 0,"html"),Xli=nrt.bind(void 0,"angular");tci=[{test:Qli,print:Vli},{test:Yli,print:Gli},{test:Kli,print:Jli},{test:Bli,print:Xli},{test:eci,print:Zli}].map(({test:i,print:e})=>({test:i,print:nci(e)}));oci=ici;dci=new Set(["range","raw","comments","extra","start","end","loc","errors","tokens","trailingComma","docblock","__contentEnd"]),IR=i=>{for(let e of i.quasis)delete e.value};ort.ignoredProperties=dci;hci=/\*\/$/,fci=/^\/\*\*?/,srt=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,pci=/(^|\s+)\/\/([^\n\r]*)/g,fit=/^(\r?\n)+/,mci=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,pit=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,gci=/(\r?\n|^) *\* ?/g,art=[];wci="format";Cci=xci;Dci=new WeakMap;Lci=class{#e;constructor(i){this.#e=new Set(i)}getLeadingWhitespaceCount(i){let e=this.#e,t=0;for(let n=0;n=0&&e.has(i.charAt(n));n--)t++;return t}getLeadingWhitespace(i){let e=this.getLeadingWhitespaceCount(i);return i.slice(0,e)}getTrailingWhitespace(i){let e=this.getTrailingWhitespaceCount(i);return i.slice(i.length-e)}hasLeadingWhitespace(i){return this.#e.has(i.charAt(0))}hasTrailingWhitespace(i){return this.#e.has(Ur(0,i,-1))}trimStart(i){let e=this.getLeadingWhitespaceCount(i);return i.slice(e)}trimEnd(i){let e=this.getTrailingWhitespaceCount(i);return i.slice(0,i.length-e)}trim(i){return this.trimEnd(this.trimStart(i))}split(i,e=!1){let t=`[${Ici([...this.#e].join(""))}]+`,n=new RegExp(e?`(${t})`:t);return i.split(n)}hasWhitespaceCharacter(i){let e=this.#e;return Array.prototype.some.call(i,t=>e.has(t))}hasNonWhitespaceCharacter(i){let e=this.#e;return Array.prototype.some.call(i,t=>!e.has(t))}isWhitespaceOnly(i){let e=this.#e;return Array.prototype.every.call(i,t=>e.has(t))}#t(i){let e=Number.POSITIVE_INFINITY;for(let t of i.split(` +`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}function git(i){return zb(w$t,i,y$t)}function bit(i){return git(i).length>0}function x$t(i,e){let t=i.node;if(TS(t))return e.originalText.slice(yn(t),tn(t)).trimEnd();if(bit(t))return C$t(t);if(yA(t))return["/*",uI(t.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(t))}function C$t(i){let e=git(i),t=i.value[0]==="*"&&i.value[1]!=="*";return["/",e.map((n,o)=>{if(o===0)return[n.trimEnd(),gt];if(o===e.length-1)return[" ",n];let r=n.trimEnd(),s=[" ",r];return t&&r!=="*"&&n.endsWith(" ")?[s," ",XJt(hSe)]:[s,gt]}),"/"]}function _$t(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function nz(i){return i.type==="JSXText"&&(OZ.hasNonWhitespaceCharacter(lg(i))||!/\n/.test(lg(i)))}function D$t(i){let{node:e,parent:t}=i;if(!md(e)||!md(t))return!1;let{index:n,siblings:o}=i,r;for(let s=n;s>0;s--){let a=o[s-1];if(!(a.type==="JSXText"&&!nz(a))){r=a;break}}return r?.type==="JSXExpressionContainer"&&r.expression.type==="JSXEmptyExpression"&&KZ(r.expression)}function T$t(i){return KZ(i.node)||D$t(i)}function I$t(i){return i.type==="CallExpression"&&!i.optional&&i.arguments.length===1&&i.callee.type==="Identifier"&&i.callee.name==="Boolean"}function Ait(i,e,t){let{node:n,parent:o,grandparent:r,key:s}=i,a=s!=="body"&&(o.type==="IfStatement"||o.type==="WhileStatement"||o.type==="SwitchStatement"||o.type==="DoWhileStatement"),l=n.operator==="|>"&&i.root.extra?.__isUsingHackPipeline,c=B_e(i,e,t,!1,a);if(a)return c;if(l)return je(c);if(s==="callee"&&Z7(o)||o.type==="UnaryExpression"&&!Yt(n)||Xs(o)&&!o.computed)return je([bt([dt,...c]),dt]);let u=_F(o)||o.type==="JSXExpressionContainer"&&r.type==="JSXAttribute"||n.operator!=="|"&&o.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(o.type==="NGRoot"&&e.parser==="__ng_binding"||o.type==="NGMicrosyntaxExpression"&&r.type==="NGMicrosyntax"&&r.body.length===1)||n===o.body&&o.type==="ArrowFunctionExpression"||n!==o.body&&o.type==="ForStatement"||o.type==="ConditionalExpression"&&!_F(r)&&!Z7(r)||o.type==="TemplateLiteral"||s==="argument"&&o.type==="UnaryExpression"||s==="arguments"&&I$t(o),d=o.type==="AssignmentExpression"||o.type==="VariableDeclarator"||o.type==="ClassProperty"||o.type==="PropertyDefinition"||o.type==="TSAbstractPropertyDefinition"||o.type==="ClassPrivateProperty"||kS(o),h=sx(n.left)&&lSe(n.operator,n.left.operator);if(u||oz(n)&&!h||!oz(n)&&d)return je(c);if(c.length===0)return"";let f=md(n.right),p=c.findIndex(_=>typeof _!="string"&&!Array.isArray(_)&&_.type===Pb),g=c.slice(0,p===-1?1:p+1),A=c.slice(g.length,f?-1:void 0),v=Symbol("logicalChain-"+ ++L$t),w=je([...g,bt(A)],{id:v});if(!f)return w;let C=Go(0,c,-1);return je([w,ez(C,{groupId:v})])}function B_e(i,e,t,n,o){let{node:r}=i;if(!sx(r))return[je(t())];let s=[];lSe(r.operator,r.left.operator)?s=i.call(()=>B_e(i,e,t,!0,o),"left"):s.push(je(t("left")));let a=oz(r),l=r.right.type==="ChainExpression"?r.right.expression:r.right,c=(r.type==="NGPipeExpression"||r.operator==="|>"||N$t(i,e))&&!rx(e.originalText,l),u=!Yt(l,li.Leading,Z_e)&&rx(e.originalText,l),d=r.type==="NGPipeExpression"?"|":r.operator,h=r.type==="NGPipeExpression"&&r.arguments.length>0?je(bt([dt,": ",qo([ti,": "],i.map(()=>dg(2,je(t())),"arguments"))])):"",f;if(a)f=[d,rx(e.originalText,l)?bt([ti,t("right"),h]):[" ",t("right"),h]];else{let A=d==="|>"&&i.root.extra?.__isUsingHackPipeline?i.call(()=>B_e(i,e,t,!0,o),"right"):t("right");if(e.experimentalOperatorPosition==="start"){let v="";if(u)switch(MS(A)){case ax:v=A[0],A.shift();break;case cx:v=A.contents[0],A.contents.shift();break}f=[ti,v,d," ",A,h]}else f=[c?ti:"",d,c?" ":ti,A,h]}let{parent:p}=i,g=Yt(r.left,li.Trailing|li.Line);if((g||!(o&&r.type==="LogicalExpression")&&p.type!==r.type&&r.left.type!==r.type&&r.right.type!==r.type)&&(f=je(f,{shouldBreak:g})),e.experimentalOperatorPosition==="start"?s.push(a||u?" ":"",f):s.push(c?"":" ",f),n&&Yt(r)){let A=dSe(Yh(i,s,e));return A.type===LS?A.parts:Array.isArray(A)?A:[A]}return s}function oz(i){return i.type!=="LogicalExpression"?!1:!!(vA(i.right)&&i.right.properties.length>0||nh(i.right)&&i.right.elements.length>0||md(i.right))}function N$t(i,e){return(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&Cet(i.node)&&!i.hasAncestor(t=>!Cet(t)&&t.type!=="JsExpressionRoot")}function M$t(i,e,t){let{node:n}=i;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return t("node");case"NGPipeExpression":return Ait(i,e,t);case"NGChainedExpression":return je(qo([";",ti],i.map(()=>O$t(i)?t():["(",t(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return i.map(()=>[i.isFirst?"":_et(i)?" ":[";",ti],t()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[t("expression"),n.alias===null?"":[" as ",t("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:o,parent:r}=i,s=_et(i)||R$t(i)||(o===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||o===2&&(n.key.name==="else"&&r.body[o-1].type==="NGMicrosyntaxKeyedExpression"&&r.body[o-1].key.name==="then"||n.key.name==="track"))&&r.body[0].type==="NGMicrosyntaxExpression";return[t("key"),s?" ":": ",t("expression")]}case"NGMicrosyntaxLet":return["let ",t("key"),n.value===null?"":[" = ",t("value")]];case"NGMicrosyntaxAs":return[t("key")," as ",t("alias")];default:throw new NF(n,"Angular")}}function _et({node:i,index:e}){return i.type==="NGMicrosyntaxKeyedExpression"&&i.key.name==="of"&&e===1}function R$t(i){let{node:e}=i;return i.parent.body[1].key.name==="of"&&e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="track"&&e.key.type==="NGMicrosyntaxKey"}function O$t({node:i}){return M_e(i,F$t)}function vit(i,e,t){let{node:n}=i;return je([qo(ti,i.map(t,"decorators")),wit(n,e)?gt:ti])}function P$t(i,e,t){return xit(i.node)?[qo(gt,i.map(t,"declaration","decorators")),gt]:""}function yit(i,e,t){let{node:n,parent:o}=i,{decorators:r}=n;if(!Zs(r)||xit(o)||SSe(i))return"";let s=n.type==="ClassExpression"||n.type==="ClassDeclaration"||wit(n,e);return[i.key==="declaration"&&tKt(o)?gt:s?lx:"",qo(ti,i.map(t,"decorators")),ti]}function wit(i,e){return i.decorators.some(t=>Vu(e.originalText,tn(t)))}function xit(i){if(i.type!=="ExportDefaultDeclaration"&&i.type!=="ExportNamedDeclaration"&&i.type!=="DeclareExportDeclaration")return!1;let e=i.declaration?.decorators;return Zs(e)&&GZ(i,e[0])}function Cit(i){return i.type==="UnaryExpression"&&(i.operator==="+"||i.operator==="-")&&cy(i.argument)}function ESe(i,e,t){let{node:n}=i,o=[],r=q_e(n)?"elementTypes":"elements",s=n[r];if(s.length===0&&!n.inexact)o.push(je(["[",$Z(i,e),"]"]));else{let a=Go(0,s,-1),l=a?.type!=="RestElement"&&!n.inexact,c=a===null,u=Symbol("array"),d=!e.__inJestEach&&s.length>1&&s.every((p,g,A)=>{if(!nh(p)&&!vA(p))return!1;let v=p?.type,w=A[g+1];if(w&&v!==w.type)return!1;let C=nh(p)?"elements":"properties";return p[C]&&p[C].length>1})||Yt(n,li.Dangling|li.Line),h=_it(n,e),f=l?c?",":Btt(e)?h?Co(",","",{groupId:u}):Co(","):"":"";o.push(je(["[",bt([dt,h?z$t(i,e,t,f):[B$t(i,e,t,r,n.inexact),f],eu(i,e)]),dt,"]"],{shouldBreak:d,id:u}))}return o.push(Jf(i),ih(i,t)),o}function _it(i,e){return nh(i)&&i.elements.length>0&&i.elements.every(t=>t&&(cy(t)||Cit(t)&&!Yt(t.argument))&&!Yt(t,li.Trailing|li.Line,n=>!Vu(e.originalText,yn(n),{backwards:!0})))}function Sit({node:i},{originalText:e}){let t=tn(i);if(t===yn(i))return!1;let{length:n}=e;for(;t{r.push(s?je(t()):""),(!a||o)&&r.push([",",ti,s&&Sit(i,e)?dt:""])},n),o&&r.push("..."),r}function z$t(i,e,t,n){let o=[];return i.each(({isLast:r,next:s})=>{o.push([t(),r?n:","]),r||o.push(Sit(i,e)?[gt,gt]:Yt(s,li.Leading|li.Line)?gt:ti)},"elements"),Stt(o)}function Eet(i){return i.quasis.some(e=>e.value.raw.includes(` +`))}function Eit(i,e){return(i.type==="TemplateLiteral"&&Eet(i)||i.type==="TaggedTemplateExpression"&&Eet(i.quasi))&&!Vu(e,yn(i),{backwards:!0})}function Dit(i){return zb(V$t,i,e=>e.type==="ConditionalExpression"&&!Yf(e,t=>t.type==="ObjectExpression"))}function W$t(i,e,t,n={}){let o=[],r,s=[],a=!1,l=!n.expandLastArg&&i.node.body.type==="ArrowFunctionExpression",c;(function v(){let{node:w}=i,C=U$t(i,e,t,n);if(o.length===0)o.push(C);else{let{leading:_,trailing:E}=Ptt(i,e);o.push([_,C]),s.unshift(E)}l&&(a||(a=w.returnType&&Xf(w).length>0||w.typeParameters||Xf(w).some(_=>_.type!=="Identifier"))),!l||w.body.type!=="ArrowFunctionExpression"?(r=t("body",n),c=w.body):i.call(v,"body")})();let u=!rx(e.originalText,c)&&(H$t(c)||j$t(c,r,e)||!a&&Dit(c)),d=i.key==="callee"&&SF(i.parent),h=Symbol("arrow-chain"),f=Q$t(i,n,{signatureDocs:o,shouldBreak:a}),p=!1,g=!1,A=!1;return l&&(d||n.assignmentLayout)&&(g=!0,A=!Yt(i.node,li.Leading&li.Line),p=n.assignmentLayout==="chain-tail-arrow-chain"||d&&!u),r=G$t(i,e,n,{bodyDoc:r,bodyComments:s,functionBody:c,shouldPutBodyOnSameLine:u}),je([je(g?bt([A?dt:"",f]):f,{shouldBreak:p,id:h})," =>",l?ez(r,{groupId:h}):je(r),l&&d?Co(dt,"",{groupId:h}):""])}function U$t(i,e,t,n){let{node:o}=i,r=[];if(o.async&&r.push("async "),tit(i,e))r.push(t(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,l=xSe(i,t);if(a){if(Kf(l))throw new VZ;l=je(zZ(l))}r.push(je([yI(i,e,t,a,!0),l]))}let s=eu(i,e,{marker:"commentBeforeArrow"});return s&&r.push(" ",s),r}function j$t(i,e,t){return nh(i)||vA(i)||i.type==="ArrowFunctionExpression"||i.type==="DoExpression"||i.type==="BlockStatement"||md(i)||e.label?.hug!==!1&&(e.label?.embed||Eit(i,t.originalText))}function Q$t(i,e,{signatureDocs:t,shouldBreak:n}){if(t.length===1)return t[0];let{parent:o,key:r}=i;return r!=="callee"&&SF(o)||sx(o)?je([t[0]," =>",bt([ti,qo([" =>",ti],t.slice(1))])],{shouldBreak:n}):r==="callee"&&SF(o)||e.assignmentLayout?je(qo([" =>",ti],t),{shouldBreak:n}):je(bt(qo([" =>",ti],t)),{shouldBreak:n})}function G$t(i,e,t,{bodyDoc:n,bodyComments:o,functionBody:r,shouldPutBodyOnSameLine:s}){let{node:a,parent:l}=i,c=t.expandLastArg?RS(e,"all"):"",u=(t.expandLastArg||l.type==="JSXExpressionContainer")&&!Yt(a)?dt:"";return s&&Dit(r)?[" ",je([Co("","("),bt([dt,n]),Co("",")"),c,u]),o]:s?[" ",n,o]:[bt([ti,n,o]),c,u]}function DSe(i,e){let{printWidth:t}=e;if(Yt(i))return!1;let n=t*q$t;if(i.type==="ThisExpression"||i.type==="Identifier"&&i.name.length<=n||Cit(i)&&!Yt(i.argument))return!0;let o=i.type==="Literal"&&"regex"in i&&i.regex.pattern||i.type==="RegExpLiteral"&&i.pattern;return o?o.length<=n:Hu(i)?dI(lg(i),e).length<=n:i.type==="TemplateLiteral"?i.expressions.length===0&&i.quasis[0].value.raw.length<=n&&!i.quasis[0].value.raw.includes(` +`):i.type==="UnaryExpression"?DSe(i.argument,{printWidth:t}):i.type==="CallExpression"&&i.arguments.length===0&&i.callee.type==="Identifier"?i.callee.name.length<=n-2:Y_e(i)}function CF(i){return Xs(i)||i.type==="BindExpression"&&!!i.object}function Y$t(i){if(i.length<=1)return!1;let e=0;for(let t of i)if(X7(t)){if(e+=1,e>1)return!0}else if(t=IS(t),Ms(t)){for(let n of Vb(t))if(X7(n))return!0}return!1}function Tit(i){let{node:e,parent:t,key:n}=i;return n==="callee"&&Ms(e)&&Ms(t)&&t.arguments.length>0&&e.arguments.length>t.arguments.length}function sy(i,e=2){if(e<=0)return!1;let t=n=>sy(n,e-1);if(i=IS(i),qet(i))return TF(i.pattern??i.regex.pattern)<=5;if(Y_e(i)||J$t(i)||i.type==="ArgumentPlaceholder")return!0;if(i.type==="TemplateLiteral")return i.quasis.every(n=>!n.value.raw.includes(` +`))&&i.expressions.every(t);if(vA(i))return i.properties.every(n=>!n.computed&&(n.shorthand||n.value&&t(n.value)));if(nh(i))return i.elements.every(n=>n===null||t(n));if(SF(i)){if(i.type==="ImportExpression"||sy(i.callee,e)){let n=Vb(i);return n.length<=e&&n.every(t)}return!1}return Xs(i)?sy(i.object,e)&&sy(i.property,e):i.type==="UnaryExpression"&&K$t.has(i.operator)||i.type==="UpdateExpression"?sy(i.argument,e):!1}function X$t(i,e,t){let{node:n}=i,o=Vb(n);if(o.length===0)return je(["(",$Z(i,e),")"]);let r=o.length-1;if(eei(o)){let d=["("];return I_e(i,(h,f)=>{d.push(t()),f!==r&&d.push(", ")}),d.push(")"),d}let s=!1,a=[];I_e(i,({node:d},h)=>{let f=t();h===r||(dy(d,e)?(s=!0,f=[f,",",gt,gt]):f=[f,",",ti]),a.push(f)});let l=i.root.type!=="NGRoot"&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"?RS(e,"all"):"";function c(){return je(["(",bt([ti,...a]),l,ti,")"],{shouldBreak:!0})}if(s||i.parent.type!=="Decorator"&&Y$t(o))return c();if($$t(o)){let d=a.slice(1);if(d.some(Kf))return c();let h;try{h=t(ret(n,0),{expandFirstArg:!0})}catch(f){if(f instanceof VZ)return c();throw f}return Kf(h)?[lx,lI([["(",je(h,{shouldBreak:!0}),", ",...d,")"],c()])]:lI([["(",h,", ",...d,")"],["(",je(h,{shouldBreak:!0}),", ",...d,")"],c()])}if(Z$t(o,a,e)){let d=a.slice(0,-1);if(d.some(Kf))return c();let h;try{h=t(ret(n,-1),{expandLastArg:!0})}catch(f){if(f instanceof VZ)return c();throw f}return Kf(h)?[lx,lI([["(",...d,je(h,{shouldBreak:!0}),")"],c()])]:lI([["(",...d,h,")"],["(",...d,je(h,{shouldBreak:!0}),")"],c()])}let u=["(",bt([dt,...a]),l,dt,")"];return Tit(i)?u:je(u,{shouldBreak:a.some(Kf)||s})}function UZ(i,e=!1){if(vA(i)&&(i.properties.length>0||Yt(i))||nh(i)&&(i.elements.length>0||Yt(i))||(AA(i)||i.type==="TSTypeAssertion")&&UZ(i.expression)||i.type==="FunctionExpression"||i.type==="DoExpression"||i.type==="ModuleExpression")return!0;if(i.type==="ArrowFunctionExpression"){let{body:t}=i;if(t.type==="BlockStatement"||md(t)||vA(t)||nh(t)||t.type==="ArrowFunctionExpression"&&UZ(t,!0)||!e&&(t.type==="ConditionalExpression"||Ms(IS(t))))return!0}return!1}function Z$t(i,e,t){if(i.length===1){let r=Go(0,e,-1);if(r.label?.embed&&r.label?.hug!==!1)return!0}let n=Go(0,i,-1),o=Go(0,i,-2);return!Yt(n,li.Leading)&&!Yt(n,li.Trailing)&&UZ(n)&&(!o||o.type!==n.type)&&(i.length!==2||o.type!=="ArrowFunctionExpression"||!nh(n))&&!(i.length>1&&_it(n,t))}function $$t(i){if(i.length!==2)return!1;let[e,t]=i;return e.type==="ModuleExpression"&&tei(t)?!0:!Yt(e)&&(e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement")&&t.type!=="FunctionExpression"&&t.type!=="ArrowFunctionExpression"&&t.type!=="ConditionalExpression"&&kit(t)&&!UZ(t)}function kit(i){if(i.type==="ParenthesizedExpression")return kit(i.expression);if(AA(i)||i.type==="TypeCastExpression"){let{typeAnnotation:e}=i;if(e.type==="TypeAnnotation"&&(e=e.typeAnnotation),e.type==="TSArrayType"&&(e=e.elementType,e.type==="TSArrayType"&&(e=e.elementType)),e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference"){let t=e.type==="GenericTypeAnnotation"?e.typeParameters:e.typeArguments;t?.params.length===1&&(e=t.params[0])}return pSe(e)&&sy(i.expression,1)}return SF(i)&&Vb(i).length>1?!1:sx(i)?sy(i.left,1)&&sy(i.right,1):qet(i)||sy(i)}function eei(i){return i.length===2?Det(i,0):i.length===3?i[0].type==="Identifier"&&Det(i,1):!1}function Det(i,e){let t=i[e],n=i[e+1];return t.type==="ArrowFunctionExpression"&&Xf(t).length===0&&t.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&i.every(o=>!Yt(o))}function tei(i){if(!(i.type==="ObjectExpression"&&i.properties.length===1))return!1;let[e]=i.properties;return kS(e)?!e.computed&&(e.key.type==="Identifier"&&e.key.name==="type"||Hu(e.key)&&e.key.value==="type")&&Hu(e.value)&&e.value.value==="module":!1}function iei(i,e,t){return[t("object"),je(bt([dt,Iit(i,e,t)]))]}function Iit(i,e,t){return["::",t("callee")]}function oei(i){let{node:e,ancestors:t}=i;for(let n of t){if(!(Xs(n)&&n.object===e||n.type==="TSNonNullExpression"&&n.expression===e))return n.type==="NewExpression"&&n.callee===e;e=n}return!1}function rei(i,e,t){let n=t("object"),o=Lit(i,e,t),{node:r}=i,s=i.findAncestor(c=>!(Xs(c)||c.type==="TSNonNullExpression")),a=i.findAncestor(c=>!fI(c)),l=s.type==="BindExpression"||s.type==="AssignmentExpression"&&s.left.type!=="Identifier"||oei(i)||r.computed||r.object.type==="Identifier"&&r.property.type==="Identifier"&&!Xs(a)||(a.type==="AssignmentExpression"||a.type==="VariableDeclarator")&&(nei(IS(r.object))||n.label?.memberChain);return az(n.label,[n,Bb,l?o:je(bt([dt,o]))])}function Lit(i,e,t){let n=t("property"),{node:o}=i,r=Jf(i);return o.computed?!o.property||cy(o.property)?[r,"[",n,"]"]:je([r,"[",bt([dt,n]),dt,"]"]):[r,".",n]}function sei(i,e,t){let n=(i.parent.type==="ChainExpression"?i.grandparent:i.parent).type==="ExpressionStatement",o=[];function r(Z){let{originalText:U}=e,M=YZ(U,tn(Z));return U.charAt(M)===")"?M!==!1&&HZ(U,M+1):dy(Z,e)}function s(){let{node:Z}=i;if(Ms(Z)&&(CF(Z.callee)||Ms(Z.callee))&&!ag(i,e)){let U=r(Z);o.unshift({node:Z,hasTrailingEmptyLine:U,printed:[Yh(i,[Jf(i),t("typeArguments"),z_e(i,e,t)],e),U?gt:""]}),i.call(s,"callee")}else CF(Z)&&!ag(i,e)?(o.unshift({node:Z,printed:Yh(i,Xs(Z)?Lit(i,e,t):Iit(i,e,t),e)}),i.call(s,"object")):Z.type==="ChainExpression"&&!ag(i,e)?i.call(s,"expression"):Z.type==="TSNonNullExpression"&&!ag(i,e)?(o.unshift({node:Z,printed:Yh(i,"!",e)}),i.call(s,"expression")):o.unshift({node:Z,printed:t()})}let{node:a}=i;o.unshift({node:a,printed:[Jf(i),t("typeArguments"),z_e(i,e,t)]}),a.callee&&i.call(s,"callee");let l=[],c=[o[0]],u=1;for(;u0&&l.push(c);function h(Z){return/^[A-Z]|^[$_]+$/.test(Z)}function f(Z){return Z.length<=e.tabWidth}function p(Z){let U=Z[1][0]?.node.computed;if(Z[0].length===1){let ee=Z[0][0].node;return ee.type==="ThisExpression"||ee.type==="Identifier"&&(h(ee.name)||n&&f(ee.name)||U)}let M=Go(0,Z[0],-1).node;return Xs(M)&&M.property.type==="Identifier"&&(h(M.property.name)||U)}let g=l.length>=2&&!Yt(l[1][0].node)&&p(l);function A(Z){return Z.map(U=>U.printed)}function v(Z){return Z.length===0?"":bt([gt,qo(gt,Z.map(A))])}let w=l.map(A),C=w,_=g?3:2,E=l.flat(),I=E.slice(1,-1).some(Z=>Yt(Z.node,li.Leading))||E.slice(0,-1).some(Z=>Yt(Z.node,li.Trailing))||l[_]&&Yt(l[_][0].node,li.Leading);if(l.length<=_&&!I&&l.every(Z=>!Go(0,Z,-1).hasTrailingEmptyLine))return Tit(i)?C:je(C);let T=Go(0,l[g?1:0],-1).node,N=!Ms(T)&&r(T),L=[A(l[0]),g?l.slice(1,2).map(A):"",N?gt:"",v(l.slice(g?2:1))],B=o.map(({node:Z})=>Z).filter(Ms);function z(){let Z=Go(0,Go(0,l,-1),-1).node,U=Go(0,w,-1);return Ms(Z)&&Kf(U)&&B.slice(0,-1).some(M=>M.arguments.some(X7))}let Q;return I||B.length>2&&B.some(Z=>Z.arguments.some(U=>!sy(U)))||w.slice(0,-1).some(Kf)||z()?Q=je(L):Q=[Kf(C)||N?lx:"",lI([C,L])],az({memberChain:!0},Q)}function jZ(i,e,t){let{node:n}=i,o=n.type==="NewExpression",r=Jf(i),s=Vb(n),a=n.type!=="TSImportType"&&n.typeArguments?[t("typeArguments"),Bb]:"",l=s.length===1&&Eit(s[0],e.originalText);if(l||cei(i)||uei(i)||JZ(n,i.parent)){let d=[];if(I_e(i,()=>{d.push(t())}),!(l&&d[0].label?.embed))return[Tet(i,t),r,a,"(",qo(", ",d),")"]}let c=n.type==="ImportExpression"||n.type==="TSImportType"||n.type==="TSExternalModuleReference";if(!c&&!o&&CF(n.callee)&&!i.call(()=>ag(i,e),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return aei(i,e,t);let u=[Tet(i,t),r,a,z_e(i,e,t)];return c||Ms(n.callee)?je(u):u}function Tet(i,e){let{node:t}=i;return t.type==="ImportExpression"?`import${t.phase?`.${t.phase}`:""}`:t.type==="TSImportType"?"import":t.type==="TSExternalModuleReference"?"require":[t.type==="NewExpression"?"new ":"",e("callee"),Bb]}function cei(i){let{node:e}=i;if(!(e.type==="ImportExpression"||e.type==="TSImportType"||e.type==="TSExternalModuleReference"||e.type==="CallExpression"&&!e.optional&&mSe(e.callee,lei)))return!1;let t=Vb(e);return t.length===1&&Hu(t[0])&&!Yt(t[0])}function uei(i){let{node:e}=i;if(e.type!=="CallExpression"||e.optional||e.callee.type!=="Identifier")return!1;let t=Vb(e);return e.callee.name==="require"?(t.length===1&&Hu(t[0])||t.length>1)&&!Yt(t[0]):e.callee.name==="define"&&i.parent.type==="ExpressionStatement"?t.length===1||t.length===2&&t[0].type==="ArrayExpression"||t.length===3&&Hu(t[0])&&t[1].type==="ArrayExpression":!1}function uz(i,e,t,n,o,r){let s=fei(i,e,t,n,r),a=r?t(r,{assignmentLayout:s}):"";switch(s){case"break-after-operator":return je([je(n),o,je(bt([ti,a]))]);case"never-break-after-operator":return je([je(n),o," ",a]);case"fluid":{let l=Symbol("assignment");return je([je(n),o,je(bt(ti),{id:l}),Bb,ez(a,{groupId:l})])}case"break-lhs":return je([n,o," ",je(a)]);case"chain":return[je(n),o,ti,a];case"chain-tail":return[je(n),o,bt([ti,a])];case"chain-tail-arrow-chain":return[je(n),o,a];case"only-left":return n}}function dei(i,e,t){let{node:n}=i;return uz(i,e,t,t("left"),[" ",n.operator],"right")}function hei(i,e,t){return uz(i,e,t,t("id")," =","init")}function fei(i,e,t,n,o){let{node:r}=i,s=r[o];if(!s)return"only-left";let a=!PZ(s);if(i.match(PZ,Nit,u=>!a||u.type!=="ExpressionStatement"&&u.type!=="VariableDeclaration"))return a?s.type==="ArrowFunctionExpression"&&s.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&PZ(s.right)||ug(s)&&!e$(s)||rx(e.originalText,s)||Yt(s,li.Leading,bit))return"break-after-operator";if(r.type==="ImportAttribute"||s.type==="CallExpression"&&s.callee.name==="require"||i.root.type==="JsonRoot")return"never-break-after-operator";let l=GJt(n);if(mei(r)||Aei(r)||Mit(r)&&l)return"break-lhs";let c=vei(r,n,e);return i.call(()=>pei(i,e,t,c),o)?"break-after-operator":gei(r)?"break-lhs":!l&&(c||s.type==="TemplateLiteral"||s.type==="TaggedTemplateExpression"||$Yt(s)||cy(s)||s.type==="ClassExpression")?"never-break-after-operator":"fluid"}function pei(i,e,t,n){let o=i.node;if(sx(o)&&!oz(o))return!0;switch(o.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!e.experimentalTernaries&&!wei(o))break;return!0;case"ConditionalExpression":{if(!e.experimentalTernaries){let{test:c}=o;return sx(c)&&!oz(c)}let{consequent:a,alternate:l}=o;return a.type==="ConditionalExpression"||l.type==="ConditionalExpression"}case"ClassExpression":return Zs(o.decorators)}if(n)return!1;let r=o,s=[];for(;;)if(r.type==="UnaryExpression"||r.type==="AwaitExpression"||r.type==="YieldExpression"&&r.argument!==null)r=r.argument,s.push("argument");else if(r.type==="TSNonNullExpression")r=r.expression,s.push("expression");else break;return!!(Hu(r)||i.call(()=>Rit(i,e,t),...s))}function mei(i){if(Nit(i)){let e=i.left||i.id;return e.type==="ObjectPattern"&&e.properties.length>2&&e.properties.some(t=>kS(t)&&(!t.shorthand||t.value?.type==="AssignmentPattern"))}return!1}function PZ(i){return i.type==="AssignmentExpression"}function Nit(i){return PZ(i)||i.type==="VariableDeclarator"}function gei(i){let e=bei(i);if(Zs(e)){let t=i.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(e.length>1&&e.some(n=>n[t]||n.default))return!0}return!1}function bei(i){if(Yet(i))return i.typeParameters?.params}function Aei(i){if(i.type!=="VariableDeclarator")return!1;let{typeAnnotation:e}=i.id;if(!e||!e.typeAnnotation)return!1;let t=ket(e.typeAnnotation);return Zs(t)&&t.length>1&&t.some(n=>Zs(ket(n))||n.type==="TSConditionalType")}function Mit(i){return i.type==="VariableDeclarator"&&i.init?.type==="ArrowFunctionExpression"}function ket(i){let e;switch(i.type){case"GenericTypeAnnotation":e=i.typeParameters;break;case"TSTypeReference":e=i.typeArguments;break}return e?.params}function Rit(i,e,t,n=!1){let{node:o}=i,r=()=>Rit(i,e,t,!0);if(fI(o))return i.call(r,"expression");if(Ms(o)){if(jZ(i,e,t).label?.memberChain)return!1;let s=Vb(o);return!(s.length===0||s.length===1&&DSe(s[0],e))||yei(o,t)?!1:i.call(r,"callee")}return Xs(o)?i.call(r,"object"):n&&(o.type==="Identifier"||o.type==="ThisExpression")}function vei(i,e,t){return kS(i)?(e=dSe(e),typeof e=="string"&&TF(e)1)return!0;if(t.length===1){let n=t[0];if(ug(n)||rz(n)||n.type==="TSTypeLiteral"||n.type==="ObjectTypeAnnotation")return!0}if(Kf(e("typeArguments")))return!0}return!1}function Iet(i){switch(i.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!i.typeParameters;case"TSTypeReference":return!!i.typeArguments;default:return!1}}function wei(i){return Iet(i.checkType)||Iet(i.extendsType)}function xei(i,e,t){let{node:n}=i,o=["await"];if(n.argument){o.push(" ",t("argument"));let{parent:r}=i;if(Ms(r)&&r.callee===n||Xs(r)&&r.object===n){o=[bt([dt,...o]),dt];let s=i.findAncestor(a=>a.type==="AwaitExpression"||a.type==="BlockStatement");if(s?.type!=="AwaitExpression"||!Yf(s.argument,a=>a===n))return je(o)}}return o}function V_e(i,e,t,n){let{node:o}=i,r=[],s=Sei(0,o[n],a=>a.type!=="EmptyStatement");return i.each(({node:a})=>{a.type!=="EmptyStatement"&&(r.push(t()),a!==s&&(r.push(gt),dy(a,e)&&r.push(gt)))},n),r}function Fit(i,e,t){let n=Eei(i,e,t),{node:o,parent:r}=i;if(o.type==="Program"&&r?.type!=="ModuleExpression")return n?[n,gt]:"";let s=[];if(o.type==="StaticBlock"&&s.push("static "),s.push("{"),n)s.push(bt([gt,n]),gt);else{let a=i.grandparent;r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression"||r.type==="FunctionDeclaration"||r.type==="ComponentDeclaration"||r.type==="HookDeclaration"||r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="ForStatement"||r.type==="WhileStatement"||r.type==="DoWhileStatement"||r.type==="DoExpression"||r.type==="ModuleExpression"||r.type==="CatchClause"&&!a.finalizer||r.type==="TSModuleDeclaration"||r.type==="DeclareModule"||r.type==="MatchStatementCase"||o.type==="StaticBlock"||s.push(gt)}return s.push("}"),s}function Eei(i,e,t){let{node:n}=i,o=Zs(n.directives),r=n.body.some(l=>l.type!=="EmptyStatement"),s=Yt(n,li.Dangling);if(!o&&!r&&!s)return"";let a=[];return o&&(a.push(V_e(i,e,t,"directives")),(r||s)&&(a.push(gt),dy(Go(0,n.directives,-1),e)&&a.push(gt))),r&&a.push(V_e(i,e,t,"body")),s&&a.push(eu(i,e)),a}function Dei(i){let e=new WeakMap;return t=>zb(e,t,()=>Symbol(i))}function kei(i,e){let{node:t}=i;if(t.type==="ClassBody"||t.type==="TSInterfaceBody"){i.each(e,"body");return}if(t.type==="TSTypeLiteral"){i.each(e,"members");return}if(t.type==="RecordDeclarationBody"){i.each(e,"elements");return}if(t.type==="ObjectTypeAnnotation"){let n=Oit.flatMap(o=>i.map(({node:r,index:s})=>({node:r,loc:yn(r),selector:[o,s]}),o)).sort((o,r)=>o.loc-r.loc);for(let[o,{node:r,selector:s}]of n.entries())i.call(()=>e({node:r,next:n[o+1]?.node,isLast:o===n.length-1}),...s)}}function Iei(i){if(i.type==="ObjectTypeAnnotation")return Oit.some(t=>Zs(i[t]));let e=i.type==="RecordDeclarationBody"?i.elements:i.body;return Zs(e)}function TSe(i,e,t){let{node:n}=i,o=[],r=n.type==="ObjectTypeAnnotation",s=n.type==="RecordDeclarationBody",a=!Pit(i),l=a?ti:gt,c=Yt(n,li.Dangling),[u,d]=r&&n.exact?["{|","|}"]:"{}",h=!0,f;if(kei(i,({node:p,next:g,isLast:A})=>{if(f??(f=p),h&&(h=!1),o.push(t()),!s&&a&&r){let{parent:v}=i;v.inexact||!A?o.push(","):o.push(RS(e))}s&&p.type!=="MethodDefinition"&&o.push(","),!s&&!a&&(Lei({node:p,next:g},e)||zit({node:p,next:g},e))&&o.push(";"),A||(o.push(l),dy(p,e)&&o.push(gt))}),c&&o.push(eu(i,e)),n.type==="ObjectTypeAnnotation"&&n.inexact){h&&(h=!1);let p;Yt(n,li.Dangling)?p=[Yt(n,li.Line)||Vu(e.originalText,tn(Go(0,cg(n),-1)))?gt:ti,"..."]:p=[f?ti:"","..."],o.push(p)}if(a){let p=Yt(n,li.Dangling|li.Line)||e.objectWrap==="preserve"&&f&&Xp(e.originalText,yn(n),yn(f)),g;if(o.length===0)g=u+d;else{let A=!e.bracketSpacing||h&&!p?dt:ti;g=[u,bt([A,...o]),A,d]}return i.match(void 0,(A,v)=>v==="typeAnnotation",(A,v)=>v==="typeAnnotation",K7)||i.match(void 0,(A,v)=>A.type==="FunctionTypeParam"&&v==="typeAnnotation",K7)?g:je(g,{shouldBreak:p})}return[u,o.length>0?[bt([gt,o]),gt]:"",d]}function Pit(i){let{node:e}=i;if(e.type==="ObjectTypeAnnotation"){let{key:t,parent:n}=i;return t==="body"&&(n.type==="InterfaceDeclaration"||n.type==="DeclareInterface"||n.type==="DeclareClass")}return e.type==="ClassBody"||e.type==="TSInterfaceBody"||e.type==="RecordDeclarationBody"}function ox(i,e){let{parent:t}=i;return i.callParent(Pit)?t.type==="ObjectTypeAnnotation"?";":vl(e):t.type==="TSTypeLiteral"?i.isLast?e.semi?Co(";"):"":e.semi||zit({node:i.node,next:i.next},e)?";":Co("",";"):""}function Lei({node:i,next:e},t){if(t.semi||!Let(i))return!1;if(!i.value&&Bit(i))return!0;if(!e||e.static||e.accessibility||e.readonly)return!1;if(!e.computed){let n=e.key?.name;if(n==="in"||n==="instanceof")return!0}if(Let(e)&&!e.static&&e.variance&&!e.declare)return!0;switch(e.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return e.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((e.value?e.value.async:e.async)||e.kind==="get"||e.kind==="set")return!1;let n=e.value?e.value.generator:e.generator;return!!(e.computed||n)}case"TSIndexSignature":return!0}return!1}function zit({node:i,next:e},t){return t.semi||!Nei(i)?!1:Bit(i)?!0:e&&e.type==="TSCallSignatureDeclaration"?!(i.type==="TSPropertySignature"&&i.typeAnnotation):!1}function kSe(i,e,t){let n=Fei(i,e,t),{node:o}=i;if(o.type==="ClassExpression"&&Zs(o.decorators)){let r=yit(i,e,t);return ag(i,e)?[bt([dt,r,n]),dt]:[r,n]}return n}function Fei(i,e,t){let{node:n}=i,o=Rei(n),r=n.type==="RecordDeclaration",s=o?"interface":r?"record":"class",a=[hg(i),XZ(i),s],l=Hit(i),c=[],u=[];if(n.type!=="InterfaceTypeAnnotation"){n.id&&c.push(" ");for(let h of["id","typeParameters"])if(n[h]){let{leading:f,trailing:p}=i.call(()=>Ptt(i,e),h);c.push(f,t(h),bt(p))}}if(n.superClass){let h=[Bei(i,e,t),t("superTypeArguments")],f=i.call(()=>["extends ",Yh(i,h,e)],"superClass");l?u.push(ti,je(f)):u.push(" ",f)}else u.push(__e(i,e,t,"extends"));u.push(__e(i,e,t,"mixins"),__e(i,e,t,"implements"));let d;return l?(d=Mei(n),a.push(je([...c,bt(u)],{id:d}))):a.push(...c,...u),!o&&l&&Iei(n.body)?a.push(Co(gt," ",{groupId:d})):a.push(" "),a.push(t("body")),a}function Vit(i){let e=i.superClass?1:0;for(let t of["extends","mixins","implements"])if(Array.isArray(i[t])&&(e+=i[t].length),e>1)return!0;return e>1}function Oei(i){let{node:e}=i;if(Yt(e.id,li.Trailing)||Yt(e.typeParameters,li.Trailing)||Yt(e.superClass)||Vit(e))return!0;if(e.superClass)return i.parent.type==="AssignmentExpression"?!1:!e.superTypeArguments&&Xs(IS(e.superClass));let t=e.extends?.[0]??e.mixins?.[0]??e.implements?.[0];return t?t.type==="InterfaceExtends"&&t.id.type==="QualifiedTypeIdentifier"&&!t.typeParameters||(t.type==="TSClassImplements"||t.type==="TSInterfaceHeritage")&&Xs(t.expression)&&!t.typeArguments:!1}function Hit(i){return zb(Pei,i.node,()=>Oei(i))}function __e(i,e,t,n){let{node:o}=i;if(!Zs(o[n]))return"";let r=eu(i,e,{marker:n}),s=qo([",",ti],i.map(t,n));if(!Vit(o)){let a=[`${n} `,r,s];return Hit(i)?[ti,je(a)]:[" ",a]}return[ti,r,r&>,n,je(bt([ti,s]))]}function Bei(i,e,t){let n=t("superClass"),{parent:o}=i;return o.type==="AssignmentExpression"?je(Co(["(",bt([dt,n]),dt,")"],n)):n}function Wit(i,e,t){let{node:n}=i,o=[];return Zs(n.decorators)&&o.push(vit(i,e,t)),o.push(ZZ(n)),n.static&&o.push("static "),o.push(XZ(i)),n.override&&o.push("override "),o.push(O_e(i,e,t)),o}function Uit(i,e,t){let{node:n}=i,o=[];Zs(n.decorators)&&o.push(vit(i,e,t)),o.push(hg(i),ZZ(n)),n.static&&o.push("static "),o.push(XZ(i)),n.override&&o.push("override "),n.readonly&&o.push("readonly "),n.variance&&o.push(t("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&o.push("accessor "),o.push(DS(i,e,t),Jf(i),ztt(i),ih(i,t));let r=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[uz(i,e,t,o," =",r?void 0:"value"),vl(e)]}function zei(i,e){let t=cg(i,li.Leading);if(t.length===0)return!1;let[n]=t,o=e.originalText,r=yn(n);return Xp(o,r,tn(n))||Vu(o,r,{backwards:!0})}function MF(i,e,t,n="body"){return i.call(({node:o})=>{let r=t();if(o.type==="EmptyStatement")return Yt(o,li.Leading)?[" ",r]:r;let s=o.type==="BlockStatement";return zei(o,e)?s?[gt,r]:bt([gt,r]):s||o.type==="IfStatement"&&i.parent.type==="IfStatement"&&i.key==="alternate"?[" ",r]:bt([ti,r])},n)}function Wei(i,e,t){return[je(["do",MF(i,e,t)]),i.node.body.type==="BlockStatement"?" ":gt,"while (",vSe(i,e,t),")",vl(e)]}function jit(i){return Uei(i)?jit(i.expression):i}function Qei(i){return i.type==="MemberExpression"||i.type==="OptionalMemberExpression"||i.type==="Identifier"&&i.name!=="undefined"}function Gei(i,e){if(rit(i,e)){let t=jit(i.node.expression);return jei(t)||Qei(t)}return!(!e.semi||nit(i,e)||oit(i,e))}function qei(i,e,t){let n=[t("expression")];if(CSe(i,e)){if(sit(i,e)){let{node:o}=i,r=Go(0,cg(o,li.Leading),-1),s=ASe(i,e,{filter:a=>a===r});return Yh(i,[";",s,...n],e,{filter:a=>a!==r})}n.unshift(";")}else Gei(i,e)&&n.push(";");return n}function Yei(i,e,t){let{node:n}=i,o=MF(i,e,t),r=eu(i,e),s=r?[r,dt]:"";return!n.init&&!n.test&&!n.update?[s,je(["for (;;)",o])]:[s,je(["for (",je([bt([dt,t("init"),";",ti,t("test"),";",n.update?[ti,t("update")]:""]),dt]),")",o])]}function Kei(i,e,t){let{node:n}=i,o=n.type==="ForOfStatement";return je(["for",o&&n.await?" await":""," (",t("left")," ",o?"of":"in"," ",t("right"),")",MF(i,e,t)])}function Jei(i,e,t){if(e.__isVueBindings||e.__isVueForBindingLeft){let n=i.map(t,"program","body",0,"params");if(n.length===1)return n[0];let o=qo([",",ti],n);return e.__isVueForBindingLeft?["(",bt([dt,je(o)]),dt,")"]:o}if(e.__isEmbeddedTypescriptGenericParameters){let n=i.map(t,"program","body",0,"typeParameters","params");return qo([",",ti],n)}}function Qit(i){return TS(Go(0,cg(i,li.Dangling),-1))}function Zei(i,e,t){let{node:n}=i,o=je(["if (",vSe(i,e,t),")",Vei(i,e,t)]);if(!n.alternate)return o;let{consequent:r}=n,s=r.type==="BlockStatement",a=[o],l=s;s||(a.push(gt),l=!1);let c=cg(n,li.Dangling);if(c.length>0){let[u]=c;Xei(u,e)?a.push(s?[gt,gt]:gt):Vu(e.originalText,yn(u),{backwards:!0})?a.push(s?gt:""):a.push(" "),a.push(eu(i,e),Qit(n)||Vu(e.originalText,tn(Go(0,c,-1)))?gt:" "),l=!1}return a.push(l?" ":"","else",je(Hei(i,e,t))),a}function $ei(i,e){let{node:t}=i;switch(t.type){case"RegExpLiteral":return Net(t);case"BigIntLiteral":return H_e(t.extra.raw);case"NumericLiteral":return tz(t.extra.raw);case"StringLiteral":return uI(dI(t.extra.raw,e));case"NullLiteral":return"null";case"BooleanLiteral":return String(t.value);case"DirectiveLiteral":return Met(t.extra.raw,e);case"Literal":{if(t.regex)return Net(t.regex);if(t.bigint)return H_e(t.raw);let{value:n}=t;return typeof n=="number"?tz(t.raw):typeof n=="string"?eti(i)?Met(t.raw,e):uI(dI(t.raw,e)):String(n)}}}function eti(i){if(i.key!=="expression")return;let{parent:e}=i;return e.type==="ExpressionStatement"&&typeof e.directive=="string"}function H_e(i){return i.toLowerCase()}function Net({pattern:i,flags:e}){return e=[...e].sort().join(""),`/${i}/${e}`}function Met(i,e){let t=i.slice(1,-1);if(t===tti||!(t.includes('"')||t.includes("'"))){let n=e.singleQuote?"'":'"';return n+t+n}return i}function RF(i,e,t){let{node:n,parent:o}=i,r=iti(n),s=n.type==="TSEnumBody"||r,a=Git(n),l=r&&n.hasUnknownMembers,c=s?"members":a?"attributes":"properties",u=n[c],d=s||n.type==="ObjectPattern"&&o.type!=="FunctionDeclaration"&&o.type!=="FunctionExpression"&&o.type!=="ArrowFunctionExpression"&&o.type!=="ObjectMethod"&&o.type!=="ClassMethod"&&o.type!=="ClassPrivateMethod"&&o.type!=="AssignmentPattern"&&o.type!=="CatchClause"&&n.properties.some(A=>A.value&&(A.value.type==="ObjectPattern"||A.value.type==="ArrayPattern"))||n.type!=="ObjectPattern"&&e.objectWrap==="preserve"&&u.length>0&&nti(n,u[0],e),h=[],f=i.map(({node:A})=>{let v=[...h,t()];return h=[",",ti],dy(A,e)&&h.push(gt),v},c);if(l){let A;if(Yt(n,li.Dangling)){let v=Yt(n,li.Line);A=[eu(i,e),v||Vu(e.originalText,tn(Go(0,cg(n),-1)))?gt:ti,"..."]}else A=["..."];f.push([...h,...A])}let p=!(l||Go(0,u,-1)?.type==="RestElement"),g;if(f.length===0)g=je(["{",$Z(i,e),"}",Jf(i),ih(i,t)]);else{let A=e.bracketSpacing?ti:dt;g=["{",bt([A,...f]),p?RS(e):"",A,"}",Jf(i),ih(i,t)]}return i.match(A=>A.type==="ObjectPattern"&&!Zs(A.decorators),K7)||ES(n)&&(i.match(void 0,(A,v)=>v==="typeAnnotation",(A,v)=>v==="typeAnnotation",K7)||i.match(void 0,(A,v)=>A.type==="FunctionTypeParam"&&v==="typeAnnotation",K7))||!d&&i.match(A=>A.type==="ObjectPattern",A=>A.type==="AssignmentExpression"||A.type==="VariableDeclarator")?g:je(g,{shouldBreak:d})}function nti(i,e,t){let n=t.originalText,o=yn(e),r=yn(i);return Git(i)&&(r=Hb(t).lastIndexOf("{",o)),Xp(n,r,o)}function oti(i,e,t){let{node:n}=i;return["import",n.phase?` ${n.phase}`:"",Kit(n),Xit(i,e,t),Jit(i,e,t),$it(i,e,t),vl(e)]}function Yit(i,e,t){let{node:n}=i,o=[P$t(i,e,t),hg(i),"export",qit(n)?" default":""],{declaration:r,exported:s}=n;return Yt(n,li.Dangling)&&(o.push(" ",eu(i,e)),Qit(n)&&o.push(gt)),r?o.push(" ",t("declaration")):(o.push(ati(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(o.push(" *"),s&&o.push(" as ",t("exported"))):o.push(Xit(i,e,t)),o.push(Jit(i,e,t),$it(i,e,t))),o.push(sti(n,e)),o}function sti(i,e){return!i.declaration||qit(i)&&!rti(i.declaration)?vl(e):""}function ISe(i,e=!0){return i&&i!=="value"?`${e?" ":""}${i}${e?"":" "}`:""}function Kit(i,e){return ISe(i.importKind,e)}function ati(i){return ISe(i.exportKind)}function Jit(i,e,t){let{node:n}=i;return n.source?[Zit(n,e)?" from":""," ",t("source")]:""}function Xit(i,e,t){let{node:n}=i;if(!Zit(n,e))return"";let o=[" "];if(Zs(n.specifiers)){let r=[],s=[];i.each(()=>{let a=i.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")r.push(t());else if(a==="ExportSpecifier"||a==="ImportSpecifier")s.push(t());else throw new NF(n,"specifier")},"specifiers"),o.push(qo(", ",r)),s.length>0&&(r.length>0&&o.push(", "),s.length>1||r.length>0||n.specifiers.some(a=>Yt(a))?o.push(je(["{",bt([e.bracketSpacing?ti:dt,qo([",",ti],s)]),RS(e),e.bracketSpacing?ti:dt,"}"])):o.push(["{",e.bracketSpacing?" ":"",...s,e.bracketSpacing?" ":"","}"]))}else o.push("{}");return o}function Zit(i,e){return i.type!=="ImportDeclaration"||Zs(i.specifiers)||i.importKind==="type"?!0:Hb(e).slice(yn(i),yn(i.source)).trimEnd().endsWith("from")}function lti(i,e){let t=Hb(e).slice(tn(i.source),i.attributes?.[0]?yn(i.attributes[0]):tn(i)).trimStart();return t.startsWith("assert")?"assert":t.startsWith("with")||Zs(i.attributes)?"with":void 0}function $it(i,e,t){let{node:n}=i;if(!n.source)return"";let o=lti(n,e);if(!o)return"";let r=RF(i,e,t);return cti(n)&&(r=zZ(r)),[` ${o} `,r]}function uti(i,e,t){let{node:n}=i,{type:o}=n,r=o.startsWith("Import"),s=r?"imported":"local",a=r?"local":"exported",l=n[s],c=n[a],u="",d="";return o==="ExportNamespaceSpecifier"||o==="ImportNamespaceSpecifier"?u="*":l&&(u=t(s)),c&&!k_e(n)&&(d=t(a)),[ISe(o==="ImportSpecifier"?n.importKind:n.exportKind,!1),u,u&&d?" as ":"",d]}function S_e(i,e,t){let{node:n}=i;return n.shorthand?t("value"):uz(i,e,t,DS(i,e,t),":","value")}function W_e(i,e){return["...",e("argument"),ih(i,e)]}function dti(i,e,t){let{node:n}=i,o=t();return btt(n,e)?["(",bt([gt,o]),gt,")"]:sx(n)||e.experimentalTernaries&&n.type==="ConditionalExpression"&&(n.consequent.type==="ConditionalExpression"||n.alternate.type==="ConditionalExpression")?je([Co("("),bt([dt,o]),dt,Co(")")]):o}function Ret(i,e,t){let{node:n}=i;return[n.type==="ThrowStatement"?"throw":"return",n.argument?[" ",i.call(()=>dti(i,e,t),"argument")]:"",vl(e)]}function hti(i,e){let{key:t,parent:n}=i;return!!(t==="argument"&&_F(n)&&ag(i,e)||t==="body"&&n.type==="ArrowFunctionExpression")}function fti(i,e,t){let{parent:n}=i;if(n.type==="ExpressionStatement"||n.type==="ForStatement"){let r=[];return i.each(({isFirst:s})=>{s?r.push(t()):r.push(",",bt([ti,t()]))},"expressions"),je(r)}let o=qo([",",ti],i.map(t,"expressions"));return hti(i,e)?je(Co([bt([dt,o]),dt],o)):je(o)}function pti(i,e,t){return[je(["switch (",bt([dt,t("discriminant")]),dt,")"])," {",i.node.cases.length>0?bt([gt,qo(gt,i.map(({node:n,isLast:o})=>[t(),!o&&dy(n,e)?gt:""],"cases"))]):eu(i,e,{indent:!0}),gt,"}"]}function mti(i,e,t){let{node:n}=i,o=[];n.test?o.push("case ",t("test"),":"):o.push("default:"),Yt(n,li.Dangling)&&o.push(" ",eu(i,e));let r=n.consequent.filter(s=>s.type!=="EmptyStatement");if(r.length>0){let s=V_e(i,e,t,"consequent");o.push(r.length===1&&r[0].type==="BlockStatement"?[" ",s]:bt([gt,s]))}return o}function ent(i,e){let t=0;for(let n in i){let o=i[n];if(ftt(o)&&typeof o.type=="string"&&(t++,t+=ent(o,e-t)),t>e)return t}return t}function Fet(i,e=5){return ent(i,e)<=e}function gti(i){let e=[i];for(let t=0;th[N]===n),p=h.type===n.type&&!f,g,A,v=0;do A=g||n,g=i.getParentNode(v),v++;while(g&&g.type===n.type&&a.every(N=>g[N]!==A));let w=g||h,C=A;if(o&&(md(n[a[0]])||md(l)||md(c)||gti(C))){d=!0,p=!0;let N=B=>[Co("("),bt([dt,B]),dt,Co(")")],L=B=>B.type==="NullLiteral"||B.type==="Literal"&&B.value===null||B.type==="Identifier"&&B.name==="undefined";u.push(" ? ",L(l)?t(r):N(t(r))," : ",c.type===n.type||L(c)?t(s):N(t(s)))}else{let N=B=>e.useTabs?bt(t(B)):dg(2,t(B)),L=[ti,"? ",l.type===n.type?Co("","("):"",N(r),l.type===n.type?Co("",")"):"",ti,": ",N(s)];u.push(h.type!==n.type||h[s]===n||f?L:e.useTabs?_tt(bt(L)):dg(Math.max(0,e.tabWidth-2),L))}let _=N=>h===w?je(N):N,E=!d&&(Xs(h)||h.type==="NGPipeExpression"&&h.left===n)&&!h.computed,I=vti(i),T=_([bti(i,e,t),p?u:bt(u),o&&E&&!I?dt:""]);return f||I?je([bt([dt,T]),dt]):T}function wti(i,e){return(Xs(e)||e.type==="NGPipeExpression"&&e.left===i)&&!e.computed}function xti(i,e,t,n){return[...i.map(o=>cg(o)),cg(e),cg(t)].flat().some(o=>yA(o)&&Xp(n.originalText,yn(o),tn(o)))}function _ti(i){let{node:e}=i;if(e.type!=="ConditionalExpression")return!1;let t,n=e;for(let o=0;!t;o++){let r=i.getParentNode(o);if(fI(r)&&r.expression===n||Ms(r)&&r.callee===n||Xs(r)&&r.object===n){n=r;continue}r.type==="NewExpression"&&r.callee===n||AA(r)&&r.expression===n?(t=i.getParentNode(o+1),n=r):t=r}return n===e?!1:t[Cti.get(t.type)]===n}function LSe(i,e,t,n){if(!e.experimentalTernaries)return yti(i,e,t);let{node:o}=i,r=o.type==="ConditionalExpression",s=SS(o),a=r?"consequent":"trueType",l=r?"alternate":"falseType",c=r?["test"]:["checkType","extendsType"],u=o[a],d=o[l],h=c.map(Kt=>o[Kt]),{parent:f}=i,p=f.type===o.type,g=p&&c.some(Kt=>f[Kt]===o),A=p&&f[l]===o,v=u.type===o.type,w=d.type===o.type,C=w||A,_=e.tabWidth>2||e.useTabs,E,I,T=0;do I=E||o,E=i.getParentNode(T),T++;while(E&&E.type===o.type&&c.every(Kt=>E[Kt]!==I));let N=E||f,L=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),B=_F(f)&&!(v||w),z=r&&N.type==="JSXExpressionContainer"&&i.grandparent.type!=="JSXAttribute",Q=_ti(i),Z=wti(o,f),U=s&&ag(i,e),M=_?e.useTabs?" ":" ".repeat(e.tabWidth-1):"",ee=xti(h,u,d,e)||v||w,X=!C&&!p&&!s&&(z?u.type==="NullLiteral"||u.type==="Literal"&&u.value===null:DSe(u,e)&&Fet(o.test,3)),Y=C||A||s&&!p||p&&r&&Fet(o.test,1)||X,$=[];Yt(o.test,li.Dangling)&&i.call(()=>{$.push(eu(i,e))},"test"),Yt(o,li.Dangling)&&$.push(eu(i,e));let re=Symbol("test"),ue=Symbol("consequent"),Ie=Symbol("test-and-consequent"),nt=r?[E_e(t("test")),o.test.type==="ConditionalExpression"?lx:""]:[t("checkType")," ","extends"," ",SS(o.extendsType)||o.extendsType.type==="TSMappedType"?t("extendsType"):je(E_e(t("extendsType")))],mt=je([nt," ?"],{id:re}),xt=t(a),wt=bt([v||z&&(md(u)||p||C)?gt:ti,xt]),Ht=Y?je([mt,C?wt:Co(wt,je(wt,{id:ue}),{groupId:re})],{id:Ie}):[mt,wt],Fe=t(l),zt=X?Co(Fe,_tt(E_e(Fe)),{groupId:Ie}):Fe,Fi=[Ht,$.length>0?[bt([gt,$]),gt]:w?gt:X?Co(ti," ",{groupId:Ie}):ti,":",w||!_?" ":Y?Co(M,Co(C||X?" ":M," "),{groupId:Ie}):Co(M," "),w?zt:je([bt(zt),z&&!X?dt:""]),Z&&!Q?dt:"",ee?lx:""];return L&&!ee?je(bt([dt,je(Fi)])):L||B?je(bt(Fi)):Q||s&&g?je([bt([dt,Fi]),U?dt:""]):f===N?je(Fi):Fi}function Sti(i,e,t){let{node:n}=i;return["try ",t("block"),n.handler?[" ",t("handler")]:"",n.finalizer?[" finally ",t("finalizer")]:""]}function Eti(i,e,t){let{node:n}=i;if(n.param){let o=Yt(n.param,s=>!yA(s)||s.leading&&Vu(e.originalText,tn(s))||s.trailing&&Vu(e.originalText,yn(s),{backwards:!0})),r=t("param");return["catch ",o?["(",bt([dt,r]),dt,") "]:["(",r,") "],t("body")]}return["catch ",t("body")]}function tnt(i,e,t){let{node:n}=i,o=i.map(t,"declarations"),r=i.key==="init"&&i.parent.type==="ForStatement"||i.key==="left"&&(i.parent.type==="ForInStatement"||i.parent.type==="ForOfStatement"),s=n.declarations.some(l=>l.init),a;return o.length===1&&!Yt(n.declarations[0])?a=o[0]:a=bt(o[0]),je([hg(i),n.kind,a?[" ",a]:"",bt(o.slice(1).map(l=>[",",s&&!r?gt:ti,l])),r?"":vl(e)])}function Dti(i,e,t){let{node:n}=i,o=n.type==="WithStatement"?"with":"while";return je([o," (",vSe(i,e,t),")",MF(i,e,t)])}function Tti(i,e,t,n){let{node:o}=i;if(Y_e(o))return $ei(i,e);switch(o.type){case"JsExpressionRoot":return t("node");case"JsonRoot":return[eu(i,e),t("node"),gt];case"File":return Jei(i,e,t)??t("program");case"ExpressionStatement":return qei(i,e,t);case"ChainExpression":return t("expression");case"ParenthesizedExpression":return!Yt(o.expression)&&(vA(o.expression)||nh(o.expression))?["(",t("expression"),")"]:je(["(",bt([dt,t("expression")]),dt,")"]);case"AssignmentExpression":return dei(i,e,t);case"VariableDeclarator":return hei(i,e,t);case"BinaryExpression":case"LogicalExpression":return Ait(i,e,t);case"AssignmentPattern":return[t("left")," = ",t("right")];case"OptionalMemberExpression":case"MemberExpression":return rei(i,e,t);case"MetaProperty":return[t("meta"),".",t("property")];case"BindExpression":return iei(i,e,t);case"Identifier":return[o.name,Jf(i),ztt(i),ih(i,t)];case"V8IntrinsicIdentifier":return["%",o.name];case"SpreadElement":return W_e(i,t);case"RestElement":return W_e(i,t);case"FunctionDeclaration":case"FunctionExpression":return ySe(i,e,t,n);case"ArrowFunctionExpression":return W$t(i,e,t,n);case"YieldExpression":return[`yield${o.delegate?"*":""}`,o.argument?[" ",t("argument")]:""];case"AwaitExpression":return xei(i,e,t);case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Yit(i,e,t);case"ImportDeclaration":return oti(i,e,t);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return uti(i,e,t);case"ImportAttribute":return S_e(i,e,t);case"Program":case"BlockStatement":case"StaticBlock":return Fit(i,e,t);case"ClassBody":return TSe(i,e,t);case"ThrowStatement":return Ret(i,e,t);case"ReturnStatement":return Ret(i,e,t);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return jZ(i,e,t);case"ObjectExpression":case"ObjectPattern":return RF(i,e,t);case"Property":return kF(o)?O_e(i,e,t):S_e(i,e,t);case"ObjectProperty":return S_e(i,e,t);case"ObjectMethod":return O_e(i,e,t);case"Decorator":return["@",t("expression")];case"ArrayExpression":case"ArrayPattern":return ESe(i,e,t);case"SequenceExpression":return fti(i,e,t);case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[t("value"),vl(e)];case"UnaryExpression":{let r=[o.operator];/[a-z]$/.test(o.operator)&&r.push(" ");let s=t("argument");return Yt(o.argument)?r.push(je(["(",bt([dt,s]),dt,")"])):r.push(s),r}case"UpdateExpression":return[o.prefix?o.operator:"",t("argument"),o.prefix?"":o.operator];case"ConditionalExpression":return LSe(i,e,t,n);case"VariableDeclaration":return tnt(i,e,t);case"IfStatement":return Zei(i,e,t);case"ForStatement":return Yei(i,e,t);case"WithStatement":case"WhileStatement":return Dti(i,e,t);case"DoWhileStatement":return Wei(i,e,t);case"ForInStatement":case"ForOfStatement":return Kei(i,e,t);case"DoExpression":return[o.async?"async ":"","do ",t("body")];case"BreakStatement":case"ContinueStatement":return[o.type==="BreakStatement"?"break":"continue",o.label?[" ",t("label")]:"",vl(e)];case"LabeledStatement":return[t("label"),`:${o.body.type==="EmptyStatement"&&!Yt(o.body,li.Leading)?"":" "}`,t("body")];case"TryStatement":return Sti(i,e,t);case"CatchClause":return Eti(i,e,t);case"SwitchStatement":return pti(i,e,t);case"SwitchCase":return mti(i,e,t);case"DebuggerStatement":return["debugger",vl(e)];case"ClassDeclaration":case"ClassExpression":return kSe(i,e,t);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Wit(i,e,t);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Uit(i,e,t);case"TemplateElement":return uI(o.value.raw);case"TemplateLiteral":return ait(i,e,t);case"TaggedTemplateExpression":return SZt(i,e,t);case"PrivateIdentifier":return["#",o.name];case"PrivateName":return["#",t("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",t("body")];case"VoidPattern":return"void";case"EmptyStatement":if(G_e(i))return";";default:throw new NF(o,"ESTree")}}function int(i){return[i("elementType"),"[]"]}function nnt(i,e,t){let{parent:n,node:o,key:r}=i,s=o.type==="AsConstExpression"?"const":t("typeAnnotation"),a=[t("expression")," ",eKt(o)?"satisfies":"as"," ",s];return r==="callee"&&Z7(n)||r==="object"&&Xs(n)?je([bt([dt,...a]),dt]):a}function kti(i,e,t){let{node:n}=i,o=[hg(i),n.async?"async ":"","component"];n.id&&o.push(" ",t("id")),o.push(t("typeParameters"));let r=yI(i,e,t);return n.rendersType?o.push(je([r," ",t("rendersType")])):o.push(je([r])),n.body&&o.push(" ",t("body")),n.type==="DeclareComponent"&&o.push(vl(e)),o}function Iti(i,e,t){let{node:n}=i;return n.shorthand?t("local"):[t("name")," as ",t("local")]}function Lti(i,e,t){let{node:n}=i,o=[];return n.name&&o.push(t("name"),n.optional?"?: ":": "),o.push(t("typeAnnotation")),o}function Nti(i,e,t){let{node:n}=i;return[n.explicitType?`of ${n.explicitType} `:"",RF(i,e,t)]}function Mti(i,e,t){let{node:n}=i;return[n.type==="EnumSymbolBody"||n.explicitType?`of ${n.type.slice(4,-4).toLowerCase()} `:"",RF(i,e,t)]}function ont(i,e,t){let{node:n}=i,o=n.type==="TSEnumMember",r=o?DS(i,e,t):t("id"),s=o?"initializer":"init";return n[s]?[r," = ",t(s)]:r}function rnt(i,e){let{node:t}=i;return[hg(i),t.const?"const ":"","enum ",e("id")," ",e("body")]}function snt(i,e,t){let{node:n}=i,o=[XZ(i)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&o.push("new ");let r=yI(i,e,t,!1,!0),s=[];return n.type==="FunctionTypeAnnotation"?s.push(Rti(i)?" => ":": ",t("returnType")):s.push(ih(i,t,"returnType")),lz(n,s)&&(r=je(r)),o.push(r,s),[je(o),n.type==="TSConstructSignatureDeclaration"||n.type==="TSCallSignatureDeclaration"?ox(i,e):""]}function Rti(i){let{node:e,parent:t}=i;return e.type==="FunctionTypeAnnotation"&&(fSe(t)||!((t.type==="ObjectTypeProperty"||t.type==="ObjectTypeInternalSlot")&&!t.variance&&!t.optional&&GZ(t,e)||t.type==="ObjectTypeCallProperty"||i.getParentNode(2)?.type==="DeclareFunction"))}function Fti(i,e,t){return[hg(i),"hook",i.node.id?[" ",t("id")]:"",vl(e)]}function Oet(i){let{node:e}=i;return e.type==="HookTypeAnnotation"&&i.getParentNode(2)?.type==="DeclareHook"}function Oti(i,e,t){let{node:n}=i,o=yI(i,e,t,!1,!0),r=[Oet(i)?": ":" => ",t("returnType")];return je([Oet(i)?"":"hook ",lz(n,r)?je(o):o,r])}function ant(i,e,t){return[t("objectType"),Jf(i),"[",t("indexType"),"]"]}function lnt(i,e,t){return["infer ",t("typeParameter")]}function cnt(i,e,t){let n=!1;return je(i.map(({isFirst:o,previous:r,node:s,index:a})=>{let l=t();if(o)return l;let c=ES(s),u=ES(r);return u&&c?[" & ",n?bt(l):l]:!u&&!c||rx(e.originalText,s)?e.experimentalOperatorPosition==="start"?bt([ti,"& ",l]):bt([" &",ti,l]):(a>1&&(n=!0),[" & ",a>1?bt(l):l])},"types"))}function Pti(i){switch(i){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function Bti(i,e,t){let{node:n}=i;return[je([n.variance?t("variance"):"",je(["[",bt([dt,t("keyTparam")," in ",t("sourceType")]),dt,"]"]),Pti(n.optional),": ",t("propType")]),ox(i,e)]}function Pet(i,e){return i==="+"||i==="-"?i+e:e}function zti(i,e,t){let{node:n}=i,o=!1;if(e.objectWrap==="preserve"){let a=Hb(e),l=yn(n)+1,c=a.slice(l),u=l+c.search(/\S/);Xp(e.originalText,l,u)&&(o=!0)}let r=[],s=cg(n,li.Dangling);if(s.length>0){let a=Go(0,s,-1),l=eu(i,e);r.push(...l.slice(0,-1),je([Go(0,l,-1),TS(a)||Vu(e.originalText,tn(a))?gt:ti]))}return je(["{",bt([e.bracketSpacing?ti:dt,...r,n.readonly?[Pet(n.readonly,"readonly")," "]:"",je(["[",bt([dt,t("key")," in ",t("constraint"),n.nameType?[" as ",t("nameType")]:""]),dt,"]"]),n.optional?Pet(n.optional,"?"):"",n.typeAnnotation?": ":"",t("typeAnnotation"),e.semi?Co(";"):""]),e.bracketSpacing?ti:dt,"}"],{shouldBreak:o})}function Vti(i,e,t){let{node:n}=i;return[je(["match (",bt([dt,t("argument")]),dt,")"])," {",n.cases.length>0?bt([gt,qo(gt,i.map(({node:o,isLast:r})=>[t(),!r&&dy(o,e)?gt:""],"cases"))]):"",gt,"}"]}function Hti(i,e,t){let{node:n}=i,o=Yt(n,li.Dangling)?[" ",eu(i,e)]:[],r=n.type==="MatchStatementCase"?[" ",t("body")]:bt([ti,t("body"),","]);return[t("pattern"),n.guard?je([bt([ti,"if (",t("guard"),")"])]):"",je([" =>",o,r])]}function Wti(i,e,t){let{node:n}=i;switch(n.type){case"MatchOrPattern":return Gti(i,e,t);case"MatchAsPattern":return[t("pattern")," as ",t("target")];case"MatchWildcardPattern":return["_"];case"MatchLiteralPattern":return t("literal");case"MatchUnaryPattern":return[n.operator,t("argument")];case"MatchIdentifierPattern":return t("id");case"MatchMemberPattern":{let o=n.property.type==="Identifier"?[".",t("property")]:["[",bt([dt,t("property")]),dt,"]"];return je([t("base"),o])}case"MatchBindingPattern":return[n.kind," ",t("id")];case"MatchObjectPattern":case"MatchInstanceObjectPattern":return Uti(i,e,t);case"MatchInstancePattern":return je([t("targetConstructor")," ",t("properties")]);case"MatchArrayPattern":{let o=i.map(t,"elements");return n.rest&&o.push(t("rest")),je(["[",bt([dt,qo([",",ti],o)]),n.rest?"":Co(","),dt,"]"])}case"MatchObjectPatternProperty":return n.shorthand?t("pattern"):je([t("key"),":",bt([ti,t("pattern")])]);case"MatchRestPattern":{let o=["..."];return n.argument&&o.push(t("argument")),o}}}function Uti(i,e,t){let{node:n}=i,o=i.map(t,"properties");return n.rest&&o.push(t("rest")),je(["{",bt([dt,qo([",",ti],o)]),n.rest?"":Co(","),dt,"}"])}function jti(i){let{patterns:e}=i;if(e.some(n=>Yt(n)))return!1;let t=e.find(n=>n.type==="MatchObjectPattern");return t?e.every(n=>n===t||unt(n)):!1}function Qti(i){return unt(i)||i.type==="MatchObjectPattern"?!0:i.type==="MatchOrPattern"?jti(i):!1}function Gti(i,e,t){let{node:n}=i,{parent:o}=i,r=o.type!=="MatchStatementCase"&&o.type!=="MatchExpressionCase"&&o.type!=="MatchArrayPattern"&&o.type!=="MatchObjectPatternProperty"&&!rx(e.originalText,n),s=Qti(n),a=i.map(()=>{let c=t();return s||(c=dg(2,c)),Yh(i,c,e)},"patterns");if(s)return qo(" | ",a);let l=[Co(["| "]),qo([ti,"| "],a)];return ag(i,e)?je([bt([Co([dt]),l]),dt]):o.type==="MatchArrayPattern"&&o.elements.length>1?je([bt([Co(["(",dt]),l]),dt,Co(")")]):je(r?bt(l):l)}function qti(i,e,t){let{node:n}=i,o=[hg(i),"opaque type ",t("id"),t("typeParameters")];if(n.supertype&&o.push(": ",t("supertype")),n.lowerBound||n.upperBound){let r=[];n.lowerBound&&r.push(bt([ti,"super ",t("lowerBound")])),n.upperBound&&r.push(bt([ti,"extends ",t("upperBound")])),o.push(je(r))}return n.impltype&&o.push(" = ",t("impltype")),o.push(vl(e)),o}function dnt(i,e,t){let{node:n}=i;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[t("label"),": "]:[],t("typeAnnotation")]}function hnt(i,e,t){let{node:n}=i;return[n.variance?t("variance"):"",t("label"),n.optional?"?":"",": ",t("elementType")]}function fnt(i,e,t){let{node:n}=i,o=[hg(i),"type ",t("id"),t("typeParameters")],r=n.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[uz(i,e,t,o," =",r),vl(e)]}function Yti(i,e,t){let{node:n}=i;return Xf(n).length===1&&n.type.startsWith("TS")&&!n[t][0].constraint&&i.parent.type==="ArrowFunctionExpression"&&!(e.filepath&&/\.ts$/.test(e.filepath))}function J7(i,e,t,n){let{node:o}=i,r=o[n];if(!r)return"";if(!Array.isArray(r))return t(n);let s=JZ(i.grandparent),a=i.match(c=>!(c[n].length===1&&ES(c[n][0])),void 0,(c,u)=>u==="typeAnnotation",c=>c.type==="Identifier",Mit);if(r.length===0||!a&&(s||r.length===1&&(r[0].type==="NullableTypeAnnotation"||pZt(r[0])))&&!r.some(c=>{let u=cg(c,d=>d.leading||d.trailing);return u.length>0&&(u.some(d=>TS(d))||Vu(e.originalText,tn(Go(0,u,-1))))}))return["<",qo(", ",i.map(t,n)),Kti(i,e),">"];let l=o.type==="TSTypeParameterInstantiation"?"":Yti(i,e,n)?",":RS(e);return je(["<",bt([dt,qo([",",ti],i.map(t,n))]),l,dt,">"])}function Kti(i,e){let{node:t}=i;if(!Yt(t,li.Dangling))return"";let n=!Yt(t,li.Line),o=eu(i,e,{indent:!n});return n?o:[o,gt]}function pnt(i,e,t){let{node:n}=i,o=[n.const?"const ":""],r=n.type==="TSTypeParameter"?t("name"):n.name;if(n.variance&&o.push(t("variance")),n.in&&o.push("in "),n.out&&o.push("out "),o.push(r),n.bound&&(n.usesExtendsBound&&o.push(" extends "),o.push(ih(i,t,"bound"))),n.constraint){let s=Symbol("constraint");o.push(" extends",je(bt(ti),{id:s}),Bb,ez(t("constraint"),{groupId:s}))}if(n.default){let s=Symbol("default");o.push(" =",je(bt(ti),{id:s}),Bb,ez(t("default"),{groupId:s}))}return je(o)}function mnt(i,e){let{node:t}=i;return[t.type==="TSTypePredicate"&&t.asserts?"asserts ":t.type==="TypePredicate"&&t.kind?`${t.kind} `:"",e("parameterName"),t.typeAnnotation?[" is ",ih(i,e)]:""]}function gnt({node:i},e){let t=i.type==="TSTypeQuery"?"exprName":"argument";return["typeof ",e(t),e("typeArguments")]}function Jti(i,e,t,n){let{node:o}=i;if(Mtt(o))return o.type.slice(0,-14).toLowerCase();switch(o.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return kti(i,e,t);case"ComponentParameter":return Iti(i,e,t);case"ComponentTypeParameter":return Lti(i,e,t);case"HookDeclaration":return ySe(i,e,t);case"DeclareHook":return Fti(i,e,t);case"HookTypeAnnotation":return Oti(i,e,t);case"DeclareFunction":return[hg(i),"function ",t("id"),t("predicate"),vl(e)];case"DeclareModule":return["declare module ",t("id")," ",t("body")];case"DeclareModuleExports":return["declare module.exports",ih(i,t),vl(e)];case"DeclareNamespace":return["declare namespace ",t("id")," ",t("body")];case"DeclareVariable":return Array.isArray(o.declarations)?tnt(i,e,t):[hg(i),o.kind??"var"," ",t("id"),vl(e)];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Yit(i,e,t);case"DeclareOpaqueType":case"OpaqueType":return qti(i,e,t);case"DeclareTypeAlias":case"TypeAlias":return fnt(i,e,t);case"IntersectionTypeAnnotation":return cnt(i,e,t);case"UnionTypeAnnotation":return Ztt(i,e,t,n);case"ConditionalTypeAnnotation":return LSe(i,e,t);case"InferTypeAnnotation":return lnt(i,e,t);case"FunctionTypeAnnotation":return snt(i,e,t);case"TupleTypeAnnotation":return ESe(i,e,t);case"TupleTypeLabeledElement":return hnt(i,e,t);case"TupleTypeSpreadElement":return dnt(i,e,t);case"GenericTypeAnnotation":return[t("id"),J7(i,e,t,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return ant(i,e,t);case"TypeAnnotation":return eit(i,e,t);case"TypeParameter":return pnt(i,e,t);case"TypeofTypeAnnotation":return gnt(i,t);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return int(t);case"DeclareEnum":case"EnumDeclaration":return rnt(i,t);case"EnumBody":return Nti(i,e,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return Mti(i,e,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return ont(i,e,t);case"FunctionTypeParam":{let r=o.name?t("name"):i.parent.this===o?"this":"";return[r,Jf(i),r?": ":"",t("typeAnnotation")]}case"DeclareClass":case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"RecordDeclaration":return kSe(i,e,t);case"ObjectTypeAnnotation":case"RecordDeclarationBody":return TSe(i,e,t);case"ClassImplements":case"InterfaceExtends":return[t("id"),t("typeParameters")];case"RecordDeclarationImplements":return[t("id"),t("typeArguments")];case"NullableTypeAnnotation":return["?",t("typeAnnotation")];case"Variance":{let{kind:r}=o;return hI(r==="plus"||r==="minus"||r==="readonly"||r==="writeonly"||r==="in"||r==="out"),r==="plus"?"+":r==="minus"?"-":`${r} `}case"KeyofTypeAnnotation":return["keyof ",t("argument")];case"ObjectTypeCallProperty":return[o.static?"static ":"",t("value"),ox(i,e)];case"ObjectTypeMappedTypeProperty":return Bti(i,e,t);case"ObjectTypeIndexer":return[o.static?"static ":"",o.variance?t("variance"):"","[",t("id"),o.id?": ":"",t("key"),"]: ",t("value"),ox(i,e)];case"ObjectTypeProperty":{let r="";return o.proto?r="proto ":o.static&&(r="static "),[r,o.kind!=="init"?o.kind+" ":"",o.variance?t("variance"):"",DS(i,e,t),Jf(i),kF(o)?"":": ",t("value"),ox(i,e)]}case"ObjectTypeInternalSlot":return[o.static?"static ":"","[[",t("id"),"]]",Jf(i),o.method?"":": ",t("value"),ox(i,e)];case"ObjectTypeSpreadProperty":return W_e(i,t);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[t("qualification"),".",t("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(o.value);case"StringLiteralTypeAnnotation":return uI(dI(lg(o),e));case"NumberLiteralTypeAnnotation":return tz(lg(o));case"BigIntLiteralTypeAnnotation":return H_e(lg(o));case"TypeCastExpression":return["(",t("expression"),ih(i,t),")"];case"TypePredicate":return mnt(i,t);case"TypeOperator":return[o.operator," ",t("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return J7(i,e,t,"params");case"InferredPredicate":case"DeclaredPredicate":return[i.key==="predicate"&&i.parent.type!=="DeclareFunction"&&!i.parent.returnType?": ":" ","%checks",...o.type==="DeclaredPredicate"?["(",t("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return nnt(i,e,t);case"MatchExpression":case"MatchStatement":return Vti(i,e,t);case"MatchExpressionCase":case"MatchStatementCase":return Hti(i,e,t);case"MatchOrPattern":case"MatchAsPattern":case"MatchWildcardPattern":case"MatchLiteralPattern":case"MatchUnaryPattern":case"MatchIdentifierPattern":case"MatchInstancePattern":case"MatchInstanceObjectPattern":case"MatchMemberPattern":case"MatchBindingPattern":case"MatchObjectPattern":case"MatchObjectPatternProperty":case"MatchRestPattern":case"MatchArrayPattern":return Wti(i,e,t);case"RecordExpression":return[t("recordConstructor"),t("typeArguments")," ",t("properties")];case"RecordExpressionProperties":return RF(i,e,t);case"RecordDeclarationProperty":case"RecordDeclarationStaticProperty":{let r=o.type==="RecordDeclarationStaticProperty",s=r?"value":"defaultValue";return[r?"static ":"",DS(i,e,t),ih(i,t),o[s]?[" = ",t(s)]:""]}}}function Xti(i,e){let{node:t}=i,n=e.originalText.slice(yn(t),tn(t));return e.semi&&T_e(t)?n+=";":CSe(i,e)&&(n=`;${n}`),t.type==="ClassExpression"&&Zs(t.decorators)?[bt([dt,n]),dt]:n}function Zti(i,e,t){let{node:n}=i;if(n.type==="JSXElement"&&pii(n))return[t("openingElement"),t("closingElement")];let o=n.type==="JSXElement"?t("openingElement"):t("openingFragment"),r=n.type==="JSXElement"?t("closingElement"):t("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[o,...i.map(t,"children"),r];n.children=n.children.map(C=>mii(C)?{type:"JSXText",value:" ",raw:" "}:C);let s=n.children.some(md),a=n.children.filter(C=>C.type==="JSXExpressionContainer").length>1,l=n.type==="JSXElement"&&n.openingElement.attributes.length>1,c=Kf(o)||s||l||a,u=i.parent.rootMarker==="mdx",d=e.singleQuote?"{' '}":'{" "}',h=u?ti:Co([d,dt]," "),f=n.openingElement?.name?.name==="fbt",p=$ti(i,e,t,h,f),g=n.children.some(C=>nz(C));for(let C=p.length-2;C>=0;C--){let _=p[C]===""&&p[C+1]==="",E=p[C]===gt&&p[C+1]===""&&p[C+2]===gt,I=(p[C]===dt||p[C]===gt)&&p[C+1]===""&&p[C+2]===h,T=p[C]===h&&p[C+1]===""&&(p[C+2]===dt||p[C+2]===gt),N=p[C]===h&&p[C+1]===""&&p[C+2]===h,L=p[C]===dt&&p[C+1]===""&&p[C+2]===gt||p[C]===gt&&p[C+1]===""&&p[C+2]===dt;E&&g||_||I||N||L?p.splice(C,2):T&&p.splice(C+1,2)}for(;p.length>0&&D_e(Go(0,p,-1));)p.pop();for(;p.length>1&&D_e(p[0])&&D_e(p[1]);)p.shift(),p.shift();let A=[""];for(let[C,_]of p.entries()){if(_===h){if(C===1&&qJt(p[C-1])){if(p.length===2){A.push([A.pop(),d]);continue}A.push([d,gt],"");continue}if(C===p.length-1){A.push([A.pop(),d]);continue}if(p[C-1]===""&&p[C-2]===gt){A.push([A.pop(),d]);continue}}C%2===0?A.push([A.pop(),_]):A.push(_,""),Kf(_)&&(c=!0)}let v=g?Stt(A):je(A,{shouldBreak:!0});if(e.cursorNode?.type==="JSXText"&&n.children.includes(e.cursorNode)?v=[MZ,v,MZ]:e.nodeBeforeCursor?.type==="JSXText"&&n.children.includes(e.nodeBeforeCursor)?v=[MZ,v]:e.nodeAfterCursor?.type==="JSXText"&&n.children.includes(e.nodeAfterCursor)&&(v=[v,MZ]),u)return v;let w=je([o,bt([gt,v]),gt,r]);return c?w:lI([je([o,...p,r]),w])}function $ti(i,e,t,n,o){let r="",s=[r];function a(c){r=c,s.push([s.pop(),c])}function l(c){c!==""&&(r=c,s.push(c,""))}return i.each(({node:c,next:u})=>{if(c.type==="JSXText"){let d=lg(c);if(nz(c)){let h=OZ.split(d,!0);h[0]===""&&(h.shift(),/\n/.test(h[0])?l(zet(o,h[1],c,u)):l(n),h.shift());let f;if(Go(0,h,-1)===""&&(h.pop(),f=h.pop()),h.length===0)return;for(let[p,g]of h.entries())p%2===1?l(ti):a(g);f!==void 0?/\n/.test(f)?l(zet(o,r,c,u)):l(n):l(Bet(o,r,c,u))}else/\n/.test(d)?d.match(/\n/g).length>1&&l(gt):l(n)}else{let d=t();if(a(d),u&&nz(u)){let h=OZ.trim(lg(u)),[f]=OZ.split(h);l(Bet(o,f,c,u))}else l(gt)}},"children"),s}function Bet(i,e,t,n){return i?"":t.type==="JSXElement"&&!t.closingElement||n?.type==="JSXElement"&&!n.closingElement?e.length===1?dt:gt:dt}function zet(i,e,t,n){return i?gt:e.length===1?t.type==="JSXElement"&&!t.closingElement||n?.type==="JSXElement"&&!n.closingElement?gt:dt:gt}function tii(i,e,t){let{parent:n}=i;if(eii(n))return e;let o=iii(i),r=ag(i,t);return je([r?"":Co("("),bt([dt,e]),dt,r?"":Co(")")],{shouldBreak:o})}function iii(i){return i.match(void 0,(e,t)=>t==="body"&&e.type==="ArrowFunctionExpression",(e,t)=>t==="arguments"&&Ms(e))&&(i.match(void 0,void 0,void 0,(e,t)=>t==="expression"&&e.type==="JSXExpressionContainer")||i.match(void 0,void 0,void 0,(e,t)=>t==="expression"&&e.type==="ChainExpression",(e,t)=>t==="expression"&&e.type==="JSXExpressionContainer"))}function nii(i,e,t){let{node:n}=i,o=[t("name")];if(n.value){let r;if(Hu(n.value)){let s=lg(n.value),a=pd(0,pd(0,s.slice(1,-1),"'","'"),""",'"'),l=Utt(a,e.jsxSingleQuote);a=l==='"'?pd(0,a,'"',"""):pd(0,a,"'","'"),r=i.call(()=>Yh(i,uI(l+a+l),e),"value")}else r=t("value");o.push("=",r)}return o}function oii(i,e,t){let{node:n}=i,o=(r,s)=>r.type==="JSXEmptyExpression"||!Yt(r)&&(nh(r)||vA(r)||r.type==="ArrowFunctionExpression"||r.type==="AwaitExpression"&&(o(r.argument,r)||r.argument.type==="JSXElement")||Ms(IS(r))||r.type==="FunctionExpression"||r.type==="TemplateLiteral"||r.type==="TaggedTemplateExpression"||r.type==="DoExpression"||md(s)&&(r.type==="ConditionalExpression"||sx(r)));return o(n.expression,i.parent)?je(["{",t("expression"),Bb,"}"]):je(["{",bt([dt,t("expression")]),dt,Bb,"}"])}function rii(i,e,t){let{node:n}=i,o=Yt(n.name)||Yt(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!o)return["<",t("name"),t("typeArguments")," />"];if(n.attributes?.length===1&&Hu(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` +`)&&!o&&!Yt(n.attributes[0]))return je(["<",t("name"),t("typeArguments")," ",...i.map(t,"attributes"),n.selfClosing?" />":">"]);let r=n.attributes?.some(a=>Hu(a.value)&&a.value.value.includes(` +`)),s=e.singleAttributePerLine&&n.attributes.length>1?gt:ti;return je(["<",t("name"),t("typeArguments"),bt(i.map(({isFirst:a,previous:l})=>[a?s:dy(l,e)?[gt,gt]:s,t()],"attributes")),...sii(n,e,o)],{shouldBreak:r})}function sii(i,e,t){return i.selfClosing?[ti,"/>"]:aii(i,e,t)?[">"]:[dt,">"]}function aii(i,e,t){let n=i.attributes.length>0&&Yt(Go(0,i.attributes,-1),li.Trailing);return i.attributes.length===0&&!t||(e.bracketSameLine||e.jsxBracketSameLine)&&(!t||i.attributes.length>0)&&!n}function lii(i,e,t){let{node:n}=i,o=[""),o}function cii(i,e){let{node:t}=i,n=Yt(t),o=Yt(t,li.Line),r=t.type==="JSXOpeningFragment";return[r?"<":""]}function uii(i,e,t){let n=Yh(i,Zti(i,e,t),e);return tii(i,n,e)}function dii(i,e){let{node:t}=i,n=Yt(t,li.Line);return[eu(i,e,{indent:n}),n?gt:""]}function hii(i,e,t){let{node:n}=i;return["{",i.call(({node:o})=>{let r=["...",t()];return Yt(o)?[bt([dt,Yh(i,r,e)]),dt]:r},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function fii(i,e,t){let{node:n}=i;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return nii(i,e,t);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return qo(":",[t("namespace"),t("name")]);case"JSXMemberExpression":return qo(".",[t("object"),t("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return hii(i,e,t);case"JSXExpressionContainer":return oii(i,e,t);case"JSXFragment":case"JSXElement":return uii(i,e,t);case"JSXOpeningElement":return rii(i,e,t);case"JSXClosingElement":return lii(i,e,t);case"JSXOpeningFragment":case"JSXClosingFragment":return cii(i,e);case"JSXEmptyExpression":return dii(i,e);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new NF(n,"JSX")}}function pii(i){if(i.children.length===0)return!0;if(i.children.length>1)return!1;let e=i.children[0];return e.type==="JSXText"&&!nz(e)}function mii(i){return i.type==="JSXExpressionContainer"&&Hu(i.expression)&&i.expression.value===" "&&!Yt(i.expression)}function gii(i,e,t){let{node:n}=i,o=n.parameters.length>1?RS(e):"",r=je([bt([dt,qo([", ",dt],i.map(t,"parameters"))]),o,dt]);return[i.key==="body"&&i.parent.type==="ClassBody"&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?r:"","]",ih(i,t),ox(i,e)]}function Vet(i,e,t){let{node:n}=i;return[n.postfix?"":t,ih(i,e),n.postfix?t:""]}function bii(i,e,t){let{node:n}=i,o=[],r=n.kind&&n.kind!=="method"?`${n.kind} `:"";o.push(ZZ(n),r,DS(i,e,t),Jf(i));let s=yI(i,e,t,!1,!0),a=ih(i,t,"returnType"),l=lz(n,a);return o.push(l?je(s):s),n.returnType&&o.push(je(a)),[je(o),ox(i,e)]}function Aii(i,e,t){let{node:n}=i;return[hg(i),n.kind==="global"?"":`${n.kind} `,t("id"),n.body?[" ",je(t("body"))]:vl(e)]}function vii(i,e,t){let{node:n}=i,o=!(nh(n.expression)||vA(n.expression)),r=je(["<",bt([dt,t("typeAnnotation")]),dt,">"]),s=[Co("("),bt([dt,t("expression")]),dt,Co(")")];return o?lI([[r,t("expression")],[r,je(s,{shouldBreak:!0})],[r,t("expression")]]):je([r,t("expression")])}function yii(i,e,t,n){let{node:o}=i;if(o.type.startsWith("TS")){if(Rtt(o))return o.type.slice(2,-7).toLowerCase();switch(o.type){case"TSThisType":return"this";case"TSTypeAssertion":return vii(i,e,t);case"TSDeclareFunction":return ySe(i,e,t);case"TSExportAssignment":return["export = ",t("expression"),vl(e)];case"TSModuleBlock":return Fit(i,e,t);case"TSInterfaceBody":case"TSTypeLiteral":return TSe(i,e,t);case"TSTypeAliasDeclaration":return fnt(i,e,t);case"TSQualifiedName":return[t("left"),".",t("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Wit(i,e,t);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Uit(i,e,t);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[t("expression"),t("typeArguments")];case"TSTemplateLiteralType":return ait(i,e,t);case"TSNamedTupleMember":return hnt(i,e,t);case"TSRestType":return dnt(i,e,t);case"TSOptionalType":return[t("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return kSe(i,e,t);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return J7(i,e,t,"params");case"TSTypeParameter":return pnt(i,e,t);case"TSAsExpression":case"TSSatisfiesExpression":return nnt(i,e,t);case"TSArrayType":return int(t);case"TSPropertySignature":return[o.readonly?"readonly ":"",DS(i,e,t),Jf(i),ih(i,t),ox(i,e)];case"TSParameterProperty":return[ZZ(o),o.static?"static ":"",o.override?"override ":"",o.readonly?"readonly ":"",t("parameter")];case"TSTypeQuery":return gnt(i,t);case"TSIndexSignature":return gii(i,e,t);case"TSTypePredicate":return mnt(i,t);case"TSNonNullExpression":return[t("expression"),"!"];case"TSImportType":return[jZ(i,e,t),o.qualifier?[".",t("qualifier")]:"",J7(i,e,t,"typeArguments")];case"TSLiteralType":return t("literal");case"TSIndexedAccessType":return ant(i,e,t);case"TSTypeOperator":return[o.operator," ",t("typeAnnotation")];case"TSMappedType":return zti(i,e,t);case"TSMethodSignature":return bii(i,e,t);case"TSNamespaceExportDeclaration":return["export as namespace ",t("id"),vl(e)];case"TSEnumDeclaration":return rnt(i,t);case"TSEnumBody":return RF(i,e,t);case"TSEnumMember":return ont(i,e,t);case"TSImportEqualsDeclaration":return["import ",Kit(o,!1),t("id")," = ",t("moduleReference"),vl(e)];case"TSExternalModuleReference":return jZ(i,e,t);case"TSModuleDeclaration":return Aii(i,e,t);case"TSConditionalType":return LSe(i,e,t);case"TSInferType":return lnt(i,e,t);case"TSIntersectionType":return cnt(i,e,t);case"TSUnionType":return Ztt(i,e,t,n);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return snt(i,e,t);case"TSTupleType":return ESe(i,e,t);case"TSTypeReference":return[t("typeName"),J7(i,e,t,"typeArguments")];case"TSTypeAnnotation":return eit(i,e,t);case"TSEmptyBodyFunctionExpression":return wSe(i,e,t);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Vet(i,t,"?");case"TSJSDocNonNullableType":return Vet(i,t,"!");default:throw new NF(o,"TypeScript")}}}function wii(i,e,t,n){for(let o of[M$t,fii,Jti,yii,Tti]){let r=o(i,e,t,n);if(r!==void 0)return r}}function Het(i,e,t,n){i.isRoot&&e.__onHtmlBindingRoot?.(i.node,e);let{node:o}=i,r=SSe(i)?Xti(i,e):wii(i,e,t,n);if(!r)return"";if(xii(o))return r;r=Cii(i,e,r);let s=o.type!=="ClassExpression"&&Zs(o.decorators)?yit(i,e,t):"",a=ag(i,e);return!s&&!a?r:xtt(r,l=>[a?"(":"",s?je([s,l]):l,a?")":""])}function Cii(i,e,t){let{node:n}=i;return(Yt(n,li.Leading)||Yt(n,li.Trailing))&&htt(i)?[bt([dt,Yh(i,t,e)]),dt]:t}function U_e(i){return i.extra.raw}function vnt(i,e){let{type:t}=i;if(t==="ObjectProperty"){let{key:n}=i;if(n.type==="Identifier"){let{name:o}=n;e.key={type:"StringLiteral",value:o,extra:{rawValue:o}}}else if(n.type==="NumericLiteral"){let o=U_e(n);String(Number(o))===o&&(e.key={type:"StringLiteral",value:o,extra:{rawValue:o}})}}if(t==="StringLiteral"&&delete e.extra.raw,t==="UnaryExpression"&&i.operator==="+")return e.argument;if((t==="ArrayExpression"||t==="ObjectExpression")&&(e.extra??(e.extra={}),i.extra?.trailingComma&&delete e.extra.trailingComma),t==="ArrayExpression"){for(let[n,o]of i.elements.entries())o===null&&e.elements.splice(n,0,{type:"NullLiteral"});return}if(t==="TemplateLiteral"){let n=i.quasis[0].value.cooked;return{type:"StringLiteral",value:n,extra:{rawValue:n}}}}function Iii(i,e,t){let{node:n}=i;switch(n.type){case"JsonRoot":return[t("node"),gt];case"ArrayExpression":{if(n.elements.length===0)return"[]";let o=i.map(()=>i.node===null?"null":t(),"elements");return["[",bt([gt,qo([",",gt],o)]),gt,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",bt([gt,qo([",",gt],i.map(t,"properties"))]),gt,"}"];case"ObjectProperty":return[t("key"),": ",t("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,t("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return dI(U_e(n),e);case"NumericLiteral":{let o=U_e(n);return Wet(i)&&String(Number(o))===o?`"${o}"`:o}case"Identifier":return Wet(i)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return t(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new NF(n,"JSON")}}function Wet(i){return i.key==="key"&&i.parent.type==="ObjectProperty"}var MYt,j_e,Uet,RYt,jet,Zs,OYt,hI,Q_e,BYt,Go,VYt,UYt,Qet,jYt,QYt,GYt,iet,qYt,Get,YYt,KYt,T_e,AA,eKt,ug,rz,q_e,SS,Yet,_F,tKt,nh,vA,Y_e,ES,X7,md,sx,Ms,Xs,Z7,SF,fI,iKt,nKt,oKt,rKt,sKt,net,aKt,cKt,jUi,EF,dKt,hKt,J_e,oet,DF,X_e,YZ,ay,Vu,Xp,yKt,xKt,CKt,_Kt,pd,EKt,TKt,yA,TS,LKt,Jet,eSe,zKt,aet,itt,WKt,YKt,KKt,utt,rJt,sJt,lJt,li,dtt,cJt,uet,NZ,N_e,det,fJt,ftt,Q7,wJt,ptt,Ne,_Jt,SJt,mtt,TJt,MJt,ag,pI,ax,IF,mI,gI,bI,Pb,LS,ly,AI,vI,NS,Zp,cx,ux,ytt,MS,PJt,zJt,$7,het,uSe,uy,Ctt,YJt,KJt,lx,MZ,ti,dt,Ett,gt,$Jt,hSe,Bb,eXt,tXt,iXt,nXt,oXt,rXt,aXt,lXt,cXt,uXt,dXt,hXt,Dtt,Ttt,met,fXt,pXt,gXt,bXt,AXt,vXt,yXt,TF,xXt,CXt,ktt,DXt,TXt,Ob,ry,F_e,VZ,HZ,dy,IXt,Mtt,LXt,Rtt,FXt,Ftt,gSe,WXt,UXt,jXt,get,GXt,JXt,XXt,ZXt,tz,Htt,Wtt,eZt,tZt,iZt,oZt,dI,jtt,Qtt,iz,Gtt,sZt,lZt,dZt,hZt,mZt,$tt,gZt,_Se,AZt,yZt,xZt,_Zt,DZt,bet,P_e,zZt,C_e,jZt,QZt,KZt,$Zt,r$t,xF,s$t,a$t,pit,l$t,yet,c$t,wet,u$t,mit,m$t,b$t,w$t,S$t,E$t,OZ,SSe,k$t,NF,L$t,Cet,F$t,V$t,H$t,q$t,K$t,J$t,z_e,nei,aei,lei,Cei,_ei,Sei,Tei,Oit,Let,Bit,Nei,Mei,Rei,Pei,Vei,Hei,Uei,jei,Xei,tti,Git,iti,qit,rti,cti,Ati,Cti,E_e,unt,D_e,eii,xii,_ii,bnt,Sii,Ant,Eii,Dii,Tii,kii,Lii,G7,_S,Nii,ynt,wnt,xnt,_nt=D(()=>{MYt=Object.defineProperty,j_e=(i,e)=>{for(var t in e)MYt(i,t,{get:e[t],enumerable:!0})},Uet={};j_e(Uet,{languages:()=>xnt,options:()=>ynt,printers:()=>wnt});RYt=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",aliases:["typescriptreact"],codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],jet={};j_e(jet,{estree:()=>bnt});Zs=FYt,OYt=()=>{},hI=OYt;Q_e=(i,e)=>(t,n,...o)=>t|1&&n==null?void 0:(e.call(n)??n[i]).apply(n,o);BYt=Q_e("at",function(){if(Array.isArray(this)||typeof this=="string")return PYt}),Go=BYt;VYt=new WeakMap;UYt=i=>i?.type==="TSAsExpression"&&i.typeAnnotation.type==="TSTypeReference"&&i.typeAnnotation.typeName.type==="Identifier"&&i.typeAnnotation.typeName.name==="const";Qet=i=>Number.isSafeInteger(i)&&i>=0;jYt=5,QYt=8,GYt=8,iet=i=>e=>e.label?tn(e.label):yn(e)+i,qYt=i=>i.__contentEnd??QZ(i),Get=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],YYt=new Map([["BreakStatement",iet(jYt)],["ContinueStatement",iet(QYt)],["DebuggerStatement",i=>yn(i)+GYt],["VariableDeclaration",i=>tn(Go(0,i.declarations,-1))],...Get.map(i=>[i,qYt])]),KYt=Ji(Get),T_e=i=>{if(KYt(i)&&i.__contentEnd)return!0;let{type:e}=i;return e==="BreakStatement"||e==="ContinueStatement"||e==="DebuggerStatement"||e==="VariableDeclaration"?!0:e==="IfStatement"?T_e(i.alternate??i.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?T_e(i.body):!1};AA=Ji(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),eKt=Ji(["SatisfiesExpression","TSSatisfiesExpression"]),ug=Ji(["TSUnionType","UnionTypeAnnotation"]),rz=Ji(["TSIntersectionType","IntersectionTypeAnnotation"]),q_e=Ji(["TupleTypeAnnotation","TSTupleType"]),SS=Ji(["TSConditionalType","ConditionalTypeAnnotation"]),Yet=Ji(["TSTypeAliasDeclaration","TypeAlias"]),_F=Ji(["ReturnStatement","ThrowStatement"]),tKt=Ji(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),nh=Ji(["ArrayExpression"]),vA=Ji(["ObjectExpression"]),Y_e=Ji(["Literal","BooleanLiteral","BigIntLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),ES=Ji(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),X7=Ji(["FunctionExpression","ArrowFunctionExpression"]),md=Ji(["JSXElement","JSXFragment"]),sx=Ji(["BinaryExpression","LogicalExpression","NGPipeExpression"]),Ms=Ji(["CallExpression","OptionalCallExpression"]),Xs=Ji(["MemberExpression","OptionalMemberExpression"]),Z7=Ji(["CallExpression","OptionalCallExpression","NewExpression"]),SF=Ji(["CallExpression","OptionalCallExpression","NewExpression","ImportExpression"]),fI=Ji(["ChainExpression","TSNonNullExpression"]),iKt=Ji(["TSArrayType","ArrayTypeAnnotation"]),nKt=Ji(["TSTypeParameterInstantiation","TypeParameterInstantiation"]);oKt=Ji(["File","TemplateElement","TSEmptyBodyFunctionExpression","ChainExpression"]),rKt=(i,[e])=>e?.type==="ComponentParameter"&&e.shorthand&&e.name===i&&e.local!==e.name||e?.type==="MatchObjectPatternProperty"&&e.shorthand&&e.key===i||e?.type==="ObjectProperty"&&e.shorthand&&e.key===i&&e.value!==e.key||e?.type==="Property"&&e.shorthand&&e.key===i&&!kF(e)&&e.value!==e.key||e?.type==="ImportSpecifier"&&k_e(e)&&e.local===i&&e.local!==e.imported||e?.type==="ExportSpecifier"&&k_e(e)&&e.exported===i&&e.local!==e.exported,sKt=(i,[e])=>!!(i.type==="FunctionExpression"&&e.type==="MethodDefinition"&&e.value===i&&Xf(i).length===0&&!i.returnType&&!Zs(i.typeParameters)&&i.body),net=(i,[e])=>e?.typeAnnotation===i&&UYt(e),aKt=(i,[e,...t])=>net(i,[e])||e?.typeName===i&&net(e,t);cKt=lKt;jUi=qZ(/\s/),EF=qZ(" "),dKt=qZ(",; "),hKt=qZ(/[^\n\r]/);J_e=fKt,oet=i=>i===` +`||i==="\r"||i==="\u2028"||i==="\u2029";DF=pKt;X_e=mKt;YZ=gKt;ay=bKt;Vu=AKt;Xp=vKt,yKt=new WeakMap;xKt=Symbol.for("comments"),CKt=String.prototype.replaceAll??function(i,e){return i.global?this.replace(i,e):this.split(i).join(e)},_Kt=Q_e("replaceAll",function(){if(typeof this=="string")return CKt}),pd=_Kt;EKt=SKt;TKt=new WeakMap;yA=Ji(["Block","CommentBlock","MultiLine"]),TS=Ji(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);LKt=new WeakMap;Jet=(i,e)=>yA(i)&&!Xp(e,yn(i),tn(i)),eSe=(i,e)=>TS(i)||Jet(i,e);zKt=Ji(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);aet=Ji(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);itt=Ji(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);WKt=Ji(["ComponentDeclaration","DeclareComponent","ComponentTypeAnnotation"]);YKt=Ji(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),KKt=Ji(["ObjectExpression","ArrayExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);utt=Ji(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod","HookDeclaration"]),rJt={endOfLine:RKt,ownLine:MKt,remaining:FKt},sJt=rJt;lJt=aJt,li={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},dtt=(i,e)=>{if(typeof i=="function"&&(e=i,i=0),i||e)return(t,n,o)=>!(i&li.Leading&&!t.leading||i&li.Trailing&&!t.trailing||i&li.Dangling&&(t.leading||t.trailing)||i&li.Block&&!yA(t)||i&li.Line&&!TS(t)||i&li.First&&n!==0||i&li.Last&&n!==o.length-1||i&li.PrettierIgnore&&!cI(t)||e&&!e(t))};cJt=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((i,e)=>i.map(t=>[t,e])));uet={"==":!0,"!=":!0,"===":!0,"!==":!0},NZ={"*":!0,"/":!0,"%":!0},N_e={">>":!0,">>>":!0,"<<":!0};det=i=>i.extra?.parenthesized,fJt=Ji(["OptionalCallExpression","OptionalMemberExpression"]);ftt=bJt;Q7=null;wJt=10;for(let i=0;i<=wJt;i++)Y7();ptt=CJt,Ne=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],_Jt={ArrayExpression:Ne[0],AssignmentExpression:Ne[1],BinaryExpression:Ne[1],InterpreterDirective:[],Directive:Ne[2],DirectiveLiteral:[],BlockStatement:Ne[3],BreakStatement:Ne[4],CallExpression:Ne[5],CatchClause:["param","body"],ConditionalExpression:Ne[6],ContinueStatement:Ne[4],DebuggerStatement:[],DoWhileStatement:Ne[7],EmptyStatement:[],ExpressionStatement:Ne[8],File:["program"],ForInStatement:Ne[9],ForStatement:["init","test","update","body"],FunctionDeclaration:Ne[10],FunctionExpression:Ne[10],Identifier:["typeAnnotation","decorators"],IfStatement:Ne[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:Ne[1],MemberExpression:Ne[11],NewExpression:Ne[5],Program:Ne[3],ObjectExpression:Ne[12],ObjectMethod:Ne[13],ObjectProperty:Ne[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:Ne[15],SequenceExpression:Ne[16],ParenthesizedExpression:Ne[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:Ne[15],TryStatement:["block","handler","finalizer"],UnaryExpression:Ne[15],UpdateExpression:Ne[15],VariableDeclaration:["declarations"],VariableDeclarator:Ne[17],WhileStatement:Ne[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:Ne[18],ClassExpression:Ne[19],ClassDeclaration:Ne[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:Ne[20],ExportSpecifier:["local","exported"],ForOfStatement:Ne[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:Ne[21],ImportNamespaceSpecifier:Ne[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:Ne[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:Ne[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:Ne[15],AwaitExpression:Ne[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:Ne[22],OptionalMemberExpression:Ne[11],OptionalCallExpression:Ne[5],ClassProperty:Ne[23],ClassPrivateProperty:Ne[23],ClassPrivateMethod:Ne[13],PrivateName:Ne[24],StaticBlock:Ne[18],ImportAttribute:Ne[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:Ne[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:Ne[27],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:Ne[28],DeclareModule:Ne[29],DeclareModuleExports:Ne[30],DeclareTypeAlias:Ne[31],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareVariable:["id","declarations"],DeclareExportDeclaration:Ne[20],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:Ne[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:Ne[32],GenericTypeAnnotation:Ne[27],InferredPredicate:[],InterfaceExtends:Ne[27],InterfaceDeclaration:Ne[28],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:Ne[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:Ne[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:Ne[2],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:Ne[15],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],QualifiedTypeIdentifier:Ne[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:Ne[35],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:Ne[31],TypeAnnotation:Ne[30],TypeCastExpression:Ne[36],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:Ne[37],TypeParameterInstantiation:Ne[37],UnionTypeAnnotation:Ne[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:Ne[29],EnumBooleanBody:Ne[38],EnumNumberBody:Ne[38],EnumStringBody:Ne[38],EnumSymbolBody:Ne[38],EnumBooleanMember:Ne[17],EnumNumberMember:Ne[17],EnumStringMember:Ne[17],EnumDefaultedMember:Ne[24],IndexedAccessType:Ne[39],OptionalIndexedAccessType:Ne[39],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:Ne[8],JSXSpreadChild:Ne[8],JSXIdentifier:[],JSXMemberExpression:Ne[11],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXSpreadAttribute:Ne[15],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ClassAccessorProperty:Ne[40],Decorator:Ne[8],DoExpression:Ne[18],ExportDefaultSpecifier:Ne[22],ModuleExpression:Ne[18],TopicReference:[],VoidPattern:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:Ne[41],TSDeclareMethod:Ne[42],TSQualifiedName:Ne[1],TSCallSignatureDeclaration:Ne[43],TSConstructSignatureDeclaration:Ne[43],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:Ne[42],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:Ne[43],TSConstructorType:Ne[43],TSTypeReference:["typeName","typeArguments"],TSTypePredicate:Ne[44],TSTypeQuery:["exprName","typeArguments"],TSTypeLiteral:Ne[38],TSArrayType:Ne[26],TSTupleType:Ne[35],TSOptionalType:Ne[30],TSRestType:Ne[30],TSNamedTupleMember:["label","elementType"],TSUnionType:Ne[33],TSIntersectionType:Ne[33],TSConditionalType:Ne[45],TSInferType:Ne[46],TSParenthesizedType:Ne[30],TSTypeOperator:Ne[30],TSIndexedAccessType:Ne[39],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:Ne[47],TSClassImplements:Ne[48],TSInterfaceHeritage:Ne[48],TSInterfaceDeclaration:Ne[28],TSInterfaceBody:Ne[18],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:Ne[48],TSAsExpression:Ne[36],TSSatisfiesExpression:Ne[36],TSTypeAssertion:Ne[36],TSEnumBody:Ne[38],TSEnumDeclaration:Ne[29],TSEnumMember:["id","initializer"],TSModuleDeclaration:Ne[29],TSModuleBlock:Ne[18],TSImportType:["source","options","qualifier","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:Ne[8],TSNonNullExpression:Ne[8],TSExportAssignment:Ne[8],TSNamespaceExportDeclaration:Ne[24],TSTypeAnnotation:Ne[30],TSTypeParameterInstantiation:Ne[37],TSTypeParameterDeclaration:Ne[37],TSTypeParameter:["name","constraint","default"],ChainExpression:Ne[8],Literal:[],MethodDefinition:Ne[14],PrivateIdentifier:[],Property:Ne[25],PropertyDefinition:Ne[23],AccessorProperty:Ne[40],TSAbstractAccessorProperty:Ne[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:Ne[25],TSAbstractPropertyDefinition:Ne[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:Ne[8],AsExpression:Ne[36],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:Ne[32],ConditionalTypeAnnotation:Ne[45],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:Ne[29],DeclareHook:Ne[24],DeclareNamespace:Ne[29],EnumBigIntBody:Ne[38],EnumBigIntMember:Ne[17],EnumBody:Ne[38],HookDeclaration:Ne[41],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:Ne[46],KeyofTypeAnnotation:Ne[15],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:Ne[24],MatchExpression:Ne[50],MatchExpressionCase:Ne[51],MatchIdentifierPattern:Ne[24],MatchInstanceObjectPattern:Ne[52],MatchInstancePattern:["targetConstructor","properties"],MatchLiteralPattern:Ne[47],MatchMemberPattern:["base","property"],MatchObjectPattern:Ne[52],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:Ne[15],MatchStatement:Ne[50],MatchStatementCase:Ne[51],MatchUnaryPattern:Ne[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:Ne[34],RecordDeclaration:["id","typeParameters","implements","body"],RecordDeclarationBody:Ne[0],RecordDeclarationImplements:["id","typeArguments"],RecordDeclarationProperty:["key","typeAnnotation","defaultValue"],RecordDeclarationStaticProperty:["key","typeAnnotation","value"],RecordExpression:["recordConstructor","typeArguments","properties"],RecordExpressionProperties:Ne[12],SatisfiesExpression:Ne[36],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:Ne[30],TypePredicate:Ne[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:Ne[16],NGEmptyExpression:[],NGPipeExpression:["left","right","arguments"],NGMicrosyntax:Ne[18],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:Ne[25],NGRoot:Ne[53],JsExpressionRoot:Ne[53],JsonRoot:Ne[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:Ne[30],TSJSDocNonNullableType:Ne[30]},SJt=ptt(_Jt),mtt=SJt;TJt=new WeakMap;MJt=Ji(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);ag=vtt,pI="string",ax="array",IF="cursor",mI="indent",gI="align",bI="trim",Pb="group",LS="fill",ly="if-break",AI="indent-if-break",vI="line-suffix",NS="line-suffix-boundary",Zp="line",cx="label",ux="break-parent",ytt=new Set([IF,mI,gI,bI,Pb,LS,ly,AI,vI,NS,Zp,cx,ux]);MS=OJt,PJt=i=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(i);zJt=class extends Error{name="InvalidDocError";constructor(i){super(BJt(i)),this.doc=i}},$7=zJt,het={};uSe=VJt;uy=hI,Ctt=hI,YJt=hI,KJt=hI;lx={type:ux},MZ={type:IF};ti={type:Zp},dt={type:Zp,soft:!0},Ett={type:Zp,hard:!0},gt=[Ett,lx],$Jt={type:Zp,hard:!0,literal:!0},hSe=[$Jt,lx];Bb={type:NS},eXt="cr",tXt="crlf",iXt="\r",nXt=`\r +`,oXt=` +`,rXt=oXt;aXt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,lXt=12288,cXt=65510,uXt=[12288,12288,65281,65376,65504,65510],dXt=4352,hXt=262141,Dtt=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],Ttt=(i,e)=>{let t=0,n=Math.floor(i.length/2)-1;for(;t<=n;){let o=Math.floor((t+n)/2),r=o*2;if(ei[r+1])t=o+1;else return!0}return!1},met=19968,[fXt,pXt]=mXt(Dtt);gXt=i=>icXt?!1:Ttt(uXt,i),bXt=i=>i>=fXt&&i<=pXt?!0:ihXt?!1:Ttt(Dtt,i),AXt=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,vXt=i=>AXt.test(i),yXt=/[^\x20-\x7F]/;TF=wXt,xXt={type:0},CXt={type:1},ktt={value:"",length:0,queue:[],get root(){return ktt}};DXt=class{#e=[];#t="";#n=0;#o=[];#i=[];#r(){let i=this.#t;i!==""&&(this.#e.push(i),this.#n+=i.length,this.#t="");for(let e of this.#i)this.#o.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#o.length+this.#i.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#i.push(this.#n+this.#t.length)}write(i){this.#t+=i}trim(){let{text:i,count:e}=Ltt(this.#t);return this.#t=i,this.#r(),e}finish(){return this.#r(),{text:this.#e.join(""),positions:this.#o}}},TXt=DXt,Ob=Symbol("MODE_BREAK"),ry=Symbol("MODE_FLAT"),F_e=Symbol("DOC_FILL_PRINTED_LENGTH");VZ=class extends Error{name="ArgExpansionBailout"};HZ=kXt,dy=(i,{originalText:e})=>{let t=tn(i);if(HZ(e,t))return!0;let n=QZ(i);return n===t?!1:HZ(e,n)},IXt=Ji(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Mtt=IXt,LXt=Ji(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);Rtt=NXt;FXt=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];Ftt=zXt,gSe=()=>!0;WXt=Ji(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]),UXt=i=>{let{node:e}=i;return WXt(e)?i.parent.type!=="DeclareExportDeclaration"&&!e.implicitDeclare:e.declare};jXt=Ji(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);get=i=>i.type==="UnaryExpression"&&i.operator==="!";GXt=i=>i.mark!=="commentBeforeArrow";JXt=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,XXt=i=>JXt.test(i),ZXt=XXt;tz=$Xt,Htt=Object.freeze({character:"'",codePoint:39}),Wtt=Object.freeze({character:'"',codePoint:34}),eZt=Object.freeze({preferred:Htt,alternate:Wtt}),tZt=Object.freeze({preferred:Wtt,alternate:Htt});iZt=/\\(["'\\])|(["'])/g;oZt=nZt;dI=rZt,jtt=i=>i.type==="TSEnumMember",Qtt=i=>jtt(i)?"id":"key",iz=i=>i[Qtt(i)],Gtt=i=>!jtt(i)&&i.computed;sZt=({parser:i})=>i==="typescript"||i==="babel-ts"||i==="oxc-ts"||i==="yuku-ts";lZt=new WeakMap;dZt=Ji(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),hZt=Ji(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);mZt=new WeakSet;$tt=i=>i.match(e=>e.type==="TSTypeAnnotation",(e,t)=>(t==="returnType"||t==="typeAnnotation")&&(e.type==="TSFunctionType"||e.type==="TSConstructorType"))?"=>":i.match(e=>e.type==="TSTypeAnnotation",(e,t)=>t==="typeAnnotation"&&(e.type==="TSJSDocNullableType"||e.type==="TSJSDocNonNullableType"||e.type==="TSTypePredicate"))||i.match(e=>e.type==="TypeAnnotation",(e,t)=>t==="typeAnnotation"&&e.type==="Identifier",(e,t)=>t==="id"&&e.type==="DeclareFunction")||i.match(e=>e.type==="TypeAnnotation",(e,t)=>t==="typeAnnotation"&&e.type==="Identifier",(e,t)=>t==="id"&&e.type==="DeclareHook")||i.match(e=>e.type==="TypeAnnotation",(e,t)=>t==="bound"&&e.type==="TypeParameter"&&e.usesExtendsBound)?"":":";gZt=({node:i,key:e,parent:t})=>e==="value"&&i.type==="FunctionExpression"&&(t.type==="ObjectMethod"||t.type==="ClassMethod"||t.type==="ClassPrivateMethod"||t.type==="MethodDefinition"||t.type==="TSAbstractMethodDefinition"||t.type==="TSDeclareMethod"||t.type==="Property"&&kF(t));_Se=({node:i,parent:e})=>i.type==="ExpressionStatement"&&e.type==="Program"&&e.body.length===1&&(Array.isArray(e.directives)&&e.directives.length===0||!e.directives);AZt=Ji(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);yZt=vZt;xZt=wZt;_Zt=CZt;DZt=new WeakMap;bet=/^[fx]?(?:describe|it|test)$/;P_e=[(i,e)=>e==="properties"&&i.type==="ObjectExpression",(i,e)=>e==="arguments"&&i.type==="CallExpression"&&i.callee.type==="Identifier"&&i.callee.name==="Component",(i,e)=>e==="expression"&&i.type==="Decorator"];zZt=i=>OZt(i)||PZt(i)||BZt(i)||LZt(i);C_e=0;jZt=dit.bind(void 0,"html"),QZt=dit.bind(void 0,"angular");KZt=[{test:zZt,print:RZt},{test:WZt,print:VZt},{test:UZt,print:jZt},{test:NZt,print:QZt},{test:YZt,print:GZt}].map(({test:i,print:e})=>({test:i,print:XZt(e)}));$Zt=JZt;r$t=new Set(["range","raw","comments","extra","start","end","loc","errors","tokens","trailingComma","docblock","__contentEnd"]),xF=i=>{for(let e of i.quasis)delete e.value};fit.ignoredProperties=r$t;s$t=/\*\/$/,a$t=/^\/\*\*?/,pit=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,l$t=/(^|\s+)\/\/([^\n\r]*)/g,yet=/^(\r?\n)+/,c$t=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,wet=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,u$t=/(\r?\n|^) *\* ?/g,mit=[];m$t="format";b$t=g$t;w$t=new WeakMap;S$t=class{#e;constructor(i){this.#e=new Set(i)}getLeadingWhitespaceCount(i){let e=this.#e,t=0;for(let n=0;n=0&&e.has(i.charAt(n));n--)t++;return t}getLeadingWhitespace(i){let e=this.getLeadingWhitespaceCount(i);return i.slice(0,e)}getTrailingWhitespace(i){let e=this.getTrailingWhitespaceCount(i);return i.slice(i.length-e)}hasLeadingWhitespace(i){return this.#e.has(i.charAt(0))}hasTrailingWhitespace(i){return this.#e.has(Go(0,i,-1))}trimStart(i){let e=this.getLeadingWhitespaceCount(i);return i.slice(e)}trimEnd(i){let e=this.getTrailingWhitespaceCount(i);return i.slice(0,i.length-e)}trim(i){return this.trimEnd(this.trimStart(i))}split(i,e=!1){let t=`[${_$t([...this.#e].join(""))}]+`,n=new RegExp(e?`(${t})`:t);return i.split(n)}hasWhitespaceCharacter(i){let e=this.#e;return Array.prototype.some.call(i,t=>e.has(t))}hasNonWhitespaceCharacter(i){let e=this.#e;return Array.prototype.some.call(i,t=>!e.has(t))}isWhitespaceOnly(i){let e=this.#e;return Array.prototype.every.call(i,t=>e.has(t))}#t(i){let e=Number.POSITIVE_INFINITY;for(let t of i.split(` `)){if(t.length===0)continue;let n=this.getLeadingWhitespaceCount(t);if(n===0)return 0;t.length!==n&&nt.slice(e)).join(` -`)}},Nci=Lci,pX=new Nci(` -\r `);iSe=Rci,Fci=class extends Error{name="UnexpectedNodeError";constructor(i,e,t="type"){super(`Unexpected ${e} node ${t}: ${JSON.stringify(i[t])}.`),this.node=i}},VR=Fci;Pci=0;git=i=>i.type==="BinaryExpression"&&i.operator==="|";Hci=Ji(["CallExpression","OptionalCallExpression","AssignmentExpression"]);Gci=new WeakMap;qci=i=>i.type==="SequenceExpression";$ci=.25;tui=new Set(["!","-","+","~"]),iui=Ji(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]);g_e=nui;cui=i=>Ts(i)&&Db(i).length>0;fui=hui;pui=["require","require.resolve","require.resolve.paths","import.meta.resolve"];kui=Array.prototype.findLast??function(i){for(let e=this.length-1;e>=0;e--){let t=this[e];if(i(t,e,this))return t}},Iui=x_e("findLast",function(){if(Array.isArray(this))return kui}),Lui=Iui;Rui=Mui,Trt=["properties","indexers","callProperties","internalSlots"];Cit=Ji(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]),Irt=i=>{if(i.computed||i.typeAnnotation)return!1;let{type:e,name:t}=i.key;return e==="Identifier"&&(t==="static"||t==="get"||t==="set")};Bui=Ji(["TSPropertySignature"]);zui=Rui("heritageGroup"),Vui=Ji(["TSInterfaceDeclaration","DeclareInterface","InterfaceDeclaration","InterfaceTypeAnnotation"]);Uui=new WeakMap;Gui=(i,e,t)=>HR(i,e,t,"consequent"),qui=(i,e,t)=>HR(i,e,t,"alternate");Kui=Ji(["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"]);Jui=Ji(["FunctionExpression","ArrowFunctionExpression"]);ndi=(i,{originalText:e})=>Dnt(e,yn(i));adi="use strict";Brt=Ji(["ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportDeclaration","DeclareExportAllDeclaration"]),ldi=Ji(["EnumBody","EnumBooleanBody","EnumNumberBody","EnumBigIntBody","EnumStringBody","EnumSymbolBody"]);zrt=i=>i.type==="ExportDefaultDeclaration"||i.type==="DeclareExportDeclaration"&&i.default;ddi=Ji(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);mdi=i=>{let{attributes:e}=i;if(e.length!==1)return!1;let[t]=e,{type:n,key:r,value:o}=t;return n==="ImportAttribute"&&(r.type==="Identifier"&&r.name==="type"||Fu(r)&&r.value==="type")&&Fu(o)&&!$t(t)&&!$t(r)&&!$t(o)};_di=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);kdi=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);n_e=i=>[wr("("),bt([dt,i]),dt,wr(")")];iot=Ji(["MatchWildcardPattern","MatchLiteralPattern","MatchUnaryPattern","MatchIdentifierPattern"]);r_e=i=>i===""||i===li||i===gt||i===dt;shi=Ji(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","NewExpression","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot","MatchExpressionCase"]);Thi=Ji(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);Ihi={experimental_avoidAstMutation:!0,experimental_locForRangeFormat:{locStart:yn,locEnd:CX}},cot={features:Ihi,massageAstNode:ort,canAttachComment:moi,handleComments:hsi,isGap:psi,willPrintOwnComments:Eli,embed:oci,insertPragma:Sci,printComment:Tci,printPrettierIgnored:Mit,print:Mit,getVisitorKeys:ant,isBlockComment:ev,hasPrettierIgnore:iSe},Lhi=[{name:"JSON.stringify",type:"data",aceMode:"json",extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",aceMode:"json",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".slnlaunch",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",aceMode:"javascript",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],tmScope:"source.json.comments",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",aceMode:"json5",extensions:[".json5"],tmScope:"source.js",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],uot={};w_e(uot,{estree:()=>cot,"estree-json":()=>Phi});Nhi={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},Mhi=snt(Nhi),Rhi=Mhi;Fhi=new Set(["start","end","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);dot.ignoredProperties=Fhi;Phi={massageAstNode:dot,print:Ohi,getVisitorKeys:Rhi},p9={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},eS="JavaScript",Bhi={arrowParens:{category:eS,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:p9.bracketSameLine,objectWrap:p9.objectWrap,bracketSpacing:p9.bracketSpacing,jsxBracketSameLine:{category:eS,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:eS,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:eS,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:eS,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:p9.singleQuote,jsxSingleQuote:{category:eS,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:eS,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:eS,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:p9.singleAttributePerLine},hot=Bhi,fot={...Oit,...uot},pot=[...Vri,...Lhi]});var Aot=Ue((vot,cSe)=>{(function(i){function e(){var n=i();return n.default||n}if(typeof vot=="object"&&typeof cSe=="object")cSe.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var i=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,r=(b,m)=>{for(var x in m)i(b,x,{get:m[x],enumerable:!0})},o=(b,m,x,S)=>{if(m&&typeof m=="object"||typeof m=="function")for(let k of t(m))!n.call(b,k)&&k!==x&&i(b,k,{get:()=>m[k],enumerable:!(S=e(m,k))||S.enumerable});return b},s=b=>o(i({},"__esModule",{value:!0}),b),a={};r(a,{parsers:()=>X7t});var l={};r(l,{__babel_estree:()=>j7t,__js_expression:()=>fGe,__ts_expression:()=>pGe,__vue_event_binding:()=>dGe,__vue_expression:()=>fGe,__vue_ts_event_binding:()=>hGe,__vue_ts_expression:()=>pGe,babel:()=>dGe,"babel-flow":()=>mGe,"babel-ts":()=>hGe});var c=(b,m)=>(x,S,...k)=>x|1&&S==null?void 0:(m.call(S)??S[b]).apply(S,k),u=String.prototype.replaceAll??function(b,m){return b.global?this.replace(b,m):this.split(b).join(m)},d=c("replaceAll",function(){if(typeof this=="string")return u}),h=d,f=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),p=f,g=class{constructor(b,m,x){this.line=void 0,this.column=void 0,x!==void 0&&(this.index=void 0),this.line=b,this.column=m,x!==void 0&&(this.index=x)}},v=class{start;end;filename;identifierName;constructor(b,m){this.start=b,this.end=m}};function A(b,m){let{line:x,column:S,index:k}=b;return new g(x,S+m,k+m)}var w="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",C={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:w},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:w}},_={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},E=b=>b.type==="UpdateExpression"?_.UpdateExpression[`${b.prefix}`]:_[b.type],I={AccessorIsGenerator:({kind:b})=>`A ${b}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:b})=>`Missing initializer in ${b} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:b})=>`\`${b}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:b,exportName:m})=>`A string literal cannot be used as an exported binding without \`from\`. +`)}},E$t=S$t,OZ=new E$t(` +\r `);SSe=T$t,k$t=class extends Error{name="UnexpectedNodeError";constructor(i,e,t="type"){super(`Unexpected ${e} node ${t}: ${JSON.stringify(i[t])}.`),this.node=i}},NF=k$t;L$t=0;Cet=i=>i.type==="BinaryExpression"&&i.operator==="|";F$t=Ji(["CallExpression","OptionalCallExpression","AssignmentExpression"]);V$t=new WeakMap;H$t=i=>i.type==="SequenceExpression";q$t=.25;K$t=new Set(["!","-","+","~"]),J$t=Ji(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]);z_e=X$t;nei=i=>Ms(i)&&Vb(i).length>0;aei=sei;lei=["require","require.resolve","require.resolve.paths","import.meta.resolve"];Cei=Array.prototype.findLast??function(i){for(let e=this.length-1;e>=0;e--){let t=this[e];if(i(t,e,this))return t}},_ei=Q_e("findLast",function(){if(Array.isArray(this))return Cei}),Sei=_ei;Tei=Dei,Oit=["properties","indexers","callProperties","internalSlots"];Let=Ji(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]),Bit=i=>{if(i.computed||i.typeAnnotation)return!1;let{type:e,name:t}=i.key;return e==="Identifier"&&(t==="static"||t==="get"||t==="set")};Nei=Ji(["TSPropertySignature"]);Mei=Tei("heritageGroup"),Rei=Ji(["TSInterfaceDeclaration","DeclareInterface","InterfaceDeclaration","InterfaceTypeAnnotation"]);Pei=new WeakMap;Vei=(i,e,t)=>MF(i,e,t,"consequent"),Hei=(i,e,t)=>MF(i,e,t,"alternate");Uei=Ji(["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"]);jei=Ji(["FunctionExpression","ArrowFunctionExpression"]);Xei=(i,{originalText:e})=>Ftt(e,yn(i));tti="use strict";Git=Ji(["ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportDeclaration","DeclareExportAllDeclaration"]),iti=Ji(["EnumBody","EnumBooleanBody","EnumNumberBody","EnumBigIntBody","EnumStringBody","EnumSymbolBody"]);qit=i=>i.type==="ExportDefaultDeclaration"||i.type==="DeclareExportDeclaration"&&i.default;rti=Ji(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);cti=i=>{let{attributes:e}=i;if(e.length!==1)return!1;let[t]=e,{type:n,key:o,value:r}=t;return n==="ImportAttribute"&&(o.type==="Identifier"&&o.name==="type"||Hu(o)&&o.value==="type")&&Hu(r)&&!Yt(t)&&!Yt(o)&&!Yt(r)};Ati=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);Cti=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);E_e=i=>[Co("("),bt([dt,i]),dt,Co(")")];unt=Ji(["MatchWildcardPattern","MatchLiteralPattern","MatchUnaryPattern","MatchIdentifierPattern"]);D_e=i=>i===""||i===ti||i===gt||i===dt;eii=Ji(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","NewExpression","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot","MatchExpressionCase"]);xii=Ji(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);_ii={experimental_avoidAstMutation:!0,experimental_locForRangeFormat:{locStart:yn,locEnd:QZ}},bnt={features:_ii,massageAstNode:fit,canAttachComment:cKt,handleComments:sJt,isGap:lJt,willPrintOwnComments:yZt,embed:$Zt,insertPragma:v$t,printComment:x$t,printPrettierIgnored:Het,print:Het,getVisitorKeys:mtt,isBlockComment:yA,hasPrettierIgnore:SSe},Sii=[{name:"JSON.stringify",type:"data",aceMode:"json",extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",aceMode:"json",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".slnlaunch",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",aceMode:"javascript",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],tmScope:"source.json.comments",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",aceMode:"json5",extensions:[".json5"],tmScope:"source.js",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],Ant={};j_e(Ant,{estree:()=>bnt,"estree-json":()=>Lii});Eii={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},Dii=ptt(Eii),Tii=Dii;kii=new Set(["start","end","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);vnt.ignoredProperties=kii;Lii={massageAstNode:vnt,print:Iii,getVisitorKeys:Tii},G7={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},_S="JavaScript",Nii={arrowParens:{category:_S,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:G7.bracketSameLine,objectWrap:G7.objectWrap,bracketSpacing:G7.bracketSpacing,jsxBracketSameLine:{category:_S,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:_S,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:_S,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:_S,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:G7.singleQuote,jsxSingleQuote:{category:_S,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:_S,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:_S,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:G7.singleAttributePerLine},ynt=Nii,wnt={...jet,...Ant},xnt=[...RYt,...Sii]});var Dnt=la((Ent,NSe)=>{(function(i){function e(){var n=i();return n.default||n}if(typeof Ent=="object"&&typeof NSe=="object")NSe.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var i=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o=(b,m)=>{for(var x in m)i(b,x,{get:m[x],enumerable:!0})},r=(b,m,x,S)=>{if(m&&typeof m=="object"||typeof m=="function")for(let k of t(m))!n.call(b,k)&&k!==x&&i(b,k,{get:()=>m[k],enumerable:!(S=e(m,k))||S.enumerable});return b},s=b=>r(i({},"__esModule",{value:!0}),b),a={};o(a,{parsers:()=>$6t});var l={};o(l,{__babel_estree:()=>G6t,__js_expression:()=>OGe,__ts_expression:()=>PGe,__vue_event_binding:()=>RGe,__vue_expression:()=>OGe,__vue_ts_event_binding:()=>FGe,__vue_ts_expression:()=>PGe,babel:()=>RGe,"babel-flow":()=>BGe,"babel-ts":()=>FGe});var c=(b,m)=>(x,S,...k)=>x|1&&S==null?void 0:(m.call(S)??S[b]).apply(S,k),u=String.prototype.replaceAll??function(b,m){return b.global?this.replace(b,m):this.split(b).join(m)},d=c("replaceAll",function(){if(typeof this=="string")return u}),h=d,f=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),p=f,g=class{constructor(b,m,x){this.line=void 0,this.column=void 0,x!==void 0&&(this.index=void 0),this.line=b,this.column=m,x!==void 0&&(this.index=x)}},A=class{start;end;filename;identifierName;constructor(b,m){this.start=b,this.end=m}};function v(b,m){let{line:x,column:S,index:k}=b;return new g(x,S+m,k+m)}var w="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",C={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:w},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:w}},_={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},E=b=>b.type==="UpdateExpression"?_.UpdateExpression[`${b.prefix}`]:_[b.type],I={AccessorIsGenerator:({kind:b})=>`A ${b}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:b})=>`Missing initializer in ${b} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:b})=>`\`${b}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:b,exportName:m})=>`A string literal cannot be used as an exported binding without \`from\`. - Did you mean \`export { '${b}' as '${m}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:b})=>`'${b==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:b})=>`Unsyntactic ${b==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:b})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${b}" as foo }\`?`,ImportCallArity:({phase:b})=>`\`import${b?`.${b}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:b})=>`Cannot use new with import${b?`.${b}`:""}().`,ImportCallSpreadArgument:({phase:b})=>`\`...\` is not allowed in \`import${b?`.${b}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:b})=>`Expected number in radix ${b}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:b})=>`Escape sequence in keyword ${b}.`,InvalidIdentifier:({identifierName:b})=>`Invalid identifier ${b}.`,InvalidLhs:({ancestor:b})=>`Invalid left-hand side in ${E(b)}.`,InvalidLhsBinding:({ancestor:b})=>`Binding invalid left-hand side in ${E(b)}.`,InvalidLhsOptionalChaining:({ancestor:b})=>`Invalid optional chaining in the left-hand side of ${E(b)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:b})=>`Unexpected character '${b}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:b})=>`Private name #${b} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:b})=>`Label '${b}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:b})=>`This experimental syntax requires enabling the parser plugin: ${b.map(m=>JSON.stringify(m)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:b})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${b.map(m=>JSON.stringify(m)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:b})=>`Duplicate key "${b}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:b})=>`An export name cannot include a lone surrogate, found '\\u${b.toString(16)}'.`,ModuleExportUndefined:({localName:b})=>`Export '${b}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:b})=>`Private names are only allowed in property accesses (\`obj.#${b}\`) or in \`in\` expressions (\`#${b} in obj\`).`,PrivateNameRedeclaration:({identifierName:b})=>`Duplicate private name #${b}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:b})=>`Unexpected keyword '${b}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:b})=>`Unexpected reserved word '${b}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:b,unexpected:m})=>`Unexpected token${m?` '${m}'.`:""}${b?`, expected "${b}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:b,onlyValidPropertyName:m})=>`The only valid meta property for ${b} is ${b}.${m}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:b})=>`Identifier '${b}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},T={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:b})=>`Assigning to '${b}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:b})=>`Binding '${b}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},L={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:b})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(b)}\`.`},M=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),z={PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:b})=>`Invalid topic token ${b}. In order to use ${b} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${b}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:b})=>`Hack-style pipe body cannot be an unparenthesized ${E({type:b})}; please wrap it in parentheses.`,PipelineUnparenthesized:"Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses."},H={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."};function B(b,m,x){Object.defineProperty(b,m,{enumerable:!1,configurable:!0,value:x})}function q({toMessage:b,code:m,reasonCode:x,syntaxPlugin:S}){let k=x==="MissingPlugin"||x==="MissingOneOfPlugins";return function O(Q,X,ge){let he=new SyntaxError;return he.code=m,he.reasonCode=x,he.loc=Q,he.pos=X,he.syntaxPlugin=S,k&&(he.missingPlugin=ge.missingPlugin),B(he,"clone",function(lt={}){let{line:Ot,column:ji,index:Yn=X}=lt.loc??Q;return O(new g(Ot,ji),Yn,{...ge,...lt.details})}),B(he,"details",ge),Object.defineProperty(he,"message",{configurable:!0,get(){let lt=`${b(ge)} (${Q.line}:${Q.column})`;return this.message=lt,lt},set(lt){Object.defineProperty(this,"message",{value:lt,writable:!0})}}),he}}function U(b,m){if(Array.isArray(b))return S=>U(S,b[0]);let x={};for(let S of Object.keys(b)){let k=b[S],{message:O,...Q}=typeof k=="string"?{message:()=>k}:typeof k=="function"?{message:k}:k,X=typeof O=="string"?()=>O:O;x[S]=q({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:S,toMessage:X,...m?{syntaxPlugin:m}:{},...Q})}return x}var F={...U(C),...U(I),...U(T),...U(L),...U`pipelineOperator`(z),...U`functionBind`(H)};function ne(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function ce(b){let m=ne();if(b==null)return m;if(b.annexB!=null&&b.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let x of Object.keys(m))b[x]!=null&&(m[x]=b[x]);if(m.startLine===1)b.startIndex==null&&m.startColumn>0?m.startIndex=m.startColumn:b.startColumn==null&&m.startIndex>0&&(m.startColumn=m.startIndex);else if(b.startColumn==null||b.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(m.sourceType==="commonjs"){if(b.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(b.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(b.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return m}function se(b){let{start:m,end:x}=b.loc;return b.loc.start=new g(m.line,m.column),b.loc.end=new g(x.line,x.column),b}var le=b=>class extends b{createPosition(m){return new g(m.line,m.column)}parse(){let m=super.parse();return this.optionFlags&512&&(m.tokens=m.tokens.map(se)),se(m)}parseRegExpLiteral({pattern:m,flags:x}){let S=null;try{S=new RegExp(m,x)}catch{}let k=this.estreeParseLiteral(S);return k.regex={pattern:m,flags:x},k}parseBigIntLiteral(m){let x;try{x=BigInt(m)}catch{x=null}let S=this.estreeParseLiteral(x);return S.bigint=String(S.value||m),S}estreeParseLiteral(m){return this.parseLiteral(m,"Literal")}parseStringLiteral(m){return this.estreeParseLiteral(m)}parseNumericLiteral(m){return this.estreeParseLiteral(m)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(m){return this.estreeParseLiteral(m)}estreeParseChainExpression(m,x){let S=this.startNodeAtNode(m);return S.expression=m,this.finishNodeAtNode(S,"ChainExpression",x)}directiveToStmt(m){let x=m.value;delete m.value,this.castNodeTo(x,"Literal"),x.raw=x.extra.raw,x.value=x.extra.expressionValue;let S=this.castNodeTo(m,"ExpressionStatement");return S.expression=x,S.directive=x.extra.rawValue,delete x.extra,S}fillOptionalPropertiesForTSESLint(m){}cloneEstreeStringLiteral(m){let{start:x,end:S,loc:k,range:O,raw:Q,value:X}=m,ge=Object.create(m.constructor.prototype);return ge.type="Literal",ge.start=x,ge.end=S,ge.loc=k,ge.range=O,ge.raw=Q,ge.value=X,ge}initFunction(m,x){super.initFunction(m,x),m.expression=!1}checkDeclaration(m){m!=null&&this.isObjectProperty(m)?this.checkDeclaration(m.value):super.checkDeclaration(m)}getObjectOrClassMethodParams(m){return m.value.params}isValidDirective(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"&&!m.expression.extra?.parenthesized}parseBlockBody(m,x,S,k,O){super.parseBlockBody(m,x,S,k,O);let Q=m.directives.map(X=>this.directiveToStmt(X));m.body=Q.concat(m.body),delete m.directives}parsePrivateName(){let m=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(m)}convertPrivateNameToPrivateIdentifier(m){let x=super.getPrivateNameSV(m);return delete m.id,m.name=x,this.castNodeTo(m,"PrivateIdentifier")}isPrivateName(m){return m.type==="PrivateIdentifier"}getPrivateNameSV(m){return m.name}parseLiteral(m,x){let S=super.parseLiteral(m,x);return S.raw=S.extra.raw,delete S.extra,S}parseFunctionBody(m,x,S=!1){super.parseFunctionBody(m,x,S),m.expression=m.body.type!=="BlockStatement"}parseMethod(m,x,S,k,O,Q,X=!1){let ge=this.startNode();ge.kind=m.kind,ge=super.parseMethod(ge,x,S,k,O,Q,X),delete ge.kind;let{typeParameters:he}=m;he&&(delete m.typeParameters,ge.typeParameters=he,this.resetStartLocationFromNode(ge,he));let lt=this.castNodeTo(ge,this.hasPlugin("typescript")&&!ge.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return m.value=lt,Q==="ClassPrivateMethod"&&(m.computed=!1),this.hasPlugin("typescript")&&m.abstract?(delete m.abstract,this.finishNode(m,"TSAbstractMethodDefinition")):Q==="ObjectMethod"?(m.kind==="method"&&(m.kind="init"),m.shorthand=!1,this.finishNode(m,"Property")):this.finishNode(m,"MethodDefinition")}nameIsConstructor(m){return m.type==="Literal"?m.value==="constructor":super.nameIsConstructor(m)}parseClassProperty(...m){let x=super.parseClassProperty(...m);return x.abstract&&this.hasPlugin("typescript")?(delete x.abstract,this.castNodeTo(x,"TSAbstractPropertyDefinition")):this.castNodeTo(x,"PropertyDefinition"),x}parseClassPrivateProperty(...m){let x=super.parseClassPrivateProperty(...m);return x.abstract&&this.hasPlugin("typescript")?this.castNodeTo(x,"TSAbstractPropertyDefinition"):this.castNodeTo(x,"PropertyDefinition"),x.computed=!1,x}parseClassAccessorProperty(m){let x=super.parseClassAccessorProperty(m);return x.abstract&&this.hasPlugin("typescript")?(delete x.abstract,this.castNodeTo(x,"TSAbstractAccessorProperty")):this.castNodeTo(x,"AccessorProperty"),x}parseObjectProperty(m,x,S,k){let O=super.parseObjectProperty(m,x,S,k);return O&&(O.kind="init",this.castNodeTo(O,"Property")),O}finishObjectProperty(m){return m.kind="init",this.finishNode(m,"Property")}isValidLVal(m,x,S,k){return m==="Property"?"value":super.isValidLVal(m,x,S,k)}isAssignable(m,x){return m!=null&&this.isObjectProperty(m)?this.isAssignable(m.value,x):super.isAssignable(m,x)}toAssignable(m,x=!1){if(m!=null&&this.isObjectProperty(m)){let{key:S,value:k}=m;this.isPrivateName(S)&&this.classScope.usePrivateName(this.getPrivateNameSV(S),S.start),this.toAssignable(k,x)}else super.toAssignable(m,x)}toAssignableObjectExpressionProp(m,x,S){m.type==="Property"&&(m.kind==="get"||m.kind==="set")?this.raise(F.PatternHasAccessor,m.key):m.type==="Property"&&m.method?this.raise(F.PatternHasMethod,m.key):super.toAssignableObjectExpressionProp(m,x,S)}finishCallExpression(m,x){let S=super.finishCallExpression(m,x);return S.callee.type==="Import"?(this.castNodeTo(S,"ImportExpression"),S.source=S.arguments[0],S.options=S.arguments[1]??null,delete S.arguments,delete S.callee):S.type==="OptionalCallExpression"?this.castNodeTo(S,"CallExpression"):S.optional=!1,S}parseExport(m,x){let S=this.state.lastTokStartLoc,k=super.parseExport(m,x);switch(k.type){case"ExportAllDeclaration":k.exported=null;break;case"ExportNamedDeclaration":k.specifiers.length===1&&k.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(k,"ExportAllDeclaration"),k.exported=k.specifiers[0].exported,delete k.specifiers);case"ExportDefaultDeclaration":{let{declaration:O}=k;O?.type==="ClassDeclaration"&&O.decorators?.length>0&&O.start===k.start&&this.resetStartLocation(k,S)}break}return k}stopParseSubscript(m,x){let S=super.stopParseSubscript(m,x);return x.optionalChainMember?this.estreeParseChainExpression(S,m):S}parseMember(m,x,S,k,O){let Q=super.parseMember(m,x,S,k,O);return Q.type==="OptionalMemberExpression"?this.castNodeTo(Q,"MemberExpression"):Q.optional=!1,Q}isOptionalMemberExpression(m){return m.type==="ChainExpression"?m.expression.type==="MemberExpression":super.isOptionalMemberExpression(m)}hasPropertyAsPrivateName(m){return m.type==="ChainExpression"&&(m=m.expression),super.hasPropertyAsPrivateName(m)}isObjectProperty(m){return m.type==="Property"&&m.kind==="init"&&!m.method}isObjectMethod(m){return m.type==="Property"&&(m.method||m.kind==="get"||m.kind==="set")}castNodeTo(m,x){let S=super.castNodeTo(m,x);return this.fillOptionalPropertiesForTSESLint(S),S}cloneIdentifier(m){let x=super.cloneIdentifier(m);return this.fillOptionalPropertiesForTSESLint(x),x}cloneStringLiteral(m){return m.type==="Literal"?this.cloneEstreeStringLiteral(m):super.cloneStringLiteral(m)}finishNodeAt(m,x,S){return se(super.finishNodeAt(m,x,S))}finishNodeAtNode(m,x,S){return se(super.finishNodeAtNode(m,x,S))}finishNode(m,x){let S=super.finishNode(m,x);return this.fillOptionalPropertiesForTSESLint(S),S}resetStartLocation(m,x){super.resetStartLocation(m,x),se(m)}resetEndLocation(m,x=this.state.lastTokEndLoc){super.resetEndLocation(m,x),se(m)}},oe=!0,fe=!0,Re=!0,ft=!0,At=!0,Dt=!0,Ct=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(b,m={}){this.label=b,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.rightAssociative=!!m.rightAssociative,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop!=null?m.binop:null}},Xt=new Map;function Be(b,m={}){m.keyword=b;let x=Je(b,m);return Xt.set(b,x),x}function Vt(b,m){return Je(b,{beforeExpr:oe,binop:m})}var Li=-1,ei=[],Ni=[],Ke=[],St=[],yt=[],at=[];function Je(b,m={}){return++Li,Ni.push(b),Ke.push(m.binop??-1),St.push(m.beforeExpr??!1),yt.push(m.startsExpr??!1),at.push(m.prefix??!1),ei.push(new Ct(b,m)),Li}function xt(b,m={}){return++Li,Xt.set(b,Li),Ni.push(b),Ke.push(m.binop??-1),St.push(m.beforeExpr??!1),yt.push(m.startsExpr??!1),at.push(m.prefix??!1),ei.push(new Ct("name",m)),Li}var Ti={bracketL:Je("[",{beforeExpr:oe,startsExpr:fe}),bracketR:Je("]"),braceL:Je("{",{beforeExpr:oe,startsExpr:fe}),braceBarL:Je("{|",{beforeExpr:oe,startsExpr:fe}),braceR:Je("}"),braceBarR:Je("|}"),parenL:Je("(",{beforeExpr:oe,startsExpr:fe}),parenR:Je(")"),comma:Je(",",{beforeExpr:oe}),semi:Je(";",{beforeExpr:oe}),colon:Je(":",{beforeExpr:oe}),doubleColon:Je("::",{beforeExpr:oe}),dot:Je("."),question:Je("?",{beforeExpr:oe}),questionDot:Je("?."),arrow:Je("=>",{beforeExpr:oe}),template:Je("template"),ellipsis:Je("...",{beforeExpr:oe}),backQuote:Je("`",{startsExpr:fe}),dollarBraceL:Je("${",{beforeExpr:oe,startsExpr:fe}),templateTail:Je("...`",{startsExpr:fe}),templateNonTail:Je("...${",{beforeExpr:oe,startsExpr:fe}),at:Je("@"),hash:Je("#",{startsExpr:fe}),interpreterDirective:Je("#!..."),eq:Je("=",{beforeExpr:oe,isAssign:ft}),assign:Je("_=",{beforeExpr:oe,isAssign:ft}),slashAssign:Je("_=",{beforeExpr:oe,isAssign:ft}),xorAssign:Je("_=",{beforeExpr:oe,isAssign:ft}),moduloAssign:Je("_=",{beforeExpr:oe,isAssign:ft}),incDec:Je("++/--",{prefix:At,postfix:Dt,startsExpr:fe}),bang:Je("!",{beforeExpr:oe,prefix:At,startsExpr:fe}),tilde:Je("~",{beforeExpr:oe,prefix:At,startsExpr:fe}),doubleCaret:Je("^^",{startsExpr:fe}),doubleAt:Je("@@",{startsExpr:fe}),pipeline:Vt("|>",0),nullishCoalescing:Vt("??",1),logicalOR:Vt("||",1),logicalAND:Vt("&&",2),bitwiseOR:Vt("|",3),bitwiseXOR:Vt("^",4),bitwiseAND:Vt("&",5),equality:Vt("==/!=/===/!==",6),lt:Vt("/<=/>=",7),gt:Vt("/<=/>=",7),relational:Vt("/<=/>=",7),bitShift:Vt("<>/>>>",8),bitShiftL:Vt("<>/>>>",8),bitShiftR:Vt("<>/>>>",8),plusMin:Je("+/-",{beforeExpr:oe,binop:9,prefix:At,startsExpr:fe}),modulo:Je("%",{binop:10,startsExpr:fe}),star:Je("*",{binop:10}),slash:Vt("/",10),exponent:Je("**",{beforeExpr:oe,binop:11,rightAssociative:!0}),_in:Be("in",{beforeExpr:oe,binop:7}),_instanceof:Be("instanceof",{beforeExpr:oe,binop:7}),_break:Be("break"),_case:Be("case",{beforeExpr:oe}),_catch:Be("catch"),_continue:Be("continue"),_debugger:Be("debugger"),_default:Be("default",{beforeExpr:oe}),_else:Be("else",{beforeExpr:oe}),_finally:Be("finally"),_function:Be("function",{startsExpr:fe}),_if:Be("if"),_return:Be("return",{beforeExpr:oe}),_switch:Be("switch"),_throw:Be("throw",{beforeExpr:oe,prefix:At,startsExpr:fe}),_try:Be("try"),_var:Be("var"),_const:Be("const"),_with:Be("with"),_new:Be("new",{beforeExpr:oe,startsExpr:fe}),_this:Be("this",{startsExpr:fe}),_super:Be("super",{startsExpr:fe}),_class:Be("class",{startsExpr:fe}),_extends:Be("extends",{beforeExpr:oe}),_export:Be("export"),_import:Be("import",{startsExpr:fe}),_null:Be("null",{startsExpr:fe}),_true:Be("true",{startsExpr:fe}),_false:Be("false",{startsExpr:fe}),_typeof:Be("typeof",{beforeExpr:oe,prefix:At,startsExpr:fe}),_void:Be("void",{beforeExpr:oe,prefix:At,startsExpr:fe}),_delete:Be("delete",{beforeExpr:oe,prefix:At,startsExpr:fe}),_do:Be("do",{isLoop:Re,beforeExpr:oe}),_for:Be("for",{isLoop:Re}),_while:Be("while",{isLoop:Re}),_as:xt("as",{startsExpr:fe}),_assert:xt("assert",{startsExpr:fe}),_async:xt("async",{startsExpr:fe}),_await:xt("await",{startsExpr:fe}),_defer:xt("defer",{startsExpr:fe}),_from:xt("from",{startsExpr:fe}),_get:xt("get",{startsExpr:fe}),_let:xt("let",{startsExpr:fe}),_meta:xt("meta",{startsExpr:fe}),_of:xt("of",{startsExpr:fe}),_sent:xt("sent",{startsExpr:fe}),_set:xt("set",{startsExpr:fe}),_source:xt("source",{startsExpr:fe}),_static:xt("static",{startsExpr:fe}),_using:xt("using",{startsExpr:fe}),_yield:xt("yield",{startsExpr:fe}),_asserts:xt("asserts",{startsExpr:fe}),_checks:xt("checks",{startsExpr:fe}),_exports:xt("exports",{startsExpr:fe}),_global:xt("global",{startsExpr:fe}),_implements:xt("implements",{startsExpr:fe}),_intrinsic:xt("intrinsic",{startsExpr:fe}),_infer:xt("infer",{startsExpr:fe}),_is:xt("is",{startsExpr:fe}),_mixins:xt("mixins",{startsExpr:fe}),_proto:xt("proto",{startsExpr:fe}),_require:xt("require",{startsExpr:fe}),_satisfies:xt("satisfies",{startsExpr:fe}),_keyof:xt("keyof",{startsExpr:fe}),_readonly:xt("readonly",{startsExpr:fe}),_unique:xt("unique",{startsExpr:fe}),_abstract:xt("abstract",{startsExpr:fe}),_declare:xt("declare",{startsExpr:fe}),_enum:xt("enum",{startsExpr:fe}),_module:xt("module",{startsExpr:fe}),_namespace:xt("namespace",{startsExpr:fe}),_interface:xt("interface",{startsExpr:fe}),_type:xt("type",{startsExpr:fe}),_opaque:xt("opaque",{startsExpr:fe}),name:Je("name",{startsExpr:fe}),placeholder:Je("%%",{startsExpr:fe}),string:Je("string",{startsExpr:fe}),num:Je("num",{startsExpr:fe}),bigint:Je("bigint",{startsExpr:fe}),regexp:Je("regexp",{startsExpr:fe}),privateName:Je("#name",{startsExpr:fe}),eof:Je("eof"),jsxName:Je("jsxName"),jsxText:Je("jsxText",{beforeExpr:oe}),jsxTagStart:Je("jsxTagStart",{startsExpr:fe}),jsxTagEnd:Je("jsxTagEnd")};function Ut(b){return b>=89&&b<=129}function xr(b){return b<=88}function lr(b){return b>=54&&b<=129}function qo(b){return b>=54&&b<=132}function As(b){return St[b]}function Vr(b){return yt[b]}function Ca(b){return b>=25&&b<=29}function br(b){return b>=125&&b<=127}function Yo(b){return b>=86&&b<=88}function cr(b){return b>=54&&b<=88}function Wa(b){return b>=35&&b<=55}function Hr(b){return b===30}function cl(b){return at[b]}function ul(b){return b>=117&&b<=119}function Xr(b){return b>=120&&b<=126}function cs(b){return Ni[b]}function No(b){return Ke[b]}function ta(b){return b===53}function Ki(b){return b>=20&&b<=21}function Zr(b){return ei[b]}var $u=class{constructor(b,m){this.token=b,this.preserveSpace=!!m}token;preserveSpace},Cr={brace:new $u("{"),j_oTag:new $u("...",!0)},Mo="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088f\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5c\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdc-\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7dc\\ua7f1-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",Th="\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1add\\u1ae0-\\u1aeb\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65",ob=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Df=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],kh=new RegExp("["+Mo+"]"),Pi=new RegExp("["+Mo+Th+"]");function J(b,m){let x=65536;for(let S=0,k=m.length;Sb)return!1;if(x+=m[S+1],x>=b)return!0}return!1}function Z(b){return b<65?b===36:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&kh.test(String.fromCharCode(b)):J(b,ob)}function ie(b){return b<48?b===36:b<58?!0:b<65?!1:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Pi.test(String.fromCharCode(b)):J(b,ob)||J(b,Df)}var de={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ve=new Set(de.keyword),ze=new Set(de.strict),$e=new Set(de.strictBind);function Mt(b,m){return m&&b==="await"||b==="enum"}function Zt(b,m){return Mt(b,m)||ze.has(b)}function _i(b){return $e.has(b)}function pn(b,m){return Zt(b,m)||_i(b)}function Ln(b){return ve.has(b)}function fo(b,m,x){return b===64&&m===64&&Z(x)}var vr=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Ua(b){return vr.has(b)}var ia=class{flags=0;names=new Map;firstLexicalName="";constructor(b){this.flags=b}},ed=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(b,m){this.parser=b,this.inModule=m}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let b=this.currentThisScopeFlags();return(b&64)>0&&(b&2)===0}get inStaticBlock(){for(let b=this.scopeStack.length-1;;b--){let{flags:m}=this.scopeStack[b];if(m&128)return!0;if(m&3779)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(b){return new ia(b)}enter(b){this.scopeStack.push(this.createScope(b))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(b){return!!(b.flags&130||!this.parser.inModule&&b.flags&1)}declareName(b,m,x){let S=this.currentScope();if(m&8||m&16){this.checkRedeclarationInScope(S,b,m,x);let k=S.names.get(b)||0;m&16?k=k|4:(S.firstLexicalName||(S.firstLexicalName=b),k=k|2),S.names.set(b,k),m&8&&this.maybeExportDefined(S,b)}else if(m&4)for(let k=this.scopeStack.length-1;k>=0&&(S=this.scopeStack[k],this.checkRedeclarationInScope(S,b,m,x),S.names.set(b,(S.names.get(b)||0)|1),this.maybeExportDefined(S,b),!(S.flags&3715));--k);this.parser.inModule&&S.flags&1&&this.undefinedExports.delete(b)}maybeExportDefined(b,m){this.parser.inModule&&b.flags&1&&this.undefinedExports.delete(m)}checkRedeclarationInScope(b,m,x,S){this.isRedeclaredInScope(b,m,x)&&this.parser.raise(F.VarRedeclaration,S,{identifierName:m})}isRedeclaredInScope(b,m,x){if(!(x&1))return!1;if(x&8)return b.names.has(m);let S=b.names.get(m)||0;return x&16?(S&2)>0||!this.treatFunctionsAsVarInScope(b)&&(S&1)>0:(S&2)>0&&!(b.flags&8&&b.firstLexicalName===m)||!this.treatFunctionsAsVarInScope(b)&&(S&4)>0}checkLocalExport(b){let{name:m}=b;this.scopeStack[0].names.has(m)||this.undefinedExports.set(m,b.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let b=this.scopeStack.length-1;;b--){let{flags:m}=this.scopeStack[b];if(m&3715)return m}}currentThisScopeFlags(){for(let b=this.scopeStack.length-1;;b--){let{flags:m}=this.scopeStack[b];if(m&3779&&!(m&4))return m}}},gi=class extends ia{declareFunctions=new Set},Ce=class extends ed{createScope(b){return new gi(b)}declareName(b,m,x){let S=this.currentScope();if(m&2048){this.checkRedeclarationInScope(S,b,m,x),this.maybeExportDefined(S,b),S.declareFunctions.add(b);return}super.declareName(b,m,x)}isRedeclaredInScope(b,m,x){if(super.isRedeclaredInScope(b,m,x))return!0;if(x&2048&&!b.declareFunctions.has(m)){let S=b.names.get(m);return(S&4)>0||(S&2)>0}return!1}checkLocalExport(b){this.scopeStack[0].declareFunctions.has(b.name)||super.checkLocalExport(b)}},Et=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),nt={AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:b})=>`Cannot overwrite reserved type ${b}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:b,enumName:m})=>`Boolean enum members need to be initialized. Use either \`${b} = true,\` or \`${b} = false,\` in enum \`${m}\`.`,EnumDuplicateMemberName:({memberName:b,enumName:m})=>`Enum member names need to be unique, but the name \`${b}\` has already been used before in enum \`${m}\`.`,EnumInconsistentMemberValues:({enumName:b})=>`Enum \`${b}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:b,enumName:m})=>`Enum type \`${b}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${m}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:b})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${b}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:b,memberName:m,explicitType:x})=>`Enum \`${b}\` has type \`${x}\`, so the initializer of \`${m}\` needs to be a ${x} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:b,memberName:m})=>`Symbol enum members cannot be initialized. Use \`${m},\` in enum \`${b}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:b,memberName:m})=>`The enum member initializer for \`${m}\` needs to be a literal (either a boolean, number, or string) in enum \`${b}\`.`,EnumInvalidMemberName:({enumName:b,memberName:m,suggestion:x})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${m}\`, consider using \`${x}\`, in enum \`${b}\`.`,EnumNumberMemberNotInitialized:({enumName:b,memberName:m})=>`Number enum members need to be initialized, e.g. \`${m} = 1\` in enum \`${b}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:b})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${b}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:{message:"A binding pattern parameter cannot be optional in an implementation signature."},SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:b})=>`Unexpected reserved type ${b}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:b,suggestion:m})=>`\`declare export ${b}\` is not supported. Use \`${m}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},Ht=U`flow`(nt);function zs(b){return b.type==="DeclareExportAllDeclaration"||b.type==="DeclareExportDeclaration"&&(!b.declaration||b.declaration.type!=="TypeAlias"&&b.declaration.type!=="InterfaceDeclaration")}function Vs(b){return b.importKind==="type"||b.importKind==="typeof"}var $n={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Es(b,m){let x=[],S=[];for(let k=0;kclass extends b{flowPragma=void 0;getScopeHandler(){return Ce}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(m,x){m!==130&&m!==9&&m!==24&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(m,x)}addComment(m){if(this.flowPragma===void 0){let x=Cp.exec(m.value);if(x)if(x[1]==="flow")this.flowPragma="flow";else if(x[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(m)}flowParseTypeInitialiser(m){let x=this.state.inType;this.state.inType=!0,this.expect(m||10);let S=this.flowParseType();return this.state.inType=x,S}flowParsePredicate(){let m=this.startNode(),x=this.state.startLoc;return this.next(),this.expectContextual(106),this.state.lastTokStartLoc.index>x.index+1&&this.raise(Ht.UnexpectedSpaceBetweenModuloChecks,x),this.eat(6)?(m.value=super.parseExpression(),this.expect(7),this.finishNode(m,"DeclaredPredicate")):this.finishNode(m,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(m){let x=this.state.inType;this.state.inType=!0,this.expect(10);let S=null,k=null;return m&&this.match(50)?(this.state.inType=x,k=this.flowParsePredicate()):(S=this.flowParseType(),this.state.inType=x,this.match(50)&&(k=this.flowParsePredicate())),[S,k]}flowParseDeclareClass(m){return this.next(),this.flowParseInterfaceish(m,!0),this.finishNode(m,"DeclareClass")}flowParseDeclareFunction(m){this.next();let x=m.id=this.parseIdentifier(),S=this.startNode(),k=this.startNode();this.match(43)?S.typeParameters=this.flowParseTypeParameterDeclaration():S.typeParameters=null,this.expect(6);let O=this.flowParseFunctionTypeParams();return S.params=O.params,S.rest=O.rest,S.this=O._this,this.expect(7),[S.returnType,m.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),k.typeAnnotation=this.finishNode(S,"FunctionTypeAnnotation"),x.typeAnnotation=this.finishNode(k,"TypeAnnotation"),this.resetEndLocation(x),this.semicolon(),this.scope.declareName(m.id.name,2048,m.id.start),this.finishNode(m,"DeclareFunction")}flowParseDeclare(m,x){if(this.match(76))return this.flowParseDeclareClass(m);if(this.match(64))return this.flowParseDeclareFunction(m);if(this.match(70))return this.flowParseDeclareVariable(m);if(this.eatContextual(123))return this.match(12)?this.flowParseDeclareModuleExports(m):(x&&this.raise(Ht.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(m));if(this.isContextual(126))return this.flowParseDeclareTypeAlias(m);if(this.isContextual(127))return this.flowParseDeclareOpaqueType(m);if(this.isContextual(125))return this.flowParseDeclareInterface(m);if(this.match(78))return this.flowParseDeclareExportDeclaration(m,x);throw this.unexpected()}flowParseDeclareVariable(m){return this.next(),m.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(m.id.name,5,m.id.start),this.semicolon(),this.finishNode(m,"DeclareVariable")}flowParseDeclareModule(m){this.scope.enter(0),this.match(130)?m.id=super.parseExprAtom():m.id=this.parseIdentifier();let x=this.startNode(),S=x.body=[];for(this.expect(2);!this.match(4);){let Q=this.startNode();this.match(79)?(this.next(),!this.isContextual(126)&&!this.match(83)&&this.raise(Ht.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),S.push(super.parseImport(Q))):(this.expectContextual(121,Ht.UnsupportedStatementInDeclareModule),S.push(this.flowParseDeclare(Q,!0)))}this.scope.exit(),this.expect(4),m.body=this.finishNode(x,"BlockStatement");let k=null,O=!1;return S.forEach(Q=>{zs(Q)?(k==="CommonJS"&&this.raise(Ht.AmbiguousDeclareModuleKind,Q),k="ES"):Q.type==="DeclareModuleExports"&&(O&&this.raise(Ht.DuplicateDeclareModuleExports,Q),k==="ES"&&this.raise(Ht.AmbiguousDeclareModuleKind,Q),k="CommonJS",O=!0)}),m.kind=k||"CommonJS",this.finishNode(m,"DeclareModule")}flowParseDeclareExportDeclaration(m,x){if(this.expect(78),this.eat(61))return this.match(64)||this.match(76)?m.declaration=this.flowParseDeclare(this.startNode()):(m.declaration=this.flowParseType(),this.semicolon()),m.default=!0,this.finishNode(m,"DeclareExportDeclaration");if(this.match(71)||this.isLet()||(this.isContextual(126)||this.isContextual(125))&&!x){let S=this.state.value;throw this.raise(Ht.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:S,suggestion:$n[S]})}if(this.match(70)||this.match(64)||this.match(76)||this.isContextual(127))return m.declaration=this.flowParseDeclare(this.startNode()),m.default=!1,this.finishNode(m,"DeclareExportDeclaration");if(this.match(51)||this.match(2)||this.isContextual(125)||this.isContextual(126)||this.isContextual(127)){let S=this.parseExport(m,null);return S.type==="ExportNamedDeclaration"?(S.default=!1,delete S.exportKind,this.castNodeTo(S,"DeclareExportDeclaration")):this.castNodeTo(S,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(m){return this.next(),this.expectContextual(107),m.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(m,"DeclareModuleExports")}flowParseDeclareTypeAlias(m){this.next();let x=this.flowParseTypeAlias(m);return this.castNodeTo(x,"DeclareTypeAlias"),x}flowParseDeclareOpaqueType(m){return this.next(),this.flowParseOpaqueType(m,!0)}flowParseDeclareInterface(m){return this.next(),this.flowParseInterfaceish(m,!1),this.finishNode(m,"DeclareInterface")}flowParseInterfaceish(m,x){if(m.id=this.flowParseRestrictedIdentifier(!x,!0),this.scope.declareName(m.id.name,x?17:8201,m.id.start),this.match(43)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.extends=[],this.eat(77))do m.extends.push(this.flowParseInterfaceExtends());while(!x&&this.eat(8));if(x){let S=[],k=[];if(this.eatContextual(113))do k.push(this.flowParseInterfaceExtends());while(this.eat(8));if(this.eatContextual(109))do S.push(this.flowParseClassImplements());while(this.eat(8));m.implements=S,m.mixins=k}m.body=this.flowParseObjectType({allowStatic:x,allowExact:!1,allowSpread:!1,allowProto:x,allowInexact:!1})}flowParseInterfaceExtends(){let m=this.startNode();return m.id=this.flowParseQualifiedTypeIdentifier(),this.match(43)?m.typeParameters=this.flowParseTypeParameterInstantiation():m.typeParameters=null,this.finishNode(m,"InterfaceExtends")}flowParseInterface(m){return this.flowParseInterfaceish(m,!1),this.finishNode(m,"InterfaceDeclaration")}checkNotUnderscore(m){m==="_"&&this.raise(Ht.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(m,x,S){Et.has(m)&&this.raise(S?Ht.AssignReservedType:Ht.UnexpectedReservedType,x,{reservedType:m})}flowParseRestrictedIdentifierName(m,x){return this.checkReservedType(this.state.value,this.state.startLoc,x),this.parseIdentifierName(m)}flowParseRestrictedIdentifier(m,x){let S=this.startNode(),k=this.flowParseRestrictedIdentifierName(m,x);return this.createIdentifier(S,k)}flowParseTypeAlias(m){return m.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(m.id.name,8201,m.id.start),this.match(43)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(m,"TypeAlias")}flowParseOpaqueType(m,x){return this.expectContextual(126),m.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(m.id.name,8201,m.id.start),this.match(43)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.supertype=null,this.match(10)&&(m.supertype=this.flowParseTypeInitialiser(10)),m.impltype=null,x||(m.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(m,x?"DeclareOpaqueType":"OpaqueType")}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){let m=this.startNode();return this.next(),m.typeAnnotation=this.flowParseType(),this.finishNode(m,"TypeAnnotation")}}flowParseTypeParameter(m=!1){let x=this.state.startLoc,S=this.startNode(),k=this.flowParseVariance();return S.name=this.flowParseRestrictedIdentifierName(),S.variance=k,S.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),S.default=this.flowParseType()):m&&this.raise(Ht.MissingTypeParamDefault,x),this.finishNode(S,"TypeParameter")}flowParseTypeParameterDeclaration(){let m=this.state.inType,x=this.startNode();x.params=[],this.state.inType=!0,this.match(43)||this.match(138)?this.next():this.unexpected();let S=!1;do{let k=this.flowParseTypeParameter(S);x.params.push(k),k.default&&(S=!0),this.match(44)||this.expect(8)}while(!this.match(44));return this.expect(44),this.state.inType=m,this.finishNode(x,"TypeParameterDeclaration")}flowInTopLevelContext(m){if(this.curContext()!==Cr.brace){let x=this.state.context;this.state.context=[x[0]];try{return m()}finally{this.state.context=x}}else return m()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===43)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let m=this.startNode(),x=this.state.inType;return this.state.inType=!0,m.params=[],this.flowInTopLevelContext(()=>{this.expect(43);let S=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(44);)m.params.push(this.flowParseType()),this.match(44)||this.expect(8);this.state.noAnonFunctionType=S}),this.state.inType=x,!this.state.inType&&this.curContext()===Cr.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(m,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==43)return null;let m=this.startNode(),x=this.state.inType;for(m.params=[],this.state.inType=!0,this.expect(43);!this.match(44);)m.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(44)||this.expect(8);return this.expect(44),this.state.inType=x,this.finishNode(m,"TypeParameterInstantiation")}flowParseInterfaceType(){let m=this.startNode();if(this.expectContextual(125),m.extends=[],this.eat(77))do m.extends.push(this.flowParseInterfaceExtends());while(this.eat(8));return m.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(m,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(131)||this.match(130)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(m,x,S){return m.static=x,this.lookahead().type===10?(m.id=this.parseIdentifier(!0),m.key=this.flowParseTypeInitialiser()):(m.id=null,m.key=this.flowParseType()),this.expect(1),m.value=this.flowParseTypeInitialiser(),m.variance=S,this.finishNode(m,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(m,x){return m.static=x,m.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(m.method=!0,m.optional=!1,m.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(m))):(m.method=!1,this.eat(13)&&(m.optional=!0),m.value=this.flowParseTypeInitialiser()),this.finishNode(m,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(m){for(m.params=[],m.rest=null,m.typeParameters=null,m.this=null,this.match(43)&&(m.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(m.this=this.flowParseFunctionTypeParam(!0),m.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)m.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(m.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),m.returnType=this.flowParseTypeInitialiser(),this.finishNode(m,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(m,x){let S=this.startNode();return m.static=x,m.value=this.flowParseObjectTypeMethodish(S),this.finishNode(m,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:m,allowExact:x,allowSpread:S,allowProto:k,allowInexact:O}){let Q=this.state.inType;this.state.inType=!0;let X=this.startNode();X.callProperties=[],X.properties=[],X.indexers=[],X.internalSlots=[];let ge,he,lt=!1;for(x&&this.match(3)?(this.expect(3),ge=5,he=!0):(this.expect(2),ge=4,he=!1),X.exact=he;!this.match(ge);){let ji=!1,Yn=null,Vc=null,zd=this.startNode();if(k&&this.isContextual(114)){let uc=this.lookahead();uc.type!==10&&uc.type!==13&&(this.next(),Yn=this.state.startLoc,m=!1)}if(m&&this.isContextual(102)){let uc=this.lookahead();uc.type!==10&&uc.type!==13&&(this.next(),ji=!0)}let cc=this.flowParseVariance();if(this.eat(0))Yn!=null&&this.unexpected(Yn),this.eat(0)?(cc&&this.unexpected(cc.start),X.internalSlots.push(this.flowParseObjectTypeInternalSlot(zd,ji))):X.indexers.push(this.flowParseObjectTypeIndexer(zd,ji,cc));else if(this.match(6)||this.match(43))Yn!=null&&this.unexpected(Yn),cc&&this.unexpected(cc.start),X.callProperties.push(this.flowParseObjectTypeCallProperty(zd,ji));else{let uc="init";if(this.isContextual(95)||this.isContextual(100)){let cAe=this.lookahead();qo(cAe.type)&&(uc=this.state.value,this.next())}let Rm=this.flowParseObjectTypeProperty(zd,ji,Yn,cc,uc,S,O??!he);Rm===null?(lt=!0,Vc=this.state.lastTokStartLoc):X.properties.push(Rm)}this.flowObjectTypeSemicolon(),Vc&&!this.match(4)&&!this.match(5)&&this.raise(Ht.UnexpectedExplicitInexactInObject,Vc)}this.expect(ge),S&&(X.inexact=lt);let Ot=this.finishNode(X,"ObjectTypeAnnotation");return this.state.inType=Q,Ot}flowParseObjectTypeProperty(m,x,S,k,O,Q,X){if(this.eat(17))return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(Q?X||this.raise(Ht.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Ht.InexactInsideNonObject,this.state.lastTokStartLoc),k&&this.raise(Ht.InexactVariance,k),null):(Q||this.raise(Ht.UnexpectedSpreadType,this.state.lastTokStartLoc),S!=null&&this.unexpected(S),k&&this.raise(Ht.SpreadVariance,k),m.argument=this.flowParseType(),this.finishNode(m,"ObjectTypeSpreadProperty"));{m.key=this.flowParseObjectPropertyKey(),m.static=x,m.proto=S!=null,m.kind=O;let ge=!1;return this.match(43)||this.match(6)?(m.method=!0,S!=null&&this.unexpected(S),k&&this.unexpected(k.start),m.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(m)),O==="get"||O==="set"?this.flowCheckGetterSetterParams(m):!x&&!Q&&m.key.name==="constructor"&&m.value.this&&this.raise(Ht.ThisParamBannedInConstructor,m.value.this)):(O!=="init"&&this.unexpected(),m.method=!1,this.eat(13)&&(ge=!0),m.value=this.flowParseTypeInitialiser(),m.variance=k),m.optional=ge,this.finishNode(m,"ObjectTypeProperty")}}flowCheckGetterSetterParams(m){let x=m.kind==="get"?0:1,S=m.value,k=S.params.length+(S.rest?1:0);S.this&&this.raise(m.kind==="get"?Ht.GetterMayNotHaveThisParam:Ht.SetterMayNotHaveThisParam,S.this),k!==x&&this.raise(m.kind==="get"?F.BadGetterArity:F.BadSetterArity,m),m.kind==="set"&&S.rest&&this.raise(F.BadSetterRestParameter,m)}flowObjectTypeSemicolon(){!this.eat(9)&&!this.eat(8)&&!this.match(4)&&!this.match(5)&&this.unexpected()}flowParseQualifiedTypeIdentifier(m,x){m??(m=this.state.startLoc);let S=x||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){let k=this.startNodeAt(m);k.qualification=S,k.id=this.flowParseRestrictedIdentifier(!0),S=this.finishNode(k,"QualifiedTypeIdentifier")}return S}flowParseGenericType(m,x){let S=this.startNodeAt(m);return S.typeParameters=null,S.id=this.flowParseQualifiedTypeIdentifier(m,x),this.match(43)&&(S.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(S,"GenericTypeAnnotation")}flowParseTypeofType(){let m=this.startNode();return this.expect(83),m.argument=this.flowParsePrimaryType(),this.finishNode(m,"TypeofTypeAnnotation")}flowParseTupleType(){let m=this.startNode();for(m.types=[],this.expect(0);this.state.possuper.parseFunctionBody(m,!0,S));return}super.parseFunctionBody(m,!1,S)}parseFunctionBodyAndFinish(m,x,S=!1){if(this.match(10)){let k=this.startNode();x==="FunctionDeclaration"||x==="FunctionExpression"||x==="ArrowFunctionExpression"?[k.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):k.typeAnnotation=this.flowParseTypeInitialiser(),m.returnType=k.typeAnnotation?this.finishNode(k,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(m,x,S)}parseStatementLike(m){if(this.state.strict&&this.isContextual(125)){let S=this.lookahead();if(lr(S.type)){let k=this.startNode();return this.next(),this.flowParseInterface(k)}}else if(this.isContextual(122)){let S=this.startNode();return this.next(),this.flowParseEnumDeclaration(S)}let x=super.parseStatementLike(m);return this.flowPragma===void 0&&!this.isValidDirective(x)&&(this.flowPragma=null),x}parseExpressionStatement(m,x,S){if(x.type==="Identifier"){if(x.name==="declare"){if(this.match(76)||Ut(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(m)}else if(Ut(this.state.type)){if(x.name==="interface")return this.flowParseInterface(m);if(x.name==="type")return this.flowParseTypeAlias(m);if(x.name==="opaque")return this.flowParseOpaqueType(m,!1)}}return super.parseExpressionStatement(m,x,S)}shouldParseExportDeclaration(){let{type:m}=this.state;return m===122||br(m)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:m}=this.state;return m===122||br(m)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(122)){let m=this.startNode();return this.next(),this.flowParseEnumDeclaration(m)}return super.parseExportDefaultExpression()}parseConditional(m,x,S){if(!this.match(13))return m;if(S!=null){let ji=this.lookaheadCharCode();if(ji===44||ji===61||ji===58||ji===41)return this.setOptionalParametersError(S),m}this.expect(13);let k=this.state.clone(),O=this.state.noArrowAt,Q=this.startNodeAt(x),{consequent:X,failed:ge}=this.tryParseConditionalConsequent(),he=this.getArrowLikeExpressions(X),lt=he[0],Ot=he[1];if(ge||Ot.length>0){let ji=[...O];if(Ot.length>0){this.state=k,this.state.noArrowAt=ji;for(let Yn=0;Yn1&&this.raise(Ht.AmbiguousConditionalArrow,k.startLoc),ge&<.length===1&&(this.state=k,ji.push(lt[0].start),this.state.noArrowAt=ji,{consequent:X}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(X,!0),this.state.noArrowAt=O,this.expect(10),Q.test=m,Q.consequent=X,Q.alternate=this.forwardNoArrowParamsConversionAt(Q,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(Q,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let m=this.parseMaybeAssignAllowIn(),x=!this.match(10);return this.state.noArrowParamsConversionAt.pop(),{consequent:m,failed:x}}getArrowLikeExpressions(m,x){let S=[m],k=[];for(;S.length!==0;){let O=S.pop();O.type==="ArrowFunctionExpression"&&O.body.type!=="BlockStatement"?(O.typeParameters||!O.returnType?this.finishArrowValidation(O):k.push(O),S.push(O.body)):O.type==="ConditionalExpression"&&(S.push(O.consequent),S.push(O.alternate))}return x?(k.forEach(O=>this.finishArrowValidation(O)),[k,[]]):Es(k,O=>O.params.every(Q=>this.isAssignable(Q,!0)))}finishArrowValidation(m){this.toAssignableList(m.params,m.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(m,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(m,x){let S;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(m.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),S=x(),this.state.noArrowParamsConversionAt.pop()):S=x(),S}parseParenItem(m,x){let S=super.parseParenItem(m,x);if(this.eat(13)&&(S.optional=!0,this.resetEndLocation(m)),this.match(10)){let k=this.startNodeAt(x);return k.expression=S,k.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(k,"TypeCastExpression")}return S}assertModuleNodeAllowed(m){m.type==="ImportDeclaration"&&(m.importKind==="type"||m.importKind==="typeof")||m.type==="ExportNamedDeclaration"&&m.exportKind==="type"||m.type==="ExportAllDeclaration"&&m.exportKind==="type"||super.assertModuleNodeAllowed(m)}parseExportDeclaration(m){if(this.isContextual(126)){m.exportKind="type";let x=this.startNode();return this.next(),this.match(2)?(m.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(m),null):this.flowParseTypeAlias(x)}else if(this.isContextual(127)){m.exportKind="type";let x=this.startNode();return this.next(),this.flowParseOpaqueType(x,!1)}else if(this.isContextual(125)){m.exportKind="type";let x=this.startNode();return this.next(),this.flowParseInterface(x)}else if(this.isContextual(122)){m.exportKind="value";let x=this.startNode();return this.next(),this.flowParseEnumDeclaration(x)}else return super.parseExportDeclaration(m)}eatExportStar(m){return super.eatExportStar(m)?!0:this.isContextual(126)&&this.lookahead().type===51?(m.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(m){let{startLoc:x}=this.state,S=super.maybeParseExportNamespaceSpecifier(m);return S&&m.exportKind==="type"&&this.unexpected(x),S}parseClassId(m,x,S){if((!x||S)&&this.isContextual(109)){m.id=null;return}super.parseClassId(m,x,S),this.match(43)&&(m.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(m,x,S){let{startLoc:k}=this.state;if(this.isContextual(121)){if(super.parseClassMemberFromModifier(m,x))return;x.declare=!0}super.parseClassMember(m,x,S),x.declare&&(x.type!=="ClassProperty"&&x.type!=="ClassPrivateProperty"&&x.type!=="PropertyDefinition"?this.raise(Ht.DeclareClassElement,k):x.value&&this.raise(Ht.DeclareClassFieldInitializer,x.value))}isIterator(m){return m==="iterator"||m==="asyncIterator"}readIterator(){let m=super.readWord1(),x="@@"+m;(!this.isIterator(m)||!this.state.inType)&&this.raise(F.InvalidIdentifier,this.state.curPosition(),{identifierName:x}),this.finishToken(128,x)}getTokenFromCode(m){let x=this.input.charCodeAt(this.state.pos+1);m===123&&x===124?this.finishOp(3,2):this.state.inType&&(m===62||m===60)?this.finishOp(m===62?44:43,1):this.state.inType&&m===63?x===46?this.finishOp(14,2):this.finishOp(13,1):fo(m,x,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(m)}isAssignable(m,x){return m.type==="TypeCastExpression"?this.isAssignable(m.expression,x):super.isAssignable(m,x)}toAssignable(m,x=!1){!x&&m.type==="AssignmentExpression"&&m.left.type==="TypeCastExpression"&&(m.left=this.typeCastToParameter(m.left)),super.toAssignable(m,x)}toAssignableListItem(m,x,S){let k=m[x];k.type==="TypeCastExpression"&&(m[x]=this.typeCastToParameter(k)),super.toAssignableListItem(m,x,S)}toReferencedList(m,x){for(let S=0;S1||!x)&&this.raise(Ht.TypeCastInPattern,k.typeAnnotation)}return m}parseArrayLike(m,x){let S=super.parseArrayLike(m,x);return S.type==="ArrayExpression"&&this.toReferencedList(S.elements),S}isValidLVal(m,x,S,k){return m==="TypeCastExpression"||super.isValidLVal(m,x,S,k)}parseClassProperty(m){return this.match(10)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(m)}parseClassPrivateProperty(m){return this.match(10)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(m)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(10)||super.isClassProperty()}isNonstaticConstructor(m){return!this.match(10)&&super.isNonstaticConstructor(m)}pushClassMethod(m,x,S,k,O,Q){if(x.variance&&this.unexpected(x.variance.start),delete x.variance,this.match(43)&&(x.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(m,x,S,k,O,Q),x.params&&O){let X=x.params;X.length>0&&this.isThisParam(X[0])&&this.raise(Ht.ThisParamBannedInConstructor,x)}else if(x.type==="MethodDefinition"&&O&&x.value.params){let X=x.value.params;X.length>0&&this.isThisParam(X[0])&&this.raise(Ht.ThisParamBannedInConstructor,x)}}pushClassPrivateMethod(m,x,S,k){x.variance&&this.unexpected(x.variance.start),delete x.variance,this.match(43)&&(x.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(m,x,S,k)}flowParseClassImplements(){let m=this.startNode();return m.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?m.typeParameters=this.flowParseTypeParameterInstantiation():m.typeParameters=null,this.finishNode(m,"ClassImplements")}parseClassSuper(m){if(super.parseClassSuper(m),m.superClass&&(this.match(43)||this.match(47))&&(m.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(109)){let x=m.implements=[];do x.push(this.flowParseClassImplements());while(this.eat(8))}}checkGetterSetterParams(m){super.checkGetterSetterParams(m);let x=this.getObjectOrClassMethodParams(m);if(x.length>0){let S=x[0];this.isThisParam(S)&&m.kind==="get"?this.raise(Ht.GetterMayNotHaveThisParam,S):this.isThisParam(S)&&this.raise(Ht.SetterMayNotHaveThisParam,S)}}parsePropertyNamePrefixOperator(m){m.variance=this.flowParseVariance()}parseObjPropValue(m,x,S,k,O,Q,X){m.variance&&this.unexpected(m.variance.start),delete m.variance;let ge;this.match(43)&&!Q&&(ge=this.flowParseTypeParameterDeclaration(),this.match(6)||this.unexpected());let he=super.parseObjPropValue(m,x,S,k,O,Q,X);return ge&&((he.value||he).typeParameters=ge),he}parseFunctionParamType(m){return this.eat(13)&&(m.type!=="Identifier"&&this.raise(Ht.PatternIsOptional,m),this.isThisParam(m)&&this.raise(Ht.ThisParamMayNotBeOptional,m),m.optional=!0),this.match(10)?m.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(m)&&this.raise(Ht.ThisParamAnnotationRequired,m),this.match(25)&&this.isThisParam(m)&&this.raise(Ht.ThisParamNoDefault,m),this.resetEndLocation(m),m}parseMaybeDefault(m,x){let S=super.parseMaybeDefault(m,x);return S.type==="AssignmentPattern"&&S.typeAnnotation&&S.right.startsuper.parseMaybeAssign(m,x),S),!k.error)return k.node;let{context:O}=this.state,Q=O[O.length-1];(Q===Cr.j_oTag||Q===Cr.j_expr)&&O.pop()}if(k?.error||this.match(43)){S=S||this.state.clone();let O,Q=this.tryParse(ge=>{O=this.flowParseTypeParameterDeclaration();let he=this.forwardNoArrowParamsConversionAt(O,()=>{let Ot=super.parseMaybeAssign(m,x);return this.resetStartLocationFromNode(Ot,O),Ot});he.extra?.parenthesized&&ge();let lt=this.maybeUnwrapTypeCastExpression(he);return lt.type!=="ArrowFunctionExpression"&&ge(),lt.typeParameters=O,this.resetStartLocationFromNode(lt,O),he},S),X=null;if(Q.node&&this.maybeUnwrapTypeCastExpression(Q.node).type==="ArrowFunctionExpression"){if(!Q.error&&!Q.aborted)return Q.node.async&&this.raise(Ht.UnexpectedTypeParameterBeforeAsyncArrowFunction,O),Q.node;X=Q.node}if(k?.node)return this.state=k.failState,k.node;if(X)return this.state=Q.failState,X;throw k?.thrown?k.error:Q.thrown?Q.error:this.raise(Ht.UnexpectedTokenAfterTypeParameter,O)}return super.parseMaybeAssign(m,x)}parseArrow(m){if(this.match(10)){let x=this.tryParse(()=>{let S=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let k=this.startNode();return[k.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=S,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||this.unexpected(),k});if(x.thrown)return null;x.error&&(this.state=x.failState),m.returnType=x.node.typeAnnotation?this.finishNode(x.node,"TypeAnnotation"):null}return super.parseArrow(m)}shouldParseArrow(m){return this.match(10)||super.shouldParseArrow(m)}setArrowFunctionParameters(m,x){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(m.start))?m.params=x:super.setArrowFunctionParameters(m,x)}checkParams(m,x,S,k=!0){if(!(S&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(m.start)))){for(let O=0;O0&&this.raise(Ht.ThisParamMustBeFirst,m.params[O]);super.checkParams(m,x,S,k)}}parseParenAndDistinguishExpression(m){return super.parseParenAndDistinguishExpression(m&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(m,x,S){if(m.type==="Identifier"&&m.name==="async"&&this.state.noArrowAt.includes(x.index)){this.next();let k=this.startNodeAt(x);k.callee=m,k.arguments=super.parseCallExpressionArguments(),m=this.finishNode(k,"CallExpression")}else if(m.type==="Identifier"&&m.name==="async"&&this.match(43)){let k=this.state.clone(),O=this.tryParse(X=>this.parseAsyncArrowWithTypeParameters(x)||X(),k);if(!O.error&&!O.aborted)return O.node;let Q=this.tryParse(()=>super.parseSubscripts(m,x,S),k);if(Q.node&&!Q.error)return Q.node;if(O.node)return this.state=O.failState,O.node;if(Q.node)return this.state=Q.failState,Q.node;throw O.error||Q.error}return super.parseSubscripts(m,x,S)}parseSubscript(m,x,S,k){if(this.match(14)&&this.isLookaheadToken_lt()){if(k.optionalChainMember=!0,S)return k.stop=!0,m;this.next();let O=this.startNodeAt(x);return O.callee=m,O.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(6),O.arguments=this.parseCallExpressionArguments(),O.optional=!0,this.finishCallExpression(O,!0)}else if(!S&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){let O=this.startNodeAt(x);O.callee=m;let Q=this.tryParse(()=>(O.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),O.arguments=super.parseCallExpressionArguments(),k.optionalChainMember&&(O.optional=!1),this.finishCallExpression(O,k.optionalChainMember)));if(Q.node)return Q.error&&(this.state=Q.failState),Q.node}return super.parseSubscript(m,x,S,k)}parseNewCallee(m){super.parseNewCallee(m);let x=null;this.shouldParseTypes()&&this.match(43)&&(x=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),m.typeArguments=x}parseAsyncArrowWithTypeParameters(m){let x=this.startNodeAt(m);if(this.parseFunctionParams(x,!1),!!this.parseArrow(x))return super.parseArrowExpression(x,void 0,!0)}readToken_mult_modulo(m){let x=this.input.charCodeAt(this.state.pos+1);if(m===42&&x===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(m)}readToken_pipe_amp(m){let x=this.input.charCodeAt(this.state.pos+1);if(m===124&&x===125){this.finishOp(5,2);return}super.readToken_pipe_amp(m)}parseTopLevel(m,x){let S=super.parseTopLevel(m,x);return this.state.hasFlowComment&&this.raise(Ht.UnterminatedFlowComment,this.state.curPosition()),S}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Ht.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let m=this.skipFlowComment();m&&(this.state.pos+=m,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:m}=this.state,x=2;for(;[32,9].includes(this.input.charCodeAt(m+x));)x++;let S=this.input.charCodeAt(x+m),k=this.input.charCodeAt(x+m+1);return S===58&&k===58?x+2:this.input.slice(x+m,x+m+12)==="flow-include"?x+12:S===58&&k!==58?x:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(F.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(m,x){this.raise(Ht.EnumBooleanMemberNotInitialized,m,x)}flowEnumErrorInvalidMemberInitializer(m,x){return this.raise(x.explicitType?x.explicitType==="symbol"?Ht.EnumInvalidMemberInitializerSymbolType:Ht.EnumInvalidMemberInitializerPrimaryType:Ht.EnumInvalidMemberInitializerUnknownType,m,x)}flowEnumErrorNumberMemberNotInitialized(m,x){this.raise(Ht.EnumNumberMemberNotInitialized,m,x)}flowEnumErrorStringMemberInconsistentlyInitialized(m,x){this.raise(Ht.EnumStringMemberInconsistentlyInitialized,m,x)}flowEnumMemberInit(){let m=this.state.startLoc,x=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{let S=this.parseNumericLiteral(this.state.value);if(x())return{type:"number",loc:S.start,value:S};break}case 130:{let S=this.parseStringLiteral(this.state.value);if(x())return{type:"string",loc:S.start,value:S};break}case 81:case 82:{let S=this.parseBooleanLiteral(this.match(81));if(x())return{type:"boolean",loc:S.start,value:S}}}return{type:"invalid",loc:m}}flowEnumMemberRaw(){let m=this.state.startLoc,x=this.parseIdentifier(!0),S=this.eat(25)?this.flowEnumMemberInit():{type:"none",loc:m};return{id:x,init:S}}flowEnumCheckExplicitTypeMismatch(m,x,S){let{explicitType:k}=x;k!==null&&k!==S&&this.flowEnumErrorInvalidMemberInitializer(m,x)}flowEnumMembers({enumName:m,explicitType:x}){let S=new Set,k={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},O=!1;for(;!this.match(4);){if(this.eat(17)){O=!0;break}let Q=this.startNode(),{id:X,init:ge}=this.flowEnumMemberRaw(),he=X.name;if(he==="")continue;/^[a-z]/.test(he)&&this.raise(Ht.EnumInvalidMemberName,X,{memberName:he,suggestion:he[0].toUpperCase()+he.slice(1),enumName:m}),S.has(he)&&this.raise(Ht.EnumDuplicateMemberName,X,{memberName:he,enumName:m}),S.add(he);let lt={enumName:m,explicitType:x,memberName:he};switch(Q.id=X,ge.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(ge.loc,lt,"boolean"),Q.init=ge.value,k.booleanMembers.push(this.finishNode(Q,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(ge.loc,lt,"number"),Q.init=ge.value,k.numberMembers.push(this.finishNode(Q,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(ge.loc,lt,"string"),Q.init=ge.value,k.stringMembers.push(this.finishNode(Q,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(ge.loc,lt);case"none":switch(x){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(ge.loc,lt);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(ge.loc,lt);break;default:k.defaultedMembers.push(this.finishNode(Q,"EnumDefaultedMember"))}}this.match(4)||this.expect(8)}return{members:k,hasUnknownMembers:O}}flowEnumStringMembers(m,x,{enumName:S}){if(m.length===0)return x;if(x.length===0)return m;if(x.length>m.length){for(let k of m)this.flowEnumErrorStringMemberInconsistentlyInitialized(k,{enumName:S});return x}else{for(let k of x)this.flowEnumErrorStringMemberInconsistentlyInitialized(k,{enumName:S});return m}}flowEnumParseExplicitType({enumName:m}){if(!this.eatContextual(98))return null;if(!Ut(this.state.type))throw this.raise(Ht.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:m});let{value:x}=this.state;return this.next(),x!=="boolean"&&x!=="number"&&x!=="string"&&x!=="symbol"&&this.raise(Ht.EnumInvalidExplicitType,this.state.startLoc,{enumName:m,invalidEnumType:x}),x}flowEnumBody(m,x){let S=x.name,k=x.start,O=this.flowEnumParseExplicitType({enumName:S});this.expect(2);let{members:Q,hasUnknownMembers:X}=this.flowEnumMembers({enumName:S,explicitType:O});switch(m.hasUnknownMembers=X,O){case"boolean":return m.explicitType=!0,m.members=Q.booleanMembers,this.expect(4),this.finishNode(m,"EnumBooleanBody");case"number":return m.explicitType=!0,m.members=Q.numberMembers,this.expect(4),this.finishNode(m,"EnumNumberBody");case"string":return m.explicitType=!0,m.members=this.flowEnumStringMembers(Q.stringMembers,Q.defaultedMembers,{enumName:S}),this.expect(4),this.finishNode(m,"EnumStringBody");case"symbol":return m.members=Q.defaultedMembers,this.expect(4),this.finishNode(m,"EnumSymbolBody");default:{let ge=()=>(m.members=[],this.expect(4),this.finishNode(m,"EnumStringBody"));m.explicitType=!1;let he=Q.booleanMembers.length,lt=Q.numberMembers.length,Ot=Q.stringMembers.length,ji=Q.defaultedMembers.length;if(!he&&!lt&&!Ot&&!ji)return ge();if(!he&&!lt)return m.members=this.flowEnumStringMembers(Q.stringMembers,Q.defaultedMembers,{enumName:S}),this.expect(4),this.finishNode(m,"EnumStringBody");if(!lt&&!Ot&&he>=ji){for(let Yn of Q.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(Yn.start,{enumName:S,memberName:Yn.id.name});return m.members=Q.booleanMembers,this.expect(4),this.finishNode(m,"EnumBooleanBody")}else if(!he&&!Ot&<>=ji){for(let Yn of Q.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(Yn.start,{enumName:S,memberName:Yn.id.name});return m.members=Q.numberMembers,this.expect(4),this.finishNode(m,"EnumNumberBody")}else return this.raise(Ht.EnumInconsistentMemberValues,k,{enumName:S}),ge()}}}flowParseEnumDeclaration(m){let x=this.parseIdentifier();return m.id=x,m.body=this.flowEnumBody(this.startNode(),x),this.finishNode(m,"EnumDeclaration")}jsxParseOpeningElementAfterName(m){return this.shouldParseTypes()&&(this.match(43)||this.match(47))&&(m.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(m)}isLookaheadToken_lt(){let m=this.nextTokenStart();if(this.input.charCodeAt(m)===60){let x=this.input.charCodeAt(m+1);return x!==60&&x!==61}return!1}reScan_lt_gt(){let{type:m}=this.state;m===43?(this.state.pos-=1,this.readToken_lt()):m===44&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:m}=this.state;return m===47?(this.state.pos-=2,this.finishOp(43,1),43):m}maybeUnwrapTypeCastExpression(m){return m.type==="TypeCastExpression"?m.expression:m}},vM=/\r\n|[\r\n\u2028\u2029]/,aw=new RegExp(vM.source,"g");function d_(b){switch(b){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function lq(b,m,x){for(let S=m;S`Expected corresponding JSX closing tag for <${b}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:b,HTMLEntity:m})=>`Unexpected token \`${b}\`. Did you mean \`${m}\` or \`{'${b}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"},B0=U`jsx`(xve);function pA(b){return b?b.type==="JSXOpeningFragment"||b.type==="JSXClosingFragment":!1}function h_(b){if(b.type==="JSXIdentifier")return b.name;if(b.type==="JSXNamespacedName")return b.namespace.name+":"+b.name.name;if(b.type==="JSXMemberExpression")return h_(b.object)+"."+h_(b.property);throw new Error("Node had unexpected type: "+b.type)}var Cve=b=>class extends b{jsxReadToken(){let m="",x=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(B0.UnterminatedJsxContent,this.state.startLoc);let S=this.input.charCodeAt(this.state.pos);switch(S){case 60:case 123:if(this.state.pos===this.state.start){S===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(138)):super.getTokenFromCode(S);return}m+=this.input.slice(x,this.state.pos),this.finishToken(137,m);return;case 38:m+=this.input.slice(x,this.state.pos),m+=this.jsxReadEntity(),x=this.state.pos;break;case 62:case 125:this.raise(B0.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:S===125?"}":">"});default:d_(S)?(m+=this.input.slice(x,this.state.pos),m+=this.jsxReadNewLine(!0),x=this.state.pos):++this.state.pos}}}jsxReadNewLine(m){let x=this.input.charCodeAt(this.state.pos),S;return++this.state.pos,x===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,S=m?` +- Did you mean \`import { "${b}" as foo }\`?`,ImportCallArity:({phase:b})=>`\`import${b?`.${b}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:b})=>`Cannot use new with import${b?`.${b}`:""}().`,ImportCallSpreadArgument:({phase:b})=>`\`...\` is not allowed in \`import${b?`.${b}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:b})=>`Expected number in radix ${b}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:b})=>`Escape sequence in keyword ${b}.`,InvalidIdentifier:({identifierName:b})=>`Invalid identifier ${b}.`,InvalidLhs:({ancestor:b})=>`Invalid left-hand side in ${E(b)}.`,InvalidLhsBinding:({ancestor:b})=>`Binding invalid left-hand side in ${E(b)}.`,InvalidLhsOptionalChaining:({ancestor:b})=>`Invalid optional chaining in the left-hand side of ${E(b)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:b})=>`Unexpected character '${b}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:b})=>`Private name #${b} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:b})=>`Label '${b}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:b})=>`This experimental syntax requires enabling the parser plugin: ${b.map(m=>JSON.stringify(m)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:b})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${b.map(m=>JSON.stringify(m)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:b})=>`Duplicate key "${b}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:b})=>`An export name cannot include a lone surrogate, found '\\u${b.toString(16)}'.`,ModuleExportUndefined:({localName:b})=>`Export '${b}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:b})=>`Private names are only allowed in property accesses (\`obj.#${b}\`) or in \`in\` expressions (\`#${b} in obj\`).`,PrivateNameRedeclaration:({identifierName:b})=>`Duplicate private name #${b}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:b})=>`Unexpected keyword '${b}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:b})=>`Unexpected reserved word '${b}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:b,unexpected:m})=>`Unexpected token${m?` '${m}'.`:""}${b?`, expected "${b}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:b,onlyValidPropertyName:m})=>`The only valid meta property for ${b} is ${b}.${m}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:b})=>`Identifier '${b}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},T={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:b})=>`Assigning to '${b}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:b})=>`Binding '${b}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},N={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:b})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(b)}\`.`},L=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),B={PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:b})=>`Invalid topic token ${b}. In order to use ${b} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${b}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:b})=>`Hack-style pipe body cannot be an unparenthesized ${E({type:b})}; please wrap it in parentheses.`,PipelineUnparenthesized:"Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses."},z={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."};function Q(b,m,x){Object.defineProperty(b,m,{enumerable:!1,configurable:!0,value:x})}function Z({toMessage:b,code:m,reasonCode:x,syntaxPlugin:S}){let k=x==="MissingPlugin"||x==="MissingOneOfPlugins";return function O(G,ie,be){let pe=new SyntaxError;return pe.code=m,pe.reasonCode=x,pe.loc=G,pe.pos=ie,pe.syntaxPlugin=S,k&&(pe.missingPlugin=be.missingPlugin),Q(pe,"clone",function(lt={}){let{line:Mt,column:Ui,index:Zn=ie}=lt.loc??G;return O(new g(Mt,Ui),Zn,{...be,...lt.details})}),Q(pe,"details",be),Object.defineProperty(pe,"message",{configurable:!0,get(){let lt=`${b(be)} (${G.line}:${G.column})`;return this.message=lt,lt},set(lt){Object.defineProperty(this,"message",{value:lt,writable:!0})}}),pe}}function U(b,m){if(Array.isArray(b))return S=>U(S,b[0]);let x={};for(let S of Object.keys(b)){let k=b[S],{message:O,...G}=typeof k=="string"?{message:()=>k}:typeof k=="function"?{message:k}:k,ie=typeof O=="string"?()=>O:O;x[S]=Z({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:S,toMessage:ie,...m?{syntaxPlugin:m}:{},...G})}return x}var M={...U(C),...U(I),...U(T),...U(N),...U`pipelineOperator`(B),...U`functionBind`(z)};function ee(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function X(b){let m=ee();if(b==null)return m;if(b.annexB!=null&&b.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let x of Object.keys(m))b[x]!=null&&(m[x]=b[x]);if(m.startLine===1)b.startIndex==null&&m.startColumn>0?m.startIndex=m.startColumn:b.startColumn==null&&m.startIndex>0&&(m.startColumn=m.startIndex);else if(b.startColumn==null||b.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(m.sourceType==="commonjs"){if(b.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(b.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(b.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return m}function Y(b){let{start:m,end:x}=b.loc;return b.loc.start=new g(m.line,m.column),b.loc.end=new g(x.line,x.column),b}var $=b=>class extends b{createPosition(m){return new g(m.line,m.column)}parse(){let m=super.parse();return this.optionFlags&512&&(m.tokens=m.tokens.map(Y)),Y(m)}parseRegExpLiteral({pattern:m,flags:x}){let S=null;try{S=new RegExp(m,x)}catch{}let k=this.estreeParseLiteral(S);return k.regex={pattern:m,flags:x},k}parseBigIntLiteral(m){let x;try{x=BigInt(m)}catch{x=null}let S=this.estreeParseLiteral(x);return S.bigint=String(S.value||m),S}estreeParseLiteral(m){return this.parseLiteral(m,"Literal")}parseStringLiteral(m){return this.estreeParseLiteral(m)}parseNumericLiteral(m){return this.estreeParseLiteral(m)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(m){return this.estreeParseLiteral(m)}estreeParseChainExpression(m,x){let S=this.startNodeAtNode(m);return S.expression=m,this.finishNodeAtNode(S,"ChainExpression",x)}directiveToStmt(m){let x=m.value;delete m.value,this.castNodeTo(x,"Literal"),x.raw=x.extra.raw,x.value=x.extra.expressionValue;let S=this.castNodeTo(m,"ExpressionStatement");return S.expression=x,S.directive=x.extra.rawValue,delete x.extra,S}fillOptionalPropertiesForTSESLint(m){}cloneEstreeStringLiteral(m){let{start:x,end:S,loc:k,range:O,raw:G,value:ie}=m,be=Object.create(m.constructor.prototype);return be.type="Literal",be.start=x,be.end=S,be.loc=k,be.range=O,be.raw=G,be.value=ie,be}initFunction(m,x){super.initFunction(m,x),m.expression=!1}checkDeclaration(m){m!=null&&this.isObjectProperty(m)?this.checkDeclaration(m.value):super.checkDeclaration(m)}getObjectOrClassMethodParams(m){return m.value.params}isValidDirective(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"&&!m.expression.extra?.parenthesized}parseBlockBody(m,x,S,k,O){super.parseBlockBody(m,x,S,k,O);let G=m.directives.map(ie=>this.directiveToStmt(ie));m.body=G.concat(m.body),delete m.directives}parsePrivateName(){let m=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(m)}convertPrivateNameToPrivateIdentifier(m){let x=super.getPrivateNameSV(m);return delete m.id,m.name=x,this.castNodeTo(m,"PrivateIdentifier")}isPrivateName(m){return m.type==="PrivateIdentifier"}getPrivateNameSV(m){return m.name}parseLiteral(m,x){let S=super.parseLiteral(m,x);return S.raw=S.extra.raw,delete S.extra,S}parseFunctionBody(m,x,S=!1){super.parseFunctionBody(m,x,S),m.expression=m.body.type!=="BlockStatement"}parseMethod(m,x,S,k,O,G,ie=!1){let be=this.startNode();be.kind=m.kind,be=super.parseMethod(be,x,S,k,O,G,ie),delete be.kind;let{typeParameters:pe}=m;pe&&(delete m.typeParameters,be.typeParameters=pe,this.resetStartLocationFromNode(be,pe));let lt=this.castNodeTo(be,this.hasPlugin("typescript")&&!be.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return m.value=lt,G==="ClassPrivateMethod"&&(m.computed=!1),this.hasPlugin("typescript")&&m.abstract?(delete m.abstract,this.finishNode(m,"TSAbstractMethodDefinition")):G==="ObjectMethod"?(m.kind==="method"&&(m.kind="init"),m.shorthand=!1,this.finishNode(m,"Property")):this.finishNode(m,"MethodDefinition")}nameIsConstructor(m){return m.type==="Literal"?m.value==="constructor":super.nameIsConstructor(m)}parseClassProperty(...m){let x=super.parseClassProperty(...m);return x.abstract&&this.hasPlugin("typescript")?(delete x.abstract,this.castNodeTo(x,"TSAbstractPropertyDefinition")):this.castNodeTo(x,"PropertyDefinition"),x}parseClassPrivateProperty(...m){let x=super.parseClassPrivateProperty(...m);return x.abstract&&this.hasPlugin("typescript")?this.castNodeTo(x,"TSAbstractPropertyDefinition"):this.castNodeTo(x,"PropertyDefinition"),x.computed=!1,x}parseClassAccessorProperty(m){let x=super.parseClassAccessorProperty(m);return x.abstract&&this.hasPlugin("typescript")?(delete x.abstract,this.castNodeTo(x,"TSAbstractAccessorProperty")):this.castNodeTo(x,"AccessorProperty"),x}parseObjectProperty(m,x,S,k){let O=super.parseObjectProperty(m,x,S,k);return O&&(O.kind="init",this.castNodeTo(O,"Property")),O}finishObjectProperty(m){return m.kind="init",this.finishNode(m,"Property")}isValidLVal(m,x,S,k){return m==="Property"?"value":super.isValidLVal(m,x,S,k)}isAssignable(m,x){return m!=null&&this.isObjectProperty(m)?this.isAssignable(m.value,x):super.isAssignable(m,x)}toAssignable(m,x=!1){if(m!=null&&this.isObjectProperty(m)){let{key:S,value:k}=m;this.isPrivateName(S)&&this.classScope.usePrivateName(this.getPrivateNameSV(S),S.start),this.toAssignable(k,x)}else super.toAssignable(m,x)}toAssignableObjectExpressionProp(m,x,S){m.type==="Property"&&(m.kind==="get"||m.kind==="set")?this.raise(M.PatternHasAccessor,m.key):m.type==="Property"&&m.method?this.raise(M.PatternHasMethod,m.key):super.toAssignableObjectExpressionProp(m,x,S)}finishCallExpression(m,x){let S=super.finishCallExpression(m,x);return S.callee.type==="Import"?(this.castNodeTo(S,"ImportExpression"),S.source=S.arguments[0],S.options=S.arguments[1]??null,delete S.arguments,delete S.callee):S.type==="OptionalCallExpression"?this.castNodeTo(S,"CallExpression"):S.optional=!1,S}parseExport(m,x){let S=this.state.lastTokStartLoc,k=super.parseExport(m,x);switch(k.type){case"ExportAllDeclaration":k.exported=null;break;case"ExportNamedDeclaration":k.specifiers.length===1&&k.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(k,"ExportAllDeclaration"),k.exported=k.specifiers[0].exported,delete k.specifiers);case"ExportDefaultDeclaration":{let{declaration:O}=k;O?.type==="ClassDeclaration"&&O.decorators?.length>0&&O.start===k.start&&this.resetStartLocation(k,S)}break}return k}stopParseSubscript(m,x){let S=super.stopParseSubscript(m,x);return x.optionalChainMember?this.estreeParseChainExpression(S,m):S}parseMember(m,x,S,k,O){let G=super.parseMember(m,x,S,k,O);return G.type==="OptionalMemberExpression"?this.castNodeTo(G,"MemberExpression"):G.optional=!1,G}isOptionalMemberExpression(m){return m.type==="ChainExpression"?m.expression.type==="MemberExpression":super.isOptionalMemberExpression(m)}hasPropertyAsPrivateName(m){return m.type==="ChainExpression"&&(m=m.expression),super.hasPropertyAsPrivateName(m)}isObjectProperty(m){return m.type==="Property"&&m.kind==="init"&&!m.method}isObjectMethod(m){return m.type==="Property"&&(m.method||m.kind==="get"||m.kind==="set")}castNodeTo(m,x){let S=super.castNodeTo(m,x);return this.fillOptionalPropertiesForTSESLint(S),S}cloneIdentifier(m){let x=super.cloneIdentifier(m);return this.fillOptionalPropertiesForTSESLint(x),x}cloneStringLiteral(m){return m.type==="Literal"?this.cloneEstreeStringLiteral(m):super.cloneStringLiteral(m)}finishNodeAt(m,x,S){return Y(super.finishNodeAt(m,x,S))}finishNodeAtNode(m,x,S){return Y(super.finishNodeAtNode(m,x,S))}finishNode(m,x){let S=super.finishNode(m,x);return this.fillOptionalPropertiesForTSESLint(S),S}resetStartLocation(m,x){super.resetStartLocation(m,x),Y(m)}resetEndLocation(m,x=this.state.lastTokEndLoc){super.resetEndLocation(m,x),Y(m)}},re=!0,ue=!0,Ie=!0,nt=!0,mt=!0,xt=!0,wt=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(b,m={}){this.label=b,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.rightAssociative=!!m.rightAssociative,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop!=null?m.binop:null}},Ht=new Map;function Fe(b,m={}){m.keyword=b;let x=vt(b,m);return Ht.set(b,x),x}function zt(b,m){return vt(b,{beforeExpr:re,binop:m})}var Fi=-1,Kt=[],Li=[],Bn=[],zn=[],yo=[],Ei=[];function vt(b,m={}){return++Fi,Li.push(b),Bn.push(m.binop??-1),zn.push(m.beforeExpr??!1),yo.push(m.startsExpr??!1),Ei.push(m.prefix??!1),Kt.push(new wt(b,m)),Fi}function ni(b,m={}){return++Fi,Ht.set(b,Fi),Li.push(b),Bn.push(m.binop??-1),zn.push(m.beforeExpr??!1),yo.push(m.startsExpr??!1),Ei.push(m.prefix??!1),Kt.push(new wt("name",m)),Fi}var mr={bracketL:vt("[",{beforeExpr:re,startsExpr:ue}),bracketR:vt("]"),braceL:vt("{",{beforeExpr:re,startsExpr:ue}),braceBarL:vt("{|",{beforeExpr:re,startsExpr:ue}),braceR:vt("}"),braceBarR:vt("|}"),parenL:vt("(",{beforeExpr:re,startsExpr:ue}),parenR:vt(")"),comma:vt(",",{beforeExpr:re}),semi:vt(";",{beforeExpr:re}),colon:vt(":",{beforeExpr:re}),doubleColon:vt("::",{beforeExpr:re}),dot:vt("."),question:vt("?",{beforeExpr:re}),questionDot:vt("?."),arrow:vt("=>",{beforeExpr:re}),template:vt("template"),ellipsis:vt("...",{beforeExpr:re}),backQuote:vt("`",{startsExpr:ue}),dollarBraceL:vt("${",{beforeExpr:re,startsExpr:ue}),templateTail:vt("...`",{startsExpr:ue}),templateNonTail:vt("...${",{beforeExpr:re,startsExpr:ue}),at:vt("@"),hash:vt("#",{startsExpr:ue}),interpreterDirective:vt("#!..."),eq:vt("=",{beforeExpr:re,isAssign:nt}),assign:vt("_=",{beforeExpr:re,isAssign:nt}),slashAssign:vt("_=",{beforeExpr:re,isAssign:nt}),xorAssign:vt("_=",{beforeExpr:re,isAssign:nt}),moduloAssign:vt("_=",{beforeExpr:re,isAssign:nt}),incDec:vt("++/--",{prefix:mt,postfix:xt,startsExpr:ue}),bang:vt("!",{beforeExpr:re,prefix:mt,startsExpr:ue}),tilde:vt("~",{beforeExpr:re,prefix:mt,startsExpr:ue}),doubleCaret:vt("^^",{startsExpr:ue}),doubleAt:vt("@@",{startsExpr:ue}),pipeline:zt("|>",0),nullishCoalescing:zt("??",1),logicalOR:zt("||",1),logicalAND:zt("&&",2),bitwiseOR:zt("|",3),bitwiseXOR:zt("^",4),bitwiseAND:zt("&",5),equality:zt("==/!=/===/!==",6),lt:zt("/<=/>=",7),gt:zt("/<=/>=",7),relational:zt("/<=/>=",7),bitShift:zt("<>/>>>",8),bitShiftL:zt("<>/>>>",8),bitShiftR:zt("<>/>>>",8),plusMin:vt("+/-",{beforeExpr:re,binop:9,prefix:mt,startsExpr:ue}),modulo:vt("%",{binop:10,startsExpr:ue}),star:vt("*",{binop:10}),slash:zt("/",10),exponent:vt("**",{beforeExpr:re,binop:11,rightAssociative:!0}),_in:Fe("in",{beforeExpr:re,binop:7}),_instanceof:Fe("instanceof",{beforeExpr:re,binop:7}),_break:Fe("break"),_case:Fe("case",{beforeExpr:re}),_catch:Fe("catch"),_continue:Fe("continue"),_debugger:Fe("debugger"),_default:Fe("default",{beforeExpr:re}),_else:Fe("else",{beforeExpr:re}),_finally:Fe("finally"),_function:Fe("function",{startsExpr:ue}),_if:Fe("if"),_return:Fe("return",{beforeExpr:re}),_switch:Fe("switch"),_throw:Fe("throw",{beforeExpr:re,prefix:mt,startsExpr:ue}),_try:Fe("try"),_var:Fe("var"),_const:Fe("const"),_with:Fe("with"),_new:Fe("new",{beforeExpr:re,startsExpr:ue}),_this:Fe("this",{startsExpr:ue}),_super:Fe("super",{startsExpr:ue}),_class:Fe("class",{startsExpr:ue}),_extends:Fe("extends",{beforeExpr:re}),_export:Fe("export"),_import:Fe("import",{startsExpr:ue}),_null:Fe("null",{startsExpr:ue}),_true:Fe("true",{startsExpr:ue}),_false:Fe("false",{startsExpr:ue}),_typeof:Fe("typeof",{beforeExpr:re,prefix:mt,startsExpr:ue}),_void:Fe("void",{beforeExpr:re,prefix:mt,startsExpr:ue}),_delete:Fe("delete",{beforeExpr:re,prefix:mt,startsExpr:ue}),_do:Fe("do",{isLoop:Ie,beforeExpr:re}),_for:Fe("for",{isLoop:Ie}),_while:Fe("while",{isLoop:Ie}),_as:ni("as",{startsExpr:ue}),_assert:ni("assert",{startsExpr:ue}),_async:ni("async",{startsExpr:ue}),_await:ni("await",{startsExpr:ue}),_defer:ni("defer",{startsExpr:ue}),_from:ni("from",{startsExpr:ue}),_get:ni("get",{startsExpr:ue}),_let:ni("let",{startsExpr:ue}),_meta:ni("meta",{startsExpr:ue}),_of:ni("of",{startsExpr:ue}),_sent:ni("sent",{startsExpr:ue}),_set:ni("set",{startsExpr:ue}),_source:ni("source",{startsExpr:ue}),_static:ni("static",{startsExpr:ue}),_using:ni("using",{startsExpr:ue}),_yield:ni("yield",{startsExpr:ue}),_asserts:ni("asserts",{startsExpr:ue}),_checks:ni("checks",{startsExpr:ue}),_exports:ni("exports",{startsExpr:ue}),_global:ni("global",{startsExpr:ue}),_implements:ni("implements",{startsExpr:ue}),_intrinsic:ni("intrinsic",{startsExpr:ue}),_infer:ni("infer",{startsExpr:ue}),_is:ni("is",{startsExpr:ue}),_mixins:ni("mixins",{startsExpr:ue}),_proto:ni("proto",{startsExpr:ue}),_require:ni("require",{startsExpr:ue}),_satisfies:ni("satisfies",{startsExpr:ue}),_keyof:ni("keyof",{startsExpr:ue}),_readonly:ni("readonly",{startsExpr:ue}),_unique:ni("unique",{startsExpr:ue}),_abstract:ni("abstract",{startsExpr:ue}),_declare:ni("declare",{startsExpr:ue}),_enum:ni("enum",{startsExpr:ue}),_module:ni("module",{startsExpr:ue}),_namespace:ni("namespace",{startsExpr:ue}),_interface:ni("interface",{startsExpr:ue}),_type:ni("type",{startsExpr:ue}),_opaque:ni("opaque",{startsExpr:ue}),name:vt("name",{startsExpr:ue}),placeholder:vt("%%",{startsExpr:ue}),string:vt("string",{startsExpr:ue}),num:vt("num",{startsExpr:ue}),bigint:vt("bigint",{startsExpr:ue}),regexp:vt("regexp",{startsExpr:ue}),privateName:vt("#name",{startsExpr:ue}),eof:vt("eof"),jsxName:vt("jsxName"),jsxText:vt("jsxText",{beforeExpr:re}),jsxTagStart:vt("jsxTagStart",{startsExpr:ue}),jsxTagEnd:vt("jsxTagEnd")};function Wi(b){return b>=89&&b<=129}function xr(b){return b<=88}function Do(b){return b>=54&&b<=129}function As(b){return b>=54&&b<=132}function ra(b){return zn[b]}function gr(b){return yo[b]}function hl(b){return b>=25&&b<=29}function Ro(b){return b>=125&&b<=127}function vs(b){return b>=86&&b<=88}function er(b){return b>=54&&b<=88}function qa(b){return b>=35&&b<=55}function jo(b){return b===30}function fl(b){return Ei[b]}function pl(b){return b>=117&&b<=119}function tr(b){return b>=120&&b<=126}function ls(b){return Li[b]}function Or(b){return Bn[b]}function sa(b){return b===53}function Yi(b){return b>=20&&b<=21}function ir(b){return Kt[b]}var rd=class{constructor(b,m){this.token=b,this.preserveSpace=!!m}token;preserveSpace},_o={brace:new rd("{"),j_oTag:new rd("...",!0)},Pr="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088f\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5c\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdc-\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7dc\\ua7f1-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",Oh="\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1add\\u1ae0-\\u1aeb\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65",vb=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Bf=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Ph=new RegExp("["+Pr+"]"),Ni=new RegExp("["+Pr+Oh+"]");function te(b,m){let x=65536;for(let S=0,k=m.length;Sb)return!1;if(x+=m[S+1],x>=b)return!0}return!1}function ne(b){return b<65?b===36:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Ph.test(String.fromCharCode(b)):te(b,vb)}function le(b){return b<48?b===36:b<58?!0:b<65?!1:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Ni.test(String.fromCharCode(b)):te(b,vb)||te(b,Bf)}var fe={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ve=new Set(fe.keyword),Ve=new Set(fe.strict),$e=new Set(fe.strictBind);function It(b,m){return m&&b==="await"||b==="enum"}function qt(b,m){return It(b,m)||Ve.has(b)}function yi(b){return $e.has(b)}function pn(b,m){return qt(b,m)||yi(b)}function Mn(b){return ve.has(b)}function br(b,m,x){return b===64&&m===64&&ne(x)}var wo=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Ya(b){return wo.has(b)}var aa=class{flags=0;names=new Map;firstLexicalName="";constructor(b){this.flags=b}},sd=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(b,m){this.parser=b,this.inModule=m}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let b=this.currentThisScopeFlags();return(b&64)>0&&(b&2)===0}get inStaticBlock(){for(let b=this.scopeStack.length-1;;b--){let{flags:m}=this.scopeStack[b];if(m&128)return!0;if(m&3779)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(b){return new aa(b)}enter(b){this.scopeStack.push(this.createScope(b))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(b){return!!(b.flags&130||!this.parser.inModule&&b.flags&1)}declareName(b,m,x){let S=this.currentScope();if(m&8||m&16){this.checkRedeclarationInScope(S,b,m,x);let k=S.names.get(b)||0;m&16?k=k|4:(S.firstLexicalName||(S.firstLexicalName=b),k=k|2),S.names.set(b,k),m&8&&this.maybeExportDefined(S,b)}else if(m&4)for(let k=this.scopeStack.length-1;k>=0&&(S=this.scopeStack[k],this.checkRedeclarationInScope(S,b,m,x),S.names.set(b,(S.names.get(b)||0)|1),this.maybeExportDefined(S,b),!(S.flags&3715));--k);this.parser.inModule&&S.flags&1&&this.undefinedExports.delete(b)}maybeExportDefined(b,m){this.parser.inModule&&b.flags&1&&this.undefinedExports.delete(m)}checkRedeclarationInScope(b,m,x,S){this.isRedeclaredInScope(b,m,x)&&this.parser.raise(M.VarRedeclaration,S,{identifierName:m})}isRedeclaredInScope(b,m,x){if(!(x&1))return!1;if(x&8)return b.names.has(m);let S=b.names.get(m)||0;return x&16?(S&2)>0||!this.treatFunctionsAsVarInScope(b)&&(S&1)>0:(S&2)>0&&!(b.flags&8&&b.firstLexicalName===m)||!this.treatFunctionsAsVarInScope(b)&&(S&4)>0}checkLocalExport(b){let{name:m}=b;this.scopeStack[0].names.has(m)||this.undefinedExports.set(m,b.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let b=this.scopeStack.length-1;;b--){let{flags:m}=this.scopeStack[b];if(m&3715)return m}}currentThisScopeFlags(){for(let b=this.scopeStack.length-1;;b--){let{flags:m}=this.scopeStack[b];if(m&3779&&!(m&4))return m}}},di=class extends aa{declareFunctions=new Set},_e=class extends sd{createScope(b){return new di(b)}declareName(b,m,x){let S=this.currentScope();if(m&2048){this.checkRedeclarationInScope(S,b,m,x),this.maybeExportDefined(S,b),S.declareFunctions.add(b);return}super.declareName(b,m,x)}isRedeclaredInScope(b,m,x){if(super.isRedeclaredInScope(b,m,x))return!0;if(x&2048&&!b.declareFunctions.has(m)){let S=b.names.get(m);return(S&4)>0||(S&2)>0}return!1}checkLocalExport(b){this.scopeStack[0].declareFunctions.has(b.name)||super.checkLocalExport(b)}},_t=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),ot={AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:b})=>`Cannot overwrite reserved type ${b}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:b,enumName:m})=>`Boolean enum members need to be initialized. Use either \`${b} = true,\` or \`${b} = false,\` in enum \`${m}\`.`,EnumDuplicateMemberName:({memberName:b,enumName:m})=>`Enum member names need to be unique, but the name \`${b}\` has already been used before in enum \`${m}\`.`,EnumInconsistentMemberValues:({enumName:b})=>`Enum \`${b}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:b,enumName:m})=>`Enum type \`${b}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${m}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:b})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${b}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:b,memberName:m,explicitType:x})=>`Enum \`${b}\` has type \`${x}\`, so the initializer of \`${m}\` needs to be a ${x} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:b,memberName:m})=>`Symbol enum members cannot be initialized. Use \`${m},\` in enum \`${b}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:b,memberName:m})=>`The enum member initializer for \`${m}\` needs to be a literal (either a boolean, number, or string) in enum \`${b}\`.`,EnumInvalidMemberName:({enumName:b,memberName:m,suggestion:x})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${m}\`, consider using \`${x}\`, in enum \`${b}\`.`,EnumNumberMemberNotInitialized:({enumName:b,memberName:m})=>`Number enum members need to be initialized, e.g. \`${m} = 1\` in enum \`${b}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:b})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${b}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:{message:"A binding pattern parameter cannot be optional in an implementation signature."},SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:b})=>`Unexpected reserved type ${b}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:b,suggestion:m})=>`\`declare export ${b}\` is not supported. Use \`${m}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},Pt=U`flow`(ot);function js(b){return b.type==="DeclareExportAllDeclaration"||b.type==="DeclareExportDeclaration"&&(!b.declaration||b.declaration.type!=="TypeAlias"&&b.declaration.type!=="InterfaceDeclaration")}function Qs(b){return b.importKind==="type"||b.importKind==="typeof"}var no={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ks(b,m){let x=[],S=[];for(let k=0;kclass extends b{flowPragma=void 0;getScopeHandler(){return _e}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(m,x){m!==130&&m!==9&&m!==24&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(m,x)}addComment(m){if(this.flowPragma===void 0){let x=Fp.exec(m.value);if(x)if(x[1]==="flow")this.flowPragma="flow";else if(x[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(m)}flowParseTypeInitialiser(m){let x=this.state.inType;this.state.inType=!0,this.expect(m||10);let S=this.flowParseType();return this.state.inType=x,S}flowParsePredicate(){let m=this.startNode(),x=this.state.startLoc;return this.next(),this.expectContextual(106),this.state.lastTokStartLoc.index>x.index+1&&this.raise(Pt.UnexpectedSpaceBetweenModuloChecks,x),this.eat(6)?(m.value=super.parseExpression(),this.expect(7),this.finishNode(m,"DeclaredPredicate")):this.finishNode(m,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(m){let x=this.state.inType;this.state.inType=!0,this.expect(10);let S=null,k=null;return m&&this.match(50)?(this.state.inType=x,k=this.flowParsePredicate()):(S=this.flowParseType(),this.state.inType=x,this.match(50)&&(k=this.flowParsePredicate())),[S,k]}flowParseDeclareClass(m){return this.next(),this.flowParseInterfaceish(m,!0),this.finishNode(m,"DeclareClass")}flowParseDeclareFunction(m){this.next();let x=m.id=this.parseIdentifier(),S=this.startNode(),k=this.startNode();this.match(43)?S.typeParameters=this.flowParseTypeParameterDeclaration():S.typeParameters=null,this.expect(6);let O=this.flowParseFunctionTypeParams();return S.params=O.params,S.rest=O.rest,S.this=O._this,this.expect(7),[S.returnType,m.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),k.typeAnnotation=this.finishNode(S,"FunctionTypeAnnotation"),x.typeAnnotation=this.finishNode(k,"TypeAnnotation"),this.resetEndLocation(x),this.semicolon(),this.scope.declareName(m.id.name,2048,m.id.start),this.finishNode(m,"DeclareFunction")}flowParseDeclare(m,x){if(this.match(76))return this.flowParseDeclareClass(m);if(this.match(64))return this.flowParseDeclareFunction(m);if(this.match(70))return this.flowParseDeclareVariable(m);if(this.eatContextual(123))return this.match(12)?this.flowParseDeclareModuleExports(m):(x&&this.raise(Pt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(m));if(this.isContextual(126))return this.flowParseDeclareTypeAlias(m);if(this.isContextual(127))return this.flowParseDeclareOpaqueType(m);if(this.isContextual(125))return this.flowParseDeclareInterface(m);if(this.match(78))return this.flowParseDeclareExportDeclaration(m,x);throw this.unexpected()}flowParseDeclareVariable(m){return this.next(),m.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(m.id.name,5,m.id.start),this.semicolon(),this.finishNode(m,"DeclareVariable")}flowParseDeclareModule(m){this.scope.enter(0),this.match(130)?m.id=super.parseExprAtom():m.id=this.parseIdentifier();let x=this.startNode(),S=x.body=[];for(this.expect(2);!this.match(4);){let G=this.startNode();this.match(79)?(this.next(),!this.isContextual(126)&&!this.match(83)&&this.raise(Pt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),S.push(super.parseImport(G))):(this.expectContextual(121,Pt.UnsupportedStatementInDeclareModule),S.push(this.flowParseDeclare(G,!0)))}this.scope.exit(),this.expect(4),m.body=this.finishNode(x,"BlockStatement");let k=null,O=!1;return S.forEach(G=>{js(G)?(k==="CommonJS"&&this.raise(Pt.AmbiguousDeclareModuleKind,G),k="ES"):G.type==="DeclareModuleExports"&&(O&&this.raise(Pt.DuplicateDeclareModuleExports,G),k==="ES"&&this.raise(Pt.AmbiguousDeclareModuleKind,G),k="CommonJS",O=!0)}),m.kind=k||"CommonJS",this.finishNode(m,"DeclareModule")}flowParseDeclareExportDeclaration(m,x){if(this.expect(78),this.eat(61))return this.match(64)||this.match(76)?m.declaration=this.flowParseDeclare(this.startNode()):(m.declaration=this.flowParseType(),this.semicolon()),m.default=!0,this.finishNode(m,"DeclareExportDeclaration");if(this.match(71)||this.isLet()||(this.isContextual(126)||this.isContextual(125))&&!x){let S=this.state.value;throw this.raise(Pt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:S,suggestion:no[S]})}if(this.match(70)||this.match(64)||this.match(76)||this.isContextual(127))return m.declaration=this.flowParseDeclare(this.startNode()),m.default=!1,this.finishNode(m,"DeclareExportDeclaration");if(this.match(51)||this.match(2)||this.isContextual(125)||this.isContextual(126)||this.isContextual(127)){let S=this.parseExport(m,null);return S.type==="ExportNamedDeclaration"?(S.default=!1,delete S.exportKind,this.castNodeTo(S,"DeclareExportDeclaration")):this.castNodeTo(S,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(m){return this.next(),this.expectContextual(107),m.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(m,"DeclareModuleExports")}flowParseDeclareTypeAlias(m){this.next();let x=this.flowParseTypeAlias(m);return this.castNodeTo(x,"DeclareTypeAlias"),x}flowParseDeclareOpaqueType(m){return this.next(),this.flowParseOpaqueType(m,!0)}flowParseDeclareInterface(m){return this.next(),this.flowParseInterfaceish(m,!1),this.finishNode(m,"DeclareInterface")}flowParseInterfaceish(m,x){if(m.id=this.flowParseRestrictedIdentifier(!x,!0),this.scope.declareName(m.id.name,x?17:8201,m.id.start),this.match(43)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.extends=[],this.eat(77))do m.extends.push(this.flowParseInterfaceExtends());while(!x&&this.eat(8));if(x){let S=[],k=[];if(this.eatContextual(113))do k.push(this.flowParseInterfaceExtends());while(this.eat(8));if(this.eatContextual(109))do S.push(this.flowParseClassImplements());while(this.eat(8));m.implements=S,m.mixins=k}m.body=this.flowParseObjectType({allowStatic:x,allowExact:!1,allowSpread:!1,allowProto:x,allowInexact:!1})}flowParseInterfaceExtends(){let m=this.startNode();return m.id=this.flowParseQualifiedTypeIdentifier(),this.match(43)?m.typeParameters=this.flowParseTypeParameterInstantiation():m.typeParameters=null,this.finishNode(m,"InterfaceExtends")}flowParseInterface(m){return this.flowParseInterfaceish(m,!1),this.finishNode(m,"InterfaceDeclaration")}checkNotUnderscore(m){m==="_"&&this.raise(Pt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(m,x,S){_t.has(m)&&this.raise(S?Pt.AssignReservedType:Pt.UnexpectedReservedType,x,{reservedType:m})}flowParseRestrictedIdentifierName(m,x){return this.checkReservedType(this.state.value,this.state.startLoc,x),this.parseIdentifierName(m)}flowParseRestrictedIdentifier(m,x){let S=this.startNode(),k=this.flowParseRestrictedIdentifierName(m,x);return this.createIdentifier(S,k)}flowParseTypeAlias(m){return m.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(m.id.name,8201,m.id.start),this.match(43)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(m,"TypeAlias")}flowParseOpaqueType(m,x){return this.expectContextual(126),m.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(m.id.name,8201,m.id.start),this.match(43)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.supertype=null,this.match(10)&&(m.supertype=this.flowParseTypeInitialiser(10)),m.impltype=null,x||(m.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(m,x?"DeclareOpaqueType":"OpaqueType")}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){let m=this.startNode();return this.next(),m.typeAnnotation=this.flowParseType(),this.finishNode(m,"TypeAnnotation")}}flowParseTypeParameter(m=!1){let x=this.state.startLoc,S=this.startNode(),k=this.flowParseVariance();return S.name=this.flowParseRestrictedIdentifierName(),S.variance=k,S.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),S.default=this.flowParseType()):m&&this.raise(Pt.MissingTypeParamDefault,x),this.finishNode(S,"TypeParameter")}flowParseTypeParameterDeclaration(){let m=this.state.inType,x=this.startNode();x.params=[],this.state.inType=!0,this.match(43)||this.match(138)?this.next():this.unexpected();let S=!1;do{let k=this.flowParseTypeParameter(S);x.params.push(k),k.default&&(S=!0),this.match(44)||this.expect(8)}while(!this.match(44));return this.expect(44),this.state.inType=m,this.finishNode(x,"TypeParameterDeclaration")}flowInTopLevelContext(m){if(this.curContext()!==_o.brace){let x=this.state.context;this.state.context=[x[0]];try{return m()}finally{this.state.context=x}}else return m()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===43)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let m=this.startNode(),x=this.state.inType;return this.state.inType=!0,m.params=[],this.flowInTopLevelContext(()=>{this.expect(43);let S=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(44);)m.params.push(this.flowParseType()),this.match(44)||this.expect(8);this.state.noAnonFunctionType=S}),this.state.inType=x,!this.state.inType&&this.curContext()===_o.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(m,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==43)return null;let m=this.startNode(),x=this.state.inType;for(m.params=[],this.state.inType=!0,this.expect(43);!this.match(44);)m.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(44)||this.expect(8);return this.expect(44),this.state.inType=x,this.finishNode(m,"TypeParameterInstantiation")}flowParseInterfaceType(){let m=this.startNode();if(this.expectContextual(125),m.extends=[],this.eat(77))do m.extends.push(this.flowParseInterfaceExtends());while(this.eat(8));return m.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(m,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(131)||this.match(130)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(m,x,S){return m.static=x,this.lookahead().type===10?(m.id=this.parseIdentifier(!0),m.key=this.flowParseTypeInitialiser()):(m.id=null,m.key=this.flowParseType()),this.expect(1),m.value=this.flowParseTypeInitialiser(),m.variance=S,this.finishNode(m,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(m,x){return m.static=x,m.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(m.method=!0,m.optional=!1,m.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(m))):(m.method=!1,this.eat(13)&&(m.optional=!0),m.value=this.flowParseTypeInitialiser()),this.finishNode(m,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(m){for(m.params=[],m.rest=null,m.typeParameters=null,m.this=null,this.match(43)&&(m.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(m.this=this.flowParseFunctionTypeParam(!0),m.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)m.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(m.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),m.returnType=this.flowParseTypeInitialiser(),this.finishNode(m,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(m,x){let S=this.startNode();return m.static=x,m.value=this.flowParseObjectTypeMethodish(S),this.finishNode(m,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:m,allowExact:x,allowSpread:S,allowProto:k,allowInexact:O}){let G=this.state.inType;this.state.inType=!0;let ie=this.startNode();ie.callProperties=[],ie.properties=[],ie.indexers=[],ie.internalSlots=[];let be,pe,lt=!1;for(x&&this.match(3)?(this.expect(3),be=5,pe=!0):(this.expect(2),be=4,pe=!1),ie.exact=pe;!this.match(be);){let Ui=!1,Zn=null,Gc=null,Yd=this.startNode();if(k&&this.isContextual(114)){let pc=this.lookahead();pc.type!==10&&pc.type!==13&&(this.next(),Zn=this.state.startLoc,m=!1)}if(m&&this.isContextual(102)){let pc=this.lookahead();pc.type!==10&&pc.type!==13&&(this.next(),Ui=!0)}let fc=this.flowParseVariance();if(this.eat(0))Zn!=null&&this.unexpected(Zn),this.eat(0)?(fc&&this.unexpected(fc.start),ie.internalSlots.push(this.flowParseObjectTypeInternalSlot(Yd,Ui))):ie.indexers.push(this.flowParseObjectTypeIndexer(Yd,Ui,fc));else if(this.match(6)||this.match(43))Zn!=null&&this.unexpected(Zn),fc&&this.unexpected(fc.start),ie.callProperties.push(this.flowParseObjectTypeCallProperty(Yd,Ui));else{let pc="init";if(this.isContextual(95)||this.isContextual(100)){let Eye=this.lookahead();As(Eye.type)&&(pc=this.state.value,this.next())}let Km=this.flowParseObjectTypeProperty(Yd,Ui,Zn,fc,pc,S,O??!pe);Km===null?(lt=!0,Gc=this.state.lastTokStartLoc):ie.properties.push(Km)}this.flowObjectTypeSemicolon(),Gc&&!this.match(4)&&!this.match(5)&&this.raise(Pt.UnexpectedExplicitInexactInObject,Gc)}this.expect(be),S&&(ie.inexact=lt);let Mt=this.finishNode(ie,"ObjectTypeAnnotation");return this.state.inType=G,Mt}flowParseObjectTypeProperty(m,x,S,k,O,G,ie){if(this.eat(17))return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(G?ie||this.raise(Pt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Pt.InexactInsideNonObject,this.state.lastTokStartLoc),k&&this.raise(Pt.InexactVariance,k),null):(G||this.raise(Pt.UnexpectedSpreadType,this.state.lastTokStartLoc),S!=null&&this.unexpected(S),k&&this.raise(Pt.SpreadVariance,k),m.argument=this.flowParseType(),this.finishNode(m,"ObjectTypeSpreadProperty"));{m.key=this.flowParseObjectPropertyKey(),m.static=x,m.proto=S!=null,m.kind=O;let be=!1;return this.match(43)||this.match(6)?(m.method=!0,S!=null&&this.unexpected(S),k&&this.unexpected(k.start),m.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(m)),O==="get"||O==="set"?this.flowCheckGetterSetterParams(m):!x&&!G&&m.key.name==="constructor"&&m.value.this&&this.raise(Pt.ThisParamBannedInConstructor,m.value.this)):(O!=="init"&&this.unexpected(),m.method=!1,this.eat(13)&&(be=!0),m.value=this.flowParseTypeInitialiser(),m.variance=k),m.optional=be,this.finishNode(m,"ObjectTypeProperty")}}flowCheckGetterSetterParams(m){let x=m.kind==="get"?0:1,S=m.value,k=S.params.length+(S.rest?1:0);S.this&&this.raise(m.kind==="get"?Pt.GetterMayNotHaveThisParam:Pt.SetterMayNotHaveThisParam,S.this),k!==x&&this.raise(m.kind==="get"?M.BadGetterArity:M.BadSetterArity,m),m.kind==="set"&&S.rest&&this.raise(M.BadSetterRestParameter,m)}flowObjectTypeSemicolon(){!this.eat(9)&&!this.eat(8)&&!this.match(4)&&!this.match(5)&&this.unexpected()}flowParseQualifiedTypeIdentifier(m,x){m??(m=this.state.startLoc);let S=x||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){let k=this.startNodeAt(m);k.qualification=S,k.id=this.flowParseRestrictedIdentifier(!0),S=this.finishNode(k,"QualifiedTypeIdentifier")}return S}flowParseGenericType(m,x){let S=this.startNodeAt(m);return S.typeParameters=null,S.id=this.flowParseQualifiedTypeIdentifier(m,x),this.match(43)&&(S.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(S,"GenericTypeAnnotation")}flowParseTypeofType(){let m=this.startNode();return this.expect(83),m.argument=this.flowParsePrimaryType(),this.finishNode(m,"TypeofTypeAnnotation")}flowParseTupleType(){let m=this.startNode();for(m.types=[],this.expect(0);this.state.possuper.parseFunctionBody(m,!0,S));return}super.parseFunctionBody(m,!1,S)}parseFunctionBodyAndFinish(m,x,S=!1){if(this.match(10)){let k=this.startNode();x==="FunctionDeclaration"||x==="FunctionExpression"||x==="ArrowFunctionExpression"?[k.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):k.typeAnnotation=this.flowParseTypeInitialiser(),m.returnType=k.typeAnnotation?this.finishNode(k,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(m,x,S)}parseStatementLike(m){if(this.state.strict&&this.isContextual(125)){let S=this.lookahead();if(Do(S.type)){let k=this.startNode();return this.next(),this.flowParseInterface(k)}}else if(this.isContextual(122)){let S=this.startNode();return this.next(),this.flowParseEnumDeclaration(S)}let x=super.parseStatementLike(m);return this.flowPragma===void 0&&!this.isValidDirective(x)&&(this.flowPragma=null),x}parseExpressionStatement(m,x,S){if(x.type==="Identifier"){if(x.name==="declare"){if(this.match(76)||Wi(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(m)}else if(Wi(this.state.type)){if(x.name==="interface")return this.flowParseInterface(m);if(x.name==="type")return this.flowParseTypeAlias(m);if(x.name==="opaque")return this.flowParseOpaqueType(m,!1)}}return super.parseExpressionStatement(m,x,S)}shouldParseExportDeclaration(){let{type:m}=this.state;return m===122||Ro(m)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:m}=this.state;return m===122||Ro(m)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(122)){let m=this.startNode();return this.next(),this.flowParseEnumDeclaration(m)}return super.parseExportDefaultExpression()}parseConditional(m,x,S){if(!this.match(13))return m;if(S!=null){let Ui=this.lookaheadCharCode();if(Ui===44||Ui===61||Ui===58||Ui===41)return this.setOptionalParametersError(S),m}this.expect(13);let k=this.state.clone(),O=this.state.noArrowAt,G=this.startNodeAt(x),{consequent:ie,failed:be}=this.tryParseConditionalConsequent(),pe=this.getArrowLikeExpressions(ie),lt=pe[0],Mt=pe[1];if(be||Mt.length>0){let Ui=[...O];if(Mt.length>0){this.state=k,this.state.noArrowAt=Ui;for(let Zn=0;Zn1&&this.raise(Pt.AmbiguousConditionalArrow,k.startLoc),be&<.length===1&&(this.state=k,Ui.push(lt[0].start),this.state.noArrowAt=Ui,{consequent:ie}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(ie,!0),this.state.noArrowAt=O,this.expect(10),G.test=m,G.consequent=ie,G.alternate=this.forwardNoArrowParamsConversionAt(G,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(G,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let m=this.parseMaybeAssignAllowIn(),x=!this.match(10);return this.state.noArrowParamsConversionAt.pop(),{consequent:m,failed:x}}getArrowLikeExpressions(m,x){let S=[m],k=[];for(;S.length!==0;){let O=S.pop();O.type==="ArrowFunctionExpression"&&O.body.type!=="BlockStatement"?(O.typeParameters||!O.returnType?this.finishArrowValidation(O):k.push(O),S.push(O.body)):O.type==="ConditionalExpression"&&(S.push(O.consequent),S.push(O.alternate))}return x?(k.forEach(O=>this.finishArrowValidation(O)),[k,[]]):ks(k,O=>O.params.every(G=>this.isAssignable(G,!0)))}finishArrowValidation(m){this.toAssignableList(m.params,m.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(m,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(m,x){let S;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(m.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),S=x(),this.state.noArrowParamsConversionAt.pop()):S=x(),S}parseParenItem(m,x){let S=super.parseParenItem(m,x);if(this.eat(13)&&(S.optional=!0,this.resetEndLocation(m)),this.match(10)){let k=this.startNodeAt(x);return k.expression=S,k.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(k,"TypeCastExpression")}return S}assertModuleNodeAllowed(m){m.type==="ImportDeclaration"&&(m.importKind==="type"||m.importKind==="typeof")||m.type==="ExportNamedDeclaration"&&m.exportKind==="type"||m.type==="ExportAllDeclaration"&&m.exportKind==="type"||super.assertModuleNodeAllowed(m)}parseExportDeclaration(m){if(this.isContextual(126)){m.exportKind="type";let x=this.startNode();return this.next(),this.match(2)?(m.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(m),null):this.flowParseTypeAlias(x)}else if(this.isContextual(127)){m.exportKind="type";let x=this.startNode();return this.next(),this.flowParseOpaqueType(x,!1)}else if(this.isContextual(125)){m.exportKind="type";let x=this.startNode();return this.next(),this.flowParseInterface(x)}else if(this.isContextual(122)){m.exportKind="value";let x=this.startNode();return this.next(),this.flowParseEnumDeclaration(x)}else return super.parseExportDeclaration(m)}eatExportStar(m){return super.eatExportStar(m)?!0:this.isContextual(126)&&this.lookahead().type===51?(m.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(m){let{startLoc:x}=this.state,S=super.maybeParseExportNamespaceSpecifier(m);return S&&m.exportKind==="type"&&this.unexpected(x),S}parseClassId(m,x,S){if((!x||S)&&this.isContextual(109)){m.id=null;return}super.parseClassId(m,x,S),this.match(43)&&(m.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(m,x,S){let{startLoc:k}=this.state;if(this.isContextual(121)){if(super.parseClassMemberFromModifier(m,x))return;x.declare=!0}super.parseClassMember(m,x,S),x.declare&&(x.type!=="ClassProperty"&&x.type!=="ClassPrivateProperty"&&x.type!=="PropertyDefinition"?this.raise(Pt.DeclareClassElement,k):x.value&&this.raise(Pt.DeclareClassFieldInitializer,x.value))}isIterator(m){return m==="iterator"||m==="asyncIterator"}readIterator(){let m=super.readWord1(),x="@@"+m;(!this.isIterator(m)||!this.state.inType)&&this.raise(M.InvalidIdentifier,this.state.curPosition(),{identifierName:x}),this.finishToken(128,x)}getTokenFromCode(m){let x=this.input.charCodeAt(this.state.pos+1);m===123&&x===124?this.finishOp(3,2):this.state.inType&&(m===62||m===60)?this.finishOp(m===62?44:43,1):this.state.inType&&m===63?x===46?this.finishOp(14,2):this.finishOp(13,1):br(m,x,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(m)}isAssignable(m,x){return m.type==="TypeCastExpression"?this.isAssignable(m.expression,x):super.isAssignable(m,x)}toAssignable(m,x=!1){!x&&m.type==="AssignmentExpression"&&m.left.type==="TypeCastExpression"&&(m.left=this.typeCastToParameter(m.left)),super.toAssignable(m,x)}toAssignableListItem(m,x,S){let k=m[x];k.type==="TypeCastExpression"&&(m[x]=this.typeCastToParameter(k)),super.toAssignableListItem(m,x,S)}toReferencedList(m,x){for(let S=0;S1||!x)&&this.raise(Pt.TypeCastInPattern,k.typeAnnotation)}return m}parseArrayLike(m,x){let S=super.parseArrayLike(m,x);return S.type==="ArrayExpression"&&this.toReferencedList(S.elements),S}isValidLVal(m,x,S,k){return m==="TypeCastExpression"||super.isValidLVal(m,x,S,k)}parseClassProperty(m){return this.match(10)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(m)}parseClassPrivateProperty(m){return this.match(10)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(m)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(10)||super.isClassProperty()}isNonstaticConstructor(m){return!this.match(10)&&super.isNonstaticConstructor(m)}pushClassMethod(m,x,S,k,O,G){if(x.variance&&this.unexpected(x.variance.start),delete x.variance,this.match(43)&&(x.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(m,x,S,k,O,G),x.params&&O){let ie=x.params;ie.length>0&&this.isThisParam(ie[0])&&this.raise(Pt.ThisParamBannedInConstructor,x)}else if(x.type==="MethodDefinition"&&O&&x.value.params){let ie=x.value.params;ie.length>0&&this.isThisParam(ie[0])&&this.raise(Pt.ThisParamBannedInConstructor,x)}}pushClassPrivateMethod(m,x,S,k){x.variance&&this.unexpected(x.variance.start),delete x.variance,this.match(43)&&(x.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(m,x,S,k)}flowParseClassImplements(){let m=this.startNode();return m.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?m.typeParameters=this.flowParseTypeParameterInstantiation():m.typeParameters=null,this.finishNode(m,"ClassImplements")}parseClassSuper(m){if(super.parseClassSuper(m),m.superClass&&(this.match(43)||this.match(47))&&(m.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(109)){let x=m.implements=[];do x.push(this.flowParseClassImplements());while(this.eat(8))}}checkGetterSetterParams(m){super.checkGetterSetterParams(m);let x=this.getObjectOrClassMethodParams(m);if(x.length>0){let S=x[0];this.isThisParam(S)&&m.kind==="get"?this.raise(Pt.GetterMayNotHaveThisParam,S):this.isThisParam(S)&&this.raise(Pt.SetterMayNotHaveThisParam,S)}}parsePropertyNamePrefixOperator(m){m.variance=this.flowParseVariance()}parseObjPropValue(m,x,S,k,O,G,ie){m.variance&&this.unexpected(m.variance.start),delete m.variance;let be;this.match(43)&&!G&&(be=this.flowParseTypeParameterDeclaration(),this.match(6)||this.unexpected());let pe=super.parseObjPropValue(m,x,S,k,O,G,ie);return be&&((pe.value||pe).typeParameters=be),pe}parseFunctionParamType(m){return this.eat(13)&&(m.type!=="Identifier"&&this.raise(Pt.PatternIsOptional,m),this.isThisParam(m)&&this.raise(Pt.ThisParamMayNotBeOptional,m),m.optional=!0),this.match(10)?m.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(m)&&this.raise(Pt.ThisParamAnnotationRequired,m),this.match(25)&&this.isThisParam(m)&&this.raise(Pt.ThisParamNoDefault,m),this.resetEndLocation(m),m}parseMaybeDefault(m,x){let S=super.parseMaybeDefault(m,x);return S.type==="AssignmentPattern"&&S.typeAnnotation&&S.right.startsuper.parseMaybeAssign(m,x),S),!k.error)return k.node;let{context:O}=this.state,G=O[O.length-1];(G===_o.j_oTag||G===_o.j_expr)&&O.pop()}if(k?.error||this.match(43)){S=S||this.state.clone();let O,G=this.tryParse(be=>{O=this.flowParseTypeParameterDeclaration();let pe=this.forwardNoArrowParamsConversionAt(O,()=>{let Mt=super.parseMaybeAssign(m,x);return this.resetStartLocationFromNode(Mt,O),Mt});pe.extra?.parenthesized&&be();let lt=this.maybeUnwrapTypeCastExpression(pe);return lt.type!=="ArrowFunctionExpression"&&be(),lt.typeParameters=O,this.resetStartLocationFromNode(lt,O),pe},S),ie=null;if(G.node&&this.maybeUnwrapTypeCastExpression(G.node).type==="ArrowFunctionExpression"){if(!G.error&&!G.aborted)return G.node.async&&this.raise(Pt.UnexpectedTypeParameterBeforeAsyncArrowFunction,O),G.node;ie=G.node}if(k?.node)return this.state=k.failState,k.node;if(ie)return this.state=G.failState,ie;throw k?.thrown?k.error:G.thrown?G.error:this.raise(Pt.UnexpectedTokenAfterTypeParameter,O)}return super.parseMaybeAssign(m,x)}parseArrow(m){if(this.match(10)){let x=this.tryParse(()=>{let S=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let k=this.startNode();return[k.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=S,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||this.unexpected(),k});if(x.thrown)return null;x.error&&(this.state=x.failState),m.returnType=x.node.typeAnnotation?this.finishNode(x.node,"TypeAnnotation"):null}return super.parseArrow(m)}shouldParseArrow(m){return this.match(10)||super.shouldParseArrow(m)}setArrowFunctionParameters(m,x){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(m.start))?m.params=x:super.setArrowFunctionParameters(m,x)}checkParams(m,x,S,k=!0){if(!(S&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(m.start)))){for(let O=0;O0&&this.raise(Pt.ThisParamMustBeFirst,m.params[O]);super.checkParams(m,x,S,k)}}parseParenAndDistinguishExpression(m){return super.parseParenAndDistinguishExpression(m&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(m,x,S){if(m.type==="Identifier"&&m.name==="async"&&this.state.noArrowAt.includes(x.index)){this.next();let k=this.startNodeAt(x);k.callee=m,k.arguments=super.parseCallExpressionArguments(),m=this.finishNode(k,"CallExpression")}else if(m.type==="Identifier"&&m.name==="async"&&this.match(43)){let k=this.state.clone(),O=this.tryParse(ie=>this.parseAsyncArrowWithTypeParameters(x)||ie(),k);if(!O.error&&!O.aborted)return O.node;let G=this.tryParse(()=>super.parseSubscripts(m,x,S),k);if(G.node&&!G.error)return G.node;if(O.node)return this.state=O.failState,O.node;if(G.node)return this.state=G.failState,G.node;throw O.error||G.error}return super.parseSubscripts(m,x,S)}parseSubscript(m,x,S,k){if(this.match(14)&&this.isLookaheadToken_lt()){if(k.optionalChainMember=!0,S)return k.stop=!0,m;this.next();let O=this.startNodeAt(x);return O.callee=m,O.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(6),O.arguments=this.parseCallExpressionArguments(),O.optional=!0,this.finishCallExpression(O,!0)}else if(!S&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){let O=this.startNodeAt(x);O.callee=m;let G=this.tryParse(()=>(O.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),O.arguments=super.parseCallExpressionArguments(),k.optionalChainMember&&(O.optional=!1),this.finishCallExpression(O,k.optionalChainMember)));if(G.node)return G.error&&(this.state=G.failState),G.node}return super.parseSubscript(m,x,S,k)}parseNewCallee(m){super.parseNewCallee(m);let x=null;this.shouldParseTypes()&&this.match(43)&&(x=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),m.typeArguments=x}parseAsyncArrowWithTypeParameters(m){let x=this.startNodeAt(m);if(this.parseFunctionParams(x,!1),!!this.parseArrow(x))return super.parseArrowExpression(x,void 0,!0)}readToken_mult_modulo(m){let x=this.input.charCodeAt(this.state.pos+1);if(m===42&&x===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(m)}readToken_pipe_amp(m){let x=this.input.charCodeAt(this.state.pos+1);if(m===124&&x===125){this.finishOp(5,2);return}super.readToken_pipe_amp(m)}parseTopLevel(m,x){let S=super.parseTopLevel(m,x);return this.state.hasFlowComment&&this.raise(Pt.UnterminatedFlowComment,this.state.curPosition()),S}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Pt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let m=this.skipFlowComment();m&&(this.state.pos+=m,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:m}=this.state,x=2;for(;[32,9].includes(this.input.charCodeAt(m+x));)x++;let S=this.input.charCodeAt(x+m),k=this.input.charCodeAt(x+m+1);return S===58&&k===58?x+2:this.input.slice(x+m,x+m+12)==="flow-include"?x+12:S===58&&k!==58?x:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(M.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(m,x){this.raise(Pt.EnumBooleanMemberNotInitialized,m,x)}flowEnumErrorInvalidMemberInitializer(m,x){return this.raise(x.explicitType?x.explicitType==="symbol"?Pt.EnumInvalidMemberInitializerSymbolType:Pt.EnumInvalidMemberInitializerPrimaryType:Pt.EnumInvalidMemberInitializerUnknownType,m,x)}flowEnumErrorNumberMemberNotInitialized(m,x){this.raise(Pt.EnumNumberMemberNotInitialized,m,x)}flowEnumErrorStringMemberInconsistentlyInitialized(m,x){this.raise(Pt.EnumStringMemberInconsistentlyInitialized,m,x)}flowEnumMemberInit(){let m=this.state.startLoc,x=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{let S=this.parseNumericLiteral(this.state.value);if(x())return{type:"number",loc:S.start,value:S};break}case 130:{let S=this.parseStringLiteral(this.state.value);if(x())return{type:"string",loc:S.start,value:S};break}case 81:case 82:{let S=this.parseBooleanLiteral(this.match(81));if(x())return{type:"boolean",loc:S.start,value:S}}}return{type:"invalid",loc:m}}flowEnumMemberRaw(){let m=this.state.startLoc,x=this.parseIdentifier(!0),S=this.eat(25)?this.flowEnumMemberInit():{type:"none",loc:m};return{id:x,init:S}}flowEnumCheckExplicitTypeMismatch(m,x,S){let{explicitType:k}=x;k!==null&&k!==S&&this.flowEnumErrorInvalidMemberInitializer(m,x)}flowEnumMembers({enumName:m,explicitType:x}){let S=new Set,k={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},O=!1;for(;!this.match(4);){if(this.eat(17)){O=!0;break}let G=this.startNode(),{id:ie,init:be}=this.flowEnumMemberRaw(),pe=ie.name;if(pe==="")continue;/^[a-z]/.test(pe)&&this.raise(Pt.EnumInvalidMemberName,ie,{memberName:pe,suggestion:pe[0].toUpperCase()+pe.slice(1),enumName:m}),S.has(pe)&&this.raise(Pt.EnumDuplicateMemberName,ie,{memberName:pe,enumName:m}),S.add(pe);let lt={enumName:m,explicitType:x,memberName:pe};switch(G.id=ie,be.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(be.loc,lt,"boolean"),G.init=be.value,k.booleanMembers.push(this.finishNode(G,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(be.loc,lt,"number"),G.init=be.value,k.numberMembers.push(this.finishNode(G,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(be.loc,lt,"string"),G.init=be.value,k.stringMembers.push(this.finishNode(G,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(be.loc,lt);case"none":switch(x){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(be.loc,lt);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(be.loc,lt);break;default:k.defaultedMembers.push(this.finishNode(G,"EnumDefaultedMember"))}}this.match(4)||this.expect(8)}return{members:k,hasUnknownMembers:O}}flowEnumStringMembers(m,x,{enumName:S}){if(m.length===0)return x;if(x.length===0)return m;if(x.length>m.length){for(let k of m)this.flowEnumErrorStringMemberInconsistentlyInitialized(k,{enumName:S});return x}else{for(let k of x)this.flowEnumErrorStringMemberInconsistentlyInitialized(k,{enumName:S});return m}}flowEnumParseExplicitType({enumName:m}){if(!this.eatContextual(98))return null;if(!Wi(this.state.type))throw this.raise(Pt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:m});let{value:x}=this.state;return this.next(),x!=="boolean"&&x!=="number"&&x!=="string"&&x!=="symbol"&&this.raise(Pt.EnumInvalidExplicitType,this.state.startLoc,{enumName:m,invalidEnumType:x}),x}flowEnumBody(m,x){let S=x.name,k=x.start,O=this.flowEnumParseExplicitType({enumName:S});this.expect(2);let{members:G,hasUnknownMembers:ie}=this.flowEnumMembers({enumName:S,explicitType:O});switch(m.hasUnknownMembers=ie,O){case"boolean":return m.explicitType=!0,m.members=G.booleanMembers,this.expect(4),this.finishNode(m,"EnumBooleanBody");case"number":return m.explicitType=!0,m.members=G.numberMembers,this.expect(4),this.finishNode(m,"EnumNumberBody");case"string":return m.explicitType=!0,m.members=this.flowEnumStringMembers(G.stringMembers,G.defaultedMembers,{enumName:S}),this.expect(4),this.finishNode(m,"EnumStringBody");case"symbol":return m.members=G.defaultedMembers,this.expect(4),this.finishNode(m,"EnumSymbolBody");default:{let be=()=>(m.members=[],this.expect(4),this.finishNode(m,"EnumStringBody"));m.explicitType=!1;let pe=G.booleanMembers.length,lt=G.numberMembers.length,Mt=G.stringMembers.length,Ui=G.defaultedMembers.length;if(!pe&&!lt&&!Mt&&!Ui)return be();if(!pe&&!lt)return m.members=this.flowEnumStringMembers(G.stringMembers,G.defaultedMembers,{enumName:S}),this.expect(4),this.finishNode(m,"EnumStringBody");if(!lt&&!Mt&&pe>=Ui){for(let Zn of G.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(Zn.start,{enumName:S,memberName:Zn.id.name});return m.members=G.booleanMembers,this.expect(4),this.finishNode(m,"EnumBooleanBody")}else if(!pe&&!Mt&<>=Ui){for(let Zn of G.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(Zn.start,{enumName:S,memberName:Zn.id.name});return m.members=G.numberMembers,this.expect(4),this.finishNode(m,"EnumNumberBody")}else return this.raise(Pt.EnumInconsistentMemberValues,k,{enumName:S}),be()}}}flowParseEnumDeclaration(m){let x=this.parseIdentifier();return m.id=x,m.body=this.flowEnumBody(this.startNode(),x),this.finishNode(m,"EnumDeclaration")}jsxParseOpeningElementAfterName(m){return this.shouldParseTypes()&&(this.match(43)||this.match(47))&&(m.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(m)}isLookaheadToken_lt(){let m=this.nextTokenStart();if(this.input.charCodeAt(m)===60){let x=this.input.charCodeAt(m+1);return x!==60&&x!==61}return!1}reScan_lt_gt(){let{type:m}=this.state;m===43?(this.state.pos-=1,this.readToken_lt()):m===44&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:m}=this.state;return m===47?(this.state.pos-=2,this.finishOp(43,1),43):m}maybeUnwrapTypeCastExpression(m){return m.type==="TypeCastExpression"?m.expression:m}},ZM=/\r\n|[\r\n\u2028\u2029]/,_w=new RegExp(ZM.source,"g");function F_(b){switch(b){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function zY(b,m,x){for(let S=m;S`Expected corresponding JSX closing tag for <${b}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:b,HTMLEntity:m})=>`Unexpected token \`${b}\`. Did you mean \`${m}\` or \`{'${b}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"},X0=U`jsx`(zve);function Rv(b){return b?b.type==="JSXOpeningFragment"||b.type==="JSXClosingFragment":!1}function O_(b){if(b.type==="JSXIdentifier")return b.name;if(b.type==="JSXNamespacedName")return b.namespace.name+":"+b.name.name;if(b.type==="JSXMemberExpression")return O_(b.object)+"."+O_(b.property);throw new Error("Node had unexpected type: "+b.type)}var Vve=b=>class extends b{jsxReadToken(){let m="",x=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(X0.UnterminatedJsxContent,this.state.startLoc);let S=this.input.charCodeAt(this.state.pos);switch(S){case 60:case 123:if(this.state.pos===this.state.start){S===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(138)):super.getTokenFromCode(S);return}m+=this.input.slice(x,this.state.pos),this.finishToken(137,m);return;case 38:m+=this.input.slice(x,this.state.pos),m+=this.jsxReadEntity(),x=this.state.pos;break;case 62:case 125:this.raise(X0.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:S===125?"}":">"});default:F_(S)?(m+=this.input.slice(x,this.state.pos),m+=this.jsxReadNewLine(!0),x=this.state.pos):++this.state.pos}}}jsxReadNewLine(m){let x=this.input.charCodeAt(this.state.pos),S;return++this.state.pos,x===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,S=m?` `:`\r -`):S=String.fromCharCode(x),++this.state.curLine,this.state.lineStart=this.state.pos,S}jsxReadString(m){let x="",S=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(F.UnterminatedString,this.state.startLoc);let k=this.input.charCodeAt(this.state.pos);if(k===m)break;k===38?(x+=this.input.slice(S,this.state.pos),x+=this.jsxReadEntity(),S=this.state.pos):d_(k)?(x+=this.input.slice(S,this.state.pos),x+=this.jsxReadNewLine(!1),S=this.state.pos):++this.state.pos}x+=this.input.slice(S,this.state.pos++),this.finishToken(130,x)}jsxReadEntity(){let m=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let x=10;this.codePointAtPos(this.state.pos)===120&&(x=16,++this.state.pos);let S=this.readInt(x,void 0,!1,"bail");if(S!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(S)}else{let x=0,S=!1;for(;x++<10&&this.state.pos=2&&b[b.length-1].flags===0&&(b[b.length-2].flags&2048)>0}importsStack=[];createScope(b){return this.importsStack.push(new Set),new _ve(b)}enter(b){b&3072&&this.importsStack.push(new Set),super.enter(b)}exit(){let b=super.exit();return b&3072&&this.importsStack.pop(),b}hasImport(b,m){let x=this.importsStack.length;if(this.importsStack[x-1].has(b))return!0;if(!m&&x>1){for(let S=0;S0){if(x&256){let k=(x&512)>0,O=(S&4)>0;return k!==O}return!0}return x&128&&(S&8)>0?b.names.get(m)&2?!!(x&1):!1:x&2&&(S&1)>0?!0:super.isRedeclaredInScope(b,m,x)}checkLocalExport(b){let{name:m}=b;if(this.hasImport(m))return;let x=this.scopeStack.length;for(let S=x-1;S>=0;S--){let k=this.scopeStack[S].tsNames.get(m);if((k&1)>0||(k&16)>0)return}super.checkLocalExport(b)}},Eve=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(b){return b+this.startIndex}offsetToSourcePos(b){return b-this.startIndex}hasPlugin(b){if(typeof b=="string")return this.plugins.has(b);{let[m,x]=b;if(!this.hasPlugin(m))return!1;let S=this.plugins.get(m);for(let k of Object.keys(x))if(S?.[k]!==x[k])return!1;return!0}}getPluginOption(b,m){return this.plugins.get(b)?.[m]}};function cq(b,m){b.trailingComments===void 0?b.trailingComments=m:b.trailingComments.unshift(...m)}function Dve(b,m){b.leadingComments===void 0?b.leadingComments=m:b.leadingComments.unshift(...m)}function FT(b,m){b.innerComments===void 0?b.innerComments=m:b.innerComments.unshift(...m)}function mA(b,m,x){let S=null,k=m.length;for(;S===null&&k>0;)S=m[--k];S===null||S.start>x.start?FT(b,x.comments):cq(S,x.comments)}var Tve=class extends Eve{addComment(b){this.filename&&(b.loc.filename=this.filename);let{commentsLen:m}=this.state;this.comments.length!==m&&(this.comments.length=m),this.comments.push(b),this.state.commentsLen++}processComment(b){let{commentStack:m}=this.state,x=m.length;if(x===0)return;let S=x-1,k=m[S];k.start===b.end&&(k.leadingNode=b,S--);let O=b.start;for(;S>=0;S--){let Q=m[S],X=Q.end;if(X>O)Q.containingNode=b,this.finalizeComment(Q),m.splice(S,1);else{X===O&&(Q.trailingNode=b);break}}}finalizeComment(b){let{comments:m}=b;if(b.leadingNode!==null||b.trailingNode!==null)b.leadingNode!==null&&cq(b.leadingNode,m),b.trailingNode!==null&&Dve(b.trailingNode,m);else{let x=b.containingNode,S=b.start;if(this.input.charCodeAt(this.offsetToSourcePos(S)-1)===44)switch(x.type){case"ObjectExpression":case"ObjectPattern":mA(x,x.properties,b);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":mA(x,x.arguments,b);break;case"ImportExpression":mA(x,[x.source,x.options??null],b);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":mA(x,x.params,b);break;case"ArrayExpression":case"ArrayPattern":mA(x,x.elements,b);break;case"ExportNamedDeclaration":case"ImportDeclaration":mA(x,x.specifiers,b);break;case"TSEnumBody":mA(x,x.members,b);break;case"TSInterfaceBody":mA(x,x.body,b);break;default:FT(x,m)}else FT(x,m)}}finalizeRemainingComments(){let{commentStack:b}=this.state;for(let m=b.length-1;m>=0;m--)this.finalizeComment(b[m]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(b){let{commentStack:m}=this.state,{length:x}=m;if(x===0)return;let S=m[x-1];S.leadingNode===b&&(S.leadingNode=null)}takeSurroundingComments(b,m,x){let{commentStack:S}=this.state,k=S.length;if(k===0)return;let O=k-1;for(;O>=0;O--){let Q=S[O],X=Q.end;if(Q.start===x)Q.leadingNode=b;else if(X===m)Q.trailingNode=b;else if(X0}set strict(m){m?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:m,sourceType:x,startIndex:S,startLine:k,startColumn:O}){this.strict=m===!1?!1:m===!0?!0:x==="module",this.startIndex=S,this.curLine=k,this.lineStart=-O,this.startLoc=this.endLoc=new g(k,O,S)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];get canStartArrow(){return(this.flags&2)>0}set canStartArrow(m){m?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(m){m?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(m){m?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(m){m?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(m){m?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(m){m?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(m){m?this.flags|=128:this.flags&=-129}get inConditionalConsequent(){return(this.flags&256)>0}set inConditionalConsequent(m){m?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(this.flags&512)>0}set inHackPipelineBody(m){m?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(this.flags&1024)>0}set seenTopicReference(m){m?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[Cr.brace];get canStartJSXElement(){return(this.flags&2048)>0}set canStartJSXElement(m){m?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(this.flags&4096)>0}set containsEsc(m){m?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&8192)>0}set hasTopLevelAwait(m){m?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new g(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let m=new bot;return m.flags=this.flags,m.startIndex=this.startIndex,m.curLine=this.curLine,m.lineStart=this.lineStart,m.startLoc=this.startLoc,m.endLoc=this.endLoc,m.errors=this.errors.slice(),m.noArrowAt=this.noArrowAt.slice(),m.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),m.labels=this.labels.slice(),m.commentsLen=this.commentsLen,m.commentStack=this.commentStack.slice(),m.pos=this.pos,m.type=this.type,m.value=this.value,m.start=this.start,m.end=this.end,m.lastTokEndLoc=this.lastTokEndLoc,m.lastTokStartLoc=this.lastTokStartLoc,m.context=this.context.slice(),m.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,m.strictErrors=this.strictErrors,m.tokensLength=this.tokensLength,m}},Ive=function(b){return b>=48&&b<=57},uq={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},AM={bin:b=>b===48||b===49,oct:b=>b>=48&&b<=55,dec:b=>b>=48&&b<=57,hex:b=>b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102};function dq(b,m,x,S,k,O){let Q=x,X=S,ge=k,he="",lt=null,Ot=x,{length:ji}=m;for(;;){if(x>=ji){O.unterminated(Q,X,ge),he+=m.slice(Ot,x);break}let Yn=m.charCodeAt(x);if(Lve(b,Yn,m,x)){he+=m.slice(Ot,x);break}if(Yn===92){he+=m.slice(Ot,x);let Vc=Nve(m,x,S,k,b==="template",O);Vc.ch===null&&!lt?lt={pos:x,lineStart:S,curLine:k}:he+=Vc.ch,{pos:x,lineStart:S,curLine:k}=Vc,Ot=x}else Yn===8232||Yn===8233?(++x,++k,S=x):Yn===10||Yn===13?b==="template"?(he+=m.slice(Ot,x)+` -`,++x,Yn===13&&m.charCodeAt(x)===10&&++x,++k,Ot=S=x):O.unterminated(Q,X,ge):++x}return{pos:x,str:he,firstInvalidLoc:lt,lineStart:S,curLine:k}}function Lve(b,m,x,S){return b==="template"?m===96||m===36&&x.charCodeAt(S+1)===123:m===(b==="double"?34:39)}function Nve(b,m,x,S,k,O){let Q=!k;m++;let X=he=>({pos:m,ch:he,lineStart:x,curLine:S}),ge=b.charCodeAt(m++);switch(ge){case 110:return X(` -`);case 114:return X("\r");case 120:{let he;return{code:he,pos:m}=o5(b,m,x,S,2,!1,Q,O),X(he===null?null:String.fromCharCode(he))}case 117:{let he;return{code:he,pos:m}=fq(b,m,x,S,Q,O),X(he===null?null:String.fromCodePoint(he))}case 116:return X(" ");case 98:return X("\b");case 118:return X("\v");case 102:return X("\f");case 13:b.charCodeAt(m)===10&&++m;case 10:x=m,++S;case 8232:case 8233:return X("");case 56:case 57:if(k)return X(null);O.strictNumericEscape(m-1,x,S);default:if(ge>=48&&ge<=55){let he=m-1,lt=/^[0-7]+/.exec(b.slice(he,m+2))[0],Ot=parseInt(lt,8);Ot>255&&(lt=lt.slice(0,-1),Ot=parseInt(lt,8)),m+=lt.length-1;let ji=b.charCodeAt(m);if(lt!=="0"||ji===56||ji===57){if(k)return X(null);O.strictNumericEscape(he,x,S)}return X(String.fromCharCode(Ot))}return X(String.fromCharCode(ge))}}function o5(b,m,x,S,k,O,Q,X){let ge=m,he;return{n:he,pos:m}=hq(b,m,x,S,16,k,O,!1,X,!Q),he===null&&(Q?X.invalidEscapeSequence(ge,x,S):m=ge-1),{code:he,pos:m}}function hq(b,m,x,S,k,O,Q,X,ge,he){let lt=m,Ot=k===16?uq.hex:uq.decBinOct,ji=k===16?AM.hex:k===10?AM.dec:k===8?AM.oct:AM.bin,Yn=!1,Vc=0;for(let zd=0,cc=O??1/0;zd=97?Rm=uc-97+10:uc>=65?Rm=uc-65+10:Ive(uc)?Rm=uc-48:Rm=1/0,Rm>=k){if(Rm<=9&&he)return{n:null,pos:m};if(Rm<=9&&ge.invalidDigit(m,x,S,k))Rm=0;else if(Q)Rm=0,Yn=!0;else break}++m,Vc=Vc*k+Rm}return m===lt||O!=null&&m-lt!==O||Yn?{n:null,pos:m}:{n:Vc,pos:m}}function fq(b,m,x,S,k,O){let Q=b.charCodeAt(m),X;if(Q===123){if(++m,{code:X,pos:m}=o5(b,m,x,S,b.indexOf("}",m)-m,!0,k,O),++m,X!==null&&X>1114111)if(k)O.invalidCodePoint(m,x,S);else return{code:null,pos:m}}else({code:X,pos:m}=o5(b,m,x,S,4,!1,k,O));return{code:X,pos:m}}function OT(b,m,x){return new g(x,b-m,b)}var Mve=new Set([103,109,115,105,121,117,100,118]),Rve=class{constructor(b){let m=b.startIndex||0;this.type=b.type,this.value=b.value,this.start=m+b.start,this.end=m+b.end,this.loc=new v(b.startLoc,b.endLoc)}},yM,Fve=class extends Tve{isLookahead;tokens=[];constructor(b,m){super(),this.state=new kve,this.state.init(b),this.input=m,this.length=m.length,this.comments=[],this.isLookahead=!1,(!yM||yM.length<(this.length+1)*2)&&(yM=new Uint32Array((this.length+1)*2)),this.locData=yM}setLoc(b){let m=this.offsetToSourcePos(b.index);this.locData[m*2]=b.line,this.locData[m*2+1]=b.column}getLoc(b){let m=this.offsetToSourcePos(b);return new g(this.locData[m*2],this.locData[m*2+1],b)}pushToken(b){this.tokens.length=this.state.tokensLength,this.tokens.push(b),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new Rve(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(b){return this.match(b)?(this.next(),!0):!1}match(b){return this.state.type===b}createLookaheadState(b){return{pos:b.pos,value:null,type:b.type,start:b.start,end:b.end,context:[this.curContext()],inType:b.inType,startLoc:b.startLoc,lastTokEndLoc:b.lastTokEndLoc,curLine:b.curLine,lineStart:b.lineStart,curPosition:b.curPosition}}lookahead(){let b=this.state;this.state=this.createLookaheadState(b),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let m=this.state;return this.state=b,m}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(b){return n5.lastIndex=b,n5.test(this.input)?n5.lastIndex:b}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(b){return this.input.charCodeAt(this.nextTokenStartSince(b))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(b){return r5.lastIndex=b,r5.test(this.input)?r5.lastIndex:b}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(b){let m=this.input.charCodeAt(b);if((m&64512)===55296&&++bthis.raise(m,x)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(b){let m;this.isLookahead||(m=this.state.curPosition());let x=this.state.pos,S=this.input.indexOf(b,x+2);if(S===-1)throw this.raise(F.UnterminatedComment,this.state.curPosition());for(this.state.pos=S+b.length,aw.lastIndex=x+2;aw.test(this.input)&&aw.lastIndex<=S;)++this.state.curLine,this.state.lineStart=aw.lastIndex;if(this.isLookahead)return;let k={type:"CommentBlock",value:this.input.slice(x+2,S),start:this.sourceToOffsetPos(x),end:this.sourceToOffsetPos(S+b.length),loc:new v(m,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(k),k}skipLineComment(b){let m=this.state.pos,x;this.isLookahead||(x=this.state.curPosition());let S=this.input.charCodeAt(this.state.pos+=b);if(this.state.posb)){let k=this.skipLineComment(3);k!==void 0&&(this.addComment(k),m?.push(k))}else break e}else if(x===60&&!this.inModule&&this.optionFlags&16384){let S=this.state.pos;if(this.input.charCodeAt(S+1)===33&&this.input.charCodeAt(S+2)===45&&this.input.charCodeAt(S+3)===45){let k=this.skipLineComment(4);k!==void 0&&(this.addComment(k),m?.push(k))}else break e}else break e}}if(m?.length>0){let x=this.state.pos,S={start:this.sourceToOffsetPos(b),end:this.sourceToOffsetPos(x),comments:m,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(S)}}finishToken(b,m){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let x=this.state.type;this.state.type=b,this.state.value=m,this.isLookahead||this.updateContext(x)}replaceToken(b){this.state.type=b,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let b=this.state.pos+1,m=this.codePointAtPos(b);if(m>=48&&m<=57)throw this.raise(F.UnexpectedDigitAfterHash,this.state.curPosition());Z(m)?(++this.state.pos,this.finishToken(134,this.readWord1(m))):m===92?(++this.state.pos,this.finishToken(134,this.readWord1())):this.finishOp(23,1)}readToken_dot(){let b=this.input.charCodeAt(this.state.pos+1);if(b>=48&&b<=57){this.readNumber(!0);return}b===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(27,2):this.finishOp(52,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let b=this.input.charCodeAt(this.state.pos+1);if(b!==33)return!1;let m=this.state.pos;for(this.state.pos+=1;!d_(b)&&++this.state.pos=48&&m<=57)?(this.state.pos+=2,this.finishToken(14)):(++this.state.pos,this.finishToken(13))}getTokenFromCode(b){switch(b){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(6);return;case 41:++this.state.pos,this.finishToken(7);return;case 59:++this.state.pos,this.finishToken(9);return;case 44:++this.state.pos,this.finishToken(8);return;case 91:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(1);return;case 123:++this.state.pos,this.finishToken(2);return;case 125:++this.state.pos,this.finishToken(4);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(11,2):(++this.state.pos,this.finishToken(10));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let m=this.input.charCodeAt(this.state.pos+1);if(m===120||m===88){this.readRadixNumber(16);return}if(m===111||m===79){this.readRadixNumber(8);return}if(m===98||m===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(b);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(b);return;case 124:case 38:this.readToken_pipe_amp(b);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(b);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(b);return;case 126:this.finishOp(32,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Z(b)){this.readWord(b);return}}throw this.raise(F.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(b)})}finishOp(b,m){let x=this.input.slice(this.state.pos,this.state.pos+m);this.state.pos+=m,this.finishToken(b,x)}readRegexp(){let b=this.state.startLoc,m=this.state.start+1,x,S,{pos:k}=this.state;for(;;++k){if(k>=this.length)throw this.raise(F.UnterminatedRegExp,A(b,1));let ge=this.input.charCodeAt(k);if(d_(ge))throw this.raise(F.UnterminatedRegExp,A(b,1));if(x)x=!1;else{if(ge===91)S=!0;else if(ge===93&&S)S=!1;else if(ge===47&&!S)break;x=ge===92}}let O=this.input.slice(m,k);++k;let Q="",X=()=>A(b,k+2-m);for(;k=2&&this.input.charCodeAt(m)===48;if(Q){let lt=this.input.slice(m,this.state.pos);if(this.recordStrictModeErrors(F.StrictOctalLiteral,x),!this.state.strict){let Ot=lt.indexOf("_");Ot>0&&this.raise(F.ZeroDigitNumericSeparator,A(x,Ot))}O=Q&&!/[89]/.test(lt)}let X=this.input.charCodeAt(this.state.pos);X===46&&!O&&(++this.state.pos,this.readInt(10),S=!0,X=this.input.charCodeAt(this.state.pos)),(X===69||X===101)&&!O&&(X=this.input.charCodeAt(++this.state.pos),(X===43||X===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(F.InvalidOrMissingExponent,x),S=!0,X=this.input.charCodeAt(this.state.pos));let ge=h(0,this.input.slice(m,this.state.pos),"_","");if(X===110&&((S||Q)&&this.raise(F.InvalidBigIntLiteral,x),++this.state.pos,k=!0),Z(this.codePointAtPos(this.state.pos)))throw this.raise(F.NumberIdentifier,this.state.curPosition());if(k){this.finishToken(132,ge);return}let he=O?parseInt(ge,8):parseFloat(ge);this.finishToken(131,he)}readCodePoint(b){let{code:m,pos:x}=fq(this.input,this.state.pos,this.state.lineStart,this.state.curLine,b,this.errorHandlers_readCodePoint);return this.state.pos=x,m}readString(b){let{str:m,pos:x,curLine:S,lineStart:k}=dq(b===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=x+1,this.state.lineStart=k,this.state.curLine=S,this.finishToken(130,m)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let b=this.input[this.state.pos],{str:m,firstInvalidLoc:x,pos:S,curLine:k,lineStart:O}=dq("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=S+1,this.state.lineStart=O,this.state.curLine=k,x&&(this.state.firstInvalidTemplateEscapePos=new g(x.curLine,x.pos-x.lineStart,this.sourceToOffsetPos(x.pos))),this.input.codePointAt(S)===96?this.finishToken(20,x?null:b+m+"`"):(this.state.pos++,this.finishToken(21,x?null:b+m+"${"))}recordStrictModeErrors(b,m){let x=m.index;this.state.strict&&!this.state.strictErrors.has(x)?this.raise(b,m):this.state.strictErrors.set(x,[b,m])}readWord1(b){this.state.containsEsc=!1;let m="",x=this.state.pos,S=this.state.pos;for(b!==void 0&&(this.state.pos+=b<=65535?1:2);this.state.pos=0;Q--){let X=O[Q];if(X.pos===k)return O[Q]=b(S,k,x);if(X.posthis.hasPlugin(m)))throw this.raise(F.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:b})}errorBuilder(b){return(m,x,S)=>{this.raise(b,OT(m,x,S))}}errorHandlers_readInt={invalidDigit:(b,m,x,S)=>this.optionFlags&4096?(this.raise(F.InvalidDigit,OT(b,m,x),{radix:S}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(F.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(F.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(F.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(F.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(b,m,x)=>{this.recordStrictModeErrors(F.StrictNumericEscape,OT(b,m,x))},unterminated:(b,m,x)=>{throw this.raise(F.UnterminatedString,OT(b-1,m,x))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(F.StrictNumericEscape),unterminated:(b,m,x)=>{throw this.raise(F.UnterminatedTemplate,OT(b,m,x))}}},Ove=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},Pve=class{parser;stack=[];constructor(b){this.parser=b}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ove)}exit(){let b=this.stack.pop(),m=this.current();for(let[x,S]of Array.from(b.undefinedPrivateNames))m?m.undefinedPrivateNames.has(x)||m.undefinedPrivateNames.set(x,S):this.parser.raise(F.InvalidPrivateFieldResolution,S,{identifierName:x})}declarePrivateName(b,m,x){let{privateNames:S,loneAccessors:k,undefinedPrivateNames:O}=this.current(),Q=S.has(b);if(m&3){let X=Q&&k.get(b);if(X){let ge=X&4,he=m&4,lt=X&3,Ot=m&3;Q=lt===Ot||ge!==he,Q||k.delete(b)}else Q||k.set(b,m)}Q&&this.parser.raise(F.PrivateNameRedeclaration,x,{identifierName:b}),S.add(b),O.delete(b)}usePrivateName(b,m){let x;for(x of this.stack)if(x.privateNames.has(b))return;x?x.undefinedPrivateNames.set(b,m):this.parser.raise(F.InvalidPrivateFieldResolution,m,{identifierName:b})}},wM=class{constructor(b=0){this.type=b}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},pq=class extends wM{declarationErrors=new Map;constructor(b){super(b)}recordDeclarationError(b,m){this.declarationErrors.set(m,b)}clearDeclarationError(b){this.declarationErrors.delete(b)}iterateErrors(b){this.declarationErrors.forEach(b)}},Bve=class{parser;stack=[new wM];constructor(b){this.parser=b}enter(b){this.stack.push(b)}exit(){this.stack.pop()}recordParameterInitializerError(b,m){let{stack:x}=this,S=x.length-1,k=x[S];for(;!k.isCertainlyParameterDeclaration();){if(k.canBeArrowParameterDeclaration())k.recordDeclarationError(b,m);else return;k=x[--S]}this.parser.raise(b,m)}recordArrowParameterBindingError(b,m){let{stack:x}=this,S=x[x.length-1],k=m.start;if(S.isCertainlyParameterDeclaration())this.parser.raise(b,k);else if(S.canBeArrowParameterDeclaration())S.recordDeclarationError(b,k);else return}recordAsyncArrowParametersError(b){let{stack:m}=this,x=m.length-1,S=m[x];for(;S.canBeArrowParameterDeclaration();)S.type===2&&S.recordDeclarationError(F.AwaitBindingIdentifier,b),S=m[--x]}validateAsPattern(){let{stack:b}=this,m=b[b.length-1];m.canBeArrowParameterDeclaration()&&m.iterateErrors((x,S)=>{this.parser.raise(x,S);let k=b.length-2,O=b[k];for(;O.canBeArrowParameterDeclaration();)O.clearDeclarationError(S),O=b[--k]})}};function zve(){return new wM(3)}function Vve(){return new pq(1)}function Hve(){return new pq(2)}function s5(){return new wM}var Wve=class{stacks=[];enter(b){this.stacks.push(b)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}get inFSharpPipelineDirectBody(){return(this.currentFlags()&16)===0}};function z0(b,m){return(b?2:0)|(m?1:0)}var mq=class extends Fve{addExtra(b,m,x,S=!0){if(!b)return;let{extra:k}=b;k==null&&(k={},b.extra=k),S?k[m]=x:Object.defineProperty(k,m,{enumerable:S,value:x})}isContextual(b){return this.state.type===b&&!this.state.containsEsc}isUnparsedContextual(b,m){if(this.input.startsWith(m,b)){let x=this.input.charCodeAt(b+m.length);return!(ie(x)||(x&64512)===55296)}return!1}isLookaheadContextual(b){let m=this.nextTokenStart();return this.isUnparsedContextual(m,b)}eatContextual(b){return this.isContextual(b)?(this.next(),!0):!1}expectContextual(b,m){if(!this.eatContextual(b)){if(m!=null)throw this.raise(m,this.state.startLoc);this.unexpected(null,b)}}canInsertSemicolon(){return this.match(135)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return lq(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return lq(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(9)||this.canInsertSemicolon()}semicolon(b=!0){(b?this.isLineTerminator():this.eat(9))||this.raise(F.MissingSemicolon,this.state.lastTokEndLoc)}expect(b,m){this.eat(b)||this.unexpected(m,b)}tryParse(b,m=this.state.clone()){let x={node:null};try{let S=b((k=null)=>{throw x.node=k,x});if(this.state.errors.length>m.errors.length){let k=this.state;return this.state=m,this.state.tokensLength=k.tokensLength,{node:S,error:k.errors[m.errors.length],thrown:!1,aborted:!1,failState:k}}return{node:S,error:null,thrown:!1,aborted:!1,failState:null}}catch(S){let k=this.state;if(this.state=m,S instanceof SyntaxError)return{node:null,error:S,thrown:!0,aborted:!1,failState:k};if(S===x)return{node:x.node,error:null,thrown:!1,aborted:!0,failState:k};throw S}}checkExpressionErrors(b,m){if(!b)return!1;let{shorthandAssignLoc:x,doubleProtoLoc:S,privateKeyLoc:k,optionalParametersLoc:O,voidPatternLoc:Q}=b,X=!!x||!!S||!!O||!!k||!!Q;if(!m)return X;x!=null&&this.raise(F.InvalidCoverInitializedName,x),S!=null&&this.raise(F.DuplicateProto,S),k!=null&&this.raise(F.UnexpectedPrivateField,k),O!=null&&this.unexpected(O),Q!=null&&this.raise(F.InvalidCoverDiscardElement,Q)}isLiteralPropertyName(){return qo(this.state.type)}isPrivateName(b){return b.type==="PrivateName"}getPrivateNameSV(b){return b.id.name}hasPropertyAsPrivateName(b){return(b.type==="MemberExpression"||b.type==="OptionalMemberExpression")&&this.isPrivateName(b.property)}isObjectProperty(b){return b.type==="ObjectProperty"}isObjectMethod(b){return b.type==="ObjectMethod"}initializeScopes(b=this.options.sourceType==="module"){let m=this.state.labels;this.state.labels=[];let x=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let S=this.inModule;this.inModule=b;let k=this.scope,O=this.getScopeHandler();this.scope=new O(this,b);let Q=this.prodParam;this.prodParam=new Wve;let X=this.classScope;this.classScope=new Pve(this);let ge=this.expressionScope;return this.expressionScope=new Bve(this),()=>{this.state.labels=m,this.exportedIdentifiers=x,this.inModule=S,this.scope=k,this.prodParam=Q,this.classScope=X,this.expressionScope=ge}}enterInitialScopes(){let b=0;(this.inModule||this.optionFlags&1)&&(b|=2),this.optionFlags&32&&(b|=1);let m=!this.inModule&&this.options.sourceType==="commonjs";(m||this.optionFlags&2)&&(b|=4),this.prodParam.enter(b);let x=m?514:1;this.optionFlags&4&&(x|=512),this.optionFlags&16&&(x|=48),this.scope.enter(x)}checkDestructuringPrivate(b){let{privateKeyLoc:m}=b;m!==null&&this.expectPlugin("destructuringPrivate",m)}},PT=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},BT=class{constructor(b,m,x,S){this.start=x,this.end=0,S!==void 0&&(this.loc=new v(S)),b&128&&(this.range=[x,0]),S!==void 0&&m&&(this.loc.filename=m)}type=""},gq=BT.prototype,Uve=class extends mq{createPosition(b){return b}startNode(){let{startLoc:b}=this.state;return this.setLoc(b),this.startNodeAt(b)}startNodeAt(b){let{optionFlags:m,filename:x}=this;return m&256?new BT(m,x,b.index,this.createPosition(b)):new BT(m,x,b.index)}startNodeAtNode(b){let{optionFlags:m,filename:x}=this;return m&256?new BT(m,x,b.start,b.loc.start):new BT(m,x,b.start)}finishNode(b,m){return this.finishNodeAt(b,m,this.state.lastTokEndLoc)}finishNodeAt(b,m,x){b.type=m,b.end=x.index;let{optionFlags:S}=this;return S&256&&(b.loc.end=this.createPosition(x)),S&128&&(b.range[1]=x.index),S&8192&&this.processComment(b),b}finishNodeAtNode(b,m,x){b.type=m,b.end=x.end;let{optionFlags:S}=this;return S&256&&(b.loc.end=x.loc.end),S&128&&(b.range[1]=b.end),S&8192&&this.processComment(b),b}resetStartLocation(b,m){b.start=m.index;let{optionFlags:x}=this;x&256&&(b.loc.start=this.createPosition(m)),x&128&&(b.range[0]=m.index)}resetEndLocation(b,m=this.state.lastTokEndLoc){b.end=m.index;let{optionFlags:x}=this;x&256&&(b.loc.end=this.createPosition(m)),x&128&&(b.range[1]=m.index)}resetStartLocationFromNode(b,m){b.start=m.start;let{optionFlags:x}=this;x&256&&(b.loc.start=m.loc.start),x&128&&(b.range[0]=m.start)}resetEndLocationFromNode(b,m){b.end=m.end;let{optionFlags:x}=this;x&256&&(b.loc.end=m.loc.end),x&128&&(b.range[1]=m.end)}castNodeTo(b,m){return b.type=m,b}cloneIdentifier(b){let{type:m,start:x,end:S,loc:k,range:O,name:Q}=b,X=Object.create(gq);return X.type=m,X.start=x,X.end=S,X.loc=k,X.range=O,X.name=Q,b.extra&&(X.extra=b.extra),X}cloneStringLiteral(b){let{type:m,start:x,end:S,loc:k,range:O,extra:Q}=b,X=Object.create(gq);return X.type=m,X.start=x,X.end=S,X.loc=k,X.range=O,X.extra=Q,X.value=b.value,X}},a5=b=>b.type==="ParenthesizedExpression"?a5(b.expression):b,dl=class extends Uve{toAssignable(b,m=!1){let x;switch((b.type==="ParenthesizedExpression"||b.extra?.parenthesized)&&(x=a5(b),m?x.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(F.InvalidParenthesizedAssignment,b):x.type!=="CallExpression"&&x.type!=="MemberExpression"&&!this.isOptionalMemberExpression(x)&&this.raise(F.InvalidParenthesizedAssignment,b):this.raise(F.InvalidParenthesizedAssignment,b)),b.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(b,"ObjectPattern");for(let S=0,k=b.properties.length,O=k-1;SS.type!=="ObjectMethod"&&(k===x||S.type!=="SpreadElement")&&this.isAssignable(S))}case"ObjectProperty":return this.isAssignable(b.value);case"SpreadElement":return this.isAssignable(b.argument);case"ArrayExpression":return b.elements.every(x=>x===null||this.isAssignable(x));case"AssignmentExpression":return b.operator==="=";case"ParenthesizedExpression":return this.isAssignable(b.expression);case"MemberExpression":case"OptionalMemberExpression":return!m;default:return!1}}toReferencedList(b,m){return b}parseSpread(b){let m=this.startNode();return this.next(),m.argument=this.parseMaybeAssignAllowIn(b,void 0),this.finishNode(m,"SpreadElement")}parseRestBinding(){let b=this.startNode();this.next();let m=this.parseBindingAtom();return m.type==="VoidPattern"&&this.raise(F.UnexpectedVoidPattern,m),b.argument=m,this.finishNode(b,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let b=this.startNode();return this.next(),b.elements=this.parseBindingList(1,93,1),this.finishNode(b,"ArrayPattern")}case 2:return this.parseObjectLike(4,!0);case 84:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(b,m,x){let S=x&1,k=[],O=!0;for(;!this.eat(b);)if(O?O=!1:this.expect(8),S&&this.match(8))k.push(null);else{if(this.eat(b))break;if(this.match(17)){let Q=this.parseRestBinding();if(x&2&&(Q=this.parseFunctionParamType(Q)),k.push(Q),!this.checkCommaAfterRest(m)){this.expect(b);break}}else{let Q=[];if(x&2)for(this.match(22)&&this.hasPlugin("decorators")&&this.raise(F.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)Q.push(this.parseDecorator());k.push(this.parseBindingElement(x,Q))}}return k}parseBindingRestProperty(b){return this.next(),this.hasPlugin("discardBinding")&&this.match(84)?(b.argument=this.parseVoidPattern(null),this.raise(F.UnexpectedVoidPattern,b.argument)):b.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(b,"RestElement")}parseBindingProperty(){let{type:b,startLoc:m}=this.state;if(b===17)return this.parseBindingRestProperty(this.startNode());let x=this.startNode();return b===134?(this.expectPlugin("destructuringPrivate",m),this.classScope.usePrivateName(this.state.value,m),x.key=this.parsePrivateName()):this.parsePropertyName(x),x.method=!1,this.parseObjPropValue(x,m,!1,!1,!0,!1)}parseBindingElement(b,m){let{startLoc:x}=this.state,S=this.parseMaybeDefault();return b&2&&this.parseFunctionParamType(S),m.length&&(S.decorators=m,this.resetStartLocationFromNode(S,m[0])),this.parseMaybeDefault(x,S)}parseFunctionParamType(b){return b}parseMaybeDefault(b,m){if(b??(b=this.state.startLoc),m=m??this.parseBindingAtom(),!this.eat(25))return m;let x=this.startNodeAt(b);return m.type==="VoidPattern"&&this.raise(F.VoidPatternInitializer,m),x.left=m,x.right=this.parseMaybeAssignAllowIn(),this.finishNode(x,"AssignmentPattern")}isValidLVal(b,m,x,S){switch(b){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!m&&!this.state.strict&&this.optionFlags&16384)return!0}return!1}isOptionalMemberExpression(b){return b.type==="OptionalMemberExpression"}checkLVal(b,m,x=64,S=!1,k=!1,O=!1,Q=!1){let X=b.type;if(this.isObjectMethod(b))return;let ge=this.isOptionalMemberExpression(b);if(ge||X==="MemberExpression"){ge&&(this.expectPlugin("optionalChainingAssign",b.start),m.type!=="AssignmentExpression"&&this.raise(F.InvalidLhsOptionalChaining,b,{ancestor:m})),x!==64&&this.raise(F.InvalidPropertyBindingPattern,b);return}if(X==="Identifier"){this.checkIdentifier(b,x,k);let{name:zd}=b;S&&(S.has(zd)?this.raise(F.ParamDupe,b):S.add(zd));return}else X==="VoidPattern"&&m.type==="CatchClause"&&this.raise(F.VoidPatternCatchClauseParam,b);let he=a5(b);Q||(Q=he.type==="CallExpression"&&(he.callee.type==="Import"||he.callee.type==="Super"));let lt=this.isValidLVal(X,Q,!(O||b.extra?.parenthesized)&&m.type==="AssignmentExpression",x);if(lt===!0)return;if(lt===!1){let zd=x===64?F.InvalidLhs:F.InvalidLhsBinding;this.raise(zd,b,{ancestor:m});return}let Ot,ji;typeof lt=="string"?(Ot=lt,ji=X==="ParenthesizedExpression"):[Ot,ji]=lt;let Yn=X==="ArrayPattern"||X==="ObjectPattern"?{type:X}:m,Vc=b[Ot];if(Array.isArray(Vc))for(let zd of Vc)zd&&this.checkLVal(zd,Yn,x,S,k,ji,!0);else Vc&&this.checkLVal(Vc,Yn,x,S,k,ji,Q)}checkIdentifier(b,m,x=!1){this.state.strict&&(x?pn(b.name,this.inModule):_i(b.name))&&(m===64?this.raise(F.StrictEvalArguments,b,{referenceName:b.name}):this.raise(F.StrictEvalArgumentsBinding,b,{bindingName:b.name})),m&8192&&b.name==="let"&&this.raise(F.LetInLexicalBinding,b),m&64||this.declareNameFromIdentifier(b,m)}declareNameFromIdentifier(b,m){this.scope.declareName(b.name,m,b.start)}checkToRestConversion(b,m){switch(b.type){case"ParenthesizedExpression":this.checkToRestConversion(b.expression,m);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(m)break;default:this.raise(F.InvalidRestAssignmentPattern,b)}}checkCommaAfterRest(b){return this.match(8)?(this.raise(this.lookaheadCharCode()===b?F.RestTrailingComma:F.ElementAfterRest,this.state.startLoc),!0):!1}},jve=class extends dl{checkProto(b,m,x){if(b.type==="SpreadElement"||this.isObjectMethod(b)||b.computed||b.shorthand)return m;let S=b.key;return(S.type==="Identifier"?S.name:S.value)==="__proto__"?(m&&(x?x.doubleProtoLoc===null&&(x.doubleProtoLoc=this.getLoc(S.start)):this.raise(F.DuplicateProto,S)),!0):m}shouldExitDescending(b){return b.type==="ArrowFunctionExpression"&&!b.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(F.ParseExpressionEmptyInput,this.state.startLoc);let b=this.parseExpression();if(!this.match(135))throw this.raise(F.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),b.comments=this.comments,b.errors=this.state.errors,this.optionFlags&512&&(b.tokens=Qve(this.tokens)),b}parseExpression(b,m){return b?this.disallowInAnd(()=>this.parseExpressionBase(m)):this.allowInAnd(()=>this.parseExpressionBase(m))}parseExpressionBase(b){let m=this.state.startLoc,x=this.parseMaybeAssign(b);if(this.match(8)){let S=this.startNodeAt(m);for(S.expressions=[x];this.eat(8);)S.expressions.push(this.parseMaybeAssign(b));return this.toReferencedList(S.expressions),this.finishNode(S,"SequenceExpression")}return x}parseMaybeAssignDisallowIn(b,m){return this.disallowInAnd(()=>this.parseMaybeAssign(b,m))}parseMaybeAssignAllowIn(b,m){return this.allowInAnd(()=>this.parseMaybeAssign(b,m))}setOptionalParametersError(b){b.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(b,m){let x=this.state.startLoc,S=this.isContextual(104);if(S&&this.prodParam.hasYield){this.next();let Q=this.parseYield(x);return m&&(Q=m.call(this,Q,x)),Q}let k;b?k=!1:(b=new PT,k=!0),this.state.canStartArrow=!0;let O=this.parseMaybeConditional(b);if(m&&(O=m.call(this,O,x)),Ca(this.state.type)){let Q=this.startNodeAt(x),X=this.state.value;if(Q.operator=X,this.match(25)){this.toAssignable(O,!0),Q.left=O;let ge=x.index;b.doubleProtoLoc!=null&&b.doubleProtoLoc.index>=ge&&(b.doubleProtoLoc=null),b.shorthandAssignLoc!=null&&b.shorthandAssignLoc.index>=ge&&(b.shorthandAssignLoc=null),b.privateKeyLoc!=null&&b.privateKeyLoc.index>=ge&&(this.checkDestructuringPrivate(b),b.privateKeyLoc=null),b.voidPatternLoc!=null&&b.voidPatternLoc.index>=ge&&(b.voidPatternLoc=null)}else Q.left=O;return this.next(),Q.right=this.parseMaybeAssign(),this.checkLVal(O,this.finishNode(Q,"AssignmentExpression"),void 0,void 0,void 0,void 0,X==="||="||X==="&&="||X==="??="),Q}else k&&this.checkExpressionErrors(b,!0);if(S){let{type:Q}=this.state;if((this.hasPlugin("v8intrinsic")?Vr(Q):Vr(Q)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(F.YieldNotInGeneratorFunction,x),this.parseYield(x)}return O}parseMaybeConditional(b){let m=this.state.startLoc,x=this.parseExprOps(b);return this.shouldExitDescending(x)?x:this.parseConditional(x,m,b)}parseConditional(b,m,x){if(this.eat(13)){let S=this.startNodeAt(m);return S.test=b,S.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),S.alternate=this.parseMaybeAssign(),this.finishNode(S,"ConditionalExpression")}return b}parseMaybeUnaryOrPrivate(b){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(b)}parseExprOps(b){let m=this.state.startLoc,x=this.parseMaybeUnaryOrPrivate(b);return this.shouldExitDescending(x)?x:(this.state.canStartArrow=!1,this.parseExprOp(x,m,-1))}parseExprOp(b,m,x){if(this.isPrivateName(b)){let k=this.getPrivateNameSV(b);(x>=No(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(F.PrivateInExpectedIn,m,{identifierName:k}),this.classScope.usePrivateName(k,m)}let S=this.state.type;if(Wa(S)&&(this.prodParam.hasIn||!this.match(54))){let k=No(S);if(k>x){if(S===35&&(this.expectPlugin("pipelineOperator"),this.prodParam.inFSharpPipelineDirectBody))return b;let O=this.startNodeAt(m);O.left=b,O.operator=this.state.value;let Q=S===37||S===38,X=S===36;X&&(k=No(38)),this.next(),O.right=this.parseExprOpRightExpr(S,k);let ge=this.finishNode(O,Q||X?"LogicalExpression":"BinaryExpression"),he=this.state.type;if(X&&(he===37||he===38)||Q&&he===36)throw this.raise(F.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(ge,m,x)}}return b}parseExprOpRightExpr(b,m){switch(b){case 35:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.parseFSharpPipelineBody(m)}default:return this.parseExprOpBaseRightExpr(b,m)}}parseExprOpBaseRightExpr(b,m){let x=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),x,ta(b)?m-1:m)}parseHackPipeBody(){let{startLoc:b}=this.state,m=this.parseMaybeAssign();return M.has(m.type)&&!m.extra?.parenthesized&&this.raise(F.PipeUnparenthesizedBody,b,{type:m.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(F.PipeTopicUnused,b),m}checkExponentialAfterUnary(b){this.match(53)&&this.raise(F.UnexpectedTokenUnaryExponentiation,b.argument)}parseMaybeUnary(b,m){let x=this.state.startLoc,S=this.isContextual(92);if(S&&this.recordAwaitIfAllowed()){this.next();let X=this.parseAwait(x);return m||this.checkExponentialAfterUnary(X),X}let k=this.match(30),O=this.startNode();if(cl(this.state.type)){O.operator=this.state.value,O.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin("throwExpressions");let X=this.match(85);if(this.next(),O.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(b,!0),this.state.strict&&X){let ge=O.argument;ge.type==="Identifier"?this.raise(F.StrictDelete,O):this.hasPropertyAsPrivateName(ge)&&this.raise(F.DeletePrivateField,O)}if(!k)return m||this.checkExponentialAfterUnary(O),this.finishNode(O,"UnaryExpression")}let Q=this.parseUpdate(O,k,b);if(S){let{type:X}=this.state;if((this.hasPlugin("v8intrinsic")?Vr(X):Vr(X)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(F.AwaitNotInAsyncContext,x),this.parseAwait(x)}return Q}parseUpdate(b,m,x){if(m){let O=this.finishNode(b,"UpdateExpression");return this.checkLVal(O.argument,O),O}let S=this.state.startLoc,k=this.parseExprSubscripts(x);if(this.checkExpressionErrors(x,!1))return k;for(;Hr(this.state.type)&&!this.canInsertSemicolon();){let O=this.startNodeAt(S);O.operator=this.state.value,O.prefix=!1,O.argument=k,this.next(),this.checkLVal(k,k=this.finishNode(O,"UpdateExpression"))}return k}parseExprSubscripts(b){let m=this.state.startLoc;this.setLoc(m);let x=this.parseExprAtom(b);return this.shouldExitDescending(x)?x:this.parseSubscripts(x,m)}parseSubscripts(b,m,x){let S={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(b),stop:!1};do b=this.parseSubscript(b,m,x,S),S.maybeAsyncArrow=!1;while(!S.stop);return b}parseSubscript(b,m,x,S){let{type:k}=this.state;if(!x&&k===11)return this.parseBind(b,m,S);if(Ki(k))return this.parseTaggedTemplateExpression(b,m,S);let O=!1;if(k===14){if(x&&(this.raise(F.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(b,S);S.optionalChainMember=O=!0,this.next()}if(!x&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(b,m,S,O);{let Q=this.eat(0);return Q||O||this.eat(12)?this.parseMember(b,m,S,Q,O):this.stopParseSubscript(b,S)}}stopParseSubscript(b,m){return m.stop=!0,b}parseMember(b,m,x,S,k){let O=this.startNodeAt(m);return O.object=b,O.computed=S,S?(O.property=this.parseExpression(),this.expect(1)):this.match(134)?(b.type==="Super"&&this.raise(F.SuperPrivateField,m),this.classScope.usePrivateName(this.state.value,this.state.startLoc),O.property=this.parsePrivateName()):O.property=this.parseIdentifier(!0),x.optionalChainMember?(O.optional=k,this.finishNode(O,"OptionalMemberExpression")):this.finishNode(O,"MemberExpression")}parseBind(b,m,x){let S=this.startNodeAt(m);S.object=b,this.next();let k=this.match(79),O=this.parseNoCallExpr();if(O.type==="Super"||k&&O.type==="ImportExpression"||O.type==="Import")throw this.raise(F.UnsupportedBindRHS,O);return S.callee=O,x.stop=!0,this.parseSubscripts(this.finishNode(S,"BindExpression"),m,!1)}parseCoverCallAndAsyncArrowHead(b,m,x,S){let k=null;this.next();let O=this.startNodeAt(m);O.callee=b;let{maybeAsyncArrow:Q,optionalChainMember:X}=x;Q&&(this.expressionScope.enter(Hve()),k=new PT),X&&(O.optional=S),S?O.arguments=this.parseCallExpressionArguments():O.arguments=this.parseCallExpressionArguments(b.type!=="Super",O,k);let ge=this.finishCallExpression(O,X);return Q&&this.shouldParseAsyncArrow()&&!S?(x.stop=!0,this.checkDestructuringPrivate(k),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),ge=this.parseAsyncArrowFromCallExpression(this.startNodeAt(m),ge)):(Q&&(this.checkExpressionErrors(k,!0),this.expressionScope.exit()),this.toReferencedList(O.arguments)),ge}parseTaggedTemplateExpression(b,m,x){let S=this.startNodeAt(m);return S.tag=b,S.quasi=this.parseTemplate(!0),x.optionalChainMember&&this.raise(F.OptionalChainingNoTemplate,m),this.finishNode(S,"TaggedTemplateExpression")}atPossibleAsyncArrow(b){return b.type==="Identifier"&&b.name==="async"&&this.state.lastTokEndLoc.index===b.end&&!this.canInsertSemicolon()&&b.end-b.start===5&&this.state.canStartArrow}finishCallExpression(b,m){if(b.callee.type==="Import")if(b.arguments.length===0||b.arguments.length>2)this.raise(F.ImportCallArity,b);else for(let x of b.arguments)x.type==="SpreadElement"&&this.raise(F.ImportCallSpreadArgument,x);return this.finishNode(b,m?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(b,m,x){let S=[],k=!0;for(;!this.eat(7);){if(k)k=!1;else if(this.expect(8),this.match(7)){m&&this.addTrailingCommaExtraToNode(m),this.next();break}S.push(this.parseExprListItem(7,!1,x,b))}return S}shouldParseAsyncArrow(){return this.match(15)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(b,m){return this.resetPreviousNodeTrailingComments(m),this.expect(15),this.parseArrowExpression(b,m.arguments,!0,m.extra?.trailingCommaLoc),m.innerComments&&FT(b,m.innerComments),m.callee.trailingComments&&FT(b,m.callee.trailingComments),b}parseNoCallExpr(){let b=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),b,!0)}parseExprAtom(b){let m,x=null,{type:S}=this.state;switch(S){case 75:return this.parseSuper();case 79:return m=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(m):this.match(6)?this.optionFlags&1024?this.parseImportCall(m):this.finishNode(m,"Import"):(this.raise(F.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(m,"Import"));case 74:return m=this.startNode(),this.next(),this.finishNode(m,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 131:return this.parseNumericLiteral(this.state.value);case 132:return this.parseBigIntLiteral(this.state.value);case 130:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,b);case 2:return this.parseObjectLike(4,!1,b);case 64:return this.parseFunctionOrFunctionSent();case 22:x=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(x,this.startNode()),!1);case 73:return this.parseNewOrNewTarget();case 21:case 20:return this.parseTemplate(!1);case 11:{m=this.startNode(),this.next(),m.object=null;let k=m.callee=this.parseNoCallExpr();if(k.type==="MemberExpression")return this.finishNode(m,"BindExpression");throw this.raise(F.UnsupportedBind,k)}case 134:return this.raise(F.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 29:return this.parseTopicReferenceThenEqualsSign(50,"%");case 28:return this.parseTopicReferenceThenEqualsSign(40,"^");case 33:case 34:return this.parseTopicReference("hack");case 40:case 50:case 23:{let k=this.getPluginOption("pipelineOperator","proposal");if(k)return this.parseTopicReference(k);throw this.unexpected()}case 43:{let k=this.input.codePointAt(this.nextTokenStart());throw Z(k)||k===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(Ut(S)){if(this.isContextual(123)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let{canStartArrow:k,containsEsc:O}=this.state,Q=this.parseIdentifier();if(!O&&Q.name==="async"&&!this.canInsertSemicolon()){let{type:X}=this.state;if(X===64)return this.resetPreviousNodeTrailingComments(Q),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(Q));if(Ut(X))return k&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(Q)):Q;if(X===86)return this.resetPreviousNodeTrailingComments(Q),this.parseDo(this.startNodeAtNode(Q),!0)}return k&&this.match(15)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(Q),[Q],!1)):Q}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(b,m){let x=this.getPluginOption("pipelineOperator","proposal");if(x)return this.state.type=b,this.state.value=m,this.state.pos--,this.state.end--,this.state.endLoc=A(this.state.endLoc,-1),this.parseTopicReference(x);throw this.unexpected()}parseTopicReference(b){let m=this.startNode(),x=this.state.startLoc,S=this.state.type;return this.next(),this.finishTopicReference(m,x,b,S)}finishTopicReference(b,m,x,S){if(this.testTopicReferenceConfiguration(x,m,S))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(F.PipeTopicUnbound,m),this.registerTopicReference(),this.finishNode(b,"TopicReference");throw this.raise(F.PipeTopicUnconfiguredToken,m,{token:cs(S)})}testTopicReferenceConfiguration(b,m,x){if(b==="hack")return this.hasPlugin(["pipelineOperator",{topicToken:cs(x)}]);throw this.raise(F.PipeTopicRequiresHackPipes,m)}parseAsyncArrowUnaryFunction(b){this.prodParam.enter(z0(!0,this.prodParam.hasYield));let m=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(F.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(15),this.parseArrowExpression(b,m,!0)}parseDo(b,m){this.expectPlugin("doExpressions"),m&&this.expectPlugin("asyncDoExpressions"),b.async=m,this.next();let x=this.state.labels;return this.state.labels=[],m?(this.prodParam.enter(2),b.body=this.parseBlock(),this.prodParam.exit()):b.body=this.parseBlock(),this.state.labels=x,this.finishNode(b,"DoExpression")}parseSuper(){let b=this.startNode();return this.next(),this.match(6)&&!this.scope.allowDirectSuper?this.raise(F.SuperNotAllowed,b):this.scope.allowSuper||this.raise(F.UnexpectedSuper,b),!this.match(6)&&!this.match(0)&&!this.match(12)&&this.raise(F.UnsupportedSuper,b),this.finishNode(b,"Super")}parsePrivateName(){let b=this.startNode(),m=this.startNodeAt(A(this.state.startLoc,1)),x=this.state.value;return this.next(),b.id=this.createIdentifier(m,x),this.finishNode(b,"PrivateName")}parseFunctionOrFunctionSent(){let b=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(12)){let m=this.createIdentifier(this.startNodeAtNode(b),"function");return this.next(),this.match(99)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(b,m,"sent")}return this.parseFunction(b)}parseMetaProperty(b,m,x){b.meta=m;let S=this.state.containsEsc;return b.property=this.parseIdentifier(!0),(b.property.name!==x||S)&&this.raise(F.UnsupportedMetaProperty,b.property,{target:m.name,onlyValidPropertyName:x}),this.finishNode(b,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(b){if(this.next(),this.isContextual(101)||this.isContextual(93)){let m=this.isContextual(101);return this.expectPlugin(m?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),b.phase=m?"source":"defer",this.parseImportCall(b)}else{let m=this.createIdentifierAt(this.startNodeAtNode(b),"import",this.state.lastTokStartLoc);return this.isContextual(97)&&(this.inModule||this.raise(F.ImportMetaOutsideModule,m),this.sawUnambiguousESM=!0),this.parseMetaProperty(b,m,"meta")}}parseLiteralAtNode(b,m,x){return this.addExtra(x,"rawValue",b),this.addExtra(x,"raw",this.input.slice(this.offsetToSourcePos(x.start),this.state.end)),x.value=b,this.next(),this.finishNode(x,m)}parseLiteral(b,m){let x=this.startNode();return this.parseLiteralAtNode(b,m,x)}parseStringLiteral(b){return this.parseLiteral(b,"StringLiteral")}parseNumericLiteral(b){return this.parseLiteral(b,"NumericLiteral")}parseBigIntLiteral(b){let m;try{m=BigInt(b)}catch{m=null}return this.parseLiteral(m,"BigIntLiteral")}parseRegExpLiteral(b){let m=this.startNode();return this.addExtra(m,"raw",this.input.slice(this.offsetToSourcePos(m.start),this.state.end)),m.pattern=b.pattern,m.flags=b.flags,this.next(),this.finishNode(m,"RegExpLiteral")}parseBooleanLiteral(b){let m=this.startNode();return m.value=b,this.next(),this.finishNode(m,"BooleanLiteral")}parseNullLiteral(){let b=this.startNode();return this.next(),this.finishNode(b,"NullLiteral")}parseParenAndDistinguishExpression(b){let m=this.state.startLoc,x;this.next(),this.expressionScope.enter(Vve());let S=this.state.startLoc,k=[],O=new PT,Q=!0,X,ge;for(;!this.match(7);){if(Q)Q=!1;else if(this.expect(8,O.optionalParametersLoc===null?null:O.optionalParametersLoc),this.match(7)){ge=this.state.startLoc;break}if(this.match(17)){let Ot=this.state.startLoc;if(X=this.state.startLoc,k.push(this.parseParenItem(this.parseRestBinding(),Ot)),!this.checkCommaAfterRest(41))break}else k.push(this.parseMaybeAssignAllowInOrVoidPattern(7,O,this.parseParenItem))}let he=this.state.lastTokEndLoc;this.expect(7);let lt=this.startNodeAt(m);return b&&this.shouldParseArrow(k)&&(lt=this.parseArrow(lt))?(this.checkDestructuringPrivate(O),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(lt,k,!1),lt):(this.expressionScope.exit(),k.length||this.unexpected(this.state.lastTokStartLoc),ge&&this.unexpected(ge),X&&this.unexpected(X),this.checkExpressionErrors(O,!0),this.toReferencedList(k,!0),k.length>1?(x=this.startNodeAt(S),x.expressions=k,this.finishNode(x,"SequenceExpression"),this.resetEndLocation(x,he)):x=k[0],this.wrapParenthesis(m,x))}wrapParenthesis(b,m){if(!(this.optionFlags&2048))return this.addExtra(m,"parenthesized",!0),this.addExtra(m,"parenStart",b.index),this.takeSurroundingComments(m,b.index,this.state.lastTokEndLoc.index),m;let x=this.startNodeAt(b);return x.expression=m,this.finishNode(x,"ParenthesizedExpression")}shouldParseArrow(b){return!this.canInsertSemicolon()}parseArrow(b){if(this.eat(15))return b}parseParenItem(b,m){return b}parseNewOrNewTarget(){let b=this.startNode();if(this.next(),this.match(12)){let m=this.createIdentifier(this.startNodeAtNode(b),"new");this.next();let x=this.parseMetaProperty(b,m,"target");return this.scope.allowNewTarget||this.raise(F.UnexpectedNewTarget,x),x}return this.parseNew(b)}parseNew(b){if(this.parseNewCallee(b),this.eat(6)){let m=this.parseExprList(7);this.toReferencedList(m),b.arguments=m}else b.arguments=[];return this.finishNode(b,"NewExpression")}parseNewCallee(b){let m=this.match(79),x=this.parseNoCallExpr();b.callee=x,m&&x.type==="ImportExpression"&&this.raise(F.ImportCallNotNewExpression,x,x),x.type==="Import"&&this.raise(F.ImportCallNotNewExpression,x),x.type==="Super"&&this.raise(F.SuperCallNotNewExpression,x)}parseTemplateElement(b){let{start:m,startLoc:x,end:S,value:k}=this.state,O=m+1,Q=this.startNodeAt(A(x,1));k===null&&(b||this.raise(F.InvalidEscapeSequenceTemplate,A(this.state.firstInvalidTemplateEscapePos,1)));let X=this.match(20),ge=X?-1:-2,he=S+ge;Q.value={raw:this.input.slice(O,he).replace(/\r\n?/g,` -`),cooked:k===null?null:k.slice(1,ge)},Q.tail=X,this.next();let lt=this.finishNode(Q,"TemplateElement");return this.resetEndLocation(lt,A(this.state.lastTokEndLoc,ge)),lt}parseTemplate(b){let m=this.startNode(),x=this.parseTemplateElement(b),S=[x],k=[];for(;!x.tail;)k.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),S.push(x=this.parseTemplateElement(b));return m.expressions=k,m.quasis=S,this.finishNode(m,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(b,m,x){let S=!1,k=!0,O=this.startNode();for(O.properties=[],this.next();!this.match(b);){if(k)k=!1;else if(this.expect(8),this.match(b)){this.addTrailingCommaExtraToNode(O);break}let X;m?X=this.parseBindingProperty():(X=this.parsePropertyDefinition(x),S=this.checkProto(X,S,x)),O.properties.push(X)}this.next();let Q=m?"ObjectPattern":"ObjectExpression";return this.finishNode(O,Q)}addTrailingCommaExtraToNode(b){this.addExtra(b,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(b,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(b){return!b.computed&&b.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(b){let m=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(F.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)m.push(this.parseDecorator());let x=this.startNode(),S=!1,k=!1,O;if(this.match(17))return m.length&&this.unexpected(),this.parseSpread();m.length&&(x.decorators=m),x.method=!1,b&&(O=this.state.startLoc);let Q=this.eat(51);this.parsePropertyNamePrefixOperator(x);let X=this.state.containsEsc;if(this.parsePropertyName(x,b),!Q&&!X&&this.maybeAsyncOrAccessorProp(x)){let{key:ge}=x,he=ge.name;he==="async"&&!this.hasPrecedingLineBreak()&&(S=!0,this.resetPreviousNodeTrailingComments(ge),Q=this.eat(51),this.parsePropertyName(x)),(he==="get"||he==="set")&&(k=!0,this.resetPreviousNodeTrailingComments(ge),x.kind=he,this.match(51)&&(Q=!0,this.raise(F.AccessorIsGenerator,this.state.curPosition(),{kind:he}),this.next()),this.parsePropertyName(x))}return this.parseObjPropValue(x,O,Q,S,!1,k,b)}getGetterSetterExpectedParamCount(b){return b.kind==="get"?0:1}getObjectOrClassMethodParams(b){return b.params}checkGetterSetterParams(b){let m=this.getGetterSetterExpectedParamCount(b),x=this.getObjectOrClassMethodParams(b);x.length!==m&&this.raise(b.kind==="get"?F.BadGetterArity:F.BadSetterArity,b),b.kind==="set"&&x[x.length-1]?.type==="RestElement"&&this.raise(F.BadSetterRestParameter,b)}parseObjectMethod(b,m,x,S,k){if(k){let O=this.parseMethod(b,m,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(O),O}if(x||m||this.match(6))return S&&this.unexpected(),b.kind="method",b.method=!0,this.parseMethod(b,m,x,!1,!1,"ObjectMethod")}parseObjectProperty(b,m,x,S){if(b.shorthand=!1,this.eat(10))return b.value=x?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,S),this.finishObjectProperty(b);if(!b.computed&&b.key.type==="Identifier"){if(this.checkReservedWord(b.key.name,b.key.start,!0,!1),x)b.value=this.parseMaybeDefault(m,this.cloneIdentifier(b.key));else if(this.match(25)){let k=this.state.startLoc;S!=null?S.shorthandAssignLoc===null&&(S.shorthandAssignLoc=k):this.raise(F.InvalidCoverInitializedName,k),b.value=this.parseMaybeDefault(m,this.cloneIdentifier(b.key))}else b.value=this.cloneIdentifier(b.key);return b.shorthand=!0,this.finishObjectProperty(b)}}finishObjectProperty(b){return this.finishNode(b,"ObjectProperty")}parseObjPropValue(b,m,x,S,k,O,Q){let X=this.parseObjectMethod(b,x,S,k,O)||this.parseObjectProperty(b,m,k,Q);return X||this.unexpected(),X}parsePropertyName(b,m){if(this.eat(0))b.computed=!0,b.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:x,value:S}=this.state,k;if(lr(x))k=this.parseIdentifier(!0);else switch(x){case 131:k=this.parseNumericLiteral(S);break;case 130:k=this.parseStringLiteral(S);break;case 132:k=this.parseBigIntLiteral(S);break;case 134:{let O=this.state.startLoc;m!=null?m.privateKeyLoc===null&&(m.privateKeyLoc=O):this.raise(F.UnexpectedPrivateField,O),k=this.parsePrivateName();break}default:this.unexpected()}b.key=k,x!==134&&(b.computed=!1)}}initFunction(b,m){b.id=null,b.generator=!1,b.async=m}parseMethod(b,m,x,S,k,O,Q=!1){this.initFunction(b,x),b.generator=m,this.scope.enter(530|(Q?576:0)|(k?32:0)),this.prodParam.enter(z0(x,b.generator)),this.parseFunctionParams(b,S);let X=this.parseFunctionBodyAndFinish(b,O,!0);return this.prodParam.exit(),this.scope.exit(),X}parseArrayLike(b,m){let x=this.startNode();return this.next(),x.elements=this.parseExprList(b,!0,m,x),this.finishNode(x,"ArrayExpression")}parseArrowExpression(b,m,x,S){this.scope.enter(518);let k=z0(x,!1);return this.match(2)||(k|=this.prodParam.currentFlags()&24),this.prodParam.enter(k),this.initFunction(b,x),m&&this.setArrowFunctionParameters(b,m,S),this.parseFunctionBody(b,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(b,"ArrowFunctionExpression")}setArrowFunctionParameters(b,m,x){this.toAssignableList(m,x,!1),b.params=m}parseFunctionBodyAndFinish(b,m,x=!1){return this.parseFunctionBody(b,!1,x),this.finishNode(b,m)}parseFunctionBody(b,m,x=!1){let S=m&&!this.match(2);if(this.expressionScope.enter(s5()),S)b.body=this.parseMaybeAssign(),this.checkParams(b,!1,m,!1);else{let k=this.state.strict,O=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),b.body=this.parseBlock(!0,!1,Q=>{let X=!this.isSimpleParamList(b.params);Q&&X&&this.raise(F.IllegalLanguageModeDirective,(b.kind==="method"||b.kind==="constructor")&&b.key?this.optionFlags&256?b.key.loc.end:b.key:b);let ge=!k&&this.state.strict;this.checkParams(b,!this.state.strict&&!m&&!x&&!X,m,ge),this.state.strict&&b.id&&this.checkIdentifier(b.id,65,ge)}),this.prodParam.exit(),this.state.labels=O}this.expressionScope.exit()}isSimpleParameter(b){return b.type==="Identifier"}isSimpleParamList(b){for(let m=0,x=b.length;m10||!Ua(b))){if(x&&Ln(b)){this.raise(F.UnexpectedKeyword,m,{keyword:b});return}if((this.state.strict?S?pn:Zt:Mt)(b,this.inModule)){this.raise(F.UnexpectedReservedWord,m,{reservedWord:b});return}else if(b==="yield"){if(this.prodParam.hasYield){this.raise(F.YieldBindingIdentifier,m);return}}else if(b==="await"){if(this.prodParam.hasAwait){this.raise(F.AwaitBindingIdentifier,m);return}if(this.scope.inStaticBlock){this.raise(F.AwaitBindingIdentifierInStaticBlock,m);return}this.expressionScope.recordAsyncArrowParametersError(m)}else if(b==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(F.ArgumentsInClass,m);return}}}recordAwaitIfAllowed(){let b=this.prodParam.hasAwait;return b&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),b}parseAwait(b,m){let x=b.index;this.setLoc(b);let S=this.startNodeAt(b);return this.expressionScope.recordParameterInitializerError(F.AwaitExpressionFormalParameter,x),this.eat(51)&&this.raise(F.ObsoleteAwaitStar,b),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),m||(S.argument=this.parseMaybeUnary(null,!0)),this.finishNode(S,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:b}=this.state;return b===49||b===6||b===0||Ki(b)||b===98&&!this.state.containsEsc||b===133||b===52||this.hasPlugin("v8intrinsic")&&b===50}parseYield(b){this.setLoc(b);let m=this.startNodeAt(b);this.expressionScope.recordParameterInitializerError(F.YieldInParameter,b.index);let x=!1,S=null;if(!this.hasPrecedingLineBreak())switch(x=this.eat(51),this.state.type){case 9:case 135:case 4:case 7:case 1:case 5:case 10:case 8:if(!x)break;default:S=this.parseMaybeAssign()}return m.delegate=x,m.argument=S,this.finishNode(m,"YieldExpression")}parseImportCall(b){this.next();let m=this.parseCallExpressionArguments();if(m.length===0||m.length>2)this.raise(F.ImportCallArity,b,b);else for(let x of m)x.type==="SpreadElement"&&this.raise(F.ImportCallSpreadArgument,x,b);return b.source=m[0],b.options=m[1]??null,this.finishNode(b,"ImportExpression")}withTopicBindingContext(b){let m=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;let x=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return b()}finally{this.state.inHackPipelineBody=m,this.state.seenTopicReference=x}}allowInAnd(b){let m=this.prodParam.currentFlags();if(24&~m){this.prodParam.enter(m|8|16);try{return b()}finally{this.prodParam.exit()}}return b()}disallowInAnd(b){let m=this.prodParam.currentFlags(),x=8&m,S=16&~m;if(x||S){this.prodParam.enter(m&-9|16);try{return b()}finally{this.prodParam.exit()}}return b()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(b){let m=this.state.startLoc;this.prodParam.enter(this.prodParam.currentFlags()&-17);let x;if(this.isContextual(92)&&this.recordAwaitIfAllowed()){this.next(),x=this.parseAwait(m,!0);let S=this.state.type;Wa(S)&&S!==35&&(this.prodParam.hasIn||S!==54)&&this.raise(F.PipelineUnparenthesized,m)}else this.state.canStartArrow=!0,x=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),m,b);return this.prodParam.exit(),x}parseModuleExpression(){this.expectPlugin("moduleBlocks");let b=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);let m=this.startNodeAt(this.state.endLoc);this.next();let x=this.initializeScopes(!0);this.enterInitialScopes();try{b.body=this.parseProgram(m,4,"module")}finally{x()}return this.finishNode(b,"ModuleExpression")}parseVoidPattern(b){this.expectPlugin("discardBinding");let m=this.startNode();return b!=null&&(b.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(m,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(b,m,x){if(m!=null&&this.match(84)){let S=this.lookaheadCharCode();if(S===44||S===(b===1?93:b===4?125:41)||S===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(m))}return this.parseMaybeAssignAllowIn(m,x)}parsePropertyNamePrefixOperator(b){}},V0={kind:1},bq={kind:2},UQe=/[\uD800-\uDFFF]/u,vq=/in(?:stanceof)?/y;function Qve(b){for(let m=0;m0)for(let[k,O]of Array.from(this.scope.undefinedExports))this.raise(F.ModuleExportUndefined,O,{localName:k});this.addExtra(b,"topLevelAwait",this.state.hasTopLevelAwait)}let S;return m===135?S=this.finishNode(b,"Program"):S=this.finishNodeAt(b,"Program",A(this.state.startLoc,-1)),S}stmtToDirective(b){let m=this.castNodeTo(b,"Directive"),x=this.castNodeTo(b.expression,"DirectiveLiteral"),S=x.value,k=this.input.slice(this.offsetToSourcePos(x.start),this.offsetToSourcePos(x.end)),O=x.value=k.slice(1,-1);return this.addExtra(x,"raw",k),this.addExtra(x,"rawValue",O),this.addExtra(x,"expressionValue",S),m.value=x,delete b.expression,m}parseInterpreterDirective(){if(!this.match(24))return null;let b=this.startNode();return b.value=this.state.value,this.next(),this.finishNode(b,"InterpreterDirective")}isLet(){return this.isContextual(96)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(103)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(103))return!1;let b=this.nextTokenInLineStart(),m=this.codePointAtPos(b);if(this.isUnparsedContextual(b,"of")){let x=this.lookaheadCharCodeSince(b+2);if(x!==61&&x!==58&&x!==59)return!1}return!!(this.chStartsBindingIdentifier(m,b)||this.isUnparsedContextual(b,"void"))}nextTokenIsIdentifierOnSameLine(){let b=this.nextTokenInLineStart(),m=this.codePointAtPos(b);return this.chStartsBindingIdentifier(m,b)}isAwaitUsing(){if(!this.isContextual(92))return!1;let b=this.nextTokenInLineStart();if(this.isUnparsedContextual(b,"using")){b=this.nextTokenInLineStartSince(b+5);let m=this.codePointAtPos(b);if(this.chStartsBindingIdentifier(m,b))return!0}return!1}chStartsBindingIdentifier(b,m){if(Z(b)){if(vq.lastIndex=m,vq.test(this.input)){let x=this.codePointAtPos(vq.lastIndex);if(!ie(x)&&x!==92)return!1}return!0}else return b===92}chStartsBindingPattern(b){return b===91||b===123}hasFollowingBindingAtom(){let b=this.nextTokenStart(),m=this.codePointAtPos(b);return this.chStartsBindingPattern(m)||this.chStartsBindingIdentifier(m,b)}hasInLineFollowingBindingIdentifierOrBrace(){let b=this.nextTokenInLineStart(),m=this.codePointAtPos(b);return m===123||this.chStartsBindingIdentifier(m,b)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(b=!1){let m=0;return this.options.annexB&&!this.state.strict&&(m|=4,b&&(m|=8)),this.parseStatementLike(m)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(b){let m=null;return this.match(22)&&(m=this.parseDecorators(!0)),this.parseStatementContent(b,m)}parseStatementContent(b,m){let x=this.state.type,S=this.startNode(),k=!!(b&2),O=!!(b&4),Q=b&1;switch(x){case 56:return this.parseBreakContinueStatement(S,!0);case 59:return this.parseBreakContinueStatement(S,!1);case 60:return this.parseDebuggerStatement(S);case 86:return this.parseDoWhileStatement(S);case 87:return this.parseForStatement(S);case 64:if(this.lookaheadCharCode()===46)break;return O||this.raise(this.state.strict?F.StrictFunction:this.options.annexB?F.SloppyFunctionAnnexB:F.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(S,!1,!k&&O);case 76:return k||this.unexpected(),this.parseClass(this.maybeTakeDecorators(m,S),!0);case 65:return this.parseIfStatement(S);case 66:return this.parseReturnStatement(S);case 67:return this.parseSwitchStatement(S);case 68:return this.parseThrowStatement(S);case 69:return this.parseTryStatement(S);case 92:if(this.isAwaitUsing())return this.allowsUsing()?k?this.recordAwaitIfAllowed()||this.raise(F.AwaitUsingNotInAsyncContext,S):this.raise(F.UnexpectedLexicalDeclaration,S):this.raise(F.UnexpectedUsingDeclaration,S),this.next(),this.parseVarStatement(S,"await using");break;case 103:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?k||this.raise(F.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(F.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(S,"using");case 96:{if(this.state.containsEsc)break;let he=this.nextTokenStart(),lt=this.codePointAtPos(he);if(lt!==91&&(!k&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(lt,he)&<!==123))break}case 71:k||this.raise(F.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{let he=this.state.value;return this.parseVarStatement(S,he)}case 88:return this.parseWhileStatement(S);case 72:return this.parseWithStatement(S);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(S);case 79:{let he=this.lookaheadCharCode();if(he===40||he===46)break}case 78:{!(this.optionFlags&8)&&!Q&&this.raise(F.UnexpectedImportExport,this.state.startLoc),this.next();let he;return x===79?he=this.parseImport(S):he=this.parseExport(S,m),this.assertModuleNodeAllowed(he),he}default:if(this.isAsyncFunction())return k||this.raise(F.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(S,!0,!k&&O)}let X=this.state.value,ge=this.parseExpression();return Ut(x)&&ge.type==="Identifier"&&this.eat(10)?this.parseLabeledStatement(S,X,ge,b):this.parseExpressionStatement(S,ge,m)}assertModuleNodeAllowed(b){!(this.optionFlags&8)&&!this.inModule&&this.raise(F.ImportOutsideModule,b)}maybeTakeDecorators(b,m,x){return b&&(m.decorators?.length?(this.raise(F.DecoratorsBeforeAfterExport,m.decorators[0]),m.decorators.unshift(...b)):m.decorators=b,this.resetStartLocationFromNode(m,b[0]),x&&this.resetStartLocationFromNode(x,m)),m}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(b){let m=[];do m.push(this.parseDecorator());while(this.match(22));if(this.match(78))b||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(F.UnexpectedLeadingDecorator,this.state.startLoc);return m}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let b=this.startNode();if(this.next(),this.hasPlugin("decorators")){let m=this.state.startLoc,x;if(this.match(6)){let S=this.state.startLoc;this.next(),x=this.parseExpression(),this.expect(7),x=this.wrapParenthesis(S,x);let k=this.state.startLoc;b.expression=this.parseMaybeDecoratorArguments(x,S),b.expression!==x&&this.raise(F.DecoratorArgumentsOutsideParentheses,k)}else{for(x=this.parseIdentifier(!1);this.eat(12);){let S=this.startNodeAt(m);S.object=x,this.match(134)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),S.property=this.parsePrivateName()):S.property=this.parseIdentifier(!0),S.computed=!1,x=this.finishNode(S,"MemberExpression")}b.expression=this.parseMaybeDecoratorArguments(x,m)}}else this.state.canStartArrow=!1,b.expression=this.parseExprSubscripts();return this.finishNode(b,"Decorator")}parseMaybeDecoratorArguments(b,m){if(this.eat(6)){let x=this.startNodeAt(m);return x.callee=b,x.arguments=this.parseCallExpressionArguments(),this.toReferencedList(x.arguments),this.finishNode(x,"CallExpression")}return b}parseBreakContinueStatement(b,m){return this.next(),this.isLineTerminator()?b.label=null:(b.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(b,m),this.finishNode(b,m?"BreakStatement":"ContinueStatement")}verifyBreakContinue(b,m){let x;for(x=0;x=0;O--){let Q=this.state.labels[O];if(Q.statementStart===b.start)Q.statementStart=this.sourceToOffsetPos(this.state.start),Q.kind=k;else break}return this.state.labels.push({name:m,kind:k,statementStart:this.sourceToOffsetPos(this.state.start)}),b.body=S&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),b.label=x,this.finishNode(b,"LabeledStatement")}parseExpressionStatement(b,m,x){return b.expression=m,this.semicolon(),this.finishNode(b,"ExpressionStatement")}parseBlock(b=!1,m=!0,x){let S=this.startNode();return b&&this.state.strictErrors.clear(),this.expect(2),m&&this.scope.enter(0),this.parseBlockBody(S,b,!1,4,x),m&&this.scope.exit(),this.finishNode(S,"BlockStatement")}isValidDirective(b){return b.type==="ExpressionStatement"&&b.expression.type==="StringLiteral"&&!b.expression.extra.parenthesized}parseBlockBody(b,m,x,S,k){let O=b.body=[],Q=b.directives=[];this.parseBlockOrModuleBlockBody(O,m?Q:void 0,x,S,k)}parseBlockOrModuleBlockBody(b,m,x,S,k){let O=this.state.strict,Q=!1,X=!1;for(;!this.match(S);){let ge=x?this.parseModuleItem():this.parseStatementListItem();if(m&&!X){if(this.isValidDirective(ge)){let he=this.stmtToDirective(ge);m.push(he),!Q&&he.value.value==="use strict"&&(Q=!0,this.setStrict(!0));continue}X=!0,this.state.strictErrors.clear()}b.push(ge)}k?.call(this,Q),O||this.setStrict(!1),this.next()}parseFor(b,m){return b.init=m,this.semicolon(!1),b.test=this.match(9)?null:this.parseExpression(),this.semicolon(!1),b.update=this.match(7)?null:this.parseExpression(),this.expect(7),b.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(b,"ForStatement")}parseForIn(b,m,x){let S=this.match(54);return this.next(),S?x!==null&&this.unexpected(x):b.await=x!==null,m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!S||!this.options.annexB||this.state.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(F.ForInOfLoopInitializer,m,{type:S?"ForInStatement":"ForOfStatement"}),m.type==="AssignmentPattern"&&this.raise(F.InvalidLhs,m,{ancestor:{type:"ForStatement"}}),b.left=m,b.right=S?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),b.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(b,S?"ForInStatement":"ForOfStatement")}parseVar(b,m,x,S=!1){let k=b.declarations=[];for(b.kind=x;;){let O=this.startNode();if(this.parseVarId(O,x),O.init=this.eat(25)?m?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,O.init===null&&!S&&(O.id.type!=="Identifier"&&!(m&&(this.match(54)||this.isContextual(98)))?this.raise(F.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(x==="const"||x==="using"||x==="await using")&&!(this.match(54)||this.isContextual(98))&&this.raise(F.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:x})),k.push(this.finishNode(O,"VariableDeclarator")),!this.eat(8))break}return b}parseVarId(b,m){let x=this.parseBindingAtom();m==="using"||m==="await using"?(x.type==="ArrayPattern"||x.type==="ObjectPattern")&&this.raise(F.UsingDeclarationHasBindingPattern,x):x.type==="VoidPattern"&&this.raise(F.UnexpectedVoidPattern,x),this.checkLVal(x,{type:"VariableDeclarator"},m==="var"?5:8201),b.id=x}parseAsyncFunctionExpression(b){return this.parseFunction(b,8)}parseFunction(b,m=0){let x=m&2,S=!!(m&1),k=S&&!(m&4),O=!!(m&8);return this.initFunction(b,O),this.match(51)&&(x&&this.raise(F.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),b.generator=!0),S&&(b.id=this.parseFunctionId(k)),this.scope.enter(514),this.prodParam.enter(z0(O,b.generator)),S||(b.id=this.parseFunctionId()),this.parseFunctionParams(b,!1),this.parseFunctionBodyAndFinish(b,S?"FunctionDeclaration":"FunctionExpression"),this.prodParam.exit(),this.scope.exit(),S&&!x&&this.registerFunctionStatementId(b),b}parseFunctionId(b){return b||Ut(this.state.type)?this.parseIdentifier():null}parseFunctionParams(b,m){this.expect(6),this.expressionScope.enter(zve()),b.params=this.parseBindingList(7,41,2|(m?4:0)),this.expressionScope.exit()}registerFunctionStatementId(b){b.id&&this.scope.declareName(b.id.name,!this.options.annexB||this.state.strict||b.generator||b.async?this.scope.treatFunctionsAsVar?5:8201:17,b.id.start)}parseClass(b,m,x){this.next();let S=this.state.strict;return this.state.strict=!0,this.parseClassId(b,m,x),this.parseClassSuper(b),b.body=this.parseClassBody(!!b.superClass,S),this.finishNode(b,m?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(25)||this.match(9)||this.match(4)}isClassMethod(){return this.match(6)}nameIsConstructor(b){return b.type==="Identifier"&&b.name==="constructor"||b.type==="StringLiteral"&&b.value==="constructor"}isNonstaticConstructor(b){return!b.computed&&!b.static&&this.nameIsConstructor(b.key)}parseClassBody(b,m){this.classScope.enter();let x={hadConstructor:!1,hadSuperClass:b},S=[],k=this.startNode();for(k.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(S.length>0)throw this.raise(F.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){S.push(this.parseDecorator());continue}let O=this.startNode();S.length&&(O.decorators=S,this.resetStartLocationFromNode(O,S[0]),S=[]),this.parseClassMember(k,O,x)}if(this.state.strict=m,this.next(),S.length)throw this.raise(F.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(k,"ClassBody")}parseClassMemberFromModifier(b,m){let x=this.parseIdentifier(!0);if(this.isClassMethod()){let S=m;return S.kind="method",S.computed=!1,S.key=x,S.static=!1,this.pushClassMethod(b,S,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let S=m;return S.computed=!1,S.key=x,S.static=!1,b.body.push(this.parseClassProperty(S)),!0}return this.resetPreviousNodeTrailingComments(x),!1}parseClassMember(b,m,x){let S=this.isContextual(102);if(S){if(this.parseClassMemberFromModifier(b,m))return;if(this.eat(2)){this.parseClassStaticBlock(b,m);return}}this.parseClassMemberWithIsStatic(b,m,x,S)}parseClassMemberWithIsStatic(b,m,x,S){let k=m,O=m,Q=m,X=m,ge=m,he=k,lt=k;if(m.static=S,this.parsePropertyNamePrefixOperator(m),this.eat(51)){he.kind="method";let cc=this.match(134);if(this.parseClassElementName(he),this.parsePostMemberNameModifiers(he),cc){this.pushClassPrivateMethod(b,O,!0,!1);return}this.isNonstaticConstructor(k)&&this.raise(F.ConstructorIsGenerator,k.key),this.pushClassMethod(b,k,!0,!1,!1,!1);return}let Ot=!this.state.containsEsc&&Ut(this.state.type),ji=this.parseClassElementName(m),Yn=Ot?ji.name:null,Vc=this.isPrivateName(ji),zd=this.state.startLoc;if(this.parsePostMemberNameModifiers(lt),this.isClassMethod()){if(he.kind="method",Vc){this.pushClassPrivateMethod(b,O,!1,!1);return}let cc=this.isNonstaticConstructor(k),uc=!1;cc&&(k.kind="constructor",k.decorators&&k.decorators.length>0&&this.raise(F.DecoratorConstructor,m),x.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(F.DuplicateConstructor,ji),cc&&this.hasPlugin("typescript")&&m.override&&this.raise(F.OverrideOnConstructor,ji),x.hadConstructor=!0,uc=x.hadSuperClass),this.pushClassMethod(b,k,!1,!1,cc,uc)}else if(this.isClassProperty())Vc?this.pushClassPrivateProperty(b,X):this.pushClassProperty(b,Q);else if(Yn==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(ji);let cc=this.eat(51);lt.optional&&this.unexpected(zd),he.kind="method";let uc=this.match(134);this.parseClassElementName(he),this.parsePostMemberNameModifiers(lt),uc?this.pushClassPrivateMethod(b,O,cc,!0):(this.isNonstaticConstructor(k)&&this.raise(F.ConstructorIsAsync,k.key),this.pushClassMethod(b,k,cc,!0,!1,!1))}else if((Yn==="get"||Yn==="set")&&!(this.match(51)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(ji),he.kind=Yn;let cc=this.match(134);this.parseClassElementName(k),cc?this.pushClassPrivateMethod(b,O,!1,!1):(this.isNonstaticConstructor(k)&&this.raise(F.ConstructorIsAccessor,k.key),this.pushClassMethod(b,k,!1,!1,!1,!1)),this.checkGetterSetterParams(k)}else if(Yn==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(ji);let cc=this.match(134);this.parseClassElementName(Q),this.pushClassAccessorProperty(b,ge,cc)}else this.isLineTerminator()?Vc?this.pushClassPrivateProperty(b,X):this.pushClassProperty(b,Q):this.unexpected()}parseClassElementName(b){let{type:m,value:x}=this.state;if((m===128||m===130)&&b.static&&x==="prototype"&&this.raise(F.StaticPrototype,this.state.startLoc),m===134){x==="constructor"&&this.raise(F.ConstructorClassPrivateField,this.state.startLoc);let S=this.parsePrivateName();return b.key=S,S}return this.parsePropertyName(b),b.key}parseClassStaticBlock(b,m){this.scope.enter(720);let x=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let S=m.body=[];this.parseBlockOrModuleBlockBody(S,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=x,b.body.push(this.finishNode(m,"StaticBlock")),m.decorators?.length&&this.raise(F.DecoratorStaticBlock,m)}pushClassProperty(b,m){!m.computed&&this.nameIsConstructor(m.key)&&this.raise(F.ConstructorClassField,m.key),b.body.push(this.parseClassProperty(m))}pushClassPrivateProperty(b,m){let x=this.parseClassPrivateProperty(m);b.body.push(x),this.classScope.declarePrivateName(this.getPrivateNameSV(x.key),0,x.key.start)}pushClassAccessorProperty(b,m,x){!x&&!m.computed&&this.nameIsConstructor(m.key)&&this.raise(F.ConstructorClassField,m.key);let S=this.parseClassAccessorProperty(m);b.body.push(S),x&&this.classScope.declarePrivateName(this.getPrivateNameSV(S.key),0,S.key.start)}pushClassMethod(b,m,x,S,k,O){b.body.push(this.parseMethod(m,x,S,k,O,"ClassMethod",!0))}pushClassPrivateMethod(b,m,x,S){let k=this.parseMethod(m,x,S,!1,!1,"ClassPrivateMethod",!0);b.body.push(k);let O=k.kind==="get"?k.static?6:2:k.kind==="set"?k.static?5:1:0;this.declareClassPrivateMethodInScope(k,O)}declareClassPrivateMethodInScope(b,m){this.classScope.declarePrivateName(this.getPrivateNameSV(b.key),m,b.key.start)}parsePostMemberNameModifiers(b){}parseClassPrivateProperty(b){return this.parseInitializer(b),this.semicolon(),this.finishNode(b,"ClassPrivateProperty")}parseClassProperty(b){return this.parseInitializer(b),this.semicolon(),this.finishNode(b,"ClassProperty")}parseClassAccessorProperty(b){return this.parseInitializer(b),this.semicolon(),this.finishNode(b,"ClassAccessorProperty")}parseInitializer(b){this.scope.enter(592),this.expressionScope.enter(s5()),this.prodParam.enter(0),b.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(b,m,x,S=8331){if(Ut(this.state.type))b.id=this.parseIdentifier(),m&&this.declareNameFromIdentifier(b.id,S);else if(x||!m)b.id=null;else throw this.raise(F.MissingClassName,this.state.startLoc)}parseClassSuper(b){this.eat(77)?(this.state.canStartArrow=!1,b.superClass=this.parseExprSubscripts()):b.superClass=null}parseExport(b,m){let x=this.parseMaybeImportPhase(b,!0),S=this.maybeParseExportDefaultSpecifier(b,x),k=!S||this.eat(8),O=k&&this.eatExportStar(b),Q=O&&this.maybeParseExportNamespaceSpecifier(b),X=k&&(!Q||this.eat(8)),ge=S||O;if(O&&!Q){if(S&&this.unexpected(),m)throw this.raise(F.UnsupportedDecoratorExport,b);return this.parseExportFrom(b,!0),this.sawUnambiguousESM=!0,this.finishNode(b,"ExportAllDeclaration")}let he=this.maybeParseExportNamedSpecifiers(b);S&&k&&!O&&!he&&this.unexpected(null,2),Q&&X&&this.unexpected(null,94);let lt;if(ge||he){if(lt=!1,m)throw this.raise(F.UnsupportedDecoratorExport,b);this.parseExportFrom(b,ge)}else lt=this.maybeParseExportDeclaration(b);if(ge||he||lt){let Ot=b;if(this.checkExport(Ot,!0,!1,!!Ot.source),Ot.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(m,Ot.declaration,Ot);else if(m)throw this.raise(F.UnsupportedDecoratorExport,b);return this.sawUnambiguousESM=!0,this.finishNode(Ot,"ExportNamedDeclaration")}if(this.eat(61)){let Ot=b,ji=this.parseExportDefaultExpression();if(Ot.declaration=ji,ji.type==="ClassDeclaration")this.maybeTakeDecorators(m,ji,Ot);else if(m)throw this.raise(F.UnsupportedDecoratorExport,b);return this.checkExport(Ot,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(Ot,"ExportDefaultDeclaration")}throw this.unexpected(null,2)}eatExportStar(b){return this.eat(51)}maybeParseExportDefaultSpecifier(b,m){if(m||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",m?.start);let x=m||this.parseIdentifier(!0),S=this.startNodeAtNode(x);return S.exported=x,b.specifiers=[this.finishNode(S,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(b){if(this.isContextual(89)){b.specifiers??(b.specifiers=[]);let m=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),m.exported=this.parseModuleExportName(),b.specifiers.push(this.finishNode(m,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(b){if(this.match(2)){let m=b;m.specifiers||(m.specifiers=[]);let x=m.exportKind==="type";return m.specifiers.push(...this.parseExportSpecifiers(x)),m.source=null,m.attributes=[],m.declaration=null,!0}return!1}maybeParseExportDeclaration(b){return this.shouldParseExportDeclaration()?(b.specifiers=[],b.source=null,b.attributes=[],b.declaration=this.parseExportDeclaration(b),!0):!1}isAsyncFunction(){if(!this.isContextual(91))return!1;let b=this.nextTokenInLineStart();return this.isUnparsedContextual(b,"function")}parseExportDefaultExpression(){let b=this.startNode();if(this.match(64))return this.next(),this.parseFunction(b,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(b,13);if(this.match(76))return this.parseClass(b,!0,!0);if(this.match(22))return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(71)||this.match(70)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(F.UnsupportedDefaultExport,this.state.startLoc);let m=this.parseMaybeAssignAllowIn();return this.semicolon(),m}parseExportDeclaration(b){return this.match(76)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:b}=this.state;if(Ut(b)){if(b===91&&!this.state.containsEsc||b===96)return!1;if((b===126||b===125)&&!this.state.containsEsc){let S=this.nextTokenStart(),k=this.input.charCodeAt(S);if(k===123||this.chStartsBindingIdentifier(k,S)&&!this.input.startsWith("from",S))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;let m=this.nextTokenStart(),x=this.isUnparsedContextual(m,"from");if(this.input.charCodeAt(m)===44||Ut(this.state.type)&&x)return!0;if(this.match(61)&&x){let S=this.input.charCodeAt(this.nextTokenStartSince(m+4));return S===34||S===39}return!1}parseExportFrom(b,m){this.eatContextual(94)?(b.source=this.parseImportSource(),this.checkExport(b),this.maybeParseImportAttributes(b)):m&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:b}=this.state;return b===22&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?!0:this.isUsing()?(this.raise(F.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(F.UsingDeclarationExport,this.state.startLoc),!0):b===70||b===71||b===64||b===76||this.isLet()||this.isAsyncFunction()}checkExport(b,m,x,S){if(m){if(x){if(this.checkDuplicateExports(b,"default"),this.hasPlugin("exportDefaultFrom")){let k=b.declaration;k.type==="Identifier"&&k.name==="from"&&k.end-k.start===4&&!k.extra?.parenthesized&&this.raise(F.ExportDefaultFromAsIdentifier,k)}}else if(b.specifiers?.length)for(let k of b.specifiers){let{exported:O}=k,Q=O.type==="Identifier"?O.name:O.value;if(this.checkDuplicateExports(k,Q),!S&&k.local){let{local:X}=k;X.type!=="Identifier"?this.raise(F.ExportBindingIsString,k,{localName:X.value,exportName:Q}):(this.checkReservedWord(X.name,X.start,!0,!1),this.scope.checkLocalExport(X))}}else if(b.declaration){let k=b.declaration;if(k.type==="FunctionDeclaration"||k.type==="ClassDeclaration"){let{id:O}=k;if(!O)throw new Error("Assertion failure");this.checkDuplicateExports(b,O.name)}else if(k.type==="VariableDeclaration")for(let O of k.declarations)this.checkDeclaration(O.id)}}}checkDeclaration(b){if(b.type==="Identifier")this.checkDuplicateExports(b,b.name);else if(b.type==="ObjectPattern")for(let m of b.properties)this.checkDeclaration(m);else if(b.type==="ArrayPattern")for(let m of b.elements)m&&this.checkDeclaration(m);else b.type==="ObjectProperty"?this.checkDeclaration(b.value):b.type==="RestElement"?this.checkDeclaration(b.argument):b.type==="AssignmentPattern"&&this.checkDeclaration(b.left)}checkDuplicateExports(b,m){this.exportedIdentifiers.has(m)&&(m==="default"?this.raise(F.DuplicateDefaultExport,b):this.raise(F.DuplicateExport,b,{exportName:m})),this.exportedIdentifiers.add(m)}parseExportSpecifiers(b){let m=[],x=!0;for(this.expect(2);!this.eat(4);){if(x)x=!1;else if(this.expect(8),this.eat(4))break;let S=this.isContextual(126),k=this.match(130),O=this.startNode();O.local=this.parseModuleExportName(),m.push(this.parseExportSpecifier(O,k,b,S))}return m}parseExportSpecifier(b,m,x,S){return this.eatContextual(89)?b.exported=this.parseModuleExportName():m?b.exported=this.cloneStringLiteral(b.local):b.exported||(b.exported=this.cloneIdentifier(b.local)),this.finishNode(b,"ExportSpecifier")}parseModuleExportName(){if(this.match(130)){let b=this.parseStringLiteral(this.state.value),m=UQe.exec(b.value);return m&&this.raise(F.ModuleExportNameHasLoneSurrogate,b,{surrogateCharCode:m[0].charCodeAt(0)}),b}return this.parseIdentifier(!0)}checkImportPhase(b){let{specifiers:m}=b,x=m.length===1?m[0].type:null;b.phase==="source"?x!=="ImportDefaultSpecifier"&&this.raise(F.SourcePhaseImportRequiresDefault,m[0]):b.phase==="defer"&&x!=="ImportNamespaceSpecifier"&&this.raise(F.DeferImportRequiresNamespace,m[0])}isPotentialImportPhase(b){return b?!1:this.isContextual(101)||this.isContextual(93)}applyImportPhase(b,m,x,S){m||(x==="source"?(this.expectPlugin("sourcePhaseImports",S),b.phase="source"):x==="defer"?(this.expectPlugin("deferredImportEvaluation",S),b.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(b.phase=null))}parseMaybeImportPhase(b,m){if(!this.isPotentialImportPhase(m))return this.applyImportPhase(b,m,null),null;let x=this.startNode(),S=this.parseIdentifierName(!0),{type:k}=this.state;return(lr(k)?k!==94||this.lookaheadCharCode()===102:k!==8)?(this.applyImportPhase(b,m,S,x.start),null):(this.applyImportPhase(b,m,null),this.createIdentifier(x,S))}isPrecedingIdImportPhase(b){let{type:m}=this.state;return Ut(m)?m!==94||this.lookaheadCharCode()===102:m!==8}parseImport(b){return this.match(130)?this.parseImportSourceAndAttributes(b):this.parseImportSpecifiersAndAfter(b,this.parseMaybeImportPhase(b,!1))}parseImportSpecifiersAndAfter(b,m){b.specifiers=[];let x=!this.maybeParseDefaultImportSpecifier(b,m)||this.eat(8),S=x&&this.maybeParseStarImportSpecifier(b);return x&&!S&&this.parseNamedImportSpecifiers(b),this.expectContextual(94),this.parseImportSourceAndAttributes(b)}parseImportSourceAndAttributes(b){return b.specifiers??(b.specifiers=[]),b.source=this.parseImportSource(),this.maybeParseImportAttributes(b),this.checkImportPhase(b),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(b,"ImportDeclaration")}parseImportSource(){return this.match(130)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(b,m,x){m.local=this.parseIdentifier(),b.specifiers.push(this.finishImportSpecifier(m,x))}finishImportSpecifier(b,m,x=8201){return this.checkLVal(b.local,{type:m},x),this.finishNode(b,m)}parseImportAttributes(){this.expect(2);let b=[],m=new Set;do{if(this.match(4))break;let x=this.startNode(),S=this.state.value;if(m.has(S)&&this.raise(F.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:S}),m.add(S),this.match(130)?x.key=this.parseStringLiteral(S):x.key=this.parseIdentifier(!0),this.expect(10),!this.match(130))throw this.raise(F.ModuleAttributeInvalidValue,this.state.startLoc);x.value=this.parseStringLiteral(this.state.value),b.push(this.finishNode(x,"ImportAttribute"))}while(this.eat(8));return this.expect(4),b}maybeParseImportAttributes(b){let m;if(this.match(72)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),m=this.parseImportAttributes()}else m=[];b.attributes=m}maybeParseDefaultImportSpecifier(b,m){if(m){let x=this.startNodeAtNode(m);return x.local=m,b.specifiers.push(this.finishImportSpecifier(x,"ImportDefaultSpecifier")),!0}else if(lr(this.state.type))return this.parseImportSpecifierLocal(b,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(b){if(this.match(51)){let m=this.startNode();return this.next(),this.expectContextual(89),this.parseImportSpecifierLocal(b,m,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(b){let m=!0;for(this.expect(2);!this.eat(4);){if(m)m=!1;else{if(this.eat(10))throw this.raise(F.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}let x=this.startNode(),S=this.match(130),k=this.isContextual(126);x.imported=this.parseModuleExportName();let O=this.parseImportSpecifier(x,S,b.importKind==="type"||b.importKind==="typeof",k,void 0);b.specifiers.push(O)}}parseImportSpecifier(b,m,x,S,k){if(this.eatContextual(89))b.local=this.parseIdentifier();else{let{imported:O}=b;if(m)throw this.raise(F.ImportBindingIsString,b,{importName:O.value});this.checkReservedWord(O.name,b.start,!0,!0),b.local||(b.local=this.cloneIdentifier(O))}return this.finishImportSpecifier(b,"ImportSpecifier",k)}isThisParam(b){return b.type==="Identifier"&&b.name==="this"}},Aq=/in(?:stanceof)?|as|satisfies/y;function QQe(b){if(b==null)throw new Error(`Unexpected ${b} value.`);return b}function yq(b){if(!b)throw new Error("Assert fail")}var Gve={AbstractMethodHasImplementation:({methodName:b})=>`Method '${b}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:b})=>`Property '${b}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:b})=>`'declare' is not allowed in ${b}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DecoratorAbstractMethod:({kind:b})=>`Decorators can't be used with ${b.startsWith("a")?"an":"a"} ${b}.`,DuplicateAccessibilityModifier:({modifier:b})=>`Accessibility modifier already seen: '${b}'.`,DuplicateModifier:({modifier:b})=>`Duplicate modifier: '${b}'.`,EmptyHeritageClauseType:({token:b})=>`'${b}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ExportAssignmentInTSNamespace:"An export assignment cannot be used in a namespace.",ExportInTSNamespace:"Export declarations are not permitted in a namespace.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportInTSNamespace:"Import declarations in a namespace cannot reference a module.",IncompatibleModifiers:({modifiers:b})=>`'${b[0]}' modifier cannot be used with '${b[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:b})=>`Index signatures cannot have an accessibility modifier ('${b}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",InvalidHeritageClauseType:({token:b})=>`'${b}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:b=>`'${b}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:b})=>`'${b}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:b})=>`'${b}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:b})=>`'${b}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:b=>`'${b}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:b})=>`'${b[0]}' modifier must precede '${b[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NamespaceExportInTSNamespace:"Global module exports may only appear at top level.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:b})=>`Private elements cannot have an accessibility modifier ('${b}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:b})=>`Single type parameter ${b} should have a trailing comma. Example usage: <${b},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterInitializer:"A parameter initializer is only allowed in a function or constructor implementation.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnexpectedTypeDeclaration:b=>`'${b}' declarations can only be declared inside a block.`,UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:b})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${b}.`,UsingDeclarationInAmbientContext:b=>`'${b}' declarations are not allowed in ambient contexts.`},ye=U`typescript`(Gve);function qve(b){switch(b){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function wq(b){return b==="private"||b==="public"||b==="protected"}function f_(b){return b==="in"||b==="out"}function p_(b){if(b.extra?.parenthesized)return!1;switch(b.type){case"Identifier":return!0;case"MemberExpression":return!b.computed&&p_(b.object);case"TSInstantiationExpression":return p_(b.expression);default:return!1}}var xq=b=>class extends b{getScopeHandler(){return Sve}tsIsIdentifier(){return Ut(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(2)||this.match(51)||this.match(17)||this.match(134)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(102)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(m,x,S){if(!Ut(this.state.type)&&this.state.type!==54&&this.state.type!==71)return;let k=this.state.value;if(m.includes(k)){if(S&&this.match(102)||x&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return k}}tsParseModifiers({allowedModifiers:m,disallowedModifiers:x,stopOnStartOfClassStaticBlock:S,errorTemplate:k=ye.InvalidModifierOnTypeMember},O){let Q=(ge,he,lt,Ot)=>{he===lt&&O[Ot]&&this.raise(ye.InvalidModifiersOrder,ge,{orderedModifiers:[lt,Ot]})},X=(ge,he,lt,Ot)=>{(O[lt]&&he===Ot||O[Ot]&&he===lt)&&this.raise(ye.IncompatibleModifiers,ge,{modifiers:[lt,Ot]})};for(;;){let{startLoc:ge}=this.state,he=this.tsParseModifier(m.concat(x??[]),S,O.static);if(!he)break;wq(he)?O.accessibility?this.raise(ye.DuplicateAccessibilityModifier,ge,{modifier:he}):(Q(ge,he,he,"override"),Q(ge,he,he,"static"),Q(ge,he,he,"readonly"),O.accessibility=he):f_(he)?(O[he]&&this.raise(ye.DuplicateModifier,ge,{modifier:he}),O[he]=!0,Q(ge,he,"in","out")):(p(O,he)?this.raise(ye.DuplicateModifier,ge,{modifier:he}):(Q(ge,he,"static","readonly"),Q(ge,he,"static","override"),Q(ge,he,"override","readonly"),Q(ge,he,"abstract","override"),X(ge,he,"declare","override"),X(ge,he,"static","abstract")),O[he]=!0),x?.includes(he)&&this.raise(k,ge,{modifier:he})}}tsIsListTerminator(m){switch(m){case"EnumMembers":case"TypeMembers":return this.match(4);case"HeritageClauseElement":return this.match(2);case"TupleElementTypes":return this.match(1);case"TypeParametersOrArguments":return this.match(44)}}tsParseList(m,x){let S=[];for(;!this.tsIsListTerminator(m);)S.push(x());return S}tsParseDelimitedList(m,x,S){return QQe(this.tsParseDelimitedListWorker(m,x,!0,S))}tsParseDelimitedListWorker(m,x,S,k){let O=[],Q=-1;for(;!this.tsIsListTerminator(m);){Q=-1;let X=x();if(X==null)return;if(O.push(X),this.eat(8)){Q=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(m))break;S&&this.expect(8);return}return k&&(k.value=Q),O}tsParseBracketedList(m,x,S,k,O){k||(S?this.expect(0):this.expect(43));let Q=this.tsParseDelimitedList(m,x,O);return S?this.expect(1):this.expect(44),Q}tsParseImportType(){let m=this.startNode();return this.expect(79),this.expect(6),this.match(130)?m.source=this.parseStringLiteral(this.state.value):(this.raise(ye.UnsupportedImportTypeArgument,this.state.startLoc),m.source=this.tsParseNonConditionalType()),this.eat(8)?m.options=this.tsParseImportTypeOptions():m.options=null,this.expect(7),this.eat(12)&&(m.qualifier=this.tsParseEntityName(3)),this.match(43)&&(m.typeArguments=this.tsParseTypeArguments()),this.finishNode(m,"TSImportType")}tsParseImportTypeOptions(){let m=this.startNode();this.expect(2);let x=this.startNode();return this.isContextual(72)?(x.method=!1,x.key=this.parseIdentifier(!0),x.computed=!1,x.shorthand=!1):this.unexpected(null,72),this.expect(10),x.value=this.tsParseImportTypeWithPropertyValue(),m.properties=[this.finishObjectProperty(x)],this.eat(8),this.expect(4),this.finishNode(m,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let m=this.startNode(),x=[];for(this.expect(2);!this.match(4);){let S=this.state.type;Ut(S)||S===130?x.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(8)}return m.properties=x,this.next(),this.finishNode(m,"ObjectExpression")}tsParseEntityName(m){let x;if(m&1&&this.match(74))if(m&2)x=this.parseIdentifier(!0);else{let S=this.startNode();this.next(),x=this.finishNode(S,"ThisExpression")}else x=this.parseIdentifier(!!(m&1));for(;this.eat(12);){let S=this.startNodeAtNode(x);S.left=x,S.right=this.parseIdentifier(!!(m&1)),x=this.finishNode(S,"TSQualifiedName")}return x}tsParseTypeReference(){let m=this.startNode();return m.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(m.typeArguments=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeReference")}tsParseThisTypePredicate(m){this.next();let x=this.startNodeAtNode(m);return x.parameterName=m,x.typeAnnotation=this.tsParseTypeAnnotation(!1),x.asserts=!1,this.finishNode(x,"TSTypePredicate")}tsParseThisTypeNode(){let m=this.startNode();return this.next(),this.finishNode(m,"TSThisType")}tsParseTypeQuery(){let m=this.startNode();return this.expect(83),this.match(79)?m.exprName=this.tsParseImportType():m.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(m.typeArguments=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ye.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ye.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ye.InvalidModifierOnTypeParameter});tsParseTypeParameter(m){let x=this.startNode();return m(x),x.name=this.tsParseTypeParameterName(),x.constraint=this.tsEatThenParseType(77),x.default=this.tsEatThenParseType(25),this.finishNode(x,"TSTypeParameter")}tsTryParseTypeParameters(m){if(this.match(43))return this.tsParseTypeParameters(m)}tsParseTypeParameters(m){let x=this.startNode();this.match(43)||this.match(138)?this.next():this.unexpected();let S={value:-1};return x.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,m),!1,!0,S),x.params.length===0&&this.raise(ye.EmptyTypeParameters,x),S.value!==-1&&this.addExtra(x,"trailingComma",S.value),this.finishNode(x,"TSTypeParameterDeclaration")}tsFillSignature(m,x){let S=m===15,k="params",O="returnType";x.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),x[k]=this.tsParseBindingListForSignature(),S?x[O]=this.tsParseTypeOrTypePredicateAnnotation(m):this.match(m)&&(x[O]=this.tsParseTypeOrTypePredicateAnnotation(m))}tsParseBindingListForSignature(){let m=super.parseBindingList(7,41,2);for(let x of m){let{type:S}=x;(S==="AssignmentPattern"||S==="TSParameterProperty")&&this.raise(ye.UnsupportedSignatureParameterKind,x,{type:S})}return m}tsParseTypeMemberSemicolon(){!this.eat(8)&&!this.isLineTerminator()&&this.expect(9)}tsParseSignatureMember(m,x){return this.tsFillSignature(10,x),this.tsParseTypeMemberSemicolon(),this.finishNode(x,m)}tsIsUnambiguouslyIndexSignature(){return this.next(),Ut(this.state.type)?(this.next(),this.match(10)):!1}tsTryParseIndexSignature(m){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let x=this.parseIdentifier();x.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(x),this.expect(1),m.parameters=[x];let S=this.tsTryParseTypeAnnotation();return S&&(m.typeAnnotation=S),this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSIndexSignature")}tsParsePropertyOrMethodSignature(m,x){if(this.eat(13)&&(m.optional=!0),this.match(6)||this.match(43)){x&&this.raise(ye.ReadonlyForMethodSignature,m);let S=m;if(S.kind&&this.match(43)&&this.raise(ye.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,S),this.tsParseTypeMemberSemicolon(),S.kind==="get")S.params.length>0&&(this.raise(F.BadGetterArity,this.state.curPosition()),this.isThisParam(S.params[0])&&this.raise(ye.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(S.kind==="set"){if(S.params.length!==1)this.raise(F.BadSetterArity,this.state.curPosition());else{let k=S.params[0];this.isThisParam(k)&&this.raise(ye.AccessorCannotDeclareThisParameter,this.state.curPosition()),k.type==="Identifier"&&k.optional&&this.raise(ye.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),k.type==="RestElement"&&this.raise(ye.SetAccessorCannotHaveRestParameter,this.state.curPosition())}S.returnType&&this.raise(ye.SetAccessorCannotHaveReturnType,S.returnType)}else S.kind="method";return this.finishNode(S,"TSMethodSignature")}else{let S=m;x&&(S.readonly=!0);let k=this.tsTryParseTypeAnnotation();return k&&(S.typeAnnotation=k),this.tsParseTypeMemberSemicolon(),this.finishNode(S,"TSPropertySignature")}}tsParseTypeMember(){let m=this.startNode();if(this.match(6)||this.match(43))return this.tsParseSignatureMember("TSCallSignatureDeclaration",m);if(this.match(73)){let S=this.startNode();return this.next(),this.match(6)||this.match(43)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",m):(m.key=this.createIdentifier(S,"new"),this.tsParsePropertyOrMethodSignature(m,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},m),this.tsTryParseIndexSignature(m)||(super.parsePropertyName(m),!m.computed&&m.key.type==="Identifier"&&(m.key.name==="get"||m.key.name==="set")&&this.tsTokenCanFollowModifier()&&(m.kind=m.key.name,super.parsePropertyName(m),!this.match(6)&&!this.match(43)&&this.unexpected(null,6)),this.tsParsePropertyOrMethodSignature(m,!!m.readonly))}tsParseTypeLiteral(){let m=this.startNode();return m.members=this.tsParseObjectTypeMembers(),this.finishNode(m,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(2);let m=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(4),m}tsIsStartOfMappedType(){return this.next(),this.eat(49)?this.isContextual(118):(this.isContextual(118)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(54)))}tsParseMappedType(){let m=this.startNode();return this.expect(2),this.match(49)?(m.readonly=this.state.value,this.next(),this.expectContextual(118)):this.eatContextual(118)&&(m.readonly=!0),this.expect(0),m.key=this.tsParseTypeParameterName(),m.constraint=this.tsExpectThenParseType(54),m.nameType=this.eatContextual(89)?this.tsParseType():null,this.expect(1),this.match(49)?(m.optional=this.state.value,this.next(),this.expect(13)):this.eat(13)&&(m.optional=!0),m.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(4),this.finishNode(m,"TSMappedType")}tsParseTupleType(){let m=this.startNode();m.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let x=!1;return m.elementTypes.forEach(S=>{let{type:k}=S;x&&k!=="TSRestType"&&k!=="TSOptionalType"&&!(k==="TSNamedTupleMember"&&S.optional)&&this.raise(ye.OptionalTypeBeforeRequired,S),x||(x=k==="TSNamedTupleMember"&&S.optional||k==="TSOptionalType")}),this.finishNode(m,"TSTupleType")}tsParseTupleElementType(){let m=this.state.startLoc,x=this.eat(17),{startLoc:S}=this.state,k,O,Q,X,ge=lr(this.state.type)?this.lookaheadCharCode():null;if(ge===58)k=!0,Q=!1,O=this.parseIdentifier(!0),this.expect(10),X=this.tsParseType();else if(ge===63){Q=!0;let he=this.state.value,lt=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(k=!0,O=this.createIdentifier(this.startNodeAt(S),he),this.expect(13),this.expect(10),X=this.tsParseType()):(k=!1,X=lt,this.expect(13))}else X=this.tsParseType(),Q=this.eat(13),k=this.eat(10);if(k){let he;O?(he=this.startNodeAt(S),he.optional=Q,he.label=O,he.elementType=X,this.eat(13)&&(he.optional=!0,this.raise(ye.TupleOptionalAfterType,this.state.lastTokStartLoc))):(he=this.startNodeAt(S),he.optional=Q,this.raise(ye.InvalidTupleMemberLabel,X),he.label=X,he.elementType=this.tsParseType()),X=this.finishNode(he,"TSNamedTupleMember")}else if(Q){let he=this.startNodeAt(S);he.typeAnnotation=X,X=this.finishNode(he,"TSOptionalType")}if(x){let he=this.startNodeAt(m);he.typeAnnotation=X,X=this.finishNode(he,"TSRestType")}return X}tsParseParenthesizedType(){let m=this.startNode();return this.expect(6),m.typeAnnotation=this.tsParseType(),this.expect(7),this.finishNode(m,"TSParenthesizedType")}tsParseFunctionOrConstructorType(m,x){let S=this.startNode();return m==="TSConstructorType"&&(S.abstract=!!x,x&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(15,S)),this.finishNode(S,m)}tsParseLiteralTypeNode(){let m=this.startNode();switch(this.state.type){case 131:case 132:case 130:case 81:case 82:m.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(m,"TSLiteralType")}tsParseTemplateLiteralType(){let m=this.state.startLoc,x=this.parseTemplateElement(!1),S=[x];if(x.tail){let k=this.startNodeAt(m),O=this.startNodeAt(m);return O.expressions=[],O.quasis=S,k.literal=this.finishNode(O,"TemplateLiteral"),this.finishNode(k,"TSLiteralType")}else{let k=[];for(;!x.tail;)k.push(this.tsParseType()),this.readTemplateContinuation(),S.push(x=this.parseTemplateElement(!1));let O=this.startNodeAt(m);return O.types=k,O.quasis=S,this.finishNode(O,"TSTemplateLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let m=this.tsParseThisTypeNode();return this.isContextual(112)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(m):m}tsParseNonArrayType(){switch(this.state.type){case 130:case 131:case 132:case 81:case 82:return this.tsParseLiteralTypeNode();case 49:if(this.state.value==="-"){let m=this.startNode(),x=this.lookahead();return x.type!==131&&x.type!==132&&this.unexpected(),m.literal=this.parseMaybeUnary(),this.finishNode(m,"TSLiteralType")}break;case 74:return this.tsParseThisTypeOrThisTypePredicate();case 83:return this.tsParseTypeQuery();case 79:return this.tsParseImportType();case 2:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 6:if(!(this.optionFlags&2048)){let m=this.state.startLoc;this.next();let x=this.tsParseType();return this.expect(7),this.addExtra(x,"parenthesized",!0),this.addExtra(x,"parenStart",m.index),x}return this.tsParseParenthesizedType();case 21:case 20:return this.tsParseTemplateLiteralType();default:{let{type:m}=this.state;if(Ut(m)||m===84||m===80){let x=m===84?"TSVoidKeyword":m===80?"TSNullKeyword":qve(this.state.value);if(x!==void 0&&this.lookaheadCharCode()!==46){let S=this.startNode();return this.next(),this.finishNode(S,x)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:m}=this.state,x=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(1)){let S=this.startNodeAt(m);S.elementType=x,this.expect(1),x=this.finishNode(S,"TSArrayType")}else{let S=this.startNodeAt(m);S.objectType=x,S.indexType=this.tsParseType(),this.expect(1),x=this.finishNode(S,"TSIndexedAccessType")}return x}tsParseTypeOperator(){let m=this.startNode(),x=this.state.value;return this.next(),m.operator=x,m.typeAnnotation=this.tsParseTypeOperatorOrHigher(),x==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(m),this.finishNode(m,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(m){switch(m.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ye.UnexpectedReadonly,m)}}tsParseInferType(){let m=this.startNode();this.expectContextual(111);let x=this.startNode();return x.name=this.tsParseTypeParameterName(),x.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),m.typeParameter=this.finishNode(x,"TSTypeParameter"),this.finishNode(m,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(77)){let m=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return m}}tsParseTypeOperatorOrHigher(){return ul(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(111)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(m,x,S){let k=this.startNode(),O=this.eat(S),Q=[];do Q.push(x());while(this.eat(S));return Q.length===1&&!O?Q[0]:(k.types=Q,this.finishNode(k,m))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),41)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),39)}tsIsStartOfFunctionType(){return this.match(43)?!0:this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Ut(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){let{errors:m}=this.state,x=m.length;try{return this.parseObjectLike(4,!0),m.length===x}catch{return!1}}if(this.match(0)){this.next();let{errors:m}=this.state,x=m.length;try{return super.parseBindingList(1,93,1),m.length===x}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(7)||this.match(17)||this.tsSkipParameterStart()&&(this.match(10)||this.match(8)||this.match(13)||this.match(25)||this.match(7)&&(this.next(),this.match(15))))}tsParseTypeOrTypePredicateAnnotation(m){return this.tsInType(()=>{let x=this.startNode();this.expect(m);let S=this.startNode(),k=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(k&&this.match(74)){let X=this.tsParseThisTypeOrThisTypePredicate();return X.type==="TSThisType"?(S.parameterName=X,S.asserts=!0,S.typeAnnotation=null,X=this.finishNode(S,"TSTypePredicate")):(this.resetStartLocationFromNode(X,S),X.asserts=!0),x.typeAnnotation=X,this.finishNode(x,"TSTypeAnnotation")}let O=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!O)return k?(S.parameterName=this.parseIdentifier(),S.asserts=k,S.typeAnnotation=null,x.typeAnnotation=this.finishNode(S,"TSTypePredicate"),this.finishNode(x,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,x);let Q=this.tsParseTypeAnnotation(!1);return S.parameterName=O,S.typeAnnotation=Q,S.asserts=k,x.typeAnnotation=this.finishNode(S,"TSTypePredicate"),this.finishNode(x,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(10))return this.tsParseTypeOrTypePredicateAnnotation(10)}tsTryParseTypeAnnotation(){if(this.match(10))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(10)}tsParseTypePredicatePrefix(){let m=this.parseIdentifier();if(this.isContextual(112)&&!this.hasPrecedingLineBreak())return this.next(),m}tsParseTypePredicateAsserts(){if(this.state.type!==105)return!1;let m=this.state.containsEsc;return this.next(),!Ut(this.state.type)&&!this.match(74)?!1:(m&&this.raise(F.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(m=!0,x=this.startNode()){return this.tsInType(()=>{m&&this.expect(10),x.typeAnnotation=this.tsParseType()}),this.finishNode(x,"TSTypeAnnotation")}tsParseType(){yq(this.state.inType);let m=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return m;let x=this.startNodeAtNode(m);return x.checkType=m,x.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(13),x.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(10),x.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(x,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(120)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(73)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ye.ReservedTypeAssertion,this.state.startLoc);let m=this.startNode();return m.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?this.tsParseTypeReference():this.tsParseType())),this.expect(44),m.expression=this.parseMaybeUnary(),this.finishNode(m,"TSTypeAssertion")}tsParseHeritageClause(m){let x=this.state.startLoc,S=this.tsParseDelimitedList("HeritageClauseElement",()=>{let k=(this.state.canStartArrow=!1,super.parseExprSubscripts());p_(k)||this.raise(ye.InvalidHeritageClauseType,k.start,{token:m});let O=m==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(k.type==="TSInstantiationExpression")return k.type=O,k;let Q=this.startNodeAtNode(k);return Q.expression=k,(this.match(43)||this.match(47))&&(Q.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(Q,O)});return S.length||this.raise(ye.EmptyHeritageClauseType,x,{token:m}),S}tsParseInterfaceDeclaration(m,x={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),x.declare&&(m.declare=!0),Ut(this.state.type)?(m.id=this.parseIdentifier(),this.checkIdentifier(m.id,130)):(m.id=null,this.raise(ye.MissingInterfaceName,this.state.startLoc)),m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(m.extends=this.tsParseHeritageClause("extends"));let S=this.startNode();return S.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),m.body=this.finishNode(S,"TSInterfaceBody"),this.finishNode(m,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(m){return m.id=this.parseIdentifier(),this.checkIdentifier(m.id,2),m.typeAnnotation=this.tsInType(()=>{if(m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(25),this.isContextual(110)&&this.lookaheadCharCode()!==46){let x=this.startNode();return this.next(),this.finishNode(x,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(m,"TSTypeAliasDeclaration")}tsInTopLevelContext(m){if(this.curContext()!==Cr.brace){let x=this.state.context;this.state.context=[x[0]];try{return m()}finally{this.state.context=x}}else return m()}tsInType(m){let x=this.state.inType;this.state.inType=!0;try{return m()}finally{this.state.inType=x}}tsInDisallowConditionalTypesContext(m){let x=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return m()}finally{this.state.inDisallowConditionalTypesContext=x}}tsInAllowConditionalTypesContext(m){let x=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return m()}finally{this.state.inDisallowConditionalTypesContext=x}}tsEatThenParseType(m){if(this.match(m))return this.tsNextThenParseType()}tsExpectThenParseType(m){return this.tsInType(()=>(this.expect(m),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let m=this.startNode();return m.id=this.match(130)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(25)&&(m.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(m,"TSEnumMember")}tsParseEnumDeclaration(m,x={}){return x.const&&(m.const=!0),x.declare&&(m.declare=!0),this.expectContextual(122),m.id=this.parseIdentifier(),this.checkIdentifier(m.id,m.const?8971:8459),m.body=this.tsParseEnumBody(),this.finishNode(m,"TSEnumDeclaration")}tsParseEnumBody(){let m=this.startNode();return this.expect(2),m.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(m,"TSEnumBody")}tsParseModuleBlock(m){let x=this.startNode();return m||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(x.body=[],void 0,!0,4),m||this.scope.exit(),this.finishNode(x,"TSModuleBlock")}tsParseNamespaceDeclaration(m){return m.id=this.tsParseEntityName(0),m.id.type==="Identifier"&&this.checkIdentifier(m.id,1024),this.scope.enter(2048),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(m,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(m){let x=this.isContextual(108);return x?(m.kind="global",m.id=this.parseIdentifier()):(m.kind="module",m.id=super.parseStringLiteral(this.state.value)),this.match(2)?(x||this.scope.enter(1024),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(x),this.prodParam.exit(),x||this.scope.exit()):this.semicolon(),this.finishNode(m,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(m,x){m.id=x||this.parseIdentifier(),this.checkIdentifier(m.id,4096),this.expect(25);let S=this.tsParseModuleReference();return m.importKind==="type"&&S.type!=="TSExternalModuleReference"&&this.raise(ye.ImportAliasHasImportType,S),m.moduleReference=S,this.semicolon(),this.finishNode(m,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(115)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let m=this.startNode();return this.expectContextual(115),this.expect(6),this.match(130)||this.unexpected(),m.expression=super.parseExprAtom(),this.expect(7),this.sawUnambiguousESM=!0,this.finishNode(m,"TSExternalModuleReference")}tsLookAhead(m){let x=this.state.clone(),S=m();return this.state=x,S}tsTryParseAndCatch(m){let x=this.tryParse(S=>m()||S());if(!(x.aborted||!x.node))return x.error&&(this.state=x.failState),x.node}tsTryParse(m){let x=this.state.clone(),S=m();if(S!==void 0&&S!==!1)return S;this.state=x}tsTryParseDeclare(m){if(this.isLineTerminator())return;let x=this.state.type;return this.tsInAmbientContext(()=>{switch(x){case 64:return m.declare=!0,super.parseFunctionStatement(m,!1,!1);case 76:return m.declare=!0,this.parseClass(m,!0,!1);case 122:return this.tsParseEnumDeclaration(m,{declare:!0});case 108:return this.tsParseAmbientExternalModuleDeclaration(m);case 96:if(this.state.containsEsc)return;case 71:case 70:return!this.match(71)||!this.isLookaheadContextual("enum")?(m.declare=!0,this.parseVarStatement(m,this.state.value,!0)):(this.expect(71),this.tsParseEnumDeclaration(m,{const:!0,declare:!0}));case 103:if(this.isUsing())return this.raise(ye.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),m.declare=!0,this.parseVarStatement(m,"using",!0);break;case 92:if(this.isAwaitUsing())return this.raise(ye.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),m.declare=!0,this.next(),this.parseVarStatement(m,"await using",!0);break;case 125:{let S=this.tsParseInterfaceDeclaration(m,{declare:!0});if(S)return S}default:if(Ut(x))return this.tsParseDeclaration(m,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(m,x,S,k){switch(x){case 120:if(this.tsCheckLineTerminator(S)&&(this.match(76)||Ut(this.state.type)))return this.tsParseAbstractDeclaration(m,k);break;case 123:if(this.tsCheckLineTerminator(S))return this.tsParseAmbientExternalModuleDeclaration(m);break;case 124:if(this.tsCheckLineTerminator(S)&&Ut(this.state.type))return m.kind="namespace",this.tsParseNamespaceDeclaration(m);break;case 126:if(this.tsCheckLineTerminator(S)&&Ut(this.state.type))return this.tsParseTypeAliasDeclaration(m);break}}tsCheckLineTerminator(m){return m?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(m){if(!this.match(43))return;let x=this.tsTryParseAndCatch(()=>{let S=this.startNodeAt(m);return S.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(S),S.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),S});if(x)return super.parseArrowExpression(x,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===43)return this.tsParseTypeArguments()}tsParseTypeArguments(){let m=this.startNode();return m.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),m.params.length===0?this.raise(ye.EmptyTypeArguments,m):!this.state.inType&&this.curContext()===Cr.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(m,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Xr(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(m,x){let S=x.length?null:this.state.startLoc,k={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},k);let O=k.accessibility,Q=k.override,X=k.readonly;!(m&4)&&(O||X||Q)&&this.raise(ye.UnexpectedParameterModifier,S||x[0]);let ge=this.state.startLoc,he=this.parseMaybeDefault(ge);m&2&&this.parseFunctionParamType(he);let lt=this.parseMaybeDefault(ge,he);if(O||X||Q){let Ot=S?this.startNodeAt(S):this.startNodeAtNode(x[0]);return x.length?Ot.decorators=x:this.setLoc(S),O&&(Ot.accessibility=O),X&&(Ot.readonly=X),Q&&(Ot.override=Q),lt.type!=="Identifier"&<.type!=="AssignmentPattern"&&this.raise(ye.UnsupportedParameterPropertyKind,S||x[0]),Ot.parameter=lt,this.finishNode(Ot,"TSParameterProperty")}return x.length&&(he.decorators=x),lt}isSimpleParameter(m){return m.type==="TSParameterProperty"&&super.isSimpleParameter(m.parameter)||super.isSimpleParameter(m)}tsDisallowOptionalPattern(m){for(let x of m.params)x.type!=="Identifier"&&x.optional&&!this.state.isAmbientContext&&this.raise(ye.PatternIsOptional,x)}setArrowFunctionParameters(m,x,S){super.setArrowFunctionParameters(m,x,S),this.tsDisallowOptionalPattern(m)}parseFunctionBodyAndFinish(m,x,S=!1){this.match(10)&&(m.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));let k=x==="FunctionDeclaration"?"TSDeclareFunction":x==="ClassMethod"||x==="ClassPrivateMethod"?"TSDeclareMethod":void 0;if(k&&!this.match(2)&&this.isLineTerminator()){if(k==="TSDeclareMethod"&&m.kind==="constructor")for(let O of m.params)O.type==="TSParameterProperty"?this.raise(ye.UnexpectedParameterModifier,O):O.type==="AssignmentPattern"&&this.raise(ye.UnexpectedParameterInitializer,O);else for(let O of m.params)O.type==="AssignmentPattern"&&this.raise(ye.UnexpectedParameterInitializer,O);return this.finishNode(m,k)}return k&&this.state.isAmbientContext&&(this.raise(ye.DeclareFunctionHasImplementation,this.state.startLoc),k==="TSDeclareFunction"&&m.declare)?super.parseFunctionBodyAndFinish(m,k,S):(this.tsDisallowOptionalPattern(m),super.parseFunctionBodyAndFinish(m,x,S))}registerFunctionStatementId(m){!m.body&&m.id?this.checkIdentifier(m.id,1024):super.registerFunctionStatementId(m)}tsCheckForInvalidTypeCasts(m){m.forEach(x=>{x?.type==="TSTypeCastExpression"&&this.raise(ye.UnexpectedTypeAnnotation,x.typeAnnotation)})}toReferencedList(m,x){return this.tsCheckForInvalidTypeCasts(m),m}parseArrayLike(m,x){let S=super.parseArrayLike(m,x);return S.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(S.elements),S}parseSubscript(m,x,S,k){if(!this.hasPrecedingLineBreak()&&this.match(31)){this.state.canStartJSXElement=!1,this.next();let Q=this.startNodeAt(x);return Q.expression=m,this.finishNode(Q,"TSNonNullExpression")}let O=!1;if(this.match(14)&&this.lookaheadCharCode()===60){if(S)return k.stop=!0,m;k.optionalChainMember=O=!0,this.next()}if(this.match(43)||this.match(47)){let Q,X=this.tsTryParseAndCatch(()=>{if(!S&&this.atPossibleAsyncArrow(m)){let Ot=this.tsTryParseGenericAsyncArrowFunction(x);if(Ot)return k.stop=!0,Ot}let ge=this.tsParseTypeArgumentsInExpression();if(!ge)return;if(O&&!this.match(6)){Q=this.state.curPosition();return}if(Ki(this.state.type)){let Ot=super.parseTaggedTemplateExpression(m,x,k);return Ot.typeArguments=ge,Ot}if(!S&&this.eat(6)){let Ot=this.startNodeAt(x);return Ot.callee=m,Ot.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(Ot.arguments),Ot.typeArguments=ge,k.optionalChainMember&&(Ot.optional=O),this.finishCallExpression(Ot,k.optionalChainMember)}let he=this.state.type;if(he===44||he===48||he!==6&&he!==89&&he!==116&&Vr(he)&&!this.hasPrecedingLineBreak())return;let lt=this.startNodeAt(x);return lt.expression=m,lt.typeArguments=ge,this.finishNode(lt,"TSInstantiationExpression")});if(Q&&this.unexpected(Q,6),X)return X.type==="TSInstantiationExpression"&&((this.match(12)||this.match(14)&&this.lookaheadCharCode()!==40)&&this.raise(ye.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(12)&&!this.match(14)&&(X.expression=super.stopParseSubscript(m,k))),X}return super.parseSubscript(m,x,S,k)}parseNewCallee(m){super.parseNewCallee(m);let{callee:x}=m;x.type==="TSInstantiationExpression"&&!x.extra?.parenthesized&&(m.typeArguments=x.typeArguments,m.callee=x.expression)}parseExprOp(m,x,S){let k;if(No(54)>S&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(k=this.isContextual(116)))){let O=this.startNodeAt(x);O.expression=m,O.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(k&&this.raise(F.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()));let Q=this.finishNode(O,k?"TSSatisfiesExpression":"TSAsExpression");return this.reScan_lt_gt(),this.parseExprOp(Q,x,S)}return super.parseExprOp(m,x,S)}checkReservedWord(m,x,S,k){this.state.isAmbientContext||super.checkReservedWord(m,x,S,k)}checkDuplicateExports(){}isPotentialImportPhase(m){if(super.isPotentialImportPhase(m))return!0;if(this.isContextual(126)){let x=this.lookaheadCharCode();return m?x===123||x===42:x!==61}return!m&&this.isContextual(83)}applyImportPhase(m,x,S,k){super.applyImportPhase(m,x,S,k),x?m.exportKind=S==="type"?"type":"value":m.importKind=S==="type"||S==="typeof"?S:"value"}parseImport(m){if(this.match(130))return m.importKind="value",this.scope.inTSNamespace&&this.raise(ye.ImportInTSNamespace,m),super.parseImport(m);let x;if(Ut(this.state.type)&&this.lookaheadCharCode()===61){m.importKind="value";let S=this.tsParseImportEqualsDeclaration(m);return this.scope.inTSNamespace&&S.moduleReference.type==="TSExternalModuleReference"&&this.raise(ye.ImportInTSNamespace,m),S}else if(this.isContextual(126)){let S=this.parseMaybeImportPhase(m,!1);if(this.lookaheadCharCode()===61)return this.scope.inTSNamespace&&this.raise(ye.ImportInTSNamespace,m),this.tsParseImportEqualsDeclaration(m,S);x=super.parseImportSpecifiersAndAfter(m,S)}else x=super.parseImport(m);return x.importKind==="type"&&x.specifiers.length>1&&x.specifiers[0].type==="ImportDefaultSpecifier"?this.raise(ye.TypeImportCannotSpecifyDefaultAndNamed,x):this.scope.inTSNamespace&&this.raise(ye.ImportInTSNamespace,x),x}parseExport(m,x){if(this.match(79)){let S=this.startNode();this.next();let k=null;this.isContextual(126)&&this.isPotentialImportPhase(!1)?k=this.parseMaybeImportPhase(S,!1):S.importKind="value";let O=this.tsParseImportEqualsDeclaration(S,k);return m.attributes=[],m.declaration=O,m.exportKind="value",m.source=null,m.specifiers=[],this.finishNode(m,"ExportNamedDeclaration")}else if(this.eat(25)){let S=m;return S.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(ye.ExportAssignmentInTSNamespace,S),this.finishNode(S,"TSExportAssignment")}else if(this.eatContextual(89)){let S=m;return this.expectContextual(124),S.id=this.parseIdentifier(),this.checkIdentifier(S.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(ye.NamespaceExportInTSNamespace,S),this.finishNode(S,"TSNamespaceExportDeclaration")}else{let S=super.parseExport(m,x);return this.scope.inTSNamespace&&(S.type!=="ExportNamedDeclaration"||S.source||!S.declaration&&!this.state.isAmbientContext)&&this.raise(ye.ExportInTSNamespace,S),S}}isAbstractClass(){return this.isContextual(120)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let m=this.startNode();return this.next(),m.abstract=!0,this.parseClass(m,!0,!0)}if(this.match(125)){let m=this.tsParseInterfaceDeclaration(this.startNode());if(m)return m}return super.parseExportDefaultExpression()}parseVarStatement(m,x,S=!1){let{isAmbientContext:k}=this.state,O=super.parseVarStatement(m,x,S||k);if(!k)return O;if(!m.declare&&(x==="using"||x==="await using"))return this.raiseOverwrite(ye.UsingDeclarationInAmbientContext,m,x),O;for(let{id:Q,init:X}of O.declarations)X&&(x==="var"||x==="let"||Q.typeAnnotation?this.raise(ye.InitializerNotAllowedInAmbientContext,X):lw(X,this.hasPlugin("estree"))||this.raise(ye.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,X));return O}parseStatementContent(m,x){let S=!!(m&2);if(!this.state.containsEsc)switch(this.state.type){case 71:{if(this.isLookaheadContextual("enum")){let k=this.startNode();return this.next(),this.tsParseEnumDeclaration(k,{const:!0})}break}case 120:case 121:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let k=this.state.type,O=this.startNode();this.next();let Q=k===121?this.tsTryParseDeclare(O):this.tsParseAbstractDeclaration(O,x);return Q?(k===121&&(Q.declare=!0),Q):(O.expression=this.createIdentifier(this.startNodeAtNode(O),k===121?"declare":"abstract"),this.semicolon(!1),this.finishNode(O,"ExpressionStatement"))}break}case 122:return this.tsParseEnumDeclaration(this.startNode());case 108:{if(this.lookaheadCharCode()===123){let k=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(k)}break}case 125:{let k=this.tsParseInterfaceDeclaration(this.startNode());if(k)return S||this.raise(ye.UnexpectedTypeDeclaration,k,"interface"),k;break}case 123:{if(this.nextTokenIsStringLiteralOnSameLine()){let k=this.startNode();return this.next(),this.tsParseDeclaration(k,123,!1,x)}else if(this.nextTokenIsIdentifierOnSameLine()){this.raise(ye.InlineModuleDeclarationMustUseString,this.state.startLoc);let k=this.startNode();return this.next(),this.tsParseDeclaration(k,124,!1,x)}break}case 124:{if(this.nextTokenIsIdentifierOnSameLine()){let k=this.startNode();return this.next(),this.tsParseDeclaration(k,124,!1,x)}break}case 126:{if(this.nextTokenIsIdentifierOnSameLine()){let k=this.startNode();return S||this.raise(ye.UnexpectedTypeDeclaration,k,"type"),this.next(),this.tsParseTypeAliasDeclaration(k)}break}}return super.parseStatementContent(m,x)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(m,x){return x.some(S=>wq(S)?m.accessibility===S:!!m[S])}tsIsStartOfStaticBlocks(){return this.isContextual(102)&&this.lookaheadCharCode()===123}parseClassMember(m,x,S){let k=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:k,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ye.InvalidModifierOnTypeParameterPositions},x);let O=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(x,k)&&this.raise(ye.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(m,x)):this.parseClassMemberWithIsStatic(m,x,S,!!x.static)};x.declare?this.tsInAmbientContext(O):O(),x.decorators&&x.decorators.length>0&&!this.hasPlugin("decorators-legacy")&&(x.type==="TSAbstractMethodDefinition"||x.type==="TSDeclareMethod"?this.raise(ye.DecoratorAbstractMethod,x,{kind:"abstract method"}):(x.type==="ClassProperty"&&x.abstract||x.type==="ClassProperty"&&x.declare||x.type==="TSAbstractPropertyDefinition"||x.type==="PropertyDefinition"&&x.declare)&&this.raise(ye.DecoratorAbstractMethod,x,{kind:x.declare?"declare field":"abstract field"}))}parseClassMemberWithIsStatic(m,x,S,k){let O=this.tsTryParseIndexSignature(x);if(O){m.body.push(O),x.abstract&&this.raise(ye.IndexSignatureHasAbstract,x),x.accessibility&&this.raise(ye.IndexSignatureHasAccessibility,x,{modifier:x.accessibility}),x.declare&&this.raise(ye.IndexSignatureHasDeclare,x),x.override&&this.raise(ye.IndexSignatureHasOverride,x);return}!this.state.inAbstractClass&&x.abstract&&this.raise(ye.NonAbstractClassHasAbstractMethod,x),x.override&&(S.hadSuperClass||this.raise(ye.OverrideNotInSubClass,x)),super.parseClassMemberWithIsStatic(m,x,S,k)}parsePostMemberNameModifiers(m){this.eat(13)&&(m.optional=!0),m.readonly&&this.match(6)&&this.raise(ye.ClassMethodHasReadonly,m),m.declare&&this.match(6)&&this.raise(ye.ClassMethodHasDeclare,m)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(m,x,S){if(!this.match(13))return m;if(S!=null){let Q=this.lookaheadCharCode();if(Q===44||Q===61||Q===58||Q===41)return this.setOptionalParametersError(S),m}this.next();let k=this.startNodeAt(x);k.test=m;let O=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,k.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=O,this.expect(10),k.alternate=this.parseMaybeAssign(),this.finishNode(k,"ConditionalExpression")}parseParenItem(m,x){let S=super.parseParenItem(m,x);if(this.eat(13)&&(S.optional=!0,this.resetEndLocation(m)),this.match(10)){let k=this.startNodeAt(x);return k.expression=m,k.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(k,"TSTypeCastExpression")}return m}parseExportDeclaration(m){if(!this.state.isAmbientContext&&this.isContextual(121))return this.tsInAmbientContext(()=>this.parseExportDeclaration(m));let x=this.state.startLoc,S=this.eatContextual(121);if(S&&(this.isContextual(121)||!this.shouldParseExportDeclaration()))throw this.raise(ye.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let k=Ut(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(m);return k?((k.type==="TSInterfaceDeclaration"||k.type==="TSTypeAliasDeclaration"||S)&&(m.exportKind="type"),S&&k.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(k,x),k.declare=!0),k):null}parseClassId(m,x,S,k){if((!x||S)&&this.isContextual(109)){m.id=null;return}super.parseClassId(m,x,S,m.declare?1024:8331);let O=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);O&&(m.typeParameters=O)}parseClassPropertyAnnotation(m){m.optional||(this.eat(31)?m.definite=!0:this.eat(13)&&(m.optional=!0));let x=this.tsTryParseTypeAnnotation();x&&(m.typeAnnotation=x)}parseClassProperty(m){if(this.parseClassPropertyAnnotation(m),this.state.isAmbientContext&&!(m.readonly&&!m.typeAnnotation)&&this.match(25)&&this.raise(ye.DeclareClassFieldHasInitializer,this.state.startLoc),m.abstract&&this.match(25)){let{key:x}=m;this.raise(ye.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:x.type==="Identifier"&&!m.computed?x.name:`[${this.input.slice(this.offsetToSourcePos(x.start),this.offsetToSourcePos(x.end))}]`})}return super.parseClassProperty(m)}parseClassPrivateProperty(m){return m.abstract&&this.raise(ye.PrivateElementHasAbstract,m),m.accessibility&&this.raise(ye.PrivateElementHasAccessibility,m,{modifier:m.accessibility}),this.parseClassPropertyAnnotation(m),super.parseClassPrivateProperty(m)}parseClassAccessorProperty(m){return this.parseClassPropertyAnnotation(m),m.optional&&this.raise(ye.AccessorCannotBeOptional,m),super.parseClassAccessorProperty(m)}pushClassMethod(m,x,S,k,O,Q){let X=this.tsTryParseTypeParameters(this.tsParseConstModifier);X&&O&&this.raise(ye.ConstructorHasTypeParameters,X);let{declare:ge=!1,kind:he}=x;ge&&(he==="get"||he==="set")&&this.raise(ye.DeclareAccessor,x,{kind:he}),X&&(x.typeParameters=X),super.pushClassMethod(m,x,S,k,O,Q)}pushClassPrivateMethod(m,x,S,k){let O=this.tsTryParseTypeParameters(this.tsParseConstModifier);O&&(x.typeParameters=O),super.pushClassPrivateMethod(m,x,S,k)}declareClassPrivateMethodInScope(m,x){m.type!=="TSDeclareMethod"&&(m.type==="MethodDefinition"&&m.value.body==null||super.declareClassPrivateMethodInScope(m,x))}parseClassSuper(m){if(super.parseClassSuper(m),m.superClass)if(m.superClass.type==="TSInstantiationExpression"){let x=m.superClass,S=x.expression;this.takeSurroundingComments(S,S.start,S.end);let k=x.typeArguments;this.takeSurroundingComments(k,k.start,k.end),m.superClass=S,m.superTypeArguments=k}else(this.match(43)||this.match(47))&&(m.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(109)&&(m.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(m,x,S,k,O,Q,X){let ge=this.tsTryParseTypeParameters(this.tsParseConstModifier);return ge&&(m.typeParameters=ge),super.parseObjPropValue(m,x,S,k,O,Q,X)}parseFunctionParams(m,x){let S=this.tsTryParseTypeParameters(this.tsParseConstModifier);S&&(m.typeParameters=S),super.parseFunctionParams(m,x)}parseVarId(m,x){super.parseVarId(m,x),m.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(31)&&(m.definite=!0);let S=this.tsTryParseTypeAnnotation();S&&(m.id.typeAnnotation=S,this.resetEndLocation(m.id))}parseAsyncArrowFromCallExpression(m,x){return this.match(10)&&(m.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(m,x)}parseMaybeAssign(m,x){let S,k,O;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(S=this.state.clone(),k=this.tryParse(()=>super.parseMaybeAssign(m,x),S),!k.error)return k.node;let{context:ge}=this.state,he=ge[ge.length-1];(he===Cr.j_oTag||he===Cr.j_expr)&&ge.pop()}if(!k?.error&&!this.match(43))return super.parseMaybeAssign(m,x);(!S||S===this.state)&&(S=this.state.clone());let Q,X=this.tryParse(ge=>{Q=this.tsParseTypeParameters(this.tsParseConstModifier);let he=super.parseMaybeAssign(m,x);if((he.type!=="ArrowFunctionExpression"||he.extra?.parenthesized)&&ge(),Q?.params.length!==0&&this.resetStartLocationFromNode(he,Q),he.typeParameters=Q,this.hasPlugin("jsx")&&he.typeParameters.params.length===1&&!he.typeParameters.extra?.trailingComma){let lt=he.typeParameters.params[0];lt.constraint||this.raise(ye.SingleTypeParameterWithoutTrailingComma,this.optionFlags&256?A(lt.loc.end,1):lt,{typeParameterName:lt.name.name})}return he},S);if(!X.error&&!X.aborted)return Q&&this.reportReservedArrowTypeParam(Q),X.node;if(!k&&(yq(!this.hasPlugin("jsx")),O=this.tryParse(()=>super.parseMaybeAssign(m,x),S),!O.error))return O.node;if(k?.node)return this.state=k.failState,k.node;if(X.node)return this.state=X.failState,Q&&this.reportReservedArrowTypeParam(Q),X.node;if(O?.node)return this.state=O.failState,O.node;throw k?.error||X.error||O?.error}reportReservedArrowTypeParam(m){m.params.length===1&&!m.params[0].constraint&&!m.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ye.ReservedArrowTypeParam,m)}parseMaybeUnary(m,x){return!this.hasPlugin("jsx")&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(m,x)}parseArrow(m){if(this.match(10)){let x=this.tryParse(S=>{let k=this.tsParseTypeOrTypePredicateAnnotation(10);return(this.canInsertSemicolon()||!this.match(15))&&S(),k});if(x.aborted)return;x.thrown||(x.error&&(this.state=x.failState),m.returnType=x.node)}return super.parseArrow(m)}parseFunctionParamType(m){this.eat(13)&&(m.optional=!0);let x=this.tsTryParseTypeAnnotation();return x&&(m.typeAnnotation=x),this.resetEndLocation(m),m}isAssignable(m,x){switch(m.type){case"TSTypeCastExpression":return this.isAssignable(m.expression,x);case"TSParameterProperty":return!0;default:return super.isAssignable(m,x)}}toAssignable(m,x=!1){switch(m.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(m,x);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":x?this.expressionScope.recordArrowParameterBindingError(ye.UnexpectedTypeCastInParameter,m):this.raise(ye.UnexpectedTypeCastInParameter,m),this.toAssignable(m.expression,x);break;case"AssignmentExpression":!x&&m.left.type==="TSTypeCastExpression"&&(m.left=this.typeCastToParameter(m.left));default:super.toAssignable(m,x)}}toAssignableParenthesizedExpression(m,x){switch(m.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(m.expression,x);break;default:super.toAssignable(m,x)}}checkToRestConversion(m,x){switch(m.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(m.expression,!1);break;default:super.checkToRestConversion(m,x)}}isValidLVal(m,x,S,k){switch(m){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(k!==64||!S)&&["expression",!0];default:return super.isValidLVal(m,x,S,k)}}parseBindingAtom(){return this.state.type===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(m,x){if(this.match(43)||this.match(47)){let S=this.tsParseTypeArgumentsInExpression();if(this.match(6)){let k=super.parseMaybeDecoratorArguments(m,x);return k.typeArguments=S,k}this.unexpected(null,6)}return super.parseMaybeDecoratorArguments(m,x)}checkCommaAfterRest(m){return this.state.isAmbientContext&&this.match(8)&&this.lookaheadCharCode()===m?(this.next(),!1):super.checkCommaAfterRest(m)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(31)||this.match(10)||super.isClassProperty()}parseMaybeDefault(m,x){let S=super.parseMaybeDefault(m,x);return S.type==="AssignmentPattern"&&S.typeAnnotation&&S.right.startthis.isAssignable(x,!0)):super.shouldParseArrow(m)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(m){let x=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;let S=super.parseParenAndDistinguishExpression(m);return this.state.inConditionalConsequent=x,S}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(m){if(this.match(43)||this.match(47)){let x=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());x&&(m.typeArguments=x)}return super.jsxParseOpeningElementAfterName(m)}getGetterSetterExpectedParamCount(m){let x=super.getGetterSetterExpectedParamCount(m),S=this.getObjectOrClassMethodParams(m)[0];return S&&this.isThisParam(S)?x+1:x}parseCatchClauseParam(){let m=super.parseCatchClauseParam(),x=this.tsTryParseTypeAnnotation();return x&&(m.typeAnnotation=x,this.resetEndLocation(m)),m}tsInAmbientContext(m){let{isAmbientContext:x,strict:S}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return m()}finally{this.state.isAmbientContext=x,this.state.strict=S}}parseClass(m,x,S){let k=this.state.inAbstractClass;this.state.inAbstractClass=!!m.abstract;try{return super.parseClass(m,x,S)}finally{this.state.inAbstractClass=k}}tsParseAbstractDeclaration(m,x){if(this.match(76))return m.abstract=!0,this.maybeTakeDecorators(x,this.parseClass(m,!0,!1));if(this.isContextual(125))return this.hasFollowingLineBreak()?null:(m.abstract=!0,this.raise(ye.NonClassMethodPropertyHasAbstractModifier,m),this.tsParseInterfaceDeclaration(m));throw this.unexpected(null,76)}parseMethod(m,x,S,k,O,Q,X){let ge=super.parseMethod(m,x,S,k,O,Q,X);if((ge.abstract||ge.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?ge.value:ge).body){let{key:he}=ge;this.raise(ye.AbstractMethodHasImplementation,ge,{methodName:he.type==="Identifier"&&!ge.computed?he.name:`[${this.input.slice(this.offsetToSourcePos(he.start),this.offsetToSourcePos(he.end))}]`})}return ge}tsParseTypeParameterName(){return this.parseIdentifier()}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(m,x,S,k){return!x&&k?(this.parseTypeOnlyImportExportSpecifier(m,!1,S),this.finishNode(m,"ExportSpecifier")):(m.exportKind="value",super.parseExportSpecifier(m,x,S,k))}parseImportSpecifier(m,x,S,k,O){return!x&&k?(this.parseTypeOnlyImportExportSpecifier(m,!0,S),this.finishNode(m,"ImportSpecifier")):(m.importKind="value",super.parseImportSpecifier(m,x,S,k,S?4098:4096))}parseTypeOnlyImportExportSpecifier(m,x,S){let k=x?"imported":"local",O=x?"local":"exported",Q=m[k],X,ge=!1,he=!0,lt=Q.start;if(this.isContextual(89)){let ji=this.parseIdentifier();if(this.isContextual(89)){let Yn=this.parseIdentifier();lr(this.state.type)?(ge=!0,Q=ji,X=x?this.parseIdentifier():this.parseModuleExportName(),he=!1):(X=Yn,he=!1)}else lr(this.state.type)?(he=!1,X=x?this.parseIdentifier():this.parseModuleExportName()):(ge=!0,Q=ji)}else lr(this.state.type)&&(ge=!0,x?(Q=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(Q.name,Q.start,!0,!0)):Q=this.parseModuleExportName());ge&&S&&this.raise(x?ye.TypeModifierIsUsedInTypeImports:ye.TypeModifierIsUsedInTypeExports,lt),m[k]=Q,m[O]=X;let Ot=x?"importKind":"exportKind";m[Ot]=ge?"type":"value",he&&this.eatContextual(89)&&(m[O]=x?this.parseIdentifier():this.parseModuleExportName()),m[O]||(m[O]=this.cloneIdentifier(m[k])),x&&this.checkIdentifier(m[O],ge?4098:4096)}fillOptionalPropertiesForTSESLint(m){switch(m.type){case"ExpressionStatement":m.directive??(m.directive=void 0);return;case"RestElement":m.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":m.decorators??(m.decorators=[]),m.optional??(m.optional=!1),m.typeAnnotation??(m.typeAnnotation=void 0);return;case"TSParameterProperty":m.accessibility??(m.accessibility=void 0),m.decorators??(m.decorators=[]),m.override??(m.override=!1),m.readonly??(m.readonly=!1),m.static??(m.static=!1);return;case"TSEmptyBodyFunctionExpression":m.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":m.declare??(m.declare=!1),m.returnType??(m.returnType=void 0),m.typeParameters??(m.typeParameters=void 0);return;case"Property":m.optional??(m.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":m.optional??(m.optional=!1);case"TSIndexSignature":m.accessibility??(m.accessibility=void 0),m.readonly??(m.readonly=!1),m.static??(m.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":m.declare??(m.declare=!1),m.definite??(m.definite=!1),m.readonly??(m.readonly=!1),m.typeAnnotation??(m.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":m.accessibility??(m.accessibility=void 0),m.decorators??(m.decorators=[]),m.override??(m.override=!1),m.optional??(m.optional=!1);return;case"ClassExpression":m.id??(m.id=null);case"ClassDeclaration":m.abstract??(m.abstract=!1),m.declare??(m.declare=!1),m.decorators??(m.decorators=[]),m.implements??(m.implements=[]),m.superTypeArguments??(m.superTypeArguments=void 0),m.typeParameters??(m.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":m.declare??(m.declare=!1);return;case"VariableDeclarator":m.definite??(m.definite=!1);return;case"TSEnumDeclaration":m.const??(m.const=!1),m.declare??(m.declare=!1);return;case"TSEnumMember":m.computed??(m.computed=!1);return;case"TSImportType":m.qualifier??(m.qualifier=null),m.options??(m.options=null),m.typeArguments??(m.typeArguments=null);return;case"TSInterfaceDeclaration":m.declare??(m.declare=!1),m.extends??(m.extends=[]);return;case"TSMappedType":m.optional??(m.optional=!1),m.readonly??(m.readonly=void 0);return;case"TSModuleDeclaration":m.declare??(m.declare=!1),m.global??(m.global=m.kind==="global");return;case"TSTypeParameter":m.const??(m.const=!1),m.in??(m.in=!1),m.out??(m.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(m,x){if(Z(m)){if(Aq.lastIndex=x,Aq.test(this.input)){let S=this.codePointAtPos(Aq.lastIndex);if(!ie(S)&&S!==92)return!1}return!0}else return m===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let m=this.nextTokenInLineStart(),x=this.codePointAtPos(m);return this.chStartsBindingIdentifierAndNotRelationalOperator(x,m)}nextTokenIsStringLiteralOnSameLine(){let m=this.nextTokenInLineStart(),x=this.codePointAtPos(m);return x===34||x===39}};function Cq(b){if(b.type!=="MemberExpression")return!1;let{computed:m,property:x}=b;return m&&x.type!=="StringLiteral"&&(x.type!=="TemplateLiteral"||x.expressions.length>0)?!1:_q(b.object)}function lw(b,m){let{type:x}=b;if(b.extra?.parenthesized)return!1;if(m){if(x==="Literal"){let{value:S}=b;if(typeof S=="string"||typeof S=="boolean")return!0}}else if(x==="StringLiteral"||x==="BooleanLiteral")return!0;return!!(hl(b,m)||Yve(b,m)||x==="TemplateLiteral"&&b.expressions.length===0||Cq(b))}function hl(b,m){return m?b.type==="Literal"&&(typeof b.value=="number"||"bigint"in b):b.type==="NumericLiteral"||b.type==="BigIntLiteral"}function Yve(b,m){if(b.type==="UnaryExpression"){let{operator:x,argument:S}=b;if(x==="-"&&hl(S,m))return!0}return!1}function _q(b){return b.type==="Identifier"?!0:b.type!=="MemberExpression"||b.computed?!1:_q(b.object)}var Kve={ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."},zT=U`placeholders`(Kve),Jve=b=>class extends b{parsePlaceholder(m){if(this.match(129)){let x=this.startNode();return this.next(),this.assertNoSpace(),x.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(129),this.finishPlaceholder(x,m)}}finishPlaceholder(m,x){let S=m;return(!S.expectedNode||!S.type)&&(S=this.finishNode(S,"Placeholder")),S.expectedNode=x,S}getTokenFromCode(m){m===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(129,2):super.getTokenFromCode(m)}parseExprAtom(m){return this.parsePlaceholder("Expression")||super.parseExprAtom(m)}parseIdentifier(m){return this.parsePlaceholder("Identifier")||super.parseIdentifier(m)}checkReservedWord(m,x,S,k){m!==void 0&&super.checkReservedWord(m,x,S,k)}cloneIdentifier(m){let x=super.cloneIdentifier(m);return x.type==="Placeholder"&&(x.expectedNode=m.expectedNode),x}cloneStringLiteral(m){return m.type==="Placeholder"?this.cloneIdentifier(m):super.cloneStringLiteral(m)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(m,x,S,k){return m==="Placeholder"||super.isValidLVal(m,x,S,k)}toAssignable(m,x){m&&m.type==="Placeholder"&&m.expectedNode==="Expression"?m.expectedNode="Pattern":super.toAssignable(m,x)}chStartsBindingIdentifier(m,x){if(super.chStartsBindingIdentifier(m,x))return!0;let S=this.nextTokenStart();return this.input.charCodeAt(S)===37&&this.input.charCodeAt(S+1)===37}verifyBreakContinue(m,x){m.label?.type!=="Placeholder"&&super.verifyBreakContinue(m,x)}parseExpressionStatement(m,x){if(x.type!=="Placeholder"||x.extra?.parenthesized)return super.parseExpressionStatement(m,x);if(this.match(10)){let k=m;return k.label=this.finishPlaceholder(x,"Identifier"),this.next(),k.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(k,"LabeledStatement")}this.semicolon();let S=m;return S.name=x.name,this.finishPlaceholder(S,"Statement")}parseBlock(m,x,S){return this.parsePlaceholder("BlockStatement")||super.parseBlock(m,x,S)}parseFunctionId(m){return this.parsePlaceholder("Identifier")||super.parseFunctionId(m)}parseClass(m,x,S){let k=x?"ClassDeclaration":"ClassExpression";this.next();let O=this.state.strict,Q=this.parsePlaceholder("Identifier");if(Q)if(this.match(77)||this.match(129)||this.match(2))m.id=Q;else{if(S||!x)return m.id=null,m.body=this.finishPlaceholder(Q,"ClassBody"),this.finishNode(m,k);throw this.raise(zT.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(m,x,S);return super.parseClassSuper(m),m.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!m.superClass,O),this.finishNode(m,k)}parseExport(m,x){let S=this.parsePlaceholder("Identifier");if(!S)return super.parseExport(m,x);let k=m;if(!this.isContextual(94)&&!this.match(8))return k.specifiers=[],k.source=null,k.declaration=this.finishPlaceholder(S,"Declaration"),this.finishNode(k,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let O=this.startNode();return O.exported=S,k.specifiers=[this.finishNode(O,"ExportDefaultSpecifier")],super.parseExport(k,x)}isExportDefaultSpecifier(){if(this.match(61)){let m=this.nextTokenStart();if(this.isUnparsedContextual(m,"from")&&this.input.startsWith(cs(129),this.nextTokenStartSince(m+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(m,x){return m.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(m,x)}checkExport(m){let{specifiers:x}=m;x?.length&&(m.specifiers=x.filter(S=>S.exported.type==="Placeholder")),super.checkExport(m),m.specifiers=x}parseImport(m){let x=this.parsePlaceholder("Identifier");if(!x)return super.parseImport(m);if(m.specifiers=[],!this.isContextual(94)&&!this.match(8))return m.source=this.finishPlaceholder(x,"StringLiteral"),this.semicolon(),this.finishNode(m,"ImportDeclaration");let S=this.startNodeAtNode(x);return S.local=x,m.specifiers.push(this.finishNode(S,"ImportDefaultSpecifier")),this.eat(8)&&(this.maybeParseStarImportSpecifier(m)||this.parseNamedImportSpecifiers(m)),this.expectContextual(94),m.source=this.parseImportSource(),this.semicolon(),this.finishNode(m,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(zT.UnexpectedSpace,this.state.lastTokEndLoc)}},Xve=b=>class extends b{parseV8Intrinsic(){if(this.match(50)){let m=this.state.startLoc,x=this.startNode();if(this.next(),Ut(this.state.type)){let S=this.parseIdentifierName(),k=this.createIdentifier(x,S);if(this.castNodeTo(k,"V8IntrinsicIdentifier"),this.match(6))return k}this.unexpected(m)}}parseExprAtom(m){return this.parseV8Intrinsic()||super.parseExprAtom(m)}},Sq=["fsharp","hack"],l5=["^^","@@","^","%","#"];function VT(b){if(b.has("decorators")&&b.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");if(b.has("flow")&&b.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(b.has("placeholders")&&b.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(b.has("pipelineOperator")){let m=b.get("pipelineOperator").proposal;if(!Sq.includes(m)){let x=Sq.map(S=>`"${S}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${x}.`)}if(m==="hack"){if(b.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(b.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let x=b.get("pipelineOperator").topicToken;if(!l5.includes(x)){let S=l5.map(k=>`"${k}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${S}.`)}}}if(b.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(b.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead.");if(b.has("deprecatedImportAssert")?console.warn("`deprecatedImportAssert` has been removed in Babel 8, please use import attributes instead."):b.has("importAttributes")&&b.get("importAttributes").deprecatedAssertSyntax&&console.warn("The 'importAttributes' plugin has been removed in Babel 8. Please migrate any usage of `assert`-style attributes to `with`."),b.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(b.has("asyncDoExpressions")&&!b.has("doExpressions")){let m=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw m.missingPlugins="doExpressions",m}if(b.has("optionalChainingAssign")&&b.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(b.has("discardBinding")&&b.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");if(b.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(b.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}var Eq={estree:le,jsx:Cve,flow:Bc,typescript:xq,v8intrinsic:Xve,placeholders:Jve},Zve=Object.keys(Eq),Dq=class extends jQe{constructor(b,m,x){let S=ce(b);super(S,m),this.options=S,this.initializeScopes(),this.plugins=x,this.filename=S.sourceFilename,this.startIndex=S.startIndex;let k=0;S.allowAwaitOutsideFunction&&(k|=1),S.allowReturnOutsideFunction&&(k|=2),S.allowImportExportEverywhere&&(k|=8),S.allowSuperOutsideMethod&&(k|=16),S.allowUndeclaredExports&&(k|=64),S.allowNewTargetOutsideFunction&&(k|=4),S.allowYieldOutsideFunction&&(k|=32),S.ranges&&(k|=128),S.locations===!0&&(k|=256),S.tokens&&(k|=512),S.createImportExpressions&&(k|=1024),S.createParenthesizedExpressions&&(k|=2048),S.errorRecovery&&(k|=4096),S.attachComment&&(k|=8192),S.annexB&&(k|=16384),this.optionFlags=k}getScopeHandler(){return ed}parse(){this.enterInitialScopes();let b=this.startNode(),m=this.startNode();this.nextToken(),b.errors=[];let x=this.parseTopLevel(b,m);return x.errors=this.state.errors,x.comments.length=this.state.commentsLen,x}};function c5(b,m){if(m?.sourceType==="unambiguous"){m={...m};try{m.sourceType="module";let x=m_(m,b),S=x.parse();if(x.sawUnambiguousESM)return S;if(x.ambiguousScriptDifferentAst)try{return m.sourceType="script",m_(m,b).parse()}catch{}else S.program.sourceType="script";return S}catch(x){try{return m.sourceType="script",m_(m,b).parse()}catch{}throw x}}else return m_(m,b).parse()}function u5(b,m){let x=m_(m,b);return x.options.strictMode&&(x.state.strict=!0),x.getExpression()}function $ve(b){let m={};for(let x of Object.keys(b))m[x]=Zr(b[x]);return m}var GQe=$ve(Ti);function m_(b,m){let x=Dq,S=new Map;if(b?.plugins){for(let k of b.plugins){let O,Q;typeof k=="string"?O=k:[O,Q]=k,S.has(O)||S.set(O,Q||{})}VT(S),x=xM(S)}return new x(b,m,S)}var Tq=new Map;function xM(b){let m=[];for(let k of Zve)b.has(k)&&m.push(k);let x=m.join("|"),S=Tq.get(x);if(!S){S=Dq;for(let k of m)S=Eq[k](S);Tq.set(x,S)}return S}function HT(b){return(m,x,S)=>{if(x===!1)return!1;let k=!!S?.backwards,{length:O}=m,Q=x;for(;Q>=0&&Qb===` -`||b==="\r"||b==="\u2028"||b==="\u2029";function rAe(b,m,x){if(m===!1)return!1;let S=!!x?.backwards,k=b.charAt(m);if(S){if(b.charAt(m-1)==="\r"&&k===` -`)return m-2;if(kq(k))return m-1}else{if(k==="\r"&&b.charAt(m+1)===` -`)return m+2;if(kq(k))return m+1}return m}var P=rAe;function Y(b,m){return m===!1?!1:b.charAt(m)==="/"&&b.charAt(m+1)==="/"?tAe(b,m):m}var ee=Y;function Ae(b,m){let x=null,S=m;for(;S!==x;)x=S,S=eAe(b,S),S=nAe(b,S),S=ee(b,S),S=P(b,S);return S}var ue=Ae;function ot(b){let m=[];for(let x of b)try{return x()}catch(S){m.push(S)}throw Object.assign(new Error("All combinations failed"),{errors:m})}function on(b){if(!b.startsWith("#!"))return"";let m=b.indexOf(` -`);return m===-1?b:b.slice(0,m)}var us=on,lc=Array.prototype.findLast??function(b){for(let m=this.length-1;m>=0;m--){let x=this[m];if(b(x,m,this))return x}},zc=c("findLast",function(){if(Array.isArray(this))return lc}),gA=zc,cw=Symbol.for("comments");function CM(b){return this[b<0?this.length+b:b]}var WT=c("at",function(){if(Array.isArray(this)||typeof this=="string")return CM}),bA=WT;function Nm(b){let m=new Set(b);return x=>m.has(x?.type)}function _p(b){return b.range?.[1]??b.end}function sb(b){let m=b.range?.[0]??b.start,x=(b.declaration?.decorators??b.decorators)?.[0];return x?Math.min(sb(x),m):m}var W9t=5,U9t=8,j9t=8,KQe=b=>m=>m.label?Mm(m.label):sb(m)+b,Q9t=b=>b.__contentEnd??_p(b),JQe=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],G9t=new Map([["BreakStatement",KQe(W9t)],["ContinueStatement",KQe(U9t)],["DebuggerStatement",b=>sb(b)+j9t],["VariableDeclaration",b=>Mm(bA(0,b.declarations,-1))],...JQe.map(b=>[b,Q9t])]),q9t=Nm(JQe);function Mm(b){let{type:m}=b;return m==="IfStatement"?Mm(b.alternate??b.consequent):m==="ForInStatement"||m==="ForOfStatement"||m==="ForStatement"||m==="LabeledStatement"||m==="WithStatement"||m==="WhileStatement"?Mm(b.body):G9t.get(m)?.(b)??_p(b)}var oAe=Nm(["Block","CommentBlock","MultiLine"]),Y9t=Nm(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function sAe(b,m,x){if(!b.has(m)){let S=x(m);b.set(m,S)}return b.get(m)}var K9t=new WeakMap;function J9t(b){return sAe(K9t,b,m=>oAe(m)&&m.value[0]==="*"&&/@(?:type|satisfies)\b/.test(m.value))}function X9t(b){return h(0,b,/[^\n]/g," ")}var Z9t=X9t;function $9t(b,m){for(let x of m){let S=sb(x),k=Mm(x);b=b.slice(0,S)+Z9t(b.slice(S,k))+b.slice(k)}return b}var e7t=new WeakMap;function t7t(b){let m=b[cw];return sAe(e7t,m,x=>$9t(b.originalText,x))}function i7t(b){if(!oAe(b))return[];if(!b.value.includes(` +`):S=String.fromCharCode(x),++this.state.curLine,this.state.lineStart=this.state.pos,S}jsxReadString(m){let x="",S=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(M.UnterminatedString,this.state.startLoc);let k=this.input.charCodeAt(this.state.pos);if(k===m)break;k===38?(x+=this.input.slice(S,this.state.pos),x+=this.jsxReadEntity(),S=this.state.pos):F_(k)?(x+=this.input.slice(S,this.state.pos),x+=this.jsxReadNewLine(!1),S=this.state.pos):++this.state.pos}x+=this.input.slice(S,this.state.pos++),this.finishToken(130,x)}jsxReadEntity(){let m=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let x=10;this.codePointAtPos(this.state.pos)===120&&(x=16,++this.state.pos);let S=this.readInt(x,void 0,!1,"bail");if(S!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(S)}else{let x=0,S=!1;for(;x++<10&&this.state.pos=2&&b[b.length-1].flags===0&&(b[b.length-2].flags&2048)>0}importsStack=[];createScope(b){return this.importsStack.push(new Set),new Hve(b)}enter(b){b&3072&&this.importsStack.push(new Set),super.enter(b)}exit(){let b=super.exit();return b&3072&&this.importsStack.pop(),b}hasImport(b,m){let x=this.importsStack.length;if(this.importsStack[x-1].has(b))return!0;if(!m&&x>1){for(let S=0;S0){if(x&256){let k=(x&512)>0,O=(S&4)>0;return k!==O}return!0}return x&128&&(S&8)>0?b.names.get(m)&2?!!(x&1):!1:x&2&&(S&1)>0?!0:super.isRedeclaredInScope(b,m,x)}checkLocalExport(b){let{name:m}=b;if(this.hasImport(m))return;let x=this.scopeStack.length;for(let S=x-1;S>=0;S--){let k=this.scopeStack[S].tsNames.get(m);if((k&1)>0||(k&16)>0)return}super.checkLocalExport(b)}},Uve=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(b){return b+this.startIndex}offsetToSourcePos(b){return b-this.startIndex}hasPlugin(b){if(typeof b=="string")return this.plugins.has(b);{let[m,x]=b;if(!this.hasPlugin(m))return!1;let S=this.plugins.get(m);for(let k of Object.keys(x))if(S?.[k]!==x[k])return!1;return!0}}getPluginOption(b,m){return this.plugins.get(b)?.[m]}};function VY(b,m){b.trailingComments===void 0?b.trailingComments=m:b.trailingComments.unshift(...m)}function jve(b,m){b.leadingComments===void 0?b.leadingComments=m:b.leadingComments.unshift(...m)}function rk(b,m){b.innerComments===void 0?b.innerComments=m:b.innerComments.unshift(...m)}function Fv(b,m,x){let S=null,k=m.length;for(;S===null&&k>0;)S=m[--k];S===null||S.start>x.start?rk(b,x.comments):VY(S,x.comments)}var Qve=class extends Uve{addComment(b){this.filename&&(b.loc.filename=this.filename);let{commentsLen:m}=this.state;this.comments.length!==m&&(this.comments.length=m),this.comments.push(b),this.state.commentsLen++}processComment(b){let{commentStack:m}=this.state,x=m.length;if(x===0)return;let S=x-1,k=m[S];k.start===b.end&&(k.leadingNode=b,S--);let O=b.start;for(;S>=0;S--){let G=m[S],ie=G.end;if(ie>O)G.containingNode=b,this.finalizeComment(G),m.splice(S,1);else{ie===O&&(G.trailingNode=b);break}}}finalizeComment(b){let{comments:m}=b;if(b.leadingNode!==null||b.trailingNode!==null)b.leadingNode!==null&&VY(b.leadingNode,m),b.trailingNode!==null&&jve(b.trailingNode,m);else{let x=b.containingNode,S=b.start;if(this.input.charCodeAt(this.offsetToSourcePos(S)-1)===44)switch(x.type){case"ObjectExpression":case"ObjectPattern":Fv(x,x.properties,b);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":Fv(x,x.arguments,b);break;case"ImportExpression":Fv(x,[x.source,x.options??null],b);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":Fv(x,x.params,b);break;case"ArrayExpression":case"ArrayPattern":Fv(x,x.elements,b);break;case"ExportNamedDeclaration":case"ImportDeclaration":Fv(x,x.specifiers,b);break;case"TSEnumBody":Fv(x,x.members,b);break;case"TSInterfaceBody":Fv(x,x.body,b);break;default:rk(x,m)}else rk(x,m)}}finalizeRemainingComments(){let{commentStack:b}=this.state;for(let m=b.length-1;m>=0;m--)this.finalizeComment(b[m]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(b){let{commentStack:m}=this.state,{length:x}=m;if(x===0)return;let S=m[x-1];S.leadingNode===b&&(S.leadingNode=null)}takeSurroundingComments(b,m,x){let{commentStack:S}=this.state,k=S.length;if(k===0)return;let O=k-1;for(;O>=0;O--){let G=S[O],ie=G.end;if(G.start===x)G.leadingNode=b;else if(ie===m)G.trailingNode=b;else if(ie0}set strict(m){m?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:m,sourceType:x,startIndex:S,startLine:k,startColumn:O}){this.strict=m===!1?!1:m===!0?!0:x==="module",this.startIndex=S,this.curLine=k,this.lineStart=-O,this.startLoc=this.endLoc=new g(k,O,S)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];get canStartArrow(){return(this.flags&2)>0}set canStartArrow(m){m?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(m){m?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(m){m?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(m){m?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(m){m?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(m){m?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(m){m?this.flags|=128:this.flags&=-129}get inConditionalConsequent(){return(this.flags&256)>0}set inConditionalConsequent(m){m?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(this.flags&512)>0}set inHackPipelineBody(m){m?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(this.flags&1024)>0}set seenTopicReference(m){m?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[_o.brace];get canStartJSXElement(){return(this.flags&2048)>0}set canStartJSXElement(m){m?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(this.flags&4096)>0}set containsEsc(m){m?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&8192)>0}set hasTopLevelAwait(m){m?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new g(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let m=new Snt;return m.flags=this.flags,m.startIndex=this.startIndex,m.curLine=this.curLine,m.lineStart=this.lineStart,m.startLoc=this.startLoc,m.endLoc=this.endLoc,m.errors=this.errors.slice(),m.noArrowAt=this.noArrowAt.slice(),m.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),m.labels=this.labels.slice(),m.commentsLen=this.commentsLen,m.commentStack=this.commentStack.slice(),m.pos=this.pos,m.type=this.type,m.value=this.value,m.start=this.start,m.end=this.end,m.lastTokEndLoc=this.lastTokEndLoc,m.lastTokStartLoc=this.lastTokStartLoc,m.context=this.context.slice(),m.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,m.strictErrors=this.strictErrors,m.tokensLength=this.tokensLength,m}},qve=function(b){return b>=48&&b<=57},HY={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},$M={bin:b=>b===48||b===49,oct:b=>b>=48&&b<=55,dec:b=>b>=48&&b<=57,hex:b=>b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102};function WY(b,m,x,S,k,O){let G=x,ie=S,be=k,pe="",lt=null,Mt=x,{length:Ui}=m;for(;;){if(x>=Ui){O.unterminated(G,ie,be),pe+=m.slice(Mt,x);break}let Zn=m.charCodeAt(x);if(Yve(b,Zn,m,x)){pe+=m.slice(Mt,x);break}if(Zn===92){pe+=m.slice(Mt,x);let Gc=Kve(m,x,S,k,b==="template",O);Gc.ch===null&&!lt?lt={pos:x,lineStart:S,curLine:k}:pe+=Gc.ch,{pos:x,lineStart:S,curLine:k}=Gc,Mt=x}else Zn===8232||Zn===8233?(++x,++k,S=x):Zn===10||Zn===13?b==="template"?(pe+=m.slice(Mt,x)+` +`,++x,Zn===13&&m.charCodeAt(x)===10&&++x,++k,Mt=S=x):O.unterminated(G,ie,be):++x}return{pos:x,str:pe,firstInvalidLoc:lt,lineStart:S,curLine:k}}function Yve(b,m,x,S){return b==="template"?m===96||m===36&&x.charCodeAt(S+1)===123:m===(b==="double"?34:39)}function Kve(b,m,x,S,k,O){let G=!k;m++;let ie=pe=>({pos:m,ch:pe,lineStart:x,curLine:S}),be=b.charCodeAt(m++);switch(be){case 110:return ie(` +`);case 114:return ie("\r");case 120:{let pe;return{code:pe,pos:m}=K5(b,m,x,S,2,!1,G,O),ie(pe===null?null:String.fromCharCode(pe))}case 117:{let pe;return{code:pe,pos:m}=jY(b,m,x,S,G,O),ie(pe===null?null:String.fromCodePoint(pe))}case 116:return ie(" ");case 98:return ie("\b");case 118:return ie("\v");case 102:return ie("\f");case 13:b.charCodeAt(m)===10&&++m;case 10:x=m,++S;case 8232:case 8233:return ie("");case 56:case 57:if(k)return ie(null);O.strictNumericEscape(m-1,x,S);default:if(be>=48&&be<=55){let pe=m-1,lt=/^[0-7]+/.exec(b.slice(pe,m+2))[0],Mt=parseInt(lt,8);Mt>255&&(lt=lt.slice(0,-1),Mt=parseInt(lt,8)),m+=lt.length-1;let Ui=b.charCodeAt(m);if(lt!=="0"||Ui===56||Ui===57){if(k)return ie(null);O.strictNumericEscape(pe,x,S)}return ie(String.fromCharCode(Mt))}return ie(String.fromCharCode(be))}}function K5(b,m,x,S,k,O,G,ie){let be=m,pe;return{n:pe,pos:m}=UY(b,m,x,S,16,k,O,!1,ie,!G),pe===null&&(G?ie.invalidEscapeSequence(be,x,S):m=be-1),{code:pe,pos:m}}function UY(b,m,x,S,k,O,G,ie,be,pe){let lt=m,Mt=k===16?HY.hex:HY.decBinOct,Ui=k===16?$M.hex:k===10?$M.dec:k===8?$M.oct:$M.bin,Zn=!1,Gc=0;for(let Yd=0,fc=O??1/0;Yd=97?Km=pc-97+10:pc>=65?Km=pc-65+10:qve(pc)?Km=pc-48:Km=1/0,Km>=k){if(Km<=9&&pe)return{n:null,pos:m};if(Km<=9&&be.invalidDigit(m,x,S,k))Km=0;else if(G)Km=0,Zn=!0;else break}++m,Gc=Gc*k+Km}return m===lt||O!=null&&m-lt!==O||Zn?{n:null,pos:m}:{n:Gc,pos:m}}function jY(b,m,x,S,k,O){let G=b.charCodeAt(m),ie;if(G===123){if(++m,{code:ie,pos:m}=K5(b,m,x,S,b.indexOf("}",m)-m,!0,k,O),++m,ie!==null&&ie>1114111)if(k)O.invalidCodePoint(m,x,S);else return{code:null,pos:m}}else({code:ie,pos:m}=K5(b,m,x,S,4,!1,k,O));return{code:ie,pos:m}}function sk(b,m,x){return new g(x,b-m,b)}var Jve=new Set([103,109,115,105,121,117,100,118]),Xve=class{constructor(b){let m=b.startIndex||0;this.type=b.type,this.value=b.value,this.start=m+b.start,this.end=m+b.end,this.loc=new A(b.startLoc,b.endLoc)}},eR,Zve=class extends Qve{isLookahead;tokens=[];constructor(b,m){super(),this.state=new Gve,this.state.init(b),this.input=m,this.length=m.length,this.comments=[],this.isLookahead=!1,(!eR||eR.length<(this.length+1)*2)&&(eR=new Uint32Array((this.length+1)*2)),this.locData=eR}setLoc(b){let m=this.offsetToSourcePos(b.index);this.locData[m*2]=b.line,this.locData[m*2+1]=b.column}getLoc(b){let m=this.offsetToSourcePos(b);return new g(this.locData[m*2],this.locData[m*2+1],b)}pushToken(b){this.tokens.length=this.state.tokensLength,this.tokens.push(b),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new Xve(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(b){return this.match(b)?(this.next(),!0):!1}match(b){return this.state.type===b}createLookaheadState(b){return{pos:b.pos,value:null,type:b.type,start:b.start,end:b.end,context:[this.curContext()],inType:b.inType,startLoc:b.startLoc,lastTokEndLoc:b.lastTokEndLoc,curLine:b.curLine,lineStart:b.lineStart,curPosition:b.curPosition}}lookahead(){let b=this.state;this.state=this.createLookaheadState(b),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let m=this.state;return this.state=b,m}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(b){return q5.lastIndex=b,q5.test(this.input)?q5.lastIndex:b}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(b){return this.input.charCodeAt(this.nextTokenStartSince(b))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(b){return Y5.lastIndex=b,Y5.test(this.input)?Y5.lastIndex:b}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(b){let m=this.input.charCodeAt(b);if((m&64512)===55296&&++bthis.raise(m,x)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(b){let m;this.isLookahead||(m=this.state.curPosition());let x=this.state.pos,S=this.input.indexOf(b,x+2);if(S===-1)throw this.raise(M.UnterminatedComment,this.state.curPosition());for(this.state.pos=S+b.length,_w.lastIndex=x+2;_w.test(this.input)&&_w.lastIndex<=S;)++this.state.curLine,this.state.lineStart=_w.lastIndex;if(this.isLookahead)return;let k={type:"CommentBlock",value:this.input.slice(x+2,S),start:this.sourceToOffsetPos(x),end:this.sourceToOffsetPos(S+b.length),loc:new A(m,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(k),k}skipLineComment(b){let m=this.state.pos,x;this.isLookahead||(x=this.state.curPosition());let S=this.input.charCodeAt(this.state.pos+=b);if(this.state.posb)){let k=this.skipLineComment(3);k!==void 0&&(this.addComment(k),m?.push(k))}else break e}else if(x===60&&!this.inModule&&this.optionFlags&16384){let S=this.state.pos;if(this.input.charCodeAt(S+1)===33&&this.input.charCodeAt(S+2)===45&&this.input.charCodeAt(S+3)===45){let k=this.skipLineComment(4);k!==void 0&&(this.addComment(k),m?.push(k))}else break e}else break e}}if(m?.length>0){let x=this.state.pos,S={start:this.sourceToOffsetPos(b),end:this.sourceToOffsetPos(x),comments:m,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(S)}}finishToken(b,m){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let x=this.state.type;this.state.type=b,this.state.value=m,this.isLookahead||this.updateContext(x)}replaceToken(b){this.state.type=b,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let b=this.state.pos+1,m=this.codePointAtPos(b);if(m>=48&&m<=57)throw this.raise(M.UnexpectedDigitAfterHash,this.state.curPosition());ne(m)?(++this.state.pos,this.finishToken(134,this.readWord1(m))):m===92?(++this.state.pos,this.finishToken(134,this.readWord1())):this.finishOp(23,1)}readToken_dot(){let b=this.input.charCodeAt(this.state.pos+1);if(b>=48&&b<=57){this.readNumber(!0);return}b===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(27,2):this.finishOp(52,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let b=this.input.charCodeAt(this.state.pos+1);if(b!==33)return!1;let m=this.state.pos;for(this.state.pos+=1;!F_(b)&&++this.state.pos=48&&m<=57)?(this.state.pos+=2,this.finishToken(14)):(++this.state.pos,this.finishToken(13))}getTokenFromCode(b){switch(b){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(6);return;case 41:++this.state.pos,this.finishToken(7);return;case 59:++this.state.pos,this.finishToken(9);return;case 44:++this.state.pos,this.finishToken(8);return;case 91:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(1);return;case 123:++this.state.pos,this.finishToken(2);return;case 125:++this.state.pos,this.finishToken(4);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(11,2):(++this.state.pos,this.finishToken(10));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let m=this.input.charCodeAt(this.state.pos+1);if(m===120||m===88){this.readRadixNumber(16);return}if(m===111||m===79){this.readRadixNumber(8);return}if(m===98||m===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(b);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(b);return;case 124:case 38:this.readToken_pipe_amp(b);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(b);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(b);return;case 126:this.finishOp(32,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(ne(b)){this.readWord(b);return}}throw this.raise(M.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(b)})}finishOp(b,m){let x=this.input.slice(this.state.pos,this.state.pos+m);this.state.pos+=m,this.finishToken(b,x)}readRegexp(){let b=this.state.startLoc,m=this.state.start+1,x,S,{pos:k}=this.state;for(;;++k){if(k>=this.length)throw this.raise(M.UnterminatedRegExp,v(b,1));let be=this.input.charCodeAt(k);if(F_(be))throw this.raise(M.UnterminatedRegExp,v(b,1));if(x)x=!1;else{if(be===91)S=!0;else if(be===93&&S)S=!1;else if(be===47&&!S)break;x=be===92}}let O=this.input.slice(m,k);++k;let G="",ie=()=>v(b,k+2-m);for(;k=2&&this.input.charCodeAt(m)===48;if(G){let lt=this.input.slice(m,this.state.pos);if(this.recordStrictModeErrors(M.StrictOctalLiteral,x),!this.state.strict){let Mt=lt.indexOf("_");Mt>0&&this.raise(M.ZeroDigitNumericSeparator,v(x,Mt))}O=G&&!/[89]/.test(lt)}let ie=this.input.charCodeAt(this.state.pos);ie===46&&!O&&(++this.state.pos,this.readInt(10),S=!0,ie=this.input.charCodeAt(this.state.pos)),(ie===69||ie===101)&&!O&&(ie=this.input.charCodeAt(++this.state.pos),(ie===43||ie===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(M.InvalidOrMissingExponent,x),S=!0,ie=this.input.charCodeAt(this.state.pos));let be=h(0,this.input.slice(m,this.state.pos),"_","");if(ie===110&&((S||G)&&this.raise(M.InvalidBigIntLiteral,x),++this.state.pos,k=!0),ne(this.codePointAtPos(this.state.pos)))throw this.raise(M.NumberIdentifier,this.state.curPosition());if(k){this.finishToken(132,be);return}let pe=O?parseInt(be,8):parseFloat(be);this.finishToken(131,pe)}readCodePoint(b){let{code:m,pos:x}=jY(this.input,this.state.pos,this.state.lineStart,this.state.curLine,b,this.errorHandlers_readCodePoint);return this.state.pos=x,m}readString(b){let{str:m,pos:x,curLine:S,lineStart:k}=WY(b===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=x+1,this.state.lineStart=k,this.state.curLine=S,this.finishToken(130,m)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let b=this.input[this.state.pos],{str:m,firstInvalidLoc:x,pos:S,curLine:k,lineStart:O}=WY("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=S+1,this.state.lineStart=O,this.state.curLine=k,x&&(this.state.firstInvalidTemplateEscapePos=new g(x.curLine,x.pos-x.lineStart,this.sourceToOffsetPos(x.pos))),this.input.codePointAt(S)===96?this.finishToken(20,x?null:b+m+"`"):(this.state.pos++,this.finishToken(21,x?null:b+m+"${"))}recordStrictModeErrors(b,m){let x=m.index;this.state.strict&&!this.state.strictErrors.has(x)?this.raise(b,m):this.state.strictErrors.set(x,[b,m])}readWord1(b){this.state.containsEsc=!1;let m="",x=this.state.pos,S=this.state.pos;for(b!==void 0&&(this.state.pos+=b<=65535?1:2);this.state.pos=0;G--){let ie=O[G];if(ie.pos===k)return O[G]=b(S,k,x);if(ie.posthis.hasPlugin(m)))throw this.raise(M.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:b})}errorBuilder(b){return(m,x,S)=>{this.raise(b,sk(m,x,S))}}errorHandlers_readInt={invalidDigit:(b,m,x,S)=>this.optionFlags&4096?(this.raise(M.InvalidDigit,sk(b,m,x),{radix:S}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(M.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(M.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(M.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(M.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(b,m,x)=>{this.recordStrictModeErrors(M.StrictNumericEscape,sk(b,m,x))},unterminated:(b,m,x)=>{throw this.raise(M.UnterminatedString,sk(b-1,m,x))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(M.StrictNumericEscape),unterminated:(b,m,x)=>{throw this.raise(M.UnterminatedTemplate,sk(b,m,x))}}},$ve=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},eye=class{parser;stack=[];constructor(b){this.parser=b}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new $ve)}exit(){let b=this.stack.pop(),m=this.current();for(let[x,S]of Array.from(b.undefinedPrivateNames))m?m.undefinedPrivateNames.has(x)||m.undefinedPrivateNames.set(x,S):this.parser.raise(M.InvalidPrivateFieldResolution,S,{identifierName:x})}declarePrivateName(b,m,x){let{privateNames:S,loneAccessors:k,undefinedPrivateNames:O}=this.current(),G=S.has(b);if(m&3){let ie=G&&k.get(b);if(ie){let be=ie&4,pe=m&4,lt=ie&3,Mt=m&3;G=lt===Mt||be!==pe,G||k.delete(b)}else G||k.set(b,m)}G&&this.parser.raise(M.PrivateNameRedeclaration,x,{identifierName:b}),S.add(b),O.delete(b)}usePrivateName(b,m){let x;for(x of this.stack)if(x.privateNames.has(b))return;x?x.undefinedPrivateNames.set(b,m):this.parser.raise(M.InvalidPrivateFieldResolution,m,{identifierName:b})}},tR=class{constructor(b=0){this.type=b}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},QY=class extends tR{declarationErrors=new Map;constructor(b){super(b)}recordDeclarationError(b,m){this.declarationErrors.set(m,b)}clearDeclarationError(b){this.declarationErrors.delete(b)}iterateErrors(b){this.declarationErrors.forEach(b)}},tye=class{parser;stack=[new tR];constructor(b){this.parser=b}enter(b){this.stack.push(b)}exit(){this.stack.pop()}recordParameterInitializerError(b,m){let{stack:x}=this,S=x.length-1,k=x[S];for(;!k.isCertainlyParameterDeclaration();){if(k.canBeArrowParameterDeclaration())k.recordDeclarationError(b,m);else return;k=x[--S]}this.parser.raise(b,m)}recordArrowParameterBindingError(b,m){let{stack:x}=this,S=x[x.length-1],k=m.start;if(S.isCertainlyParameterDeclaration())this.parser.raise(b,k);else if(S.canBeArrowParameterDeclaration())S.recordDeclarationError(b,k);else return}recordAsyncArrowParametersError(b){let{stack:m}=this,x=m.length-1,S=m[x];for(;S.canBeArrowParameterDeclaration();)S.type===2&&S.recordDeclarationError(M.AwaitBindingIdentifier,b),S=m[--x]}validateAsPattern(){let{stack:b}=this,m=b[b.length-1];m.canBeArrowParameterDeclaration()&&m.iterateErrors((x,S)=>{this.parser.raise(x,S);let k=b.length-2,O=b[k];for(;O.canBeArrowParameterDeclaration();)O.clearDeclarationError(S),O=b[--k]})}};function iye(){return new tR(3)}function nye(){return new QY(1)}function oye(){return new QY(2)}function J5(){return new tR}var rye=class{stacks=[];enter(b){this.stacks.push(b)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}get inFSharpPipelineDirectBody(){return(this.currentFlags()&16)===0}};function Z0(b,m){return(b?2:0)|(m?1:0)}var GY=class extends Zve{addExtra(b,m,x,S=!0){if(!b)return;let{extra:k}=b;k==null&&(k={},b.extra=k),S?k[m]=x:Object.defineProperty(k,m,{enumerable:S,value:x})}isContextual(b){return this.state.type===b&&!this.state.containsEsc}isUnparsedContextual(b,m){if(this.input.startsWith(m,b)){let x=this.input.charCodeAt(b+m.length);return!(le(x)||(x&64512)===55296)}return!1}isLookaheadContextual(b){let m=this.nextTokenStart();return this.isUnparsedContextual(m,b)}eatContextual(b){return this.isContextual(b)?(this.next(),!0):!1}expectContextual(b,m){if(!this.eatContextual(b)){if(m!=null)throw this.raise(m,this.state.startLoc);this.unexpected(null,b)}}canInsertSemicolon(){return this.match(135)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return zY(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return zY(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(9)||this.canInsertSemicolon()}semicolon(b=!0){(b?this.isLineTerminator():this.eat(9))||this.raise(M.MissingSemicolon,this.state.lastTokEndLoc)}expect(b,m){this.eat(b)||this.unexpected(m,b)}tryParse(b,m=this.state.clone()){let x={node:null};try{let S=b((k=null)=>{throw x.node=k,x});if(this.state.errors.length>m.errors.length){let k=this.state;return this.state=m,this.state.tokensLength=k.tokensLength,{node:S,error:k.errors[m.errors.length],thrown:!1,aborted:!1,failState:k}}return{node:S,error:null,thrown:!1,aborted:!1,failState:null}}catch(S){let k=this.state;if(this.state=m,S instanceof SyntaxError)return{node:null,error:S,thrown:!0,aborted:!1,failState:k};if(S===x)return{node:x.node,error:null,thrown:!1,aborted:!0,failState:k};throw S}}checkExpressionErrors(b,m){if(!b)return!1;let{shorthandAssignLoc:x,doubleProtoLoc:S,privateKeyLoc:k,optionalParametersLoc:O,voidPatternLoc:G}=b,ie=!!x||!!S||!!O||!!k||!!G;if(!m)return ie;x!=null&&this.raise(M.InvalidCoverInitializedName,x),S!=null&&this.raise(M.DuplicateProto,S),k!=null&&this.raise(M.UnexpectedPrivateField,k),O!=null&&this.unexpected(O),G!=null&&this.raise(M.InvalidCoverDiscardElement,G)}isLiteralPropertyName(){return As(this.state.type)}isPrivateName(b){return b.type==="PrivateName"}getPrivateNameSV(b){return b.id.name}hasPropertyAsPrivateName(b){return(b.type==="MemberExpression"||b.type==="OptionalMemberExpression")&&this.isPrivateName(b.property)}isObjectProperty(b){return b.type==="ObjectProperty"}isObjectMethod(b){return b.type==="ObjectMethod"}initializeScopes(b=this.options.sourceType==="module"){let m=this.state.labels;this.state.labels=[];let x=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let S=this.inModule;this.inModule=b;let k=this.scope,O=this.getScopeHandler();this.scope=new O(this,b);let G=this.prodParam;this.prodParam=new rye;let ie=this.classScope;this.classScope=new eye(this);let be=this.expressionScope;return this.expressionScope=new tye(this),()=>{this.state.labels=m,this.exportedIdentifiers=x,this.inModule=S,this.scope=k,this.prodParam=G,this.classScope=ie,this.expressionScope=be}}enterInitialScopes(){let b=0;(this.inModule||this.optionFlags&1)&&(b|=2),this.optionFlags&32&&(b|=1);let m=!this.inModule&&this.options.sourceType==="commonjs";(m||this.optionFlags&2)&&(b|=4),this.prodParam.enter(b);let x=m?514:1;this.optionFlags&4&&(x|=512),this.optionFlags&16&&(x|=48),this.scope.enter(x)}checkDestructuringPrivate(b){let{privateKeyLoc:m}=b;m!==null&&this.expectPlugin("destructuringPrivate",m)}},ak=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},lk=class{constructor(b,m,x,S){this.start=x,this.end=0,S!==void 0&&(this.loc=new A(S)),b&128&&(this.range=[x,0]),S!==void 0&&m&&(this.loc.filename=m)}type=""},qY=lk.prototype,sye=class extends GY{createPosition(b){return b}startNode(){let{startLoc:b}=this.state;return this.setLoc(b),this.startNodeAt(b)}startNodeAt(b){let{optionFlags:m,filename:x}=this;return m&256?new lk(m,x,b.index,this.createPosition(b)):new lk(m,x,b.index)}startNodeAtNode(b){let{optionFlags:m,filename:x}=this;return m&256?new lk(m,x,b.start,b.loc.start):new lk(m,x,b.start)}finishNode(b,m){return this.finishNodeAt(b,m,this.state.lastTokEndLoc)}finishNodeAt(b,m,x){b.type=m,b.end=x.index;let{optionFlags:S}=this;return S&256&&(b.loc.end=this.createPosition(x)),S&128&&(b.range[1]=x.index),S&8192&&this.processComment(b),b}finishNodeAtNode(b,m,x){b.type=m,b.end=x.end;let{optionFlags:S}=this;return S&256&&(b.loc.end=x.loc.end),S&128&&(b.range[1]=b.end),S&8192&&this.processComment(b),b}resetStartLocation(b,m){b.start=m.index;let{optionFlags:x}=this;x&256&&(b.loc.start=this.createPosition(m)),x&128&&(b.range[0]=m.index)}resetEndLocation(b,m=this.state.lastTokEndLoc){b.end=m.index;let{optionFlags:x}=this;x&256&&(b.loc.end=this.createPosition(m)),x&128&&(b.range[1]=m.index)}resetStartLocationFromNode(b,m){b.start=m.start;let{optionFlags:x}=this;x&256&&(b.loc.start=m.loc.start),x&128&&(b.range[0]=m.start)}resetEndLocationFromNode(b,m){b.end=m.end;let{optionFlags:x}=this;x&256&&(b.loc.end=m.loc.end),x&128&&(b.range[1]=m.end)}castNodeTo(b,m){return b.type=m,b}cloneIdentifier(b){let{type:m,start:x,end:S,loc:k,range:O,name:G}=b,ie=Object.create(qY);return ie.type=m,ie.start=x,ie.end=S,ie.loc=k,ie.range=O,ie.name=G,b.extra&&(ie.extra=b.extra),ie}cloneStringLiteral(b){let{type:m,start:x,end:S,loc:k,range:O,extra:G}=b,ie=Object.create(qY);return ie.type=m,ie.start=x,ie.end=S,ie.loc=k,ie.range=O,ie.extra=G,ie.value=b.value,ie}},X5=b=>b.type==="ParenthesizedExpression"?X5(b.expression):b,ml=class extends sye{toAssignable(b,m=!1){let x;switch((b.type==="ParenthesizedExpression"||b.extra?.parenthesized)&&(x=X5(b),m?x.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(M.InvalidParenthesizedAssignment,b):x.type!=="CallExpression"&&x.type!=="MemberExpression"&&!this.isOptionalMemberExpression(x)&&this.raise(M.InvalidParenthesizedAssignment,b):this.raise(M.InvalidParenthesizedAssignment,b)),b.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(b,"ObjectPattern");for(let S=0,k=b.properties.length,O=k-1;SS.type!=="ObjectMethod"&&(k===x||S.type!=="SpreadElement")&&this.isAssignable(S))}case"ObjectProperty":return this.isAssignable(b.value);case"SpreadElement":return this.isAssignable(b.argument);case"ArrayExpression":return b.elements.every(x=>x===null||this.isAssignable(x));case"AssignmentExpression":return b.operator==="=";case"ParenthesizedExpression":return this.isAssignable(b.expression);case"MemberExpression":case"OptionalMemberExpression":return!m;default:return!1}}toReferencedList(b,m){return b}parseSpread(b){let m=this.startNode();return this.next(),m.argument=this.parseMaybeAssignAllowIn(b,void 0),this.finishNode(m,"SpreadElement")}parseRestBinding(){let b=this.startNode();this.next();let m=this.parseBindingAtom();return m.type==="VoidPattern"&&this.raise(M.UnexpectedVoidPattern,m),b.argument=m,this.finishNode(b,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let b=this.startNode();return this.next(),b.elements=this.parseBindingList(1,93,1),this.finishNode(b,"ArrayPattern")}case 2:return this.parseObjectLike(4,!0);case 84:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(b,m,x){let S=x&1,k=[],O=!0;for(;!this.eat(b);)if(O?O=!1:this.expect(8),S&&this.match(8))k.push(null);else{if(this.eat(b))break;if(this.match(17)){let G=this.parseRestBinding();if(x&2&&(G=this.parseFunctionParamType(G)),k.push(G),!this.checkCommaAfterRest(m)){this.expect(b);break}}else{let G=[];if(x&2)for(this.match(22)&&this.hasPlugin("decorators")&&this.raise(M.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)G.push(this.parseDecorator());k.push(this.parseBindingElement(x,G))}}return k}parseBindingRestProperty(b){return this.next(),this.hasPlugin("discardBinding")&&this.match(84)?(b.argument=this.parseVoidPattern(null),this.raise(M.UnexpectedVoidPattern,b.argument)):b.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(b,"RestElement")}parseBindingProperty(){let{type:b,startLoc:m}=this.state;if(b===17)return this.parseBindingRestProperty(this.startNode());let x=this.startNode();return b===134?(this.expectPlugin("destructuringPrivate",m),this.classScope.usePrivateName(this.state.value,m),x.key=this.parsePrivateName()):this.parsePropertyName(x),x.method=!1,this.parseObjPropValue(x,m,!1,!1,!0,!1)}parseBindingElement(b,m){let{startLoc:x}=this.state,S=this.parseMaybeDefault();return b&2&&this.parseFunctionParamType(S),m.length&&(S.decorators=m,this.resetStartLocationFromNode(S,m[0])),this.parseMaybeDefault(x,S)}parseFunctionParamType(b){return b}parseMaybeDefault(b,m){if(b??(b=this.state.startLoc),m=m??this.parseBindingAtom(),!this.eat(25))return m;let x=this.startNodeAt(b);return m.type==="VoidPattern"&&this.raise(M.VoidPatternInitializer,m),x.left=m,x.right=this.parseMaybeAssignAllowIn(),this.finishNode(x,"AssignmentPattern")}isValidLVal(b,m,x,S){switch(b){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!m&&!this.state.strict&&this.optionFlags&16384)return!0}return!1}isOptionalMemberExpression(b){return b.type==="OptionalMemberExpression"}checkLVal(b,m,x=64,S=!1,k=!1,O=!1,G=!1){let ie=b.type;if(this.isObjectMethod(b))return;let be=this.isOptionalMemberExpression(b);if(be||ie==="MemberExpression"){be&&(this.expectPlugin("optionalChainingAssign",b.start),m.type!=="AssignmentExpression"&&this.raise(M.InvalidLhsOptionalChaining,b,{ancestor:m})),x!==64&&this.raise(M.InvalidPropertyBindingPattern,b);return}if(ie==="Identifier"){this.checkIdentifier(b,x,k);let{name:Yd}=b;S&&(S.has(Yd)?this.raise(M.ParamDupe,b):S.add(Yd));return}else ie==="VoidPattern"&&m.type==="CatchClause"&&this.raise(M.VoidPatternCatchClauseParam,b);let pe=X5(b);G||(G=pe.type==="CallExpression"&&(pe.callee.type==="Import"||pe.callee.type==="Super"));let lt=this.isValidLVal(ie,G,!(O||b.extra?.parenthesized)&&m.type==="AssignmentExpression",x);if(lt===!0)return;if(lt===!1){let Yd=x===64?M.InvalidLhs:M.InvalidLhsBinding;this.raise(Yd,b,{ancestor:m});return}let Mt,Ui;typeof lt=="string"?(Mt=lt,Ui=ie==="ParenthesizedExpression"):[Mt,Ui]=lt;let Zn=ie==="ArrayPattern"||ie==="ObjectPattern"?{type:ie}:m,Gc=b[Mt];if(Array.isArray(Gc))for(let Yd of Gc)Yd&&this.checkLVal(Yd,Zn,x,S,k,Ui,!0);else Gc&&this.checkLVal(Gc,Zn,x,S,k,Ui,G)}checkIdentifier(b,m,x=!1){this.state.strict&&(x?pn(b.name,this.inModule):yi(b.name))&&(m===64?this.raise(M.StrictEvalArguments,b,{referenceName:b.name}):this.raise(M.StrictEvalArgumentsBinding,b,{bindingName:b.name})),m&8192&&b.name==="let"&&this.raise(M.LetInLexicalBinding,b),m&64||this.declareNameFromIdentifier(b,m)}declareNameFromIdentifier(b,m){this.scope.declareName(b.name,m,b.start)}checkToRestConversion(b,m){switch(b.type){case"ParenthesizedExpression":this.checkToRestConversion(b.expression,m);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(m)break;default:this.raise(M.InvalidRestAssignmentPattern,b)}}checkCommaAfterRest(b){return this.match(8)?(this.raise(this.lookaheadCharCode()===b?M.RestTrailingComma:M.ElementAfterRest,this.state.startLoc),!0):!1}},aye=class extends ml{checkProto(b,m,x){if(b.type==="SpreadElement"||this.isObjectMethod(b)||b.computed||b.shorthand)return m;let S=b.key;return(S.type==="Identifier"?S.name:S.value)==="__proto__"?(m&&(x?x.doubleProtoLoc===null&&(x.doubleProtoLoc=this.getLoc(S.start)):this.raise(M.DuplicateProto,S)),!0):m}shouldExitDescending(b){return b.type==="ArrowFunctionExpression"&&!b.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(M.ParseExpressionEmptyInput,this.state.startLoc);let b=this.parseExpression();if(!this.match(135))throw this.raise(M.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),b.comments=this.comments,b.errors=this.state.errors,this.optionFlags&512&&(b.tokens=lye(this.tokens)),b}parseExpression(b,m){return b?this.disallowInAnd(()=>this.parseExpressionBase(m)):this.allowInAnd(()=>this.parseExpressionBase(m))}parseExpressionBase(b){let m=this.state.startLoc,x=this.parseMaybeAssign(b);if(this.match(8)){let S=this.startNodeAt(m);for(S.expressions=[x];this.eat(8);)S.expressions.push(this.parseMaybeAssign(b));return this.toReferencedList(S.expressions),this.finishNode(S,"SequenceExpression")}return x}parseMaybeAssignDisallowIn(b,m){return this.disallowInAnd(()=>this.parseMaybeAssign(b,m))}parseMaybeAssignAllowIn(b,m){return this.allowInAnd(()=>this.parseMaybeAssign(b,m))}setOptionalParametersError(b){b.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(b,m){let x=this.state.startLoc,S=this.isContextual(104);if(S&&this.prodParam.hasYield){this.next();let G=this.parseYield(x);return m&&(G=m.call(this,G,x)),G}let k;b?k=!1:(b=new ak,k=!0),this.state.canStartArrow=!0;let O=this.parseMaybeConditional(b);if(m&&(O=m.call(this,O,x)),hl(this.state.type)){let G=this.startNodeAt(x),ie=this.state.value;if(G.operator=ie,this.match(25)){this.toAssignable(O,!0),G.left=O;let be=x.index;b.doubleProtoLoc!=null&&b.doubleProtoLoc.index>=be&&(b.doubleProtoLoc=null),b.shorthandAssignLoc!=null&&b.shorthandAssignLoc.index>=be&&(b.shorthandAssignLoc=null),b.privateKeyLoc!=null&&b.privateKeyLoc.index>=be&&(this.checkDestructuringPrivate(b),b.privateKeyLoc=null),b.voidPatternLoc!=null&&b.voidPatternLoc.index>=be&&(b.voidPatternLoc=null)}else G.left=O;return this.next(),G.right=this.parseMaybeAssign(),this.checkLVal(O,this.finishNode(G,"AssignmentExpression"),void 0,void 0,void 0,void 0,ie==="||="||ie==="&&="||ie==="??="),G}else k&&this.checkExpressionErrors(b,!0);if(S){let{type:G}=this.state;if((this.hasPlugin("v8intrinsic")?gr(G):gr(G)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(M.YieldNotInGeneratorFunction,x),this.parseYield(x)}return O}parseMaybeConditional(b){let m=this.state.startLoc,x=this.parseExprOps(b);return this.shouldExitDescending(x)?x:this.parseConditional(x,m,b)}parseConditional(b,m,x){if(this.eat(13)){let S=this.startNodeAt(m);return S.test=b,S.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),S.alternate=this.parseMaybeAssign(),this.finishNode(S,"ConditionalExpression")}return b}parseMaybeUnaryOrPrivate(b){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(b)}parseExprOps(b){let m=this.state.startLoc,x=this.parseMaybeUnaryOrPrivate(b);return this.shouldExitDescending(x)?x:(this.state.canStartArrow=!1,this.parseExprOp(x,m,-1))}parseExprOp(b,m,x){if(this.isPrivateName(b)){let k=this.getPrivateNameSV(b);(x>=Or(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(M.PrivateInExpectedIn,m,{identifierName:k}),this.classScope.usePrivateName(k,m)}let S=this.state.type;if(qa(S)&&(this.prodParam.hasIn||!this.match(54))){let k=Or(S);if(k>x){if(S===35&&(this.expectPlugin("pipelineOperator"),this.prodParam.inFSharpPipelineDirectBody))return b;let O=this.startNodeAt(m);O.left=b,O.operator=this.state.value;let G=S===37||S===38,ie=S===36;ie&&(k=Or(38)),this.next(),O.right=this.parseExprOpRightExpr(S,k);let be=this.finishNode(O,G||ie?"LogicalExpression":"BinaryExpression"),pe=this.state.type;if(ie&&(pe===37||pe===38)||G&&pe===36)throw this.raise(M.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(be,m,x)}}return b}parseExprOpRightExpr(b,m){switch(b){case 35:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.parseFSharpPipelineBody(m)}default:return this.parseExprOpBaseRightExpr(b,m)}}parseExprOpBaseRightExpr(b,m){let x=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),x,sa(b)?m-1:m)}parseHackPipeBody(){let{startLoc:b}=this.state,m=this.parseMaybeAssign();return L.has(m.type)&&!m.extra?.parenthesized&&this.raise(M.PipeUnparenthesizedBody,b,{type:m.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(M.PipeTopicUnused,b),m}checkExponentialAfterUnary(b){this.match(53)&&this.raise(M.UnexpectedTokenUnaryExponentiation,b.argument)}parseMaybeUnary(b,m){let x=this.state.startLoc,S=this.isContextual(92);if(S&&this.recordAwaitIfAllowed()){this.next();let ie=this.parseAwait(x);return m||this.checkExponentialAfterUnary(ie),ie}let k=this.match(30),O=this.startNode();if(fl(this.state.type)){O.operator=this.state.value,O.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin("throwExpressions");let ie=this.match(85);if(this.next(),O.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(b,!0),this.state.strict&&ie){let be=O.argument;be.type==="Identifier"?this.raise(M.StrictDelete,O):this.hasPropertyAsPrivateName(be)&&this.raise(M.DeletePrivateField,O)}if(!k)return m||this.checkExponentialAfterUnary(O),this.finishNode(O,"UnaryExpression")}let G=this.parseUpdate(O,k,b);if(S){let{type:ie}=this.state;if((this.hasPlugin("v8intrinsic")?gr(ie):gr(ie)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(M.AwaitNotInAsyncContext,x),this.parseAwait(x)}return G}parseUpdate(b,m,x){if(m){let O=this.finishNode(b,"UpdateExpression");return this.checkLVal(O.argument,O),O}let S=this.state.startLoc,k=this.parseExprSubscripts(x);if(this.checkExpressionErrors(x,!1))return k;for(;jo(this.state.type)&&!this.canInsertSemicolon();){let O=this.startNodeAt(S);O.operator=this.state.value,O.prefix=!1,O.argument=k,this.next(),this.checkLVal(k,k=this.finishNode(O,"UpdateExpression"))}return k}parseExprSubscripts(b){let m=this.state.startLoc;this.setLoc(m);let x=this.parseExprAtom(b);return this.shouldExitDescending(x)?x:this.parseSubscripts(x,m)}parseSubscripts(b,m,x){let S={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(b),stop:!1};do b=this.parseSubscript(b,m,x,S),S.maybeAsyncArrow=!1;while(!S.stop);return b}parseSubscript(b,m,x,S){let{type:k}=this.state;if(!x&&k===11)return this.parseBind(b,m,S);if(Yi(k))return this.parseTaggedTemplateExpression(b,m,S);let O=!1;if(k===14){if(x&&(this.raise(M.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(b,S);S.optionalChainMember=O=!0,this.next()}if(!x&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(b,m,S,O);{let G=this.eat(0);return G||O||this.eat(12)?this.parseMember(b,m,S,G,O):this.stopParseSubscript(b,S)}}stopParseSubscript(b,m){return m.stop=!0,b}parseMember(b,m,x,S,k){let O=this.startNodeAt(m);return O.object=b,O.computed=S,S?(O.property=this.parseExpression(),this.expect(1)):this.match(134)?(b.type==="Super"&&this.raise(M.SuperPrivateField,m),this.classScope.usePrivateName(this.state.value,this.state.startLoc),O.property=this.parsePrivateName()):O.property=this.parseIdentifier(!0),x.optionalChainMember?(O.optional=k,this.finishNode(O,"OptionalMemberExpression")):this.finishNode(O,"MemberExpression")}parseBind(b,m,x){let S=this.startNodeAt(m);S.object=b,this.next();let k=this.match(79),O=this.parseNoCallExpr();if(O.type==="Super"||k&&O.type==="ImportExpression"||O.type==="Import")throw this.raise(M.UnsupportedBindRHS,O);return S.callee=O,x.stop=!0,this.parseSubscripts(this.finishNode(S,"BindExpression"),m,!1)}parseCoverCallAndAsyncArrowHead(b,m,x,S){let k=null;this.next();let O=this.startNodeAt(m);O.callee=b;let{maybeAsyncArrow:G,optionalChainMember:ie}=x;G&&(this.expressionScope.enter(oye()),k=new ak),ie&&(O.optional=S),S?O.arguments=this.parseCallExpressionArguments():O.arguments=this.parseCallExpressionArguments(b.type!=="Super",O,k);let be=this.finishCallExpression(O,ie);return G&&this.shouldParseAsyncArrow()&&!S?(x.stop=!0,this.checkDestructuringPrivate(k),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),be=this.parseAsyncArrowFromCallExpression(this.startNodeAt(m),be)):(G&&(this.checkExpressionErrors(k,!0),this.expressionScope.exit()),this.toReferencedList(O.arguments)),be}parseTaggedTemplateExpression(b,m,x){let S=this.startNodeAt(m);return S.tag=b,S.quasi=this.parseTemplate(!0),x.optionalChainMember&&this.raise(M.OptionalChainingNoTemplate,m),this.finishNode(S,"TaggedTemplateExpression")}atPossibleAsyncArrow(b){return b.type==="Identifier"&&b.name==="async"&&this.state.lastTokEndLoc.index===b.end&&!this.canInsertSemicolon()&&b.end-b.start===5&&this.state.canStartArrow}finishCallExpression(b,m){if(b.callee.type==="Import")if(b.arguments.length===0||b.arguments.length>2)this.raise(M.ImportCallArity,b);else for(let x of b.arguments)x.type==="SpreadElement"&&this.raise(M.ImportCallSpreadArgument,x);return this.finishNode(b,m?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(b,m,x){let S=[],k=!0;for(;!this.eat(7);){if(k)k=!1;else if(this.expect(8),this.match(7)){m&&this.addTrailingCommaExtraToNode(m),this.next();break}S.push(this.parseExprListItem(7,!1,x,b))}return S}shouldParseAsyncArrow(){return this.match(15)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(b,m){return this.resetPreviousNodeTrailingComments(m),this.expect(15),this.parseArrowExpression(b,m.arguments,!0,m.extra?.trailingCommaLoc),m.innerComments&&rk(b,m.innerComments),m.callee.trailingComments&&rk(b,m.callee.trailingComments),b}parseNoCallExpr(){let b=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),b,!0)}parseExprAtom(b){let m,x=null,{type:S}=this.state;switch(S){case 75:return this.parseSuper();case 79:return m=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(m):this.match(6)?this.optionFlags&1024?this.parseImportCall(m):this.finishNode(m,"Import"):(this.raise(M.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(m,"Import"));case 74:return m=this.startNode(),this.next(),this.finishNode(m,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 131:return this.parseNumericLiteral(this.state.value);case 132:return this.parseBigIntLiteral(this.state.value);case 130:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,b);case 2:return this.parseObjectLike(4,!1,b);case 64:return this.parseFunctionOrFunctionSent();case 22:x=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(x,this.startNode()),!1);case 73:return this.parseNewOrNewTarget();case 21:case 20:return this.parseTemplate(!1);case 11:{m=this.startNode(),this.next(),m.object=null;let k=m.callee=this.parseNoCallExpr();if(k.type==="MemberExpression")return this.finishNode(m,"BindExpression");throw this.raise(M.UnsupportedBind,k)}case 134:return this.raise(M.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 29:return this.parseTopicReferenceThenEqualsSign(50,"%");case 28:return this.parseTopicReferenceThenEqualsSign(40,"^");case 33:case 34:return this.parseTopicReference("hack");case 40:case 50:case 23:{let k=this.getPluginOption("pipelineOperator","proposal");if(k)return this.parseTopicReference(k);throw this.unexpected()}case 43:{let k=this.input.codePointAt(this.nextTokenStart());throw ne(k)||k===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(Wi(S)){if(this.isContextual(123)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let{canStartArrow:k,containsEsc:O}=this.state,G=this.parseIdentifier();if(!O&&G.name==="async"&&!this.canInsertSemicolon()){let{type:ie}=this.state;if(ie===64)return this.resetPreviousNodeTrailingComments(G),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(G));if(Wi(ie))return k&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(G)):G;if(ie===86)return this.resetPreviousNodeTrailingComments(G),this.parseDo(this.startNodeAtNode(G),!0)}return k&&this.match(15)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(G),[G],!1)):G}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(b,m){let x=this.getPluginOption("pipelineOperator","proposal");if(x)return this.state.type=b,this.state.value=m,this.state.pos--,this.state.end--,this.state.endLoc=v(this.state.endLoc,-1),this.parseTopicReference(x);throw this.unexpected()}parseTopicReference(b){let m=this.startNode(),x=this.state.startLoc,S=this.state.type;return this.next(),this.finishTopicReference(m,x,b,S)}finishTopicReference(b,m,x,S){if(this.testTopicReferenceConfiguration(x,m,S))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(M.PipeTopicUnbound,m),this.registerTopicReference(),this.finishNode(b,"TopicReference");throw this.raise(M.PipeTopicUnconfiguredToken,m,{token:ls(S)})}testTopicReferenceConfiguration(b,m,x){if(b==="hack")return this.hasPlugin(["pipelineOperator",{topicToken:ls(x)}]);throw this.raise(M.PipeTopicRequiresHackPipes,m)}parseAsyncArrowUnaryFunction(b){this.prodParam.enter(Z0(!0,this.prodParam.hasYield));let m=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(M.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(15),this.parseArrowExpression(b,m,!0)}parseDo(b,m){this.expectPlugin("doExpressions"),m&&this.expectPlugin("asyncDoExpressions"),b.async=m,this.next();let x=this.state.labels;return this.state.labels=[],m?(this.prodParam.enter(2),b.body=this.parseBlock(),this.prodParam.exit()):b.body=this.parseBlock(),this.state.labels=x,this.finishNode(b,"DoExpression")}parseSuper(){let b=this.startNode();return this.next(),this.match(6)&&!this.scope.allowDirectSuper?this.raise(M.SuperNotAllowed,b):this.scope.allowSuper||this.raise(M.UnexpectedSuper,b),!this.match(6)&&!this.match(0)&&!this.match(12)&&this.raise(M.UnsupportedSuper,b),this.finishNode(b,"Super")}parsePrivateName(){let b=this.startNode(),m=this.startNodeAt(v(this.state.startLoc,1)),x=this.state.value;return this.next(),b.id=this.createIdentifier(m,x),this.finishNode(b,"PrivateName")}parseFunctionOrFunctionSent(){let b=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(12)){let m=this.createIdentifier(this.startNodeAtNode(b),"function");return this.next(),this.match(99)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(b,m,"sent")}return this.parseFunction(b)}parseMetaProperty(b,m,x){b.meta=m;let S=this.state.containsEsc;return b.property=this.parseIdentifier(!0),(b.property.name!==x||S)&&this.raise(M.UnsupportedMetaProperty,b.property,{target:m.name,onlyValidPropertyName:x}),this.finishNode(b,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(b){if(this.next(),this.isContextual(101)||this.isContextual(93)){let m=this.isContextual(101);return this.expectPlugin(m?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),b.phase=m?"source":"defer",this.parseImportCall(b)}else{let m=this.createIdentifierAt(this.startNodeAtNode(b),"import",this.state.lastTokStartLoc);return this.isContextual(97)&&(this.inModule||this.raise(M.ImportMetaOutsideModule,m),this.sawUnambiguousESM=!0),this.parseMetaProperty(b,m,"meta")}}parseLiteralAtNode(b,m,x){return this.addExtra(x,"rawValue",b),this.addExtra(x,"raw",this.input.slice(this.offsetToSourcePos(x.start),this.state.end)),x.value=b,this.next(),this.finishNode(x,m)}parseLiteral(b,m){let x=this.startNode();return this.parseLiteralAtNode(b,m,x)}parseStringLiteral(b){return this.parseLiteral(b,"StringLiteral")}parseNumericLiteral(b){return this.parseLiteral(b,"NumericLiteral")}parseBigIntLiteral(b){let m;try{m=BigInt(b)}catch{m=null}return this.parseLiteral(m,"BigIntLiteral")}parseRegExpLiteral(b){let m=this.startNode();return this.addExtra(m,"raw",this.input.slice(this.offsetToSourcePos(m.start),this.state.end)),m.pattern=b.pattern,m.flags=b.flags,this.next(),this.finishNode(m,"RegExpLiteral")}parseBooleanLiteral(b){let m=this.startNode();return m.value=b,this.next(),this.finishNode(m,"BooleanLiteral")}parseNullLiteral(){let b=this.startNode();return this.next(),this.finishNode(b,"NullLiteral")}parseParenAndDistinguishExpression(b){let m=this.state.startLoc,x;this.next(),this.expressionScope.enter(nye());let S=this.state.startLoc,k=[],O=new ak,G=!0,ie,be;for(;!this.match(7);){if(G)G=!1;else if(this.expect(8,O.optionalParametersLoc===null?null:O.optionalParametersLoc),this.match(7)){be=this.state.startLoc;break}if(this.match(17)){let Mt=this.state.startLoc;if(ie=this.state.startLoc,k.push(this.parseParenItem(this.parseRestBinding(),Mt)),!this.checkCommaAfterRest(41))break}else k.push(this.parseMaybeAssignAllowInOrVoidPattern(7,O,this.parseParenItem))}let pe=this.state.lastTokEndLoc;this.expect(7);let lt=this.startNodeAt(m);return b&&this.shouldParseArrow(k)&&(lt=this.parseArrow(lt))?(this.checkDestructuringPrivate(O),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(lt,k,!1),lt):(this.expressionScope.exit(),k.length||this.unexpected(this.state.lastTokStartLoc),be&&this.unexpected(be),ie&&this.unexpected(ie),this.checkExpressionErrors(O,!0),this.toReferencedList(k,!0),k.length>1?(x=this.startNodeAt(S),x.expressions=k,this.finishNode(x,"SequenceExpression"),this.resetEndLocation(x,pe)):x=k[0],this.wrapParenthesis(m,x))}wrapParenthesis(b,m){if(!(this.optionFlags&2048))return this.addExtra(m,"parenthesized",!0),this.addExtra(m,"parenStart",b.index),this.takeSurroundingComments(m,b.index,this.state.lastTokEndLoc.index),m;let x=this.startNodeAt(b);return x.expression=m,this.finishNode(x,"ParenthesizedExpression")}shouldParseArrow(b){return!this.canInsertSemicolon()}parseArrow(b){if(this.eat(15))return b}parseParenItem(b,m){return b}parseNewOrNewTarget(){let b=this.startNode();if(this.next(),this.match(12)){let m=this.createIdentifier(this.startNodeAtNode(b),"new");this.next();let x=this.parseMetaProperty(b,m,"target");return this.scope.allowNewTarget||this.raise(M.UnexpectedNewTarget,x),x}return this.parseNew(b)}parseNew(b){if(this.parseNewCallee(b),this.eat(6)){let m=this.parseExprList(7);this.toReferencedList(m),b.arguments=m}else b.arguments=[];return this.finishNode(b,"NewExpression")}parseNewCallee(b){let m=this.match(79),x=this.parseNoCallExpr();b.callee=x,m&&x.type==="ImportExpression"&&this.raise(M.ImportCallNotNewExpression,x,x),x.type==="Import"&&this.raise(M.ImportCallNotNewExpression,x),x.type==="Super"&&this.raise(M.SuperCallNotNewExpression,x)}parseTemplateElement(b){let{start:m,startLoc:x,end:S,value:k}=this.state,O=m+1,G=this.startNodeAt(v(x,1));k===null&&(b||this.raise(M.InvalidEscapeSequenceTemplate,v(this.state.firstInvalidTemplateEscapePos,1)));let ie=this.match(20),be=ie?-1:-2,pe=S+be;G.value={raw:this.input.slice(O,pe).replace(/\r\n?/g,` +`),cooked:k===null?null:k.slice(1,be)},G.tail=ie,this.next();let lt=this.finishNode(G,"TemplateElement");return this.resetEndLocation(lt,v(this.state.lastTokEndLoc,be)),lt}parseTemplate(b){let m=this.startNode(),x=this.parseTemplateElement(b),S=[x],k=[];for(;!x.tail;)k.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),S.push(x=this.parseTemplateElement(b));return m.expressions=k,m.quasis=S,this.finishNode(m,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(b,m,x){let S=!1,k=!0,O=this.startNode();for(O.properties=[],this.next();!this.match(b);){if(k)k=!1;else if(this.expect(8),this.match(b)){this.addTrailingCommaExtraToNode(O);break}let ie;m?ie=this.parseBindingProperty():(ie=this.parsePropertyDefinition(x),S=this.checkProto(ie,S,x)),O.properties.push(ie)}this.next();let G=m?"ObjectPattern":"ObjectExpression";return this.finishNode(O,G)}addTrailingCommaExtraToNode(b){this.addExtra(b,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(b,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(b){return!b.computed&&b.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(b){let m=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(M.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)m.push(this.parseDecorator());let x=this.startNode(),S=!1,k=!1,O;if(this.match(17))return m.length&&this.unexpected(),this.parseSpread();m.length&&(x.decorators=m),x.method=!1,b&&(O=this.state.startLoc);let G=this.eat(51);this.parsePropertyNamePrefixOperator(x);let ie=this.state.containsEsc;if(this.parsePropertyName(x,b),!G&&!ie&&this.maybeAsyncOrAccessorProp(x)){let{key:be}=x,pe=be.name;pe==="async"&&!this.hasPrecedingLineBreak()&&(S=!0,this.resetPreviousNodeTrailingComments(be),G=this.eat(51),this.parsePropertyName(x)),(pe==="get"||pe==="set")&&(k=!0,this.resetPreviousNodeTrailingComments(be),x.kind=pe,this.match(51)&&(G=!0,this.raise(M.AccessorIsGenerator,this.state.curPosition(),{kind:pe}),this.next()),this.parsePropertyName(x))}return this.parseObjPropValue(x,O,G,S,!1,k,b)}getGetterSetterExpectedParamCount(b){return b.kind==="get"?0:1}getObjectOrClassMethodParams(b){return b.params}checkGetterSetterParams(b){let m=this.getGetterSetterExpectedParamCount(b),x=this.getObjectOrClassMethodParams(b);x.length!==m&&this.raise(b.kind==="get"?M.BadGetterArity:M.BadSetterArity,b),b.kind==="set"&&x[x.length-1]?.type==="RestElement"&&this.raise(M.BadSetterRestParameter,b)}parseObjectMethod(b,m,x,S,k){if(k){let O=this.parseMethod(b,m,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(O),O}if(x||m||this.match(6))return S&&this.unexpected(),b.kind="method",b.method=!0,this.parseMethod(b,m,x,!1,!1,"ObjectMethod")}parseObjectProperty(b,m,x,S){if(b.shorthand=!1,this.eat(10))return b.value=x?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,S),this.finishObjectProperty(b);if(!b.computed&&b.key.type==="Identifier"){if(this.checkReservedWord(b.key.name,b.key.start,!0,!1),x)b.value=this.parseMaybeDefault(m,this.cloneIdentifier(b.key));else if(this.match(25)){let k=this.state.startLoc;S!=null?S.shorthandAssignLoc===null&&(S.shorthandAssignLoc=k):this.raise(M.InvalidCoverInitializedName,k),b.value=this.parseMaybeDefault(m,this.cloneIdentifier(b.key))}else b.value=this.cloneIdentifier(b.key);return b.shorthand=!0,this.finishObjectProperty(b)}}finishObjectProperty(b){return this.finishNode(b,"ObjectProperty")}parseObjPropValue(b,m,x,S,k,O,G){let ie=this.parseObjectMethod(b,x,S,k,O)||this.parseObjectProperty(b,m,k,G);return ie||this.unexpected(),ie}parsePropertyName(b,m){if(this.eat(0))b.computed=!0,b.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:x,value:S}=this.state,k;if(Do(x))k=this.parseIdentifier(!0);else switch(x){case 131:k=this.parseNumericLiteral(S);break;case 130:k=this.parseStringLiteral(S);break;case 132:k=this.parseBigIntLiteral(S);break;case 134:{let O=this.state.startLoc;m!=null?m.privateKeyLoc===null&&(m.privateKeyLoc=O):this.raise(M.UnexpectedPrivateField,O),k=this.parsePrivateName();break}default:this.unexpected()}b.key=k,x!==134&&(b.computed=!1)}}initFunction(b,m){b.id=null,b.generator=!1,b.async=m}parseMethod(b,m,x,S,k,O,G=!1){this.initFunction(b,x),b.generator=m,this.scope.enter(530|(G?576:0)|(k?32:0)),this.prodParam.enter(Z0(x,b.generator)),this.parseFunctionParams(b,S);let ie=this.parseFunctionBodyAndFinish(b,O,!0);return this.prodParam.exit(),this.scope.exit(),ie}parseArrayLike(b,m){let x=this.startNode();return this.next(),x.elements=this.parseExprList(b,!0,m,x),this.finishNode(x,"ArrayExpression")}parseArrowExpression(b,m,x,S){this.scope.enter(518);let k=Z0(x,!1);return this.match(2)||(k|=this.prodParam.currentFlags()&24),this.prodParam.enter(k),this.initFunction(b,x),m&&this.setArrowFunctionParameters(b,m,S),this.parseFunctionBody(b,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(b,"ArrowFunctionExpression")}setArrowFunctionParameters(b,m,x){this.toAssignableList(m,x,!1),b.params=m}parseFunctionBodyAndFinish(b,m,x=!1){return this.parseFunctionBody(b,!1,x),this.finishNode(b,m)}parseFunctionBody(b,m,x=!1){let S=m&&!this.match(2);if(this.expressionScope.enter(J5()),S)b.body=this.parseMaybeAssign(),this.checkParams(b,!1,m,!1);else{let k=this.state.strict,O=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),b.body=this.parseBlock(!0,!1,G=>{let ie=!this.isSimpleParamList(b.params);G&&ie&&this.raise(M.IllegalLanguageModeDirective,(b.kind==="method"||b.kind==="constructor")&&b.key?this.optionFlags&256?b.key.loc.end:b.key:b);let be=!k&&this.state.strict;this.checkParams(b,!this.state.strict&&!m&&!x&&!ie,m,be),this.state.strict&&b.id&&this.checkIdentifier(b.id,65,be)}),this.prodParam.exit(),this.state.labels=O}this.expressionScope.exit()}isSimpleParameter(b){return b.type==="Identifier"}isSimpleParamList(b){for(let m=0,x=b.length;m10||!Ya(b))){if(x&&Mn(b)){this.raise(M.UnexpectedKeyword,m,{keyword:b});return}if((this.state.strict?S?pn:qt:It)(b,this.inModule)){this.raise(M.UnexpectedReservedWord,m,{reservedWord:b});return}else if(b==="yield"){if(this.prodParam.hasYield){this.raise(M.YieldBindingIdentifier,m);return}}else if(b==="await"){if(this.prodParam.hasAwait){this.raise(M.AwaitBindingIdentifier,m);return}if(this.scope.inStaticBlock){this.raise(M.AwaitBindingIdentifierInStaticBlock,m);return}this.expressionScope.recordAsyncArrowParametersError(m)}else if(b==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(M.ArgumentsInClass,m);return}}}recordAwaitIfAllowed(){let b=this.prodParam.hasAwait;return b&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),b}parseAwait(b,m){let x=b.index;this.setLoc(b);let S=this.startNodeAt(b);return this.expressionScope.recordParameterInitializerError(M.AwaitExpressionFormalParameter,x),this.eat(51)&&this.raise(M.ObsoleteAwaitStar,b),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),m||(S.argument=this.parseMaybeUnary(null,!0)),this.finishNode(S,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:b}=this.state;return b===49||b===6||b===0||Yi(b)||b===98&&!this.state.containsEsc||b===133||b===52||this.hasPlugin("v8intrinsic")&&b===50}parseYield(b){this.setLoc(b);let m=this.startNodeAt(b);this.expressionScope.recordParameterInitializerError(M.YieldInParameter,b.index);let x=!1,S=null;if(!this.hasPrecedingLineBreak())switch(x=this.eat(51),this.state.type){case 9:case 135:case 4:case 7:case 1:case 5:case 10:case 8:if(!x)break;default:S=this.parseMaybeAssign()}return m.delegate=x,m.argument=S,this.finishNode(m,"YieldExpression")}parseImportCall(b){this.next();let m=this.parseCallExpressionArguments();if(m.length===0||m.length>2)this.raise(M.ImportCallArity,b,b);else for(let x of m)x.type==="SpreadElement"&&this.raise(M.ImportCallSpreadArgument,x,b);return b.source=m[0],b.options=m[1]??null,this.finishNode(b,"ImportExpression")}withTopicBindingContext(b){let m=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;let x=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return b()}finally{this.state.inHackPipelineBody=m,this.state.seenTopicReference=x}}allowInAnd(b){let m=this.prodParam.currentFlags();if(24&~m){this.prodParam.enter(m|8|16);try{return b()}finally{this.prodParam.exit()}}return b()}disallowInAnd(b){let m=this.prodParam.currentFlags(),x=8&m,S=16&~m;if(x||S){this.prodParam.enter(m&-9|16);try{return b()}finally{this.prodParam.exit()}}return b()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(b){let m=this.state.startLoc;this.prodParam.enter(this.prodParam.currentFlags()&-17);let x;if(this.isContextual(92)&&this.recordAwaitIfAllowed()){this.next(),x=this.parseAwait(m,!0);let S=this.state.type;qa(S)&&S!==35&&(this.prodParam.hasIn||S!==54)&&this.raise(M.PipelineUnparenthesized,m)}else this.state.canStartArrow=!0,x=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),m,b);return this.prodParam.exit(),x}parseModuleExpression(){this.expectPlugin("moduleBlocks");let b=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);let m=this.startNodeAt(this.state.endLoc);this.next();let x=this.initializeScopes(!0);this.enterInitialScopes();try{b.body=this.parseProgram(m,4,"module")}finally{x()}return this.finishNode(b,"ModuleExpression")}parseVoidPattern(b){this.expectPlugin("discardBinding");let m=this.startNode();return b!=null&&(b.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(m,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(b,m,x){if(m!=null&&this.match(84)){let S=this.lookaheadCharCode();if(S===44||S===(b===1?93:b===4?125:41)||S===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(m))}return this.parseMaybeAssignAllowIn(m,x)}parsePropertyNamePrefixOperator(b){}},$0={kind:1},YY={kind:2},hGe=/[\uD800-\uDFFF]/u,KY=/in(?:stanceof)?/y;function lye(b){for(let m=0;m0)for(let[k,O]of Array.from(this.scope.undefinedExports))this.raise(M.ModuleExportUndefined,O,{localName:k});this.addExtra(b,"topLevelAwait",this.state.hasTopLevelAwait)}let S;return m===135?S=this.finishNode(b,"Program"):S=this.finishNodeAt(b,"Program",v(this.state.startLoc,-1)),S}stmtToDirective(b){let m=this.castNodeTo(b,"Directive"),x=this.castNodeTo(b.expression,"DirectiveLiteral"),S=x.value,k=this.input.slice(this.offsetToSourcePos(x.start),this.offsetToSourcePos(x.end)),O=x.value=k.slice(1,-1);return this.addExtra(x,"raw",k),this.addExtra(x,"rawValue",O),this.addExtra(x,"expressionValue",S),m.value=x,delete b.expression,m}parseInterpreterDirective(){if(!this.match(24))return null;let b=this.startNode();return b.value=this.state.value,this.next(),this.finishNode(b,"InterpreterDirective")}isLet(){return this.isContextual(96)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(103)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(103))return!1;let b=this.nextTokenInLineStart(),m=this.codePointAtPos(b);if(this.isUnparsedContextual(b,"of")){let x=this.lookaheadCharCodeSince(b+2);if(x!==61&&x!==58&&x!==59)return!1}return!!(this.chStartsBindingIdentifier(m,b)||this.isUnparsedContextual(b,"void"))}nextTokenIsIdentifierOnSameLine(){let b=this.nextTokenInLineStart(),m=this.codePointAtPos(b);return this.chStartsBindingIdentifier(m,b)}isAwaitUsing(){if(!this.isContextual(92))return!1;let b=this.nextTokenInLineStart();if(this.isUnparsedContextual(b,"using")){b=this.nextTokenInLineStartSince(b+5);let m=this.codePointAtPos(b);if(this.chStartsBindingIdentifier(m,b))return!0}return!1}chStartsBindingIdentifier(b,m){if(ne(b)){if(KY.lastIndex=m,KY.test(this.input)){let x=this.codePointAtPos(KY.lastIndex);if(!le(x)&&x!==92)return!1}return!0}else return b===92}chStartsBindingPattern(b){return b===91||b===123}hasFollowingBindingAtom(){let b=this.nextTokenStart(),m=this.codePointAtPos(b);return this.chStartsBindingPattern(m)||this.chStartsBindingIdentifier(m,b)}hasInLineFollowingBindingIdentifierOrBrace(){let b=this.nextTokenInLineStart(),m=this.codePointAtPos(b);return m===123||this.chStartsBindingIdentifier(m,b)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(b=!1){let m=0;return this.options.annexB&&!this.state.strict&&(m|=4,b&&(m|=8)),this.parseStatementLike(m)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(b){let m=null;return this.match(22)&&(m=this.parseDecorators(!0)),this.parseStatementContent(b,m)}parseStatementContent(b,m){let x=this.state.type,S=this.startNode(),k=!!(b&2),O=!!(b&4),G=b&1;switch(x){case 56:return this.parseBreakContinueStatement(S,!0);case 59:return this.parseBreakContinueStatement(S,!1);case 60:return this.parseDebuggerStatement(S);case 86:return this.parseDoWhileStatement(S);case 87:return this.parseForStatement(S);case 64:if(this.lookaheadCharCode()===46)break;return O||this.raise(this.state.strict?M.StrictFunction:this.options.annexB?M.SloppyFunctionAnnexB:M.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(S,!1,!k&&O);case 76:return k||this.unexpected(),this.parseClass(this.maybeTakeDecorators(m,S),!0);case 65:return this.parseIfStatement(S);case 66:return this.parseReturnStatement(S);case 67:return this.parseSwitchStatement(S);case 68:return this.parseThrowStatement(S);case 69:return this.parseTryStatement(S);case 92:if(this.isAwaitUsing())return this.allowsUsing()?k?this.recordAwaitIfAllowed()||this.raise(M.AwaitUsingNotInAsyncContext,S):this.raise(M.UnexpectedLexicalDeclaration,S):this.raise(M.UnexpectedUsingDeclaration,S),this.next(),this.parseVarStatement(S,"await using");break;case 103:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?k||this.raise(M.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(M.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(S,"using");case 96:{if(this.state.containsEsc)break;let pe=this.nextTokenStart(),lt=this.codePointAtPos(pe);if(lt!==91&&(!k&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(lt,pe)&<!==123))break}case 71:k||this.raise(M.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{let pe=this.state.value;return this.parseVarStatement(S,pe)}case 88:return this.parseWhileStatement(S);case 72:return this.parseWithStatement(S);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(S);case 79:{let pe=this.lookaheadCharCode();if(pe===40||pe===46)break}case 78:{!(this.optionFlags&8)&&!G&&this.raise(M.UnexpectedImportExport,this.state.startLoc),this.next();let pe;return x===79?pe=this.parseImport(S):pe=this.parseExport(S,m),this.assertModuleNodeAllowed(pe),pe}default:if(this.isAsyncFunction())return k||this.raise(M.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(S,!0,!k&&O)}let ie=this.state.value,be=this.parseExpression();return Wi(x)&&be.type==="Identifier"&&this.eat(10)?this.parseLabeledStatement(S,ie,be,b):this.parseExpressionStatement(S,be,m)}assertModuleNodeAllowed(b){!(this.optionFlags&8)&&!this.inModule&&this.raise(M.ImportOutsideModule,b)}maybeTakeDecorators(b,m,x){return b&&(m.decorators?.length?(this.raise(M.DecoratorsBeforeAfterExport,m.decorators[0]),m.decorators.unshift(...b)):m.decorators=b,this.resetStartLocationFromNode(m,b[0]),x&&this.resetStartLocationFromNode(x,m)),m}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(b){let m=[];do m.push(this.parseDecorator());while(this.match(22));if(this.match(78))b||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(M.UnexpectedLeadingDecorator,this.state.startLoc);return m}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let b=this.startNode();if(this.next(),this.hasPlugin("decorators")){let m=this.state.startLoc,x;if(this.match(6)){let S=this.state.startLoc;this.next(),x=this.parseExpression(),this.expect(7),x=this.wrapParenthesis(S,x);let k=this.state.startLoc;b.expression=this.parseMaybeDecoratorArguments(x,S),b.expression!==x&&this.raise(M.DecoratorArgumentsOutsideParentheses,k)}else{for(x=this.parseIdentifier(!1);this.eat(12);){let S=this.startNodeAt(m);S.object=x,this.match(134)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),S.property=this.parsePrivateName()):S.property=this.parseIdentifier(!0),S.computed=!1,x=this.finishNode(S,"MemberExpression")}b.expression=this.parseMaybeDecoratorArguments(x,m)}}else this.state.canStartArrow=!1,b.expression=this.parseExprSubscripts();return this.finishNode(b,"Decorator")}parseMaybeDecoratorArguments(b,m){if(this.eat(6)){let x=this.startNodeAt(m);return x.callee=b,x.arguments=this.parseCallExpressionArguments(),this.toReferencedList(x.arguments),this.finishNode(x,"CallExpression")}return b}parseBreakContinueStatement(b,m){return this.next(),this.isLineTerminator()?b.label=null:(b.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(b,m),this.finishNode(b,m?"BreakStatement":"ContinueStatement")}verifyBreakContinue(b,m){let x;for(x=0;x=0;O--){let G=this.state.labels[O];if(G.statementStart===b.start)G.statementStart=this.sourceToOffsetPos(this.state.start),G.kind=k;else break}return this.state.labels.push({name:m,kind:k,statementStart:this.sourceToOffsetPos(this.state.start)}),b.body=S&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),b.label=x,this.finishNode(b,"LabeledStatement")}parseExpressionStatement(b,m,x){return b.expression=m,this.semicolon(),this.finishNode(b,"ExpressionStatement")}parseBlock(b=!1,m=!0,x){let S=this.startNode();return b&&this.state.strictErrors.clear(),this.expect(2),m&&this.scope.enter(0),this.parseBlockBody(S,b,!1,4,x),m&&this.scope.exit(),this.finishNode(S,"BlockStatement")}isValidDirective(b){return b.type==="ExpressionStatement"&&b.expression.type==="StringLiteral"&&!b.expression.extra.parenthesized}parseBlockBody(b,m,x,S,k){let O=b.body=[],G=b.directives=[];this.parseBlockOrModuleBlockBody(O,m?G:void 0,x,S,k)}parseBlockOrModuleBlockBody(b,m,x,S,k){let O=this.state.strict,G=!1,ie=!1;for(;!this.match(S);){let be=x?this.parseModuleItem():this.parseStatementListItem();if(m&&!ie){if(this.isValidDirective(be)){let pe=this.stmtToDirective(be);m.push(pe),!G&&pe.value.value==="use strict"&&(G=!0,this.setStrict(!0));continue}ie=!0,this.state.strictErrors.clear()}b.push(be)}k?.call(this,G),O||this.setStrict(!1),this.next()}parseFor(b,m){return b.init=m,this.semicolon(!1),b.test=this.match(9)?null:this.parseExpression(),this.semicolon(!1),b.update=this.match(7)?null:this.parseExpression(),this.expect(7),b.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(b,"ForStatement")}parseForIn(b,m,x){let S=this.match(54);return this.next(),S?x!==null&&this.unexpected(x):b.await=x!==null,m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!S||!this.options.annexB||this.state.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(M.ForInOfLoopInitializer,m,{type:S?"ForInStatement":"ForOfStatement"}),m.type==="AssignmentPattern"&&this.raise(M.InvalidLhs,m,{ancestor:{type:"ForStatement"}}),b.left=m,b.right=S?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),b.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(b,S?"ForInStatement":"ForOfStatement")}parseVar(b,m,x,S=!1){let k=b.declarations=[];for(b.kind=x;;){let O=this.startNode();if(this.parseVarId(O,x),O.init=this.eat(25)?m?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,O.init===null&&!S&&(O.id.type!=="Identifier"&&!(m&&(this.match(54)||this.isContextual(98)))?this.raise(M.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(x==="const"||x==="using"||x==="await using")&&!(this.match(54)||this.isContextual(98))&&this.raise(M.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:x})),k.push(this.finishNode(O,"VariableDeclarator")),!this.eat(8))break}return b}parseVarId(b,m){let x=this.parseBindingAtom();m==="using"||m==="await using"?(x.type==="ArrayPattern"||x.type==="ObjectPattern")&&this.raise(M.UsingDeclarationHasBindingPattern,x):x.type==="VoidPattern"&&this.raise(M.UnexpectedVoidPattern,x),this.checkLVal(x,{type:"VariableDeclarator"},m==="var"?5:8201),b.id=x}parseAsyncFunctionExpression(b){return this.parseFunction(b,8)}parseFunction(b,m=0){let x=m&2,S=!!(m&1),k=S&&!(m&4),O=!!(m&8);return this.initFunction(b,O),this.match(51)&&(x&&this.raise(M.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),b.generator=!0),S&&(b.id=this.parseFunctionId(k)),this.scope.enter(514),this.prodParam.enter(Z0(O,b.generator)),S||(b.id=this.parseFunctionId()),this.parseFunctionParams(b,!1),this.parseFunctionBodyAndFinish(b,S?"FunctionDeclaration":"FunctionExpression"),this.prodParam.exit(),this.scope.exit(),S&&!x&&this.registerFunctionStatementId(b),b}parseFunctionId(b){return b||Wi(this.state.type)?this.parseIdentifier():null}parseFunctionParams(b,m){this.expect(6),this.expressionScope.enter(iye()),b.params=this.parseBindingList(7,41,2|(m?4:0)),this.expressionScope.exit()}registerFunctionStatementId(b){b.id&&this.scope.declareName(b.id.name,!this.options.annexB||this.state.strict||b.generator||b.async?this.scope.treatFunctionsAsVar?5:8201:17,b.id.start)}parseClass(b,m,x){this.next();let S=this.state.strict;return this.state.strict=!0,this.parseClassId(b,m,x),this.parseClassSuper(b),b.body=this.parseClassBody(!!b.superClass,S),this.finishNode(b,m?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(25)||this.match(9)||this.match(4)}isClassMethod(){return this.match(6)}nameIsConstructor(b){return b.type==="Identifier"&&b.name==="constructor"||b.type==="StringLiteral"&&b.value==="constructor"}isNonstaticConstructor(b){return!b.computed&&!b.static&&this.nameIsConstructor(b.key)}parseClassBody(b,m){this.classScope.enter();let x={hadConstructor:!1,hadSuperClass:b},S=[],k=this.startNode();for(k.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(S.length>0)throw this.raise(M.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){S.push(this.parseDecorator());continue}let O=this.startNode();S.length&&(O.decorators=S,this.resetStartLocationFromNode(O,S[0]),S=[]),this.parseClassMember(k,O,x)}if(this.state.strict=m,this.next(),S.length)throw this.raise(M.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(k,"ClassBody")}parseClassMemberFromModifier(b,m){let x=this.parseIdentifier(!0);if(this.isClassMethod()){let S=m;return S.kind="method",S.computed=!1,S.key=x,S.static=!1,this.pushClassMethod(b,S,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let S=m;return S.computed=!1,S.key=x,S.static=!1,b.body.push(this.parseClassProperty(S)),!0}return this.resetPreviousNodeTrailingComments(x),!1}parseClassMember(b,m,x){let S=this.isContextual(102);if(S){if(this.parseClassMemberFromModifier(b,m))return;if(this.eat(2)){this.parseClassStaticBlock(b,m);return}}this.parseClassMemberWithIsStatic(b,m,x,S)}parseClassMemberWithIsStatic(b,m,x,S){let k=m,O=m,G=m,ie=m,be=m,pe=k,lt=k;if(m.static=S,this.parsePropertyNamePrefixOperator(m),this.eat(51)){pe.kind="method";let fc=this.match(134);if(this.parseClassElementName(pe),this.parsePostMemberNameModifiers(pe),fc){this.pushClassPrivateMethod(b,O,!0,!1);return}this.isNonstaticConstructor(k)&&this.raise(M.ConstructorIsGenerator,k.key),this.pushClassMethod(b,k,!0,!1,!1,!1);return}let Mt=!this.state.containsEsc&&Wi(this.state.type),Ui=this.parseClassElementName(m),Zn=Mt?Ui.name:null,Gc=this.isPrivateName(Ui),Yd=this.state.startLoc;if(this.parsePostMemberNameModifiers(lt),this.isClassMethod()){if(pe.kind="method",Gc){this.pushClassPrivateMethod(b,O,!1,!1);return}let fc=this.isNonstaticConstructor(k),pc=!1;fc&&(k.kind="constructor",k.decorators&&k.decorators.length>0&&this.raise(M.DecoratorConstructor,m),x.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(M.DuplicateConstructor,Ui),fc&&this.hasPlugin("typescript")&&m.override&&this.raise(M.OverrideOnConstructor,Ui),x.hadConstructor=!0,pc=x.hadSuperClass),this.pushClassMethod(b,k,!1,!1,fc,pc)}else if(this.isClassProperty())Gc?this.pushClassPrivateProperty(b,ie):this.pushClassProperty(b,G);else if(Zn==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(Ui);let fc=this.eat(51);lt.optional&&this.unexpected(Yd),pe.kind="method";let pc=this.match(134);this.parseClassElementName(pe),this.parsePostMemberNameModifiers(lt),pc?this.pushClassPrivateMethod(b,O,fc,!0):(this.isNonstaticConstructor(k)&&this.raise(M.ConstructorIsAsync,k.key),this.pushClassMethod(b,k,fc,!0,!1,!1))}else if((Zn==="get"||Zn==="set")&&!(this.match(51)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(Ui),pe.kind=Zn;let fc=this.match(134);this.parseClassElementName(k),fc?this.pushClassPrivateMethod(b,O,!1,!1):(this.isNonstaticConstructor(k)&&this.raise(M.ConstructorIsAccessor,k.key),this.pushClassMethod(b,k,!1,!1,!1,!1)),this.checkGetterSetterParams(k)}else if(Zn==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(Ui);let fc=this.match(134);this.parseClassElementName(G),this.pushClassAccessorProperty(b,be,fc)}else this.isLineTerminator()?Gc?this.pushClassPrivateProperty(b,ie):this.pushClassProperty(b,G):this.unexpected()}parseClassElementName(b){let{type:m,value:x}=this.state;if((m===128||m===130)&&b.static&&x==="prototype"&&this.raise(M.StaticPrototype,this.state.startLoc),m===134){x==="constructor"&&this.raise(M.ConstructorClassPrivateField,this.state.startLoc);let S=this.parsePrivateName();return b.key=S,S}return this.parsePropertyName(b),b.key}parseClassStaticBlock(b,m){this.scope.enter(720);let x=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let S=m.body=[];this.parseBlockOrModuleBlockBody(S,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=x,b.body.push(this.finishNode(m,"StaticBlock")),m.decorators?.length&&this.raise(M.DecoratorStaticBlock,m)}pushClassProperty(b,m){!m.computed&&this.nameIsConstructor(m.key)&&this.raise(M.ConstructorClassField,m.key),b.body.push(this.parseClassProperty(m))}pushClassPrivateProperty(b,m){let x=this.parseClassPrivateProperty(m);b.body.push(x),this.classScope.declarePrivateName(this.getPrivateNameSV(x.key),0,x.key.start)}pushClassAccessorProperty(b,m,x){!x&&!m.computed&&this.nameIsConstructor(m.key)&&this.raise(M.ConstructorClassField,m.key);let S=this.parseClassAccessorProperty(m);b.body.push(S),x&&this.classScope.declarePrivateName(this.getPrivateNameSV(S.key),0,S.key.start)}pushClassMethod(b,m,x,S,k,O){b.body.push(this.parseMethod(m,x,S,k,O,"ClassMethod",!0))}pushClassPrivateMethod(b,m,x,S){let k=this.parseMethod(m,x,S,!1,!1,"ClassPrivateMethod",!0);b.body.push(k);let O=k.kind==="get"?k.static?6:2:k.kind==="set"?k.static?5:1:0;this.declareClassPrivateMethodInScope(k,O)}declareClassPrivateMethodInScope(b,m){this.classScope.declarePrivateName(this.getPrivateNameSV(b.key),m,b.key.start)}parsePostMemberNameModifiers(b){}parseClassPrivateProperty(b){return this.parseInitializer(b),this.semicolon(),this.finishNode(b,"ClassPrivateProperty")}parseClassProperty(b){return this.parseInitializer(b),this.semicolon(),this.finishNode(b,"ClassProperty")}parseClassAccessorProperty(b){return this.parseInitializer(b),this.semicolon(),this.finishNode(b,"ClassAccessorProperty")}parseInitializer(b){this.scope.enter(592),this.expressionScope.enter(J5()),this.prodParam.enter(0),b.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(b,m,x,S=8331){if(Wi(this.state.type))b.id=this.parseIdentifier(),m&&this.declareNameFromIdentifier(b.id,S);else if(x||!m)b.id=null;else throw this.raise(M.MissingClassName,this.state.startLoc)}parseClassSuper(b){this.eat(77)?(this.state.canStartArrow=!1,b.superClass=this.parseExprSubscripts()):b.superClass=null}parseExport(b,m){let x=this.parseMaybeImportPhase(b,!0),S=this.maybeParseExportDefaultSpecifier(b,x),k=!S||this.eat(8),O=k&&this.eatExportStar(b),G=O&&this.maybeParseExportNamespaceSpecifier(b),ie=k&&(!G||this.eat(8)),be=S||O;if(O&&!G){if(S&&this.unexpected(),m)throw this.raise(M.UnsupportedDecoratorExport,b);return this.parseExportFrom(b,!0),this.sawUnambiguousESM=!0,this.finishNode(b,"ExportAllDeclaration")}let pe=this.maybeParseExportNamedSpecifiers(b);S&&k&&!O&&!pe&&this.unexpected(null,2),G&&ie&&this.unexpected(null,94);let lt;if(be||pe){if(lt=!1,m)throw this.raise(M.UnsupportedDecoratorExport,b);this.parseExportFrom(b,be)}else lt=this.maybeParseExportDeclaration(b);if(be||pe||lt){let Mt=b;if(this.checkExport(Mt,!0,!1,!!Mt.source),Mt.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(m,Mt.declaration,Mt);else if(m)throw this.raise(M.UnsupportedDecoratorExport,b);return this.sawUnambiguousESM=!0,this.finishNode(Mt,"ExportNamedDeclaration")}if(this.eat(61)){let Mt=b,Ui=this.parseExportDefaultExpression();if(Mt.declaration=Ui,Ui.type==="ClassDeclaration")this.maybeTakeDecorators(m,Ui,Mt);else if(m)throw this.raise(M.UnsupportedDecoratorExport,b);return this.checkExport(Mt,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(Mt,"ExportDefaultDeclaration")}throw this.unexpected(null,2)}eatExportStar(b){return this.eat(51)}maybeParseExportDefaultSpecifier(b,m){if(m||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",m?.start);let x=m||this.parseIdentifier(!0),S=this.startNodeAtNode(x);return S.exported=x,b.specifiers=[this.finishNode(S,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(b){if(this.isContextual(89)){b.specifiers??(b.specifiers=[]);let m=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),m.exported=this.parseModuleExportName(),b.specifiers.push(this.finishNode(m,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(b){if(this.match(2)){let m=b;m.specifiers||(m.specifiers=[]);let x=m.exportKind==="type";return m.specifiers.push(...this.parseExportSpecifiers(x)),m.source=null,m.attributes=[],m.declaration=null,!0}return!1}maybeParseExportDeclaration(b){return this.shouldParseExportDeclaration()?(b.specifiers=[],b.source=null,b.attributes=[],b.declaration=this.parseExportDeclaration(b),!0):!1}isAsyncFunction(){if(!this.isContextual(91))return!1;let b=this.nextTokenInLineStart();return this.isUnparsedContextual(b,"function")}parseExportDefaultExpression(){let b=this.startNode();if(this.match(64))return this.next(),this.parseFunction(b,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(b,13);if(this.match(76))return this.parseClass(b,!0,!0);if(this.match(22))return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(71)||this.match(70)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(M.UnsupportedDefaultExport,this.state.startLoc);let m=this.parseMaybeAssignAllowIn();return this.semicolon(),m}parseExportDeclaration(b){return this.match(76)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:b}=this.state;if(Wi(b)){if(b===91&&!this.state.containsEsc||b===96)return!1;if((b===126||b===125)&&!this.state.containsEsc){let S=this.nextTokenStart(),k=this.input.charCodeAt(S);if(k===123||this.chStartsBindingIdentifier(k,S)&&!this.input.startsWith("from",S))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;let m=this.nextTokenStart(),x=this.isUnparsedContextual(m,"from");if(this.input.charCodeAt(m)===44||Wi(this.state.type)&&x)return!0;if(this.match(61)&&x){let S=this.input.charCodeAt(this.nextTokenStartSince(m+4));return S===34||S===39}return!1}parseExportFrom(b,m){this.eatContextual(94)?(b.source=this.parseImportSource(),this.checkExport(b),this.maybeParseImportAttributes(b)):m&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:b}=this.state;return b===22&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?!0:this.isUsing()?(this.raise(M.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(M.UsingDeclarationExport,this.state.startLoc),!0):b===70||b===71||b===64||b===76||this.isLet()||this.isAsyncFunction()}checkExport(b,m,x,S){if(m){if(x){if(this.checkDuplicateExports(b,"default"),this.hasPlugin("exportDefaultFrom")){let k=b.declaration;k.type==="Identifier"&&k.name==="from"&&k.end-k.start===4&&!k.extra?.parenthesized&&this.raise(M.ExportDefaultFromAsIdentifier,k)}}else if(b.specifiers?.length)for(let k of b.specifiers){let{exported:O}=k,G=O.type==="Identifier"?O.name:O.value;if(this.checkDuplicateExports(k,G),!S&&k.local){let{local:ie}=k;ie.type!=="Identifier"?this.raise(M.ExportBindingIsString,k,{localName:ie.value,exportName:G}):(this.checkReservedWord(ie.name,ie.start,!0,!1),this.scope.checkLocalExport(ie))}}else if(b.declaration){let k=b.declaration;if(k.type==="FunctionDeclaration"||k.type==="ClassDeclaration"){let{id:O}=k;if(!O)throw new Error("Assertion failure");this.checkDuplicateExports(b,O.name)}else if(k.type==="VariableDeclaration")for(let O of k.declarations)this.checkDeclaration(O.id)}}}checkDeclaration(b){if(b.type==="Identifier")this.checkDuplicateExports(b,b.name);else if(b.type==="ObjectPattern")for(let m of b.properties)this.checkDeclaration(m);else if(b.type==="ArrayPattern")for(let m of b.elements)m&&this.checkDeclaration(m);else b.type==="ObjectProperty"?this.checkDeclaration(b.value):b.type==="RestElement"?this.checkDeclaration(b.argument):b.type==="AssignmentPattern"&&this.checkDeclaration(b.left)}checkDuplicateExports(b,m){this.exportedIdentifiers.has(m)&&(m==="default"?this.raise(M.DuplicateDefaultExport,b):this.raise(M.DuplicateExport,b,{exportName:m})),this.exportedIdentifiers.add(m)}parseExportSpecifiers(b){let m=[],x=!0;for(this.expect(2);!this.eat(4);){if(x)x=!1;else if(this.expect(8),this.eat(4))break;let S=this.isContextual(126),k=this.match(130),O=this.startNode();O.local=this.parseModuleExportName(),m.push(this.parseExportSpecifier(O,k,b,S))}return m}parseExportSpecifier(b,m,x,S){return this.eatContextual(89)?b.exported=this.parseModuleExportName():m?b.exported=this.cloneStringLiteral(b.local):b.exported||(b.exported=this.cloneIdentifier(b.local)),this.finishNode(b,"ExportSpecifier")}parseModuleExportName(){if(this.match(130)){let b=this.parseStringLiteral(this.state.value),m=hGe.exec(b.value);return m&&this.raise(M.ModuleExportNameHasLoneSurrogate,b,{surrogateCharCode:m[0].charCodeAt(0)}),b}return this.parseIdentifier(!0)}checkImportPhase(b){let{specifiers:m}=b,x=m.length===1?m[0].type:null;b.phase==="source"?x!=="ImportDefaultSpecifier"&&this.raise(M.SourcePhaseImportRequiresDefault,m[0]):b.phase==="defer"&&x!=="ImportNamespaceSpecifier"&&this.raise(M.DeferImportRequiresNamespace,m[0])}isPotentialImportPhase(b){return b?!1:this.isContextual(101)||this.isContextual(93)}applyImportPhase(b,m,x,S){m||(x==="source"?(this.expectPlugin("sourcePhaseImports",S),b.phase="source"):x==="defer"?(this.expectPlugin("deferredImportEvaluation",S),b.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(b.phase=null))}parseMaybeImportPhase(b,m){if(!this.isPotentialImportPhase(m))return this.applyImportPhase(b,m,null),null;let x=this.startNode(),S=this.parseIdentifierName(!0),{type:k}=this.state;return(Do(k)?k!==94||this.lookaheadCharCode()===102:k!==8)?(this.applyImportPhase(b,m,S,x.start),null):(this.applyImportPhase(b,m,null),this.createIdentifier(x,S))}isPrecedingIdImportPhase(b){let{type:m}=this.state;return Wi(m)?m!==94||this.lookaheadCharCode()===102:m!==8}parseImport(b){return this.match(130)?this.parseImportSourceAndAttributes(b):this.parseImportSpecifiersAndAfter(b,this.parseMaybeImportPhase(b,!1))}parseImportSpecifiersAndAfter(b,m){b.specifiers=[];let x=!this.maybeParseDefaultImportSpecifier(b,m)||this.eat(8),S=x&&this.maybeParseStarImportSpecifier(b);return x&&!S&&this.parseNamedImportSpecifiers(b),this.expectContextual(94),this.parseImportSourceAndAttributes(b)}parseImportSourceAndAttributes(b){return b.specifiers??(b.specifiers=[]),b.source=this.parseImportSource(),this.maybeParseImportAttributes(b),this.checkImportPhase(b),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(b,"ImportDeclaration")}parseImportSource(){return this.match(130)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(b,m,x){m.local=this.parseIdentifier(),b.specifiers.push(this.finishImportSpecifier(m,x))}finishImportSpecifier(b,m,x=8201){return this.checkLVal(b.local,{type:m},x),this.finishNode(b,m)}parseImportAttributes(){this.expect(2);let b=[],m=new Set;do{if(this.match(4))break;let x=this.startNode(),S=this.state.value;if(m.has(S)&&this.raise(M.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:S}),m.add(S),this.match(130)?x.key=this.parseStringLiteral(S):x.key=this.parseIdentifier(!0),this.expect(10),!this.match(130))throw this.raise(M.ModuleAttributeInvalidValue,this.state.startLoc);x.value=this.parseStringLiteral(this.state.value),b.push(this.finishNode(x,"ImportAttribute"))}while(this.eat(8));return this.expect(4),b}maybeParseImportAttributes(b){let m;if(this.match(72)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),m=this.parseImportAttributes()}else m=[];b.attributes=m}maybeParseDefaultImportSpecifier(b,m){if(m){let x=this.startNodeAtNode(m);return x.local=m,b.specifiers.push(this.finishImportSpecifier(x,"ImportDefaultSpecifier")),!0}else if(Do(this.state.type))return this.parseImportSpecifierLocal(b,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(b){if(this.match(51)){let m=this.startNode();return this.next(),this.expectContextual(89),this.parseImportSpecifierLocal(b,m,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(b){let m=!0;for(this.expect(2);!this.eat(4);){if(m)m=!1;else{if(this.eat(10))throw this.raise(M.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}let x=this.startNode(),S=this.match(130),k=this.isContextual(126);x.imported=this.parseModuleExportName();let O=this.parseImportSpecifier(x,S,b.importKind==="type"||b.importKind==="typeof",k,void 0);b.specifiers.push(O)}}parseImportSpecifier(b,m,x,S,k){if(this.eatContextual(89))b.local=this.parseIdentifier();else{let{imported:O}=b;if(m)throw this.raise(M.ImportBindingIsString,b,{importName:O.value});this.checkReservedWord(O.name,b.start,!0,!0),b.local||(b.local=this.cloneIdentifier(O))}return this.finishImportSpecifier(b,"ImportSpecifier",k)}isThisParam(b){return b.type==="Identifier"&&b.name==="this"}},JY=/in(?:stanceof)?|as|satisfies/y;function pGe(b){if(b==null)throw new Error(`Unexpected ${b} value.`);return b}function XY(b){if(!b)throw new Error("Assert fail")}var cye={AbstractMethodHasImplementation:({methodName:b})=>`Method '${b}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:b})=>`Property '${b}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:b})=>`'declare' is not allowed in ${b}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DecoratorAbstractMethod:({kind:b})=>`Decorators can't be used with ${b.startsWith("a")?"an":"a"} ${b}.`,DuplicateAccessibilityModifier:({modifier:b})=>`Accessibility modifier already seen: '${b}'.`,DuplicateModifier:({modifier:b})=>`Duplicate modifier: '${b}'.`,EmptyHeritageClauseType:({token:b})=>`'${b}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ExportAssignmentInTSNamespace:"An export assignment cannot be used in a namespace.",ExportInTSNamespace:"Export declarations are not permitted in a namespace.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportInTSNamespace:"Import declarations in a namespace cannot reference a module.",IncompatibleModifiers:({modifiers:b})=>`'${b[0]}' modifier cannot be used with '${b[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:b})=>`Index signatures cannot have an accessibility modifier ('${b}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",InvalidHeritageClauseType:({token:b})=>`'${b}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:b=>`'${b}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:b})=>`'${b}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:b})=>`'${b}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:b})=>`'${b}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:b=>`'${b}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:b})=>`'${b[0]}' modifier must precede '${b[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NamespaceExportInTSNamespace:"Global module exports may only appear at top level.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:b})=>`Private elements cannot have an accessibility modifier ('${b}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:b})=>`Single type parameter ${b} should have a trailing comma. Example usage: <${b},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterInitializer:"A parameter initializer is only allowed in a function or constructor implementation.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnexpectedTypeDeclaration:b=>`'${b}' declarations can only be declared inside a block.`,UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:b})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${b}.`,UsingDeclarationInAmbientContext:b=>`'${b}' declarations are not allowed in ambient contexts.`},we=U`typescript`(cye);function uye(b){switch(b){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ZY(b){return b==="private"||b==="public"||b==="protected"}function P_(b){return b==="in"||b==="out"}function B_(b){if(b.extra?.parenthesized)return!1;switch(b.type){case"Identifier":return!0;case"MemberExpression":return!b.computed&&B_(b.object);case"TSInstantiationExpression":return B_(b.expression);default:return!1}}var $Y=b=>class extends b{getScopeHandler(){return Wve}tsIsIdentifier(){return Wi(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(2)||this.match(51)||this.match(17)||this.match(134)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(102)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(m,x,S){if(!Wi(this.state.type)&&this.state.type!==54&&this.state.type!==71)return;let k=this.state.value;if(m.includes(k)){if(S&&this.match(102)||x&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return k}}tsParseModifiers({allowedModifiers:m,disallowedModifiers:x,stopOnStartOfClassStaticBlock:S,errorTemplate:k=we.InvalidModifierOnTypeMember},O){let G=(be,pe,lt,Mt)=>{pe===lt&&O[Mt]&&this.raise(we.InvalidModifiersOrder,be,{orderedModifiers:[lt,Mt]})},ie=(be,pe,lt,Mt)=>{(O[lt]&&pe===Mt||O[Mt]&&pe===lt)&&this.raise(we.IncompatibleModifiers,be,{modifiers:[lt,Mt]})};for(;;){let{startLoc:be}=this.state,pe=this.tsParseModifier(m.concat(x??[]),S,O.static);if(!pe)break;ZY(pe)?O.accessibility?this.raise(we.DuplicateAccessibilityModifier,be,{modifier:pe}):(G(be,pe,pe,"override"),G(be,pe,pe,"static"),G(be,pe,pe,"readonly"),O.accessibility=pe):P_(pe)?(O[pe]&&this.raise(we.DuplicateModifier,be,{modifier:pe}),O[pe]=!0,G(be,pe,"in","out")):(p(O,pe)?this.raise(we.DuplicateModifier,be,{modifier:pe}):(G(be,pe,"static","readonly"),G(be,pe,"static","override"),G(be,pe,"override","readonly"),G(be,pe,"abstract","override"),ie(be,pe,"declare","override"),ie(be,pe,"static","abstract")),O[pe]=!0),x?.includes(pe)&&this.raise(k,be,{modifier:pe})}}tsIsListTerminator(m){switch(m){case"EnumMembers":case"TypeMembers":return this.match(4);case"HeritageClauseElement":return this.match(2);case"TupleElementTypes":return this.match(1);case"TypeParametersOrArguments":return this.match(44)}}tsParseList(m,x){let S=[];for(;!this.tsIsListTerminator(m);)S.push(x());return S}tsParseDelimitedList(m,x,S){return pGe(this.tsParseDelimitedListWorker(m,x,!0,S))}tsParseDelimitedListWorker(m,x,S,k){let O=[],G=-1;for(;!this.tsIsListTerminator(m);){G=-1;let ie=x();if(ie==null)return;if(O.push(ie),this.eat(8)){G=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(m))break;S&&this.expect(8);return}return k&&(k.value=G),O}tsParseBracketedList(m,x,S,k,O){k||(S?this.expect(0):this.expect(43));let G=this.tsParseDelimitedList(m,x,O);return S?this.expect(1):this.expect(44),G}tsParseImportType(){let m=this.startNode();return this.expect(79),this.expect(6),this.match(130)?m.source=this.parseStringLiteral(this.state.value):(this.raise(we.UnsupportedImportTypeArgument,this.state.startLoc),m.source=this.tsParseNonConditionalType()),this.eat(8)?m.options=this.tsParseImportTypeOptions():m.options=null,this.expect(7),this.eat(12)&&(m.qualifier=this.tsParseEntityName(3)),this.match(43)&&(m.typeArguments=this.tsParseTypeArguments()),this.finishNode(m,"TSImportType")}tsParseImportTypeOptions(){let m=this.startNode();this.expect(2);let x=this.startNode();return this.isContextual(72)?(x.method=!1,x.key=this.parseIdentifier(!0),x.computed=!1,x.shorthand=!1):this.unexpected(null,72),this.expect(10),x.value=this.tsParseImportTypeWithPropertyValue(),m.properties=[this.finishObjectProperty(x)],this.eat(8),this.expect(4),this.finishNode(m,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let m=this.startNode(),x=[];for(this.expect(2);!this.match(4);){let S=this.state.type;Wi(S)||S===130?x.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(8)}return m.properties=x,this.next(),this.finishNode(m,"ObjectExpression")}tsParseEntityName(m){let x;if(m&1&&this.match(74))if(m&2)x=this.parseIdentifier(!0);else{let S=this.startNode();this.next(),x=this.finishNode(S,"ThisExpression")}else x=this.parseIdentifier(!!(m&1));for(;this.eat(12);){let S=this.startNodeAtNode(x);S.left=x,S.right=this.parseIdentifier(!!(m&1)),x=this.finishNode(S,"TSQualifiedName")}return x}tsParseTypeReference(){let m=this.startNode();return m.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(m.typeArguments=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeReference")}tsParseThisTypePredicate(m){this.next();let x=this.startNodeAtNode(m);return x.parameterName=m,x.typeAnnotation=this.tsParseTypeAnnotation(!1),x.asserts=!1,this.finishNode(x,"TSTypePredicate")}tsParseThisTypeNode(){let m=this.startNode();return this.next(),this.finishNode(m,"TSThisType")}tsParseTypeQuery(){let m=this.startNode();return this.expect(83),this.match(79)?m.exprName=this.tsParseImportType():m.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(m.typeArguments=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:we.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:we.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:we.InvalidModifierOnTypeParameter});tsParseTypeParameter(m){let x=this.startNode();return m(x),x.name=this.tsParseTypeParameterName(),x.constraint=this.tsEatThenParseType(77),x.default=this.tsEatThenParseType(25),this.finishNode(x,"TSTypeParameter")}tsTryParseTypeParameters(m){if(this.match(43))return this.tsParseTypeParameters(m)}tsParseTypeParameters(m){let x=this.startNode();this.match(43)||this.match(138)?this.next():this.unexpected();let S={value:-1};return x.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,m),!1,!0,S),x.params.length===0&&this.raise(we.EmptyTypeParameters,x),S.value!==-1&&this.addExtra(x,"trailingComma",S.value),this.finishNode(x,"TSTypeParameterDeclaration")}tsFillSignature(m,x){let S=m===15,k="params",O="returnType";x.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),x[k]=this.tsParseBindingListForSignature(),S?x[O]=this.tsParseTypeOrTypePredicateAnnotation(m):this.match(m)&&(x[O]=this.tsParseTypeOrTypePredicateAnnotation(m))}tsParseBindingListForSignature(){let m=super.parseBindingList(7,41,2);for(let x of m){let{type:S}=x;(S==="AssignmentPattern"||S==="TSParameterProperty")&&this.raise(we.UnsupportedSignatureParameterKind,x,{type:S})}return m}tsParseTypeMemberSemicolon(){!this.eat(8)&&!this.isLineTerminator()&&this.expect(9)}tsParseSignatureMember(m,x){return this.tsFillSignature(10,x),this.tsParseTypeMemberSemicolon(),this.finishNode(x,m)}tsIsUnambiguouslyIndexSignature(){return this.next(),Wi(this.state.type)?(this.next(),this.match(10)):!1}tsTryParseIndexSignature(m){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let x=this.parseIdentifier();x.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(x),this.expect(1),m.parameters=[x];let S=this.tsTryParseTypeAnnotation();return S&&(m.typeAnnotation=S),this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSIndexSignature")}tsParsePropertyOrMethodSignature(m,x){if(this.eat(13)&&(m.optional=!0),this.match(6)||this.match(43)){x&&this.raise(we.ReadonlyForMethodSignature,m);let S=m;if(S.kind&&this.match(43)&&this.raise(we.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,S),this.tsParseTypeMemberSemicolon(),S.kind==="get")S.params.length>0&&(this.raise(M.BadGetterArity,this.state.curPosition()),this.isThisParam(S.params[0])&&this.raise(we.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(S.kind==="set"){if(S.params.length!==1)this.raise(M.BadSetterArity,this.state.curPosition());else{let k=S.params[0];this.isThisParam(k)&&this.raise(we.AccessorCannotDeclareThisParameter,this.state.curPosition()),k.type==="Identifier"&&k.optional&&this.raise(we.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),k.type==="RestElement"&&this.raise(we.SetAccessorCannotHaveRestParameter,this.state.curPosition())}S.returnType&&this.raise(we.SetAccessorCannotHaveReturnType,S.returnType)}else S.kind="method";return this.finishNode(S,"TSMethodSignature")}else{let S=m;x&&(S.readonly=!0);let k=this.tsTryParseTypeAnnotation();return k&&(S.typeAnnotation=k),this.tsParseTypeMemberSemicolon(),this.finishNode(S,"TSPropertySignature")}}tsParseTypeMember(){let m=this.startNode();if(this.match(6)||this.match(43))return this.tsParseSignatureMember("TSCallSignatureDeclaration",m);if(this.match(73)){let S=this.startNode();return this.next(),this.match(6)||this.match(43)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",m):(m.key=this.createIdentifier(S,"new"),this.tsParsePropertyOrMethodSignature(m,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},m),this.tsTryParseIndexSignature(m)||(super.parsePropertyName(m),!m.computed&&m.key.type==="Identifier"&&(m.key.name==="get"||m.key.name==="set")&&this.tsTokenCanFollowModifier()&&(m.kind=m.key.name,super.parsePropertyName(m),!this.match(6)&&!this.match(43)&&this.unexpected(null,6)),this.tsParsePropertyOrMethodSignature(m,!!m.readonly))}tsParseTypeLiteral(){let m=this.startNode();return m.members=this.tsParseObjectTypeMembers(),this.finishNode(m,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(2);let m=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(4),m}tsIsStartOfMappedType(){return this.next(),this.eat(49)?this.isContextual(118):(this.isContextual(118)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(54)))}tsParseMappedType(){let m=this.startNode();return this.expect(2),this.match(49)?(m.readonly=this.state.value,this.next(),this.expectContextual(118)):this.eatContextual(118)&&(m.readonly=!0),this.expect(0),m.key=this.tsParseTypeParameterName(),m.constraint=this.tsExpectThenParseType(54),m.nameType=this.eatContextual(89)?this.tsParseType():null,this.expect(1),this.match(49)?(m.optional=this.state.value,this.next(),this.expect(13)):this.eat(13)&&(m.optional=!0),m.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(4),this.finishNode(m,"TSMappedType")}tsParseTupleType(){let m=this.startNode();m.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let x=!1;return m.elementTypes.forEach(S=>{let{type:k}=S;x&&k!=="TSRestType"&&k!=="TSOptionalType"&&!(k==="TSNamedTupleMember"&&S.optional)&&this.raise(we.OptionalTypeBeforeRequired,S),x||(x=k==="TSNamedTupleMember"&&S.optional||k==="TSOptionalType")}),this.finishNode(m,"TSTupleType")}tsParseTupleElementType(){let m=this.state.startLoc,x=this.eat(17),{startLoc:S}=this.state,k,O,G,ie,be=Do(this.state.type)?this.lookaheadCharCode():null;if(be===58)k=!0,G=!1,O=this.parseIdentifier(!0),this.expect(10),ie=this.tsParseType();else if(be===63){G=!0;let pe=this.state.value,lt=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(k=!0,O=this.createIdentifier(this.startNodeAt(S),pe),this.expect(13),this.expect(10),ie=this.tsParseType()):(k=!1,ie=lt,this.expect(13))}else ie=this.tsParseType(),G=this.eat(13),k=this.eat(10);if(k){let pe;O?(pe=this.startNodeAt(S),pe.optional=G,pe.label=O,pe.elementType=ie,this.eat(13)&&(pe.optional=!0,this.raise(we.TupleOptionalAfterType,this.state.lastTokStartLoc))):(pe=this.startNodeAt(S),pe.optional=G,this.raise(we.InvalidTupleMemberLabel,ie),pe.label=ie,pe.elementType=this.tsParseType()),ie=this.finishNode(pe,"TSNamedTupleMember")}else if(G){let pe=this.startNodeAt(S);pe.typeAnnotation=ie,ie=this.finishNode(pe,"TSOptionalType")}if(x){let pe=this.startNodeAt(m);pe.typeAnnotation=ie,ie=this.finishNode(pe,"TSRestType")}return ie}tsParseParenthesizedType(){let m=this.startNode();return this.expect(6),m.typeAnnotation=this.tsParseType(),this.expect(7),this.finishNode(m,"TSParenthesizedType")}tsParseFunctionOrConstructorType(m,x){let S=this.startNode();return m==="TSConstructorType"&&(S.abstract=!!x,x&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(15,S)),this.finishNode(S,m)}tsParseLiteralTypeNode(){let m=this.startNode();switch(this.state.type){case 131:case 132:case 130:case 81:case 82:m.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(m,"TSLiteralType")}tsParseTemplateLiteralType(){let m=this.state.startLoc,x=this.parseTemplateElement(!1),S=[x];if(x.tail){let k=this.startNodeAt(m),O=this.startNodeAt(m);return O.expressions=[],O.quasis=S,k.literal=this.finishNode(O,"TemplateLiteral"),this.finishNode(k,"TSLiteralType")}else{let k=[];for(;!x.tail;)k.push(this.tsParseType()),this.readTemplateContinuation(),S.push(x=this.parseTemplateElement(!1));let O=this.startNodeAt(m);return O.types=k,O.quasis=S,this.finishNode(O,"TSTemplateLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let m=this.tsParseThisTypeNode();return this.isContextual(112)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(m):m}tsParseNonArrayType(){switch(this.state.type){case 130:case 131:case 132:case 81:case 82:return this.tsParseLiteralTypeNode();case 49:if(this.state.value==="-"){let m=this.startNode(),x=this.lookahead();return x.type!==131&&x.type!==132&&this.unexpected(),m.literal=this.parseMaybeUnary(),this.finishNode(m,"TSLiteralType")}break;case 74:return this.tsParseThisTypeOrThisTypePredicate();case 83:return this.tsParseTypeQuery();case 79:return this.tsParseImportType();case 2:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 6:if(!(this.optionFlags&2048)){let m=this.state.startLoc;this.next();let x=this.tsParseType();return this.expect(7),this.addExtra(x,"parenthesized",!0),this.addExtra(x,"parenStart",m.index),x}return this.tsParseParenthesizedType();case 21:case 20:return this.tsParseTemplateLiteralType();default:{let{type:m}=this.state;if(Wi(m)||m===84||m===80){let x=m===84?"TSVoidKeyword":m===80?"TSNullKeyword":uye(this.state.value);if(x!==void 0&&this.lookaheadCharCode()!==46){let S=this.startNode();return this.next(),this.finishNode(S,x)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:m}=this.state,x=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(1)){let S=this.startNodeAt(m);S.elementType=x,this.expect(1),x=this.finishNode(S,"TSArrayType")}else{let S=this.startNodeAt(m);S.objectType=x,S.indexType=this.tsParseType(),this.expect(1),x=this.finishNode(S,"TSIndexedAccessType")}return x}tsParseTypeOperator(){let m=this.startNode(),x=this.state.value;return this.next(),m.operator=x,m.typeAnnotation=this.tsParseTypeOperatorOrHigher(),x==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(m),this.finishNode(m,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(m){switch(m.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(we.UnexpectedReadonly,m)}}tsParseInferType(){let m=this.startNode();this.expectContextual(111);let x=this.startNode();return x.name=this.tsParseTypeParameterName(),x.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),m.typeParameter=this.finishNode(x,"TSTypeParameter"),this.finishNode(m,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(77)){let m=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return m}}tsParseTypeOperatorOrHigher(){return pl(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(111)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(m,x,S){let k=this.startNode(),O=this.eat(S),G=[];do G.push(x());while(this.eat(S));return G.length===1&&!O?G[0]:(k.types=G,this.finishNode(k,m))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),41)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),39)}tsIsStartOfFunctionType(){return this.match(43)?!0:this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Wi(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){let{errors:m}=this.state,x=m.length;try{return this.parseObjectLike(4,!0),m.length===x}catch{return!1}}if(this.match(0)){this.next();let{errors:m}=this.state,x=m.length;try{return super.parseBindingList(1,93,1),m.length===x}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(7)||this.match(17)||this.tsSkipParameterStart()&&(this.match(10)||this.match(8)||this.match(13)||this.match(25)||this.match(7)&&(this.next(),this.match(15))))}tsParseTypeOrTypePredicateAnnotation(m){return this.tsInType(()=>{let x=this.startNode();this.expect(m);let S=this.startNode(),k=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(k&&this.match(74)){let ie=this.tsParseThisTypeOrThisTypePredicate();return ie.type==="TSThisType"?(S.parameterName=ie,S.asserts=!0,S.typeAnnotation=null,ie=this.finishNode(S,"TSTypePredicate")):(this.resetStartLocationFromNode(ie,S),ie.asserts=!0),x.typeAnnotation=ie,this.finishNode(x,"TSTypeAnnotation")}let O=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!O)return k?(S.parameterName=this.parseIdentifier(),S.asserts=k,S.typeAnnotation=null,x.typeAnnotation=this.finishNode(S,"TSTypePredicate"),this.finishNode(x,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,x);let G=this.tsParseTypeAnnotation(!1);return S.parameterName=O,S.typeAnnotation=G,S.asserts=k,x.typeAnnotation=this.finishNode(S,"TSTypePredicate"),this.finishNode(x,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(10))return this.tsParseTypeOrTypePredicateAnnotation(10)}tsTryParseTypeAnnotation(){if(this.match(10))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(10)}tsParseTypePredicatePrefix(){let m=this.parseIdentifier();if(this.isContextual(112)&&!this.hasPrecedingLineBreak())return this.next(),m}tsParseTypePredicateAsserts(){if(this.state.type!==105)return!1;let m=this.state.containsEsc;return this.next(),!Wi(this.state.type)&&!this.match(74)?!1:(m&&this.raise(M.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(m=!0,x=this.startNode()){return this.tsInType(()=>{m&&this.expect(10),x.typeAnnotation=this.tsParseType()}),this.finishNode(x,"TSTypeAnnotation")}tsParseType(){XY(this.state.inType);let m=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return m;let x=this.startNodeAtNode(m);return x.checkType=m,x.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(13),x.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(10),x.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(x,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(120)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(73)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(we.ReservedTypeAssertion,this.state.startLoc);let m=this.startNode();return m.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?this.tsParseTypeReference():this.tsParseType())),this.expect(44),m.expression=this.parseMaybeUnary(),this.finishNode(m,"TSTypeAssertion")}tsParseHeritageClause(m){let x=this.state.startLoc,S=this.tsParseDelimitedList("HeritageClauseElement",()=>{let k=(this.state.canStartArrow=!1,super.parseExprSubscripts());B_(k)||this.raise(we.InvalidHeritageClauseType,k.start,{token:m});let O=m==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(k.type==="TSInstantiationExpression")return k.type=O,k;let G=this.startNodeAtNode(k);return G.expression=k,(this.match(43)||this.match(47))&&(G.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(G,O)});return S.length||this.raise(we.EmptyHeritageClauseType,x,{token:m}),S}tsParseInterfaceDeclaration(m,x={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),x.declare&&(m.declare=!0),Wi(this.state.type)?(m.id=this.parseIdentifier(),this.checkIdentifier(m.id,130)):(m.id=null,this.raise(we.MissingInterfaceName,this.state.startLoc)),m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(m.extends=this.tsParseHeritageClause("extends"));let S=this.startNode();return S.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),m.body=this.finishNode(S,"TSInterfaceBody"),this.finishNode(m,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(m){return m.id=this.parseIdentifier(),this.checkIdentifier(m.id,2),m.typeAnnotation=this.tsInType(()=>{if(m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(25),this.isContextual(110)&&this.lookaheadCharCode()!==46){let x=this.startNode();return this.next(),this.finishNode(x,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(m,"TSTypeAliasDeclaration")}tsInTopLevelContext(m){if(this.curContext()!==_o.brace){let x=this.state.context;this.state.context=[x[0]];try{return m()}finally{this.state.context=x}}else return m()}tsInType(m){let x=this.state.inType;this.state.inType=!0;try{return m()}finally{this.state.inType=x}}tsInDisallowConditionalTypesContext(m){let x=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return m()}finally{this.state.inDisallowConditionalTypesContext=x}}tsInAllowConditionalTypesContext(m){let x=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return m()}finally{this.state.inDisallowConditionalTypesContext=x}}tsEatThenParseType(m){if(this.match(m))return this.tsNextThenParseType()}tsExpectThenParseType(m){return this.tsInType(()=>(this.expect(m),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let m=this.startNode();return m.id=this.match(130)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(25)&&(m.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(m,"TSEnumMember")}tsParseEnumDeclaration(m,x={}){return x.const&&(m.const=!0),x.declare&&(m.declare=!0),this.expectContextual(122),m.id=this.parseIdentifier(),this.checkIdentifier(m.id,m.const?8971:8459),m.body=this.tsParseEnumBody(),this.finishNode(m,"TSEnumDeclaration")}tsParseEnumBody(){let m=this.startNode();return this.expect(2),m.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(m,"TSEnumBody")}tsParseModuleBlock(m){let x=this.startNode();return m||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(x.body=[],void 0,!0,4),m||this.scope.exit(),this.finishNode(x,"TSModuleBlock")}tsParseNamespaceDeclaration(m){return m.id=this.tsParseEntityName(0),m.id.type==="Identifier"&&this.checkIdentifier(m.id,1024),this.scope.enter(2048),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(m,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(m){let x=this.isContextual(108);return x?(m.kind="global",m.id=this.parseIdentifier()):(m.kind="module",m.id=super.parseStringLiteral(this.state.value)),this.match(2)?(x||this.scope.enter(1024),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(x),this.prodParam.exit(),x||this.scope.exit()):this.semicolon(),this.finishNode(m,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(m,x){m.id=x||this.parseIdentifier(),this.checkIdentifier(m.id,4096),this.expect(25);let S=this.tsParseModuleReference();return m.importKind==="type"&&S.type!=="TSExternalModuleReference"&&this.raise(we.ImportAliasHasImportType,S),m.moduleReference=S,this.semicolon(),this.finishNode(m,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(115)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let m=this.startNode();return this.expectContextual(115),this.expect(6),this.match(130)||this.unexpected(),m.expression=super.parseExprAtom(),this.expect(7),this.sawUnambiguousESM=!0,this.finishNode(m,"TSExternalModuleReference")}tsLookAhead(m){let x=this.state.clone(),S=m();return this.state=x,S}tsTryParseAndCatch(m){let x=this.tryParse(S=>m()||S());if(!(x.aborted||!x.node))return x.error&&(this.state=x.failState),x.node}tsTryParse(m){let x=this.state.clone(),S=m();if(S!==void 0&&S!==!1)return S;this.state=x}tsTryParseDeclare(m){if(this.isLineTerminator())return;let x=this.state.type;return this.tsInAmbientContext(()=>{switch(x){case 64:return m.declare=!0,super.parseFunctionStatement(m,!1,!1);case 76:return m.declare=!0,this.parseClass(m,!0,!1);case 122:return this.tsParseEnumDeclaration(m,{declare:!0});case 108:return this.tsParseAmbientExternalModuleDeclaration(m);case 96:if(this.state.containsEsc)return;case 71:case 70:return!this.match(71)||!this.isLookaheadContextual("enum")?(m.declare=!0,this.parseVarStatement(m,this.state.value,!0)):(this.expect(71),this.tsParseEnumDeclaration(m,{const:!0,declare:!0}));case 103:if(this.isUsing())return this.raise(we.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),m.declare=!0,this.parseVarStatement(m,"using",!0);break;case 92:if(this.isAwaitUsing())return this.raise(we.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),m.declare=!0,this.next(),this.parseVarStatement(m,"await using",!0);break;case 125:{let S=this.tsParseInterfaceDeclaration(m,{declare:!0});if(S)return S}default:if(Wi(x))return this.tsParseDeclaration(m,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(m,x,S,k){switch(x){case 120:if(this.tsCheckLineTerminator(S)&&(this.match(76)||Wi(this.state.type)))return this.tsParseAbstractDeclaration(m,k);break;case 123:if(this.tsCheckLineTerminator(S))return this.tsParseAmbientExternalModuleDeclaration(m);break;case 124:if(this.tsCheckLineTerminator(S)&&Wi(this.state.type))return m.kind="namespace",this.tsParseNamespaceDeclaration(m);break;case 126:if(this.tsCheckLineTerminator(S)&&Wi(this.state.type))return this.tsParseTypeAliasDeclaration(m);break}}tsCheckLineTerminator(m){return m?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(m){if(!this.match(43))return;let x=this.tsTryParseAndCatch(()=>{let S=this.startNodeAt(m);return S.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(S),S.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),S});if(x)return super.parseArrowExpression(x,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===43)return this.tsParseTypeArguments()}tsParseTypeArguments(){let m=this.startNode();return m.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),m.params.length===0?this.raise(we.EmptyTypeArguments,m):!this.state.inType&&this.curContext()===_o.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(m,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return tr(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(m,x){let S=x.length?null:this.state.startLoc,k={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},k);let O=k.accessibility,G=k.override,ie=k.readonly;!(m&4)&&(O||ie||G)&&this.raise(we.UnexpectedParameterModifier,S||x[0]);let be=this.state.startLoc,pe=this.parseMaybeDefault(be);m&2&&this.parseFunctionParamType(pe);let lt=this.parseMaybeDefault(be,pe);if(O||ie||G){let Mt=S?this.startNodeAt(S):this.startNodeAtNode(x[0]);return x.length?Mt.decorators=x:this.setLoc(S),O&&(Mt.accessibility=O),ie&&(Mt.readonly=ie),G&&(Mt.override=G),lt.type!=="Identifier"&<.type!=="AssignmentPattern"&&this.raise(we.UnsupportedParameterPropertyKind,S||x[0]),Mt.parameter=lt,this.finishNode(Mt,"TSParameterProperty")}return x.length&&(pe.decorators=x),lt}isSimpleParameter(m){return m.type==="TSParameterProperty"&&super.isSimpleParameter(m.parameter)||super.isSimpleParameter(m)}tsDisallowOptionalPattern(m){for(let x of m.params)x.type!=="Identifier"&&x.optional&&!this.state.isAmbientContext&&this.raise(we.PatternIsOptional,x)}setArrowFunctionParameters(m,x,S){super.setArrowFunctionParameters(m,x,S),this.tsDisallowOptionalPattern(m)}parseFunctionBodyAndFinish(m,x,S=!1){this.match(10)&&(m.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));let k=x==="FunctionDeclaration"?"TSDeclareFunction":x==="ClassMethod"||x==="ClassPrivateMethod"?"TSDeclareMethod":void 0;if(k&&!this.match(2)&&this.isLineTerminator()){if(k==="TSDeclareMethod"&&m.kind==="constructor")for(let O of m.params)O.type==="TSParameterProperty"?this.raise(we.UnexpectedParameterModifier,O):O.type==="AssignmentPattern"&&this.raise(we.UnexpectedParameterInitializer,O);else for(let O of m.params)O.type==="AssignmentPattern"&&this.raise(we.UnexpectedParameterInitializer,O);return this.finishNode(m,k)}return k&&this.state.isAmbientContext&&(this.raise(we.DeclareFunctionHasImplementation,this.state.startLoc),k==="TSDeclareFunction"&&m.declare)?super.parseFunctionBodyAndFinish(m,k,S):(this.tsDisallowOptionalPattern(m),super.parseFunctionBodyAndFinish(m,x,S))}registerFunctionStatementId(m){!m.body&&m.id?this.checkIdentifier(m.id,1024):super.registerFunctionStatementId(m)}tsCheckForInvalidTypeCasts(m){m.forEach(x=>{x?.type==="TSTypeCastExpression"&&this.raise(we.UnexpectedTypeAnnotation,x.typeAnnotation)})}toReferencedList(m,x){return this.tsCheckForInvalidTypeCasts(m),m}parseArrayLike(m,x){let S=super.parseArrayLike(m,x);return S.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(S.elements),S}parseSubscript(m,x,S,k){if(!this.hasPrecedingLineBreak()&&this.match(31)){this.state.canStartJSXElement=!1,this.next();let G=this.startNodeAt(x);return G.expression=m,this.finishNode(G,"TSNonNullExpression")}let O=!1;if(this.match(14)&&this.lookaheadCharCode()===60){if(S)return k.stop=!0,m;k.optionalChainMember=O=!0,this.next()}if(this.match(43)||this.match(47)){let G,ie=this.tsTryParseAndCatch(()=>{if(!S&&this.atPossibleAsyncArrow(m)){let Mt=this.tsTryParseGenericAsyncArrowFunction(x);if(Mt)return k.stop=!0,Mt}let be=this.tsParseTypeArgumentsInExpression();if(!be)return;if(O&&!this.match(6)){G=this.state.curPosition();return}if(Yi(this.state.type)){let Mt=super.parseTaggedTemplateExpression(m,x,k);return Mt.typeArguments=be,Mt}if(!S&&this.eat(6)){let Mt=this.startNodeAt(x);return Mt.callee=m,Mt.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(Mt.arguments),Mt.typeArguments=be,k.optionalChainMember&&(Mt.optional=O),this.finishCallExpression(Mt,k.optionalChainMember)}let pe=this.state.type;if(pe===44||pe===48||pe!==6&&pe!==89&&pe!==116&&gr(pe)&&!this.hasPrecedingLineBreak())return;let lt=this.startNodeAt(x);return lt.expression=m,lt.typeArguments=be,this.finishNode(lt,"TSInstantiationExpression")});if(G&&this.unexpected(G,6),ie)return ie.type==="TSInstantiationExpression"&&((this.match(12)||this.match(14)&&this.lookaheadCharCode()!==40)&&this.raise(we.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(12)&&!this.match(14)&&(ie.expression=super.stopParseSubscript(m,k))),ie}return super.parseSubscript(m,x,S,k)}parseNewCallee(m){super.parseNewCallee(m);let{callee:x}=m;x.type==="TSInstantiationExpression"&&!x.extra?.parenthesized&&(m.typeArguments=x.typeArguments,m.callee=x.expression)}parseExprOp(m,x,S){let k;if(Or(54)>S&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(k=this.isContextual(116)))){let O=this.startNodeAt(x);O.expression=m,O.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(k&&this.raise(M.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()));let G=this.finishNode(O,k?"TSSatisfiesExpression":"TSAsExpression");return this.reScan_lt_gt(),this.parseExprOp(G,x,S)}return super.parseExprOp(m,x,S)}checkReservedWord(m,x,S,k){this.state.isAmbientContext||super.checkReservedWord(m,x,S,k)}checkDuplicateExports(){}isPotentialImportPhase(m){if(super.isPotentialImportPhase(m))return!0;if(this.isContextual(126)){let x=this.lookaheadCharCode();return m?x===123||x===42:x!==61}return!m&&this.isContextual(83)}applyImportPhase(m,x,S,k){super.applyImportPhase(m,x,S,k),x?m.exportKind=S==="type"?"type":"value":m.importKind=S==="type"||S==="typeof"?S:"value"}parseImport(m){if(this.match(130))return m.importKind="value",this.scope.inTSNamespace&&this.raise(we.ImportInTSNamespace,m),super.parseImport(m);let x;if(Wi(this.state.type)&&this.lookaheadCharCode()===61){m.importKind="value";let S=this.tsParseImportEqualsDeclaration(m);return this.scope.inTSNamespace&&S.moduleReference.type==="TSExternalModuleReference"&&this.raise(we.ImportInTSNamespace,m),S}else if(this.isContextual(126)){let S=this.parseMaybeImportPhase(m,!1);if(this.lookaheadCharCode()===61)return this.scope.inTSNamespace&&this.raise(we.ImportInTSNamespace,m),this.tsParseImportEqualsDeclaration(m,S);x=super.parseImportSpecifiersAndAfter(m,S)}else x=super.parseImport(m);return x.importKind==="type"&&x.specifiers.length>1&&x.specifiers[0].type==="ImportDefaultSpecifier"?this.raise(we.TypeImportCannotSpecifyDefaultAndNamed,x):this.scope.inTSNamespace&&this.raise(we.ImportInTSNamespace,x),x}parseExport(m,x){if(this.match(79)){let S=this.startNode();this.next();let k=null;this.isContextual(126)&&this.isPotentialImportPhase(!1)?k=this.parseMaybeImportPhase(S,!1):S.importKind="value";let O=this.tsParseImportEqualsDeclaration(S,k);return m.attributes=[],m.declaration=O,m.exportKind="value",m.source=null,m.specifiers=[],this.finishNode(m,"ExportNamedDeclaration")}else if(this.eat(25)){let S=m;return S.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(we.ExportAssignmentInTSNamespace,S),this.finishNode(S,"TSExportAssignment")}else if(this.eatContextual(89)){let S=m;return this.expectContextual(124),S.id=this.parseIdentifier(),this.checkIdentifier(S.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(we.NamespaceExportInTSNamespace,S),this.finishNode(S,"TSNamespaceExportDeclaration")}else{let S=super.parseExport(m,x);return this.scope.inTSNamespace&&(S.type!=="ExportNamedDeclaration"||S.source||!S.declaration&&!this.state.isAmbientContext)&&this.raise(we.ExportInTSNamespace,S),S}}isAbstractClass(){return this.isContextual(120)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let m=this.startNode();return this.next(),m.abstract=!0,this.parseClass(m,!0,!0)}if(this.match(125)){let m=this.tsParseInterfaceDeclaration(this.startNode());if(m)return m}return super.parseExportDefaultExpression()}parseVarStatement(m,x,S=!1){let{isAmbientContext:k}=this.state,O=super.parseVarStatement(m,x,S||k);if(!k)return O;if(!m.declare&&(x==="using"||x==="await using"))return this.raiseOverwrite(we.UsingDeclarationInAmbientContext,m,x),O;for(let{id:G,init:ie}of O.declarations)ie&&(x==="var"||x==="let"||G.typeAnnotation?this.raise(we.InitializerNotAllowedInAmbientContext,ie):Sw(ie,this.hasPlugin("estree"))||this.raise(we.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,ie));return O}parseStatementContent(m,x){let S=!!(m&2);if(!this.state.containsEsc)switch(this.state.type){case 71:{if(this.isLookaheadContextual("enum")){let k=this.startNode();return this.next(),this.tsParseEnumDeclaration(k,{const:!0})}break}case 120:case 121:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let k=this.state.type,O=this.startNode();this.next();let G=k===121?this.tsTryParseDeclare(O):this.tsParseAbstractDeclaration(O,x);return G?(k===121&&(G.declare=!0),G):(O.expression=this.createIdentifier(this.startNodeAtNode(O),k===121?"declare":"abstract"),this.semicolon(!1),this.finishNode(O,"ExpressionStatement"))}break}case 122:return this.tsParseEnumDeclaration(this.startNode());case 108:{if(this.lookaheadCharCode()===123){let k=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(k)}break}case 125:{let k=this.tsParseInterfaceDeclaration(this.startNode());if(k)return S||this.raise(we.UnexpectedTypeDeclaration,k,"interface"),k;break}case 123:{if(this.nextTokenIsStringLiteralOnSameLine()){let k=this.startNode();return this.next(),this.tsParseDeclaration(k,123,!1,x)}else if(this.nextTokenIsIdentifierOnSameLine()){this.raise(we.InlineModuleDeclarationMustUseString,this.state.startLoc);let k=this.startNode();return this.next(),this.tsParseDeclaration(k,124,!1,x)}break}case 124:{if(this.nextTokenIsIdentifierOnSameLine()){let k=this.startNode();return this.next(),this.tsParseDeclaration(k,124,!1,x)}break}case 126:{if(this.nextTokenIsIdentifierOnSameLine()){let k=this.startNode();return S||this.raise(we.UnexpectedTypeDeclaration,k,"type"),this.next(),this.tsParseTypeAliasDeclaration(k)}break}}return super.parseStatementContent(m,x)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(m,x){return x.some(S=>ZY(S)?m.accessibility===S:!!m[S])}tsIsStartOfStaticBlocks(){return this.isContextual(102)&&this.lookaheadCharCode()===123}parseClassMember(m,x,S){let k=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:k,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:we.InvalidModifierOnTypeParameterPositions},x);let O=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(x,k)&&this.raise(we.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(m,x)):this.parseClassMemberWithIsStatic(m,x,S,!!x.static)};x.declare?this.tsInAmbientContext(O):O(),x.decorators&&x.decorators.length>0&&!this.hasPlugin("decorators-legacy")&&(x.type==="TSAbstractMethodDefinition"||x.type==="TSDeclareMethod"?this.raise(we.DecoratorAbstractMethod,x,{kind:"abstract method"}):(x.type==="ClassProperty"&&x.abstract||x.type==="ClassProperty"&&x.declare||x.type==="TSAbstractPropertyDefinition"||x.type==="PropertyDefinition"&&x.declare)&&this.raise(we.DecoratorAbstractMethod,x,{kind:x.declare?"declare field":"abstract field"}))}parseClassMemberWithIsStatic(m,x,S,k){let O=this.tsTryParseIndexSignature(x);if(O){m.body.push(O),x.abstract&&this.raise(we.IndexSignatureHasAbstract,x),x.accessibility&&this.raise(we.IndexSignatureHasAccessibility,x,{modifier:x.accessibility}),x.declare&&this.raise(we.IndexSignatureHasDeclare,x),x.override&&this.raise(we.IndexSignatureHasOverride,x);return}!this.state.inAbstractClass&&x.abstract&&this.raise(we.NonAbstractClassHasAbstractMethod,x),x.override&&(S.hadSuperClass||this.raise(we.OverrideNotInSubClass,x)),super.parseClassMemberWithIsStatic(m,x,S,k)}parsePostMemberNameModifiers(m){this.eat(13)&&(m.optional=!0),m.readonly&&this.match(6)&&this.raise(we.ClassMethodHasReadonly,m),m.declare&&this.match(6)&&this.raise(we.ClassMethodHasDeclare,m)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(m,x,S){if(!this.match(13))return m;if(S!=null){let G=this.lookaheadCharCode();if(G===44||G===61||G===58||G===41)return this.setOptionalParametersError(S),m}this.next();let k=this.startNodeAt(x);k.test=m;let O=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,k.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=O,this.expect(10),k.alternate=this.parseMaybeAssign(),this.finishNode(k,"ConditionalExpression")}parseParenItem(m,x){let S=super.parseParenItem(m,x);if(this.eat(13)&&(S.optional=!0,this.resetEndLocation(m)),this.match(10)){let k=this.startNodeAt(x);return k.expression=m,k.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(k,"TSTypeCastExpression")}return m}parseExportDeclaration(m){if(!this.state.isAmbientContext&&this.isContextual(121))return this.tsInAmbientContext(()=>this.parseExportDeclaration(m));let x=this.state.startLoc,S=this.eatContextual(121);if(S&&(this.isContextual(121)||!this.shouldParseExportDeclaration()))throw this.raise(we.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let k=Wi(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(m);return k?((k.type==="TSInterfaceDeclaration"||k.type==="TSTypeAliasDeclaration"||S)&&(m.exportKind="type"),S&&k.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(k,x),k.declare=!0),k):null}parseClassId(m,x,S,k){if((!x||S)&&this.isContextual(109)){m.id=null;return}super.parseClassId(m,x,S,m.declare?1024:8331);let O=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);O&&(m.typeParameters=O)}parseClassPropertyAnnotation(m){m.optional||(this.eat(31)?m.definite=!0:this.eat(13)&&(m.optional=!0));let x=this.tsTryParseTypeAnnotation();x&&(m.typeAnnotation=x)}parseClassProperty(m){if(this.parseClassPropertyAnnotation(m),this.state.isAmbientContext&&!(m.readonly&&!m.typeAnnotation)&&this.match(25)&&this.raise(we.DeclareClassFieldHasInitializer,this.state.startLoc),m.abstract&&this.match(25)){let{key:x}=m;this.raise(we.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:x.type==="Identifier"&&!m.computed?x.name:`[${this.input.slice(this.offsetToSourcePos(x.start),this.offsetToSourcePos(x.end))}]`})}return super.parseClassProperty(m)}parseClassPrivateProperty(m){return m.abstract&&this.raise(we.PrivateElementHasAbstract,m),m.accessibility&&this.raise(we.PrivateElementHasAccessibility,m,{modifier:m.accessibility}),this.parseClassPropertyAnnotation(m),super.parseClassPrivateProperty(m)}parseClassAccessorProperty(m){return this.parseClassPropertyAnnotation(m),m.optional&&this.raise(we.AccessorCannotBeOptional,m),super.parseClassAccessorProperty(m)}pushClassMethod(m,x,S,k,O,G){let ie=this.tsTryParseTypeParameters(this.tsParseConstModifier);ie&&O&&this.raise(we.ConstructorHasTypeParameters,ie);let{declare:be=!1,kind:pe}=x;be&&(pe==="get"||pe==="set")&&this.raise(we.DeclareAccessor,x,{kind:pe}),ie&&(x.typeParameters=ie),super.pushClassMethod(m,x,S,k,O,G)}pushClassPrivateMethod(m,x,S,k){let O=this.tsTryParseTypeParameters(this.tsParseConstModifier);O&&(x.typeParameters=O),super.pushClassPrivateMethod(m,x,S,k)}declareClassPrivateMethodInScope(m,x){m.type!=="TSDeclareMethod"&&(m.type==="MethodDefinition"&&m.value.body==null||super.declareClassPrivateMethodInScope(m,x))}parseClassSuper(m){if(super.parseClassSuper(m),m.superClass)if(m.superClass.type==="TSInstantiationExpression"){let x=m.superClass,S=x.expression;this.takeSurroundingComments(S,S.start,S.end);let k=x.typeArguments;this.takeSurroundingComments(k,k.start,k.end),m.superClass=S,m.superTypeArguments=k}else(this.match(43)||this.match(47))&&(m.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(109)&&(m.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(m,x,S,k,O,G,ie){let be=this.tsTryParseTypeParameters(this.tsParseConstModifier);return be&&(m.typeParameters=be),super.parseObjPropValue(m,x,S,k,O,G,ie)}parseFunctionParams(m,x){let S=this.tsTryParseTypeParameters(this.tsParseConstModifier);S&&(m.typeParameters=S),super.parseFunctionParams(m,x)}parseVarId(m,x){super.parseVarId(m,x),m.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(31)&&(m.definite=!0);let S=this.tsTryParseTypeAnnotation();S&&(m.id.typeAnnotation=S,this.resetEndLocation(m.id))}parseAsyncArrowFromCallExpression(m,x){return this.match(10)&&(m.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(m,x)}parseMaybeAssign(m,x){let S,k,O;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(S=this.state.clone(),k=this.tryParse(()=>super.parseMaybeAssign(m,x),S),!k.error)return k.node;let{context:be}=this.state,pe=be[be.length-1];(pe===_o.j_oTag||pe===_o.j_expr)&&be.pop()}if(!k?.error&&!this.match(43))return super.parseMaybeAssign(m,x);(!S||S===this.state)&&(S=this.state.clone());let G,ie=this.tryParse(be=>{G=this.tsParseTypeParameters(this.tsParseConstModifier);let pe=super.parseMaybeAssign(m,x);if((pe.type!=="ArrowFunctionExpression"||pe.extra?.parenthesized)&&be(),G?.params.length!==0&&this.resetStartLocationFromNode(pe,G),pe.typeParameters=G,this.hasPlugin("jsx")&&pe.typeParameters.params.length===1&&!pe.typeParameters.extra?.trailingComma){let lt=pe.typeParameters.params[0];lt.constraint||this.raise(we.SingleTypeParameterWithoutTrailingComma,this.optionFlags&256?v(lt.loc.end,1):lt,{typeParameterName:lt.name.name})}return pe},S);if(!ie.error&&!ie.aborted)return G&&this.reportReservedArrowTypeParam(G),ie.node;if(!k&&(XY(!this.hasPlugin("jsx")),O=this.tryParse(()=>super.parseMaybeAssign(m,x),S),!O.error))return O.node;if(k?.node)return this.state=k.failState,k.node;if(ie.node)return this.state=ie.failState,G&&this.reportReservedArrowTypeParam(G),ie.node;if(O?.node)return this.state=O.failState,O.node;throw k?.error||ie.error||O?.error}reportReservedArrowTypeParam(m){m.params.length===1&&!m.params[0].constraint&&!m.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(we.ReservedArrowTypeParam,m)}parseMaybeUnary(m,x){return!this.hasPlugin("jsx")&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(m,x)}parseArrow(m){if(this.match(10)){let x=this.tryParse(S=>{let k=this.tsParseTypeOrTypePredicateAnnotation(10);return(this.canInsertSemicolon()||!this.match(15))&&S(),k});if(x.aborted)return;x.thrown||(x.error&&(this.state=x.failState),m.returnType=x.node)}return super.parseArrow(m)}parseFunctionParamType(m){this.eat(13)&&(m.optional=!0);let x=this.tsTryParseTypeAnnotation();return x&&(m.typeAnnotation=x),this.resetEndLocation(m),m}isAssignable(m,x){switch(m.type){case"TSTypeCastExpression":return this.isAssignable(m.expression,x);case"TSParameterProperty":return!0;default:return super.isAssignable(m,x)}}toAssignable(m,x=!1){switch(m.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(m,x);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":x?this.expressionScope.recordArrowParameterBindingError(we.UnexpectedTypeCastInParameter,m):this.raise(we.UnexpectedTypeCastInParameter,m),this.toAssignable(m.expression,x);break;case"AssignmentExpression":!x&&m.left.type==="TSTypeCastExpression"&&(m.left=this.typeCastToParameter(m.left));default:super.toAssignable(m,x)}}toAssignableParenthesizedExpression(m,x){switch(m.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(m.expression,x);break;default:super.toAssignable(m,x)}}checkToRestConversion(m,x){switch(m.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(m.expression,!1);break;default:super.checkToRestConversion(m,x)}}isValidLVal(m,x,S,k){switch(m){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(k!==64||!S)&&["expression",!0];default:return super.isValidLVal(m,x,S,k)}}parseBindingAtom(){return this.state.type===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(m,x){if(this.match(43)||this.match(47)){let S=this.tsParseTypeArgumentsInExpression();if(this.match(6)){let k=super.parseMaybeDecoratorArguments(m,x);return k.typeArguments=S,k}this.unexpected(null,6)}return super.parseMaybeDecoratorArguments(m,x)}checkCommaAfterRest(m){return this.state.isAmbientContext&&this.match(8)&&this.lookaheadCharCode()===m?(this.next(),!1):super.checkCommaAfterRest(m)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(31)||this.match(10)||super.isClassProperty()}parseMaybeDefault(m,x){let S=super.parseMaybeDefault(m,x);return S.type==="AssignmentPattern"&&S.typeAnnotation&&S.right.startthis.isAssignable(x,!0)):super.shouldParseArrow(m)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(m){let x=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;let S=super.parseParenAndDistinguishExpression(m);return this.state.inConditionalConsequent=x,S}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(m){if(this.match(43)||this.match(47)){let x=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());x&&(m.typeArguments=x)}return super.jsxParseOpeningElementAfterName(m)}getGetterSetterExpectedParamCount(m){let x=super.getGetterSetterExpectedParamCount(m),S=this.getObjectOrClassMethodParams(m)[0];return S&&this.isThisParam(S)?x+1:x}parseCatchClauseParam(){let m=super.parseCatchClauseParam(),x=this.tsTryParseTypeAnnotation();return x&&(m.typeAnnotation=x,this.resetEndLocation(m)),m}tsInAmbientContext(m){let{isAmbientContext:x,strict:S}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return m()}finally{this.state.isAmbientContext=x,this.state.strict=S}}parseClass(m,x,S){let k=this.state.inAbstractClass;this.state.inAbstractClass=!!m.abstract;try{return super.parseClass(m,x,S)}finally{this.state.inAbstractClass=k}}tsParseAbstractDeclaration(m,x){if(this.match(76))return m.abstract=!0,this.maybeTakeDecorators(x,this.parseClass(m,!0,!1));if(this.isContextual(125))return this.hasFollowingLineBreak()?null:(m.abstract=!0,this.raise(we.NonClassMethodPropertyHasAbstractModifier,m),this.tsParseInterfaceDeclaration(m));throw this.unexpected(null,76)}parseMethod(m,x,S,k,O,G,ie){let be=super.parseMethod(m,x,S,k,O,G,ie);if((be.abstract||be.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?be.value:be).body){let{key:pe}=be;this.raise(we.AbstractMethodHasImplementation,be,{methodName:pe.type==="Identifier"&&!be.computed?pe.name:`[${this.input.slice(this.offsetToSourcePos(pe.start),this.offsetToSourcePos(pe.end))}]`})}return be}tsParseTypeParameterName(){return this.parseIdentifier()}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(m,x,S,k){return!x&&k?(this.parseTypeOnlyImportExportSpecifier(m,!1,S),this.finishNode(m,"ExportSpecifier")):(m.exportKind="value",super.parseExportSpecifier(m,x,S,k))}parseImportSpecifier(m,x,S,k,O){return!x&&k?(this.parseTypeOnlyImportExportSpecifier(m,!0,S),this.finishNode(m,"ImportSpecifier")):(m.importKind="value",super.parseImportSpecifier(m,x,S,k,S?4098:4096))}parseTypeOnlyImportExportSpecifier(m,x,S){let k=x?"imported":"local",O=x?"local":"exported",G=m[k],ie,be=!1,pe=!0,lt=G.start;if(this.isContextual(89)){let Ui=this.parseIdentifier();if(this.isContextual(89)){let Zn=this.parseIdentifier();Do(this.state.type)?(be=!0,G=Ui,ie=x?this.parseIdentifier():this.parseModuleExportName(),pe=!1):(ie=Zn,pe=!1)}else Do(this.state.type)?(pe=!1,ie=x?this.parseIdentifier():this.parseModuleExportName()):(be=!0,G=Ui)}else Do(this.state.type)&&(be=!0,x?(G=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(G.name,G.start,!0,!0)):G=this.parseModuleExportName());be&&S&&this.raise(x?we.TypeModifierIsUsedInTypeImports:we.TypeModifierIsUsedInTypeExports,lt),m[k]=G,m[O]=ie;let Mt=x?"importKind":"exportKind";m[Mt]=be?"type":"value",pe&&this.eatContextual(89)&&(m[O]=x?this.parseIdentifier():this.parseModuleExportName()),m[O]||(m[O]=this.cloneIdentifier(m[k])),x&&this.checkIdentifier(m[O],be?4098:4096)}fillOptionalPropertiesForTSESLint(m){switch(m.type){case"ExpressionStatement":m.directive??(m.directive=void 0);return;case"RestElement":m.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":m.decorators??(m.decorators=[]),m.optional??(m.optional=!1),m.typeAnnotation??(m.typeAnnotation=void 0);return;case"TSParameterProperty":m.accessibility??(m.accessibility=void 0),m.decorators??(m.decorators=[]),m.override??(m.override=!1),m.readonly??(m.readonly=!1),m.static??(m.static=!1);return;case"TSEmptyBodyFunctionExpression":m.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":m.declare??(m.declare=!1),m.returnType??(m.returnType=void 0),m.typeParameters??(m.typeParameters=void 0);return;case"Property":m.optional??(m.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":m.optional??(m.optional=!1);case"TSIndexSignature":m.accessibility??(m.accessibility=void 0),m.readonly??(m.readonly=!1),m.static??(m.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":m.declare??(m.declare=!1),m.definite??(m.definite=!1),m.readonly??(m.readonly=!1),m.typeAnnotation??(m.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":m.accessibility??(m.accessibility=void 0),m.decorators??(m.decorators=[]),m.override??(m.override=!1),m.optional??(m.optional=!1);return;case"ClassExpression":m.id??(m.id=null);case"ClassDeclaration":m.abstract??(m.abstract=!1),m.declare??(m.declare=!1),m.decorators??(m.decorators=[]),m.implements??(m.implements=[]),m.superTypeArguments??(m.superTypeArguments=void 0),m.typeParameters??(m.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":m.declare??(m.declare=!1);return;case"VariableDeclarator":m.definite??(m.definite=!1);return;case"TSEnumDeclaration":m.const??(m.const=!1),m.declare??(m.declare=!1);return;case"TSEnumMember":m.computed??(m.computed=!1);return;case"TSImportType":m.qualifier??(m.qualifier=null),m.options??(m.options=null),m.typeArguments??(m.typeArguments=null);return;case"TSInterfaceDeclaration":m.declare??(m.declare=!1),m.extends??(m.extends=[]);return;case"TSMappedType":m.optional??(m.optional=!1),m.readonly??(m.readonly=void 0);return;case"TSModuleDeclaration":m.declare??(m.declare=!1),m.global??(m.global=m.kind==="global");return;case"TSTypeParameter":m.const??(m.const=!1),m.in??(m.in=!1),m.out??(m.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(m,x){if(ne(m)){if(JY.lastIndex=x,JY.test(this.input)){let S=this.codePointAtPos(JY.lastIndex);if(!le(S)&&S!==92)return!1}return!0}else return m===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let m=this.nextTokenInLineStart(),x=this.codePointAtPos(m);return this.chStartsBindingIdentifierAndNotRelationalOperator(x,m)}nextTokenIsStringLiteralOnSameLine(){let m=this.nextTokenInLineStart(),x=this.codePointAtPos(m);return x===34||x===39}};function eK(b){if(b.type!=="MemberExpression")return!1;let{computed:m,property:x}=b;return m&&x.type!=="StringLiteral"&&(x.type!=="TemplateLiteral"||x.expressions.length>0)?!1:tK(b.object)}function Sw(b,m){let{type:x}=b;if(b.extra?.parenthesized)return!1;if(m){if(x==="Literal"){let{value:S}=b;if(typeof S=="string"||typeof S=="boolean")return!0}}else if(x==="StringLiteral"||x==="BooleanLiteral")return!0;return!!(gl(b,m)||dye(b,m)||x==="TemplateLiteral"&&b.expressions.length===0||eK(b))}function gl(b,m){return m?b.type==="Literal"&&(typeof b.value=="number"||"bigint"in b):b.type==="NumericLiteral"||b.type==="BigIntLiteral"}function dye(b,m){if(b.type==="UnaryExpression"){let{operator:x,argument:S}=b;if(x==="-"&&gl(S,m))return!0}return!1}function tK(b){return b.type==="Identifier"?!0:b.type!=="MemberExpression"||b.computed?!1:tK(b.object)}var hye={ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."},ck=U`placeholders`(hye),fye=b=>class extends b{parsePlaceholder(m){if(this.match(129)){let x=this.startNode();return this.next(),this.assertNoSpace(),x.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(129),this.finishPlaceholder(x,m)}}finishPlaceholder(m,x){let S=m;return(!S.expectedNode||!S.type)&&(S=this.finishNode(S,"Placeholder")),S.expectedNode=x,S}getTokenFromCode(m){m===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(129,2):super.getTokenFromCode(m)}parseExprAtom(m){return this.parsePlaceholder("Expression")||super.parseExprAtom(m)}parseIdentifier(m){return this.parsePlaceholder("Identifier")||super.parseIdentifier(m)}checkReservedWord(m,x,S,k){m!==void 0&&super.checkReservedWord(m,x,S,k)}cloneIdentifier(m){let x=super.cloneIdentifier(m);return x.type==="Placeholder"&&(x.expectedNode=m.expectedNode),x}cloneStringLiteral(m){return m.type==="Placeholder"?this.cloneIdentifier(m):super.cloneStringLiteral(m)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(m,x,S,k){return m==="Placeholder"||super.isValidLVal(m,x,S,k)}toAssignable(m,x){m&&m.type==="Placeholder"&&m.expectedNode==="Expression"?m.expectedNode="Pattern":super.toAssignable(m,x)}chStartsBindingIdentifier(m,x){if(super.chStartsBindingIdentifier(m,x))return!0;let S=this.nextTokenStart();return this.input.charCodeAt(S)===37&&this.input.charCodeAt(S+1)===37}verifyBreakContinue(m,x){m.label?.type!=="Placeholder"&&super.verifyBreakContinue(m,x)}parseExpressionStatement(m,x){if(x.type!=="Placeholder"||x.extra?.parenthesized)return super.parseExpressionStatement(m,x);if(this.match(10)){let k=m;return k.label=this.finishPlaceholder(x,"Identifier"),this.next(),k.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(k,"LabeledStatement")}this.semicolon();let S=m;return S.name=x.name,this.finishPlaceholder(S,"Statement")}parseBlock(m,x,S){return this.parsePlaceholder("BlockStatement")||super.parseBlock(m,x,S)}parseFunctionId(m){return this.parsePlaceholder("Identifier")||super.parseFunctionId(m)}parseClass(m,x,S){let k=x?"ClassDeclaration":"ClassExpression";this.next();let O=this.state.strict,G=this.parsePlaceholder("Identifier");if(G)if(this.match(77)||this.match(129)||this.match(2))m.id=G;else{if(S||!x)return m.id=null,m.body=this.finishPlaceholder(G,"ClassBody"),this.finishNode(m,k);throw this.raise(ck.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(m,x,S);return super.parseClassSuper(m),m.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!m.superClass,O),this.finishNode(m,k)}parseExport(m,x){let S=this.parsePlaceholder("Identifier");if(!S)return super.parseExport(m,x);let k=m;if(!this.isContextual(94)&&!this.match(8))return k.specifiers=[],k.source=null,k.declaration=this.finishPlaceholder(S,"Declaration"),this.finishNode(k,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let O=this.startNode();return O.exported=S,k.specifiers=[this.finishNode(O,"ExportDefaultSpecifier")],super.parseExport(k,x)}isExportDefaultSpecifier(){if(this.match(61)){let m=this.nextTokenStart();if(this.isUnparsedContextual(m,"from")&&this.input.startsWith(ls(129),this.nextTokenStartSince(m+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(m,x){return m.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(m,x)}checkExport(m){let{specifiers:x}=m;x?.length&&(m.specifiers=x.filter(S=>S.exported.type==="Placeholder")),super.checkExport(m),m.specifiers=x}parseImport(m){let x=this.parsePlaceholder("Identifier");if(!x)return super.parseImport(m);if(m.specifiers=[],!this.isContextual(94)&&!this.match(8))return m.source=this.finishPlaceholder(x,"StringLiteral"),this.semicolon(),this.finishNode(m,"ImportDeclaration");let S=this.startNodeAtNode(x);return S.local=x,m.specifiers.push(this.finishNode(S,"ImportDefaultSpecifier")),this.eat(8)&&(this.maybeParseStarImportSpecifier(m)||this.parseNamedImportSpecifiers(m)),this.expectContextual(94),m.source=this.parseImportSource(),this.semicolon(),this.finishNode(m,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(ck.UnexpectedSpace,this.state.lastTokEndLoc)}},pye=b=>class extends b{parseV8Intrinsic(){if(this.match(50)){let m=this.state.startLoc,x=this.startNode();if(this.next(),Wi(this.state.type)){let S=this.parseIdentifierName(),k=this.createIdentifier(x,S);if(this.castNodeTo(k,"V8IntrinsicIdentifier"),this.match(6))return k}this.unexpected(m)}}parseExprAtom(m){return this.parseV8Intrinsic()||super.parseExprAtom(m)}},iK=["fsharp","hack"],Z5=["^^","@@","^","%","#"];function uk(b){if(b.has("decorators")&&b.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");if(b.has("flow")&&b.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(b.has("placeholders")&&b.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(b.has("pipelineOperator")){let m=b.get("pipelineOperator").proposal;if(!iK.includes(m)){let x=iK.map(S=>`"${S}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${x}.`)}if(m==="hack"){if(b.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(b.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let x=b.get("pipelineOperator").topicToken;if(!Z5.includes(x)){let S=Z5.map(k=>`"${k}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${S}.`)}}}if(b.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(b.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead.");if(b.has("deprecatedImportAssert")?console.warn("`deprecatedImportAssert` has been removed in Babel 8, please use import attributes instead."):b.has("importAttributes")&&b.get("importAttributes").deprecatedAssertSyntax&&console.warn("The 'importAttributes' plugin has been removed in Babel 8. Please migrate any usage of `assert`-style attributes to `with`."),b.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(b.has("asyncDoExpressions")&&!b.has("doExpressions")){let m=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw m.missingPlugins="doExpressions",m}if(b.has("optionalChainingAssign")&&b.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(b.has("discardBinding")&&b.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");if(b.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(b.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}var nK={estree:$,jsx:Vve,flow:jc,typescript:$Y,v8intrinsic:pye,placeholders:fye},mye=Object.keys(nK),oK=class extends fGe{constructor(b,m,x){let S=X(b);super(S,m),this.options=S,this.initializeScopes(),this.plugins=x,this.filename=S.sourceFilename,this.startIndex=S.startIndex;let k=0;S.allowAwaitOutsideFunction&&(k|=1),S.allowReturnOutsideFunction&&(k|=2),S.allowImportExportEverywhere&&(k|=8),S.allowSuperOutsideMethod&&(k|=16),S.allowUndeclaredExports&&(k|=64),S.allowNewTargetOutsideFunction&&(k|=4),S.allowYieldOutsideFunction&&(k|=32),S.ranges&&(k|=128),S.locations===!0&&(k|=256),S.tokens&&(k|=512),S.createImportExpressions&&(k|=1024),S.createParenthesizedExpressions&&(k|=2048),S.errorRecovery&&(k|=4096),S.attachComment&&(k|=8192),S.annexB&&(k|=16384),this.optionFlags=k}getScopeHandler(){return sd}parse(){this.enterInitialScopes();let b=this.startNode(),m=this.startNode();this.nextToken(),b.errors=[];let x=this.parseTopLevel(b,m);return x.errors=this.state.errors,x.comments.length=this.state.commentsLen,x}};function $5(b,m){if(m?.sourceType==="unambiguous"){m={...m};try{m.sourceType="module";let x=z_(m,b),S=x.parse();if(x.sawUnambiguousESM)return S;if(x.ambiguousScriptDifferentAst)try{return m.sourceType="script",z_(m,b).parse()}catch{}else S.program.sourceType="script";return S}catch(x){try{return m.sourceType="script",z_(m,b).parse()}catch{}throw x}}else return z_(m,b).parse()}function e6(b,m){let x=z_(m,b);return x.options.strictMode&&(x.state.strict=!0),x.getExpression()}function gye(b){let m={};for(let x of Object.keys(b))m[x]=ir(b[x]);return m}var mGe=gye(mr);function z_(b,m){let x=oK,S=new Map;if(b?.plugins){for(let k of b.plugins){let O,G;typeof k=="string"?O=k:[O,G]=k,S.has(O)||S.set(O,G||{})}uk(S),x=iR(S)}return new x(b,m,S)}var rK=new Map;function iR(b){let m=[];for(let k of mye)b.has(k)&&m.push(k);let x=m.join("|"),S=rK.get(x);if(!S){S=oK;for(let k of m)S=nK[k](S);rK.set(x,S)}return S}function dk(b){return(m,x,S)=>{if(x===!1)return!1;let k=!!S?.backwards,{length:O}=m,G=x;for(;G>=0&&Gb===` +`||b==="\r"||b==="\u2028"||b==="\u2029";function wye(b,m,x){if(m===!1)return!1;let S=!!x?.backwards,k=b.charAt(m);if(S){if(b.charAt(m-1)==="\r"&&k===` +`)return m-2;if(sK(k))return m-1}else{if(k==="\r"&&b.charAt(m+1)===` +`)return m+2;if(sK(k))return m+1}return m}var P=wye;function K(b,m){return m===!1?!1:b.charAt(m)==="/"&&b.charAt(m+1)==="/"?Aye(b,m):m}var oe=K;function ye(b,m){let x=null,S=m;for(;S!==x;)x=S,S=bye(b,S),S=yye(b,S),S=oe(b,S),S=P(b,S);return S}var he=ye;function st(b){let m=[];for(let x of b)try{return x()}catch(S){m.push(S)}throw Object.assign(new Error("All combinations failed"),{errors:m})}function rn(b){if(!b.startsWith("#!"))return"";let m=b.indexOf(` +`);return m===-1?b:b.slice(0,m)}var cs=rn,hc=Array.prototype.findLast??function(b){for(let m=this.length-1;m>=0;m--){let x=this[m];if(b(x,m,this))return x}},Qc=c("findLast",function(){if(Array.isArray(this))return hc}),Ov=Qc,Ew=Symbol.for("comments");function nR(b){return this[b<0?this.length+b:b]}var hk=c("at",function(){if(Array.isArray(this)||typeof this=="string")return nR}),Pv=hk;function qm(b){let m=new Set(b);return x=>m.has(x?.type)}function Op(b){return b.range?.[1]??b.end}function yb(b){let m=b.range?.[0]??b.start,x=(b.declaration?.decorators??b.decorators)?.[0];return x?Math.min(yb(x),m):m}var j5t=5,Q5t=8,G5t=8,AGe=b=>m=>m.label?Ym(m.label):yb(m)+b,q5t=b=>b.__contentEnd??Op(b),vGe=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Y5t=new Map([["BreakStatement",AGe(j5t)],["ContinueStatement",AGe(Q5t)],["DebuggerStatement",b=>yb(b)+G5t],["VariableDeclaration",b=>Ym(Pv(0,b.declarations,-1))],...vGe.map(b=>[b,q5t])]),K5t=qm(vGe);function Ym(b){let{type:m}=b;return m==="IfStatement"?Ym(b.alternate??b.consequent):m==="ForInStatement"||m==="ForOfStatement"||m==="ForStatement"||m==="LabeledStatement"||m==="WithStatement"||m==="WhileStatement"?Ym(b.body):Y5t.get(m)?.(b)??Op(b)}var xye=qm(["Block","CommentBlock","MultiLine"]),J5t=qm(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function Cye(b,m,x){if(!b.has(m)){let S=x(m);b.set(m,S)}return b.get(m)}var X5t=new WeakMap;function Z5t(b){return Cye(X5t,b,m=>xye(m)&&m.value[0]==="*"&&/@(?:type|satisfies)\b/.test(m.value))}function $5t(b){return h(0,b,/[^\n]/g," ")}var e6t=$5t;function t6t(b,m){for(let x of m){let S=yb(x),k=Ym(x);b=b.slice(0,S)+e6t(b.slice(S,k))+b.slice(k)}return b}var i6t=new WeakMap;function n6t(b){let m=b[Ew];return Cye(i6t,m,x=>t6t(b.originalText,x))}function o6t(b){if(!xye(b))return[];if(!b.value.includes(` `))return[];let m=[];for(let x of`*${b.value}*`.split(` -`)){if(x=x.trimStart(),!x.startsWith("*"))return[];m.push(x)}return m}var XQe=new WeakMap;function n7t(b){return sAe(XQe,b,i7t)}function r7t(b){XQe.delete(b)}function ZQe(b){return n7t(b).length>0}function o7t(b){if(b.length<2)return;let m;for(let x=b.length-1;x>=0;x--){let S=b[x];if(m&&Mm(S)===sb(m)&&ZQe(S)&&ZQe(m)&&(b.splice(x+1,1),S.value+="*//*"+m.value,S.range=[sb(S),Mm(m)],r7t(S)),!Y9t(S)&&!oAe(S))throw new TypeError(`Unknown comment type: "${S.type}".`);m=S}}function s7t(b){return b!==null&&typeof b=="object"}var a7t=s7t,d5=null;function h5(b){if(d5!==null&&typeof d5.property){let m=d5;return d5=h5.prototype=null,m}return d5=h5.prototype=b??Object.create(null),new h5}var l7t=10;for(let b=0;b<=l7t;b++)h5();function c7t(b){return h5(b)}function u7t(b,m="type"){c7t(b);function x(S){let k=S[m],O=b[k];if(!Array.isArray(O))throw Object.assign(new Error(`Missing visitor keys for '${k}'.`),{node:S});return O}return x}var d7t=u7t,ke=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],h7t={ArrayExpression:ke[0],AssignmentExpression:ke[1],BinaryExpression:ke[1],InterpreterDirective:[],Directive:ke[2],DirectiveLiteral:[],BlockStatement:ke[3],BreakStatement:ke[4],CallExpression:ke[5],CatchClause:["param","body"],ConditionalExpression:ke[6],ContinueStatement:ke[4],DebuggerStatement:[],DoWhileStatement:ke[7],EmptyStatement:[],ExpressionStatement:ke[8],File:["program"],ForInStatement:ke[9],ForStatement:["init","test","update","body"],FunctionDeclaration:ke[10],FunctionExpression:ke[10],Identifier:["typeAnnotation","decorators"],IfStatement:ke[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:ke[1],MemberExpression:ke[11],NewExpression:ke[5],Program:ke[3],ObjectExpression:ke[12],ObjectMethod:ke[13],ObjectProperty:ke[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:ke[15],SequenceExpression:ke[16],ParenthesizedExpression:ke[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:ke[15],TryStatement:["block","handler","finalizer"],UnaryExpression:ke[15],UpdateExpression:ke[15],VariableDeclaration:["declarations"],VariableDeclarator:ke[17],WhileStatement:ke[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:ke[18],ClassExpression:ke[19],ClassDeclaration:ke[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:ke[20],ExportSpecifier:["local","exported"],ForOfStatement:ke[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:ke[21],ImportNamespaceSpecifier:ke[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:ke[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:ke[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:ke[15],AwaitExpression:ke[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:ke[22],OptionalMemberExpression:ke[11],OptionalCallExpression:ke[5],ClassProperty:ke[23],ClassPrivateProperty:ke[23],ClassPrivateMethod:ke[13],PrivateName:ke[24],StaticBlock:ke[18],ImportAttribute:ke[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:ke[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:ke[27],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:ke[28],DeclareModule:ke[29],DeclareModuleExports:ke[30],DeclareTypeAlias:ke[31],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareVariable:["id","declarations"],DeclareExportDeclaration:ke[20],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:ke[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:ke[32],GenericTypeAnnotation:ke[27],InferredPredicate:[],InterfaceExtends:ke[27],InterfaceDeclaration:ke[28],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:ke[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:ke[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:ke[2],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:ke[15],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],QualifiedTypeIdentifier:ke[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:ke[35],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:ke[31],TypeAnnotation:ke[30],TypeCastExpression:ke[36],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:ke[37],TypeParameterInstantiation:ke[37],UnionTypeAnnotation:ke[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:ke[29],EnumBooleanBody:ke[38],EnumNumberBody:ke[38],EnumStringBody:ke[38],EnumSymbolBody:ke[38],EnumBooleanMember:ke[17],EnumNumberMember:ke[17],EnumStringMember:ke[17],EnumDefaultedMember:ke[24],IndexedAccessType:ke[39],OptionalIndexedAccessType:ke[39],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:ke[8],JSXSpreadChild:ke[8],JSXIdentifier:[],JSXMemberExpression:ke[11],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXSpreadAttribute:ke[15],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ClassAccessorProperty:ke[40],Decorator:ke[8],DoExpression:ke[18],ExportDefaultSpecifier:ke[22],ModuleExpression:ke[18],TopicReference:[],VoidPattern:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:ke[41],TSDeclareMethod:ke[42],TSQualifiedName:ke[1],TSCallSignatureDeclaration:ke[43],TSConstructSignatureDeclaration:ke[43],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:ke[42],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:ke[43],TSConstructorType:ke[43],TSTypeReference:["typeName","typeArguments"],TSTypePredicate:ke[44],TSTypeQuery:["exprName","typeArguments"],TSTypeLiteral:ke[38],TSArrayType:ke[26],TSTupleType:ke[35],TSOptionalType:ke[30],TSRestType:ke[30],TSNamedTupleMember:["label","elementType"],TSUnionType:ke[33],TSIntersectionType:ke[33],TSConditionalType:ke[45],TSInferType:ke[46],TSParenthesizedType:ke[30],TSTypeOperator:ke[30],TSIndexedAccessType:ke[39],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:ke[47],TSClassImplements:ke[48],TSInterfaceHeritage:ke[48],TSInterfaceDeclaration:ke[28],TSInterfaceBody:ke[18],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:ke[48],TSAsExpression:ke[36],TSSatisfiesExpression:ke[36],TSTypeAssertion:ke[36],TSEnumBody:ke[38],TSEnumDeclaration:ke[29],TSEnumMember:["id","initializer"],TSModuleDeclaration:ke[29],TSModuleBlock:ke[18],TSImportType:["source","options","qualifier","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:ke[8],TSNonNullExpression:ke[8],TSExportAssignment:ke[8],TSNamespaceExportDeclaration:ke[24],TSTypeAnnotation:ke[30],TSTypeParameterInstantiation:ke[37],TSTypeParameterDeclaration:ke[37],TSTypeParameter:["name","constraint","default"],ChainExpression:ke[8],Literal:[],MethodDefinition:ke[14],PrivateIdentifier:[],Property:ke[25],PropertyDefinition:ke[23],AccessorProperty:ke[40],TSAbstractAccessorProperty:ke[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:ke[25],TSAbstractPropertyDefinition:ke[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:ke[8],AsExpression:ke[36],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:ke[32],ConditionalTypeAnnotation:ke[45],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:ke[29],DeclareHook:ke[24],DeclareNamespace:ke[29],EnumBigIntBody:ke[38],EnumBigIntMember:ke[17],EnumBody:ke[38],HookDeclaration:ke[41],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:ke[46],KeyofTypeAnnotation:ke[15],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:ke[24],MatchExpression:ke[50],MatchExpressionCase:ke[51],MatchIdentifierPattern:ke[24],MatchInstanceObjectPattern:ke[52],MatchInstancePattern:["targetConstructor","properties"],MatchLiteralPattern:ke[47],MatchMemberPattern:["base","property"],MatchObjectPattern:ke[52],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:ke[15],MatchStatement:ke[50],MatchStatementCase:ke[51],MatchUnaryPattern:ke[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:ke[34],RecordDeclaration:["id","typeParameters","implements","body"],RecordDeclarationBody:ke[0],RecordDeclarationImplements:["id","typeArguments"],RecordDeclarationProperty:["key","typeAnnotation","defaultValue"],RecordDeclarationStaticProperty:["key","typeAnnotation","value"],RecordExpression:["recordConstructor","typeArguments","properties"],RecordExpressionProperties:ke[12],SatisfiesExpression:ke[36],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:ke[30],TypePredicate:ke[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:ke[16],NGEmptyExpression:[],NGPipeExpression:["left","right","arguments"],NGMicrosyntax:ke[18],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:ke[25],NGRoot:ke[53],JsExpressionRoot:ke[53],JsonRoot:ke[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:ke[30],TSJSDocNonNullableType:ke[30]},f7t=d7t(h7t),p7t=f7t;function Iq(b,m){if(!a7t(b))return b;if(Array.isArray(b)){for(let S=0;Sji<=he);lt=Ot&&x.slice(Ot,he).trim().length===0}return lt?void 0:(ge.extra={...ge.extra,parenthesized:!0},ge)}case"TemplateLiteral":if(X.expressions.length!==X.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(S==="flow"||S==="hermes"||S==="espree"||S==="typescript"||S==="oxc-ts"||S==="yuku-ts"){let ge=sb(X)+1,he=Mm(X)-(X.tail?1:2);X.range=[ge,he]}break;case"TSParenthesizedType":return X.typeAnnotation;case"TopicReference":b.extra={...b.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(X.types.length===1)return X.types[0];break;case"TupleTypeAnnotation":X.types&&!X.elementTypes&&(X.elementTypes=X.types);break;case"ImportDeclaration":S==="hermes"&&X.assertions&&!X.attributes&&(X.attributes=X.assertions,delete X.assertions);break}},onLeave(X){switch(X.type){case"LogicalExpression":if($Qe(X))return aAe(X);break}}}),b}function $Qe(b){return b.type==="LogicalExpression"&&b.right.type==="LogicalExpression"&&b.operator===b.right.operator}function aAe(b){return $Qe(b)?aAe({type:"LogicalExpression",operator:b.operator,left:aAe({type:"LogicalExpression",operator:b.operator,left:b.left,right:b.right.left,range:[sb(b.left),Mm(b.right.left)]}),right:b.right.right,range:[sb(b),Mm(b)]}):b}function b7t(b,m,x){if(!q9t(b))return;let S=_p(b);if(x[S-1]!==";")return;let k=t7t({[cw]:m,originalText:x});S-=1;let O=k.slice(sb(b),S),Q=O.trimEnd();b.__contentEnd=S-(O.length-Q.length)}var v7t=g7t;function A7t(b,m){let x=new SyntaxError(b+" ("+m.loc.start.line+":"+m.loc.start.column+")");return Object.assign(x,m)}var eGe=A7t,tGe="Unexpected parseExpression() input: ";function y7t(b){let{message:m,loc:x,reasonCode:S}=b;if(!x)return b;let{line:k,column:O}=x,Q=b;(S==="MissingPlugin"||S==="MissingOneOfPlugins")&&(m="Unexpected token.",Q=void 0);let X=` (${k}:${O})`;return m.endsWith(X)&&(m=m.slice(0,-X.length)),m.startsWith(tGe)&&(m=m.slice(tGe.length)),eGe(m,{loc:{start:{line:k,column:O+1}},cause:Q})}var iGe=y7t,w7t=/\*\/$/,x7t=/^\/\*\*?/,C7t=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,_7t=/(^|\s+)\/\/([^\n\r]*)/g,nGe=/^(\r?\n)+/,S7t=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,rGe=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,E7t=/(\r?\n|^) *\* ?/g,D7t=[];function T7t(b){let m=b.match(C7t);return m?m[0].trimStart():""}function k7t(b){b=h(0,b.replace(x7t,"").replace(w7t,""),E7t,"$1");let m="";for(;m!==b;)m=b,b=h(0,b,S7t,` +`)){if(x=x.trimStart(),!x.startsWith("*"))return[];m.push(x)}return m}var yGe=new WeakMap;function r6t(b){return Cye(yGe,b,o6t)}function s6t(b){yGe.delete(b)}function wGe(b){return r6t(b).length>0}function a6t(b){if(b.length<2)return;let m;for(let x=b.length-1;x>=0;x--){let S=b[x];if(m&&Ym(S)===yb(m)&&wGe(S)&&wGe(m)&&(b.splice(x+1,1),S.value+="*//*"+m.value,S.range=[yb(S),Ym(m)],s6t(S)),!J5t(S)&&!xye(S))throw new TypeError(`Unknown comment type: "${S.type}".`);m=S}}function l6t(b){return b!==null&&typeof b=="object"}var c6t=l6t,t6=null;function i6(b){if(t6!==null&&typeof t6.property){let m=t6;return t6=i6.prototype=null,m}return t6=i6.prototype=b??Object.create(null),new i6}var u6t=10;for(let b=0;b<=u6t;b++)i6();function d6t(b){return i6(b)}function h6t(b,m="type"){d6t(b);function x(S){let k=S[m],O=b[k];if(!Array.isArray(O))throw Object.assign(new Error(`Missing visitor keys for '${k}'.`),{node:S});return O}return x}var f6t=h6t,Le=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],p6t={ArrayExpression:Le[0],AssignmentExpression:Le[1],BinaryExpression:Le[1],InterpreterDirective:[],Directive:Le[2],DirectiveLiteral:[],BlockStatement:Le[3],BreakStatement:Le[4],CallExpression:Le[5],CatchClause:["param","body"],ConditionalExpression:Le[6],ContinueStatement:Le[4],DebuggerStatement:[],DoWhileStatement:Le[7],EmptyStatement:[],ExpressionStatement:Le[8],File:["program"],ForInStatement:Le[9],ForStatement:["init","test","update","body"],FunctionDeclaration:Le[10],FunctionExpression:Le[10],Identifier:["typeAnnotation","decorators"],IfStatement:Le[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:Le[1],MemberExpression:Le[11],NewExpression:Le[5],Program:Le[3],ObjectExpression:Le[12],ObjectMethod:Le[13],ObjectProperty:Le[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:Le[15],SequenceExpression:Le[16],ParenthesizedExpression:Le[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:Le[15],TryStatement:["block","handler","finalizer"],UnaryExpression:Le[15],UpdateExpression:Le[15],VariableDeclaration:["declarations"],VariableDeclarator:Le[17],WhileStatement:Le[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:Le[18],ClassExpression:Le[19],ClassDeclaration:Le[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:Le[20],ExportSpecifier:["local","exported"],ForOfStatement:Le[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:Le[21],ImportNamespaceSpecifier:Le[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:Le[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:Le[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:Le[15],AwaitExpression:Le[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:Le[22],OptionalMemberExpression:Le[11],OptionalCallExpression:Le[5],ClassProperty:Le[23],ClassPrivateProperty:Le[23],ClassPrivateMethod:Le[13],PrivateName:Le[24],StaticBlock:Le[18],ImportAttribute:Le[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:Le[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:Le[27],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:Le[28],DeclareModule:Le[29],DeclareModuleExports:Le[30],DeclareTypeAlias:Le[31],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareVariable:["id","declarations"],DeclareExportDeclaration:Le[20],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:Le[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:Le[32],GenericTypeAnnotation:Le[27],InferredPredicate:[],InterfaceExtends:Le[27],InterfaceDeclaration:Le[28],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:Le[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:Le[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:Le[2],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:Le[15],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],QualifiedTypeIdentifier:Le[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:Le[35],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:Le[31],TypeAnnotation:Le[30],TypeCastExpression:Le[36],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:Le[37],TypeParameterInstantiation:Le[37],UnionTypeAnnotation:Le[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:Le[29],EnumBooleanBody:Le[38],EnumNumberBody:Le[38],EnumStringBody:Le[38],EnumSymbolBody:Le[38],EnumBooleanMember:Le[17],EnumNumberMember:Le[17],EnumStringMember:Le[17],EnumDefaultedMember:Le[24],IndexedAccessType:Le[39],OptionalIndexedAccessType:Le[39],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:Le[8],JSXSpreadChild:Le[8],JSXIdentifier:[],JSXMemberExpression:Le[11],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXSpreadAttribute:Le[15],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ClassAccessorProperty:Le[40],Decorator:Le[8],DoExpression:Le[18],ExportDefaultSpecifier:Le[22],ModuleExpression:Le[18],TopicReference:[],VoidPattern:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:Le[41],TSDeclareMethod:Le[42],TSQualifiedName:Le[1],TSCallSignatureDeclaration:Le[43],TSConstructSignatureDeclaration:Le[43],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:Le[42],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:Le[43],TSConstructorType:Le[43],TSTypeReference:["typeName","typeArguments"],TSTypePredicate:Le[44],TSTypeQuery:["exprName","typeArguments"],TSTypeLiteral:Le[38],TSArrayType:Le[26],TSTupleType:Le[35],TSOptionalType:Le[30],TSRestType:Le[30],TSNamedTupleMember:["label","elementType"],TSUnionType:Le[33],TSIntersectionType:Le[33],TSConditionalType:Le[45],TSInferType:Le[46],TSParenthesizedType:Le[30],TSTypeOperator:Le[30],TSIndexedAccessType:Le[39],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:Le[47],TSClassImplements:Le[48],TSInterfaceHeritage:Le[48],TSInterfaceDeclaration:Le[28],TSInterfaceBody:Le[18],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:Le[48],TSAsExpression:Le[36],TSSatisfiesExpression:Le[36],TSTypeAssertion:Le[36],TSEnumBody:Le[38],TSEnumDeclaration:Le[29],TSEnumMember:["id","initializer"],TSModuleDeclaration:Le[29],TSModuleBlock:Le[18],TSImportType:["source","options","qualifier","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:Le[8],TSNonNullExpression:Le[8],TSExportAssignment:Le[8],TSNamespaceExportDeclaration:Le[24],TSTypeAnnotation:Le[30],TSTypeParameterInstantiation:Le[37],TSTypeParameterDeclaration:Le[37],TSTypeParameter:["name","constraint","default"],ChainExpression:Le[8],Literal:[],MethodDefinition:Le[14],PrivateIdentifier:[],Property:Le[25],PropertyDefinition:Le[23],AccessorProperty:Le[40],TSAbstractAccessorProperty:Le[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:Le[25],TSAbstractPropertyDefinition:Le[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:Le[8],AsExpression:Le[36],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:Le[32],ConditionalTypeAnnotation:Le[45],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:Le[29],DeclareHook:Le[24],DeclareNamespace:Le[29],EnumBigIntBody:Le[38],EnumBigIntMember:Le[17],EnumBody:Le[38],HookDeclaration:Le[41],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:Le[46],KeyofTypeAnnotation:Le[15],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:Le[24],MatchExpression:Le[50],MatchExpressionCase:Le[51],MatchIdentifierPattern:Le[24],MatchInstanceObjectPattern:Le[52],MatchInstancePattern:["targetConstructor","properties"],MatchLiteralPattern:Le[47],MatchMemberPattern:["base","property"],MatchObjectPattern:Le[52],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:Le[15],MatchStatement:Le[50],MatchStatementCase:Le[51],MatchUnaryPattern:Le[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:Le[34],RecordDeclaration:["id","typeParameters","implements","body"],RecordDeclarationBody:Le[0],RecordDeclarationImplements:["id","typeArguments"],RecordDeclarationProperty:["key","typeAnnotation","defaultValue"],RecordDeclarationStaticProperty:["key","typeAnnotation","value"],RecordExpression:["recordConstructor","typeArguments","properties"],RecordExpressionProperties:Le[12],SatisfiesExpression:Le[36],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:Le[30],TypePredicate:Le[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:Le[16],NGEmptyExpression:[],NGPipeExpression:["left","right","arguments"],NGMicrosyntax:Le[18],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:Le[25],NGRoot:Le[53],JsExpressionRoot:Le[53],JsonRoot:Le[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:Le[30],TSJSDocNonNullableType:Le[30]},m6t=f6t(p6t),g6t=m6t;function aK(b,m){if(!c6t(b))return b;if(Array.isArray(b)){for(let S=0;SUi<=pe);lt=Mt&&x.slice(Mt,pe).trim().length===0}return lt?void 0:(be.extra={...be.extra,parenthesized:!0},be)}case"TemplateLiteral":if(ie.expressions.length!==ie.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(S==="flow"||S==="hermes"||S==="espree"||S==="typescript"||S==="oxc-ts"||S==="yuku-ts"){let be=yb(ie)+1,pe=Ym(ie)-(ie.tail?1:2);ie.range=[be,pe]}break;case"TSParenthesizedType":return ie.typeAnnotation;case"TopicReference":b.extra={...b.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(ie.types.length===1)return ie.types[0];break;case"TupleTypeAnnotation":ie.types&&!ie.elementTypes&&(ie.elementTypes=ie.types);break;case"ImportDeclaration":S==="hermes"&&ie.assertions&&!ie.attributes&&(ie.attributes=ie.assertions,delete ie.assertions);break}},onLeave(ie){switch(ie.type){case"LogicalExpression":if(xGe(ie))return _ye(ie);break}}}),b}function xGe(b){return b.type==="LogicalExpression"&&b.right.type==="LogicalExpression"&&b.operator===b.right.operator}function _ye(b){return xGe(b)?_ye({type:"LogicalExpression",operator:b.operator,left:_ye({type:"LogicalExpression",operator:b.operator,left:b.left,right:b.right.left,range:[yb(b.left),Ym(b.right.left)]}),right:b.right.right,range:[yb(b),Ym(b)]}):b}function v6t(b,m,x){if(!K5t(b))return;let S=Op(b);if(x[S-1]!==";")return;let k=n6t({[Ew]:m,originalText:x});S-=1;let O=k.slice(yb(b),S),G=O.trimEnd();b.__contentEnd=S-(O.length-G.length)}var y6t=A6t;function w6t(b,m){let x=new SyntaxError(b+" ("+m.loc.start.line+":"+m.loc.start.column+")");return Object.assign(x,m)}var CGe=w6t,_Ge="Unexpected parseExpression() input: ";function x6t(b){let{message:m,loc:x,reasonCode:S}=b;if(!x)return b;let{line:k,column:O}=x,G=b;(S==="MissingPlugin"||S==="MissingOneOfPlugins")&&(m="Unexpected token.",G=void 0);let ie=` (${k}:${O})`;return m.endsWith(ie)&&(m=m.slice(0,-ie.length)),m.startsWith(_Ge)&&(m=m.slice(_Ge.length)),CGe(m,{loc:{start:{line:k,column:O+1}},cause:G})}var SGe=x6t,C6t=/\*\/$/,_6t=/^\/\*\*?/,S6t=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,E6t=/(^|\s+)\/\/([^\n\r]*)/g,EGe=/^(\r?\n)+/,D6t=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,DGe=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,T6t=/(\r?\n|^) *\* ?/g,k6t=[];function I6t(b){let m=b.match(S6t);return m?m[0].trimStart():""}function L6t(b){b=h(0,b.replace(_6t,"").replace(C6t,""),T6t,"$1");let m="";for(;m!==b;)m=b,b=h(0,b,D6t,` $1 $2 -`);b=b.replace(nGe,"").trimEnd();let x=Object.create(null),S=h(0,b,rGe,"").replace(nGe,"").trimEnd(),k;for(;k=rGe.exec(b);){let O=h(0,k[2],_7t,"");if(typeof x[k[1]]=="string"||Array.isArray(x[k[1]])){let Q=x[k[1]];x[k[1]]=[...D7t,...Array.isArray(Q)?Q:[Q],O]}else x[k[1]]=O}return{comments:S,pragmas:x}}var I7t=["noformat","noprettier"],L7t=["format","prettier"];function oGe(b){let m=us(b);m&&(b=b.slice(m.length+1));let x=T7t(b),{pragmas:S,comments:k}=k7t(x);return{shebang:m,text:b,pragmas:S,comments:k}}function N7t(b){let{pragmas:m}=oGe(b);return L7t.some(x=>p(m,x))}function M7t(b){let{pragmas:m}=oGe(b);return I7t.some(x=>p(m,x))}function R7t(b){return b=typeof b=="function"?{parse:b}:b,{astFormat:"estree",hasPragma:N7t,hasIgnorePragma:M7t,locStart:sb,locEnd:Mm,...b}}var f5=R7t,lAe="module",sGe="commonjs";function F7t(b){if(typeof b=="string"){if(b=b.toLowerCase(),/\.(?:mjs|mts)$/i.test(b))return lAe;if(/\.(?:cjs|cts)$/i.test(b))return sGe}}function O7t(b){let{type:m="JsExpressionRoot",expression:x,comments:S=x?.comments??[],text:k,rootMarker:O}=b,Q={type:m,comments:S,range:[0,k.length],rootMarker:O};return x&&(delete x.comments,Q.node=x),Q}var aGe=O7t,_M=b=>f5(H7t(b)),P7t={sourceType:lAe,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions",["partialApplication",{version:"2018-07"}],"decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},lGe="v8intrinsic",cGe=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],uw=(b,m=P7t)=>({...m,plugins:[...m.plugins,...b]}),B7t=/@(?:no)?flow\b/;function z7t(b,m){if(m?.endsWith(".js.flow"))return!0;let x=us(b);x&&(b=b.slice(x.length));let S=ue(b,0);return S!==!1&&(b=b.slice(0,S)),B7t.test(b)}function V7t(b,m,x){let S=b(m,x),k=S.errors.find(O=>!U7t.has(O.reasonCode));if(k)throw k;return S}function H7t({isExpression:b=!1,optionsCombinations:m}){return(x,S={})=>{let{filepath:k}=S;if(typeof k!="string"&&(k=void 0),(S.parser==="babel"||S.parser==="__babel_estree")&&z7t(x,k))return S.parser="babel-flow",mGe.parse(x,S);let O=m,Q=S.__babelSourceType??F7t(k);Q&&Q!==lAe&&(O=O.map(lt=>({...lt,sourceType:Q,...Q===sGe?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let X=/%[A-Z]/.test(x);x.includes("|>")?O=(X?[...cGe,lGe]:cGe).flatMap(lt=>O.map(Ot=>uw([lt],Ot))):X&&(O=O.map(lt=>uw([lGe],lt)));let ge=b?u5:c5,he;try{he=ot(O.map(lt=>()=>V7t(ge,x,lt)))}catch({errors:[lt]}){throw iGe(lt)}return b&&(he=aGe({expression:he,text:x,rootMarker:S.rootMarker})),v7t(he,{text:x})}}var W7t=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],U7t=new Set(W7t),uGe=[uw(["jsx"])],dGe=_M({optionsCombinations:uGe}),hGe=_M({optionsCombinations:[uw(["jsx","typescript"]),uw(["typescript"])]}),fGe=_M({isExpression:!0,optionsCombinations:[uw(["jsx"])]}),pGe=_M({isExpression:!0,optionsCombinations:[uw(["typescript"])]}),mGe=_M({optionsCombinations:[uw(["jsx",["flow",{all:!0}],"flowComments"])]}),j7t=_M({optionsCombinations:uGe.map(b=>uw(["estree"],b))}),gGe={};r(gGe,{json:()=>q7t,"json-stringify":()=>J7t,json5:()=>Y7t,jsonc:()=>K7t});function Q7t(b){return Array.isArray(b)&&b.length>0}var bGe=Q7t,vGe={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function G7t(b){let m=c5(b,vGe),{program:x}=m;if(x.body.length===0&&x.directives.length===0&&!x.interpreter)return{comments:m.comments}}function Lq(b,m={}){let{allowComments:x=!0,allowEmpty:S=!1}=m,k,O;try{k=u5(b,vGe),O=k.comments}catch(Q){if(S&&Q.code==="BABEL_PARSER_SYNTAX_ERROR"&&Q.reasonCode==="ParseExpressionEmptyInput")try{({comments:O}=G7t(b))}catch{}if(!O)throw iGe(Q)}if(!x&&bGe(O))throw g_(O[0],"Comment");return(!S||k)&&SM(k),k=aGe({type:"JsonRoot",expression:k,comments:O,text:b}),k}function g_(b,m){let[x,S]=[b.loc.start,b.loc.end].map(({line:k,column:O})=>({line:k,column:O+1}));return eGe(`${m} is not allowed in JSON.`,{loc:{start:x,end:S}})}function SM(b){switch(b.type){case"ArrayExpression":for(let m of b.elements)m!==null&&SM(m);return;case"ObjectExpression":for(let m of b.properties)SM(m);return;case"ObjectProperty":if(b.computed)throw g_(b.key,"Computed key");if(b.shorthand)throw g_(b.key,"Shorthand property");b.key.type!=="Identifier"&&SM(b.key),SM(b.value);return;case"UnaryExpression":{let{operator:m,argument:x}=b;if(m!=="+"&&m!=="-")throw g_(b,`Operator '${b.operator}'`);if(x.type==="NumericLiteral"||x.type==="Identifier"&&(x.name==="Infinity"||x.name==="NaN"))return;throw g_(x,`Operator '${m}' before '${x.type}'`)}case"Identifier":if(b.name!=="Infinity"&&b.name!=="NaN"&&b.name!=="undefined")throw g_(b,`Identifier '${b.name}'`);return;case"TemplateLiteral":if(bGe(b.expressions))throw g_(b.expressions[0],"'TemplateLiteral' with expression");for(let m of b.quasis)SM(m);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw g_(b,`'${b.type}'`)}}var q7t=f5({parse:b=>Lq(b),hasPragma:()=>!0,hasIgnorePragma:()=>!1}),Y7t=f5(b=>Lq(b)),K7t=f5(b=>Lq(b,{allowEmpty:!0})),J7t=f5({parse:b=>Lq(b,{allowComments:!1}),astFormat:"estree-json"}),X7t={...l,...gGe};return s(a)})});function xot(i,e){let t=i;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}var Xi,ad=D(()=>{Xi=window});function hSe(i,e,t){typeof e=="string"&&(e=i.matchMedia(e)),e.addEventListener("change",t)}function Cot(i){return dSe.INSTANCE.getZoomFactor(i)}function _ot(){return MX}var dSe,UR,ml,tv,dS,Vf,RX,sWi,fSe,MX,Ph=D(()=>{ad();dSe=class i{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new i}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};UR=navigator.userAgent,ml=UR.indexOf("Firefox")>=0,tv=UR.indexOf("AppleWebKit")>=0,dS=UR.indexOf("Chrome")>=0,Vf=!dS&&UR.indexOf("Safari")>=0,RX=!dS&&!Vf&&tv,sWi=UR.indexOf("Electron/")>=0,fSe=UR.indexOf("Android")>=0,MX=!1;if(typeof Xi.matchMedia=="function"){let i=Xi.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=Xi.matchMedia("(display-mode: fullscreen)");MX=i.matches,hSe(Xi,i,({matches:t})=>{MX&&e.matches||(MX=t)})}});var jR,FX=D(()=>{Ph();ad();Si();jR={clipboard:{writeText:Lh||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:Lh||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:Lh||_ot()?0:navigator.keyboard||Vf?1:2,touch:"ontouchstart"in Xi||navigator.maxTouchPoints>0,pointerEvents:Xi.PointerEvent&&("ontouchstart"in Xi||navigator.maxTouchPoints>0)}});function F9(i,e){if(typeof i=="number"){if(i===0)return null;let t=(i&65535)>>>0,n=(i&4294901760)>>>16;return n!==0?new R9([OX(t,e),OX(n,e)]):new R9([OX(t,e)])}else{let t=[];for(let n=0;n{Lt();$m=class i{constructor(e,t,n,r,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=o}equals(e){return e instanceof i&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},R9=class{constructor(e){if(e.length===0)throw dc("chords");this.chords=e}},PX=class{constructor(e,t,n,r,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=o,this.keyAriaLabel=s}},BX=class{}});function Hhi(i){if(i.charCode){let t=String.fromCharCode(i.charCode).toUpperCase();return lb.fromString(t)}let e=i.keyCode;if(e===3)return 7;if(ml)switch(e){case 59:return 85;case 60:if(vo)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(qt)return 57;break}else if(tv){if(qt&&e===93)return 57;if(!qt&&e===92)return 57}return sye[e]||0}var Whi,Uhi,jhi,Qhi,Wi,gc=D(()=>{Ph();Ep();Wk();Si();Whi=qt?256:2048,Uhi=512,jhi=1024,Qhi=qt?2048:256,Wi=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=Hhi(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=Whi),this.altKey&&(t|=Uhi),this.shiftKey&&(t|=jhi),this.metaKey&&(t|=Qhi),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new $m(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}});function Ghi(i){if(!i.parent||i.parent===i)return null;try{let e=i.location,t=i.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return i.parent}var Sot,zX,Eot=D(()=>{Sot=new WeakMap;zX=class{static getSameOriginWindowChain(e){let t=Sot.get(e);if(!t){t=[],Sot.set(e,t);let n=e,r;do r=Ghi(n),r?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=r;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,o=this.getSameOriginWindowChain(e);for(let s of o){let a=s.window.deref();if(n+=a?.scrollY??0,r+=a?.scrollX??0,a===t||!s.iframeElement)break;let l=s.iframeElement.getBoundingClientRect();n+=l.top,r+=l.left}return{top:n,left:r}}}});var gl,eg,Op=D(()=>{Ph();Eot();Si();gl=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=zX.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},eg=class{constructor(e,t=0,n=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let r=!1;if(dS){let o=navigator.userAgent.match(/Chrome\/(\d+)/);r=(o?parseInt(o[1]):123)<=122}if(e){let o=e,s=e,a=e.view?.devicePixelRatio||1;if(typeof o.wheelDeltaY<"u")r?this.deltaY=o.wheelDeltaY/(120*a):this.deltaY=o.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?ml&&!qt?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")Vf&&Nr?this.deltaX=-(o.wheelDeltaX/120):r?this.deltaX=o.wheelDeltaX/(120*a):this.deltaX=o.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?ml&&!qt?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*a):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}});var VX,pSe=D(()=>{VX=Symbol("MicrotaskDelay")});function UX(i){return!!i&&typeof i.then=="function"}function hr(i){let e=new Bi,t=i(e.token),n=new Promise((r,o)=>{let s=e.token.onCancellationRequested(()=>{s.dispose(),o(new Hc)});Promise.resolve(t).then(a=>{s.dispose(),e.dispose(),r(a)},a=>{s.dispose(),e.dispose(),o(a)})});return new class{cancel(){e.cancel(),e.dispose()}then(r,o){return n.then(r,o)}catch(r){return this.then(void 0,r)}finally(r){return n.finally(r)}}}function YA(i,e,t){return new Promise((n,r)=>{let o=e.onCancellationRequested(()=>{o.dispose(),n(t)});i.then(n,r).finally(()=>o.dispose())})}function Jd(i,e){return e?new Promise((t,n)=>{let r=setTimeout(()=>{o.dispose(),t()},i),o=e.onCancellationRequested(()=>{clearTimeout(r),o.dispose(),n(new Hc)})}):hr(t=>Jd(i,t))}function Bp(i,e=0,t){let n=setTimeout(()=>{i(),t&&r.dispose()},e),r=Ve(()=>{clearTimeout(n),t?.deleteAndLeak(r)});return t?.add(r),r}function P9(i,e=n=>!!n,t=null){let n=0,r=i.length,o=()=>{if(n>=r)return Promise.resolve(t);let s=i[n++];return Promise.resolve(s()).then(l=>e(l)?Promise.resolve(l):o())};return o()}function Dot(i){let e=new Bi,t=i(e.token);return new gSe(e,async n=>{let r=e.token.onCancellationRequested(()=>{r.dispose(),e.dispose(),n.reject(new Hc)});try{for await(let o of t){if(e.token.isCancellationRequested)return;n.emitOne(o)}r.dispose(),e.dispose()}catch(o){r.dispose(),e.dispose(),n.reject(o)}})}var mSe,qhi,Yhi,ra,GR,oa,hS,di,bSe,QR,O9,HX,Pp,WX,Ou,gSe,Jt=D(()=>{sn();Lt();et();ae();Si();pSe();mSe=class{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let t=()=>{if(this.queuedPromise=null,this.isDisposed)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(t,t).then(n)})}return new Promise((t,n)=>{this.queuedPromise.then(t,n)})}return this.activePromise=e(),new Promise((t,n)=>{this.activePromise.then(r=>{this.activePromise=null,t(r)},r=>{this.activePromise=null,n(r)})})}dispose(){this.isDisposed=!0}},qhi=(i,e)=>{let t=!0,n=setTimeout(()=>{t=!1,e()},i);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},Yhi=i=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,i())}),{isTriggered:()=>e,dispose:()=>{e=!1}}},ra=class{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((r,o)=>{this.doResolve=r,this.doReject=o}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let r=this.task;return this.task=null,r()}}));let n=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===VX?Yhi(n):qhi(t,n),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new Hc),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}},GR=class{constructor(e){this.delayer=new ra(e),this.throttler=new mSe}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}};oa=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new vi("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new vi("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},hS=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new vi("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=Ve(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},di=class{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}};(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?QR=(i,e)=>{dY(()=>{if(t)return;let n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:QR=(i,e,t)=>{let n=i.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),r=!1;return{dispose(){r||(r=!0,i.cancelIdleCallback(n))}}},bSe=i=>QR(globalThis,i)})();O9=class{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=QR(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}},HX=class extends O9{constructor(e){super(globalThis,e)}},Pp=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new Hc)}};(function(i){async function e(n){let r,o=await Promise.all(n.map(s=>s.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return o}i.settled=e;function t(n){return new Promise(async(r,o)=>{try{await n(r,o)}catch(s){o(s)}})}i.withAsyncBody=t})(WX||(WX={}));Ou=class i{static fromArray(e){return new i(t=>{t.emitMany(e)})}static fromPromise(e){return new i(async t=>{t.emitMany(await e)})}static fromPromises(e){return new i(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new i(async t=>{await Promise.all(e.map(async n=>{for await(let r of n)t.emitOne(r)}))})}static{this.EMPTY=i.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new G,queueMicrotask(async()=>{let n={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(e(n)),this.resolve()}catch(r){this.reject(r)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new i(async n=>{for await(let r of e)n.emitOne(t(r))})}map(e){return i.map(this,e)}static filter(e,t){return new i(async n=>{for await(let r of e)t(r)&&n.emitOne(r)})}filter(e){return i.filter(this,e)}static coalesce(e){return i.filter(e,t=>!!t)}coalesce(){return i.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return i.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}},gSe=class extends Ou{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}});function tg(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:GX;Tot&&Tot(i,null);let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){let o=t(r);o!==r&&(Khi(e)||(e[n]=o),r=o)}i[r]=!0}return i}function tfi(i){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:hfi(),e=gi=>Vot(gi);if(e.version="3.1.7",e.removed=[],!i||!i.document||i.document.nodeType!==W9.document)return e.isSupported=!1,e;let{document:t}=i,n=t,r=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=i,p=l.prototype,g=H9(p,"cloneNode"),v=H9(p,"remove"),A=H9(p,"nextSibling"),w=H9(p,"childNodes"),C=H9(p,"parentNode");if(typeof s=="function"){let gi=t.createElement("template");gi.content&&gi.content.ownerDocument&&(t=gi.content.ownerDocument)}let _,E="",{implementation:I,createNodeIterator:T,createDocumentFragment:L,getElementsByTagName:M}=t,{importNode:z}=n,H={};e.isSupported=typeof Oot=="function"&&typeof C=="function"&&I&&I.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:B,ERB_EXPR:q,TMPLIT_EXPR:U,DATA_ATTR:F,ARIA_ATTR:ne,IS_SCRIPT_OR_DATA:ce,ATTR_WHITESPACE:se,CUSTOM_ELEMENT:le}=Fot,{IS_ALLOWED_URI:oe}=Fot,fe=null,Re=Mr({},[...Lot,...ASe,...ySe,...wSe,...Not]),ft=null,At=Mr({},[...Mot,...xSe,...Rot,...QX]),Dt=Object.seal(Pot(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,Xt=null,Be=!0,Vt=!0,Li=!1,ei=!0,Ni=!1,Ke=!0,St=!1,yt=!1,at=!1,Je=!1,xt=!1,Ti=!1,Ut=!0,xr=!1,lr="user-content-",qo=!0,As=!1,Vr={},Ca=null,br=Mr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Yo=null,cr=Mr({},["audio","video","img","source","image","track"]),Wa=null,Hr=Mr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),cl="http://www.w3.org/1998/Math/MathML",ul="http://www.w3.org/2000/svg",Xr="http://www.w3.org/1999/xhtml",cs=Xr,No=!1,ta=null,Ki=Mr({},[cl,ul,Xr],vSe),Zr=null,$u=["application/xhtml+xml","text/html"],Cr="text/html",Mo=null,Th=null,ob=t.createElement("form"),Df=function(Ce){return Ce instanceof RegExp||Ce instanceof Function},kh=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Th&&Th===Ce)){if((!Ce||typeof Ce!="object")&&(Ce={}),Ce=Uk(Ce),Zr=$u.indexOf(Ce.PARSER_MEDIA_TYPE)===-1?Cr:Ce.PARSER_MEDIA_TYPE,Mo=Zr==="application/xhtml+xml"?vSe:GX,fe=iv(Ce,"ALLOWED_TAGS")?Mr({},Ce.ALLOWED_TAGS,Mo):Re,ft=iv(Ce,"ALLOWED_ATTR")?Mr({},Ce.ALLOWED_ATTR,Mo):At,ta=iv(Ce,"ALLOWED_NAMESPACES")?Mr({},Ce.ALLOWED_NAMESPACES,vSe):Ki,Wa=iv(Ce,"ADD_URI_SAFE_ATTR")?Mr(Uk(Hr),Ce.ADD_URI_SAFE_ATTR,Mo):Hr,Yo=iv(Ce,"ADD_DATA_URI_TAGS")?Mr(Uk(cr),Ce.ADD_DATA_URI_TAGS,Mo):cr,Ca=iv(Ce,"FORBID_CONTENTS")?Mr({},Ce.FORBID_CONTENTS,Mo):br,Ct=iv(Ce,"FORBID_TAGS")?Mr({},Ce.FORBID_TAGS,Mo):{},Xt=iv(Ce,"FORBID_ATTR")?Mr({},Ce.FORBID_ATTR,Mo):{},Vr=iv(Ce,"USE_PROFILES")?Ce.USE_PROFILES:!1,Be=Ce.ALLOW_ARIA_ATTR!==!1,Vt=Ce.ALLOW_DATA_ATTR!==!1,Li=Ce.ALLOW_UNKNOWN_PROTOCOLS||!1,ei=Ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ni=Ce.SAFE_FOR_TEMPLATES||!1,Ke=Ce.SAFE_FOR_XML!==!1,St=Ce.WHOLE_DOCUMENT||!1,Je=Ce.RETURN_DOM||!1,xt=Ce.RETURN_DOM_FRAGMENT||!1,Ti=Ce.RETURN_TRUSTED_TYPE||!1,at=Ce.FORCE_BODY||!1,Ut=Ce.SANITIZE_DOM!==!1,xr=Ce.SANITIZE_NAMED_PROPS||!1,qo=Ce.KEEP_CONTENT!==!1,As=Ce.IN_PLACE||!1,oe=Ce.ALLOWED_URI_REGEXP||Bot,cs=Ce.NAMESPACE||Xr,Dt=Ce.CUSTOM_ELEMENT_HANDLING||{},Ce.CUSTOM_ELEMENT_HANDLING&&Df(Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Dt.tagNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&Df(Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Dt.attributeNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&typeof Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Dt.allowCustomizedBuiltInElements=Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ni&&(Vt=!1),xt&&(Je=!0),Vr&&(fe=Mr({},Not),ft=[],Vr.html===!0&&(Mr(fe,Lot),Mr(ft,Mot)),Vr.svg===!0&&(Mr(fe,ASe),Mr(ft,xSe),Mr(ft,QX)),Vr.svgFilters===!0&&(Mr(fe,ySe),Mr(ft,xSe),Mr(ft,QX)),Vr.mathMl===!0&&(Mr(fe,wSe),Mr(ft,Rot),Mr(ft,QX))),Ce.ADD_TAGS&&(fe===Re&&(fe=Uk(fe)),Mr(fe,Ce.ADD_TAGS,Mo)),Ce.ADD_ATTR&&(ft===At&&(ft=Uk(ft)),Mr(ft,Ce.ADD_ATTR,Mo)),Ce.ADD_URI_SAFE_ATTR&&Mr(Wa,Ce.ADD_URI_SAFE_ATTR,Mo),Ce.FORBID_CONTENTS&&(Ca===br&&(Ca=Uk(Ca)),Mr(Ca,Ce.FORBID_CONTENTS,Mo)),qo&&(fe["#text"]=!0),St&&Mr(fe,["html","head","body"]),fe.table&&(Mr(fe,["tbody"]),delete Ct.tbody),Ce.TRUSTED_TYPES_POLICY){if(typeof Ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw V9('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw V9('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=Ce.TRUSTED_TYPES_POLICY,E=_.createHTML("")}else _===void 0&&(_=ffi(f,r)),_!==null&&typeof E=="string"&&(E=_.createHTML(""));Wf&&Wf(Ce),Th=Ce}},Pi=Mr({},["mi","mo","mn","ms","mtext"]),J=Mr({},["annotation-xml"]),Z=Mr({},["title","style","font","a","script"]),ie=Mr({},[...ASe,...ySe,...ifi]),de=Mr({},[...wSe,...nfi]),ve=function(Ce){let Et=C(Ce);(!Et||!Et.tagName)&&(Et={namespaceURI:cs,tagName:"template"});let nt=GX(Ce.tagName),Ht=GX(Et.tagName);return ta[Ce.namespaceURI]?Ce.namespaceURI===ul?Et.namespaceURI===Xr?nt==="svg":Et.namespaceURI===cl?nt==="svg"&&(Ht==="annotation-xml"||Pi[Ht]):!!ie[nt]:Ce.namespaceURI===cl?Et.namespaceURI===Xr?nt==="math":Et.namespaceURI===ul?nt==="math"&&J[Ht]:!!de[nt]:Ce.namespaceURI===Xr?Et.namespaceURI===ul&&!J[Ht]||Et.namespaceURI===cl&&!Pi[Ht]?!1:!de[nt]&&(Z[nt]||!ie[nt]):!!(Zr==="application/xhtml+xml"&&ta[Ce.namespaceURI]):!1},ze=function(Ce){B9(e.removed,{element:Ce});try{C(Ce).removeChild(Ce)}catch{v(Ce)}},$e=function(Ce,Et){try{B9(e.removed,{attribute:Et.getAttributeNode(Ce),from:Et})}catch{B9(e.removed,{attribute:null,from:Et})}if(Et.removeAttribute(Ce),Ce==="is"&&!ft[Ce])if(Je||xt)try{ze(Et)}catch{}else try{Et.setAttribute(Ce,"")}catch{}},Mt=function(Ce){let Et=null,nt=null;if(at)Ce=""+Ce;else{let Vs=Iot(Ce,/^[\r\n\t ]+/);nt=Vs&&Vs[0]}Zr==="application/xhtml+xml"&&cs===Xr&&(Ce=''+Ce+"");let Ht=_?_.createHTML(Ce):Ce;if(cs===Xr)try{Et=new h().parseFromString(Ht,Zr)}catch{}if(!Et||!Et.documentElement){Et=I.createDocument(cs,"template",null);try{Et.documentElement.innerHTML=No?E:Ht}catch{}}let zs=Et.body||Et.documentElement;return Ce&&nt&&zs.insertBefore(t.createTextNode(nt),zs.childNodes[0]||null),cs===Xr?M.call(Et,St?"html":"body")[0]:St?Et.documentElement:zs},Zt=function(Ce){return T.call(Ce.ownerDocument||Ce,Ce,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_i=function(Ce){return Ce instanceof d&&(typeof Ce.nodeName!="string"||typeof Ce.textContent!="string"||typeof Ce.removeChild!="function"||!(Ce.attributes instanceof u)||typeof Ce.removeAttribute!="function"||typeof Ce.setAttribute!="function"||typeof Ce.namespaceURI!="string"||typeof Ce.insertBefore!="function"||typeof Ce.hasChildNodes!="function")},pn=function(Ce){return typeof a=="function"&&Ce instanceof a},Ln=function(Ce,Et,nt){H[Ce]&&jX(H[Ce],Ht=>{Ht.call(e,Et,nt,Th)})},fo=function(Ce){let Et=null;if(Ln("beforeSanitizeElements",Ce,null),_i(Ce))return ze(Ce),!0;let nt=Mo(Ce.nodeName);if(Ln("uponSanitizeElement",Ce,{tagName:nt,allowedTags:fe}),Ce.hasChildNodes()&&!pn(Ce.firstElementChild)&&Hf(/<[/\w]/g,Ce.innerHTML)&&Hf(/<[/\w]/g,Ce.textContent)||Ce.nodeType===W9.progressingInstruction||Ke&&Ce.nodeType===W9.comment&&Hf(/<[/\w]/g,Ce.data))return ze(Ce),!0;if(!fe[nt]||Ct[nt]){if(!Ct[nt]&&Ua(nt)&&(Dt.tagNameCheck instanceof RegExp&&Hf(Dt.tagNameCheck,nt)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(nt)))return!1;if(qo&&!Ca[nt]){let Ht=C(Ce)||Ce.parentNode,zs=w(Ce)||Ce.childNodes;if(zs&&Ht){let Vs=zs.length;for(let $n=Vs-1;$n>=0;--$n){let Es=g(zs[$n],!0);Es.__removalCount=(Ce.__removalCount||0)+1,Ht.insertBefore(Es,A(Ce))}}}return ze(Ce),!0}return Ce instanceof l&&!ve(Ce)||(nt==="noscript"||nt==="noembed"||nt==="noframes")&&Hf(/<\/no(script|embed|frames)/i,Ce.innerHTML)?(ze(Ce),!0):(Ni&&Ce.nodeType===W9.text&&(Et=Ce.textContent,jX([B,q,U],Ht=>{Et=z9(Et,Ht," ")}),Ce.textContent!==Et&&(B9(e.removed,{element:Ce.cloneNode()}),Ce.textContent=Et)),Ln("afterSanitizeElements",Ce,null),!1)},vr=function(Ce,Et,nt){if(Ut&&(Et==="id"||Et==="name")&&(nt in t||nt in ob))return!1;if(!(Vt&&!Xt[Et]&&Hf(F,Et))){if(!(Be&&Hf(ne,Et))){if(!ft[Et]||Xt[Et]){if(!(Ua(Ce)&&(Dt.tagNameCheck instanceof RegExp&&Hf(Dt.tagNameCheck,Ce)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(Ce))&&(Dt.attributeNameCheck instanceof RegExp&&Hf(Dt.attributeNameCheck,Et)||Dt.attributeNameCheck instanceof Function&&Dt.attributeNameCheck(Et))||Et==="is"&&Dt.allowCustomizedBuiltInElements&&(Dt.tagNameCheck instanceof RegExp&&Hf(Dt.tagNameCheck,nt)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(nt))))return!1}else if(!Wa[Et]){if(!Hf(oe,z9(nt,se,""))){if(!((Et==="src"||Et==="xlink:href"||Et==="href")&&Ce!=="script"&&Zhi(nt,"data:")===0&&Yo[Ce])){if(!(Li&&!Hf(ce,z9(nt,se,"")))){if(nt)return!1}}}}}}return!0},Ua=function(Ce){return Ce!=="annotation-xml"&&Iot(Ce,le)},ia=function(Ce){Ln("beforeSanitizeAttributes",Ce,null);let{attributes:Et}=Ce;if(!Et)return;let nt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ft},Ht=Et.length;for(;Ht--;){let zs=Et[Ht],{name:Vs,namespaceURI:$n,value:Es}=zs,Cp=Mo(Vs),Bc=Vs==="value"?Es:$hi(Es);if(nt.attrName=Cp,nt.attrValue=Bc,nt.keepAttr=!0,nt.forceKeepAttr=void 0,Ln("uponSanitizeAttribute",Ce,nt),Bc=nt.attrValue,nt.forceKeepAttr||($e(Vs,Ce),!nt.keepAttr))continue;if(!ei&&Hf(/\/>/i,Bc)){$e(Vs,Ce);continue}Ni&&jX([B,q,U],aw=>{Bc=z9(Bc,aw," ")});let vM=Mo(Ce.nodeName);if(vr(vM,Cp,Bc)){if(xr&&(Cp==="id"||Cp==="name")&&($e(Vs,Ce),Bc=lr+Bc),Ke&&Hf(/((--!?|])>)|<\/(style|title)/i,Bc)){$e(Vs,Ce);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!$n)switch(f.getAttributeType(vM,Cp)){case"TrustedHTML":{Bc=_.createHTML(Bc);break}case"TrustedScriptURL":{Bc=_.createScriptURL(Bc);break}}try{$n?Ce.setAttributeNS($n,Vs,Bc):Ce.setAttribute(Vs,Bc),_i(Ce)?ze(Ce):kot(e.removed)}catch{}}}Ln("afterSanitizeAttributes",Ce,null)},ed=function gi(Ce){let Et=null,nt=Zt(Ce);for(Ln("beforeSanitizeShadowDOM",Ce,null);Et=nt.nextNode();)Ln("uponSanitizeShadowNode",Et,null),!fo(Et)&&(Et.content instanceof o&&gi(Et.content),ia(Et));Ln("afterSanitizeShadowDOM",Ce,null)};return e.sanitize=function(gi){let Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Et=null,nt=null,Ht=null,zs=null;if(No=!gi,No&&(gi=""),typeof gi!="string"&&!pn(gi))if(typeof gi.toString=="function"){if(gi=gi.toString(),typeof gi!="string")throw V9("dirty is not a string, aborting")}else throw V9("toString is not a function");if(!e.isSupported)return gi;if(yt||kh(Ce),e.removed=[],typeof gi=="string"&&(As=!1),As){if(gi.nodeName){let Es=Mo(gi.nodeName);if(!fe[Es]||Ct[Es])throw V9("root node is forbidden and cannot be sanitized in-place")}}else if(gi instanceof a)Et=Mt(""),nt=Et.ownerDocument.importNode(gi,!0),nt.nodeType===W9.element&&nt.nodeName==="BODY"||nt.nodeName==="HTML"?Et=nt:Et.appendChild(nt);else{if(!Je&&!Ni&&!St&&gi.indexOf("<")===-1)return _&&Ti?_.createHTML(gi):gi;if(Et=Mt(gi),!Et)return Je?null:Ti?E:""}Et&&at&&ze(Et.firstChild);let Vs=Zt(As?gi:Et);for(;Ht=Vs.nextNode();)fo(Ht)||(Ht.content instanceof o&&ed(Ht.content),ia(Ht));if(As)return gi;if(Je){if(xt)for(zs=L.call(Et.ownerDocument);Et.firstChild;)zs.appendChild(Et.firstChild);else zs=Et;return(ft.shadowroot||ft.shadowrootmode)&&(zs=z.call(n,zs,!0)),zs}let $n=St?Et.outerHTML:Et.innerHTML;return St&&fe["!doctype"]&&Et.ownerDocument&&Et.ownerDocument.doctype&&Et.ownerDocument.doctype.name&&Hf(zot,Et.ownerDocument.doctype.name)&&($n=" -`+$n),Ni&&jX([B,q,U],Es=>{$n=z9($n,Es," ")}),_&&Ti?_.createHTML($n):$n},e.setConfig=function(){let gi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kh(gi),yt=!0},e.clearConfig=function(){Th=null,yt=!1},e.isValidAttribute=function(gi,Ce,Et){Th||kh({});let nt=Mo(gi),Ht=Mo(Ce);return vr(nt,Ht,Et)},e.addHook=function(gi,Ce){typeof Ce=="function"&&(H[gi]=H[gi]||[],B9(H[gi],Ce))},e.removeHook=function(gi){if(H[gi])return kot(H[gi])},e.removeHooks=function(gi){H[gi]&&(H[gi]=[])},e.removeAllHooks=function(){H={}},e}var Oot,Tot,Khi,Jhi,Xhi,Wf,Ib,Pot,CSe,_Se,jX,kot,B9,GX,vSe,Iot,z9,Zhi,$hi,iv,Hf,V9,Lot,ASe,ySe,ifi,wSe,nfi,Not,Mot,xSe,Rot,QX,rfi,ofi,sfi,afi,lfi,Bot,cfi,ufi,zot,dfi,Fot,W9,hfi,ffi,KA,EWi,DWi,qX,TWi,kWi,IWi,YX,KX,LWi,NWi,JX=D(()=>{({entries:Oot,setPrototypeOf:Tot,isFrozen:Khi,getPrototypeOf:Jhi,getOwnPropertyDescriptor:Xhi}=Object),{freeze:Wf,seal:Ib,create:Pot}=Object,{apply:CSe,construct:_Se}=typeof Reflect<"u"&&Reflect;Wf||(Wf=function(e){return e});Ib||(Ib=function(e){return e});CSe||(CSe=function(e,t,n){return e.apply(t,n)});_Se||(_Se=function(e,t){return new e(...t)});jX=tg(Array.prototype.forEach),kot=tg(Array.prototype.pop),B9=tg(Array.prototype.push),GX=tg(String.prototype.toLowerCase),vSe=tg(String.prototype.toString),Iot=tg(String.prototype.match),z9=tg(String.prototype.replace),Zhi=tg(String.prototype.indexOf),$hi=tg(String.prototype.trim),iv=tg(Object.prototype.hasOwnProperty),Hf=tg(RegExp.prototype.test),V9=efi(TypeError);Lot=Wf(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ASe=Wf(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ySe=Wf(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ifi=Wf(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wSe=Wf(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),nfi=Wf(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Not=Wf(["#text"]),Mot=Wf(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xSe=Wf(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Rot=Wf(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),QX=Wf(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rfi=Ib(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ofi=Ib(/<%[\w\W]*|[\w\W]*%>/gm),sfi=Ib(/\${[\w\W]*}/gm),afi=Ib(/^data-[\-\w.\u00B7-\uFFFF]/),lfi=Ib(/^aria-[\-\w]+$/),Bot=Ib(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cfi=Ib(/^(?:\w+script|data):/i),ufi=Ib(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zot=Ib(/^html$/i),dfi=Ib(/^[a-z][.\w]*(-[.\w]+)+$/i),Fot=Object.freeze({__proto__:null,MUSTACHE_EXPR:rfi,ERB_EXPR:ofi,TMPLIT_EXPR:sfi,DATA_ATTR:afi,ARIA_ATTR:lfi,IS_ALLOWED_URI:Bot,IS_SCRIPT_OR_DATA:cfi,ATTR_WHITESPACE:ufi,DOCTYPE_NAME:zot,CUSTOM_ELEMENT:dfi}),W9={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},hfi=function(){return typeof window>"u"?null:window},ffi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};KA=Vot(),EWi=KA.version,DWi=KA.isSupported,qX=KA.sanitize,TWi=KA.setConfig,kWi=KA.clearConfig,IWi=KA.isValidAttribute,YX=KA.addHook,KX=KA.removeHook,LWi=KA.removeHooks,NWi=KA.removeAllHooks});function Wot(i){return i}var XX,U9,SSe=D(()=>{XX=class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Wot):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){let t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}},U9=class{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=Wot):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){let t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);let n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}});var Ys,nv=D(()=>{Ys=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}});function $X(i){return!i||typeof i!="string"?!0:i.trim().length===0}function ig(i,...e){return e.length===0?i:i.replace(pfi,function(t,n){let r=parseInt(n,10);return isNaN(r)||r<0||r>=e.length?t:e[r]})}function jot(i){return i.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function fS(i){return i.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function Ja(i){return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Qot(i,e=" "){let t=Ww(i,e);return DSe(t,e)}function Ww(i,e){if(!i||!e)return i;let t=e.length;if(t===0||i.length===0)return i;let n=0;for(;i.indexOf(e,n)===n;)n=n+t;return i.substring(n)}function DSe(i,e){if(!i||!e)return i;let t=e.length,n=i.length;if(t===0||n===0)return i;let r=n,o=-1;for(;o=i.lastIndexOf(e,r-1),!(o===-1||o+t!==r);){if(o===0)return"";r=o}return i.substring(0,r)}function Got(i){return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function qot(i){return i.replace(/\*/g,"")}function eZ(i,e,t={}){if(!i)throw new Error("Cannot create regex from empty string");e||(i=Ja(i)),t.wholeWord&&(/\B/.test(i.charAt(0))||(i="\\b"+i),/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(i,n)}function Yot(i){return i.source==="^"||i.source==="^$"||i.source==="$"||i.source==="^\\s*$"?!1:!!(i.exec("")&&i.lastIndex===0)}function Pu(i){return i.split(/\r\n|\r|\n/)}function Kot(i){let e=[],t=i.split(/(\r\n|\r|\n)/);for(let n=0;n=0;t--){let n=i.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function pS(i,e){return ie?1:0}function tZ(i,e,t=0,n=i.length,r=0,o=e.length){for(;tc)return 1}let s=n-t,a=o-r;return sa?1:0}function Q9(i,e){return YR(i,e,0,i.length,0,e.length)}function YR(i,e,t=0,n=i.length,r=0,o=e.length){for(;t=128||c>=128)return tZ(i.toLowerCase(),e.toLowerCase(),t,n,r,o);JA(l)&&(l-=32),JA(c)&&(c-=32);let u=l-c;if(u!==0)return u}let s=n-t,a=o-r;return sa?1:0}function G9(i){return i>=48&&i<=57}function JA(i){return i>=97&&i<=122}function ng(i){return i>=65&&i<=90}function Uw(i,e){return i.length===e.length&&YR(i,e)===0}function KR(i,e){let t=e.length;return e.length>i.length?!1:YR(i,e,0,t)===0}function Uf(i,e){let t=Math.min(i.length,e.length),n;for(n=0;n1){let n=i.charCodeAt(e-2);if(xo(n))return iZ(n,t)}return t}function q9(i,e){return new jk(i,e).nextGraphemeLength()}function TSe(i,e){return new jk(i,e).prevGraphemeLength()}function Jot(i,e){e>0&&XA(i.charCodeAt(e))&&e--;let t=e+q9(i,e);return[t-TSe(i,t),t]}function gfi(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function rv(i){return ESe||(ESe=gfi()),ESe.test(i)}function ZA(i){return bfi.test(i)}function nZ(i){return kSe.test(i)}function rg(i){return i>=11904&&i<=55215||i>=63744&&i<=64255||i>=65281&&i<=65374}function Y9(i){return i>=127462&&i<=127487||i===8986||i===8987||i===9200||i===9203||i>=9728&&i<=10175||i===11088||i===11093||i>=127744&&i<=128591||i>=128640&&i<=128764||i>=128992&&i<=129008||i>=129280&&i<=129535||i>=129648&&i<=129782}function XR(i){return!!(i&&i.length>0&&i.charCodeAt(0)===65279)}function Zot(i,e=!1){return i?(e&&(i=i.replace(/\\./g,"")),i.toLowerCase()!==i):!1}function rZ(i){return i=i%52,i<26?String.fromCharCode(97+i):String.fromCharCode(65+i-26)}function Uot(i,e){return i===0?e!==5&&e!==7:i===2&&e===3?!1:i===4||i===2||i===3||e===4||e===2||e===3?!0:!(i===8&&(e===8||e===9||e===11||e===12)||(i===11||i===9)&&(e===9||e===10)||(i===12||i===10)&&e===10||e===5||e===13||e===7||i===1||i===13&&e===14||i===6&&e===6)}function vfi(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function $ot(i,e){if(i===0)return 0;let t=Afi(i,e);if(t!==void 0)return t;let n=new j9(e,i);return n.prevCodePoint(),n.offset}function Afi(i,e){let t=new j9(e,i),n=t.prevCodePoint();for(;yfi(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!Y9(n))return;let r=t.offset;return r>0&&t.prevCodePoint()===8205&&(r=t.offset),r}function yfi(i){return 127995<=i&&i<=127999}var pfi,j9,jk,ESe,bfi,kSe,Xot,ZX,oZ,qR,Hw,Pt=D(()=>{SSe();nv();pfi=/{(\d+)}/g;j9=class{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){let e=mfi(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=JR(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}},jk=class{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new j9(e,t)}nextGraphemeLength(){let e=ZX.getInstance(),t=this._iterator,n=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){let o=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(Uot(r,s)){t.setOffset(o);break}r=s}return t.offset-n}prevGraphemeLength(){let e=ZX.getInstance(),t=this._iterator,n=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){let o=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(Uot(s,r)){t.setOffset(o);break}r=s}return n-t.offset}eol(){return this._iterator.eol()}};bfi=/^[\t\n\r\x20-\x7E]*$/;kSe=/[\u2028\u2029]/;Xot="\uFEFF";ZX=class i{static{this._INSTANCE=null}static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._data=vfi()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let t=this._data,n=t.length/3,r=1;for(;r<=n;)if(et[3*r+1])r=2*r+1;else return t[3*r+2];return 0}};oZ="\xA0",qR=class i{static{this.ambiguousCharacterData=new Ys(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new XX({getCacheKey:JSON.stringify},e=>{function t(u){let d=new Map;for(let h=0;h!u.startsWith("_")&&u in o);s.length===0&&(s=["_default"]);let a;for(let u of s){let d=t(o[u]);a=r(a,d)}let l=t(o._common),c=n(l,a);return new i(c)})}static getInstance(e){return i.cache.get(Array.from(e))}static{this._locales=new Ys(()=>Object.keys(i.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return i._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},Hw=class i{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(i.getRawData())),this._data}static isInvisibleCharacter(e){return i.getData().has(e)}static get codePoints(){return i.getData()}}});function Gk(i,e){return Xe.isUri(i)?Uw(i.scheme,e):KR(i,e+":")}function K9(i,...e){return e.some(t=>Gk(i,t))}var jt,wfi,ISe,NSe,xfi,LSe,jw,sZ,bl=D(()=>{Lt();Si();Pt();mn();H0();(function(i){i.inMemory="inmemory",i.vscode="vscode",i.internal="private",i.walkThrough="walkThrough",i.walkThroughSnippet="walkThroughSnippet",i.http="http",i.https="https",i.file="file",i.mailto="mailto",i.untitled="untitled",i.data="data",i.command="command",i.vscodeRemote="vscode-remote",i.vscodeRemoteResource="vscode-remote-resource",i.vscodeManagedRemoteResource="vscode-managed-remote-resource",i.vscodeUserData="vscode-userdata",i.vscodeCustomEditor="vscode-custom-editor",i.vscodeNotebookCell="vscode-notebook-cell",i.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",i.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",i.vscodeNotebookCellOutput="vscode-notebook-cell-output",i.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",i.vscodeNotebookMetadata="vscode-notebook-metadata",i.vscodeInteractiveInput="vscode-interactive-input",i.vscodeSettings="vscode-settings",i.vscodeWorkspaceTrust="vscode-workspace-trust",i.vscodeTerminal="vscode-terminal",i.vscodeChatCodeBlock="vscode-chat-code-block",i.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",i.vscodeChatSesssion="vscode-chat-editor",i.webviewPanel="webview-panel",i.vscodeWebview="vscode-webview",i.extension="extension",i.vscodeFileResource="vscode-file",i.tmp="tmp",i.vsls="vsls",i.vscodeSourceControl="vscode-scm",i.commentsInput="comment",i.codeSetting="code-setting",i.outputChannel="output"})(jt||(jt={}));wfi="tkn",ISe=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return yo.join(this._serverRootPath,jt.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return pt(a),e}let t=e.authority,n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let r=this._ports[t],o=this._connectionTokens[t],s=`path=${encodeURIComponent(e.path)}`;return typeof o=="string"&&(s+=`&${wfi}=${encodeURIComponent(o)}`),Xe.from({scheme:cb?this._preferredWebSchema:jt.vscodeRemoteResource,authority:`${n}:${r}`,path:this._remoteResourcesPath,query:s})}},NSe=new ISe,xfi="vscode-app",LSe=class i{static{this.FALLBACK_AUTHORITY=xfi}asBrowserUri(e){let t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===jt.vscodeRemote?NSe.rewrite(e):e.scheme===jt.file&&(Lh||Mqe===`${jt.vscodeFileResource}://${i.FALLBACK_AUTHORITY}`)?e.with({scheme:jt.vscodeFileResource,authority:e.authority||i.FALLBACK_AUTHORITY,query:null,fragment:null}):e}toUri(e,t){if(Xe.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let n=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(n))return Xe.joinPath(Xe.parse(n,!0),e);let r=Hqe(n,e);return Xe.file(r)}return Xe.parse(t.toUrl(e))}},jw=new LSe;(function(i){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);i.CoopAndCoep=Object.freeze(e.get("3"));let t="vscode-coi";function n(o){let s;typeof o=="string"?s=new URL(o).searchParams:o instanceof URL?s=o.searchParams:Xe.isUri(o)&&(s=new URL(o.toString(!0)).searchParams);let a=s?.get(t);if(a)return e.get(a)}i.getHeadersFromQuery=n;function r(o,s,a){if(!globalThis.crossOriginIsolated)return;let l=s&&a?"3":a?"2":"1";o instanceof URLSearchParams?o.set(t,l):o[t]=l}i.addSearchParam=r})(sZ||(sZ={}))});function mS(i){return X9(i,0)}function X9(i,e){switch(typeof i){case"object":return i===null?Qw(349,e):Array.isArray(i)?_fi(i,e):Sfi(i,e);case"string":return lZ(i,e);case"boolean":return Cfi(i,e);case"number":return Qw(i,e);case"undefined":return Qw(937,e);default:return Qw(617,e)}}function Qw(i,e){return(e<<5)-e+i|0}function Cfi(i,e){return Qw(i?433:863,e)}function lZ(i,e){e=Qw(149417,e);for(let t=0,n=i.length;tX9(n,t),e)}function Sfi(i,e){return e=Qw(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=lZ(n,t),X9(i[n],t)),e)}function MSe(i,e,t=32){let n=t-e,r=~((1<>>n)>>>0}function est(i,e=0,t=i.byteLength,n=0){for(let r=0;rt.toString(16).padStart(2,"0")).join(""):Efi((i>>>0).toString(16),e/4)}var aZ,gS=D(()=>{Pt();aZ=class i{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,r=this._buffLen,o=this._leftoverHighSurrogate,s,a;for(o!==0?(s=o,a=-1,o=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(xo(s))if(a+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),J9(this._h0)+J9(this._h1)+J9(this._h2)+J9(this._h3)+J9(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,est(this._buff,this._buffLen),this._buffLen>56&&(this._step(),est(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=i._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,MSe(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,r=this._h1,o=this._h2,s=this._h3,a=this._h4,l,c,u;for(let d=0;d<80;d++)d<20?(l=r&o|~r&s,c=1518500249):d<40?(l=r^o^s,c=1859775393):d<60?(l=r&o|r&s|o&s,c=2400959708):(l=r^o^s,c=3395469782),u=MSe(n,5)+l+a+c+e.getUint32(d*4,!1)&4294967295,a=s,s=o,o=MSe(r,30),r=n,n=u;this._h0=this._h0+n&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}}});function _o(i){for(;i.firstChild;)i.firstChild.remove()}function re(i,e,t,n){return new FSe(i,e,t,n)}function rst(i,e){return function(t){return e(new gl(i,t))}}function Tfi(i){return function(e){return i(new Wi(e))}}function kfi(i,e,t){return re(i,Tu&&jR.pointerEvents?De.POINTER_DOWN:De.MOUSE_DOWN,e,t)}function Yk(i,e,t){return QR(i,e,t)}function e7(i){return rt(i).getComputedStyle(i,null)}function zh(i,e){let t=rt(i),n=t.document;if(i!==n.body)return new hn(i.clientWidth,i.clientHeight);if(Tu&&t?.visualViewport)return new hn(t.visualViewport.width,t.visualViewport.height);if(t?.innerWidth&&t.innerHeight)return new hn(t.innerWidth,t.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new hn(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new hn(n.documentElement.clientWidth,n.documentElement.clientHeight);if(e)return zh(e);throw new Error("Unable to figure out browser width and height")}function dZ(i){let e=i.offsetParent,t=i.offsetTop,n=i.offsetLeft;for(;(i=i.parentNode)!==null&&i!==i.ownerDocument.body&&i!==i.ownerDocument.documentElement;){t-=i.scrollTop;let r=lst(i)?null:e7(i);r&&(n-=r.direction!=="rtl"?i.scrollLeft:-i.scrollLeft),i===e&&(n+=Bh.getBorderLeftWidth(i),t+=Bh.getBorderTopWidth(i),t+=i.offsetTop,n+=i.offsetLeft,e=i.offsetParent)}return{left:n,top:t}}function sst(i,e,t){typeof e=="number"&&(i.style.width=`${e}px`),typeof t=="number"&&(i.style.height=`${t}px`)}function bn(i){let e=i.getBoundingClientRect(),t=rt(i);return{left:e.left+t.scrollX,top:e.top+t.scrollY,width:e.width,height:e.height}}function hZ(i){let e=i,t=1;do{let n=e7(e).zoom;n!=null&&n!=="1"&&(t*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function bc(i){let e=Bh.getMarginLeft(i)+Bh.getMarginRight(i);return i.offsetWidth+e}function fZ(i){let e=Bh.getBorderLeftWidth(i)+Bh.getBorderRightWidth(i),t=Bh.getPaddingLeft(i)+Bh.getPaddingRight(i);return i.offsetWidth-e-t}function ast(i){let e=Bh.getBorderTopWidth(i)+Bh.getBorderBottomWidth(i),t=Bh.getPaddingTop(i)+Bh.getPaddingBottom(i);return i.offsetHeight-e-t}function og(i){let e=Bh.getMarginTop(i)+Bh.getMarginBottom(i);return i.offsetHeight+e}function Co(i,e){return!!e?.contains(i)}function Ifi(i,e,t){for(;i&&i.nodeType===i.ELEMENT_NODE;){if(i.classList.contains(e))return i;if(t){if(typeof t=="string"){if(i.classList.contains(t))return null}else if(i===t)return null}i=i.parentNode}return null}function pZ(i,e,t){return!!Ifi(i,e,t)}function lst(i){return i&&!!i.host&&!!i.mode}function Kk(i){return!!ov(i)}function ov(i){for(;i.parentNode;){if(i===i.ownerDocument?.body)return null;i=i.parentNode}return lst(i)?i:null}function hs(){let i=qw().activeElement;for(;i?.shadowRoot;)i=i.shadowRoot.activeElement;return i}function Jk(i){return hs()===i}function mZ(i){return Co(hs(),i)}function qw(){return Dfi()<=1?Xi.document:Array.from(tst()).map(({window:e})=>e.document).find(e=>e.hasFocus())??Xi.document}function Xk(){return qw().defaultView?.window??Xi}function gZ(){return new OSe}function Xa(i=Xi.document.head,e,t){let n=document.createElement("style");if(n.type="text/css",n.media="screen",e?.(n),i.appendChild(n),t&&t.add(Ve(()=>n.remove())),i===Xi.document.head){let r=new Set;zSe.set(n,r);for(let{window:o,disposables:s}of tst()){if(o===Xi)continue;let a=s.add(Lfi(n,r,o));t?.add(a)}}return n}function Lfi(i,e,t){let n=new te,r=i.cloneNode(!0);t.document.head.appendChild(r),n.add(Ve(()=>r.remove()));for(let o of ust(i))r.sheet?.insertRule(o.cssText,r.sheet?.cssRules.length);return n.add(Nfi.observe(i,n,{childList:!0})(()=>{r.textContent=i.textContent})),e.add(r),n.add(Ve(()=>e.delete(r))),n}function cst(){return RSe||(RSe=Xa()),RSe}function ust(i){return i?.sheet?.rules?i.sheet.rules:i?.sheet?.cssRules?i.sheet.cssRules:[]}function tF(i,e,t=cst()){if(!(!t||!e)){t.sheet?.insertRule(`${i} {${e}}`,0);for(let n of zSe.get(t)??[])tF(i,e,n)}}function bZ(i,e=cst()){if(!e)return;let t=ust(e),n=[];for(let r=0;r=0;r--)e.sheet?.deleteRule(n[r]);for(let r of zSe.get(e)??[])bZ(i,r)}function Mfi(i){return typeof i.selectorText=="string"}function Er(i){return i instanceof HTMLElement||i instanceof rt(i).HTMLElement}function VSe(i){return i instanceof HTMLAnchorElement||i instanceof rt(i).HTMLAnchorElement}function dst(i){return i instanceof SVGElement||i instanceof rt(i).SVGElement}function iF(i){return i instanceof MouseEvent||i instanceof rt(i).MouseEvent}function Lb(i){return i instanceof KeyboardEvent||i instanceof rt(i).KeyboardEvent}function hst(i){let e=i;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}function fst(i){let e=[];for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)e[t]=i.scrollTop,i=i.parentNode;return e}function pst(i,e){for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)i.scrollTop!==e[t]&&(i.scrollTop=e[t]),i=i.parentNode}function Yc(i){return new PSe(i)}function mst(i,e){return i.after(e),e}function be(i,...e){if(i.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function nF(i,e){return i.insertBefore(e,i.firstChild),e}function So(i,...e){i.innerText="",be(i,...e)}function gst(i,e,t,...n){let r=Rfi.exec(e);if(!r)throw new Error("Bad use of emmet");let o=r[1]||"div",s;return i!==$9.HTML?s=document.createElementNS(i,o):s=document.createElement(o),r[3]&&(s.id=r[3]),r[4]&&(s.className=r[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...n),s}function we(i,e,...t){return gst($9.HTML,i,e,...t)}function bst(i,...e){i?Ul(...e):Al(...e)}function Ul(...i){for(let e of i)e.style.display="",e.removeAttribute("aria-hidden")}function Al(...i){for(let e of i)e.style.display="none",e.setAttribute("aria-hidden","true")}function HSe(i,e){let t=i.devicePixelRatio*e;return Math.max(1,Math.floor(t))/i.devicePixelRatio}function vZ(i){Xi.open(i,"_blank","noopener")}function vst(i,e){let t=()=>{e(),n=vl(i,t)},n=vl(i,t);return Ve(()=>n.dispose())}function zp(i){return i?`url('${jw.uriToBrowserUri(i).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function AZ(i){return`'${i.replace(/'/g,"%27")}'`}function sg(i,e){if(i!==void 0){let t=i.match(/^\s*var\((.+)\)$/);if(t){let n=t[1].split(",",2);return n.length===2&&(e=sg(n[1].trim(),e)),`var(${n[0]}, ${e})`}return i}return e}function Ast(i,e=!1){let t=document.createElement("a");return YX("afterSanitizeAttributes",n=>{for(let r of["href","src"])if(n.hasAttribute(r)){let o=n.getAttribute(r);if(r==="href"&&o.startsWith("#"))continue;if(t.href=o,!i.includes(t.protocol.replace(/:$/,""))){if(e&&r==="src"&&t.href.startsWith("data:"))continue;n.removeAttribute(r)}}}),Ve(()=>{KX("afterSanitizeAttributes")})}function pi(i,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);let r=wst.exec(i);if(!r||!r.groups)throw new Error("Bad use of h");let o=r.groups.tag||"div",s=document.createElement(o);r.groups.id&&(s.id=r.groups.id);let a=[];if(r.groups.class)for(let c of r.groups.class.split("."))c!==""&&a.push(c);if(t.className!==void 0)for(let c of t.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));let l={};if(r.groups.name&&(l[r.groups.name]=s),n)for(let c of n)Er(c)?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(let[c,u]of Object.entries(t))if(c!=="className")if(c==="style")for(let[d,h]of Object.entries(u))s.style.setProperty(uZ(d),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=u:s.setAttribute(uZ(c),u.toString());return l.root=s,l}function Zk(i,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);let r=wst.exec(i);if(!r||!r.groups)throw new Error("Bad use of h");let o=r.groups.tag||"div",s=document.createElementNS("http://www.w3.org/2000/svg",o);r.groups.id&&(s.id=r.groups.id);let a=[];if(r.groups.class)for(let c of r.groups.class.split("."))c!==""&&a.push(c);if(t.className!==void 0)for(let c of t.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));let l={};if(r.groups.name&&(l[r.groups.name]=s),n)for(let c of n)Er(c)?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(let[c,u]of Object.entries(t))if(c!=="className")if(c==="style")for(let[d,h]of Object.entries(u))s.style.setProperty(uZ(d),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=u:s.setAttribute(uZ(c),u.toString());return l.root=s,l}function uZ(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var JWi,rt,XWi,tst,Dfi,ZR,BSe,ZWi,qk,ist,nst,FSe,cn,ost,$R,eF,vl,bS,Z9,Bh,hn,zSe,OSe,Nfi,RSe,De,Ai,PSe,Rfi,$9,yst,$Wi,Gw,cZ,wst,Ye=D(()=>{Ph();FX();gc();Op();Jt();Lt();et();JX();ae();bl();Si();gS();ad();({registerWindow:JWi,getWindow:rt,getDocument:XWi,getWindows:tst,getWindowsCount:Dfi,getWindowId:ZR,getWindowById:BSe,hasWindow:ZWi,onDidRegisterWindow:qk,onWillUnregisterWindow:ist,onDidUnregisterWindow:nst}=(function(){let i=new Map;xot(Xi,1);let e={window:Xi,disposables:new te};i.set(Xi.vscodeWindowId,e);let t=new G,n=new G,r=new G;function o(s,a){return(typeof s=="number"?i.get(s):void 0)??(a?e:void 0)}return{onDidRegisterWindow:t.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:n.event,registerWindow(s){if(i.has(s.vscodeWindowId))return W.None;let a=new te,l={window:s,disposables:a.add(new te)};return i.set(s.vscodeWindowId,l),a.add(Ve(()=>{i.delete(s.vscodeWindowId),n.fire(s)})),a.add(re(s,De.BEFORE_UNLOAD,()=>{r.fire(s)})),t.fire(l),a},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(s){return s.vscodeWindowId},hasWindow(s){return i.has(s)},getWindowById:o,getWindow(s){let a=s;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=s;return l?.view?l.view.window:Xi},getDocument(s){return rt(s).document}}})());FSe=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};cn=function(e,t,n,r){let o=n;return t==="click"||t==="mousedown"||t==="contextmenu"?o=rst(rt(e),n):(t==="keydown"||t==="keypress"||t==="keyup")&&(o=Tfi(n)),re(e,t,o,r)},ost=function(e,t,n){let r=rst(rt(e),t);return kfi(e,r,n)};$R=class extends O9{constructor(e,t){super(e,t)}},bS=class extends hS{constructor(e){super(),this.defaultTarget=e&&rt(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},Z9=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){pt(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let i=new Map,e=new Map,t=new Map,n=new Map,r=o=>{t.set(o,!1);let s=i.get(o)??[];for(e.set(o,s),i.set(o,[]),n.set(o,!0);s.length>0;)s.sort(Z9.sort),s.shift().execute();n.set(o,!1)};vl=(o,s,a=0)=>{let l=ZR(o),c=new Z9(s,a),u=i.get(l);return u||(u=[],i.set(l,u)),u.push(c),t.get(l)||(t.set(l,!0),o.requestAnimationFrame(()=>r(l))),c},eF=(o,s,a)=>{let l=ZR(o);if(n.get(l)){let c=new Z9(s,a),u=e.get(l);return u||(u=[],e.set(l,u)),u.push(c),c}else return vl(o,s,a)}})();Bh=class i{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let r=e7(e),o=r?r.getPropertyValue(t):"0";return i.convertToPixels(e,o)}static getBorderLeftWidth(e){return i.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return i.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return i.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return i.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return i.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return i.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return i.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return i.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return i.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return i.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return i.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return i.getDimension(e,"margin-bottom","marginBottom")}},hn=class i{static{this.None=new i(0,0)}constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new i(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof i?e:new i(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};zSe=new Map;OSe=class{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=Xa(Xi.document.head,t=>t.innerText=e))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}};Nfi=new class{constructor(){this.mutationObservers=new Map}observe(i,e,t){let n=this.mutationObservers.get(i);n||(n=new Map,this.mutationObservers.set(i,n));let r=mS(t),o=n.get(r);if(o)o.users+=1;else{let s=new G,a=new MutationObserver(c=>s.fire(c));a.observe(i,t);let l=o={users:1,observer:a,onDidMutate:s.event};e.add(Ve(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),n?.delete(r),n?.size===0&&this.mutationObservers.delete(i))})),n.set(r,o)}return o.onDidMutate}},RSe=null;De={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:tv?"webkitAnimationStart":"animationstart",ANIMATION_END:tv?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:tv?"webkitAnimationIteration":"animationiteration"};Ai={stop:(i,e)=>(i.preventDefault(),e&&i.stopPropagation(),i)};PSe=class i extends W{static hasFocusWithin(e){if(Er(e)){let t=ov(e),n=t?t.activeElement:e.ownerDocument.activeElement;return Co(n,e)}else{let t=e;return Co(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new G),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new G),this.onDidBlur=this._onDidBlur.event;let t=i.hasFocusWithin(e),n=!1,r=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(n=!0,(Er(e)?rt(e):e).setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{i.hasFocusWithin(e)!==t&&(t?o():r())},this._register(re(e,De.FOCUS,r,!0)),this._register(re(e,De.BLUR,o,!0)),Er(e)&&(this._register(re(e,De.FOCUS_IN,()=>this._refreshStateHandler())),this._register(re(e,De.FOCUS_OUT,()=>this._refreshStateHandler())))}};Rfi=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.SVG="http://www.w3.org/2000/svg"})($9||($9={}));we.SVG=function(i,e,...t){return gst($9.SVG,i,e,...t)};NSe.setPreferredWebSchema(/^https:/.test(Xi.location.href)?"https":"http");yst=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),$Wi=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0}),Gw=class i extends G{constructor(){super(),this._subscriptions=new te,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Se.runAndSubscribe(qk,({window:e,disposables:t})=>this.registerListeners(e,t),{window:Xi,disposables:this._subscriptions}))}registerListeners(e,t){t.add(re(e,"keydown",n=>{if(n.defaultPrevented)return;let r=new Wi(n);if(!(r.keyCode===6&&n.repeat)){if(n.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(n.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(n.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(n.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(r.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=n,this.fire(this._keyStatus))}},!0)),t.add(re(e,"keyup",n=>{n.defaultPrevented||(!n.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!n.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!n.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!n.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=n,this.fire(this._keyStatus)))},!0)),t.add(re(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(re(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(re(e.document.body,"mousemove",n=>{n.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),t.add(re(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return i.instance||(i.instance=new i),i.instance}dispose(){super.dispose(),this._subscriptions.dispose()}},cZ=class extends W{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(re(this.element,De.DRAG_START,e=>{this.callbacks.onDragStart?.(e)})),this.callbacks.onDrag&&this._register(re(this.element,De.DRAG,e=>{this.callbacks.onDrag?.(e)})),this._register(re(this.element,De.DRAG_ENTER,e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter?.(e)})),this._register(re(this.element,De.DRAG_OVER,e=>{e.preventDefault(),this.callbacks.onDragOver?.(e,e.timeStamp-this.dragStartTime)})),this._register(re(this.element,De.DRAG_LEAVE,e=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave?.(e))})),this._register(re(this.element,De.DRAG_END,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd?.(e)})),this._register(re(this.element,De.DROP,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop?.(e)}))}},wst=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/});var ag,rF=D(()=>{Ye();ae();ag=class{constructor(){this._hooks=new te,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=o;let s=e;try{e.setPointerCapture(t),this._hooks.add(Ve(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{s=rt(e)}this._hooks.add(re(s,De.POINTER_MOVE,a=>{if(a.buttons!==n){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(re(s,De.POINTER_UP,a=>this.stopMonitoring(!0)))}}});function yZ(i,e){if(!i)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function vS(i,e="Unreachable"){throw new Error(e)}function WSe(i){i||pt(new vi("Soft Assertion Failed"))}function Nb(i){if(!i()){debugger;i(),pt(new vi("Assertion Failed"))}}function oF(i,e){let t=0;for(;t{Lt()});function AS(i,e){let t=Math.pow(10,e);return Math.round(i*t)/t}var Ri,$A,sv,pe,Ho=D(()=>{Ri=class{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=AS(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},$A=class i{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=AS(Math.max(Math.min(1,t),0),3),this.l=AS(Math.max(Math.min(1,n),0),3),this.a=AS(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,r=e.b/255,o=e.a,s=Math.max(t,n,r),a=Math.min(t,n,r),l=0,c=0,u=(a+s)/2,d=s-a;if(d>0){switch(c=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),s){case t:l=(n-r)/d+(n1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){let t=e.h/360,{s:n,l:r,a:o}=e,s,a,l;if(n===0)s=a=l=r;else{let c=r<.5?r*(1+n):r+n-r*n,u=2*r-c;s=i._hue2rgb(u,c,t+1/3),a=i._hue2rgb(u,c,t),l=i._hue2rgb(u,c,t-1/3)}return new Ri(Math.round(s*255),Math.round(a*255),Math.round(l*255),o)}},sv=class i{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=AS(Math.max(Math.min(1,t),0),3),this.v=AS(Math.max(Math.min(1,n),0),3),this.a=AS(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r),a=o-s,l=o===0?0:a/o,c;return a===0?c=0:o===t?c=((n-r)/a%6+6)%6:o===n?c=(r-t)/a+2:c=(t-n)/a+4,new i(Math.round(c*60),l,o,e.a)}static toRGBA(e){let{h:t,s:n,v:r,a:o}=e,s=r*n,a=s*(1-Math.abs(t/60%2-1)),l=r-s,[c,u,d]=[0,0,0];return t<60?(c=s,u=a):t<120?(c=a,u=s):t<180?(u=s,d=a):t<240?(u=a,d=s):t<300?(c=a,d=s):t<=360&&(c=s,d=a),c=Math.round((c+l)*255),u=Math.round((u+l)*255),d=Math.round((d+l)*255),new Ri(c,u,d,o)}},pe=class i{static fromHex(e){return i.Format.CSS.parseHex(e)||i.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:$A.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:sv.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof Ri)this.rgba=e;else if(e instanceof $A)this._hsla=e,this.rgba=$A.toRGBA(e);else if(e instanceof sv)this._hsva=e,this.rgba=sv.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&Ri.equals(this.rgba,e.rgba)&&$A.equals(this.hsla,e.hsla)&&sv.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=i._relativeLuminanceForComponent(this.rgba.r),t=i._relativeLuminanceForComponent(this.rgba.g),n=i._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*t+.0722*n;return AS(r,4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t{Mb();gn();USe=class{constructor(){this.data=new Map}add(e,t){yZ(Ea(e)),yZ(Fo(t)),yZ(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}},Gi=new USe});function Ofi(i){return i.length>0&&i.charAt(i.length-1)==="#"?i.substring(0,i.length-1):i}var $k,jSe,Pfi,xZ=D(()=>{et();sa();$k={JSONContribution:"base.contributions.json"};jSe=class{constructor(){this._onDidChangeSchema=new G,this.schemasById={}}registerSchema(e,t){this.schemasById[Ofi(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}},Pfi=new jSe;Gi.add($k.JSONContribution,Pfi)});function CZ(i){return`--vscode-${i.replace(/\./g,"-")}`}function it(i){return`var(${CZ(i)})`}function Cst(i,e){return`var(${CZ(i)}, ${e})`}function Bfi(i){return i!==null&&typeof i=="object"&&"light"in i&&"dark"in i}function j(i,e,t,n,r){return _Z.registerColor(i,e,t,n,r)}function Vfi(i,e){switch(i.op){case 0:return av(i.value,e)?.darken(i.factor);case 1:return av(i.value,e)?.lighten(i.factor);case 2:return av(i.value,e)?.transparent(i.factor);case 3:{let t=av(i.background,e);return t?av(i.value,e)?.makeOpaque(t):av(i.value,e)}case 4:for(let t of i.values){let n=av(t,e);if(n)return n}return;case 6:return av(e.defines(i.if)?i.then:i.else,e);case 5:{let t=av(i.value,e);if(!t)return;let n=av(i.background,e);return n?t.isDarkerThan(n)?pe.getLighterColor(t,n,i.factor).transparent(i.transparency):pe.getDarkerColor(t,n,i.factor).transparent(i.transparency):t.transparent(i.factor*i.transparency)}default:throw vS(i)}}function ey(i,e){return{op:0,value:i,factor:e}}function Vp(i,e){return{op:1,value:i,factor:e}}function hi(i,e){return{op:2,value:i,factor:e}}function eI(...i){return{op:4,values:i}}function _st(i,e,t){return{op:6,if:i,then:e,else:t}}function qSe(i,e,t,n){return{op:5,value:i,background:e,factor:t,transparency:n}}function av(i,e){if(i!==null){if(typeof i=="string")return i[0]==="#"?pe.fromHex(i):e.getColor(i);if(i instanceof pe)return i;if(typeof i=="object")return Vfi(i,e)}}var GSe,zfi,QSe,_Z,Sst,Est,xst,lg=D(()=>{Mb();Jt();Ho();et();xZ();sa();Oe();GSe={ColorContribution:"base.contributions.colors"},zfi="default",QSe=class{constructor(){this._onDidChangeSchema=new G,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,r=!1,o){let s={id:e,description:n,defaults:t,needsTransparency:r,deprecationMessage:o};this.colorsById[e]=s;let a={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(a.deprecationMessage=o),r&&(a.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",a.patternErrorMessage=y("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[a,{type:"string",const:zfi,description:y("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){let n=this.colorsById[e];if(n?.defaults){let r=Bfi(n.defaults)?n.defaults[t.type]:n.defaults;return av(r,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,n)=>{let r=t.indexOf(".")===-1?0:1,o=n.indexOf(".")===-1?0:1;return r!==o?r-o:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` -`)}},_Z=new QSe;Gi.add(GSe.ColorContribution,_Z);Sst="vscode://schemas/workbench-colors",Est=Gi.as($k.JSONContribution);Est.registerSchema(Sst,_Z.getColorSchema());xst=new di(()=>Est.notifySchemaChanged(Sst),200);_Z.onDidChangeSchema(()=>{xst.isScheduled()||xst.schedule()})});var Ei,mUi,gUi,bUi,tI,Hp,Fi,Jn,vUi,Dst,AUi,yUi,wUi,xUi,CUi,_Ui,SUi,Yw=D(()=>{Oe();Ho();lg();Ei=j("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},y("foreground","Overall foreground color. This color is only used if not overridden by a component.")),mUi=j("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},y("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),gUi=j("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},y("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),bUi=j("descriptionForeground",{light:"#717171",dark:hi(Ei,.7),hcDark:hi(Ei,.7),hcLight:hi(Ei,.7)},y("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),tI=j("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},y("iconForeground","The default color for icons in the workbench.")),Hp=j("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},y("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Fi=j("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},y("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Jn=j("contrastActiveBorder",{light:null,dark:null,hcDark:Hp,hcLight:Hp},y("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),vUi=j("selection.background",null,y("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),Dst=j("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},y("textLinkForeground","Foreground color for links in text.")),AUi=j("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},y("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),yUi=j("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:pe.black,hcLight:"#292929"},y("textSeparatorForeground","Color for text separators.")),wUi=j("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},y("textPreformatForeground","Foreground color for preformatted text segments.")),xUi=j("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},y("textPreformatBackground","Background color for preformatted text segments.")),CUi=j("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},y("textBlockQuoteBackground","Background color for block quotes in text.")),_Ui=j("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:pe.white,hcLight:"#292929"},y("textBlockQuoteBorder","Border color for block quotes in text.")),SUi=j("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:pe.black,hcLight:"#F2F2F2"},y("textCodeBlockBackground","Background color for code blocks in text."))});var IUi,sF,Tst,t7,SZ,EZ,DZ,kst,TZ=D(()=>{Oe();Ho();lg();Yw();IUi=j("sash.hoverBorder",Hp,y("sashActiveBorder","Border color of active sashes.")),sF=j("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:pe.black,hcLight:"#0F4A85"},y("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Tst=j("badge.foreground",{dark:pe.white,light:"#333",hcDark:pe.white,hcLight:pe.white},y("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),t7=j("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},y("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),SZ=j("scrollbarSlider.background",{dark:pe.fromHex("#797979").transparent(.4),light:pe.fromHex("#646464").transparent(.4),hcDark:hi(Fi,.6),hcLight:hi(Fi,.4)},y("scrollbarSliderBackground","Scrollbar slider background color.")),EZ=j("scrollbarSlider.hoverBackground",{dark:pe.fromHex("#646464").transparent(.7),light:pe.fromHex("#646464").transparent(.7),hcDark:hi(Fi,.8),hcLight:hi(Fi,.8)},y("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),DZ=j("scrollbarSlider.activeBackground",{dark:pe.fromHex("#BFBFBF").transparent(.4),light:pe.fromHex("#000000").transparent(.6),hcDark:Fi,hcLight:Fi},y("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),kst=j("progressBar.background",{dark:pe.fromHex("#0E70C0"),light:pe.fromHex("#0E70C0"),hcDark:Fi,hcLight:Fi},y("progressBarBackground","Background color of the progress bar that can show for long running operations."))});var Vh,Wp,OUi,PUi,BUi,zUi,Kc,iI,n7,VUi,HUi,nI,Rst,Fst,Up,yS,WUi,Hh,wS,Ost,UUi,Pst,Kw,Bst,XSe,r7,jUi,QUi,zst,cg,Vst,GUi,qUi,Rb,Hst,YUi,i7,KUi,LZ,JUi,NZ,MZ,Wst,Ust,jst,Qst,Hfi,XUi,ZUi,$Ui,eji,tji,iji,kZ,IZ,Gst,qst,nji,rji,oji,sji,Yst,Kst,aji,lji,cji,uji,dji,hji,fji,ty,RZ,Ist,pji,mji,Jst,Xst,ZSe,Zst,gji,$st,Lst,Nst,Mst,$Se,aF,YSe,bji,KSe,vji,JSe,Aji,lF,yji,wji,xji,FZ,eEe,eat,tat,iat,xS=D(()=>{Oe();Ho();lg();Yw();TZ();Vh=j("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:pe.black,hcLight:pe.white},y("editorBackground","Editor background color.")),Wp=j("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:pe.white,hcLight:Ei},y("editorForeground","Editor default foreground color.")),OUi=j("editorStickyScroll.background",Vh,y("editorStickyScrollBackground","Background color of sticky scroll in the editor")),PUi=j("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:pe.fromHex("#0F4A85").transparent(.1)},y("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),BUi=j("editorStickyScroll.border",{dark:null,light:null,hcDark:Fi,hcLight:Fi},y("editorStickyScrollBorder","Border color of sticky scroll in the editor")),zUi=j("editorStickyScroll.shadow",t7,y("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),Kc=j("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:pe.white},y("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),iI=j("editorWidget.foreground",Ei,y("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),n7=j("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Fi,hcLight:Fi},y("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),VUi=j("editorWidget.resizeBorder",null,y("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),HUi=j("editorError.background",null,y("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),nI=j("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},y("editorError.foreground","Foreground color of error squigglies in the editor.")),Rst=j("editorError.border",{dark:null,light:null,hcDark:pe.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},y("errorBorder","If set, color of double underlines for errors in the editor.")),Fst=j("editorWarning.background",null,y("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Up=j("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},y("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),yS=j("editorWarning.border",{dark:null,light:null,hcDark:pe.fromHex("#FFCC00").transparent(.8),hcLight:pe.fromHex("#FFCC00").transparent(.8)},y("warningBorder","If set, color of double underlines for warnings in the editor.")),WUi=j("editorInfo.background",null,y("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Hh=j("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},y("editorInfo.foreground","Foreground color of info squigglies in the editor.")),wS=j("editorInfo.border",{dark:null,light:null,hcDark:pe.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},y("infoBorder","If set, color of double underlines for infos in the editor.")),Ost=j("editorHint.foreground",{dark:pe.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},y("editorHint.foreground","Foreground color of hint squigglies in the editor.")),UUi=j("editorHint.border",{dark:null,light:null,hcDark:pe.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},y("hintBorder","If set, color of double underlines for hints in the editor.")),Pst=j("editorLink.activeForeground",{dark:"#4E94CE",light:pe.blue,hcDark:pe.cyan,hcLight:"#292929"},y("activeLinkForeground","Color of active links.")),Kw=j("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},y("editorSelectionBackground","Color of the editor selection.")),Bst=j("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:pe.white},y("editorSelectionForeground","Color of the selected text for high contrast.")),XSe=j("editor.inactiveSelectionBackground",{light:hi(Kw,.5),dark:hi(Kw,.5),hcDark:hi(Kw,.7),hcLight:hi(Kw,.5)},y("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),r7=j("editor.selectionHighlightBackground",{light:qSe(Kw,Vh,.3,.6),dark:qSe(Kw,Vh,.3,.6),hcDark:null,hcLight:null},y("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),jUi=j("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:Jn,hcLight:Jn},y("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),QUi=j("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},y("editorFindMatch","Color of the current search match.")),zst=j("editor.findMatchForeground",null,y("editorFindMatchForeground","Text color of the current search match.")),cg=j("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},y("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Vst=j("editor.findMatchHighlightForeground",null,y("findMatchHighlightForeground","Foreground color of the other search matches."),!0),GUi=j("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},y("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),qUi=j("editor.findMatchBorder",{light:null,dark:null,hcDark:Jn,hcLight:Jn},y("editorFindMatchBorder","Border color of the current search match.")),Rb=j("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:Jn,hcLight:Jn},y("findMatchHighlightBorder","Border color of the other search matches.")),Hst=j("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:hi(Jn,.4),hcLight:hi(Jn,.4)},y("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),YUi=j("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},y("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),i7=j("editorHoverWidget.background",Kc,y("hoverBackground","Background color of the editor hover.")),KUi=j("editorHoverWidget.foreground",iI,y("hoverForeground","Foreground color of the editor hover.")),LZ=j("editorHoverWidget.border",n7,y("hoverBorder","Border color of the editor hover.")),JUi=j("editorHoverWidget.statusBarBackground",{dark:Vp(i7,.2),light:ey(i7,.05),hcDark:Kc,hcLight:Kc},y("statusBarBackground","Background color of the editor hover status bar.")),NZ=j("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:pe.white,hcLight:pe.black},y("editorInlayHintForeground","Foreground color of inline hints")),MZ=j("editorInlayHint.background",{dark:hi(sF,.1),light:hi(sF,.1),hcDark:hi(pe.white,.1),hcLight:hi(sF,.1)},y("editorInlayHintBackground","Background color of inline hints")),Wst=j("editorInlayHint.typeForeground",NZ,y("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),Ust=j("editorInlayHint.typeBackground",MZ,y("editorInlayHintBackgroundTypes","Background color of inline hints for types")),jst=j("editorInlayHint.parameterForeground",NZ,y("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Qst=j("editorInlayHint.parameterBackground",MZ,y("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Hfi=j("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},y("editorLightBulbForeground","The color used for the lightbulb actions icon.")),XUi=j("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),ZUi=j("editorLightBulbAi.foreground",Hfi,y("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),$Ui=j("editor.snippetTabstopHighlightBackground",{dark:new pe(new Ri(124,124,124,.3)),light:new pe(new Ri(10,50,100,.2)),hcDark:new pe(new Ri(124,124,124,.3)),hcLight:new pe(new Ri(10,50,100,.2))},y("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),eji=j("editor.snippetTabstopHighlightBorder",null,y("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),tji=j("editor.snippetFinalTabstopHighlightBackground",null,y("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),iji=j("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new pe(new Ri(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},y("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),kZ=new pe(new Ri(155,185,85,.2)),IZ=new pe(new Ri(255,0,0,.2)),Gst=j("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},y("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),qst=j("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},y("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),nji=j("diffEditor.insertedLineBackground",{dark:kZ,light:kZ,hcDark:null,hcLight:null},y("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),rji=j("diffEditor.removedLineBackground",{dark:IZ,light:IZ,hcDark:null,hcLight:null},y("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),oji=j("diffEditorGutter.insertedLineBackground",null,y("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),sji=j("diffEditorGutter.removedLineBackground",null,y("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),Yst=j("diffEditorOverview.insertedForeground",null,y("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),Kst=j("diffEditorOverview.removedForeground",null,y("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),aji=j("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},y("diffEditorInsertedOutline","Outline color for the text that got inserted.")),lji=j("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},y("diffEditorRemovedOutline","Outline color for text that got removed.")),cji=j("diffEditor.border",{dark:null,light:null,hcDark:Fi,hcLight:Fi},y("diffEditorBorder","Border color between the two text editors.")),uji=j("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},y("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),dji=j("diffEditor.unchangedRegionBackground","sideBar.background",y("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),hji=j("diffEditor.unchangedRegionForeground","foreground",y("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),fji=j("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},y("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),ty=j("widget.shadow",{dark:hi(pe.black,.36),light:hi(pe.black,.16),hcDark:null,hcLight:null},y("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),RZ=j("widget.border",{dark:null,light:null,hcDark:Fi,hcLight:Fi},y("widgetBorder","Border color of widgets such as find/replace inside the editor.")),Ist=j("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},y("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),pji=j("toolbar.hoverOutline",{dark:null,light:null,hcDark:Jn,hcLight:Jn},y("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),mji=j("toolbar.activeBackground",{dark:Vp(Ist,.1),light:ey(Ist,.1),hcDark:null,hcLight:null},y("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),Jst=j("breadcrumb.foreground",hi(Ei,.8),y("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Xst=j("breadcrumb.background",Vh,y("breadcrumbsBackground","Background color of breadcrumb items.")),ZSe=j("breadcrumb.focusForeground",{light:ey(Ei,.2),dark:Vp(Ei,.1),hcDark:Vp(Ei,.1),hcLight:Vp(Ei,.1)},y("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Zst=j("breadcrumb.activeSelectionForeground",{light:ey(Ei,.2),dark:Vp(Ei,.1),hcDark:Vp(Ei,.1),hcLight:Vp(Ei,.1)},y("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),gji=j("breadcrumbPicker.background",Kc,y("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),$st=.5,Lst=pe.fromHex("#40C8AE").transparent($st),Nst=pe.fromHex("#40A6FF").transparent($st),Mst=pe.fromHex("#606060").transparent(.4),$Se=.4,aF=1,YSe=j("merge.currentHeaderBackground",{dark:Lst,light:Lst,hcDark:null,hcLight:null},y("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),bji=j("merge.currentContentBackground",hi(YSe,$Se),y("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),KSe=j("merge.incomingHeaderBackground",{dark:Nst,light:Nst,hcDark:null,hcLight:null},y("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),vji=j("merge.incomingContentBackground",hi(KSe,$Se),y("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),JSe=j("merge.commonHeaderBackground",{dark:Mst,light:Mst,hcDark:null,hcLight:null},y("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Aji=j("merge.commonContentBackground",hi(JSe,$Se),y("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),lF=j("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},y("mergeBorder","Border color on headers and the splitter in inline merge-conflicts.")),yji=j("editorOverviewRuler.currentContentForeground",{dark:hi(YSe,aF),light:hi(YSe,aF),hcDark:lF,hcLight:lF},y("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),wji=j("editorOverviewRuler.incomingContentForeground",{dark:hi(KSe,aF),light:hi(KSe,aF),hcDark:lF,hcLight:lF},y("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),xji=j("editorOverviewRuler.commonContentForeground",{dark:hi(JSe,aF),light:hi(JSe,aF),hcDark:lF,hcLight:lF},y("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),FZ=j("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},y("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),eEe=j("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",y("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),eat=j("problemsErrorIcon.foreground",nI,y("problemsErrorIconForeground","The color used for the problems error icon.")),tat=j("problemsWarningIcon.foreground",Up,y("problemsWarningIconForeground","The color used for the problems warning icon.")),iat=j("problemsInfoIcon.foreground",Hh,y("problemsInfoIconForeground","The color used for the problems info icon."))});var o7,s7,tEe,nat,rat,oat,sat,aat,Tji,kji,Iji,iEe=D(()=>{Oe();Ho();lg();xS();TZ();o7=j("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},y("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),s7=j("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},y("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),tEe=j("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},y("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),nat=j("minimap.infoHighlight",{dark:Hh,light:Hh,hcDark:wS,hcLight:wS},y("minimapInfo","Minimap marker color for infos.")),rat=j("minimap.warningHighlight",{dark:Up,light:Up,hcDark:yS,hcLight:yS},y("overviewRuleWarning","Minimap marker color for warnings.")),oat=j("minimap.errorHighlight",{dark:new pe(new Ri(255,18,18,.7)),light:new pe(new Ri(255,18,18,.7)),hcDark:new pe(new Ri(255,50,50,1)),hcLight:"#B5200D"},y("minimapError","Minimap marker color for errors.")),sat=j("minimap.background",null,y("minimapBackground","Minimap background color.")),aat=j("minimap.foregroundOpacity",pe.fromHex("#000f"),y("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Tji=j("minimapSlider.background",hi(SZ,.5),y("minimapSliderBackground","Minimap slider background color.")),kji=j("minimapSlider.hoverBackground",hi(EZ,.5),y("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Iji=j("minimapSlider.activeBackground",hi(DZ,.5),y("minimapSliderActiveBackground","Minimap slider background color when clicked on."))});var Oji,Pji,Bji,zji,Vji,Hji,Wji,Uji,lat=D(()=>{Oe();lg();Yw();xS();iEe();Oji=j("charts.foreground",Ei,y("chartsForeground","The foreground color used in charts.")),Pji=j("charts.lines",hi(Ei,.5),y("chartsLines","The color used for horizontal lines in charts.")),Bji=j("charts.red",nI,y("chartsRed","The red color used in chart visualizations.")),zji=j("charts.blue",Hh,y("chartsBlue","The blue color used in chart visualizations.")),Vji=j("charts.yellow",Up,y("chartsYellow","The yellow color used in chart visualizations.")),Hji=j("charts.orange",o7,y("chartsOrange","The orange color used in chart visualizations.")),Wji=j("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},y("chartsGreen","The green color used in chart visualizations.")),Uji=j("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("chartsPurple","The purple color used in chart visualizations."))});var a7,PZ,BZ,rI,Wfi,Jw,oI,Kji,cat,uat,dat,hat,fat,pat,mat,gat,bat,dF,vat,l7,c7,nEe,Aat,cF,yat,wat,xat,OZ,Cat,uF,_at,Sat,Eat,Dat,Tat,kat,Iat,Jji,Lat,Nat,Xji,Mat,Rat,Fat,Oat,rEe=D(()=>{Oe();Ho();lg();Yw();xS();a7=j("input.background",{dark:"#3C3C3C",light:pe.white,hcDark:pe.black,hcLight:pe.white},y("inputBoxBackground","Input box background.")),PZ=j("input.foreground",Ei,y("inputBoxForeground","Input box foreground.")),BZ=j("input.border",{dark:null,light:null,hcDark:Fi,hcLight:Fi},y("inputBoxBorder","Input box border.")),rI=j("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Fi,hcLight:Fi},y("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Wfi=j("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},y("inputOption.hoverBackground","Background color of activated options in input fields.")),Jw=j("inputOption.activeBackground",{dark:hi(Hp,.4),light:hi(Hp,.2),hcDark:pe.transparent,hcLight:pe.transparent},y("inputOption.activeBackground","Background hover color of options in input fields.")),oI=j("inputOption.activeForeground",{dark:pe.white,light:pe.black,hcDark:Ei,hcLight:Ei},y("inputOption.activeForeground","Foreground color of activated options in input fields.")),Kji=j("input.placeholderForeground",{light:hi(Ei,.5),dark:hi(Ei,.5),hcDark:hi(Ei,.7),hcLight:hi(Ei,.7)},y("inputPlaceholderForeground","Input box foreground color for placeholder text.")),cat=j("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:pe.black,hcLight:pe.white},y("inputValidationInfoBackground","Input validation background color for information severity.")),uat=j("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Ei},y("inputValidationInfoForeground","Input validation foreground color for information severity.")),dat=j("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Fi,hcLight:Fi},y("inputValidationInfoBorder","Input validation border color for information severity.")),hat=j("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:pe.black,hcLight:pe.white},y("inputValidationWarningBackground","Input validation background color for warning severity.")),fat=j("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Ei},y("inputValidationWarningForeground","Input validation foreground color for warning severity.")),pat=j("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Fi,hcLight:Fi},y("inputValidationWarningBorder","Input validation border color for warning severity.")),mat=j("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:pe.black,hcLight:pe.white},y("inputValidationErrorBackground","Input validation background color for error severity.")),gat=j("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Ei},y("inputValidationErrorForeground","Input validation foreground color for error severity.")),bat=j("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Fi,hcLight:Fi},y("inputValidationErrorBorder","Input validation border color for error severity.")),dF=j("dropdown.background",{dark:"#3C3C3C",light:pe.white,hcDark:pe.black,hcLight:pe.white},y("dropdownBackground","Dropdown background.")),vat=j("dropdown.listBackground",{dark:null,light:null,hcDark:pe.black,hcLight:pe.white},y("dropdownListBackground","Dropdown list background.")),l7=j("dropdown.foreground",{dark:"#F0F0F0",light:Ei,hcDark:pe.white,hcLight:Ei},y("dropdownForeground","Dropdown foreground.")),c7=j("dropdown.border",{dark:dF,light:"#CECECE",hcDark:Fi,hcLight:Fi},y("dropdownBorder","Dropdown border.")),nEe=j("button.foreground",pe.white,y("buttonForeground","Button foreground color.")),Aat=j("button.separator",hi(nEe,.4),y("buttonSeparator","Button separator color.")),cF=j("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},y("buttonBackground","Button background color.")),yat=j("button.hoverBackground",{dark:Vp(cF,.2),light:ey(cF,.2),hcDark:cF,hcLight:cF},y("buttonHoverBackground","Button background color when hovering.")),wat=j("button.border",Fi,y("buttonBorder","Button border color.")),xat=j("button.secondaryForeground",{dark:pe.white,light:pe.white,hcDark:pe.white,hcLight:Ei},y("buttonSecondaryForeground","Secondary button foreground color.")),OZ=j("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:pe.white},y("buttonSecondaryBackground","Secondary button background color.")),Cat=j("button.secondaryHoverBackground",{dark:Vp(OZ,.2),light:ey(OZ,.2),hcDark:null,hcLight:null},y("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),uF=j("radio.activeForeground",oI,y("radioActiveForeground","Foreground color of active radio option.")),_at=j("radio.activeBackground",Jw,y("radioBackground","Background color of active radio option.")),Sat=j("radio.activeBorder",rI,y("radioActiveBorder","Border color of the active radio option.")),Eat=j("radio.inactiveForeground",null,y("radioInactiveForeground","Foreground color of inactive radio option.")),Dat=j("radio.inactiveBackground",null,y("radioInactiveBackground","Background color of inactive radio option.")),Tat=j("radio.inactiveBorder",{light:hi(uF,.2),dark:hi(uF,.2),hcDark:hi(uF,.4),hcLight:hi(uF,.2)},y("radioInactiveBorder","Border color of the inactive radio option.")),kat=j("radio.inactiveHoverBackground",Wfi,y("radioHoverBackground","Background color of inactive active radio option when hovering.")),Iat=j("checkbox.background",dF,y("checkbox.background","Background color of checkbox widget.")),Jji=j("checkbox.selectBackground",Kc,y("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),Lat=j("checkbox.foreground",l7,y("checkbox.foreground","Foreground color of checkbox widget.")),Nat=j("checkbox.border",c7,y("checkbox.border","Border color of checkbox widget.")),Xji=j("checkbox.selectBorder",tI,y("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),Mat=j("keybindingLabel.background",{dark:new pe(new Ri(128,128,128,.17)),light:new pe(new Ri(221,221,221,.4)),hcDark:pe.transparent,hcLight:pe.transparent},y("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Rat=j("keybindingLabel.foreground",{dark:pe.fromHex("#CCCCCC"),light:pe.fromHex("#555555"),hcDark:pe.white,hcLight:Ei},y("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Fat=j("keybindingLabel.border",{dark:new pe(new Ri(51,51,51,.6)),light:new pe(new Ri(204,204,204,.4)),hcDark:new pe(new Ri(111,195,223)),hcLight:Fi},y("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Oat=j("keybindingLabel.bottomBorder",{dark:new pe(new Ri(68,68,68,.6)),light:new pe(new Ri(187,187,187,.4)),hcDark:new pe(new Ri(111,195,223)),hcLight:Ei},y("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut."))});var Pat,Bat,zat,Vat,iy,_S,zZ,Hat,Wat,Uat,jat,Qat,oEe,sEe,Gat,qat,CS,Yat,nQi,rQi,oQi,Kat,Jat,Xat,Zat,sQi,aQi,lQi,aEe,$at,elt,tlt,cQi,uQi,dQi,hQi,VZ=D(()=>{Oe();Ho();lg();Yw();xS();Pat=j("list.focusBackground",null,y("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Bat=j("list.focusForeground",null,y("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),zat=j("list.focusOutline",{dark:Hp,light:Hp,hcDark:Jn,hcLight:Jn},y("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Vat=j("list.focusAndSelectionOutline",null,y("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),iy=j("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:pe.fromHex("#0F4A85").transparent(.1)},y("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),_S=j("list.activeSelectionForeground",{dark:pe.white,light:pe.white,hcDark:null,hcLight:null},y("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),zZ=j("list.activeSelectionIconForeground",null,y("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Hat=j("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:pe.fromHex("#0F4A85").transparent(.1)},y("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Wat=j("list.inactiveSelectionForeground",null,y("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Uat=j("list.inactiveSelectionIconForeground",null,y("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),jat=j("list.inactiveFocusBackground",null,y("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Qat=j("list.inactiveFocusOutline",null,y("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),oEe=j("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:pe.white.transparent(.1),hcLight:pe.fromHex("#0F4A85").transparent(.1)},y("listHoverBackground","List/Tree background when hovering over items using the mouse.")),sEe=j("list.hoverForeground",null,y("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Gat=j("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},y("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),qat=j("list.dropBetweenBackground",{dark:tI,light:tI,hcDark:null,hcLight:null},y("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),CS=j("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:Hp,hcLight:Hp},y("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Yat=j("list.focusHighlightForeground",{dark:CS,light:_st(iy,CS,"#BBE7FF"),hcDark:CS,hcLight:CS},y("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),nQi=j("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},y("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),rQi=j("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},y("listErrorForeground","Foreground color of list items containing errors.")),oQi=j("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},y("listWarningForeground","Foreground color of list items containing warnings.")),Kat=j("listFilterWidget.background",{light:ey(Kc,0),dark:Vp(Kc,0),hcDark:Kc,hcLight:Kc},y("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Jat=j("listFilterWidget.outline",{dark:pe.transparent,light:pe.transparent,hcDark:"#f38518",hcLight:"#007ACC"},y("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Xat=j("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Fi,hcLight:Fi},y("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Zat=j("listFilterWidget.shadow",ty,y("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),sQi=j("list.filterMatchBackground",{dark:cg,light:cg,hcDark:null,hcLight:null},y("listFilterMatchHighlight","Background color of the filtered match.")),aQi=j("list.filterMatchBorder",{dark:Rb,light:Rb,hcDark:Fi,hcLight:Jn},y("listFilterMatchHighlightBorder","Border color of the filtered match.")),lQi=j("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},y("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),aEe=j("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},y("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),$at=j("tree.inactiveIndentGuidesStroke",hi(aEe,.4),y("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),elt=j("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},y("tableColumnsBorder","Table border color between columns.")),tlt=j("tree.tableOddRowsBackground",{dark:hi(Ei,.04),light:hi(Ei,.04),hcDark:null,hcLight:null},y("tableOddRowsBackgroundColor","Background color for odd table rows.")),cQi=j("editorActionList.background",Kc,y("editorActionListBackground","Action List background color.")),uQi=j("editorActionList.foreground",iI,y("editorActionListForeground","Action List foreground color.")),dQi=j("editorActionList.focusForeground",_S,y("editorActionListFocusForeground","Action List foreground color for the focused item.")),hQi=j("editorActionList.focusBackground",iy,y("editorActionListFocusBackground","Action List background color for the focused item."))});var ilt,nlt,rlt,olt,slt,alt,llt,clt=D(()=>{Oe();lg();Yw();rEe();VZ();ilt=j("menu.border",{dark:null,light:null,hcDark:Fi,hcLight:Fi},y("menuBorder","Border color of menus.")),nlt=j("menu.foreground",l7,y("menuForeground","Foreground color of menu items.")),rlt=j("menu.background",dF,y("menuBackground","Background color of menu items.")),olt=j("menu.selectionForeground",_S,y("menuSelectionForeground","Foreground color of the selected menu item in menus.")),slt=j("menu.selectionBackground",iy,y("menuSelectionBackground","Background color of the selected menu item in menus.")),alt=j("menu.selectionBorder",{dark:null,light:null,hcDark:Jn,hcLight:Jn},y("menuSelectionBorder","Border color of the selected menu item in menus.")),llt=j("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Fi,hcLight:Fi},y("menuSeparatorBackground","Color of a separator menu item in menus."))});var lEe,dlt,hlt,HZ,flt,ult,Xw,hF,Zw,plt=D(()=>{Oe();Ho();lg();xS();VZ();lEe=j("quickInput.background",Kc,y("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),dlt=j("quickInput.foreground",iI,y("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),hlt=j("quickInputTitle.background",{dark:new pe(new Ri(255,255,255,.105)),light:new pe(new Ri(0,0,0,.06)),hcDark:"#000000",hcLight:pe.white},y("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),HZ=j("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:pe.white,hcLight:"#0F4A85"},y("pickerGroupForeground","Quick picker color for grouping labels.")),flt=j("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:pe.white,hcLight:"#0F4A85"},y("pickerGroupBorder","Quick picker color for grouping borders.")),ult=j("quickInput.list.focusBackground",null,"",void 0,y("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Xw=j("quickInputList.focusForeground",_S,y("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),hF=j("quickInputList.focusIconForeground",zZ,y("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Zw=j("quickInputList.focusBackground",{dark:eI(ult,iy),light:eI(ult,iy),hcDark:null,hcLight:null},y("quickInput.listFocusBackground","Quick picker background color for the focused item."))});var DQi,TQi,kQi,mlt=D(()=>{Oe();lg();Yw();xS();DQi=j("search.resultsInfoForeground",{light:Ei,dark:hi(Ei,.65),hcDark:Ei,hcLight:Ei},y("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),TQi=j("searchEditor.findMatchBackground",{light:hi(cg,.66),dark:hi(cg,.66),hcDark:cg,hcLight:cg},y("searchEditor.queryMatch","Color of the Search Editor query matches.")),kQi=j("searchEditor.findMatchBorder",{light:hi(Rb,.66),dark:hi(Rb,.66),hcDark:Rb,hcLight:Rb},y("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))});var eo=D(()=>{lg();Yw();lat();xS();rEe();VZ();clt();iEe();TZ();plt();mlt()});function QZ(i){let e=bn(i);return new cEe(e.left,e.top,e.width,e.height)}function GZ(i,e,t){let n=e.width/i.offsetWidth,r=e.height/i.offsetHeight,o=(t.x-e.x)/n,s=(t.y-e.y)/r;return new uEe(o,s)}function jfi(i){return i.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}var SS,u7,cEe,uEe,Fb,WZ,UZ,jZ,fF,dEe,pF=D(()=>{Ye();rF();Op();Jt();ae();eo();SS=class{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new u7(this.x-e.scrollX,this.y-e.scrollY)}},u7=class{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new SS(this.clientX+e.scrollX,this.clientY+e.scrollY)}},cEe=class{constructor(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r,this._editorPagePositionBrand=void 0}},uEe=class{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}};Fb=class extends gl{constructor(e,t,n){super(rt(n),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new SS(this.posx,this.posy),this.editorPos=QZ(n),this.relativePos=GZ(n,this.editorPos,this.pos)}},WZ=class{constructor(e){this._editorViewDomNode=e}_create(e){return new Fb(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return re(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return re(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return re(e,De.MOUSE_DOWN,n=>{t(this._create(n))})}onPointerDown(e,t){return re(e,De.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onMouseLeave(e,t){return re(e,De.MOUSE_LEAVE,n=>{t(this._create(n))})}onMouseMove(e,t){return re(e,"mousemove",n=>t(this._create(n)))}},UZ=class{constructor(e){this._editorViewDomNode=e}_create(e){return new Fb(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return re(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return re(e,De.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onPointerLeave(e,t){return re(e,De.POINTER_LEAVE,n=>{t(this._create(n))})}onPointerMove(e,t){return re(e,"pointermove",n=>t(this._create(n)))}},jZ=class extends W{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new ag),this._keydownListener=null}startMonitoring(e,t,n,r,o){this._keydownListener=cn(e.ownerDocument,"keydown",s=>{s.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,s.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,n,s=>{r(new Fb(s,!0,this._editorViewDomNode))},s=>{this._keydownListener.dispose(),o(s)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}},fF=class i{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++i._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new di(()=>this.garbageCollect(),1e3)}createClassNameRef(e){let t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){let t=this.computeUniqueKey(e),n=this._rules.get(t);if(!n){let r=this._counter++;n=new dEe(t,`dyn-rule-${this._instanceId}-${r}`,Kk(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(let e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}},dEe=class{constructor(e,t,n,r){this.key=e,this.className=t,this.properties=r,this._referenceCount=0,this._styleElementDisposables=new te,this._styleElement=Xa(n,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(let r in t){let o=t[r],s;typeof o=="object"?s=it(o.id):s=o;let a=jfi(r);n+=` +`);b=b.replace(EGe,"").trimEnd();let x=Object.create(null),S=h(0,b,DGe,"").replace(EGe,"").trimEnd(),k;for(;k=DGe.exec(b);){let O=h(0,k[2],E6t,"");if(typeof x[k[1]]=="string"||Array.isArray(x[k[1]])){let G=x[k[1]];x[k[1]]=[...k6t,...Array.isArray(G)?G:[G],O]}else x[k[1]]=O}return{comments:S,pragmas:x}}var N6t=["noformat","noprettier"],M6t=["format","prettier"];function TGe(b){let m=cs(b);m&&(b=b.slice(m.length+1));let x=I6t(b),{pragmas:S,comments:k}=L6t(x);return{shebang:m,text:b,pragmas:S,comments:k}}function R6t(b){let{pragmas:m}=TGe(b);return M6t.some(x=>p(m,x))}function F6t(b){let{pragmas:m}=TGe(b);return N6t.some(x=>p(m,x))}function O6t(b){return b=typeof b=="function"?{parse:b}:b,{astFormat:"estree",hasPragma:R6t,hasIgnorePragma:F6t,locStart:yb,locEnd:Ym,...b}}var n6=O6t,Sye="module",kGe="commonjs";function P6t(b){if(typeof b=="string"){if(b=b.toLowerCase(),/\.(?:mjs|mts)$/i.test(b))return Sye;if(/\.(?:cjs|cts)$/i.test(b))return kGe}}function B6t(b){let{type:m="JsExpressionRoot",expression:x,comments:S=x?.comments??[],text:k,rootMarker:O}=b,G={type:m,comments:S,range:[0,k.length],rootMarker:O};return x&&(delete x.comments,G.node=x),G}var IGe=B6t,oR=b=>n6(U6t(b)),z6t={sourceType:Sye,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions",["partialApplication",{version:"2018-07"}],"decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},LGe="v8intrinsic",NGe=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],Dw=(b,m=z6t)=>({...m,plugins:[...m.plugins,...b]}),V6t=/@(?:no)?flow\b/;function H6t(b,m){if(m?.endsWith(".js.flow"))return!0;let x=cs(b);x&&(b=b.slice(x.length));let S=he(b,0);return S!==!1&&(b=b.slice(0,S)),V6t.test(b)}function W6t(b,m,x){let S=b(m,x),k=S.errors.find(O=>!Q6t.has(O.reasonCode));if(k)throw k;return S}function U6t({isExpression:b=!1,optionsCombinations:m}){return(x,S={})=>{let{filepath:k}=S;if(typeof k!="string"&&(k=void 0),(S.parser==="babel"||S.parser==="__babel_estree")&&H6t(x,k))return S.parser="babel-flow",BGe.parse(x,S);let O=m,G=S.__babelSourceType??P6t(k);G&&G!==Sye&&(O=O.map(lt=>({...lt,sourceType:G,...G===kGe?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let ie=/%[A-Z]/.test(x);x.includes("|>")?O=(ie?[...NGe,LGe]:NGe).flatMap(lt=>O.map(Mt=>Dw([lt],Mt))):ie&&(O=O.map(lt=>Dw([LGe],lt)));let be=b?e6:$5,pe;try{pe=st(O.map(lt=>()=>W6t(be,x,lt)))}catch({errors:[lt]}){throw SGe(lt)}return b&&(pe=IGe({expression:pe,text:x,rootMarker:S.rootMarker})),y6t(pe,{text:x})}}var j6t=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],Q6t=new Set(j6t),MGe=[Dw(["jsx"])],RGe=oR({optionsCombinations:MGe}),FGe=oR({optionsCombinations:[Dw(["jsx","typescript"]),Dw(["typescript"])]}),OGe=oR({isExpression:!0,optionsCombinations:[Dw(["jsx"])]}),PGe=oR({isExpression:!0,optionsCombinations:[Dw(["typescript"])]}),BGe=oR({optionsCombinations:[Dw(["jsx",["flow",{all:!0}],"flowComments"])]}),G6t=oR({optionsCombinations:MGe.map(b=>Dw(["estree"],b))}),zGe={};o(zGe,{json:()=>K6t,"json-stringify":()=>Z6t,json5:()=>J6t,jsonc:()=>X6t});function q6t(b){return Array.isArray(b)&&b.length>0}var VGe=q6t,HGe={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function Y6t(b){let m=$5(b,HGe),{program:x}=m;if(x.body.length===0&&x.directives.length===0&&!x.interpreter)return{comments:m.comments}}function lK(b,m={}){let{allowComments:x=!0,allowEmpty:S=!1}=m,k,O;try{k=e6(b,HGe),O=k.comments}catch(G){if(S&&G.code==="BABEL_PARSER_SYNTAX_ERROR"&&G.reasonCode==="ParseExpressionEmptyInput")try{({comments:O}=Y6t(b))}catch{}if(!O)throw SGe(G)}if(!x&&VGe(O))throw V_(O[0],"Comment");return(!S||k)&&rR(k),k=IGe({type:"JsonRoot",expression:k,comments:O,text:b}),k}function V_(b,m){let[x,S]=[b.loc.start,b.loc.end].map(({line:k,column:O})=>({line:k,column:O+1}));return CGe(`${m} is not allowed in JSON.`,{loc:{start:x,end:S}})}function rR(b){switch(b.type){case"ArrayExpression":for(let m of b.elements)m!==null&&rR(m);return;case"ObjectExpression":for(let m of b.properties)rR(m);return;case"ObjectProperty":if(b.computed)throw V_(b.key,"Computed key");if(b.shorthand)throw V_(b.key,"Shorthand property");b.key.type!=="Identifier"&&rR(b.key),rR(b.value);return;case"UnaryExpression":{let{operator:m,argument:x}=b;if(m!=="+"&&m!=="-")throw V_(b,`Operator '${b.operator}'`);if(x.type==="NumericLiteral"||x.type==="Identifier"&&(x.name==="Infinity"||x.name==="NaN"))return;throw V_(x,`Operator '${m}' before '${x.type}'`)}case"Identifier":if(b.name!=="Infinity"&&b.name!=="NaN"&&b.name!=="undefined")throw V_(b,`Identifier '${b.name}'`);return;case"TemplateLiteral":if(VGe(b.expressions))throw V_(b.expressions[0],"'TemplateLiteral' with expression");for(let m of b.quasis)rR(m);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw V_(b,`'${b.type}'`)}}var K6t=n6({parse:b=>lK(b),hasPragma:()=>!0,hasIgnorePragma:()=>!1}),J6t=n6(b=>lK(b)),X6t=n6(b=>lK(b,{allowEmpty:!0})),Z6t=n6({parse:b=>lK(b,{allowComments:!1}),astFormat:"estree-json"}),$6t={...l,...zGe};return s(a)})});function knt(i,e){let t=i;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}var Xi,gd=D(()=>{Xi=window});function FSe(i,e,t){typeof e=="string"&&(e=i.matchMedia(e)),e.addEventListener("change",t)}function Int(i){return RSe.INSTANCE.getZoomFactor(i)}function Lnt(){return t$}var RSe,FF,yl,wA,FS,Zf,i$,Qji,OSe,t$,Kh=D(()=>{gd();RSe=class i{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new i}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};FF=navigator.userAgent,yl=FF.indexOf("Firefox")>=0,wA=FF.indexOf("AppleWebKit")>=0,FS=FF.indexOf("Chrome")>=0,Zf=!FS&&FF.indexOf("Safari")>=0,i$=!FS&&!Zf&&wA,Qji=FF.indexOf("Electron/")>=0,OSe=FF.indexOf("Android")>=0,t$=!1;if(typeof Xi.matchMedia=="function"){let i=Xi.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=Xi.matchMedia("(display-mode: fullscreen)");t$=i.matches,FSe(Xi,i,({matches:t})=>{t$&&e.matches||(t$=t)})}});var OF,n$=D(()=>{Kh();gd();wi();OF={clipboard:{writeText:Bh||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:Bh||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:Bh||Lnt()?0:navigator.keyboard||Zf?1:2,touch:"ontouchstart"in Xi||navigator.maxTouchPoints>0,pointerEvents:Xi.PointerEvent&&("ontouchstart"in Xi||navigator.maxTouchPoints>0)}});function fz(i,e){if(typeof i=="number"){if(i===0)return null;let t=(i&65535)>>>0,n=(i&4294901760)>>>16;return n!==0?new hz([o$(t,e),o$(n,e)]):new hz([o$(t,e)])}else{let t=[];for(let n=0;n{Tt();fg=class i{constructor(e,t,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=o,this.keyCode=r}equals(e){return e instanceof i&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},hz=class{constructor(e){if(e.length===0)throw mc("chords");this.chords=e}},r$=class{constructor(e,t,n,o,r,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=o,this.keyLabel=r,this.keyAriaLabel=s}},s$=class{}});function Fii(i){if(i.charCode){let t=String.fromCharCode(i.charCode).toUpperCase();return xb.fromString(t)}let e=i.keyCode;if(e===3)return 7;if(yl)switch(e){case 59:return 85;case 60:if(Cr)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(jt)return 57;break}else if(wA){if(jt&&e===93)return 57;if(!jt&&e===92)return 57}return x1e[e]||0}var Oii,Pii,Bii,zii,Vi,xc=D(()=>{Kh();Bp();xI();wi();Oii=jt?256:2048,Pii=512,Bii=1024,zii=jt?2048:256,Vi=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=Fii(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=Oii),this.altKey&&(t|=Pii),this.shiftKey&&(t|=Bii),this.metaKey&&(t|=zii),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new fg(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}});function Vii(i){if(!i.parent||i.parent===i)return null;try{let e=i.location,t=i.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return i.parent}var Nnt,a$,Mnt=D(()=>{Nnt=new WeakMap;a$=class{static getSameOriginWindowChain(e){let t=Nnt.get(e);if(!t){t=[],Nnt.set(e,t);let n=e,o;do o=Vii(n),o?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=o;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,o=0,r=this.getSameOriginWindowChain(e);for(let s of r){let a=s.window.deref();if(n+=a?.scrollY??0,o+=a?.scrollX??0,a===t||!s.iframeElement)break;let l=s.iframeElement.getBoundingClientRect();n+=l.top,o+=l.left}return{top:n,left:o}}}});var wl,pg,$p=D(()=>{Kh();Mnt();wi();wl=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=a$.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},pg=class{constructor(e,t=0,n=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let o=!1;if(FS){let r=navigator.userAgent.match(/Chrome\/(\d+)/);o=(r?parseInt(r[1]):123)<=122}if(e){let r=e,s=e,a=e.view?.devicePixelRatio||1;if(typeof r.wheelDeltaY<"u")o?this.deltaY=r.wheelDeltaY/(120*a):this.deltaY=r.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?yl&&!jt?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")Zf&&Fo?this.deltaX=-(r.wheelDeltaX/120):o?this.deltaX=r.wheelDeltaX/(120*a):this.deltaX=r.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?yl&&!jt?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(o?this.deltaY=e.wheelDelta/(120*a):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}});var l$,PSe=D(()=>{l$=Symbol("MicrotaskDelay")});function d$(i){return!!i&&typeof i.then=="function"}function mo(i){let e=new Mi,t=i(e.token),n=new Promise((o,r)=>{let s=e.token.onCancellationRequested(()=>{s.dispose(),r(new qc)});Promise.resolve(t).then(a=>{s.dispose(),e.dispose(),o(a)},a=>{s.dispose(),e.dispose(),r(a)})});return new class{cancel(){e.cancel(),e.dispose()}then(o,r){return n.then(o,r)}catch(o){return this.then(void 0,o)}finally(o){return n.finally(o)}}}function hy(i,e,t){return new Promise((n,o)=>{let r=e.onCancellationRequested(()=>{r.dispose(),n(t)});i.then(n,o).finally(()=>r.dispose())})}function oh(i,e){return e?new Promise((t,n)=>{let o=setTimeout(()=>{r.dispose(),t()},i),r=e.onCancellationRequested(()=>{clearTimeout(o),r.dispose(),n(new qc)})}):mo(t=>oh(i,t))}function tm(i,e=0,t){let n=setTimeout(()=>{i(),t&&o.dispose()},e),o=He(()=>{clearTimeout(n),t?.deleteAndLeak(o)});return t?.add(o),o}function mz(i,e=n=>!!n,t=null){let n=0,o=i.length,r=()=>{if(n>=o)return Promise.resolve(t);let s=i[n++];return Promise.resolve(s()).then(l=>e(l)?Promise.resolve(l):r())};return r()}function Rnt(i){let e=new Mi,t=i(e.token);return new zSe(e,async n=>{let o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),n.reject(new qc)});try{for await(let r of t){if(e.token.isCancellationRequested)return;n.emitOne(r)}o.dispose(),e.dispose()}catch(r){o.dispose(),e.dispose(),n.reject(r)}})}var BSe,Hii,Wii,da,BF,ha,OS,si,VSe,PF,pz,c$,em,u$,Wu,zSe,Gt=D(()=>{sn();Tt();et();de();wi();PSe();BSe=class{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let t=()=>{if(this.queuedPromise=null,this.isDisposed)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(t,t).then(n)})}return new Promise((t,n)=>{this.queuedPromise.then(t,n)})}return this.activePromise=e(),new Promise((t,n)=>{this.activePromise.then(o=>{this.activePromise=null,t(o)},o=>{this.activePromise=null,n(o)})})}dispose(){this.isDisposed=!0}},Hii=(i,e)=>{let t=!0,n=setTimeout(()=>{t=!1,e()},i);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},Wii=i=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,i())}),{isTriggered:()=>e,dispose:()=>{e=!1}}},da=class{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((o,r)=>{this.doResolve=o,this.doReject=r}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let o=this.task;return this.task=null,o()}}));let n=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===l$?Wii(n):Hii(t,n),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new qc),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}},BF=class{constructor(e){this.delayer=new da(e),this.throttler=new BSe}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}};ha=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new fi("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new fi("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},OS=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new fi("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let o=n.setInterval(()=>{e()},t);this.disposable=He(()=>{n.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},si=class{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}};(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?PF=(i,e)=>{UK(()=>{if(t)return;let n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:PF=(i,e,t)=>{let n=i.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),o=!1;return{dispose(){o||(o=!0,i.cancelIdleCallback(n))}}},VSe=i=>PF(globalThis,i)})();pz=class{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=PF(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}},c$=class extends pz{constructor(e){super(globalThis,e)}},em=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new qc)}};(function(i){async function e(n){let o,r=await Promise.all(n.map(s=>s.then(a=>a,a=>{o||(o=a)})));if(typeof o<"u")throw o;return r}i.settled=e;function t(n){return new Promise(async(o,r)=>{try{await n(o,r)}catch(s){r(s)}})}i.withAsyncBody=t})(u$||(u$={}));Wu=class i{static fromArray(e){return new i(t=>{t.emitMany(e)})}static fromPromise(e){return new i(async t=>{t.emitMany(await e)})}static fromPromises(e){return new i(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new i(async t=>{await Promise.all(e.map(async n=>{for await(let o of n)t.emitOne(o)}))})}static{this.EMPTY=i.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new q,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(e(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new i(async n=>{for await(let o of e)n.emitOne(t(o))})}map(e){return i.map(this,e)}static filter(e,t){return new i(async n=>{for await(let o of e)t(o)&&n.emitOne(o)})}filter(e){return i.filter(this,e)}static coalesce(e){return i.filter(e,t=>!!t)}coalesce(){return i.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return i.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}},zSe=class extends Wu{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}});function mg(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:p$;Fnt&&Fnt(i,null);let n=e.length;for(;n--;){let o=e[n];if(typeof o=="string"){let r=t(o);r!==o&&(Uii(e)||(e[n]=r),o=r)}i[o]=!0}return i}function Kii(i){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:sni(),e=di=>qnt(di);if(e.version="3.1.7",e.removed=[],!i||!i.document||i.document.nodeType!==yz.document)return e.isSupported=!1,e;let{document:t}=i,n=t,o=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=i,p=l.prototype,g=vz(p,"cloneNode"),A=vz(p,"remove"),v=vz(p,"nextSibling"),w=vz(p,"childNodes"),C=vz(p,"parentNode");if(typeof s=="function"){let di=t.createElement("template");di.content&&di.content.ownerDocument&&(t=di.content.ownerDocument)}let _,E="",{implementation:I,createNodeIterator:T,createDocumentFragment:N,getElementsByTagName:L}=t,{importNode:B}=n,z={};e.isSupported=typeof Unt=="function"&&typeof C=="function"&&I&&I.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Q,ERB_EXPR:Z,TMPLIT_EXPR:U,DATA_ATTR:M,ARIA_ATTR:ee,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:$}=Wnt,{IS_ALLOWED_URI:re}=Wnt,ue=null,Ie=Po({},[...Bnt,...WSe,...USe,...jSe,...znt]),nt=null,mt=Po({},[...Vnt,...QSe,...Hnt,...f$]),xt=Object.seal(jnt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,Ht=null,Fe=!0,zt=!0,Fi=!1,Kt=!0,Li=!1,Bn=!0,zn=!1,yo=!1,Ei=!1,vt=!1,ni=!1,mr=!1,Wi=!0,xr=!1,Do="user-content-",As=!0,ra=!1,gr={},hl=null,Ro=Po({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),vs=null,er=Po({},["audio","video","img","source","image","track"]),qa=null,jo=Po({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fl="http://www.w3.org/1998/Math/MathML",pl="http://www.w3.org/2000/svg",tr="http://www.w3.org/1999/xhtml",ls=tr,Or=!1,sa=null,Yi=Po({},[fl,pl,tr],HSe),ir=null,rd=["application/xhtml+xml","text/html"],_o="text/html",Pr=null,Oh=null,vb=t.createElement("form"),Bf=function(_e){return _e instanceof RegExp||_e instanceof Function},Ph=function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oh&&Oh===_e)){if((!_e||typeof _e!="object")&&(_e={}),_e=CI(_e),ir=rd.indexOf(_e.PARSER_MEDIA_TYPE)===-1?_o:_e.PARSER_MEDIA_TYPE,Pr=ir==="application/xhtml+xml"?HSe:p$,ue=xA(_e,"ALLOWED_TAGS")?Po({},_e.ALLOWED_TAGS,Pr):Ie,nt=xA(_e,"ALLOWED_ATTR")?Po({},_e.ALLOWED_ATTR,Pr):mt,sa=xA(_e,"ALLOWED_NAMESPACES")?Po({},_e.ALLOWED_NAMESPACES,HSe):Yi,qa=xA(_e,"ADD_URI_SAFE_ATTR")?Po(CI(jo),_e.ADD_URI_SAFE_ATTR,Pr):jo,vs=xA(_e,"ADD_DATA_URI_TAGS")?Po(CI(er),_e.ADD_DATA_URI_TAGS,Pr):er,hl=xA(_e,"FORBID_CONTENTS")?Po({},_e.FORBID_CONTENTS,Pr):Ro,wt=xA(_e,"FORBID_TAGS")?Po({},_e.FORBID_TAGS,Pr):{},Ht=xA(_e,"FORBID_ATTR")?Po({},_e.FORBID_ATTR,Pr):{},gr=xA(_e,"USE_PROFILES")?_e.USE_PROFILES:!1,Fe=_e.ALLOW_ARIA_ATTR!==!1,zt=_e.ALLOW_DATA_ATTR!==!1,Fi=_e.ALLOW_UNKNOWN_PROTOCOLS||!1,Kt=_e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Li=_e.SAFE_FOR_TEMPLATES||!1,Bn=_e.SAFE_FOR_XML!==!1,zn=_e.WHOLE_DOCUMENT||!1,vt=_e.RETURN_DOM||!1,ni=_e.RETURN_DOM_FRAGMENT||!1,mr=_e.RETURN_TRUSTED_TYPE||!1,Ei=_e.FORCE_BODY||!1,Wi=_e.SANITIZE_DOM!==!1,xr=_e.SANITIZE_NAMED_PROPS||!1,As=_e.KEEP_CONTENT!==!1,ra=_e.IN_PLACE||!1,re=_e.ALLOWED_URI_REGEXP||Qnt,ls=_e.NAMESPACE||tr,xt=_e.CUSTOM_ELEMENT_HANDLING||{},_e.CUSTOM_ELEMENT_HANDLING&&Bf(_e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xt.tagNameCheck=_e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_e.CUSTOM_ELEMENT_HANDLING&&Bf(_e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xt.attributeNameCheck=_e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_e.CUSTOM_ELEMENT_HANDLING&&typeof _e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(xt.allowCustomizedBuiltInElements=_e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Li&&(zt=!1),ni&&(vt=!0),gr&&(ue=Po({},znt),nt=[],gr.html===!0&&(Po(ue,Bnt),Po(nt,Vnt)),gr.svg===!0&&(Po(ue,WSe),Po(nt,QSe),Po(nt,f$)),gr.svgFilters===!0&&(Po(ue,USe),Po(nt,QSe),Po(nt,f$)),gr.mathMl===!0&&(Po(ue,jSe),Po(nt,Hnt),Po(nt,f$))),_e.ADD_TAGS&&(ue===Ie&&(ue=CI(ue)),Po(ue,_e.ADD_TAGS,Pr)),_e.ADD_ATTR&&(nt===mt&&(nt=CI(nt)),Po(nt,_e.ADD_ATTR,Pr)),_e.ADD_URI_SAFE_ATTR&&Po(qa,_e.ADD_URI_SAFE_ATTR,Pr),_e.FORBID_CONTENTS&&(hl===Ro&&(hl=CI(hl)),Po(hl,_e.FORBID_CONTENTS,Pr)),As&&(ue["#text"]=!0),zn&&Po(ue,["html","head","body"]),ue.table&&(Po(ue,["tbody"]),delete wt.tbody),_e.TRUSTED_TYPES_POLICY){if(typeof _e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Az('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Az('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=_e.TRUSTED_TYPES_POLICY,E=_.createHTML("")}else _===void 0&&(_=ani(f,o)),_!==null&&typeof E=="string"&&(E=_.createHTML(""));ep&&ep(_e),Oh=_e}},Ni=Po({},["mi","mo","mn","ms","mtext"]),te=Po({},["annotation-xml"]),ne=Po({},["title","style","font","a","script"]),le=Po({},[...WSe,...USe,...Jii]),fe=Po({},[...jSe,...Xii]),ve=function(_e){let _t=C(_e);(!_t||!_t.tagName)&&(_t={namespaceURI:ls,tagName:"template"});let ot=p$(_e.tagName),Pt=p$(_t.tagName);return sa[_e.namespaceURI]?_e.namespaceURI===pl?_t.namespaceURI===tr?ot==="svg":_t.namespaceURI===fl?ot==="svg"&&(Pt==="annotation-xml"||Ni[Pt]):!!le[ot]:_e.namespaceURI===fl?_t.namespaceURI===tr?ot==="math":_t.namespaceURI===pl?ot==="math"&&te[Pt]:!!fe[ot]:_e.namespaceURI===tr?_t.namespaceURI===pl&&!te[Pt]||_t.namespaceURI===fl&&!Ni[Pt]?!1:!fe[ot]&&(ne[ot]||!le[ot]):!!(ir==="application/xhtml+xml"&&sa[_e.namespaceURI]):!1},Ve=function(_e){gz(e.removed,{element:_e});try{C(_e).removeChild(_e)}catch{A(_e)}},$e=function(_e,_t){try{gz(e.removed,{attribute:_t.getAttributeNode(_e),from:_t})}catch{gz(e.removed,{attribute:null,from:_t})}if(_t.removeAttribute(_e),_e==="is"&&!nt[_e])if(vt||ni)try{Ve(_t)}catch{}else try{_t.setAttribute(_e,"")}catch{}},It=function(_e){let _t=null,ot=null;if(Ei)_e=""+_e;else{let Qs=Pnt(_e,/^[\r\n\t ]+/);ot=Qs&&Qs[0]}ir==="application/xhtml+xml"&&ls===tr&&(_e=''+_e+"");let Pt=_?_.createHTML(_e):_e;if(ls===tr)try{_t=new h().parseFromString(Pt,ir)}catch{}if(!_t||!_t.documentElement){_t=I.createDocument(ls,"template",null);try{_t.documentElement.innerHTML=Or?E:Pt}catch{}}let js=_t.body||_t.documentElement;return _e&&ot&&js.insertBefore(t.createTextNode(ot),js.childNodes[0]||null),ls===tr?L.call(_t,zn?"html":"body")[0]:zn?_t.documentElement:js},qt=function(_e){return T.call(_e.ownerDocument||_e,_e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},yi=function(_e){return _e instanceof d&&(typeof _e.nodeName!="string"||typeof _e.textContent!="string"||typeof _e.removeChild!="function"||!(_e.attributes instanceof u)||typeof _e.removeAttribute!="function"||typeof _e.setAttribute!="function"||typeof _e.namespaceURI!="string"||typeof _e.insertBefore!="function"||typeof _e.hasChildNodes!="function")},pn=function(_e){return typeof a=="function"&&_e instanceof a},Mn=function(_e,_t,ot){z[_e]&&h$(z[_e],Pt=>{Pt.call(e,_t,ot,Oh)})},br=function(_e){let _t=null;if(Mn("beforeSanitizeElements",_e,null),yi(_e))return Ve(_e),!0;let ot=Pr(_e.nodeName);if(Mn("uponSanitizeElement",_e,{tagName:ot,allowedTags:ue}),_e.hasChildNodes()&&!pn(_e.firstElementChild)&&$f(/<[/\w]/g,_e.innerHTML)&&$f(/<[/\w]/g,_e.textContent)||_e.nodeType===yz.progressingInstruction||Bn&&_e.nodeType===yz.comment&&$f(/<[/\w]/g,_e.data))return Ve(_e),!0;if(!ue[ot]||wt[ot]){if(!wt[ot]&&Ya(ot)&&(xt.tagNameCheck instanceof RegExp&&$f(xt.tagNameCheck,ot)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(ot)))return!1;if(As&&!hl[ot]){let Pt=C(_e)||_e.parentNode,js=w(_e)||_e.childNodes;if(js&&Pt){let Qs=js.length;for(let no=Qs-1;no>=0;--no){let ks=g(js[no],!0);ks.__removalCount=(_e.__removalCount||0)+1,Pt.insertBefore(ks,v(_e))}}}return Ve(_e),!0}return _e instanceof l&&!ve(_e)||(ot==="noscript"||ot==="noembed"||ot==="noframes")&&$f(/<\/no(script|embed|frames)/i,_e.innerHTML)?(Ve(_e),!0):(Li&&_e.nodeType===yz.text&&(_t=_e.textContent,h$([Q,Z,U],Pt=>{_t=bz(_t,Pt," ")}),_e.textContent!==_t&&(gz(e.removed,{element:_e.cloneNode()}),_e.textContent=_t)),Mn("afterSanitizeElements",_e,null),!1)},wo=function(_e,_t,ot){if(Wi&&(_t==="id"||_t==="name")&&(ot in t||ot in vb))return!1;if(!(zt&&!Ht[_t]&&$f(M,_t))){if(!(Fe&&$f(ee,_t))){if(!nt[_t]||Ht[_t]){if(!(Ya(_e)&&(xt.tagNameCheck instanceof RegExp&&$f(xt.tagNameCheck,_e)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(_e))&&(xt.attributeNameCheck instanceof RegExp&&$f(xt.attributeNameCheck,_t)||xt.attributeNameCheck instanceof Function&&xt.attributeNameCheck(_t))||_t==="is"&&xt.allowCustomizedBuiltInElements&&(xt.tagNameCheck instanceof RegExp&&$f(xt.tagNameCheck,ot)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(ot))))return!1}else if(!qa[_t]){if(!$f(re,bz(ot,Y,""))){if(!((_t==="src"||_t==="xlink:href"||_t==="href")&&_e!=="script"&&Gii(ot,"data:")===0&&vs[_e])){if(!(Fi&&!$f(X,bz(ot,Y,"")))){if(ot)return!1}}}}}}return!0},Ya=function(_e){return _e!=="annotation-xml"&&Pnt(_e,$)},aa=function(_e){Mn("beforeSanitizeAttributes",_e,null);let{attributes:_t}=_e;if(!_t)return;let ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt},Pt=_t.length;for(;Pt--;){let js=_t[Pt],{name:Qs,namespaceURI:no,value:ks}=js,Fp=Pr(Qs),jc=Qs==="value"?ks:qii(ks);if(ot.attrName=Fp,ot.attrValue=jc,ot.keepAttr=!0,ot.forceKeepAttr=void 0,Mn("uponSanitizeAttribute",_e,ot),jc=ot.attrValue,ot.forceKeepAttr||($e(Qs,_e),!ot.keepAttr))continue;if(!Kt&&$f(/\/>/i,jc)){$e(Qs,_e);continue}Li&&h$([Q,Z,U],_w=>{jc=bz(jc,_w," ")});let ZM=Pr(_e.nodeName);if(wo(ZM,Fp,jc)){if(xr&&(Fp==="id"||Fp==="name")&&($e(Qs,_e),jc=Do+jc),Bn&&$f(/((--!?|])>)|<\/(style|title)/i,jc)){$e(Qs,_e);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!no)switch(f.getAttributeType(ZM,Fp)){case"TrustedHTML":{jc=_.createHTML(jc);break}case"TrustedScriptURL":{jc=_.createScriptURL(jc);break}}try{no?_e.setAttributeNS(no,Qs,jc):_e.setAttribute(Qs,jc),yi(_e)?Ve(_e):Ont(e.removed)}catch{}}}Mn("afterSanitizeAttributes",_e,null)},sd=function di(_e){let _t=null,ot=qt(_e);for(Mn("beforeSanitizeShadowDOM",_e,null);_t=ot.nextNode();)Mn("uponSanitizeShadowNode",_t,null),!br(_t)&&(_t.content instanceof r&&di(_t.content),aa(_t));Mn("afterSanitizeShadowDOM",_e,null)};return e.sanitize=function(di){let _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_t=null,ot=null,Pt=null,js=null;if(Or=!di,Or&&(di=""),typeof di!="string"&&!pn(di))if(typeof di.toString=="function"){if(di=di.toString(),typeof di!="string")throw Az("dirty is not a string, aborting")}else throw Az("toString is not a function");if(!e.isSupported)return di;if(yo||Ph(_e),e.removed=[],typeof di=="string"&&(ra=!1),ra){if(di.nodeName){let ks=Pr(di.nodeName);if(!ue[ks]||wt[ks])throw Az("root node is forbidden and cannot be sanitized in-place")}}else if(di instanceof a)_t=It(""),ot=_t.ownerDocument.importNode(di,!0),ot.nodeType===yz.element&&ot.nodeName==="BODY"||ot.nodeName==="HTML"?_t=ot:_t.appendChild(ot);else{if(!vt&&!Li&&!zn&&di.indexOf("<")===-1)return _&&mr?_.createHTML(di):di;if(_t=It(di),!_t)return vt?null:mr?E:""}_t&&Ei&&Ve(_t.firstChild);let Qs=qt(ra?di:_t);for(;Pt=Qs.nextNode();)br(Pt)||(Pt.content instanceof r&&sd(Pt.content),aa(Pt));if(ra)return di;if(vt){if(ni)for(js=N.call(_t.ownerDocument);_t.firstChild;)js.appendChild(_t.firstChild);else js=_t;return(nt.shadowroot||nt.shadowrootmode)&&(js=B.call(n,js,!0)),js}let no=zn?_t.outerHTML:_t.innerHTML;return zn&&ue["!doctype"]&&_t.ownerDocument&&_t.ownerDocument.doctype&&_t.ownerDocument.doctype.name&&$f(Gnt,_t.ownerDocument.doctype.name)&&(no=" +`+no),Li&&h$([Q,Z,U],ks=>{no=bz(no,ks," ")}),_&&mr?_.createHTML(no):no},e.setConfig=function(){let di=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ph(di),yo=!0},e.clearConfig=function(){Oh=null,yo=!1},e.isValidAttribute=function(di,_e,_t){Oh||Ph({});let ot=Pr(di),Pt=Pr(_e);return wo(ot,Pt,_t)},e.addHook=function(di,_e){typeof _e=="function"&&(z[di]=z[di]||[],gz(z[di],_e))},e.removeHook=function(di){if(z[di])return Ont(z[di])},e.removeHooks=function(di){z[di]&&(z[di]=[])},e.removeAllHooks=function(){z={}},e}var Unt,Fnt,Uii,jii,Qii,ep,Ub,jnt,GSe,qSe,h$,Ont,gz,p$,HSe,Pnt,bz,Gii,qii,xA,$f,Az,Bnt,WSe,USe,Jii,jSe,Xii,znt,Vnt,QSe,Hnt,f$,Zii,$ii,eni,tni,ini,Qnt,nni,oni,Gnt,rni,Wnt,yz,sni,ani,fy,dQi,hQi,m$,fQi,pQi,mQi,g$,b$,gQi,bQi,A$=D(()=>{({entries:Unt,setPrototypeOf:Fnt,isFrozen:Uii,getPrototypeOf:jii,getOwnPropertyDescriptor:Qii}=Object),{freeze:ep,seal:Ub,create:jnt}=Object,{apply:GSe,construct:qSe}=typeof Reflect<"u"&&Reflect;ep||(ep=function(e){return e});Ub||(Ub=function(e){return e});GSe||(GSe=function(e,t,n){return e.apply(t,n)});qSe||(qSe=function(e,t){return new e(...t)});h$=mg(Array.prototype.forEach),Ont=mg(Array.prototype.pop),gz=mg(Array.prototype.push),p$=mg(String.prototype.toLowerCase),HSe=mg(String.prototype.toString),Pnt=mg(String.prototype.match),bz=mg(String.prototype.replace),Gii=mg(String.prototype.indexOf),qii=mg(String.prototype.trim),xA=mg(Object.prototype.hasOwnProperty),$f=mg(RegExp.prototype.test),Az=Yii(TypeError);Bnt=ep(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),WSe=ep(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),USe=ep(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jii=ep(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jSe=ep(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Xii=ep(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),znt=ep(["#text"]),Vnt=ep(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),QSe=ep(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hnt=ep(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),f$=ep(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Zii=Ub(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$ii=Ub(/<%[\w\W]*|[\w\W]*%>/gm),eni=Ub(/\${[\w\W]*}/gm),tni=Ub(/^data-[\-\w.\u00B7-\uFFFF]/),ini=Ub(/^aria-[\-\w]+$/),Qnt=Ub(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nni=Ub(/^(?:\w+script|data):/i),oni=Ub(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gnt=Ub(/^html$/i),rni=Ub(/^[a-z][.\w]*(-[.\w]+)+$/i),Wnt=Object.freeze({__proto__:null,MUSTACHE_EXPR:Zii,ERB_EXPR:$ii,TMPLIT_EXPR:eni,DATA_ATTR:tni,ARIA_ATTR:ini,IS_ALLOWED_URI:Qnt,IS_SCRIPT_OR_DATA:nni,ATTR_WHITESPACE:oni,DOCTYPE_NAME:Gnt,CUSTOM_ELEMENT:rni}),yz={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},sni=function(){return typeof window>"u"?null:window},ani=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));let r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}};fy=qnt(),dQi=fy.version,hQi=fy.isSupported,m$=fy.sanitize,fQi=fy.setConfig,pQi=fy.clearConfig,mQi=fy.isValidAttribute,g$=fy.addHook,b$=fy.removeHook,gQi=fy.removeHooks,bQi=fy.removeAllHooks});function Knt(i){return i}var v$,wz,YSe=D(()=>{v$=class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Knt):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){let t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}},wz=class{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=Knt):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){let t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);let n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}});var $s,CA=D(()=>{$s=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}});function w$(i){return!i||typeof i!="string"?!0:i.trim().length===0}function gg(i,...e){return e.length===0?i:i.replace(lni,function(t,n){let o=parseInt(n,10);return isNaN(o)||o<0||o>=e.length?t:e[o]})}function Xnt(i){return i.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function PS(i){return i.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function $a(i){return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Znt(i,e=" "){let t=fx(i,e);return JSe(t,e)}function fx(i,e){if(!i||!e)return i;let t=e.length;if(t===0||i.length===0)return i;let n=0;for(;i.indexOf(e,n)===n;)n=n+t;return i.substring(n)}function JSe(i,e){if(!i||!e)return i;let t=e.length,n=i.length;if(t===0||n===0)return i;let o=n,r=-1;for(;r=i.lastIndexOf(e,o-1),!(r===-1||r+t!==o);){if(r===0)return"";o=r}return i.substring(0,o)}function $nt(i){return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function eot(i){return i.replace(/\*/g,"")}function x$(i,e,t={}){if(!i)throw new Error("Cannot create regex from empty string");e||(i=$a(i)),t.wholeWord&&(/\B/.test(i.charAt(0))||(i="\\b"+i),/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(i,n)}function tot(i){return i.source==="^"||i.source==="^$"||i.source==="$"||i.source==="^\\s*$"?!1:!!(i.exec("")&&i.lastIndex===0)}function Uu(i){return i.split(/\r\n|\r|\n/)}function iot(i){let e=[],t=i.split(/(\r\n|\r|\n)/);for(let n=0;n=0;t--){let n=i.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function BS(i,e){return ie?1:0}function C$(i,e,t=0,n=i.length,o=0,r=e.length){for(;tc)return 1}let s=n-t,a=r-o;return sa?1:0}function Cz(i,e){return VF(i,e,0,i.length,0,e.length)}function VF(i,e,t=0,n=i.length,o=0,r=e.length){for(;t=128||c>=128)return C$(i.toLowerCase(),e.toLowerCase(),t,n,o,r);py(l)&&(l-=32),py(c)&&(c-=32);let u=l-c;if(u!==0)return u}let s=n-t,a=r-o;return sa?1:0}function _z(i){return i>=48&&i<=57}function py(i){return i>=97&&i<=122}function bg(i){return i>=65&&i<=90}function px(i,e){return i.length===e.length&&VF(i,e)===0}function HF(i,e){let t=e.length;return e.length>i.length?!1:VF(i,e,0,t)===0}function tp(i,e){let t=Math.min(i.length,e.length),n;for(n=0;n1){let n=i.charCodeAt(e-2);if(Er(n))return _$(n,t)}return t}function Sz(i,e){return new _I(i,e).nextGraphemeLength()}function XSe(i,e){return new _I(i,e).prevGraphemeLength()}function not(i,e){e>0&&my(i.charCodeAt(e))&&e--;let t=e+Sz(i,e);return[t-XSe(i,t),t]}function uni(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function _A(i){return KSe||(KSe=uni()),KSe.test(i)}function gy(i){return dni.test(i)}function S$(i){return ZSe.test(i)}function Ag(i){return i>=11904&&i<=55215||i>=63744&&i<=64255||i>=65281&&i<=65374}function Ez(i){return i>=127462&&i<=127487||i===8986||i===8987||i===9200||i===9203||i>=9728&&i<=10175||i===11088||i===11093||i>=127744&&i<=128591||i>=128640&&i<=128764||i>=128992&&i<=129008||i>=129280&&i<=129535||i>=129648&&i<=129782}function UF(i){return!!(i&&i.length>0&&i.charCodeAt(0)===65279)}function rot(i,e=!1){return i?(e&&(i=i.replace(/\\./g,"")),i.toLowerCase()!==i):!1}function E$(i){return i=i%52,i<26?String.fromCharCode(97+i):String.fromCharCode(65+i-26)}function Jnt(i,e){return i===0?e!==5&&e!==7:i===2&&e===3?!1:i===4||i===2||i===3||e===4||e===2||e===3?!0:!(i===8&&(e===8||e===9||e===11||e===12)||(i===11||i===9)&&(e===9||e===10)||(i===12||i===10)&&e===10||e===5||e===13||e===7||i===1||i===13&&e===14||i===6&&e===6)}function hni(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function sot(i,e){if(i===0)return 0;let t=fni(i,e);if(t!==void 0)return t;let n=new xz(e,i);return n.prevCodePoint(),n.offset}function fni(i,e){let t=new xz(e,i),n=t.prevCodePoint();for(;pni(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!Ez(n))return;let o=t.offset;return o>0&&t.prevCodePoint()===8205&&(o=t.offset),o}function pni(i){return 127995<=i&&i<=127999}var lni,xz,_I,KSe,dni,ZSe,oot,y$,D$,zF,hx,Rt=D(()=>{YSe();CA();lni=/{(\d+)}/g;xz=class{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){let e=cni(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=WF(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}},_I=class{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new xz(e,t)}nextGraphemeLength(){let e=y$.getInstance(),t=this._iterator,n=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){let r=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(Jnt(o,s)){t.setOffset(r);break}o=s}return t.offset-n}prevGraphemeLength(){let e=y$.getInstance(),t=this._iterator,n=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){let r=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(Jnt(s,o)){t.setOffset(r);break}o=s}return n-t.offset}eol(){return this._iterator.eol()}};dni=/^[\t\n\r\x20-\x7E]*$/;ZSe=/[\u2028\u2029]/;oot="\uFEFF";y$=class i{static{this._INSTANCE=null}static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._data=hni()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let t=this._data,n=t.length/3,o=1;for(;o<=n;)if(et[3*o+1])o=2*o+1;else return t[3*o+2];return 0}};D$="\xA0",zF=class i{static{this.ambiguousCharacterData=new $s(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new v$({getCacheKey:JSON.stringify},e=>{function t(u){let d=new Map;for(let h=0;h!u.startsWith("_")&&u in r);s.length===0&&(s=["_default"]);let a;for(let u of s){let d=t(r[u]);a=o(a,d)}let l=t(r._common),c=n(l,a);return new i(c)})}static getInstance(e){return i.cache.get(Array.from(e))}static{this._locales=new $s(()=>Object.keys(i.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return i._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},hx=class i{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(i.getRawData())),this._data}static isInvisibleCharacter(e){return i.getData().has(e)}static get codePoints(){return i.getData()}}});function EI(i,e){return Je.isUri(i)?px(i.scheme,e):HF(i,e+":")}function Dz(i,...e){return e.some(t=>EI(i,t))}var Vt,mni,$Se,tEe,gni,eEe,mx,T$,xl=D(()=>{Tt();wi();Rt();mn();eA();(function(i){i.inMemory="inmemory",i.vscode="vscode",i.internal="private",i.walkThrough="walkThrough",i.walkThroughSnippet="walkThroughSnippet",i.http="http",i.https="https",i.file="file",i.mailto="mailto",i.untitled="untitled",i.data="data",i.command="command",i.vscodeRemote="vscode-remote",i.vscodeRemoteResource="vscode-remote-resource",i.vscodeManagedRemoteResource="vscode-managed-remote-resource",i.vscodeUserData="vscode-userdata",i.vscodeCustomEditor="vscode-custom-editor",i.vscodeNotebookCell="vscode-notebook-cell",i.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",i.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",i.vscodeNotebookCellOutput="vscode-notebook-cell-output",i.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",i.vscodeNotebookMetadata="vscode-notebook-metadata",i.vscodeInteractiveInput="vscode-interactive-input",i.vscodeSettings="vscode-settings",i.vscodeWorkspaceTrust="vscode-workspace-trust",i.vscodeTerminal="vscode-terminal",i.vscodeChatCodeBlock="vscode-chat-code-block",i.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",i.vscodeChatSesssion="vscode-chat-editor",i.webviewPanel="webview-panel",i.vscodeWebview="vscode-webview",i.extension="extension",i.vscodeFileResource="vscode-file",i.tmp="tmp",i.vsls="vsls",i.vscodeSourceControl="vscode-scm",i.commentsInput="comment",i.codeSetting="code-setting",i.outputChannel="output"})(Vt||(Vt={}));mni="tkn",$Se=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return Sr.join(this._serverRootPath,Vt.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return ft(a),e}let t=e.authority,n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let o=this._ports[t],r=this._connectionTokens[t],s=`path=${encodeURIComponent(e.path)}`;return typeof r=="string"&&(s+=`&${mni}=${encodeURIComponent(r)}`),Je.from({scheme:Cb?this._preferredWebSchema:Vt.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:s})}},tEe=new $Se,gni="vscode-app",eEe=class i{static{this.FALLBACK_AUTHORITY=gni}asBrowserUri(e){let t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===Vt.vscodeRemote?tEe.rewrite(e):e.scheme===Vt.file&&(Bh||nYe===`${Vt.vscodeFileResource}://${i.FALLBACK_AUTHORITY}`)?e.with({scheme:Vt.vscodeFileResource,authority:e.authority||i.FALLBACK_AUTHORITY,query:null,fragment:null}):e}toUri(e,t){if(Je.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let n=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(n))return Je.joinPath(Je.parse(n,!0),e);let o=dYe(n,e);return Je.file(o)}return Je.parse(t.toUrl(e))}},mx=new eEe;(function(i){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);i.CoopAndCoep=Object.freeze(e.get("3"));let t="vscode-coi";function n(r){let s;typeof r=="string"?s=new URL(r).searchParams:r instanceof URL?s=r.searchParams:Je.isUri(r)&&(s=new URL(r.toString(!0)).searchParams);let a=s?.get(t);if(a)return e.get(a)}i.getHeadersFromQuery=n;function o(r,s,a){if(!globalThis.crossOriginIsolated)return;let l=s&&a?"3":a?"2":"1";r instanceof URLSearchParams?r.set(t,l):r[t]=l}i.addSearchParam=o})(T$||(T$={}))});function zS(i){return kz(i,0)}function kz(i,e){switch(typeof i){case"object":return i===null?gx(349,e):Array.isArray(i)?Ani(i,e):vni(i,e);case"string":return I$(i,e);case"boolean":return bni(i,e);case"number":return gx(i,e);case"undefined":return gx(937,e);default:return gx(617,e)}}function gx(i,e){return(e<<5)-e+i|0}function bni(i,e){return gx(i?433:863,e)}function I$(i,e){e=gx(149417,e);for(let t=0,n=i.length;tkz(n,t),e)}function vni(i,e){return e=gx(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=I$(n,t),kz(i[n],t)),e)}function iEe(i,e,t=32){let n=t-e,o=~((1<>>n)>>>0}function aot(i,e=0,t=i.byteLength,n=0){for(let o=0;ot.toString(16).padStart(2,"0")).join(""):yni((i>>>0).toString(16),e/4)}var k$,VS=D(()=>{Rt();k$=class i{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,o=this._buffLen,r=this._leftoverHighSurrogate,s,a;for(r!==0?(s=r,a=-1,r=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(Er(s))if(a+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Tz(this._h0)+Tz(this._h1)+Tz(this._h2)+Tz(this._h3)+Tz(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,aot(this._buff,this._buffLen),this._buffLen>56&&(this._step(),aot(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=i._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,iEe(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,o=this._h1,r=this._h2,s=this._h3,a=this._h4,l,c,u;for(let d=0;d<80;d++)d<20?(l=o&r|~o&s,c=1518500249):d<40?(l=o^r^s,c=1859775393):d<60?(l=o&r|o&s|r&s,c=2400959708):(l=o^r^s,c=3395469782),u=iEe(n,5)+l+a+c+e.getUint32(d*4,!1)&4294967295,a=s,s=r,r=iEe(o,30),o=n,n=u;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}}});function Tr(i){for(;i.firstChild;)i.firstChild.remove()}function ce(i,e,t,n){return new oEe(i,e,t,n)}function dot(i,e){return function(t){return e(new wl(i,t))}}function xni(i){return function(e){return i(new Vi(e))}}function Cni(i,e,t){return ce(i,Ou&&OF.pointerEvents?Te.POINTER_DOWN:Te.MOUSE_DOWN,e,t)}function TI(i,e,t){return PF(i,e,t)}function Nz(i){return rt(i).getComputedStyle(i,null)}function Xh(i,e){let t=rt(i),n=t.document;if(i!==n.body)return new hn(i.clientWidth,i.clientHeight);if(Ou&&t?.visualViewport)return new hn(t.visualViewport.width,t.visualViewport.height);if(t?.innerWidth&&t.innerHeight)return new hn(t.innerWidth,t.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new hn(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new hn(n.documentElement.clientWidth,n.documentElement.clientHeight);if(e)return Xh(e);throw new Error("Unable to figure out browser width and height")}function M$(i){let e=i.offsetParent,t=i.offsetTop,n=i.offsetLeft;for(;(i=i.parentNode)!==null&&i!==i.ownerDocument.body&&i!==i.ownerDocument.documentElement;){t-=i.scrollTop;let o=mot(i)?null:Nz(i);o&&(n-=o.direction!=="rtl"?i.scrollLeft:-i.scrollLeft),i===e&&(n+=Jh.getBorderLeftWidth(i),t+=Jh.getBorderTopWidth(i),t+=i.offsetTop,n+=i.offsetLeft,e=i.offsetParent)}return{left:n,top:t}}function fot(i,e,t){typeof e=="number"&&(i.style.width=`${e}px`),typeof t=="number"&&(i.style.height=`${t}px`)}function bn(i){let e=i.getBoundingClientRect(),t=rt(i);return{left:e.left+t.scrollX,top:e.top+t.scrollY,width:e.width,height:e.height}}function R$(i){let e=i,t=1;do{let n=Nz(e).zoom;n!=null&&n!=="1"&&(t*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function Cc(i){let e=Jh.getMarginLeft(i)+Jh.getMarginRight(i);return i.offsetWidth+e}function F$(i){let e=Jh.getBorderLeftWidth(i)+Jh.getBorderRightWidth(i),t=Jh.getPaddingLeft(i)+Jh.getPaddingRight(i);return i.offsetWidth-e-t}function pot(i){let e=Jh.getBorderTopWidth(i)+Jh.getBorderBottomWidth(i),t=Jh.getPaddingTop(i)+Jh.getPaddingBottom(i);return i.offsetHeight-e-t}function vg(i){let e=Jh.getMarginTop(i)+Jh.getMarginBottom(i);return i.offsetHeight+e}function Dr(i,e){return!!e?.contains(i)}function _ni(i,e,t){for(;i&&i.nodeType===i.ELEMENT_NODE;){if(i.classList.contains(e))return i;if(t){if(typeof t=="string"){if(i.classList.contains(t))return null}else if(i===t)return null}i=i.parentNode}return null}function O$(i,e,t){return!!_ni(i,e,t)}function mot(i){return i&&!!i.host&&!!i.mode}function kI(i){return!!SA(i)}function SA(i){for(;i.parentNode;){if(i===i.ownerDocument?.body)return null;i=i.parentNode}return mot(i)?i:null}function ds(){let i=Ax().activeElement;for(;i?.shadowRoot;)i=i.shadowRoot.activeElement;return i}function II(i){return ds()===i}function P$(i){return Dr(ds(),i)}function Ax(){return wni()<=1?Xi.document:Array.from(lot()).map(({window:e})=>e.document).find(e=>e.hasFocus())??Xi.document}function LI(){return Ax().defaultView?.window??Xi}function B$(){return new rEe}function el(i=Xi.document.head,e,t){let n=document.createElement("style");if(n.type="text/css",n.media="screen",e?.(n),i.appendChild(n),t&&t.add(He(()=>n.remove())),i===Xi.document.head){let o=new Set;lEe.set(n,o);for(let{window:r,disposables:s}of lot()){if(r===Xi)continue;let a=s.add(Sni(n,o,r));t?.add(a)}}return n}function Sni(i,e,t){let n=new se,o=i.cloneNode(!0);t.document.head.appendChild(o),n.add(He(()=>o.remove()));for(let r of bot(i))o.sheet?.insertRule(r.cssText,o.sheet?.cssRules.length);return n.add(Eni.observe(i,n,{childList:!0})(()=>{o.textContent=i.textContent})),e.add(o),n.add(He(()=>e.delete(o))),n}function got(){return nEe||(nEe=el()),nEe}function bot(i){return i?.sheet?.rules?i.sheet.rules:i?.sheet?.cssRules?i.sheet.cssRules:[]}function qF(i,e,t=got()){if(!(!t||!e)){t.sheet?.insertRule(`${i} {${e}}`,0);for(let n of lEe.get(t)??[])qF(i,e,n)}}function z$(i,e=got()){if(!e)return;let t=bot(e),n=[];for(let o=0;o=0;o--)e.sheet?.deleteRule(n[o]);for(let o of lEe.get(e)??[])z$(i,o)}function Dni(i){return typeof i.selectorText=="string"}function To(i){return i instanceof HTMLElement||i instanceof rt(i).HTMLElement}function cEe(i){return i instanceof HTMLAnchorElement||i instanceof rt(i).HTMLAnchorElement}function Aot(i){return i instanceof SVGElement||i instanceof rt(i).SVGElement}function YF(i){return i instanceof MouseEvent||i instanceof rt(i).MouseEvent}function jb(i){return i instanceof KeyboardEvent||i instanceof rt(i).KeyboardEvent}function vot(i){let e=i;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}function yot(i){let e=[];for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)e[t]=i.scrollTop,i=i.parentNode;return e}function wot(i,e){for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)i.scrollTop!==e[t]&&(i.scrollTop=e[t]),i=i.parentNode}function iu(i){return new sEe(i)}function xot(i,e){return i.after(e),e}function Ae(i,...e){if(i.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function KF(i,e){return i.insertBefore(e,i.firstChild),e}function kr(i,...e){i.innerText="",Ae(i,...e)}function Cot(i,e,t,...n){let o=Tni.exec(e);if(!o)throw new Error("Bad use of emmet");let r=o[1]||"div",s;return i!==Lz.HTML?s=document.createElementNS(i,r):s=document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...n),s}function xe(i,e,...t){return Cot(Lz.HTML,i,e,...t)}function _ot(i,...e){i?ql(...e):_l(...e)}function ql(...i){for(let e of i)e.style.display="",e.removeAttribute("aria-hidden")}function _l(...i){for(let e of i)e.style.display="none",e.setAttribute("aria-hidden","true")}function uEe(i,e){let t=i.devicePixelRatio*e;return Math.max(1,Math.floor(t))/i.devicePixelRatio}function V$(i){Xi.open(i,"_blank","noopener")}function Sot(i,e){let t=()=>{e(),n=Cl(i,t)},n=Cl(i,t);return He(()=>n.dispose())}function im(i){return i?`url('${mx.uriToBrowserUri(i).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function H$(i){return`'${i.replace(/'/g,"%27")}'`}function yg(i,e){if(i!==void 0){let t=i.match(/^\s*var\((.+)\)$/);if(t){let n=t[1].split(",",2);return n.length===2&&(e=yg(n[1].trim(),e)),`var(${n[0]}, ${e})`}return i}return e}function Eot(i,e=!1){let t=document.createElement("a");return g$("afterSanitizeAttributes",n=>{for(let o of["href","src"])if(n.hasAttribute(o)){let r=n.getAttribute(o);if(o==="href"&&r.startsWith("#"))continue;if(t.href=r,!i.includes(t.protocol.replace(/:$/,""))){if(e&&o==="src"&&t.href.startsWith("data:"))continue;n.removeAttribute(o)}}}),He(()=>{b$("afterSanitizeAttributes")})}function ci(i,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);let o=Tot.exec(i);if(!o||!o.groups)throw new Error("Bad use of h");let r=o.groups.tag||"div",s=document.createElement(r);o.groups.id&&(s.id=o.groups.id);let a=[];if(o.groups.class)for(let c of o.groups.class.split("."))c!==""&&a.push(c);if(t.className!==void 0)for(let c of t.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));let l={};if(o.groups.name&&(l[o.groups.name]=s),n)for(let c of n)To(c)?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(let[c,u]of Object.entries(t))if(c!=="className")if(c==="style")for(let[d,h]of Object.entries(u))s.style.setProperty(N$(d),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=u:s.setAttribute(N$(c),u.toString());return l.root=s,l}function NI(i,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);let o=Tot.exec(i);if(!o||!o.groups)throw new Error("Bad use of h");let r=o.groups.tag||"div",s=document.createElementNS("http://www.w3.org/2000/svg",r);o.groups.id&&(s.id=o.groups.id);let a=[];if(o.groups.class)for(let c of o.groups.class.split("."))c!==""&&a.push(c);if(t.className!==void 0)for(let c of t.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));let l={};if(o.groups.name&&(l[o.groups.name]=s),n)for(let c of n)To(c)?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(let[c,u]of Object.entries(t))if(c!=="className")if(c==="style")for(let[d,h]of Object.entries(u))s.style.setProperty(N$(d),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=u:s.setAttribute(N$(c),u.toString());return l.root=s,l}function N$(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var FQi,rt,OQi,lot,wni,jF,aEe,PQi,DI,cot,uot,oEe,un,hot,QF,GF,Cl,HS,Iz,Jh,hn,lEe,rEe,Eni,nEe,Te,mi,sEe,Tni,Lz,Dot,BQi,bx,L$,Tot,Ye=D(()=>{Kh();n$();xc();$p();Gt();Tt();et();A$();de();xl();wi();VS();gd();({registerWindow:FQi,getWindow:rt,getDocument:OQi,getWindows:lot,getWindowsCount:wni,getWindowId:jF,getWindowById:aEe,hasWindow:PQi,onDidRegisterWindow:DI,onWillUnregisterWindow:cot,onDidUnregisterWindow:uot}=(function(){let i=new Map;knt(Xi,1);let e={window:Xi,disposables:new se};i.set(Xi.vscodeWindowId,e);let t=new q,n=new q,o=new q;function r(s,a){return(typeof s=="number"?i.get(s):void 0)??(a?e:void 0)}return{onDidRegisterWindow:t.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(s){if(i.has(s.vscodeWindowId))return H.None;let a=new se,l={window:s,disposables:a.add(new se)};return i.set(s.vscodeWindowId,l),a.add(He(()=>{i.delete(s.vscodeWindowId),n.fire(s)})),a.add(ce(s,Te.BEFORE_UNLOAD,()=>{o.fire(s)})),t.fire(l),a},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(s){return s.vscodeWindowId},hasWindow(s){return i.has(s)},getWindowById:r,getWindow(s){let a=s;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=s;return l?.view?l.view.window:Xi},getDocument(s){return rt(s).document}}})());oEe=class{constructor(e,t,n,o){this._node=e,this._type=t,this._handler=n,this._options=o||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};un=function(e,t,n,o){let r=n;return t==="click"||t==="mousedown"||t==="contextmenu"?r=dot(rt(e),n):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=xni(n)),ce(e,t,r,o)},hot=function(e,t,n){let o=dot(rt(e),t);return Cni(e,o,n)};QF=class extends pz{constructor(e,t){super(e,t)}},HS=class extends OS{constructor(e){super(),this.defaultTarget=e&&rt(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},Iz=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){ft(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let i=new Map,e=new Map,t=new Map,n=new Map,o=r=>{t.set(r,!1);let s=i.get(r)??[];for(e.set(r,s),i.set(r,[]),n.set(r,!0);s.length>0;)s.sort(Iz.sort),s.shift().execute();n.set(r,!1)};Cl=(r,s,a=0)=>{let l=jF(r),c=new Iz(s,a),u=i.get(l);return u||(u=[],i.set(l,u)),u.push(c),t.get(l)||(t.set(l,!0),r.requestAnimationFrame(()=>o(l))),c},GF=(r,s,a)=>{let l=jF(r);if(n.get(l)){let c=new Iz(s,a),u=e.get(l);return u||(u=[],e.set(l,u)),u.push(c),c}else return Cl(r,s,a)}})();Jh=class i{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let o=Nz(e),r=o?o.getPropertyValue(t):"0";return i.convertToPixels(e,r)}static getBorderLeftWidth(e){return i.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return i.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return i.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return i.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return i.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return i.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return i.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return i.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return i.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return i.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return i.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return i.getDimension(e,"margin-bottom","marginBottom")}},hn=class i{static{this.None=new i(0,0)}constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new i(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof i?e:new i(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};lEe=new Map;rEe=class{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=el(Xi.document.head,t=>t.innerText=e))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}};Eni=new class{constructor(){this.mutationObservers=new Map}observe(i,e,t){let n=this.mutationObservers.get(i);n||(n=new Map,this.mutationObservers.set(i,n));let o=zS(t),r=n.get(o);if(r)r.users+=1;else{let s=new q,a=new MutationObserver(c=>s.fire(c));a.observe(i,t);let l=r={users:1,observer:a,onDidMutate:s.event};e.add(He(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(i))})),n.set(o,r)}return r.onDidMutate}},nEe=null;Te={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:wA?"webkitAnimationStart":"animationstart",ANIMATION_END:wA?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:wA?"webkitAnimationIteration":"animationiteration"};mi={stop:(i,e)=>(i.preventDefault(),e&&i.stopPropagation(),i)};sEe=class i extends H{static hasFocusWithin(e){if(To(e)){let t=SA(e),n=t?t.activeElement:e.ownerDocument.activeElement;return Dr(n,e)}else{let t=e;return Dr(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new q),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new q),this.onDidBlur=this._onDidBlur.event;let t=i.hasFocusWithin(e),n=!1,o=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(n=!0,(To(e)?rt(e):e).setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{i.hasFocusWithin(e)!==t&&(t?r():o())},this._register(ce(e,Te.FOCUS,o,!0)),this._register(ce(e,Te.BLUR,r,!0)),To(e)&&(this._register(ce(e,Te.FOCUS_IN,()=>this._refreshStateHandler())),this._register(ce(e,Te.FOCUS_OUT,()=>this._refreshStateHandler())))}};Tni=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.SVG="http://www.w3.org/2000/svg"})(Lz||(Lz={}));xe.SVG=function(i,e,...t){return Cot(Lz.SVG,i,e,...t)};tEe.setPreferredWebSchema(/^https:/.test(Xi.location.href)?"https":"http");Dot=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),BQi=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0}),bx=class i extends q{constructor(){super(),this._subscriptions=new se,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Ee.runAndSubscribe(DI,({window:e,disposables:t})=>this.registerListeners(e,t),{window:Xi,disposables:this._subscriptions}))}registerListeners(e,t){t.add(ce(e,"keydown",n=>{if(n.defaultPrevented)return;let o=new Vi(n);if(!(o.keyCode===6&&n.repeat)){if(n.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(n.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(n.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(n.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(o.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=n,this.fire(this._keyStatus))}},!0)),t.add(ce(e,"keyup",n=>{n.defaultPrevented||(!n.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!n.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!n.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!n.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=n,this.fire(this._keyStatus)))},!0)),t.add(ce(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(ce(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(ce(e.document.body,"mousemove",n=>{n.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),t.add(ce(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return i.instance||(i.instance=new i),i.instance}dispose(){super.dispose(),this._subscriptions.dispose()}},L$=class extends H{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(ce(this.element,Te.DRAG_START,e=>{this.callbacks.onDragStart?.(e)})),this.callbacks.onDrag&&this._register(ce(this.element,Te.DRAG,e=>{this.callbacks.onDrag?.(e)})),this._register(ce(this.element,Te.DRAG_ENTER,e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter?.(e)})),this._register(ce(this.element,Te.DRAG_OVER,e=>{e.preventDefault(),this.callbacks.onDragOver?.(e,e.timeStamp-this.dragStartTime)})),this._register(ce(this.element,Te.DRAG_LEAVE,e=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave?.(e))})),this._register(ce(this.element,Te.DRAG_END,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd?.(e)})),this._register(ce(this.element,Te.DROP,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop?.(e)}))}},Tot=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/});var wg,JF=D(()=>{Ye();de();wg=class{constructor(){this._hooks=new se,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let s=e;try{e.setPointerCapture(t),this._hooks.add(He(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{s=rt(e)}this._hooks.add(ce(s,Te.POINTER_MOVE,a=>{if(a.buttons!==n){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(ce(s,Te.POINTER_UP,a=>this.stopMonitoring(!0)))}}});function W$(i,e){if(!i)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function WS(i,e="Unreachable"){throw new Error(e)}function dEe(i){i||ft(new fi("Soft Assertion Failed"))}function Qb(i){if(!i()){debugger;i(),ft(new fi("Assertion Failed"))}}function XF(i,e){let t=0;for(;t{Tt()});function US(i,e){let t=Math.pow(10,e);return Math.round(i*t)/t}var Ti,by,EA,me,Wr=D(()=>{Ti=class{constructor(e,t,n,o=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=US(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},by=class i{constructor(e,t,n,o){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=US(Math.max(Math.min(1,t),0),3),this.l=US(Math.max(Math.min(1,n),0),3),this.a=US(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,o=e.b/255,r=e.a,s=Math.max(t,n,o),a=Math.min(t,n,o),l=0,c=0,u=(a+s)/2,d=s-a;if(d>0){switch(c=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),s){case t:l=(n-o)/d+(n1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){let t=e.h/360,{s:n,l:o,a:r}=e,s,a,l;if(n===0)s=a=l=o;else{let c=o<.5?o*(1+n):o+n-o*n,u=2*o-c;s=i._hue2rgb(u,c,t+1/3),a=i._hue2rgb(u,c,t),l=i._hue2rgb(u,c,t-1/3)}return new Ti(Math.round(s*255),Math.round(a*255),Math.round(l*255),r)}},EA=class i{constructor(e,t,n,o){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=US(Math.max(Math.min(1,t),0),3),this.v=US(Math.max(Math.min(1,n),0),3),this.a=US(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,o=e.b/255,r=Math.max(t,n,o),s=Math.min(t,n,o),a=r-s,l=r===0?0:a/r,c;return a===0?c=0:r===t?c=((n-o)/a%6+6)%6:r===n?c=(o-t)/a+2:c=(t-n)/a+4,new i(Math.round(c*60),l,r,e.a)}static toRGBA(e){let{h:t,s:n,v:o,a:r}=e,s=o*n,a=s*(1-Math.abs(t/60%2-1)),l=o-s,[c,u,d]=[0,0,0];return t<60?(c=s,u=a):t<120?(c=a,u=s):t<180?(u=s,d=a):t<240?(u=a,d=s):t<300?(c=a,d=s):t<=360&&(c=s,d=a),c=Math.round((c+l)*255),u=Math.round((u+l)*255),d=Math.round((d+l)*255),new Ti(c,u,d,r)}},me=class i{static fromHex(e){return i.Format.CSS.parseHex(e)||i.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:by.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:EA.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof Ti)this.rgba=e;else if(e instanceof by)this._hsla=e,this.rgba=by.toRGBA(e);else if(e instanceof EA)this._hsva=e,this.rgba=EA.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&Ti.equals(this.rgba,e.rgba)&&by.equals(this.hsla,e.hsla)&&EA.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=i._relativeLuminanceForComponent(this.rgba.r),t=i._relativeLuminanceForComponent(this.rgba.g),n=i._relativeLuminanceForComponent(this.rgba.b),o=.2126*e+.7152*t+.0722*n;return US(o,4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t{Gb();gn();hEe=class{constructor(){this.data=new Map}add(e,t){W$(Na(e)),W$(zr(t)),W$(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}},Qi=new hEe});function Ini(i){return i.length>0&&i.charAt(i.length-1)==="#"?i.substring(0,i.length-1):i}var MI,fEe,Lni,j$=D(()=>{et();fa();MI={JSONContribution:"base.contributions.json"};fEe=class{constructor(){this._onDidChangeSchema=new q,this.schemasById={}}registerSchema(e,t){this.schemasById[Ini(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}},Lni=new fEe;Qi.add(MI.JSONContribution,Lni)});function Q$(i){return`--vscode-${i.replace(/\./g,"-")}`}function it(i){return`var(${Q$(i)})`}function Iot(i,e){return`var(${Q$(i)}, ${e})`}function Nni(i){return i!==null&&typeof i=="object"&&"light"in i&&"dark"in i}function j(i,e,t,n,o){return G$.registerColor(i,e,t,n,o)}function Rni(i,e){switch(i.op){case 0:return DA(i.value,e)?.darken(i.factor);case 1:return DA(i.value,e)?.lighten(i.factor);case 2:return DA(i.value,e)?.transparent(i.factor);case 3:{let t=DA(i.background,e);return t?DA(i.value,e)?.makeOpaque(t):DA(i.value,e)}case 4:for(let t of i.values){let n=DA(t,e);if(n)return n}return;case 6:return DA(e.defines(i.if)?i.then:i.else,e);case 5:{let t=DA(i.value,e);if(!t)return;let n=DA(i.background,e);return n?t.isDarkerThan(n)?me.getLighterColor(t,n,i.factor).transparent(i.transparency):me.getDarkerColor(t,n,i.factor).transparent(i.transparency):t.transparent(i.factor*i.transparency)}default:throw WS(i)}}function Ay(i,e){return{op:0,value:i,factor:e}}function nm(i,e){return{op:1,value:i,factor:e}}function ai(i,e){return{op:2,value:i,factor:e}}function RI(...i){return{op:4,values:i}}function Lot(i,e,t){return{op:6,if:i,then:e,else:t}}function gEe(i,e,t,n){return{op:5,value:i,background:e,factor:t,transparency:n}}function DA(i,e){if(i!==null){if(typeof i=="string")return i[0]==="#"?me.fromHex(i):e.getColor(i);if(i instanceof me)return i;if(typeof i=="object")return Rni(i,e)}}var mEe,Mni,pEe,G$,Not,Mot,kot,xg=D(()=>{Gb();Gt();Wr();et();j$();fa();Be();mEe={ColorContribution:"base.contributions.colors"},Mni="default",pEe=class{constructor(){this._onDidChangeSchema=new q,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,o=!1,r){let s={id:e,description:n,defaults:t,needsTransparency:o,deprecationMessage:r};this.colorsById[e]=s;let a={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(a.deprecationMessage=r),o&&(a.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",a.patternErrorMessage=y("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[a,{type:"string",const:Mni,description:y("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){let n=this.colorsById[e];if(n?.defaults){let o=Nni(n.defaults)?n.defaults[t.type]:n.defaults;return DA(o,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,n)=>{let o=t.indexOf(".")===-1?0:1,r=n.indexOf(".")===-1?0:1;return o!==r?o-r:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` +`)}},G$=new pEe;Qi.add(mEe.ColorContribution,G$);Not="vscode://schemas/workbench-colors",Mot=Qi.as(MI.JSONContribution);Mot.registerSchema(Not,G$.getColorSchema());kot=new si(()=>Mot.notifySchemaChanged(Not),200);G$.onDidChangeSchema(()=>{kot.isScheduled()||kot.schedule()})});var xi,eGi,tGi,iGi,FI,om,ki,eo,nGi,Rot,oGi,rGi,sGi,aGi,lGi,cGi,uGi,vx=D(()=>{Be();Wr();xg();xi=j("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},y("foreground","Overall foreground color. This color is only used if not overridden by a component.")),eGi=j("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},y("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),tGi=j("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},y("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),iGi=j("descriptionForeground",{light:"#717171",dark:ai(xi,.7),hcDark:ai(xi,.7),hcLight:ai(xi,.7)},y("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),FI=j("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},y("iconForeground","The default color for icons in the workbench.")),om=j("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},y("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),ki=j("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},y("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),eo=j("contrastActiveBorder",{light:null,dark:null,hcDark:om,hcLight:om},y("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),nGi=j("selection.background",null,y("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),Rot=j("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},y("textLinkForeground","Foreground color for links in text.")),oGi=j("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},y("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),rGi=j("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:me.black,hcLight:"#292929"},y("textSeparatorForeground","Color for text separators.")),sGi=j("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},y("textPreformatForeground","Foreground color for preformatted text segments.")),aGi=j("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},y("textPreformatBackground","Background color for preformatted text segments.")),lGi=j("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},y("textBlockQuoteBackground","Background color for block quotes in text.")),cGi=j("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:me.white,hcLight:"#292929"},y("textBlockQuoteBorder","Border color for block quotes in text.")),uGi=j("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:me.black,hcLight:"#F2F2F2"},y("textCodeBlockBackground","Background color for code blocks in text."))});var mGi,ZF,Fot,Mz,q$,Y$,K$,Oot,J$=D(()=>{Be();Wr();xg();vx();mGi=j("sash.hoverBorder",om,y("sashActiveBorder","Border color of active sashes.")),ZF=j("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:me.black,hcLight:"#0F4A85"},y("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Fot=j("badge.foreground",{dark:me.white,light:"#333",hcDark:me.white,hcLight:me.white},y("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),Mz=j("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},y("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),q$=j("scrollbarSlider.background",{dark:me.fromHex("#797979").transparent(.4),light:me.fromHex("#646464").transparent(.4),hcDark:ai(ki,.6),hcLight:ai(ki,.4)},y("scrollbarSliderBackground","Scrollbar slider background color.")),Y$=j("scrollbarSlider.hoverBackground",{dark:me.fromHex("#646464").transparent(.7),light:me.fromHex("#646464").transparent(.7),hcDark:ai(ki,.8),hcLight:ai(ki,.8)},y("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),K$=j("scrollbarSlider.activeBackground",{dark:me.fromHex("#BFBFBF").transparent(.4),light:me.fromHex("#000000").transparent(.6),hcDark:ki,hcLight:ki},y("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Oot=j("progressBar.background",{dark:me.fromHex("#0E70C0"),light:me.fromHex("#0E70C0"),hcDark:ki,hcLight:ki},y("progressBarBackground","Background color of the progress bar that can show for long running operations."))});var Zh,rm,wGi,xGi,CGi,_Gi,nu,OI,Fz,SGi,EGi,PI,Hot,Wot,sm,jS,DGi,$h,QS,Uot,TGi,jot,yx,Qot,yEe,Oz,kGi,IGi,Got,Cg,qot,LGi,NGi,qb,Yot,MGi,Rz,RGi,$$,FGi,eee,tee,Kot,Jot,Xot,Zot,Fni,OGi,PGi,BGi,zGi,VGi,HGi,X$,Z$,$ot,ert,WGi,UGi,jGi,QGi,trt,irt,GGi,qGi,YGi,KGi,JGi,XGi,ZGi,vy,iee,Pot,$Gi,eqi,nrt,ort,wEe,rrt,tqi,srt,Bot,zot,Vot,xEe,$F,bEe,iqi,AEe,nqi,vEe,oqi,eO,rqi,sqi,aqi,nee,CEe,art,lrt,crt,GS=D(()=>{Be();Wr();xg();vx();J$();Zh=j("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:me.black,hcLight:me.white},y("editorBackground","Editor background color.")),rm=j("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:me.white,hcLight:xi},y("editorForeground","Editor default foreground color.")),wGi=j("editorStickyScroll.background",Zh,y("editorStickyScrollBackground","Background color of sticky scroll in the editor")),xGi=j("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:me.fromHex("#0F4A85").transparent(.1)},y("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),CGi=j("editorStickyScroll.border",{dark:null,light:null,hcDark:ki,hcLight:ki},y("editorStickyScrollBorder","Border color of sticky scroll in the editor")),_Gi=j("editorStickyScroll.shadow",Mz,y("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),nu=j("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:me.white},y("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),OI=j("editorWidget.foreground",xi,y("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Fz=j("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:ki,hcLight:ki},y("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),SGi=j("editorWidget.resizeBorder",null,y("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),EGi=j("editorError.background",null,y("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),PI=j("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},y("editorError.foreground","Foreground color of error squigglies in the editor.")),Hot=j("editorError.border",{dark:null,light:null,hcDark:me.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},y("errorBorder","If set, color of double underlines for errors in the editor.")),Wot=j("editorWarning.background",null,y("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),sm=j("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},y("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),jS=j("editorWarning.border",{dark:null,light:null,hcDark:me.fromHex("#FFCC00").transparent(.8),hcLight:me.fromHex("#FFCC00").transparent(.8)},y("warningBorder","If set, color of double underlines for warnings in the editor.")),DGi=j("editorInfo.background",null,y("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),$h=j("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},y("editorInfo.foreground","Foreground color of info squigglies in the editor.")),QS=j("editorInfo.border",{dark:null,light:null,hcDark:me.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},y("infoBorder","If set, color of double underlines for infos in the editor.")),Uot=j("editorHint.foreground",{dark:me.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},y("editorHint.foreground","Foreground color of hint squigglies in the editor.")),TGi=j("editorHint.border",{dark:null,light:null,hcDark:me.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},y("hintBorder","If set, color of double underlines for hints in the editor.")),jot=j("editorLink.activeForeground",{dark:"#4E94CE",light:me.blue,hcDark:me.cyan,hcLight:"#292929"},y("activeLinkForeground","Color of active links.")),yx=j("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},y("editorSelectionBackground","Color of the editor selection.")),Qot=j("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:me.white},y("editorSelectionForeground","Color of the selected text for high contrast.")),yEe=j("editor.inactiveSelectionBackground",{light:ai(yx,.5),dark:ai(yx,.5),hcDark:ai(yx,.7),hcLight:ai(yx,.5)},y("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Oz=j("editor.selectionHighlightBackground",{light:gEe(yx,Zh,.3,.6),dark:gEe(yx,Zh,.3,.6),hcDark:null,hcLight:null},y("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),kGi=j("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:eo,hcLight:eo},y("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),IGi=j("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},y("editorFindMatch","Color of the current search match.")),Got=j("editor.findMatchForeground",null,y("editorFindMatchForeground","Text color of the current search match.")),Cg=j("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},y("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),qot=j("editor.findMatchHighlightForeground",null,y("findMatchHighlightForeground","Foreground color of the other search matches."),!0),LGi=j("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},y("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),NGi=j("editor.findMatchBorder",{light:null,dark:null,hcDark:eo,hcLight:eo},y("editorFindMatchBorder","Border color of the current search match.")),qb=j("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:eo,hcLight:eo},y("findMatchHighlightBorder","Border color of the other search matches.")),Yot=j("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:ai(eo,.4),hcLight:ai(eo,.4)},y("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),MGi=j("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},y("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Rz=j("editorHoverWidget.background",nu,y("hoverBackground","Background color of the editor hover.")),RGi=j("editorHoverWidget.foreground",OI,y("hoverForeground","Foreground color of the editor hover.")),$$=j("editorHoverWidget.border",Fz,y("hoverBorder","Border color of the editor hover.")),FGi=j("editorHoverWidget.statusBarBackground",{dark:nm(Rz,.2),light:Ay(Rz,.05),hcDark:nu,hcLight:nu},y("statusBarBackground","Background color of the editor hover status bar.")),eee=j("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:me.white,hcLight:me.black},y("editorInlayHintForeground","Foreground color of inline hints")),tee=j("editorInlayHint.background",{dark:ai(ZF,.1),light:ai(ZF,.1),hcDark:ai(me.white,.1),hcLight:ai(ZF,.1)},y("editorInlayHintBackground","Background color of inline hints")),Kot=j("editorInlayHint.typeForeground",eee,y("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),Jot=j("editorInlayHint.typeBackground",tee,y("editorInlayHintBackgroundTypes","Background color of inline hints for types")),Xot=j("editorInlayHint.parameterForeground",eee,y("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Zot=j("editorInlayHint.parameterBackground",tee,y("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Fni=j("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},y("editorLightBulbForeground","The color used for the lightbulb actions icon.")),OGi=j("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),PGi=j("editorLightBulbAi.foreground",Fni,y("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),BGi=j("editor.snippetTabstopHighlightBackground",{dark:new me(new Ti(124,124,124,.3)),light:new me(new Ti(10,50,100,.2)),hcDark:new me(new Ti(124,124,124,.3)),hcLight:new me(new Ti(10,50,100,.2))},y("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),zGi=j("editor.snippetTabstopHighlightBorder",null,y("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),VGi=j("editor.snippetFinalTabstopHighlightBackground",null,y("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),HGi=j("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new me(new Ti(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},y("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),X$=new me(new Ti(155,185,85,.2)),Z$=new me(new Ti(255,0,0,.2)),$ot=j("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},y("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ert=j("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},y("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),WGi=j("diffEditor.insertedLineBackground",{dark:X$,light:X$,hcDark:null,hcLight:null},y("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),UGi=j("diffEditor.removedLineBackground",{dark:Z$,light:Z$,hcDark:null,hcLight:null},y("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),jGi=j("diffEditorGutter.insertedLineBackground",null,y("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),QGi=j("diffEditorGutter.removedLineBackground",null,y("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),trt=j("diffEditorOverview.insertedForeground",null,y("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),irt=j("diffEditorOverview.removedForeground",null,y("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),GGi=j("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},y("diffEditorInsertedOutline","Outline color for the text that got inserted.")),qGi=j("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},y("diffEditorRemovedOutline","Outline color for text that got removed.")),YGi=j("diffEditor.border",{dark:null,light:null,hcDark:ki,hcLight:ki},y("diffEditorBorder","Border color between the two text editors.")),KGi=j("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},y("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),JGi=j("diffEditor.unchangedRegionBackground","sideBar.background",y("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),XGi=j("diffEditor.unchangedRegionForeground","foreground",y("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),ZGi=j("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},y("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),vy=j("widget.shadow",{dark:ai(me.black,.36),light:ai(me.black,.16),hcDark:null,hcLight:null},y("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),iee=j("widget.border",{dark:null,light:null,hcDark:ki,hcLight:ki},y("widgetBorder","Border color of widgets such as find/replace inside the editor.")),Pot=j("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},y("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),$Gi=j("toolbar.hoverOutline",{dark:null,light:null,hcDark:eo,hcLight:eo},y("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),eqi=j("toolbar.activeBackground",{dark:nm(Pot,.1),light:Ay(Pot,.1),hcDark:null,hcLight:null},y("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),nrt=j("breadcrumb.foreground",ai(xi,.8),y("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),ort=j("breadcrumb.background",Zh,y("breadcrumbsBackground","Background color of breadcrumb items.")),wEe=j("breadcrumb.focusForeground",{light:Ay(xi,.2),dark:nm(xi,.1),hcDark:nm(xi,.1),hcLight:nm(xi,.1)},y("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),rrt=j("breadcrumb.activeSelectionForeground",{light:Ay(xi,.2),dark:nm(xi,.1),hcDark:nm(xi,.1),hcLight:nm(xi,.1)},y("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),tqi=j("breadcrumbPicker.background",nu,y("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),srt=.5,Bot=me.fromHex("#40C8AE").transparent(srt),zot=me.fromHex("#40A6FF").transparent(srt),Vot=me.fromHex("#606060").transparent(.4),xEe=.4,$F=1,bEe=j("merge.currentHeaderBackground",{dark:Bot,light:Bot,hcDark:null,hcLight:null},y("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),iqi=j("merge.currentContentBackground",ai(bEe,xEe),y("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),AEe=j("merge.incomingHeaderBackground",{dark:zot,light:zot,hcDark:null,hcLight:null},y("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),nqi=j("merge.incomingContentBackground",ai(AEe,xEe),y("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),vEe=j("merge.commonHeaderBackground",{dark:Vot,light:Vot,hcDark:null,hcLight:null},y("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),oqi=j("merge.commonContentBackground",ai(vEe,xEe),y("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),eO=j("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},y("mergeBorder","Border color on headers and the splitter in inline merge-conflicts.")),rqi=j("editorOverviewRuler.currentContentForeground",{dark:ai(bEe,$F),light:ai(bEe,$F),hcDark:eO,hcLight:eO},y("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),sqi=j("editorOverviewRuler.incomingContentForeground",{dark:ai(AEe,$F),light:ai(AEe,$F),hcDark:eO,hcLight:eO},y("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),aqi=j("editorOverviewRuler.commonContentForeground",{dark:ai(vEe,$F),light:ai(vEe,$F),hcDark:eO,hcLight:eO},y("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),nee=j("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},y("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),CEe=j("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",y("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),art=j("problemsErrorIcon.foreground",PI,y("problemsErrorIconForeground","The color used for the problems error icon.")),lrt=j("problemsWarningIcon.foreground",sm,y("problemsWarningIconForeground","The color used for the problems warning icon.")),crt=j("problemsInfoIcon.foreground",$h,y("problemsInfoIconForeground","The color used for the problems info icon."))});var Pz,Bz,_Ee,urt,drt,hrt,frt,prt,fqi,pqi,mqi,SEe=D(()=>{Be();Wr();xg();GS();J$();Pz=j("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},y("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Bz=j("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},y("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),_Ee=j("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},y("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),urt=j("minimap.infoHighlight",{dark:$h,light:$h,hcDark:QS,hcLight:QS},y("minimapInfo","Minimap marker color for infos.")),drt=j("minimap.warningHighlight",{dark:sm,light:sm,hcDark:jS,hcLight:jS},y("overviewRuleWarning","Minimap marker color for warnings.")),hrt=j("minimap.errorHighlight",{dark:new me(new Ti(255,18,18,.7)),light:new me(new Ti(255,18,18,.7)),hcDark:new me(new Ti(255,50,50,1)),hcLight:"#B5200D"},y("minimapError","Minimap marker color for errors.")),frt=j("minimap.background",null,y("minimapBackground","Minimap background color.")),prt=j("minimap.foregroundOpacity",me.fromHex("#000f"),y("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),fqi=j("minimapSlider.background",ai(q$,.5),y("minimapSliderBackground","Minimap slider background color.")),pqi=j("minimapSlider.hoverBackground",ai(Y$,.5),y("minimapSliderHoverBackground","Minimap slider background color when hovering.")),mqi=j("minimapSlider.activeBackground",ai(K$,.5),y("minimapSliderActiveBackground","Minimap slider background color when clicked on."))});var wqi,xqi,Cqi,_qi,Sqi,Eqi,Dqi,Tqi,mrt=D(()=>{Be();xg();vx();GS();SEe();wqi=j("charts.foreground",xi,y("chartsForeground","The foreground color used in charts.")),xqi=j("charts.lines",ai(xi,.5),y("chartsLines","The color used for horizontal lines in charts.")),Cqi=j("charts.red",PI,y("chartsRed","The red color used in chart visualizations.")),_qi=j("charts.blue",$h,y("chartsBlue","The blue color used in chart visualizations.")),Sqi=j("charts.yellow",sm,y("chartsYellow","The yellow color used in chart visualizations.")),Eqi=j("charts.orange",Pz,y("chartsOrange","The orange color used in chart visualizations.")),Dqi=j("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},y("chartsGreen","The green color used in chart visualizations.")),Tqi=j("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("chartsPurple","The purple color used in chart visualizations."))});var zz,ree,see,BI,Oni,wx,zI,Rqi,grt,brt,Art,vrt,yrt,wrt,xrt,Crt,_rt,nO,Srt,Vz,Hz,EEe,Ert,tO,Drt,Trt,krt,oee,Irt,iO,Lrt,Nrt,Mrt,Rrt,Frt,Ort,Prt,Fqi,Brt,zrt,Oqi,Vrt,Hrt,Wrt,Urt,DEe=D(()=>{Be();Wr();xg();vx();GS();zz=j("input.background",{dark:"#3C3C3C",light:me.white,hcDark:me.black,hcLight:me.white},y("inputBoxBackground","Input box background.")),ree=j("input.foreground",xi,y("inputBoxForeground","Input box foreground.")),see=j("input.border",{dark:null,light:null,hcDark:ki,hcLight:ki},y("inputBoxBorder","Input box border.")),BI=j("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:ki,hcLight:ki},y("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Oni=j("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},y("inputOption.hoverBackground","Background color of activated options in input fields.")),wx=j("inputOption.activeBackground",{dark:ai(om,.4),light:ai(om,.2),hcDark:me.transparent,hcLight:me.transparent},y("inputOption.activeBackground","Background hover color of options in input fields.")),zI=j("inputOption.activeForeground",{dark:me.white,light:me.black,hcDark:xi,hcLight:xi},y("inputOption.activeForeground","Foreground color of activated options in input fields.")),Rqi=j("input.placeholderForeground",{light:ai(xi,.5),dark:ai(xi,.5),hcDark:ai(xi,.7),hcLight:ai(xi,.7)},y("inputPlaceholderForeground","Input box foreground color for placeholder text.")),grt=j("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:me.black,hcLight:me.white},y("inputValidationInfoBackground","Input validation background color for information severity.")),brt=j("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:xi},y("inputValidationInfoForeground","Input validation foreground color for information severity.")),Art=j("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:ki,hcLight:ki},y("inputValidationInfoBorder","Input validation border color for information severity.")),vrt=j("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:me.black,hcLight:me.white},y("inputValidationWarningBackground","Input validation background color for warning severity.")),yrt=j("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:xi},y("inputValidationWarningForeground","Input validation foreground color for warning severity.")),wrt=j("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:ki,hcLight:ki},y("inputValidationWarningBorder","Input validation border color for warning severity.")),xrt=j("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:me.black,hcLight:me.white},y("inputValidationErrorBackground","Input validation background color for error severity.")),Crt=j("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:xi},y("inputValidationErrorForeground","Input validation foreground color for error severity.")),_rt=j("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:ki,hcLight:ki},y("inputValidationErrorBorder","Input validation border color for error severity.")),nO=j("dropdown.background",{dark:"#3C3C3C",light:me.white,hcDark:me.black,hcLight:me.white},y("dropdownBackground","Dropdown background.")),Srt=j("dropdown.listBackground",{dark:null,light:null,hcDark:me.black,hcLight:me.white},y("dropdownListBackground","Dropdown list background.")),Vz=j("dropdown.foreground",{dark:"#F0F0F0",light:xi,hcDark:me.white,hcLight:xi},y("dropdownForeground","Dropdown foreground.")),Hz=j("dropdown.border",{dark:nO,light:"#CECECE",hcDark:ki,hcLight:ki},y("dropdownBorder","Dropdown border.")),EEe=j("button.foreground",me.white,y("buttonForeground","Button foreground color.")),Ert=j("button.separator",ai(EEe,.4),y("buttonSeparator","Button separator color.")),tO=j("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},y("buttonBackground","Button background color.")),Drt=j("button.hoverBackground",{dark:nm(tO,.2),light:Ay(tO,.2),hcDark:tO,hcLight:tO},y("buttonHoverBackground","Button background color when hovering.")),Trt=j("button.border",ki,y("buttonBorder","Button border color.")),krt=j("button.secondaryForeground",{dark:me.white,light:me.white,hcDark:me.white,hcLight:xi},y("buttonSecondaryForeground","Secondary button foreground color.")),oee=j("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:me.white},y("buttonSecondaryBackground","Secondary button background color.")),Irt=j("button.secondaryHoverBackground",{dark:nm(oee,.2),light:Ay(oee,.2),hcDark:null,hcLight:null},y("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),iO=j("radio.activeForeground",zI,y("radioActiveForeground","Foreground color of active radio option.")),Lrt=j("radio.activeBackground",wx,y("radioBackground","Background color of active radio option.")),Nrt=j("radio.activeBorder",BI,y("radioActiveBorder","Border color of the active radio option.")),Mrt=j("radio.inactiveForeground",null,y("radioInactiveForeground","Foreground color of inactive radio option.")),Rrt=j("radio.inactiveBackground",null,y("radioInactiveBackground","Background color of inactive radio option.")),Frt=j("radio.inactiveBorder",{light:ai(iO,.2),dark:ai(iO,.2),hcDark:ai(iO,.4),hcLight:ai(iO,.2)},y("radioInactiveBorder","Border color of the inactive radio option.")),Ort=j("radio.inactiveHoverBackground",Oni,y("radioHoverBackground","Background color of inactive active radio option when hovering.")),Prt=j("checkbox.background",nO,y("checkbox.background","Background color of checkbox widget.")),Fqi=j("checkbox.selectBackground",nu,y("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),Brt=j("checkbox.foreground",Vz,y("checkbox.foreground","Foreground color of checkbox widget.")),zrt=j("checkbox.border",Hz,y("checkbox.border","Border color of checkbox widget.")),Oqi=j("checkbox.selectBorder",FI,y("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),Vrt=j("keybindingLabel.background",{dark:new me(new Ti(128,128,128,.17)),light:new me(new Ti(221,221,221,.4)),hcDark:me.transparent,hcLight:me.transparent},y("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Hrt=j("keybindingLabel.foreground",{dark:me.fromHex("#CCCCCC"),light:me.fromHex("#555555"),hcDark:me.white,hcLight:xi},y("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Wrt=j("keybindingLabel.border",{dark:new me(new Ti(51,51,51,.6)),light:new me(new Ti(204,204,204,.4)),hcDark:new me(new Ti(111,195,223)),hcLight:ki},y("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Urt=j("keybindingLabel.bottomBorder",{dark:new me(new Ti(68,68,68,.6)),light:new me(new Ti(187,187,187,.4)),hcDark:new me(new Ti(111,195,223)),hcLight:xi},y("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut."))});var jrt,Qrt,Grt,qrt,yy,YS,aee,Yrt,Krt,Jrt,Xrt,Zrt,TEe,kEe,$rt,est,qS,tst,Wqi,Uqi,jqi,ist,nst,ost,rst,Qqi,Gqi,qqi,IEe,sst,ast,lst,Yqi,Kqi,Jqi,Xqi,lee=D(()=>{Be();Wr();xg();vx();GS();jrt=j("list.focusBackground",null,y("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Qrt=j("list.focusForeground",null,y("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Grt=j("list.focusOutline",{dark:om,light:om,hcDark:eo,hcLight:eo},y("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),qrt=j("list.focusAndSelectionOutline",null,y("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),yy=j("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:me.fromHex("#0F4A85").transparent(.1)},y("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),YS=j("list.activeSelectionForeground",{dark:me.white,light:me.white,hcDark:null,hcLight:null},y("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),aee=j("list.activeSelectionIconForeground",null,y("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Yrt=j("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:me.fromHex("#0F4A85").transparent(.1)},y("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Krt=j("list.inactiveSelectionForeground",null,y("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Jrt=j("list.inactiveSelectionIconForeground",null,y("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Xrt=j("list.inactiveFocusBackground",null,y("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Zrt=j("list.inactiveFocusOutline",null,y("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),TEe=j("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:me.white.transparent(.1),hcLight:me.fromHex("#0F4A85").transparent(.1)},y("listHoverBackground","List/Tree background when hovering over items using the mouse.")),kEe=j("list.hoverForeground",null,y("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),$rt=j("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},y("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),est=j("list.dropBetweenBackground",{dark:FI,light:FI,hcDark:null,hcLight:null},y("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),qS=j("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:om,hcLight:om},y("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),tst=j("list.focusHighlightForeground",{dark:qS,light:Lot(yy,qS,"#BBE7FF"),hcDark:qS,hcLight:qS},y("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),Wqi=j("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},y("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),Uqi=j("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},y("listErrorForeground","Foreground color of list items containing errors.")),jqi=j("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},y("listWarningForeground","Foreground color of list items containing warnings.")),ist=j("listFilterWidget.background",{light:Ay(nu,0),dark:nm(nu,0),hcDark:nu,hcLight:nu},y("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),nst=j("listFilterWidget.outline",{dark:me.transparent,light:me.transparent,hcDark:"#f38518",hcLight:"#007ACC"},y("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),ost=j("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:ki,hcLight:ki},y("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),rst=j("listFilterWidget.shadow",vy,y("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),Qqi=j("list.filterMatchBackground",{dark:Cg,light:Cg,hcDark:null,hcLight:null},y("listFilterMatchHighlight","Background color of the filtered match.")),Gqi=j("list.filterMatchBorder",{dark:qb,light:qb,hcDark:ki,hcLight:eo},y("listFilterMatchHighlightBorder","Border color of the filtered match.")),qqi=j("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},y("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),IEe=j("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},y("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),sst=j("tree.inactiveIndentGuidesStroke",ai(IEe,.4),y("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),ast=j("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},y("tableColumnsBorder","Table border color between columns.")),lst=j("tree.tableOddRowsBackground",{dark:ai(xi,.04),light:ai(xi,.04),hcDark:null,hcLight:null},y("tableOddRowsBackgroundColor","Background color for odd table rows.")),Yqi=j("editorActionList.background",nu,y("editorActionListBackground","Action List background color.")),Kqi=j("editorActionList.foreground",OI,y("editorActionListForeground","Action List foreground color.")),Jqi=j("editorActionList.focusForeground",YS,y("editorActionListFocusForeground","Action List foreground color for the focused item.")),Xqi=j("editorActionList.focusBackground",yy,y("editorActionListFocusBackground","Action List background color for the focused item."))});var cst,ust,dst,hst,fst,pst,mst,gst=D(()=>{Be();xg();vx();DEe();lee();cst=j("menu.border",{dark:null,light:null,hcDark:ki,hcLight:ki},y("menuBorder","Border color of menus.")),ust=j("menu.foreground",Vz,y("menuForeground","Foreground color of menu items.")),dst=j("menu.background",nO,y("menuBackground","Background color of menu items.")),hst=j("menu.selectionForeground",YS,y("menuSelectionForeground","Foreground color of the selected menu item in menus.")),fst=j("menu.selectionBackground",yy,y("menuSelectionBackground","Background color of the selected menu item in menus.")),pst=j("menu.selectionBorder",{dark:null,light:null,hcDark:eo,hcLight:eo},y("menuSelectionBorder","Border color of the selected menu item in menus.")),mst=j("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:ki,hcLight:ki},y("menuSeparatorBackground","Color of a separator menu item in menus."))});var LEe,Ast,vst,cee,yst,bst,xx,oO,Cx,wst=D(()=>{Be();Wr();xg();GS();lee();LEe=j("quickInput.background",nu,y("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Ast=j("quickInput.foreground",OI,y("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),vst=j("quickInputTitle.background",{dark:new me(new Ti(255,255,255,.105)),light:new me(new Ti(0,0,0,.06)),hcDark:"#000000",hcLight:me.white},y("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),cee=j("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:me.white,hcLight:"#0F4A85"},y("pickerGroupForeground","Quick picker color for grouping labels.")),yst=j("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:me.white,hcLight:"#0F4A85"},y("pickerGroupBorder","Quick picker color for grouping borders.")),bst=j("quickInput.list.focusBackground",null,"",void 0,y("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),xx=j("quickInputList.focusForeground",YS,y("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),oO=j("quickInputList.focusIconForeground",aee,y("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Cx=j("quickInputList.focusBackground",{dark:RI(bst,yy),light:RI(bst,yy),hcDark:null,hcLight:null},y("quickInput.listFocusBackground","Quick picker background color for the focused item."))});var hYi,fYi,pYi,xst=D(()=>{Be();xg();vx();GS();hYi=j("search.resultsInfoForeground",{light:xi,dark:ai(xi,.65),hcDark:xi,hcLight:xi},y("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),fYi=j("searchEditor.findMatchBackground",{light:ai(Cg,.66),dark:ai(Cg,.66),hcDark:Cg,hcLight:Cg},y("searchEditor.queryMatch","Color of the Search Editor query matches.")),pYi=j("searchEditor.findMatchBorder",{light:ai(qb,.66),dark:ai(qb,.66),hcDark:qb,hcLight:qb},y("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))});var nr=D(()=>{xg();vx();mrt();GS();DEe();lee();gst();SEe();J$();wst();xst()});function fee(i){let e=bn(i);return new NEe(e.left,e.top,e.width,e.height)}function pee(i,e,t){let n=e.width/i.offsetWidth,o=e.height/i.offsetHeight,r=(t.x-e.x)/n,s=(t.y-e.y)/o;return new MEe(r,s)}function Bni(i){return i.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}var KS,Wz,NEe,MEe,Yb,uee,dee,hee,rO,REe,sO=D(()=>{Ye();JF();$p();Gt();de();nr();KS=class{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new Wz(this.x-e.scrollX,this.y-e.scrollY)}},Wz=class{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new KS(this.clientX+e.scrollX,this.clientY+e.scrollY)}},NEe=class{constructor(e,t,n,o){this.x=e,this.y=t,this.width=n,this.height=o,this._editorPagePositionBrand=void 0}},MEe=class{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}};Yb=class extends wl{constructor(e,t,n){super(rt(n),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new KS(this.posx,this.posy),this.editorPos=fee(n),this.relativePos=pee(n,this.editorPos,this.pos)}},uee=class{constructor(e){this._editorViewDomNode=e}_create(e){return new Yb(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return ce(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return ce(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return ce(e,Te.MOUSE_DOWN,n=>{t(this._create(n))})}onPointerDown(e,t){return ce(e,Te.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onMouseLeave(e,t){return ce(e,Te.MOUSE_LEAVE,n=>{t(this._create(n))})}onMouseMove(e,t){return ce(e,"mousemove",n=>t(this._create(n)))}},dee=class{constructor(e){this._editorViewDomNode=e}_create(e){return new Yb(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return ce(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return ce(e,Te.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onPointerLeave(e,t){return ce(e,Te.POINTER_LEAVE,n=>{t(this._create(n))})}onPointerMove(e,t){return ce(e,"pointermove",n=>t(this._create(n)))}},hee=class extends H{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new wg),this._keydownListener=null}startMonitoring(e,t,n,o,r){this._keydownListener=un(e.ownerDocument,"keydown",s=>{s.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,s.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,n,s=>{o(new Yb(s,!0,this._editorViewDomNode))},s=>{this._keydownListener.dispose(),r(s)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}},rO=class i{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++i._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new si(()=>this.garbageCollect(),1e3)}createClassNameRef(e){let t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){let t=this.computeUniqueKey(e),n=this._rules.get(t);if(!n){let o=this._counter++;n=new REe(t,`dyn-rule-${this._instanceId}-${o}`,kI(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(let e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}},REe=class{constructor(e,t,n,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElementDisposables=new se,this._styleElement=el(n,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(let o in t){let r=t[o],s;typeof r=="object"?s=it(r.id):s=r;let a=Bni(o);n+=` ${a}: ${s};`}return n+=` -}`,n}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}});var Ob,mF=D(()=>{ae();Ob=class extends W{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,r=e.length;n{mF();Wo=class extends Ob{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}},vc=class{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){let t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){let n=[],r=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[r++]=this.read(e)),e=e.parentElement;let o=new Uint8Array(r);for(let s=0;s{d7=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=lv(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=lv(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=lv(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=lv(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=lv(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=lv(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=lv(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){let t=lv(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=lv(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=lv(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=lv(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}});var hEe,qZ,YZ,gF,cv,KZ,h7,bF=D(()=>{hEe=class{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;let n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}},qZ=class extends hEe{constructor(e,t,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=n}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}},YZ=class{constructor(e,t,n,r){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n,this.continuesOnNextLine=r}},gF=class i{static from(e){let t=new Array(e.length);for(let n=0,r=e.length;n{bF();sI=class{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,n,r,o){let s=this._createRange();try{return s.setStart(e,t),s.setEnd(n,r),s.getClientRects()}catch{return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(cv.compare);let t=[],n=0,r=e[0];for(let o=1,s=e.length;o=a.left?r.width=Math.max(r.width,a.left+a.width-r.left):(t[n++]=r,r=a)}return t[n++]=r,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;let r=[];for(let o=0,s=e.length;ol)return null;if(t=Math.min(l,Math.max(0,t)),r=Math.min(l,Math.max(0,r)),t===r&&n===o&&n===0&&!e.children[t].firstChild){let h=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,s.clientRectDeltaLeft,s.clientRectScale)}t!==r&&r>0&&o===0&&(r--,o=1073741824);let c=e.children[t].firstChild,u=e.children[r].firstChild;if((!c||!u)&&(!c&&n===0&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!u&&o===0&&r>0&&(u=e.children[r-1].firstChild,o=1073741824)),!c||!u)return null;n=Math.min(c.textContent.length,Math.max(0,n)),o=Math.min(u.textContent.length,Math.max(0,o));let d=this._readClientRects(c,n,u,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}});var Jc,JZ,fEe,XZ,aI=D(()=>{Pt();Jc=class i{constructor(e,t,n,r){this.startColumn=e,this.endColumn=t,this.className=n,this.type=r,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let n=e.length,r=t.length;if(n!==r)return!1;for(let o=0;o=o||(a[l++]=new i(Math.max(1,c.startColumn-r+1),Math.min(s+1,c.endColumn-r+1),c.className,c.type));return a}static filter(e,t,n,r){if(e.length===0)return[];let o=[],s=0;for(let a=0,l=e.length;at||u.isEmpty()&&(c.type===0||c.type===3))continue;let d=u.startLineNumber===t?u.startColumn:n,h=u.endLineNumber===t?u.endColumn:r;o[s++]=new i(d,h,c.inlineClassName,c.type)}return o}static _typeCompare(e,t){let n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let n=i._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(r,0,e),this.classNames.splice(r,0,t),this.metadata.splice(r,0,n);break}this.count++}},XZ=class{static normalize(e,t){if(t.length===0)return[];let n=[],r=new fEe,o=0;for(let s=0,a=t.length;s1){let g=e.charCodeAt(c-2);xo(g)&&c--}if(u>1){let g=e.charCodeAt(u-2);xo(g)&&u--}let f=c-1,p=u-2;o=r.consumeLowerThan(f,o,n),r.count===0&&(o=f),r.insert(p,d,h)}return r.consumeLowerThan(1073741824,o,n),n}}});function vlt(i,e){return i[e+0]<<0>>>0|i[e+1]<<8>>>0}function Alt(i,e,t){i[t+0]=e&255,e=e>>>8,i[t+1]=e&255}function ug(i,e){return i[e]*2**24+i[e+1]*2**16+i[e+2]*2**8+i[e+3]}function dg(i,e,t){i[t+3]=e,e=e>>>8,i[t+2]=e,e=e>>>8,i[t+1]=e,e=e>>>8,i[t]=e}function mEe(i,e){return i[e]}function gEe(i,e,t){i[t]=e}var blt,rGi,pEe,vF,AF=D(()=>{nv();blt=typeof Buffer<"u",rGi=new Ys(()=>new Uint8Array(256)),vF=class i{static wrap(e){return blt&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new i(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return blt?this.buffer.toString():(pEe||(pEe=new TextDecoder),pEe.decode(this.buffer))}}});function ylt(){return vEe||(vEe=new TextDecoder("UTF-16LE")),vEe}function Qfi(){return AEe||(AEe=new TextDecoder("UTF-16BE")),AEe}function wEe(){return yEe||(yEe=hY()?ylt():Qfi()),yEe}function wlt(i,e,t){let n=new Uint16Array(i.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?Gfi(i,e,t):ylt().decode(n)}function Gfi(i,e,t){let n=[],r=0;for(let o=0;o{Pt();Si();AF();jp=class{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return wEe().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){let t=this._capacity-this._bufferLength;t<=1&&(t===0||xo(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n{Ia=class{constructor(e,t,n,r){this.endIndex=e,this.type=t,this.metadata=n,this.containsRTL=r,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}});function ex(i,e){if(i.lineContent.length===0){if(i.lineDecorations.length>0){e.appendString("");let t=0,n=0,r=0;for(let s of i.lineDecorations)(s.type===1||s.type===2)&&(e.appendString(''),s.type===1&&(r|=1,t++),s.type===2&&(r|=2,n++));e.appendString("");let o=new p7(1,t+n);return o.setColumnInfo(1,t,0,0),new m7(o,!1,r)}return e.appendString(""),new m7(new p7(0,0),!1,0)}return epi(Yfi(i),e)}function wF(i){let e=new jp(1e4),t=ex(i,e);return new xEe(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}function Yfi(i){let e=i.lineContent,t,n,r;i.stopRenderingLineAfter!==-1&&i.stopRenderingLineAfter0){for(let a=0,l=i.lineDecorations.length;a0&&(o[s++]=new Ia(n,"",0,!1));let a=n;for(let l=0,c=t.getCount();l=r){let f=e?rv(i.substring(a,r)):!1;o[s++]=new Ia(r,d,0,f);break}let h=e?rv(i.substring(a,u)):!1;o[s++]=new Ia(u,d,0,h),a=u}return o}function Jfi(i,e,t){let n=0,r=[],o=0;if(t)for(let s=0,a=e.length;s=50&&(r[o++]=new Ia(f+1,u,d,h),p=f+1,f=-1);p!==c&&(r[o++]=new Ia(c,u,d,h))}else r[o++]=l;n=c}else for(let s=0,a=e.length;s50){let d=l.type,h=l.metadata,f=l.containsRTL,p=Math.ceil(u/50);for(let g=1;g=8234&&i<=8238||i>=8294&&i<=8297||i>=8206&&i<=8207||i===1564}function Xfi(i,e){let t=[],n=new Ia(0,"",0,!1),r=0;for(let o of e){let s=o.endIndex;for(;rn.endIndex&&(n=new Ia(r,o.type,o.metadata,o.containsRTL),t.push(n)),n=new Ia(r+1,"mtkcontrol",o.metadata,!1),t.push(n))}r>n.endIndex&&(n=new Ia(s,o.type,o.metadata,o.containsRTL),t.push(n))}return t}function Zfi(i,e,t,n){let r=i.continuesWithWrappedLine,o=i.fauxIndentLength,s=i.tabSize,a=i.startVisibleColumn,l=i.useMonospaceOptimizations,c=i.selectionsOnLine,u=i.renderWhitespace===1,d=i.renderWhitespace===3,h=i.renderSpaceWidth!==i.spaceWidth,f=[],p=0,g=0,v=n[g].type,A=n[g].containsRTL,w=n[g].endIndex,C=n.length,_=!1,E=Vo(e),I;E===-1?(_=!0,E=t,I=t):I=qc(e);let T=!1,L=0,M=c&&c[L],z=a%s;for(let B=o;B=M.endOffset&&(L++,M=c&&c[L]);let U;if(BI)U=!0;else if(q===9)U=!0;else if(q===32)if(u)if(T)U=!0;else{let F=B+1B),U&&d&&(U=_||B>I),U&&A&&B>=E&&B<=I&&(U=!1),T){if(!U||!l&&z>=s){if(h){let F=p>0?f[p-1].endIndex:o;for(let ne=F+1;ne<=B;ne++)f[p++]=new Ia(ne,"mtkw",1,!1)}else f[p++]=new Ia(B,"mtkw",1,!1);z=z%s}}else(B===w||U&&B>o)&&(f[p++]=new Ia(B,v,0,A),z=z%s);for(q===9?z=s:rg(q)?z+=2:z++,T=U;B===w&&(g++,g0?e.charCodeAt(t-1):0,q=t>1?e.charCodeAt(t-2):0;B===32&&q!==32&&q!==9||(H=!0)}else H=!0;if(H)if(h){let B=p>0?f[p-1].endIndex:o;for(let q=B+1;q<=t;q++)f[p++]=new Ia(q,"mtkw",1,!1)}else f[p++]=new Ia(t,"mtkw",1,!1);else f[p++]=new Ia(t,v,0,A);return f}function $fi(i,e,t,n){n.sort(Jc.compare);let r=XZ.normalize(i,n),o=r.length,s=0,a=[],l=0,c=0;for(let d=0,h=t.length;dc&&(c=w.startOffset,a[l++]=new Ia(c,g,v,A)),w.endOffset+1<=p)c=w.endOffset+1,a[l++]=new Ia(c,g+" "+w.className,v|w.metadata,A),s++;else{c=p,a[l++]=new Ia(c,g+" "+w.className,v|w.metadata,A);break}}p>c&&(c=p,a[l++]=new Ia(c,g,v,A))}let u=t[t.length-1].endIndex;if(s'):e.appendString("");for(let M=0,z=c.length;M=u&&(oe+=Re)}}for(ne&&(e.appendString(' style="width:'),e.appendString(String(p*se)),e.appendString('px"')),e.appendASCIICharCode(62);_1?e.appendCharCode(8594):e.appendCharCode(65515);for(let Re=2;Re<=fe;Re++)e.appendCharCode(160)}else oe=2,fe=1,e.appendCharCode(g),e.appendCharCode(8204);I+=oe,T+=fe,_>=u&&(E+=fe)}}else for(e.appendASCIICharCode(62);_=u&&(E+=oe)}ce?L++:L=0,_>=s&&!C&&H.isPseudoAfter()&&(C=!0,w.setColumnInfo(_+1,M,I,T)),e.appendString("")}return C||w.setColumnInfo(s+1,c.length-1,I,T),a&&(e.appendString(''),e.appendString(y("showMore","Show more ({0})",ipi(l))),e.appendString("")),e.appendString(""),new m7(w,f,r)}function tpi(i){return i.toString(16).toUpperCase().padStart(4,"0")}function ipi(i){return i<1024?y("overflow.chars","{0} chars",i):i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`}var yF,Wh,f7,p7,m7,xEe,CEe,ES=D(()=>{Oe();Pt();$w();aI();xlt();yF=class{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}},Wh=class{constructor(e,t,n,r,o,s,a,l,c,u,d,h,f,p,g,v,A,w,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=r,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(Jc.compare),this.tabSize=u,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=g,this.renderWhitespace=v==="all"?4:v==="boundary"?1:v==="selection"?2:v==="trailing"?3:0,this.renderControlCharacters=A,this.fontLigatures=w,this.selectionsOnLine=C&&C.sort((I,T)=>I.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,n,r){let o=(t<<16|n<<0)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=r}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1),n=i.getPartIndex(t),r=i.getCharIndex(t);return new f7(n,r)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;let r=(e<<16|n<<0)>>>0,o=0,s=this.length-1;for(;o+1>>1,v=this._data[g];if(v===r)return g;v>r?s=g:o=g}if(o===s)return o;let a=this._data[o],l=this._data[s];if(a===r)return o;if(l===r)return s;let c=i.getPartIndex(a),u=i.getCharIndex(a),d=i.getPartIndex(l),h;c!==d?h=t:h=i.getCharIndex(l);let f=n-u,p=h-n;return f<=p?o:s}},m7=class{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}};xEe=class{constructor(e,t,n,r){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=r}};CEe=class{constructor(e,t,n,r,o,s,a,l,c,u,d,h,f,p,g,v){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=r,this.isOverflowing=o,this.overflowingCharCount=s,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=u,this.startVisibleColumn=d,this.containsRTL=h,this.spaceWidth=f,this.renderSpaceCharCode=p,this.renderWhitespace=g,this.renderControlCharacters=v}}});function Bu(i){return i===jf.HIGH_CONTRAST_DARK||i===jf.HIGH_CONTRAST_LIGHT}function ny(i){return i===jf.DARK||i===jf.HIGH_CONTRAST_DARK}var jf,Pb=D(()=>{(function(i){i.DARK="dark",i.LIGHT="light",i.HIGH_CONTRAST_DARK="hcDark",i.HIGH_CONTRAST_LIGHT="hcLight"})(jf||(jf={}))});function Qp(i,e=0){return i[i.length-(1+e)]}function _lt(i){if(i.length===0)throw new Error("Invalid tail call");return[i.slice(0,i.length-1),i[i.length-1]]}function Zi(i,e,t=(n,r)=>n===r){if(i===e)return!0;if(!i||!e||i.length!==e.length)return!1;for(let n=0,r=i.length;nt(i[n],e))}function npi(i,e){let t=0,n=i-1;for(;t<=n;){let r=(t+n)/2|0,o=e(r);if(o<0)t=r+1;else if(o>0)n=r-1;else return r}return-(t+1)}function ZZ(i,e,t){if(i=i|0,i>=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],r=[],o=[],s=[];for(let a of e){let l=t(a,n);l<0?r.push(a):l>0?o.push(a):s.push(a)}return i!!e)}function SEe(i){let e=0;for(let t=0;t0}function Uh(i,e=t=>t){let t=new Set;return i.filter(n=>{let r=e(n);return t.has(r)?!1:(t.add(r),!0)})}function CF(i,e){return i.length>0?i[0]:e}function Xc(i,e){let t=typeof e=="number"?i:0;typeof e=="number"?t=i:(t=0,e=i);let n=[];if(t<=e)for(let r=t;re;r--)n.push(r);return n}function DS(i,e,t){let n=i.slice(0,e),r=i.slice(e);return n.concat(t,r)}function i$(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.unshift(e))}function b7(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.push(e))}function v7(i,e){for(let t of e)i.push(t)}function _F(i){return Array.isArray(i)?i:[i]}function rpi(i,e,t){let n=Dlt(i,e),r=i.length,o=t.length;i.length=r+o;for(let s=r-1;s>=n;s--)i[s+o]=i[s];for(let s=0;se(i(t),i(n))}function Tlt(...i){return(e,t)=>{for(let n of i){let r=n(e,t);if(!g7.isNeitherLessOrGreaterThan(r))return r}return g7.neitherLessOrGreaterThan}}function n$(i){return(e,t)=>-i(e,t)}var g7,ud,klt,cd,tx,$Z,Qt=D(()=>{(function(i){function e(o){return o<0}i.isLessThan=e;function t(o){return o<=0}i.isLessThanOrEqual=t;function n(o){return o>0}i.isGreaterThan=n;function r(o){return o===0}i.isNeitherLessOrGreaterThan=r,i.greaterThan=1,i.lessThan=-1,i.neitherLessOrGreaterThan=0})(g7||(g7={}));ud=(i,e)=>i-e,klt=(i,e)=>ud(i?1:0,e?1:0);cd=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;let n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},tx=class i{static{this.empty=new i(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new i(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new i(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||g7.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}},$Z=class i{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let n=Array.from(e.keys()).sort((r,o)=>t(e[r],e[o]));return new i(n)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let e=this._indexMap.slice();for(let t=0;t{e[t]=n&&typeof n=="object"?Bb(n):n}),e}function Ilt(i){if(!i||typeof i!="object")return i;let e=[i];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let n in t)if(Llt.call(t,n)){let r=t[n];typeof r=="object"&&!Object.isFrozen(r)&&!Jqe(r)&&e.push(r)}}return i}function r$(i,e){return DEe(i,e,new Set)}function DEe(i,e,t){if(ku(i))return i;let n=e(i);if(typeof n<"u")return n;if(Array.isArray(i)){let r=[];for(let o of i)r.push(DEe(o,e,t));return r}if(Fo(i)){if(t.has(i))throw new Error("Cannot clone recursive data-structure");t.add(i);let r={};for(let o in i)Llt.call(i,o)&&(r[o]=DEe(i[o],e,t));return t.delete(i),r}return i}function lI(i,e,t=!0){return Fo(i)?(Fo(e)&&Object.keys(e).forEach(n=>{n in i?t&&(Fo(i[n])&&Fo(e[n])?lI(i[n],e[n],t):i[n]=e[n]):i[n]=e[n]}),i):e}function wl(i,e){if(i===e)return!0;if(i==null||e===null||e===void 0||typeof i!=typeof e||typeof i!="object"||Array.isArray(i)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(t=0;tfunction(){let o=Array.prototype.slice.call(arguments,0);return e(r,o)},n={};for(let r of i)n[r]=t(r);return n}var Llt,Xd=D(()=>{gn();Llt=Object.prototype.hasOwnProperty});var xl,y7=D(()=>{xl={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});function spi(i=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of SF)i.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function x7(i){let e=w7;if(i&&i instanceof RegExp)if(i.global)e=i;else{let t="g";i.ignoreCase&&(t+="i"),i.multiline&&(t+="m"),i.unicode&&(t+="u"),e=new RegExp(i.source,t)}return e.lastIndex=0,e}function TS(i,e,t,n,r){if(e=x7(e),r||(r=bi.first(Mlt)),t.length>r.maxLen){let c=i-r.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,i+r.maxLen/2),TS(i,e,t,n,r)}let o=Date.now(),s=i-1-n,a=-1,l=null;for(let c=1;!(Date.now()-o>=r.timeBudget);c++){let u=s-r.windowSize*c;e.lastIndex=Math.max(0,u);let d=api(e,t,s,a);if(!d&&l||(l=d,u<=0))break;a=u}if(l){let c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function api(i,e,t,n){let r;for(;r=i.exec(e);){let o=r.index||0;if(o<=t&&i.lastIndex>=t)return r;if(n>0&&o>n)return null}return null}var SF,w7,Mlt,uI=D(()=>{td();Sp();SF="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";w7=spi();Mlt=new Ro;Mlt.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function o$(i,e){if(typeof i!="object"||typeof e!="object"||!i||!e)return new kS(e,i!==e);if(Array.isArray(i)||Array.isArray(e)){let n=Array.isArray(i)&&Array.isArray(e)&&Zi(i,e);return new kS(e,!n)}let t=!1;for(let n in e)if(e.hasOwnProperty(n)){let r=o$(i[n],e[n]);r.didChange&&(i[n]=r.newValue,t=!0)}return new kS(i,t)}function It(i,e){return typeof i>"u"?e:i==="false"?!1:!!i}function LS(i,e,t,n){if(typeof i>"u")return e;let r=parseInt(i,10);return isNaN(r)?e:(r=Math.max(t,r),r=Math.min(n,r),r|0)}function Flt(i,e,t,n){if(typeof i>"u")return e;let r=Gp.float(i,e);return Gp.clamp(r,t,n)}function Xo(i,e,t,n){return typeof i!="string"?e:n&&i in n?n[i]:t.indexOf(i)===-1?e:i}function lpi(i){switch(i){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function cpi(i){switch(i){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function upi(i){switch(i){case"line":return Cl.Line;case"block":return Cl.Block;case"underline":return Cl.Underline;case"line-thin":return Cl.LineThin;case"block-outline":return Cl.BlockOutline;case"underline-thin":return Cl.UnderlineThin}}function dpi(i){return i==="ctrlCmd"?qt?"metaKey":"ctrlKey":"altKey"}function hI(i){let e=i.get(99);return e==="editable"?i.get(92):e!=="on"}function Rlt(i,e){if(typeof i!="string")return e;switch(i){case"hidden":return 2;case"visible":return 3;default:return 1}}function DF(i,e,t){let n=t.indexOf(i);return n===-1?e:t[n]}function Ge(i){return NS[i.id]=i,i}var uv,TF,C7,Qr,kS,dI,IS,un,Rr,Gp,dd,Uo,EF,TEe,kEe,Cl,IEe,LEe,NEe,fg,kF,MEe,REe,FEe,OEe,PEe,_7,BEe,hg,zEe,VEe,HEe,WEe,UEe,jEe,QEe,GEe,qEe,YEe,KEe,JEe,XEe,ZEe,$Ee,Qf,Zd,eDe,tDe,iDe,nDe,rDe,oDe,sDe,aDe,lDe,cDe,uDe,dDe,hpi,fpi,ppi,_l,NS,Qh,Ks=D(()=>{Qt();Xd();Si();y7();uI();Oe();uv=8,TF=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}},C7=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},Qr=class{constructor(e,t,n,r){this.id=e,this.name=t,this.defaultValue=n,this.schema=r}applyUpdate(e,t){return o$(e,t)}compute(e,t,n){return n}},kS=class{constructor(e,t){this.newValue=e,this.didChange=t}};dI=class{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return o$(e,t)}validate(e){return this.defaultValue}},IS=class{constructor(e,t,n,r){this.id=e,this.name=t,this.defaultValue=n,this.schema=r}applyUpdate(e,t){return o$(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}};un=class extends IS{constructor(e,t,n,r=void 0){typeof r<"u"&&(r.type="boolean",r.default=n),super(e,t,n,r)}validate(e){return It(e,this.defaultValue)}};Rr=class i extends IS{static clampedInt(e,t,n,r){return LS(e,t,n,r)}constructor(e,t,n,r,o,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=r,s.maximum=o),super(e,t,n,s),this.minimum=r,this.maximum=o}validate(e){return i.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}};Gp=class i extends IS{static clamp(e,t,n){return en?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;let n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,r,o){typeof o<"u"&&(o.type="number",o.default=n),super(e,t,n,o),this.validationFn=r}validate(e){return this.validationFn(i.float(e,this.defaultValue))}},dd=class i extends IS{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,r=void 0){typeof r<"u"&&(r.type="string",r.default=n),super(e,t,n,r)}validate(e){return i.string(e,this.defaultValue)}};Uo=class extends IS{constructor(e,t,n,r,o=void 0){typeof o<"u"&&(o.type="string",o.enum=r,o.default=n),super(e,t,n,o),this._allowedValues=r}validate(e){return Xo(e,this.defaultValue,this._allowedValues)}},EF=class extends Qr{constructor(e,t,n,r,o,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=o,a.default=r),super(e,t,n,a),this._allowedValues=o,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}};TEe=class extends Qr{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[y("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),y("accessibilitySupport.on","Optimize for usage with a Screen Reader."),y("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:y("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}},kEe=class extends Qr{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:y("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:y("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertSpace:It(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:It(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(Cl||(Cl={}));IEe=class extends dI{constructor(){super(143)}compute(e,t,n){let r=["monaco-editor"];return t.get(39)&&r.push(t.get(39)),e.extraEditorClassName&&r.push(e.extraEditorClassName),t.get(74)==="default"?r.push("mouse-default"):t.get(74)==="copy"&&r.push("mouse-copy"),t.get(112)&&r.push("showUnused"),t.get(141)&&r.push("showDeprecated"),r.join(" ")}},LEe=class extends un{constructor(){super(37,"emptySelectionClipboard",!0,{description:y("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}},NEe=class extends Qr{constructor(){let e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:y("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[y("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),y("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),y("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:y("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[y("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),y("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),y("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:y("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:y("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:qt},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:y("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:y("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{cursorMoveOnType:It(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Xo(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Xo(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:It(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:It(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:It(t.loop,this.defaultValue.loop)}}},fg=class i extends Qr{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",i.OFF,{anyOf:[{type:"boolean",description:y("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:y("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:y("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?i.OFF:e==="true"?i.ON:e:e?i.ON:i.OFF}},kF=class i extends Qr{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",i.OFF,{anyOf:[{type:"boolean",description:y("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:y("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:y("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?i.OFF:e==="true"?i.TRANSLATE:e:e?i.TRANSLATE:i.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}},MEe=class extends dI{constructor(){super(50)}compute(e,t,n){return e.fontInfo}},REe=class extends IS{constructor(){super(52,"fontSize",_l.fontSize,{type:"number",minimum:6,maximum:100,default:_l.fontSize,description:y("fontSize","Controls the font size in pixels.")})}validate(e){let t=Gp.float(e,this.defaultValue);return t===0?_l.fontSize:Gp.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}},FEe=class i extends Qr{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",_l.fontWeight,{anyOf:[{type:"number",minimum:i.MINIMUM_VALUE,maximum:i.MAXIMUM_VALUE,errorMessage:y("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:i.SUGGESTION_VALUES}],default:_l.fontWeight,description:y("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Rr.clampedInt(e,_l.fontWeight,i.MINIMUM_VALUE,i.MAXIMUM_VALUE))}},OEe=class extends Qr{constructor(){let e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[y("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),y("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),y("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:y("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:y("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:y("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:y("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:y("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:y("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:y("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:y("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:y("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:y("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:y("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{multiple:Xo(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:t.multipleDefinitions??Xo(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:t.multipleTypeDefinitions??Xo(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:t.multipleDeclarations??Xo(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:t.multipleImplementations??Xo(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:t.multipleReferences??Xo(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:t.multipleTests??Xo(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:dd.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:dd.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:dd.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:dd.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:dd.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:dd.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}},PEe=class extends Qr{constructor(){let e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:y("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:y("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:y("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:y("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:y("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),delay:Rr.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:It(t.sticky,this.defaultValue.sticky),hidingDelay:Rr.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:It(t.above,this.defaultValue.above)}}},_7=class i extends dI{constructor(){super(146)}compute(e,t,n){return i.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight),r=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(r=Math.max(r,t-1));let o=(n+e.viewLineCount+r)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/o);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:r,desiredRatio:o,minimapLineCount:s}}static _computeMinimapLayout(e,t){let n=e.outerWidth,r=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*r),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:r};let s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,d=e.minimap.renderCharacters,h=o>=2?Math.round(e.minimap.scale*2):e.minimap.scale,f=e.minimap.maxColumn,p=e.minimap.size,g=e.minimap.side,v=e.verticalScrollbarWidth,A=e.viewLineCount,w=e.remainingWidth,C=e.isViewportWrapping,_=d?2:3,E=Math.floor(o*r),I=E/o,T=!1,L=!1,M=_*h,z=h/o,H=1;if(p==="fill"||p==="fit"){let{typicalViewportLineCount:se,extraLinesBeforeFirstLine:le,extraLinesBeyondLastLine:oe,desiredRatio:fe,minimapLineCount:Re}=i.computeContainedMinimapLineCount({viewLineCount:A,scrollBeyondLastLine:u,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:r,lineHeight:l,pixelRatio:o});if(A/Re>1)T=!0,L=!0,h=1,M=1,z=h/o;else{let At=!1,Dt=h+1;if(p==="fit"){let Ct=Math.ceil((le+A+oe)*M);C&&a&&w<=t.stableFitRemainingWidth?(At=!0,Dt=t.stableFitMaxMinimapScale):At=Ct>E}if(p==="fill"||At){T=!0;let Ct=h;M=Math.min(l*o,Math.max(1,Math.floor(1/fe))),C&&a&&w<=t.stableFitRemainingWidth&&(Dt=t.stableFitMaxMinimapScale),h=Math.min(Dt,Math.max(1,Math.floor(M/_))),h>Ct&&(H=Math.min(2,h/Ct)),z=h/o/H,E=Math.ceil(Math.max(se,le+A+oe)*M),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=w,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let B=Math.floor(f*z),q=Math.min(B,Math.max(0,Math.floor((w-v-2)*z/(c+z)))+uv),U=Math.floor(o*q),F=U/o;U=Math.floor(U*H);let ne=d?1:2,ce=g==="left"?0:n-q-v;return{renderMinimap:ne,minimapLeft:ce,minimapWidth:q,minimapHeightIsEditorHeight:T,minimapIsSampling:L,minimapScale:h,minimapLineHeight:M,minimapCanvasInnerWidth:U,minimapCanvasInnerHeight:E,minimapCanvasOuterWidth:F,minimapCanvasOuterHeight:I}}static computeLayout(e,t){let n=t.outerWidth|0,r=t.outerHeight|0,o=t.lineHeight|0,s=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,u=t.viewLineCount,d=e.get(138),h=d==="inherit"?e.get(137):d,f=h==="inherit"?e.get(133):h,p=e.get(136),g=t.isDominatedByLongLines,v=e.get(57),A=e.get(68).renderType!==0,w=e.get(69),C=e.get(106),_=e.get(84),E=e.get(73),I=e.get(104),T=I.verticalScrollbarSize,L=I.verticalHasArrows,M=I.arrowSize,z=I.horizontalScrollbarSize,H=e.get(43),B=e.get(111)!=="never",q=e.get(66);H&&B&&(q+=16);let U=0;if(A){let Be=Math.max(s,w);U=Math.round(Be*l)}let F=0;v&&(F=o*t.glyphMarginDecorationLaneCount);let ne=0,ce=ne+F,se=ce+U,le=se+q,oe=n-F-U-q,fe=!1,Re=!1,ft=-1;h==="inherit"&&g?(fe=!0,Re=!0):f==="on"||f==="bounded"?Re=!0:f==="wordWrapColumn"&&(ft=p);let At=i._computeMinimapLayout({outerWidth:n,outerHeight:r,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:C,paddingTop:_.top,paddingBottom:_.bottom,minimap:E,verticalScrollbarWidth:T,viewLineCount:u,remainingWidth:oe,isViewportWrapping:Re},t.memory||new C7);At.renderMinimap!==0&&At.minimapLeft===0&&(ne+=At.minimapWidth,ce+=At.minimapWidth,se+=At.minimapWidth,le+=At.minimapWidth);let Dt=oe-At.minimapWidth,Ct=Math.max(1,Math.floor((Dt-T-2)/a)),Xt=L?M:0;return Re&&(ft=Math.max(1,Ct),f==="bounded"&&(ft=Math.min(ft,p))),{width:n,height:r,glyphMarginLeft:ne,glyphMarginWidth:F,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:ce,lineNumbersWidth:U,decorationsLeft:se,decorationsWidth:q,contentLeft:le,contentWidth:Dt,minimap:At,viewportColumn:Ct,isWordWrapMinified:fe,isViewportWrapping:Re,wrappingColumn:ft,verticalScrollbarWidth:T,horizontalScrollbarHeight:z,overviewRuler:{top:Xt,width:T,height:r-2*Xt,right:0}}}},BEe=class extends Qr{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[y("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),y("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:y("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Xo(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}};(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(hg||(hg={}));zEe=class extends Qr{constructor(){let e={enabled:hg.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[hg.Off,hg.OnCode,hg.On],default:e.enabled,enumDescriptions:[y("editor.lightbulb.enabled.off","Disable the code action menu."),y("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),y("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:y("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Xo(e.enabled,this.defaultValue.enabled,[hg.Off,hg.OnCode,hg.On])}}},VEe=class extends Qr{constructor(){let e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:y("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:y("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:y("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:y("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),maxLineCount:Rr.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:Xo(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:It(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},HEe=class extends Qr{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:y("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[y("editor.inlayHints.on","Inlay hints are enabled"),y("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",qt?"Ctrl+Option":"Ctrl+Alt"),y("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",qt?"Ctrl+Option":"Ctrl+Alt"),y("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:y("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:y("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:y("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Xo(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Rr.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:dd.string(t.fontFamily,this.defaultValue.fontFamily),padding:It(t.padding,this.defaultValue.padding)}}},WEe=class extends Qr{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Rr.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Rr.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}},UEe=class extends Gp{constructor(){super(67,"lineHeight",_l.lineHeight,e=>Gp.clamp(e,0,150),{markdownDescription:y("lineHeight",`Controls the line height. +}`,n}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}});var Kb,aO=D(()=>{de();Kb=class extends H{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,o=e.length;n{aO();Ur=class extends Kb{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}},_c=class{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){let t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){let n=[],o=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[o++]=this.read(e)),e=e.parentElement;let r=new Uint8Array(o);for(let s=0;s{Uz=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=TA(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=TA(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=TA(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=TA(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=TA(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=TA(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=TA(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){let t=TA(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=TA(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=TA(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=TA(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}});var FEe,mee,gee,lO,kA,bee,jz,cO=D(()=>{FEe=class{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;let n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}},mee=class extends FEe{constructor(e,t,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=n}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}},gee=class{constructor(e,t,n,o){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n,this.continuesOnNextLine=o}},lO=class i{static from(e){let t=new Array(e.length);for(let n=0,o=e.length;n{cO();VI=class{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,n,o,r){let s=this._createRange();try{return s.setStart(e,t),s.setEnd(n,o),s.getClientRects()}catch{return null}finally{this._detachRange(s,r)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(kA.compare);let t=[],n=0,o=e[0];for(let r=1,s=e.length;r=a.left?o.width=Math.max(o.width,a.left+a.width-o.left):(t[n++]=o,o=a)}return t[n++]=o,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;let o=[];for(let r=0,s=e.length;rl)return null;if(t=Math.min(l,Math.max(0,t)),o=Math.min(l,Math.max(0,o)),t===o&&n===r&&n===0&&!e.children[t].firstChild){let h=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,s.clientRectDeltaLeft,s.clientRectScale)}t!==o&&o>0&&r===0&&(o--,r=1073741824);let c=e.children[t].firstChild,u=e.children[o].firstChild;if((!c||!u)&&(!c&&n===0&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!u&&r===0&&o>0&&(u=e.children[o-1].firstChild,r=1073741824)),!c||!u)return null;n=Math.min(c.textContent.length,Math.max(0,n)),r=Math.min(u.textContent.length,Math.max(0,r));let d=this._readClientRects(c,n,u,r,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}});var ou,Aee,OEe,vee,HI=D(()=>{Rt();ou=class i{constructor(e,t,n,o){this.startColumn=e,this.endColumn=t,this.className=n,this.type=o,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let n=e.length,o=t.length;if(n!==o)return!1;for(let r=0;r=r||(a[l++]=new i(Math.max(1,c.startColumn-o+1),Math.min(s+1,c.endColumn-o+1),c.className,c.type));return a}static filter(e,t,n,o){if(e.length===0)return[];let r=[],s=0;for(let a=0,l=e.length;at||u.isEmpty()&&(c.type===0||c.type===3))continue;let d=u.startLineNumber===t?u.startColumn:n,h=u.endLineNumber===t?u.endColumn:o;r[s++]=new i(d,h,c.inlineClassName,c.type)}return r}static _typeCompare(e,t){let n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let n=i._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(o,0,e),this.classNames.splice(o,0,t),this.metadata.splice(o,0,n);break}this.count++}},vee=class{static normalize(e,t){if(t.length===0)return[];let n=[],o=new OEe,r=0;for(let s=0,a=t.length;s1){let g=e.charCodeAt(c-2);Er(g)&&c--}if(u>1){let g=e.charCodeAt(u-2);Er(g)&&u--}let f=c-1,p=u-2;r=o.consumeLowerThan(f,r,n),o.count===0&&(r=f),o.insert(p,d,h)}return o.consumeLowerThan(1073741824,r,n),n}}});function Sst(i,e){return i[e+0]<<0>>>0|i[e+1]<<8>>>0}function Est(i,e,t){i[t+0]=e&255,e=e>>>8,i[t+1]=e&255}function _g(i,e){return i[e]*2**24+i[e+1]*2**16+i[e+2]*2**8+i[e+3]}function Sg(i,e,t){i[t+3]=e,e=e>>>8,i[t+2]=e,e=e>>>8,i[t+1]=e,e=e>>>8,i[t]=e}function BEe(i,e){return i[e]}function zEe(i,e,t){i[t]=e}var _st,UYi,PEe,uO,dO=D(()=>{CA();_st=typeof Buffer<"u",UYi=new $s(()=>new Uint8Array(256)),uO=class i{static wrap(e){return _st&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new i(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return _st?this.buffer.toString():(PEe||(PEe=new TextDecoder),PEe.decode(this.buffer))}}});function Dst(){return HEe||(HEe=new TextDecoder("UTF-16LE")),HEe}function zni(){return WEe||(WEe=new TextDecoder("UTF-16BE")),WEe}function jEe(){return UEe||(UEe=jK()?Dst():zni()),UEe}function Tst(i,e,t){let n=new Uint16Array(i.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?Vni(i,e,t):Dst().decode(n)}function Vni(i,e,t){let n=[],o=0;for(let r=0;r{Rt();wi();dO();am=class{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return jEe().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){let t=this._capacity-this._bufferLength;t<=1&&(t===0||Er(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n{Fa=class{constructor(e,t,n,o){this.endIndex=e,this.type=t,this.metadata=n,this.containsRTL=o,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}});function Sx(i,e){if(i.lineContent.length===0){if(i.lineDecorations.length>0){e.appendString("");let t=0,n=0,o=0;for(let s of i.lineDecorations)(s.type===1||s.type===2)&&(e.appendString(''),s.type===1&&(o|=1,t++),s.type===2&&(o|=2,n++));e.appendString("");let r=new Gz(1,t+n);return r.setColumnInfo(1,t,0,0),new qz(r,!1,o)}return e.appendString(""),new qz(new Gz(0,0),!1,0)}return Yni(Wni(i),e)}function fO(i){let e=new am(1e4),t=Sx(i,e);return new QEe(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}function Wni(i){let e=i.lineContent,t,n,o;i.stopRenderingLineAfter!==-1&&i.stopRenderingLineAfter0){for(let a=0,l=i.lineDecorations.length;a0&&(r[s++]=new Fa(n,"",0,!1));let a=n;for(let l=0,c=t.getCount();l=o){let f=e?_A(i.substring(a,o)):!1;r[s++]=new Fa(o,d,0,f);break}let h=e?_A(i.substring(a,u)):!1;r[s++]=new Fa(u,d,0,h),a=u}return r}function jni(i,e,t){let n=0,o=[],r=0;if(t)for(let s=0,a=e.length;s=50&&(o[r++]=new Fa(f+1,u,d,h),p=f+1,f=-1);p!==c&&(o[r++]=new Fa(c,u,d,h))}else o[r++]=l;n=c}else for(let s=0,a=e.length;s50){let d=l.type,h=l.metadata,f=l.containsRTL,p=Math.ceil(u/50);for(let g=1;g=8234&&i<=8238||i>=8294&&i<=8297||i>=8206&&i<=8207||i===1564}function Qni(i,e){let t=[],n=new Fa(0,"",0,!1),o=0;for(let r of e){let s=r.endIndex;for(;on.endIndex&&(n=new Fa(o,r.type,r.metadata,r.containsRTL),t.push(n)),n=new Fa(o+1,"mtkcontrol",r.metadata,!1),t.push(n))}o>n.endIndex&&(n=new Fa(s,r.type,r.metadata,r.containsRTL),t.push(n))}return t}function Gni(i,e,t,n){let o=i.continuesWithWrappedLine,r=i.fauxIndentLength,s=i.tabSize,a=i.startVisibleColumn,l=i.useMonospaceOptimizations,c=i.selectionsOnLine,u=i.renderWhitespace===1,d=i.renderWhitespace===3,h=i.renderSpaceWidth!==i.spaceWidth,f=[],p=0,g=0,A=n[g].type,v=n[g].containsRTL,w=n[g].endIndex,C=n.length,_=!1,E=Hr(e),I;E===-1?(_=!0,E=t,I=t):I=tu(e);let T=!1,N=0,L=c&&c[N],B=a%s;for(let Q=r;Q=L.endOffset&&(N++,L=c&&c[N]);let U;if(QI)U=!0;else if(Z===9)U=!0;else if(Z===32)if(u)if(T)U=!0;else{let M=Q+1Q),U&&d&&(U=_||Q>I),U&&v&&Q>=E&&Q<=I&&(U=!1),T){if(!U||!l&&B>=s){if(h){let M=p>0?f[p-1].endIndex:r;for(let ee=M+1;ee<=Q;ee++)f[p++]=new Fa(ee,"mtkw",1,!1)}else f[p++]=new Fa(Q,"mtkw",1,!1);B=B%s}}else(Q===w||U&&Q>r)&&(f[p++]=new Fa(Q,A,0,v),B=B%s);for(Z===9?B=s:Ag(Z)?B+=2:B++,T=U;Q===w&&(g++,g0?e.charCodeAt(t-1):0,Z=t>1?e.charCodeAt(t-2):0;Q===32&&Z!==32&&Z!==9||(z=!0)}else z=!0;if(z)if(h){let Q=p>0?f[p-1].endIndex:r;for(let Z=Q+1;Z<=t;Z++)f[p++]=new Fa(Z,"mtkw",1,!1)}else f[p++]=new Fa(t,"mtkw",1,!1);else f[p++]=new Fa(t,A,0,v);return f}function qni(i,e,t,n){n.sort(ou.compare);let o=vee.normalize(i,n),r=o.length,s=0,a=[],l=0,c=0;for(let d=0,h=t.length;dc&&(c=w.startOffset,a[l++]=new Fa(c,g,A,v)),w.endOffset+1<=p)c=w.endOffset+1,a[l++]=new Fa(c,g+" "+w.className,A|w.metadata,v),s++;else{c=p,a[l++]=new Fa(c,g+" "+w.className,A|w.metadata,v);break}}p>c&&(c=p,a[l++]=new Fa(c,g,A,v))}let u=t[t.length-1].endIndex;if(s'):e.appendString("");for(let L=0,B=c.length;L=u&&(re+=Ie)}}for(ee&&(e.appendString(' style="width:'),e.appendString(String(p*Y)),e.appendString('px"')),e.appendASCIICharCode(62);_1?e.appendCharCode(8594):e.appendCharCode(65515);for(let Ie=2;Ie<=ue;Ie++)e.appendCharCode(160)}else re=2,ue=1,e.appendCharCode(g),e.appendCharCode(8204);I+=re,T+=ue,_>=u&&(E+=ue)}}else for(e.appendASCIICharCode(62);_=u&&(E+=re)}X?N++:N=0,_>=s&&!C&&z.isPseudoAfter()&&(C=!0,w.setColumnInfo(_+1,L,I,T)),e.appendString("")}return C||w.setColumnInfo(s+1,c.length-1,I,T),a&&(e.appendString(''),e.appendString(y("showMore","Show more ({0})",Jni(l))),e.appendString("")),e.appendString(""),new qz(w,f,o)}function Kni(i){return i.toString(16).toUpperCase().padStart(4,"0")}function Jni(i){return i<1024?y("overflow.chars","{0} chars",i):i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`}var hO,ef,Qz,Gz,qz,QEe,GEe,JS=D(()=>{Be();Rt();_x();HI();kst();hO=class{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}},ef=class{constructor(e,t,n,o,r,s,a,l,c,u,d,h,f,p,g,A,v,w,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=o,this.isBasicASCII=r,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(ou.compare),this.tabSize=u,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=g,this.renderWhitespace=A==="all"?4:A==="boundary"?1:A==="selection"?2:A==="trailing"?3:0,this.renderControlCharacters=v,this.fontLigatures=w,this.selectionsOnLine=C&&C.sort((I,T)=>I.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,n,o){let r=(t<<16|n<<0)>>>0;this._data[e-1]=r,this._horizontalOffset[e-1]=o}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1),n=i.getPartIndex(t),o=i.getCharIndex(t);return new Qz(n,o)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;let o=(e<<16|n<<0)>>>0,r=0,s=this.length-1;for(;r+1>>1,A=this._data[g];if(A===o)return g;A>o?s=g:r=g}if(r===s)return r;let a=this._data[r],l=this._data[s];if(a===o)return r;if(l===o)return s;let c=i.getPartIndex(a),u=i.getCharIndex(a),d=i.getPartIndex(l),h;c!==d?h=t:h=i.getCharIndex(l);let f=n-u,p=h-n;return f<=p?r:s}},qz=class{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}};QEe=class{constructor(e,t,n,o){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=o}};GEe=class{constructor(e,t,n,o,r,s,a,l,c,u,d,h,f,p,g,A){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=o,this.isOverflowing=r,this.overflowingCharCount=s,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=u,this.startVisibleColumn=d,this.containsRTL=h,this.spaceWidth=f,this.renderSpaceCharCode=p,this.renderWhitespace=g,this.renderControlCharacters=A}}});function ju(i){return i===ip.HIGH_CONTRAST_DARK||i===ip.HIGH_CONTRAST_LIGHT}function wy(i){return i===ip.DARK||i===ip.HIGH_CONTRAST_DARK}var ip,Jb=D(()=>{(function(i){i.DARK="dark",i.LIGHT="light",i.HIGH_CONTRAST_DARK="hcDark",i.HIGH_CONTRAST_LIGHT="hcLight"})(ip||(ip={}))});function lm(i,e=0){return i[i.length-(1+e)]}function Lst(i){if(i.length===0)throw new Error("Invalid tail call");return[i.slice(0,i.length-1),i[i.length-1]]}function Zi(i,e,t=(n,o)=>n===o){if(i===e)return!0;if(!i||!e||i.length!==e.length)return!1;for(let n=0,o=i.length;nt(i[n],e))}function Xni(i,e){let t=0,n=i-1;for(;t<=n;){let o=(t+n)/2|0,r=e(o);if(r<0)t=o+1;else if(r>0)n=o-1;else return o}return-(t+1)}function yee(i,e,t){if(i=i|0,i>=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],o=[],r=[],s=[];for(let a of e){let l=t(a,n);l<0?o.push(a):l>0?r.push(a):s.push(a)}return i!!e)}function YEe(i){let e=0;for(let t=0;t0}function tf(i,e=t=>t){let t=new Set;return i.filter(n=>{let o=e(n);return t.has(o)?!1:(t.add(o),!0)})}function mO(i,e){return i.length>0?i[0]:e}function ru(i,e){let t=typeof e=="number"?i:0;typeof e=="number"?t=i:(t=0,e=i);let n=[];if(t<=e)for(let o=t;oe;o--)n.push(o);return n}function XS(i,e,t){let n=i.slice(0,e),o=i.slice(e);return n.concat(t,o)}function _ee(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.unshift(e))}function Kz(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.push(e))}function Jz(i,e){for(let t of e)i.push(t)}function gO(i){return Array.isArray(i)?i:[i]}function Zni(i,e,t){let n=Rst(i,e),o=i.length,r=t.length;i.length=o+r;for(let s=o-1;s>=n;s--)i[s+r]=i[s];for(let s=0;se(i(t),i(n))}function Fst(...i){return(e,t)=>{for(let n of i){let o=n(e,t);if(!Yz.isNeitherLessOrGreaterThan(o))return o}return Yz.neitherLessOrGreaterThan}}function See(i){return(e,t)=>-i(e,t)}var Yz,vd,Ost,Ad,Ex,wee,Wt=D(()=>{(function(i){function e(r){return r<0}i.isLessThan=e;function t(r){return r<=0}i.isLessThanOrEqual=t;function n(r){return r>0}i.isGreaterThan=n;function o(r){return r===0}i.isNeitherLessOrGreaterThan=o,i.greaterThan=1,i.lessThan=-1,i.neitherLessOrGreaterThan=0})(Yz||(Yz={}));vd=(i,e)=>i-e,Ost=(i,e)=>vd(i?1:0,e?1:0);Ad=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;let n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},Ex=class i{static{this.empty=new i(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new i(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new i(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(o=>((n||Yz.isGreaterThan(e(o,t)))&&(n=!1,t=o),!0)),t}},wee=class i{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let n=Array.from(e.keys()).sort((o,r)=>t(e[o],e[r]));return new i(n)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let e=this._indexMap.slice();for(let t=0;t{e[t]=n&&typeof n=="object"?Xb(n):n}),e}function Pst(i){if(!i||typeof i!="object")return i;let e=[i];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let n in t)if(Bst.call(t,n)){let o=t[n];typeof o=="object"&&!Object.isFrozen(o)&&!yYe(o)&&e.push(o)}}return i}function Eee(i,e){return JEe(i,e,new Set)}function JEe(i,e,t){if(Pu(i))return i;let n=e(i);if(typeof n<"u")return n;if(Array.isArray(i)){let o=[];for(let r of i)o.push(JEe(r,e,t));return o}if(zr(i)){if(t.has(i))throw new Error("Cannot clone recursive data-structure");t.add(i);let o={};for(let r in i)Bst.call(i,r)&&(o[r]=JEe(i[r],e,t));return t.delete(i),o}return i}function WI(i,e,t=!0){return zr(i)?(zr(e)&&Object.keys(e).forEach(n=>{n in i?t&&(zr(i[n])&&zr(e[n])?WI(i[n],e[n],t):i[n]=e[n]):i[n]=e[n]}),i):e}function El(i,e){if(i===e)return!0;if(i==null||e===null||e===void 0||typeof i!=typeof e||typeof i!="object"||Array.isArray(i)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(t=0;tfunction(){let r=Array.prototype.slice.call(arguments,0);return e(o,r)},n={};for(let o of i)n[o]=t(o);return n}var Bst,rh=D(()=>{gn();Bst=Object.prototype.hasOwnProperty});var Dl,Zz=D(()=>{Dl={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});function eoi(i=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of bO)i.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function eV(i){let e=$z;if(i&&i instanceof RegExp)if(i.global)e=i;else{let t="g";i.ignoreCase&&(t+="i"),i.multiline&&(t+="m"),i.unicode&&(t+="u"),e=new RegExp(i.source,t)}return e.lastIndex=0,e}function ZS(i,e,t,n,o){if(e=eV(e),o||(o=hi.first(Vst)),t.length>o.maxLen){let c=i-o.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,i+o.maxLen/2),ZS(i,e,t,n,o)}let r=Date.now(),s=i-1-n,a=-1,l=null;for(let c=1;!(Date.now()-r>=o.timeBudget);c++){let u=s-o.windowSize*c;e.lastIndex=Math.max(0,u);let d=toi(e,t,s,a);if(!d&&l||(l=d,u<=0))break;a=u}if(l){let c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function toi(i,e,t,n){let o;for(;o=i.exec(e);){let r=o.index||0;if(r<=t&&i.lastIndex>=t)return o;if(n>0&&r>n)return null}return null}var bO,$z,Vst,jI=D(()=>{ld();Pp();bO="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";$z=eoi();Vst=new Br;Vst.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function Dee(i,e){if(typeof i!="object"||typeof e!="object"||!i||!e)return new $S(e,i!==e);if(Array.isArray(i)||Array.isArray(e)){let n=Array.isArray(i)&&Array.isArray(e)&&Zi(i,e);return new $S(e,!n)}let t=!1;for(let n in e)if(e.hasOwnProperty(n)){let o=Dee(i[n],e[n]);o.didChange&&(i[n]=o.newValue,t=!0)}return new $S(i,t)}function Dt(i,e){return typeof i>"u"?e:i==="false"?!1:!!i}function tE(i,e,t,n){if(typeof i>"u")return e;let o=parseInt(i,10);return isNaN(o)?e:(o=Math.max(t,o),o=Math.min(n,o),o|0)}function Wst(i,e,t,n){if(typeof i>"u")return e;let o=cm.float(i,e);return cm.clamp(o,t,n)}function Jr(i,e,t,n){return typeof i!="string"?e:n&&i in n?n[i]:t.indexOf(i)===-1?e:i}function ioi(i){switch(i){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function noi(i){switch(i){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function ooi(i){switch(i){case"line":return Tl.Line;case"block":return Tl.Block;case"underline":return Tl.Underline;case"line-thin":return Tl.LineThin;case"block-outline":return Tl.BlockOutline;case"underline-thin":return Tl.UnderlineThin}}function roi(i){return i==="ctrlCmd"?jt?"metaKey":"ctrlKey":"altKey"}function GI(i){let e=i.get(99);return e==="editable"?i.get(92):e!=="on"}function Hst(i,e){if(typeof i!="string")return e;switch(i){case"hidden":return 2;case"visible":return 3;default:return 1}}function vO(i,e,t){let n=t.indexOf(i);return n===-1?e:t[n]}function Ge(i){return iE[i.id]=i,i}var IA,yO,tV,Yo,$S,QI,eE,dn,Bo,cm,yd,jr,AO,XEe,ZEe,Tl,$Ee,eDe,tDe,Dg,wO,iDe,nDe,oDe,rDe,sDe,iV,aDe,Eg,lDe,cDe,uDe,dDe,hDe,fDe,pDe,mDe,gDe,bDe,ADe,vDe,yDe,wDe,xDe,np,sh,CDe,_De,SDe,EDe,DDe,TDe,kDe,IDe,LDe,NDe,MDe,RDe,soi,aoi,loi,kl,iE,of,ea=D(()=>{Wt();rh();wi();Zz();jI();Be();IA=8,yO=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}},tV=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},Yo=class{constructor(e,t,n,o){this.id=e,this.name=t,this.defaultValue=n,this.schema=o}applyUpdate(e,t){return Dee(e,t)}compute(e,t,n){return n}},$S=class{constructor(e,t){this.newValue=e,this.didChange=t}};QI=class{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return Dee(e,t)}validate(e){return this.defaultValue}},eE=class{constructor(e,t,n,o){this.id=e,this.name=t,this.defaultValue=n,this.schema=o}applyUpdate(e,t){return Dee(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}};dn=class extends eE{constructor(e,t,n,o=void 0){typeof o<"u"&&(o.type="boolean",o.default=n),super(e,t,n,o)}validate(e){return Dt(e,this.defaultValue)}};Bo=class i extends eE{static clampedInt(e,t,n,o){return tE(e,t,n,o)}constructor(e,t,n,o,r,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=o,s.maximum=r),super(e,t,n,s),this.minimum=o,this.maximum=r}validate(e){return i.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}};cm=class i extends eE{static clamp(e,t,n){return en?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;let n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,o,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=o}validate(e){return this.validationFn(i.float(e,this.defaultValue))}},yd=class i extends eE{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,o=void 0){typeof o<"u"&&(o.type="string",o.default=n),super(e,t,n,o)}validate(e){return i.string(e,this.defaultValue)}};jr=class extends eE{constructor(e,t,n,o,r=void 0){typeof r<"u"&&(r.type="string",r.enum=o,r.default=n),super(e,t,n,r),this._allowedValues=o}validate(e){return Jr(e,this.defaultValue,this._allowedValues)}},AO=class extends Yo{constructor(e,t,n,o,r,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=r,a.default=o),super(e,t,n,a),this._allowedValues=r,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}};XEe=class extends Yo{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[y("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),y("accessibilitySupport.on","Optimize for usage with a Screen Reader."),y("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:y("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}},ZEe=class extends Yo{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:y("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:y("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertSpace:Dt(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Dt(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(Tl||(Tl={}));$Ee=class extends QI{constructor(){super(143)}compute(e,t,n){let o=["monaco-editor"];return t.get(39)&&o.push(t.get(39)),e.extraEditorClassName&&o.push(e.extraEditorClassName),t.get(74)==="default"?o.push("mouse-default"):t.get(74)==="copy"&&o.push("mouse-copy"),t.get(112)&&o.push("showUnused"),t.get(141)&&o.push("showDeprecated"),o.join(" ")}},eDe=class extends dn{constructor(){super(37,"emptySelectionClipboard",!0,{description:y("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}},tDe=class extends Yo{constructor(){let e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:y("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[y("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),y("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),y("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:y("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[y("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),y("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),y("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:y("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:y("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:jt},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:y("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:y("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{cursorMoveOnType:Dt(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Jr(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Jr(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Dt(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Dt(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Dt(t.loop,this.defaultValue.loop)}}},Dg=class i extends Yo{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",i.OFF,{anyOf:[{type:"boolean",description:y("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:y("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:y("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?i.OFF:e==="true"?i.ON:e:e?i.ON:i.OFF}},wO=class i extends Yo{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",i.OFF,{anyOf:[{type:"boolean",description:y("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:y("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:y("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?i.OFF:e==="true"?i.TRANSLATE:e:e?i.TRANSLATE:i.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}},iDe=class extends QI{constructor(){super(50)}compute(e,t,n){return e.fontInfo}},nDe=class extends eE{constructor(){super(52,"fontSize",kl.fontSize,{type:"number",minimum:6,maximum:100,default:kl.fontSize,description:y("fontSize","Controls the font size in pixels.")})}validate(e){let t=cm.float(e,this.defaultValue);return t===0?kl.fontSize:cm.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}},oDe=class i extends Yo{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",kl.fontWeight,{anyOf:[{type:"number",minimum:i.MINIMUM_VALUE,maximum:i.MAXIMUM_VALUE,errorMessage:y("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:i.SUGGESTION_VALUES}],default:kl.fontWeight,description:y("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Bo.clampedInt(e,kl.fontWeight,i.MINIMUM_VALUE,i.MAXIMUM_VALUE))}},rDe=class extends Yo{constructor(){let e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[y("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),y("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),y("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:y("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:y("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:y("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:y("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:y("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:y("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:y("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:y("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:y("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:y("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:y("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{multiple:Jr(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:t.multipleDefinitions??Jr(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:t.multipleTypeDefinitions??Jr(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:t.multipleDeclarations??Jr(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:t.multipleImplementations??Jr(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:t.multipleReferences??Jr(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:t.multipleTests??Jr(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:yd.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:yd.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:yd.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:yd.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:yd.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:yd.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}},sDe=class extends Yo{constructor(){let e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:y("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:y("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:y("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:y("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:y("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),delay:Bo.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Dt(t.sticky,this.defaultValue.sticky),hidingDelay:Bo.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Dt(t.above,this.defaultValue.above)}}},iV=class i extends QI{constructor(){super(146)}compute(e,t,n){return i.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight),o=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(o=Math.max(o,t-1));let r=(n+e.viewLineCount+o)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:o,desiredRatio:r,minimapLineCount:s}}static _computeMinimapLayout(e,t){let n=e.outerWidth,o=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*o),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:o};let s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,d=e.minimap.renderCharacters,h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale,f=e.minimap.maxColumn,p=e.minimap.size,g=e.minimap.side,A=e.verticalScrollbarWidth,v=e.viewLineCount,w=e.remainingWidth,C=e.isViewportWrapping,_=d?2:3,E=Math.floor(r*o),I=E/r,T=!1,N=!1,L=_*h,B=h/r,z=1;if(p==="fill"||p==="fit"){let{typicalViewportLineCount:Y,extraLinesBeforeFirstLine:$,extraLinesBeyondLastLine:re,desiredRatio:ue,minimapLineCount:Ie}=i.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:u,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:o,lineHeight:l,pixelRatio:r});if(v/Ie>1)T=!0,N=!0,h=1,L=1,B=h/r;else{let mt=!1,xt=h+1;if(p==="fit"){let wt=Math.ceil(($+v+re)*L);C&&a&&w<=t.stableFitRemainingWidth?(mt=!0,xt=t.stableFitMaxMinimapScale):mt=wt>E}if(p==="fill"||mt){T=!0;let wt=h;L=Math.min(l*r,Math.max(1,Math.floor(1/ue))),C&&a&&w<=t.stableFitRemainingWidth&&(xt=t.stableFitMaxMinimapScale),h=Math.min(xt,Math.max(1,Math.floor(L/_))),h>wt&&(z=Math.min(2,h/wt)),B=h/r/z,E=Math.ceil(Math.max(Y,$+v+re)*L),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=w,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let Q=Math.floor(f*B),Z=Math.min(Q,Math.max(0,Math.floor((w-A-2)*B/(c+B)))+IA),U=Math.floor(r*Z),M=U/r;U=Math.floor(U*z);let ee=d?1:2,X=g==="left"?0:n-Z-A;return{renderMinimap:ee,minimapLeft:X,minimapWidth:Z,minimapHeightIsEditorHeight:T,minimapIsSampling:N,minimapScale:h,minimapLineHeight:L,minimapCanvasInnerWidth:U,minimapCanvasInnerHeight:E,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:I}}static computeLayout(e,t){let n=t.outerWidth|0,o=t.outerHeight|0,r=t.lineHeight|0,s=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,u=t.viewLineCount,d=e.get(138),h=d==="inherit"?e.get(137):d,f=h==="inherit"?e.get(133):h,p=e.get(136),g=t.isDominatedByLongLines,A=e.get(57),v=e.get(68).renderType!==0,w=e.get(69),C=e.get(106),_=e.get(84),E=e.get(73),I=e.get(104),T=I.verticalScrollbarSize,N=I.verticalHasArrows,L=I.arrowSize,B=I.horizontalScrollbarSize,z=e.get(43),Q=e.get(111)!=="never",Z=e.get(66);z&&Q&&(Z+=16);let U=0;if(v){let Fe=Math.max(s,w);U=Math.round(Fe*l)}let M=0;A&&(M=r*t.glyphMarginDecorationLaneCount);let ee=0,X=ee+M,Y=X+U,$=Y+Z,re=n-M-U-Z,ue=!1,Ie=!1,nt=-1;h==="inherit"&&g?(ue=!0,Ie=!0):f==="on"||f==="bounded"?Ie=!0:f==="wordWrapColumn"&&(nt=p);let mt=i._computeMinimapLayout({outerWidth:n,outerHeight:o,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:C,paddingTop:_.top,paddingBottom:_.bottom,minimap:E,verticalScrollbarWidth:T,viewLineCount:u,remainingWidth:re,isViewportWrapping:Ie},t.memory||new tV);mt.renderMinimap!==0&&mt.minimapLeft===0&&(ee+=mt.minimapWidth,X+=mt.minimapWidth,Y+=mt.minimapWidth,$+=mt.minimapWidth);let xt=re-mt.minimapWidth,wt=Math.max(1,Math.floor((xt-T-2)/a)),Ht=N?L:0;return Ie&&(nt=Math.max(1,wt),f==="bounded"&&(nt=Math.min(nt,p))),{width:n,height:o,glyphMarginLeft:ee,glyphMarginWidth:M,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:X,lineNumbersWidth:U,decorationsLeft:Y,decorationsWidth:Z,contentLeft:$,contentWidth:xt,minimap:mt,viewportColumn:wt,isWordWrapMinified:ue,isViewportWrapping:Ie,wrappingColumn:nt,verticalScrollbarWidth:T,horizontalScrollbarHeight:B,overviewRuler:{top:Ht,width:T,height:o-2*Ht,right:0}}}},aDe=class extends Yo{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[y("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),y("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:y("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Jr(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}};(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(Eg||(Eg={}));lDe=class extends Yo{constructor(){let e={enabled:Eg.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[Eg.Off,Eg.OnCode,Eg.On],default:e.enabled,enumDescriptions:[y("editor.lightbulb.enabled.off","Disable the code action menu."),y("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),y("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:y("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Jr(e.enabled,this.defaultValue.enabled,[Eg.Off,Eg.OnCode,Eg.On])}}},cDe=class extends Yo{constructor(){let e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:y("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:y("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:y("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:y("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),maxLineCount:Bo.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:Jr(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Dt(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},uDe=class extends Yo{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:y("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[y("editor.inlayHints.on","Inlay hints are enabled"),y("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",jt?"Ctrl+Option":"Ctrl+Alt"),y("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",jt?"Ctrl+Option":"Ctrl+Alt"),y("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:y("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:y("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:y("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Jr(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Bo.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:yd.string(t.fontFamily,this.defaultValue.fontFamily),padding:Dt(t.padding,this.defaultValue.padding)}}},dDe=class extends Yo{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Bo.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Bo.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}},hDe=class extends cm{constructor(){super(67,"lineHeight",kl.lineHeight,e=>cm.clamp(e,0,150),{markdownDescription:y("lineHeight",`Controls the line height. - Use 0 to automatically compute the line height from the font size. - Values between 0 and 8 will be used as a multiplier with the font size. - - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,n){return e.fontInfo.lineHeight}},jEe=class extends Qr{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:y("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:y("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[y("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),y("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),y("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:y("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:y("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:y("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:y("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:y("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:y("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:y("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:y("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:y("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:y("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),autohide:It(t.autohide,this.defaultValue.autohide),size:Xo(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Xo(t.side,this.defaultValue.side,["right","left"]),showSlider:Xo(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:It(t.renderCharacters,this.defaultValue.renderCharacters),scale:Rr.clampedInt(t.scale,1,1,3),maxColumn:Rr.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:It(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:It(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:Gp.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:Gp.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}};QEe=class extends Qr{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:y("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:y("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{top:Rr.clampedInt(t.top,0,0,1e3),bottom:Rr.clampedInt(t.bottom,0,0,1e3)}}},GEe=class extends Qr{constructor(){let e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:y("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:y("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),cycle:It(t.cycle,this.defaultValue.cycle)}}},qEe=class extends dI{constructor(){super(144)}compute(e,t,n){return e.pixelRatio}},YEe=class extends Qr{constructor(){super(88,"placeholder",void 0)}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e:this.defaultValue}},KEe=class extends Qr{constructor(){let e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[y("on","Quick suggestions show inside the suggest widget"),y("inline","Quick suggestions show as ghost text"),y("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:y("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:y("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:y("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:y("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){let c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;let{other:t,comments:n,strings:r}=e,o=["on","inline","off"],s,a,l;return typeof t=="boolean"?s=t?"on":"off":s=Xo(t,this.defaultValue.other,o),typeof n=="boolean"?a=n?"on":"off":a=Xo(n,this.defaultValue.comments,o),typeof r=="boolean"?l=r?"on":"off":l=Xo(r,this.defaultValue.strings,o),{other:s,comments:a,strings:l}}},JEe=class extends Qr{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[y("lineNumbers.off","Line numbers are not rendered."),y("lineNumbers.on","Line numbers are rendered as absolute number."),y("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),y("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:y("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}};XEe=class extends Qr{constructor(){let e=[],t={type:"number",description:y("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:y("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:y("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let n of e)if(typeof n=="number")t.push({column:Rr.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){let r=n;t.push({column:Rr.clampedInt(r.column,0,0,1e4),color:r.color})}return t.sort((n,r)=>n.column-r.column),t}return this.defaultValue}},ZEe=class extends Qr{constructor(){super(93,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}};$Ee=class extends Qr{constructor(){let e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[y("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),y("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),y("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:y("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[y("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),y("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),y("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:y("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:y("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:y("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:y("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:y("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e,n=Rr.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),r=Rr.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Rr.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Rlt(t.vertical,this.defaultValue.vertical),horizontal:Rlt(t.horizontal,this.defaultValue.horizontal),useShadows:It(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:It(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:It(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:It(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:It(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Rr.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:r,verticalSliderSize:Rr.clampedInt(t.verticalSliderSize,r,0,1e3),scrollByPage:It(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:It(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}},Qf="inUntrustedWorkspace",Zd={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"},eDe=class extends Qr{constructor(){let e={nonBasicASCII:Qf,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Qf,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[Zd.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Qf],default:e.nonBasicASCII,description:y("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[Zd.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:y("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Zd.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:y("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Zd.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Qf],default:e.includeComments,description:y("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Zd.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Qf],default:e.includeStrings,description:y("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Zd.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:y("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Zd.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:y("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&(wl(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},n=!0)),t.allowedLocales&&e&&(wl(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},n=!0));let r=super.applyUpdate(e,t);return n?new kS(r.newValue,!0):r}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{nonBasicASCII:DF(t.nonBasicASCII,Qf,[!0,!1,Qf]),invisibleCharacters:It(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:It(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:DF(t.includeComments,Qf,[!0,!1,Qf]),includeStrings:DF(t.includeStrings,Qf,[!0,!1,Qf]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;let n={};for(let[r,o]of Object.entries(e))o===!0&&(n[r]=!0);return n}},tDe=class extends Qr{constructor(){let e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:y("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[y("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),y("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),y("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:y("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:y("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:y("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),mode:Xo(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Xo(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:It(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:It(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:dd.string(t.fontFamily,this.defaultValue.fontFamily)}}},iDe=class extends Qr{constructor(){let e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:y("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[y("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),y("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),y("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:y("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:y("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),showToolbar:Xo(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:dd.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:It(t.keepOnBlur,this.defaultValue.keepOnBlur)}}},nDe=class extends Qr{constructor(){let e={enabled:xl.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:xl.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:y("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:y("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:It(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}},rDe=class extends Qr{constructor(){let e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[y("editor.guides.bracketPairs.true","Enables bracket pair guides."),y("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),y("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:y("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[y("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),y("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),y("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:y("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:y("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:y("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[y("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),y("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),y("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:y("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{bracketPairs:DF(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:DF(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:It(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:It(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:DF(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}};oDe=class extends Qr{constructor(){let e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[y("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),y("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:y("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:y("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:y("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:y("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[y("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),y("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),y("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),y("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:y("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:y("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:y("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:y("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:y("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:y("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:y("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:y("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertMode:Xo(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:It(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:It(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:It(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:It(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Xo(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:It(t.showIcons,this.defaultValue.showIcons),showStatusBar:It(t.showStatusBar,this.defaultValue.showStatusBar),preview:It(t.preview,this.defaultValue.preview),previewMode:Xo(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:It(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:It(t.showMethods,this.defaultValue.showMethods),showFunctions:It(t.showFunctions,this.defaultValue.showFunctions),showConstructors:It(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:It(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:It(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:It(t.showFields,this.defaultValue.showFields),showVariables:It(t.showVariables,this.defaultValue.showVariables),showClasses:It(t.showClasses,this.defaultValue.showClasses),showStructs:It(t.showStructs,this.defaultValue.showStructs),showInterfaces:It(t.showInterfaces,this.defaultValue.showInterfaces),showModules:It(t.showModules,this.defaultValue.showModules),showProperties:It(t.showProperties,this.defaultValue.showProperties),showEvents:It(t.showEvents,this.defaultValue.showEvents),showOperators:It(t.showOperators,this.defaultValue.showOperators),showUnits:It(t.showUnits,this.defaultValue.showUnits),showValues:It(t.showValues,this.defaultValue.showValues),showConstants:It(t.showConstants,this.defaultValue.showConstants),showEnums:It(t.showEnums,this.defaultValue.showEnums),showEnumMembers:It(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:It(t.showKeywords,this.defaultValue.showKeywords),showWords:It(t.showWords,this.defaultValue.showWords),showColors:It(t.showColors,this.defaultValue.showColors),showFiles:It(t.showFiles,this.defaultValue.showFiles),showReferences:It(t.showReferences,this.defaultValue.showReferences),showFolders:It(t.showFolders,this.defaultValue.showFolders),showTypeParameters:It(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:It(t.showSnippets,this.defaultValue.showSnippets),showUsers:It(t.showUsers,this.defaultValue.showUsers),showIssues:It(t.showIssues,this.defaultValue.showIssues)}}},sDe=class extends Qr{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:y("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:y("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:It(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:It(e.selectSubwords,this.defaultValue.selectSubwords)}}},aDe=class extends Qr{constructor(){let e=[];super(131,"wordSegmenterLocales",e,{anyOf:[{description:y("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:y("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if(typeof e=="string"&&(e=[e]),Array.isArray(e)){let t=[];for(let n of e)if(typeof n=="string")try{Intl.Segmenter.supportedLocalesOf(n).length>0&&t.push(n)}catch{}return t}return this.defaultValue}},lDe=class extends Qr{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[y("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),y("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),y("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),y("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:y("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}},cDe=class extends dI{constructor(){super(147)}compute(e,t,n){let r=t.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:r.isWordWrapMinified,isViewportWrapping:r.isViewportWrapping,wrappingColumn:r.wrappingColumn}}},uDe=class extends Qr{constructor(){let e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:y("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:y("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[y("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),y("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),showDropSelector:Xo(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}},dDe=class extends Qr{constructor(){let e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:y("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:y("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[y("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),y("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:It(t.enabled,this.defaultValue.enabled),showPasteSelector:Xo(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}},hpi="Consolas, 'Courier New', monospace",fpi="Menlo, Monaco, 'Courier New', monospace",ppi="'Droid Sans Mono', 'monospace', monospace",_l={fontFamily:qt?fpi:vo?ppi:hpi,fontWeight:"normal",fontSize:qt?12:14,lineHeight:0,letterSpacing:0},NS=[];Qh={acceptSuggestionOnCommitCharacter:Ge(new un(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:y("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Ge(new Uo(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",y("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:y("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Ge(new TEe),accessibilityPageSize:Ge(new Rr(3,"accessibilityPageSize",10,1,1073741824,{description:y("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:Ge(new dd(4,"ariaLabel",y("editorViewAccessibleLabel","Editor content"))),ariaRequired:Ge(new un(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Ge(new un(8,"screenReaderAnnounceInlineSuggestion",!0,{description:y("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Ge(new Uo(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),y("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:y("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Ge(new Uo(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),y("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:y("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Ge(new Uo(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",y("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:y("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Ge(new Uo(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",y("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:y("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Ge(new Uo(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),y("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:y("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Ge(new EF(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],lpi,{enumDescriptions:[y("editor.autoIndent.none","The editor will not insert indentation automatically."),y("editor.autoIndent.keep","The editor will keep the current line's indentation."),y("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),y("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),y("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:y("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Ge(new un(13,"automaticLayout",!1)),autoSurround:Ge(new Uo(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[y("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),y("editor.autoSurround.quotes","Surround with quotes but not brackets."),y("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:y("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Ge(new nDe),bracketPairGuides:Ge(new rDe),stickyTabStops:Ge(new un(117,"stickyTabStops",!1,{description:y("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Ge(new un(17,"codeLens",!0,{description:y("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Ge(new dd(18,"codeLensFontFamily","",{description:y("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Ge(new Rr(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:y("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Ge(new un(20,"colorDecorators",!0,{description:y("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Ge(new Uo(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[y("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),y("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),y("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:y("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Ge(new Rr(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:y("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Ge(new un(22,"columnSelection",!1,{description:y("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Ge(new kEe),contextmenu:Ge(new un(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Ge(new un(25,"copyWithSyntaxHighlighting",!0,{description:y("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Ge(new EF(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],cpi,{description:y("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Ge(new Uo(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[y("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),y("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),y("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:y("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Ge(new EF(28,"cursorStyle",Cl.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],upi,{description:y("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Ge(new Rr(29,"cursorSurroundingLines",0,0,1073741824,{description:y("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Ge(new Uo(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[y("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),y("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:y("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:Ge(new Rr(31,"cursorWidth",0,0,1073741824,{markdownDescription:y("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Ge(new un(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Ge(new un(33,"disableMonospaceOptimizations",!1)),domReadOnly:Ge(new un(34,"domReadOnly",!1)),dragAndDrop:Ge(new un(35,"dragAndDrop",!0,{description:y("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Ge(new LEe),dropIntoEditor:Ge(new uDe),stickyScroll:Ge(new VEe),experimentalWhitespaceRendering:Ge(new Uo(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[y("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),y("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),y("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:y("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Ge(new dd(39,"extraEditorClassName","")),fastScrollSensitivity:Ge(new Gp(40,"fastScrollSensitivity",5,i=>i<=0?5:i,{markdownDescription:y("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Ge(new NEe),fixedOverflowWidgets:Ge(new un(42,"fixedOverflowWidgets",!1)),folding:Ge(new un(43,"folding",!0,{description:y("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Ge(new Uo(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[y("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),y("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:y("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Ge(new un(45,"foldingHighlight",!0,{description:y("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Ge(new un(46,"foldingImportsByDefault",!1,{description:y("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Ge(new Rr(47,"foldingMaximumRegions",5e3,10,65e3,{description:y("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:Ge(new un(48,"unfoldOnClickAfterEndOfLine",!1,{description:y("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Ge(new dd(49,"fontFamily",_l.fontFamily,{description:y("fontFamily","Controls the font family.")})),fontInfo:Ge(new MEe),fontLigatures2:Ge(new fg),fontSize:Ge(new REe),fontWeight:Ge(new FEe),fontVariations:Ge(new kF),formatOnPaste:Ge(new un(55,"formatOnPaste",!1,{description:y("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Ge(new un(56,"formatOnType",!1,{description:y("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Ge(new un(57,"glyphMargin",!0,{description:y("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Ge(new OEe),hideCursorInOverviewRuler:Ge(new un(59,"hideCursorInOverviewRuler",!1,{description:y("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Ge(new PEe),inDiffEditor:Ge(new un(61,"inDiffEditor",!1)),letterSpacing:Ge(new Gp(64,"letterSpacing",_l.letterSpacing,i=>Gp.clamp(i,-5,20),{description:y("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Ge(new zEe),lineDecorationsWidth:Ge(new WEe),lineHeight:Ge(new UEe),lineNumbers:Ge(new JEe),lineNumbersMinChars:Ge(new Rr(69,"lineNumbersMinChars",5,1,300)),linkedEditing:Ge(new un(70,"linkedEditing",!1,{description:y("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Ge(new un(71,"links",!0,{description:y("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Ge(new Uo(72,"matchBrackets","always",["always","near","never"],{description:y("matchBrackets","Highlight matching brackets.")})),minimap:Ge(new jEe),mouseStyle:Ge(new Uo(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Ge(new Gp(75,"mouseWheelScrollSensitivity",1,i=>i===0?1:i,{markdownDescription:y("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Ge(new un(76,"mouseWheelZoom",!1,{markdownDescription:qt?y("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):y("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Ge(new un(77,"multiCursorMergeOverlapping",!0,{description:y("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Ge(new EF(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],dpi,{markdownEnumDescriptions:[y("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),y("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:y({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Ge(new Uo(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[y("multiCursorPaste.spread","Each cursor pastes a single line of the text."),y("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:y("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Ge(new Rr(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:y("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Ge(new Uo(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[y("occurrencesHighlight.off","Does not highlight occurrences."),y("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),y("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:y("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:Ge(new un(82,"overviewRulerBorder",!0,{description:y("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Ge(new Rr(83,"overviewRulerLanes",3,0,3)),padding:Ge(new QEe),pasteAs:Ge(new dDe),parameterHints:Ge(new GEe),peekWidgetDefaultFocus:Ge(new Uo(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[y("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),y("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:y("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:Ge(new YEe),definitionLinkOpensInPeek:Ge(new un(89,"definitionLinkOpensInPeek",!1,{description:y("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Ge(new KEe),quickSuggestionsDelay:Ge(new Rr(91,"quickSuggestionsDelay",10,0,1073741824,{description:y("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Ge(new un(92,"readOnly",!1)),readOnlyMessage:Ge(new ZEe),renameOnType:Ge(new un(94,"renameOnType",!1,{description:y("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:y("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Ge(new un(95,"renderControlCharacters",!0,{description:y("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Ge(new Uo(96,"renderFinalNewline",vo?"dimmed":"on",["off","on","dimmed"],{description:y("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Ge(new Uo(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",y("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:y("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Ge(new un(98,"renderLineHighlightOnlyWhenFocus",!1,{description:y("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Ge(new Uo(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Ge(new Uo(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",y("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),y("renderWhitespace.selection","Render whitespace characters only on selected text."),y("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:y("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Ge(new Rr(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Ge(new un(102,"roundedSelection",!0,{description:y("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Ge(new XEe),scrollbar:Ge(new $Ee),scrollBeyondLastColumn:Ge(new Rr(105,"scrollBeyondLastColumn",4,0,1073741824,{description:y("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Ge(new un(106,"scrollBeyondLastLine",!0,{description:y("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Ge(new un(107,"scrollPredominantAxis",!0,{description:y("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Ge(new un(108,"selectionClipboard",!0,{description:y("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:vo})),selectionHighlight:Ge(new un(109,"selectionHighlight",!0,{description:y("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Ge(new un(110,"selectOnLineNumbers",!0)),showFoldingControls:Ge(new Uo(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[y("showFoldingControls.always","Always show the folding controls."),y("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),y("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:y("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Ge(new un(112,"showUnused",!0,{description:y("showUnused","Controls fading out of unused code.")})),showDeprecated:Ge(new un(141,"showDeprecated",!0,{description:y("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Ge(new HEe),snippetSuggestions:Ge(new Uo(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[y("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),y("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),y("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),y("snippetSuggestions.none","Do not show snippet suggestions.")],description:y("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Ge(new sDe),smoothScrolling:Ge(new un(115,"smoothScrolling",!1,{description:y("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Ge(new Rr(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Ge(new oDe),inlineSuggest:Ge(new tDe),inlineEdit:Ge(new iDe),inlineCompletionsAccessibilityVerbose:Ge(new un(150,"inlineCompletionsAccessibilityVerbose",!1,{description:y("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Ge(new Rr(120,"suggestFontSize",0,0,1e3,{markdownDescription:y("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Ge(new Rr(121,"suggestLineHeight",0,0,1e3,{markdownDescription:y("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Ge(new un(122,"suggestOnTriggerCharacters",!0,{description:y("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Ge(new Uo(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[y("suggestSelection.first","Always select the first suggestion."),y("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),y("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:y("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Ge(new Uo(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[y("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),y("tabCompletion.off","Disable tab completions."),y("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:y("tabCompletion","Enables tab completions.")})),tabIndex:Ge(new Rr(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:Ge(new eDe),unusualLineTerminators:Ge(new Uo(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[y("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),y("unusualLineTerminators.off","Unusual line terminators are ignored."),y("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:y("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Ge(new un(128,"useShadowDOM",!0)),useTabStops:Ge(new un(129,"useTabStops",!0,{description:y("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:Ge(new Uo(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[y("wordBreak.normal","Use the default line break rule."),y("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:y("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:Ge(new aDe),wordSeparators:Ge(new dd(132,"wordSeparators",SF,{description:y("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Ge(new Uo(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[y("wordWrap.off","Lines will never wrap."),y("wordWrap.on","Lines will wrap at the viewport width."),y({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),y({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:y({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Ge(new dd(134,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Ge(new dd(135,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Ge(new Rr(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:y({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Ge(new Uo(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Ge(new Uo(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Ge(new IEe),defaultColorDecorators:Ge(new un(148,"defaultColorDecorators",!1,{markdownDescription:y("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Ge(new qEe),tabFocusMode:Ge(new un(145,"tabFocusMode",!1,{markdownDescription:y("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Ge(new _7),wrappingInfo:Ge(new cDe),wrappingIndent:Ge(new lDe),wrappingStrategy:Ge(new BEe)}});function gpi(i,e,t,n,r){return new hDe(i,e,t,n,r)}function bpi(i,e,t,n,r){return new s$(i,e,t,n,r)}function a$(i,e,t){let n=e.textContent.length,r=-1;for(;e;)e=e.previousSibling,r++;return i.getColumn(new f7(r,t),n)}var mpi,LF,S7,dv,IF,s$,hDe,Olt,l$=D(()=>{Ph();Za();Si();glt();bF();aI();ES();Pb();Ks();mpi=(function(){return Lh?!0:!(vo||ml||Vf)})(),LF=!0,S7=class{constructor(e,t){this.themeType=t;let n=e.options,r=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(100):this.renderWhitespace="none",this.renderControlCharacters=n.get(95),this.spaceWidth=r.spaceWidth,this.middotWidth=r.middotWidth,this.wsmiddotWidth=r.wsmiddotWidth,this.useMonospaceOptimizations=r.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=r.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(67),this.stopRenderingLineAfter=n.get(118),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}},dv=class i{static{this.CLASS_NAME="view-line"}constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=xi(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return Bu(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,r,o){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;let s=r.getViewLineRenderingData(e),a=this._options,l=Jc.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn),c=null;if(Bu(a.themeType)||this._options.renderWhitespace==="selection"){let f=r.selections;for(let p of f){if(p.endLineNumbere)continue;let g=p.startLineNumber===e?p.startColumn:s.minColumn,v=p.endLineNumber===e?p.endColumn:s.maxColumn;g');let d=ex(u,o);o.appendString("");let h=null;return LF&&mpi&&s.isBasicASCII&&a.useMonospaceOptimizations&&d.containsForeignElements===0&&(h=new IF(this._renderedViewLine?this._renderedViewLine.domNode:null,u,d.characterMapping)),h||(h=Olt(this._renderedViewLine?this._renderedViewLine.domNode:null,u,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t,n){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(n))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof IF:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof IF?this._renderedViewLine.monospaceAssumptionsAreValid():LF}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof IF&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,r){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));let o=this._renderedViewLine.input.stopRenderingLineAfter;if(o!==-1&&t>o+1&&n>o+1)return new h7(!0,[new cv(this.getWidth(r),0)]);o!==-1&&t>o+1&&(t=o+1),o!==-1&&n>o+1&&(n=o+1);let s=this._renderedViewLine.getVisibleRangesForRange(e,t,n,r);return s&&s.length>0?new h7(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}},IF=class{constructor(e,t,n){this._cachedWidth=-1,this.domNode=e,this.input=t;let r=Math.floor(t.lineContent.length/300);if(r>0){this._keyColumnPixelOffsetCache=new Float32Array(r);for(let o=0;o=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),LF=!1)}return LF}toSlowRenderedLine(){return Olt(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,r){let o=this._getColumnPixelOffset(e,t,r),s=this._getColumnPixelOffset(e,n,r);return[new cv(o,s-o)]}_getColumnPixelOffset(e,t,n){if(t<=300){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let r=Math.floor((t-1)/300)-1,o=(r+1)*300+1,s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[r],s===-1&&(s=this._actualReadPixelOffset(e,o,n),this._keyColumnPixelOffsetCache[r]=s)),s===-1){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let a=this._characterMapping.getHorizontalOffset(o),l=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,n){if(!this.domNode)return-1;let r=this._characterMapping.getDomPosition(t),o=sI.readHorizontalRanges(this._getReadingTarget(this.domNode),r.partIndex,r.charIndex,r.partIndex,r.charIndex,n);return!o||o.length===0?-1:o[0].left}getColumnOfNodeOffset(e,t){return a$(this._characterMapping,e,t)}},s$=class{constructor(e,t,n,r,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!r||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let s=0,a=this._characterMapping.length;s<=a;s++)this._pixelOffsetCache[s]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,r){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){let o=this._readPixelOffset(this.domNode,e,t,r);if(o===-1)return null;let s=this._readPixelOffset(this.domNode,e,n,r);return s===-1?null:[new cv(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,r)}_readVisibleRangesForRange(e,t,n,r,o){if(n===r){let s=this._readPixelOffset(e,t,n,o);return s===-1?null:[new cv(s,0)]}else return this._readRawVisibleRangesForRange(e,n,r,o)}_readPixelOffset(e,t,n,r){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(r);let o=this._getReadingTarget(e);return o.firstChild?(r.markDidDomLayout(),o.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){let o=this._pixelOffsetCache[n];if(o!==-1)return o;let s=this._actualReadPixelOffset(e,t,n,r);return this._pixelOffsetCache[n]=s,s}return this._actualReadPixelOffset(e,t,n,r)}_actualReadPixelOffset(e,t,n,r){if(this._characterMapping.length===0){let l=sI.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,r);return!l||l.length===0?-1:l[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(r);let o=this._characterMapping.getDomPosition(n),s=sI.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,r);if(!s||s.length===0)return-1;let a=s[0].left;if(this.input.isBasicASCII){let l=this._characterMapping.getHorizontalOffset(n),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,n,r){if(t===1&&n===this._characterMapping.length)return[new cv(0,this.getWidth(r))];let o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(n);return sI.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,r)}getColumnOfNodeOffset(e,t){return a$(this._characterMapping,e,t)}},hDe=class extends s${_readVisibleRangesForRange(e,t,n,r,o){let s=super._readVisibleRangesForRange(e,t,n,r,o);if(!s||s.length===0||n===r||n===1&&r===this._characterMapping.length)return s;if(!this.input.containsRTL){let a=this._readPixelOffset(e,t,r,o);if(a!==-1){let l=s[s.length-1];l.left{Pt();to=class i{static _nextVisibleColumn(e,t,n){return e===9?i.nextRenderTabStop(t,n):rg(e)||Y9(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){let r=Math.min(t-1,e.length),o=e.substring(0,r),s=new jk(o),a=0;for(;!s.eol();){let l=JR(o,r,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,n)}return a}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;let r=e.length,o=new jk(e),s=0,a=1;for(;!o.eol();){let l=JR(e,r,o.offset);o.nextGraphemeLength();let c=this._nextVisibleColumn(l,s,n),u=o.offset+1;if(c>=t){let d=t-s;return c-t{zb();fI=class i{static whitespaceVisibleColumn(e,t,n){let r=e.length,o=0,s=-1,a=-1;for(let l=0;lmI,MouseTarget:()=>jl,MouseTargetFactory:()=>gI,PointerHandlerLastRenderData:()=>E7});function pDe(i){return{isAfterLines:!1,horizontalDistanceToText:i}}function vpi(i,e,t){let n=document.createRange(),r=i.elementFromPoint(e,t);if(r!==null){for(;r&&r.firstChild&&r.firstChild.nodeType!==r.firstChild.TEXT_NODE&&r.lastChild&&r.lastChild.firstChild;)r=r.lastChild;let o=r.getBoundingClientRect(),s=rt(r),a=s.getComputedStyle(r,null).getPropertyValue("font-style"),l=s.getComputedStyle(r,null).getPropertyValue("font-variant"),c=s.getComputedStyle(r,null).getPropertyValue("font-weight"),u=s.getComputedStyle(r,null).getPropertyValue("font-size"),d=s.getComputedStyle(r,null).getPropertyValue("line-height"),h=s.getComputedStyle(r,null).getPropertyValue("font-family"),f=`${a} ${l} ${c} ${u}/${d} ${h}`,p=r.innerText,g=o.left,v=0,A;if(e>o.left+o.width)v=p.length;else{let w=bDe.getInstance();for(let C=0;C{pF();ld();l$();Nt();We();zb();Ye();fDe();nv();ry=class{constructor(e=null){this.hitTarget=e,this.type=0}},c$=class{get hitTarget(){return this.spanNode}constructor(e,t,n){this.position=e,this.spanNode=t,this.injectedText=n,this.type=1}};(function(i){function e(t,n,r){let o=t.getPositionFromDOMInfo(n,r);return o?new c$(o,n,null):new ry(n)}i.createFromDOMInfo=e})(pI||(pI={}));E7=class{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}},jl=class{static _deduceRage(e,t=null){return!t&&e?new N(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,n){return{type:0,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,n,r,o,s){return{type:e,element:t,mouseColumn:n,position:r,range:o,detail:s}}static createViewZone(e,t,n,r,o){return{type:e,element:t,mouseColumn:n,position:r,range:this._deduceRage(r),detail:o}}static createContentText(e,t,n,r,o){return{type:6,element:e,mouseColumn:t,position:n,range:this._deduceRage(n,r),detail:o}}static createContentEmpty(e,t,n,r){return{type:7,element:e,mouseColumn:t,position:n,range:this._deduceRage(n),detail:r}}static createContentWidget(e,t,n){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createScrollbar(e,t,n){return{type:11,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createOverlayWidget(e,t,n){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createOutsideEditor(e,t,n,r){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:n,outsideDistance:r}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}},zu=class{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}},mI=class i{constructor(e,t,n){this.viewModel=e.viewModel;let r=e.configuration.options;this.layoutInfo=r.get(146),this.viewDomNode=t.viewDomNode,this.lineHeight=r.get(67),this.stickyTabStops=r.get(117),this.typicalHalfwidthCharacterWidth=r.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return i.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){let r=n.verticalOffset+n.height/2,o=e.viewModel.getLineCount(),s=null,a,l=null;return n.afterLineNumber!==o&&(l=new K(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new K(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),l===null?a=s:s===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,gI._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}},gDe=class extends mDe{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=vc.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,n,r,o){super(e,t,n,r),this.hitTestResult=new Ys(()=>gI.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=o;let s=!!this._eventTarget;this._useHitTestTarget=!s}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} - target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;let a=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(a<=o&&o<=a+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){let r=t.isInContentArea?8:5;return t.fulfillViewZone(r,n.position,n)}return null}static _hitTestTextArea(e,t){return zu.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),r=n.range.getStartPosition(),o=Math.abs(t.relativePos.x),s={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};if(o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth){let a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return s.glyphMarginLane=l[Math.floor(o/e.lineHeight)],t.fulfillMargin(2,r,n.range,s)}return o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,r,n.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,r,n.range,s))}return null}static _hitTestViewLines(e,t){if(!zu.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new K(1,1),Plt);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let r=e.viewModel.getLineCount(),o=e.viewModel.getLineMaxColumn(r);return t.fulfillContentEmpty(new K(r,o),Plt)}if(zu.isStrictChildOfViewLines(t.targetPath)){let r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){let s=e.getLineWidth(r),a=pDe(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(new K(r,1),a)}let o=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>=o){let s=pDe(t.mouseContentHorizontalOffset-o),a=new K(r,e.viewModel.getLineMaxColumn(r));return t.fulfillContentEmpty(a,s)}}let n=t.hitTestResult.value;return n.type===1?i.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(zu.isChildOfMinimap(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new K(n,r))}return null}static _hitTestScrollbarSlider(e,t){if(zu.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){let n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){let r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(r);return t.fulfillScrollbar(new K(r,o))}}return null}static _hitTestScrollbar(e,t){if(zu.isChildOfScrollableElement(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new K(n,r))}return null}getMouseColumn(e){let t=this._context.configuration.options,n=t.get(146),r=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return i._getMouseColumn(r,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,r,o){let s=r.lineNumber,a=r.column,l=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>l){let A=pDe(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(r,A)}let c=e.visibleRangeForPosition(s,a);if(!c)return t.fulfillUnknown(r);let u=c.left;if(Math.abs(t.mouseContentHorizontalOffset-u)<1)return t.fulfillContentText(r,null,{mightBeForeignElement:!!o,injectedText:o});let d=[];if(d.push({offset:c.left,column:a}),a>1){let A=e.visibleRangeForPosition(s,a-1);A&&d.push({offset:A.left,column:a-1})}let h=e.viewModel.getLineMaxColumn(s);if(aA.offset-w.offset);let f=t.pos.toClientCoordinates(rt(e.viewDomNode)),p=n.getBoundingClientRect(),g=p.left<=f.clientX&&f.clientX<=p.right,v=null;for(let A=1;Ao)){let a=Math.floor((r+o)/2),l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);let c=new SS(t.pos.x,l),u=this._actualDoHitTestWithCaretRangeFromPoint(e,c.toClientCoordinates(rt(e.viewDomNode)));if(u.type===1)return u}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(rt(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let n=ov(e.viewDomNode),r;if(n?typeof n.caretRangeFromPoint>"u"?r=vpi(n,t.clientX,t.clientY):r=n.caretRangeFromPoint(t.clientX,t.clientY):r=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!r||!r.startContainer)return new ry;let o=r.startContainer;if(o.nodeType===o.TEXT_NODE){let s=o.parentNode,a=s?s.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===dv.CLASS_NAME?pI.createFromDOMInfo(e,s,r.startOffset):new ry(o.parentNode)}else if(o.nodeType===o.ELEMENT_NODE){let s=o.parentNode,a=s?s.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===dv.CLASS_NAME?pI.createFromDOMInfo(e,o,o.textContent.length):new ry(o)}return new ry}static _doHitTestWithCaretPositionFromPoint(e,t){let n=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){let r=n.offsetNode.parentNode,o=r?r.parentNode:null,s=o?o.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===dv.CLASS_NAME?pI.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new ry(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){let r=n.offsetNode.parentNode,o=r&&r.nodeType===r.ELEMENT_NODE?r.className:null,s=r?r.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(o===dv.CLASS_NAME){let l=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(l)return pI.createFromDOMInfo(e,l,0)}else if(a===dv.CLASS_NAME)return pI.createFromDOMInfo(e,n.offsetNode,0)}return new ry(n.offsetNode)}static _snapToSoftTabBoundary(e,t){let n=t.getLineContent(e.lineNumber),{tabSize:r}=t.model.getOptions(),o=fI.atomicPosition(n,e.column-1,r,2);return o!==-1?new K(e.lineNumber,o+1):e}static doHitTest(e,t){let n=new ry;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(rt(e.viewDomNode)))),n.type===1){let r=e.viewModel.getInjectedTextAt(n.position),o=e.viewModel.normalizePosition(n.position,2);(r||!o.equals(n.position))&&(n=new c$(o,n.spanNode,r))}return n}};bDe=class i{static{this._INSTANCE=null}static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let n=e+t;if(this._cache[n])return this._cache[n];let r=this._canvas.getContext("2d");r.font=t;let s=r.measureText(e).width;return this._cache[n]=s,s}}});var zlt=D(()=>{});var vDe,ADe,yDe,MS,d$=D(()=>{Ye();et();ae();vDe=class extends W{constructor(e){super(),this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}},ADe=class extends W{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);let t=this._register(new vDe(e));this._register(t.onDidChange(()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)}))}_getPixelRatio(e){let t=document.createElement("canvas").getContext("2d"),n=e.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}},yDe=class{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){let t=ZR(e),n=this.mapWindowIdToPixelRatioMonitor.get(t);return n||(n=A_(new ADe(e)),this.mapWindowIdToPixelRatioMonitor.set(t,n),A_(Se.once(nst)(({vscodeWindowId:r})=>{r===t&&(n?.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))}))),n}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}},MS=new yDe});function mo(i,e){i instanceof d7?(i.setFontFamily(e.getMassagedFontFamily()),i.setFontWeight(e.fontWeight),i.setFontSize(e.fontSize),i.setFontFeatureSettings(e.fontFeatureSettings),i.setFontVariationSettings(e.fontVariationSettings),i.setLineHeight(e.lineHeight),i.setLetterSpacing(e.letterSpacing)):(i.style.fontFamily=e.getMassagedFontFamily(),i.style.fontWeight=e.fontWeight,i.style.fontSize=e.fontSize+"px",i.style.fontFeatureSettings=e.fontFeatureSettings,i.style.fontVariationSettings=e.fontVariationSettings,i.style.lineHeight=e.lineHeight+"px",i.style.letterSpacing=e.letterSpacing+"px")}var qp=D(()=>{Za()});function Vlt(i,e,t){new wDe(e,t).read(i)}var h$,wDe,Hlt=D(()=>{qp();h$=class{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}},wDe=class i{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";let t=document.createElement("div");mo(t,this._bareFontInfo),e.appendChild(t);let n=document.createElement("div");mo(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);let r=document.createElement("div");mo(r,this._bareFontInfo),r.style.fontStyle="italic",e.appendChild(r);let o=[];for(let s of this._requests){let a;s.type===0&&(a=t),s.type===2&&(a=n),s.type===1&&(a=r),a.appendChild(document.createElement("br"));let l=document.createElement("span");i._render(l,s),a.appendChild(l),o.push(l)}this._container=e,this._testElements=o}static _render(e,t){if(t.chr===" "){let n="\xA0";for(let r=0;r<8;r++)n+=n;e.innerText=n}else{let n=t.chr;for(let r=0;r<8;r++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{et();hd=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new G,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(i){i=Math.min(Math.max(-5,i),20),this._zoomLevel!==i&&(this._zoomLevel=i,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}});var ypi,xDe,bI,wpi,vI,f$=D(()=>{Si();Ks();NF();ypi=qt?1.5:1.35,xDe=8,bI=class i{static createFromValidatedSettings(e,t,n){let r=e.get(49),o=e.get(53),s=e.get(52),a=e.get(51),l=e.get(54),c=e.get(67),u=e.get(64);return i._create(r,o,s,a,l,c,u,t,n)}static _create(e,t,n,r,o,s,a,l,c){s===0?s=ypi*n:s{Ye();d$();et();ae();Hlt();Ks();f$();CDe=class extends W{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){let t=ZR(e),n=this._cache.get(t);return n||(n=new _De,this._cache.set(t,n)),n}_writeToCache(e,t,n){this._ensureCache(e).put(t,n),!n.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=e.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){let t=this._ensureCache(e),n=t.getValues(),r=!1;for(let o of n)o.isTrusted||(r=!0,t.remove(o));r&&this._onDidChange.fire()}readFontInfo(e,t){let n=this._ensureCache(e);if(!n.has(t)){let r=this._actualReadFontInfo(e,t);(r.typicalHalfwidthCharacterWidth<=2||r.typicalFullwidthCharacterWidth<=2||r.spaceWidth<=2||r.maxDigitWidth<=2)&&(r=new vI({pixelRatio:MS.getInstance(e).value,fontFamily:r.fontFamily,fontWeight:r.fontWeight,fontSize:r.fontSize,fontFeatureSettings:r.fontFeatureSettings,fontVariationSettings:r.fontVariationSettings,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,isMonospace:r.isMonospace,typicalHalfwidthCharacterWidth:Math.max(r.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(r.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:r.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(r.spaceWidth,5),middotWidth:Math.max(r.middotWidth,5),wsmiddotWidth:Math.max(r.wsmiddotWidth,5),maxDigitWidth:Math.max(r.maxDigitWidth,5)},!1)),this._writeToCache(e,t,r)}return n.get(t)}_createRequest(e,t,n,r){let o=new h$(e,t);return n.push(o),r?.push(o),o}_actualReadFontInfo(e,t){let n=[],r=[],o=this._createRequest("n",0,n,r),s=this._createRequest("\uFF4D",0,n,null),a=this._createRequest(" ",0,n,r),l=this._createRequest("0",0,n,r),c=this._createRequest("1",0,n,r),u=this._createRequest("2",0,n,r),d=this._createRequest("3",0,n,r),h=this._createRequest("4",0,n,r),f=this._createRequest("5",0,n,r),p=this._createRequest("6",0,n,r),g=this._createRequest("7",0,n,r),v=this._createRequest("8",0,n,r),A=this._createRequest("9",0,n,r),w=this._createRequest("\u2192",0,n,r),C=this._createRequest("\uFFEB",0,n,null),_=this._createRequest("\xB7",0,n,r),E=this._createRequest("\u2E31",0,n,null),I="|/-_ilm%";for(let H=0,B=I.length;H.001){L=!1;break}}let z=!0;return L&&C.width!==M&&(z=!1),C.width>w.width&&(z=!1),new vI({pixelRatio:MS.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:z,spaceWidth:a.width,middotWidth:_.width,wsmiddotWidth:E.width,maxDigitWidth:T},!0)}},_De=class{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){let t=e.getId();return!!this._values[t]}get(e){let t=e.getId();return this._values[t]}put(e,t){let n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){let t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}},D7=new CDe});function xpi(i,e,t){e[Vb.DI_TARGET]===e?e[Vb.DI_DEPENDENCIES].push({id:i,index:t}):(e[Vb.DI_DEPENDENCIES]=[{id:i,index:t}],e[Vb.DI_TARGET]=e)}function vt(i){if(Vb.serviceIds.has(i))return Vb.serviceIds.get(i);let e=function(t,n,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");xpi(e,t,r)};return e.toString=()=>i,Vb.serviceIds.set(i,e),e}var Vb,Ne,ht=D(()=>{(function(i){i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=e})(Vb||(Vb={}));Ne=vt("instantiationService")});var ai,fs=D(()=>{ht();ai=vt("codeEditorService")});var an,Zc=D(()=>{ht();an=vt("modelService")});var xs,Yp=D(()=>{ht();xs=vt("textModelService")});function oy(i){return{id:i.id,label:i.label,tooltip:i.tooltip??i.label,class:i.class,enabled:i.enabled??!0,checked:i.checked,run:async(...e)=>i.run(...e)}}var Js,Gf,go,pg,p$,$a=D(()=>{et();ae();Oe();Js=class extends W{constructor(e,t="",n="",r=!0,o){super(),this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=r,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}},Gf=class extends W{constructor(){super(...arguments),this._onWillRun=this._register(new G),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new G),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{await this.runAction(e,t)}catch(r){n=r}this._onDidRun.fire({action:e,error:n})}async runAction(e,t){await e.run(t)}},go=class i{constructor(){this.id=i.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(let n of e)n.length&&(t.length?t=[...t,new i,...n]:t=n);return t}static{this.ID="vs.actions.separator"}async run(){}},pg=class{get actions(){return this._actions}constructor(e,t,n,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=r,this._actions=n}async run(){}},p$=class i extends Js{static{this.ID="vs.actions.empty"}constructor(){super(i.ID,y("submenu.empty","(empty)"),void 0,!1)}}});var EDe,ut,Dr=D(()=>{er();(function(i){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}i.isThemeColor=e})(EDe||(EDe={}));(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9-]+",i.iconModifierExpression="~[A-Za-z]+",i.iconNameCharacter="[A-Za-z0-9~-]";let e=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function t(h){let f=e.exec(h.id);if(!f)return t(Ee.error);let[,p,g]=f,v=["codicon","codicon-"+p];return g&&v.push("codicon-modifier-"+g.substring(1)),v}i.asClassNameArray=t;function n(h){return t(h).join(" ")}i.asClassName=n;function r(h){return"."+t(h).join(".")}i.asCSSSelector=r;function o(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||EDe.isThemeColor(h.color))}i.isThemeIcon=o;let s=new RegExp(`^\\$\\((${i.iconNameExpression}(?:${i.iconModifierExpression})?)\\)$`);function a(h){let f=s.exec(h);if(!f)return;let[,p]=f;return{id:p}}i.fromString=a;function l(h){return{id:h}}i.fromId=l;function c(h,f){let p=h.id,g=p.lastIndexOf("~");return g!==-1&&(p=p.substring(0,g)),f&&(p=`${p}~${f}`),{id:p}}i.modify=c;function u(h){let f=h.id.lastIndexOf("~");if(f!==-1)return h.id.substring(f+1)}i.getModifier=u;function d(h,f){return h.id===f.id&&h.color?.id===f.color?.id}i.isEqual=d})(ut||(ut={}))});var Oi,ci,Xn=D(()=>{et();td();ae();Sp();gn();ht();Oi=vt("commandService"),ci=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new G,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,e){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:i,handler:e})}if(i.metadata&&Array.isArray(i.metadata.args)){let s=[];for(let l of i.metadata.args)s.push(l.constraint);let a=i.handler;i.handler=function(l,...c){return Xqe(c,s),a(l,...c)}}let{id:t}=i,n=this._commands.get(t);n||(n=new Ro,this._commands.set(t,n));let r=n.unshift(i),o=Ve(()=>{r(),this._commands.get(t)?.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),o}registerCommandAlias(i,e){return ci.registerCommand(i,(t,...n)=>t.get(Oi).executeCommand(e,...n))}getCommand(i){let e=this._commands.get(i);if(!(!e||e.isEmpty()))return bi.first(e)}getCommands(){let i=new Map;for(let e of this._commands.keys()){let t=this.getCommand(e);t&&i.set(e,t)}return i}};ci.registerCommand("noop",()=>{})});function DDe(...i){switch(i.length){case 1:return y("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",i[0]);case 2:return y("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",i[0],i[1]);case 3:return y("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",i[0],i[1],i[2]);default:return}}var Cpi,_pi,RS,Wlt=D(()=>{Lt();Oe();Cpi=y("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),_pi=y("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'."),RS=class i{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw MM(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(e=>e.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){let t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){let t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(DDe("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(DDe("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(DDe("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){let t=this._start,n=this._input.substring(this._start,this._current),r={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(r)}_string(){this.stringRe.lastIndex=this._start;let e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;let t=this._input.substring(this._start,this._current),n=i._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(Cpi);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(_pi);return}let o=this._input.charCodeAt(e);if(t)t=!1;else if(o===47&&!n){e++;break}else o===91?n=!0:o===92?t=!0:o===93&&(n=!1);e++}for(;e=this._input.length}}});function Glt(i,e){let t=i?i.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function T7(i,e){return i.cmp(e)}function _$(i,e){if(typeof i=="string"){let t=parseFloat(i);isNaN(t)||(i=t)}return typeof i=="string"||typeof i=="number"?e(i):$d.INSTANCE}function qlt(i){let e=null;for(let t=0,n=i.length;te?1:0}function xI(i,e,t,n){return it?1:en?1:0}function C$(i,e){if(i.type===0||e.type===1)return!0;if(i.type===9)return e.type===9?jlt(i.expr,e.expr):!1;if(e.type===9){for(let t of e.expr)if(C$(i,t))return!0;return!1}if(i.type===6){if(e.type===6)return jlt(e.expr,i.expr);for(let t of i.expr)if(C$(t,e))return!0;return!1}return i.equals(e)}function jlt(i,e){let t=0,n=0;for(;t{Si();Pt();Wlt();ht();Oe();Vu=new Map;Vu.set("false",!1);Vu.set("true",!0);Vu.set("isMac",qt);Vu.set("isLinux",vo);Vu.set("isWindows",Nr);Vu.set("isWeb",cb);Vu.set("isMacNative",qt&&!cb);Vu.set("isEdge",Pqe);Vu.set("isFirefox",Fqe);Vu.set("isChrome",dye);Vu.set("isSafari",Oqe);Spi=Object.prototype.hasOwnProperty,Epi={regexParsingWithErrorRecovery:!0},Dpi=y("contextkey.parser.error.emptyString","Empty context key expression"),Tpi=y("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),kpi=y("contextkey.parser.error.noInAfterNot","'in' after 'not'."),Ult=y("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),Ipi=y("contextkey.parser.error.unexpectedToken","Unexpected token"),Lpi=y("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),Npi=y("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),Mpi=y("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?"),TDe=class i{static{this._parseError=new Error}constructor(e=Epi){this._config=e,this._scanner=new RS,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:Dpi,offset:0,lexeme:"",additionalInfo:Tpi});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{let t=this._expr();if(!this._isAtEnd()){let n=this._peek(),r=n.type===17?Lpi:void 0;throw this._parsingErrors.push({message:Ipi,offset:n.offset,lexeme:RS.getLexeme(n),additionalInfo:r}),i._parseError}return t}catch(t){if(t!==i._parseError)throw t;return}}_expr(){return this._or()}_or(){let e=[this._and()];for(;this._matchOne(16);){let t=this._and();e.push(t)}return e.length===1?e[0]:me.or(...e)}_and(){let e=[this._term()];for(;this._matchOne(15);){let t=this._term();e.push(t)}return e.length===1?e[0]:me.and(...e)}_term(){if(this._matchOne(2)){let e=this._peek();switch(e.type){case 11:return this._advance(),$d.INSTANCE;case 12:return this._advance(),Gh.INSTANCE;case 0:{this._advance();let t=this._expr();return this._consume(1,Ult),t?.negate()}case 17:return this._advance(),wI.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){let e=this._peek();switch(e.type){case 11:return this._advance(),me.true();case 12:return this._advance(),me.false();case 0:{this._advance();let t=this._expr();return this._consume(1,Ult),t}case 17:{let t=e.lexeme;if(this._advance(),this._matchOne(9)){let r=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),r.type!==10)throw this._errExpectedButGot("REGEX",r);let o=r.lexeme,s=o.lastIndexOf("/"),a=s===o.length-1?void 0:this._removeFlagsGY(o.substring(s+1)),l;try{l=new RegExp(o.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",r)}return k7.create(t,l)}switch(r.type){case 10:case 19:{let o=[r.lexeme];this._advance();let s=this._peek(),a=0;for(let h=0;h=0){let c=o.slice(a+1,l),u=o[l+1]==="i"?"i":"";try{s=new RegExp(c,u)}catch{throw this._errExpectedButGot("REGEX",r)}}}if(s===null)throw this._errExpectedButGot("REGEX",r);return k7.create(t,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,kpi);let r=this._value();return me.notIn(t,r)}switch(this._peek().type){case 3:{this._advance();let r=this._value();if(this._previous().type===18)return me.equals(t,r);switch(r){case"true":return me.has(t);case"false":return me.not(t);default:return me.equals(t,r)}}case 4:{this._advance();let r=this._value();if(this._previous().type===18)return me.notEquals(t,r);switch(r){case"true":return me.not(t);case"false":return me.has(t);default:return me.notEquals(t,r)}}case 5:return this._advance(),y$.create(t,this._value());case 6:return this._advance(),w$.create(t,this._value());case 7:return this._advance(),v$.create(t,this._value());case 8:return this._advance(),A$.create(t,this._value());case 13:return this._advance(),me.in(t,this._value());default:return me.has(t)}}case 20:throw this._parsingErrors.push({message:Npi,offset:e.offset,lexeme:"",additionalInfo:Mpi}),i._parseError;default:throw this._errExpectedButGot(`true | false | KEY + - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,n){return e.fontInfo.lineHeight}},fDe=class extends Yo{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:y("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:y("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[y("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),y("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),y("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:y("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:y("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:y("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:y("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:y("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:y("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:y("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:y("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:y("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:y("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),autohide:Dt(t.autohide,this.defaultValue.autohide),size:Jr(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Jr(t.side,this.defaultValue.side,["right","left"]),showSlider:Jr(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Dt(t.renderCharacters,this.defaultValue.renderCharacters),scale:Bo.clampedInt(t.scale,1,1,3),maxColumn:Bo.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:Dt(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:Dt(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:cm.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:cm.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}};pDe=class extends Yo{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:y("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:y("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{top:Bo.clampedInt(t.top,0,0,1e3),bottom:Bo.clampedInt(t.bottom,0,0,1e3)}}},mDe=class extends Yo{constructor(){let e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:y("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:y("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),cycle:Dt(t.cycle,this.defaultValue.cycle)}}},gDe=class extends QI{constructor(){super(144)}compute(e,t,n){return e.pixelRatio}},bDe=class extends Yo{constructor(){super(88,"placeholder",void 0)}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e:this.defaultValue}},ADe=class extends Yo{constructor(){let e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[y("on","Quick suggestions show inside the suggest widget"),y("inline","Quick suggestions show as ghost text"),y("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:y("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:y("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:y("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:y("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){let c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;let{other:t,comments:n,strings:o}=e,r=["on","inline","off"],s,a,l;return typeof t=="boolean"?s=t?"on":"off":s=Jr(t,this.defaultValue.other,r),typeof n=="boolean"?a=n?"on":"off":a=Jr(n,this.defaultValue.comments,r),typeof o=="boolean"?l=o?"on":"off":l=Jr(o,this.defaultValue.strings,r),{other:s,comments:a,strings:l}}},vDe=class extends Yo{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[y("lineNumbers.off","Line numbers are not rendered."),y("lineNumbers.on","Line numbers are rendered as absolute number."),y("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),y("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:y("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}};yDe=class extends Yo{constructor(){let e=[],t={type:"number",description:y("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:y("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:y("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let n of e)if(typeof n=="number")t.push({column:Bo.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){let o=n;t.push({column:Bo.clampedInt(o.column,0,0,1e4),color:o.color})}return t.sort((n,o)=>n.column-o.column),t}return this.defaultValue}},wDe=class extends Yo{constructor(){super(93,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}};xDe=class extends Yo{constructor(){let e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[y("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),y("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),y("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:y("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[y("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),y("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),y("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:y("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:y("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:y("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:y("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:y("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e,n=Bo.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),o=Bo.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Bo.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Hst(t.vertical,this.defaultValue.vertical),horizontal:Hst(t.horizontal,this.defaultValue.horizontal),useShadows:Dt(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Dt(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Dt(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Dt(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Dt(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Bo.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:o,verticalSliderSize:Bo.clampedInt(t.verticalSliderSize,o,0,1e3),scrollByPage:Dt(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Dt(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}},np="inUntrustedWorkspace",sh={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"},CDe=class extends Yo{constructor(){let e={nonBasicASCII:np,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:np,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[sh.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,np],default:e.nonBasicASCII,description:y("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[sh.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:y("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[sh.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:y("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[sh.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,np],default:e.includeComments,description:y("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[sh.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,np],default:e.includeStrings,description:y("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[sh.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:y("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[sh.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:y("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&(El(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},n=!0)),t.allowedLocales&&e&&(El(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},n=!0));let o=super.applyUpdate(e,t);return n?new $S(o.newValue,!0):o}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{nonBasicASCII:vO(t.nonBasicASCII,np,[!0,!1,np]),invisibleCharacters:Dt(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Dt(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:vO(t.includeComments,np,[!0,!1,np]),includeStrings:vO(t.includeStrings,np,[!0,!1,np]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;let n={};for(let[o,r]of Object.entries(e))r===!0&&(n[o]=!0);return n}},_De=class extends Yo{constructor(){let e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:y("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[y("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),y("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),y("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:y("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:y("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:y("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),mode:Jr(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Jr(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Dt(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Dt(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:yd.string(t.fontFamily,this.defaultValue.fontFamily)}}},SDe=class extends Yo{constructor(){let e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:y("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[y("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),y("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),y("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:y("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:y("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),showToolbar:Jr(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:yd.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:Dt(t.keepOnBlur,this.defaultValue.keepOnBlur)}}},EDe=class extends Yo{constructor(){let e={enabled:Dl.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Dl.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:y("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:y("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Dt(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}},DDe=class extends Yo{constructor(){let e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[y("editor.guides.bracketPairs.true","Enables bracket pair guides."),y("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),y("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:y("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[y("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),y("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),y("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:y("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:y("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:y("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[y("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),y("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),y("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:y("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{bracketPairs:vO(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:vO(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Dt(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Dt(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:vO(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}};TDe=class extends Yo{constructor(){let e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[y("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),y("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:y("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:y("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:y("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:y("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[y("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),y("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),y("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),y("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:y("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:y("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:y("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:y("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:y("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:y("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:y("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:y("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:y("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertMode:Jr(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Dt(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Dt(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Dt(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Dt(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Jr(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Dt(t.showIcons,this.defaultValue.showIcons),showStatusBar:Dt(t.showStatusBar,this.defaultValue.showStatusBar),preview:Dt(t.preview,this.defaultValue.preview),previewMode:Jr(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Dt(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Dt(t.showMethods,this.defaultValue.showMethods),showFunctions:Dt(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Dt(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Dt(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Dt(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Dt(t.showFields,this.defaultValue.showFields),showVariables:Dt(t.showVariables,this.defaultValue.showVariables),showClasses:Dt(t.showClasses,this.defaultValue.showClasses),showStructs:Dt(t.showStructs,this.defaultValue.showStructs),showInterfaces:Dt(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Dt(t.showModules,this.defaultValue.showModules),showProperties:Dt(t.showProperties,this.defaultValue.showProperties),showEvents:Dt(t.showEvents,this.defaultValue.showEvents),showOperators:Dt(t.showOperators,this.defaultValue.showOperators),showUnits:Dt(t.showUnits,this.defaultValue.showUnits),showValues:Dt(t.showValues,this.defaultValue.showValues),showConstants:Dt(t.showConstants,this.defaultValue.showConstants),showEnums:Dt(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Dt(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Dt(t.showKeywords,this.defaultValue.showKeywords),showWords:Dt(t.showWords,this.defaultValue.showWords),showColors:Dt(t.showColors,this.defaultValue.showColors),showFiles:Dt(t.showFiles,this.defaultValue.showFiles),showReferences:Dt(t.showReferences,this.defaultValue.showReferences),showFolders:Dt(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Dt(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Dt(t.showSnippets,this.defaultValue.showSnippets),showUsers:Dt(t.showUsers,this.defaultValue.showUsers),showIssues:Dt(t.showIssues,this.defaultValue.showIssues)}}},kDe=class extends Yo{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:y("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:y("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Dt(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Dt(e.selectSubwords,this.defaultValue.selectSubwords)}}},IDe=class extends Yo{constructor(){let e=[];super(131,"wordSegmenterLocales",e,{anyOf:[{description:y("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:y("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if(typeof e=="string"&&(e=[e]),Array.isArray(e)){let t=[];for(let n of e)if(typeof n=="string")try{Intl.Segmenter.supportedLocalesOf(n).length>0&&t.push(n)}catch{}return t}return this.defaultValue}},LDe=class extends Yo{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[y("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),y("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),y("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),y("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:y("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}},NDe=class extends QI{constructor(){super(147)}compute(e,t,n){let o=t.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:o.isWordWrapMinified,isViewportWrapping:o.isViewportWrapping,wrappingColumn:o.wrappingColumn}}},MDe=class extends Yo{constructor(){let e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:y("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:y("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[y("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),y("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),showDropSelector:Jr(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}},RDe=class extends Yo{constructor(){let e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:y("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:y("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[y("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),y("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Dt(t.enabled,this.defaultValue.enabled),showPasteSelector:Jr(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}},soi="Consolas, 'Courier New', monospace",aoi="Menlo, Monaco, 'Courier New', monospace",loi="'Droid Sans Mono', 'monospace', monospace",kl={fontFamily:jt?aoi:Cr?loi:soi,fontWeight:"normal",fontSize:jt?12:14,lineHeight:0,letterSpacing:0},iE=[];of={acceptSuggestionOnCommitCharacter:Ge(new dn(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:y("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Ge(new jr(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",y("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:y("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Ge(new XEe),accessibilityPageSize:Ge(new Bo(3,"accessibilityPageSize",10,1,1073741824,{description:y("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:Ge(new yd(4,"ariaLabel",y("editorViewAccessibleLabel","Editor content"))),ariaRequired:Ge(new dn(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Ge(new dn(8,"screenReaderAnnounceInlineSuggestion",!0,{description:y("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Ge(new jr(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),y("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:y("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Ge(new jr(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),y("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:y("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Ge(new jr(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",y("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:y("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Ge(new jr(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",y("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:y("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Ge(new jr(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),y("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:y("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Ge(new AO(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],ioi,{enumDescriptions:[y("editor.autoIndent.none","The editor will not insert indentation automatically."),y("editor.autoIndent.keep","The editor will keep the current line's indentation."),y("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),y("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),y("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:y("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Ge(new dn(13,"automaticLayout",!1)),autoSurround:Ge(new jr(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[y("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),y("editor.autoSurround.quotes","Surround with quotes but not brackets."),y("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:y("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Ge(new EDe),bracketPairGuides:Ge(new DDe),stickyTabStops:Ge(new dn(117,"stickyTabStops",!1,{description:y("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Ge(new dn(17,"codeLens",!0,{description:y("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Ge(new yd(18,"codeLensFontFamily","",{description:y("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Ge(new Bo(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:y("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Ge(new dn(20,"colorDecorators",!0,{description:y("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Ge(new jr(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[y("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),y("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),y("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:y("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Ge(new Bo(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:y("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Ge(new dn(22,"columnSelection",!1,{description:y("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Ge(new ZEe),contextmenu:Ge(new dn(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Ge(new dn(25,"copyWithSyntaxHighlighting",!0,{description:y("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Ge(new AO(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],noi,{description:y("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Ge(new jr(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[y("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),y("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),y("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:y("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Ge(new AO(28,"cursorStyle",Tl.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],ooi,{description:y("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Ge(new Bo(29,"cursorSurroundingLines",0,0,1073741824,{description:y("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Ge(new jr(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[y("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),y("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:y("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:Ge(new Bo(31,"cursorWidth",0,0,1073741824,{markdownDescription:y("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Ge(new dn(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Ge(new dn(33,"disableMonospaceOptimizations",!1)),domReadOnly:Ge(new dn(34,"domReadOnly",!1)),dragAndDrop:Ge(new dn(35,"dragAndDrop",!0,{description:y("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Ge(new eDe),dropIntoEditor:Ge(new MDe),stickyScroll:Ge(new cDe),experimentalWhitespaceRendering:Ge(new jr(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[y("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),y("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),y("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:y("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Ge(new yd(39,"extraEditorClassName","")),fastScrollSensitivity:Ge(new cm(40,"fastScrollSensitivity",5,i=>i<=0?5:i,{markdownDescription:y("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Ge(new tDe),fixedOverflowWidgets:Ge(new dn(42,"fixedOverflowWidgets",!1)),folding:Ge(new dn(43,"folding",!0,{description:y("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Ge(new jr(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[y("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),y("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:y("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Ge(new dn(45,"foldingHighlight",!0,{description:y("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Ge(new dn(46,"foldingImportsByDefault",!1,{description:y("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Ge(new Bo(47,"foldingMaximumRegions",5e3,10,65e3,{description:y("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:Ge(new dn(48,"unfoldOnClickAfterEndOfLine",!1,{description:y("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Ge(new yd(49,"fontFamily",kl.fontFamily,{description:y("fontFamily","Controls the font family.")})),fontInfo:Ge(new iDe),fontLigatures2:Ge(new Dg),fontSize:Ge(new nDe),fontWeight:Ge(new oDe),fontVariations:Ge(new wO),formatOnPaste:Ge(new dn(55,"formatOnPaste",!1,{description:y("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Ge(new dn(56,"formatOnType",!1,{description:y("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Ge(new dn(57,"glyphMargin",!0,{description:y("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Ge(new rDe),hideCursorInOverviewRuler:Ge(new dn(59,"hideCursorInOverviewRuler",!1,{description:y("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Ge(new sDe),inDiffEditor:Ge(new dn(61,"inDiffEditor",!1)),letterSpacing:Ge(new cm(64,"letterSpacing",kl.letterSpacing,i=>cm.clamp(i,-5,20),{description:y("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Ge(new lDe),lineDecorationsWidth:Ge(new dDe),lineHeight:Ge(new hDe),lineNumbers:Ge(new vDe),lineNumbersMinChars:Ge(new Bo(69,"lineNumbersMinChars",5,1,300)),linkedEditing:Ge(new dn(70,"linkedEditing",!1,{description:y("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Ge(new dn(71,"links",!0,{description:y("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Ge(new jr(72,"matchBrackets","always",["always","near","never"],{description:y("matchBrackets","Highlight matching brackets.")})),minimap:Ge(new fDe),mouseStyle:Ge(new jr(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Ge(new cm(75,"mouseWheelScrollSensitivity",1,i=>i===0?1:i,{markdownDescription:y("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Ge(new dn(76,"mouseWheelZoom",!1,{markdownDescription:jt?y("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):y("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Ge(new dn(77,"multiCursorMergeOverlapping",!0,{description:y("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Ge(new AO(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],roi,{markdownEnumDescriptions:[y("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),y("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:y({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Ge(new jr(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[y("multiCursorPaste.spread","Each cursor pastes a single line of the text."),y("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:y("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Ge(new Bo(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:y("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Ge(new jr(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[y("occurrencesHighlight.off","Does not highlight occurrences."),y("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),y("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:y("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:Ge(new dn(82,"overviewRulerBorder",!0,{description:y("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Ge(new Bo(83,"overviewRulerLanes",3,0,3)),padding:Ge(new pDe),pasteAs:Ge(new RDe),parameterHints:Ge(new mDe),peekWidgetDefaultFocus:Ge(new jr(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[y("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),y("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:y("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:Ge(new bDe),definitionLinkOpensInPeek:Ge(new dn(89,"definitionLinkOpensInPeek",!1,{description:y("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Ge(new ADe),quickSuggestionsDelay:Ge(new Bo(91,"quickSuggestionsDelay",10,0,1073741824,{description:y("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Ge(new dn(92,"readOnly",!1)),readOnlyMessage:Ge(new wDe),renameOnType:Ge(new dn(94,"renameOnType",!1,{description:y("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:y("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Ge(new dn(95,"renderControlCharacters",!0,{description:y("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Ge(new jr(96,"renderFinalNewline",Cr?"dimmed":"on",["off","on","dimmed"],{description:y("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Ge(new jr(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",y("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:y("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Ge(new dn(98,"renderLineHighlightOnlyWhenFocus",!1,{description:y("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Ge(new jr(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Ge(new jr(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",y("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),y("renderWhitespace.selection","Render whitespace characters only on selected text."),y("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:y("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Ge(new Bo(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Ge(new dn(102,"roundedSelection",!0,{description:y("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Ge(new yDe),scrollbar:Ge(new xDe),scrollBeyondLastColumn:Ge(new Bo(105,"scrollBeyondLastColumn",4,0,1073741824,{description:y("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Ge(new dn(106,"scrollBeyondLastLine",!0,{description:y("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Ge(new dn(107,"scrollPredominantAxis",!0,{description:y("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Ge(new dn(108,"selectionClipboard",!0,{description:y("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Cr})),selectionHighlight:Ge(new dn(109,"selectionHighlight",!0,{description:y("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Ge(new dn(110,"selectOnLineNumbers",!0)),showFoldingControls:Ge(new jr(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[y("showFoldingControls.always","Always show the folding controls."),y("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),y("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:y("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Ge(new dn(112,"showUnused",!0,{description:y("showUnused","Controls fading out of unused code.")})),showDeprecated:Ge(new dn(141,"showDeprecated",!0,{description:y("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Ge(new uDe),snippetSuggestions:Ge(new jr(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[y("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),y("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),y("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),y("snippetSuggestions.none","Do not show snippet suggestions.")],description:y("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Ge(new kDe),smoothScrolling:Ge(new dn(115,"smoothScrolling",!1,{description:y("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Ge(new Bo(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Ge(new TDe),inlineSuggest:Ge(new _De),inlineEdit:Ge(new SDe),inlineCompletionsAccessibilityVerbose:Ge(new dn(150,"inlineCompletionsAccessibilityVerbose",!1,{description:y("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Ge(new Bo(120,"suggestFontSize",0,0,1e3,{markdownDescription:y("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Ge(new Bo(121,"suggestLineHeight",0,0,1e3,{markdownDescription:y("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Ge(new dn(122,"suggestOnTriggerCharacters",!0,{description:y("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Ge(new jr(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[y("suggestSelection.first","Always select the first suggestion."),y("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),y("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:y("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Ge(new jr(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[y("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),y("tabCompletion.off","Disable tab completions."),y("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:y("tabCompletion","Enables tab completions.")})),tabIndex:Ge(new Bo(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:Ge(new CDe),unusualLineTerminators:Ge(new jr(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[y("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),y("unusualLineTerminators.off","Unusual line terminators are ignored."),y("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:y("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Ge(new dn(128,"useShadowDOM",!0)),useTabStops:Ge(new dn(129,"useTabStops",!0,{description:y("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:Ge(new jr(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[y("wordBreak.normal","Use the default line break rule."),y("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:y("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:Ge(new IDe),wordSeparators:Ge(new yd(132,"wordSeparators",bO,{description:y("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Ge(new jr(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[y("wordWrap.off","Lines will never wrap."),y("wordWrap.on","Lines will wrap at the viewport width."),y({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),y({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:y({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Ge(new yd(134,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Ge(new yd(135,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Ge(new Bo(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:y({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Ge(new jr(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Ge(new jr(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Ge(new $Ee),defaultColorDecorators:Ge(new dn(148,"defaultColorDecorators",!1,{markdownDescription:y("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Ge(new gDe),tabFocusMode:Ge(new dn(145,"tabFocusMode",!1,{markdownDescription:y("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Ge(new iV),wrappingInfo:Ge(new NDe),wrappingIndent:Ge(new LDe),wrappingStrategy:Ge(new aDe)}});function uoi(i,e,t,n,o){return new FDe(i,e,t,n,o)}function doi(i,e,t,n,o){return new Tee(i,e,t,n,o)}function kee(i,e,t){let n=e.textContent.length,o=-1;for(;e;)e=e.previousSibling,o++;return i.getColumn(new Qz(o,t),n)}var coi,CO,nV,LA,xO,Tee,FDe,Ust,Iee=D(()=>{Kh();tl();wi();Cst();cO();HI();JS();Jb();ea();coi=(function(){return Bh?!0:!(Cr||yl||Zf)})(),CO=!0,nV=class{constructor(e,t){this.themeType=t;let n=e.options,o=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(100):this.renderWhitespace="none",this.renderControlCharacters=n.get(95),this.spaceWidth=o.spaceWidth,this.middotWidth=o.middotWidth,this.wsmiddotWidth=o.wsmiddotWidth,this.useMonospaceOptimizations=o.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=o.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(67),this.stopRenderingLineAfter=n.get(118),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}},LA=class i{static{this.CLASS_NAME="view-line"}constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=Ai(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return ju(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,o,r){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;let s=o.getViewLineRenderingData(e),a=this._options,l=ou.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn),c=null;if(ju(a.themeType)||this._options.renderWhitespace==="selection"){let f=o.selections;for(let p of f){if(p.endLineNumbere)continue;let g=p.startLineNumber===e?p.startColumn:s.minColumn,A=p.endLineNumber===e?p.endColumn:s.maxColumn;g');let d=Sx(u,r);r.appendString("");let h=null;return CO&&coi&&s.isBasicASCII&&a.useMonospaceOptimizations&&d.containsForeignElements===0&&(h=new xO(this._renderedViewLine?this._renderedViewLine.domNode:null,u,d.characterMapping)),h||(h=Ust(this._renderedViewLine?this._renderedViewLine.domNode:null,u,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t,n){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(n))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof xO:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof xO?this._renderedViewLine.monospaceAssumptionsAreValid():CO}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof xO&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,o){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));let r=this._renderedViewLine.input.stopRenderingLineAfter;if(r!==-1&&t>r+1&&n>r+1)return new jz(!0,[new kA(this.getWidth(o),0)]);r!==-1&&t>r+1&&(t=r+1),r!==-1&&n>r+1&&(n=r+1);let s=this._renderedViewLine.getVisibleRangesForRange(e,t,n,o);return s&&s.length>0?new jz(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}},xO=class{constructor(e,t,n){this._cachedWidth=-1,this.domNode=e,this.input=t;let o=Math.floor(t.lineContent.length/300);if(o>0){this._keyColumnPixelOffsetCache=new Float32Array(o);for(let r=0;r=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),CO=!1)}return CO}toSlowRenderedLine(){return Ust(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,o){let r=this._getColumnPixelOffset(e,t,o),s=this._getColumnPixelOffset(e,n,o);return[new kA(r,s-r)]}_getColumnPixelOffset(e,t,n){if(t<=300){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let o=Math.floor((t-1)/300)-1,r=(o+1)*300+1,s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[o],s===-1&&(s=this._actualReadPixelOffset(e,r,n),this._keyColumnPixelOffsetCache[o]=s)),s===-1){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let a=this._characterMapping.getHorizontalOffset(r),l=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,n){if(!this.domNode)return-1;let o=this._characterMapping.getDomPosition(t),r=VI.readHorizontalRanges(this._getReadingTarget(this.domNode),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);return!r||r.length===0?-1:r[0].left}getColumnOfNodeOffset(e,t){return kee(this._characterMapping,e,t)}},Tee=class{constructor(e,t,n,o,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!o||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let s=0,a=this._characterMapping.length;s<=a;s++)this._pixelOffsetCache[s]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,o){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){let r=this._readPixelOffset(this.domNode,e,t,o);if(r===-1)return null;let s=this._readPixelOffset(this.domNode,e,n,o);return s===-1?null:[new kA(r,s-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,o)}_readVisibleRangesForRange(e,t,n,o,r){if(n===o){let s=this._readPixelOffset(e,t,n,r);return s===-1?null:[new kA(s,0)]}else return this._readRawVisibleRangesForRange(e,n,o,r)}_readPixelOffset(e,t,n,o){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(o);let r=this._getReadingTarget(e);return r.firstChild?(o.markDidDomLayout(),r.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){let r=this._pixelOffsetCache[n];if(r!==-1)return r;let s=this._actualReadPixelOffset(e,t,n,o);return this._pixelOffsetCache[n]=s,s}return this._actualReadPixelOffset(e,t,n,o)}_actualReadPixelOffset(e,t,n,o){if(this._characterMapping.length===0){let l=VI.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,o);return!l||l.length===0?-1:l[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(o);let r=this._characterMapping.getDomPosition(n),s=VI.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,r.partIndex,r.charIndex,o);if(!s||s.length===0)return-1;let a=s[0].left;if(this.input.isBasicASCII){let l=this._characterMapping.getHorizontalOffset(n),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,n,o){if(t===1&&n===this._characterMapping.length)return[new kA(0,this.getWidth(o))];let r=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(n);return VI.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,s.partIndex,s.charIndex,o)}getColumnOfNodeOffset(e,t){return kee(this._characterMapping,e,t)}},FDe=class extends Tee{_readVisibleRangesForRange(e,t,n,o,r){let s=super._readVisibleRangesForRange(e,t,n,o,r);if(!s||s.length===0||n===o||n===1&&o===this._characterMapping.length)return s;if(!this.input.containsRTL){let a=this._readPixelOffset(e,t,o,r);if(a!==-1){let l=s[s.length-1];l.left{Rt();or=class i{static _nextVisibleColumn(e,t,n){return e===9?i.nextRenderTabStop(t,n):Ag(e)||Ez(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){let o=Math.min(t-1,e.length),r=e.substring(0,o),s=new _I(r),a=0;for(;!s.eol();){let l=WF(r,o,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,n)}return a}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;let o=e.length,r=new _I(e),s=0,a=1;for(;!r.eol();){let l=WF(e,o,r.offset);r.nextGraphemeLength();let c=this._nextVisibleColumn(l,s,n),u=r.offset+1;if(c>=t){let d=t-s;return c-t{Zb();qI=class i{static whitespaceVisibleColumn(e,t,n){let o=e.length,r=0,s=-1,a=-1;for(let l=0;lKI,MouseTarget:()=>Yl,MouseTargetFactory:()=>JI,PointerHandlerLastRenderData:()=>oV});function PDe(i){return{isAfterLines:!1,horizontalDistanceToText:i}}function hoi(i,e,t){let n=document.createRange(),o=i.elementFromPoint(e,t);if(o!==null){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;let r=o.getBoundingClientRect(),s=rt(o),a=s.getComputedStyle(o,null).getPropertyValue("font-style"),l=s.getComputedStyle(o,null).getPropertyValue("font-variant"),c=s.getComputedStyle(o,null).getPropertyValue("font-weight"),u=s.getComputedStyle(o,null).getPropertyValue("font-size"),d=s.getComputedStyle(o,null).getPropertyValue("line-height"),h=s.getComputedStyle(o,null).getPropertyValue("font-family"),f=`${a} ${l} ${c} ${u}/${d} ${h}`,p=o.innerText,g=r.left,A=0,v;if(e>r.left+r.width)A=p.length;else{let w=VDe.getInstance();for(let C=0;C{sO();bd();Iee();kt();Ue();Zb();Ye();ODe();CA();xy=class{constructor(e=null){this.hitTarget=e,this.type=0}},Lee=class{get hitTarget(){return this.spanNode}constructor(e,t,n){this.position=e,this.spanNode=t,this.injectedText=n,this.type=1}};(function(i){function e(t,n,o){let r=t.getPositionFromDOMInfo(n,o);return r?new Lee(r,n,null):new xy(n)}i.createFromDOMInfo=e})(YI||(YI={}));oV=class{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}},Yl=class{static _deduceRage(e,t=null){return!t&&e?new R(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,n){return{type:0,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,n,o,r,s){return{type:e,element:t,mouseColumn:n,position:o,range:r,detail:s}}static createViewZone(e,t,n,o,r){return{type:e,element:t,mouseColumn:n,position:o,range:this._deduceRage(o),detail:r}}static createContentText(e,t,n,o,r){return{type:6,element:e,mouseColumn:t,position:n,range:this._deduceRage(n,o),detail:r}}static createContentEmpty(e,t,n,o){return{type:7,element:e,mouseColumn:t,position:n,range:this._deduceRage(n),detail:o}}static createContentWidget(e,t,n){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createScrollbar(e,t,n){return{type:11,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createOverlayWidget(e,t,n){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createOutsideEditor(e,t,n,o){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:n,outsideDistance:o}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}},Qu=class{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}},KI=class i{constructor(e,t,n){this.viewModel=e.viewModel;let o=e.configuration.options;this.layoutInfo=o.get(146),this.viewDomNode=t.viewDomNode,this.lineHeight=o.get(67),this.stickyTabStops=o.get(117),this.typicalHalfwidthCharacterWidth=o.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return i.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){let o=n.verticalOffset+n.height/2,r=e.viewModel.getLineCount(),s=null,a,l=null;return n.afterLineNumber!==r&&(l=new J(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new J(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),l===null?a=s:s===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,JI._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}},zDe=class extends BDe{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=_c.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,n,o,r){super(e,t,n,o),this.hitTestResult=new $s(()=>JI.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=r;let s=!!this._eventTarget;this._useHitTestTarget=!s}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;let a=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(a<=r&&r<=a+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){let o=t.isInContentArea?8:5;return t.fulfillViewZone(o,n.position,n)}return null}static _hitTestTextArea(e,t){return Qu.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),o=n.range.getStartPosition(),r=Math.abs(t.relativePos.x),s={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};if(r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth){let a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return s.glyphMarginLane=l[Math.floor(r/e.lineHeight)],t.fulfillMargin(2,o,n.range,s)}return r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,o,n.range,s):(r-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,o,n.range,s))}return null}static _hitTestViewLines(e,t){if(!Qu.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new J(1,1),jst);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let o=e.viewModel.getLineCount(),r=e.viewModel.getLineMaxColumn(o);return t.fulfillContentEmpty(new J(o,r),jst)}if(Qu.isStrictChildOfViewLines(t.targetPath)){let o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(o)===0){let s=e.getLineWidth(o),a=PDe(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(new J(o,1),a)}let r=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>=r){let s=PDe(t.mouseContentHorizontalOffset-r),a=new J(o,e.viewModel.getLineMaxColumn(o));return t.fulfillContentEmpty(a,s)}}let n=t.hitTestResult.value;return n.type===1?i.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(Qu.isChildOfMinimap(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new J(n,o))}return null}static _hitTestScrollbarSlider(e,t){if(Qu.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){let n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){let o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(o);return t.fulfillScrollbar(new J(o,r))}}return null}static _hitTestScrollbar(e,t){if(Qu.isChildOfScrollableElement(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new J(n,o))}return null}getMouseColumn(e){let t=this._context.configuration.options,n=t.get(146),o=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return i._getMouseColumn(o,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,o,r){let s=o.lineNumber,a=o.column,l=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>l){let v=PDe(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(o,v)}let c=e.visibleRangeForPosition(s,a);if(!c)return t.fulfillUnknown(o);let u=c.left;if(Math.abs(t.mouseContentHorizontalOffset-u)<1)return t.fulfillContentText(o,null,{mightBeForeignElement:!!r,injectedText:r});let d=[];if(d.push({offset:c.left,column:a}),a>1){let v=e.visibleRangeForPosition(s,a-1);v&&d.push({offset:v.left,column:a-1})}let h=e.viewModel.getLineMaxColumn(s);if(av.offset-w.offset);let f=t.pos.toClientCoordinates(rt(e.viewDomNode)),p=n.getBoundingClientRect(),g=p.left<=f.clientX&&f.clientX<=p.right,A=null;for(let v=1;vr)){let a=Math.floor((o+r)/2),l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);let c=new KS(t.pos.x,l),u=this._actualDoHitTestWithCaretRangeFromPoint(e,c.toClientCoordinates(rt(e.viewDomNode)));if(u.type===1)return u}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(rt(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let n=SA(e.viewDomNode),o;if(n?typeof n.caretRangeFromPoint>"u"?o=hoi(n,t.clientX,t.clientY):o=n.caretRangeFromPoint(t.clientX,t.clientY):o=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!o||!o.startContainer)return new xy;let r=o.startContainer;if(r.nodeType===r.TEXT_NODE){let s=r.parentNode,a=s?s.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===LA.CLASS_NAME?YI.createFromDOMInfo(e,s,o.startOffset):new xy(r.parentNode)}else if(r.nodeType===r.ELEMENT_NODE){let s=r.parentNode,a=s?s.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===LA.CLASS_NAME?YI.createFromDOMInfo(e,r,r.textContent.length):new xy(r)}return new xy}static _doHitTestWithCaretPositionFromPoint(e,t){let n=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){let o=n.offsetNode.parentNode,r=o?o.parentNode:null,s=r?r.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===LA.CLASS_NAME?YI.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new xy(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){let o=n.offsetNode.parentNode,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null,s=o?o.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(r===LA.CLASS_NAME){let l=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(l)return YI.createFromDOMInfo(e,l,0)}else if(a===LA.CLASS_NAME)return YI.createFromDOMInfo(e,n.offsetNode,0)}return new xy(n.offsetNode)}static _snapToSoftTabBoundary(e,t){let n=t.getLineContent(e.lineNumber),{tabSize:o}=t.model.getOptions(),r=qI.atomicPosition(n,e.column-1,o,2);return r!==-1?new J(e.lineNumber,r+1):e}static doHitTest(e,t){let n=new xy;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(rt(e.viewDomNode)))),n.type===1){let o=e.viewModel.getInjectedTextAt(n.position),r=e.viewModel.normalizePosition(n.position,2);(o||!r.equals(n.position))&&(n=new Lee(r,n.spanNode,o))}return n}};VDe=class i{static{this._INSTANCE=null}static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let n=e+t;if(this._cache[n])return this._cache[n];let o=this._canvas.getContext("2d");o.font=t;let s=o.measureText(e).width;return this._cache[n]=s,s}}});var Gst=D(()=>{});var HDe,WDe,UDe,nE,Mee=D(()=>{Ye();et();de();HDe=class extends H{constructor(e){super(),this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}},WDe=class extends H{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);let t=this._register(new HDe(e));this._register(t.onDidChange(()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)}))}_getPixelRatio(e){let t=document.createElement("canvas").getContext("2d"),n=e.devicePixelRatio||1,o=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/o}},UDe=class{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){let t=jF(e),n=this.mapWindowIdToPixelRatioMonitor.get(t);return n||(n=U_(new WDe(e)),this.mapWindowIdToPixelRatioMonitor.set(t,n),U_(Ee.once(uot)(({vscodeWindowId:o})=>{o===t&&(n?.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))}))),n}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}},nE=new UDe});function vr(i,e){i instanceof Uz?(i.setFontFamily(e.getMassagedFontFamily()),i.setFontWeight(e.fontWeight),i.setFontSize(e.fontSize),i.setFontFeatureSettings(e.fontFeatureSettings),i.setFontVariationSettings(e.fontVariationSettings),i.setLineHeight(e.lineHeight),i.setLetterSpacing(e.letterSpacing)):(i.style.fontFamily=e.getMassagedFontFamily(),i.style.fontWeight=e.fontWeight,i.style.fontSize=e.fontSize+"px",i.style.fontFeatureSettings=e.fontFeatureSettings,i.style.fontVariationSettings=e.fontVariationSettings,i.style.lineHeight=e.lineHeight+"px",i.style.letterSpacing=e.letterSpacing+"px")}var um=D(()=>{tl()});function qst(i,e,t){new jDe(e,t).read(i)}var Ree,jDe,Yst=D(()=>{um();Ree=class{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}},jDe=class i{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";let t=document.createElement("div");vr(t,this._bareFontInfo),e.appendChild(t);let n=document.createElement("div");vr(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);let o=document.createElement("div");vr(o,this._bareFontInfo),o.style.fontStyle="italic",e.appendChild(o);let r=[];for(let s of this._requests){let a;s.type===0&&(a=t),s.type===2&&(a=n),s.type===1&&(a=o),a.appendChild(document.createElement("br"));let l=document.createElement("span");i._render(l,s),a.appendChild(l),r.push(l)}this._container=e,this._testElements=r}static _render(e,t){if(t.chr===" "){let n="\xA0";for(let o=0;o<8;o++)n+=n;e.innerText=n}else{let n=t.chr;for(let o=0;o<8;o++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{et();wd=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new q,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(i){i=Math.min(Math.max(-5,i),20),this._zoomLevel!==i&&(this._zoomLevel=i,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}});var poi,QDe,XI,moi,ZI,Fee=D(()=>{wi();ea();_O();poi=jt?1.5:1.35,QDe=8,XI=class i{static createFromValidatedSettings(e,t,n){let o=e.get(49),r=e.get(53),s=e.get(52),a=e.get(51),l=e.get(54),c=e.get(67),u=e.get(64);return i._create(o,r,s,a,l,c,u,t,n)}static _create(e,t,n,o,r,s,a,l,c){s===0?s=poi*n:s{Ye();Mee();et();de();Yst();ea();Fee();GDe=class extends H{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){let t=jF(e),n=this._cache.get(t);return n||(n=new qDe,this._cache.set(t,n)),n}_writeToCache(e,t,n){this._ensureCache(e).put(t,n),!n.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=e.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){let t=this._ensureCache(e),n=t.getValues(),o=!1;for(let r of n)r.isTrusted||(o=!0,t.remove(r));o&&this._onDidChange.fire()}readFontInfo(e,t){let n=this._ensureCache(e);if(!n.has(t)){let o=this._actualReadFontInfo(e,t);(o.typicalHalfwidthCharacterWidth<=2||o.typicalFullwidthCharacterWidth<=2||o.spaceWidth<=2||o.maxDigitWidth<=2)&&(o=new ZI({pixelRatio:nE.getInstance(e).value,fontFamily:o.fontFamily,fontWeight:o.fontWeight,fontSize:o.fontSize,fontFeatureSettings:o.fontFeatureSettings,fontVariationSettings:o.fontVariationSettings,lineHeight:o.lineHeight,letterSpacing:o.letterSpacing,isMonospace:o.isMonospace,typicalHalfwidthCharacterWidth:Math.max(o.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(o.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:o.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(o.spaceWidth,5),middotWidth:Math.max(o.middotWidth,5),wsmiddotWidth:Math.max(o.wsmiddotWidth,5),maxDigitWidth:Math.max(o.maxDigitWidth,5)},!1)),this._writeToCache(e,t,o)}return n.get(t)}_createRequest(e,t,n,o){let r=new Ree(e,t);return n.push(r),o?.push(r),r}_actualReadFontInfo(e,t){let n=[],o=[],r=this._createRequest("n",0,n,o),s=this._createRequest("\uFF4D",0,n,null),a=this._createRequest(" ",0,n,o),l=this._createRequest("0",0,n,o),c=this._createRequest("1",0,n,o),u=this._createRequest("2",0,n,o),d=this._createRequest("3",0,n,o),h=this._createRequest("4",0,n,o),f=this._createRequest("5",0,n,o),p=this._createRequest("6",0,n,o),g=this._createRequest("7",0,n,o),A=this._createRequest("8",0,n,o),v=this._createRequest("9",0,n,o),w=this._createRequest("\u2192",0,n,o),C=this._createRequest("\uFFEB",0,n,null),_=this._createRequest("\xB7",0,n,o),E=this._createRequest("\u2E31",0,n,null),I="|/-_ilm%";for(let z=0,Q=I.length;z.001){N=!1;break}}let B=!0;return N&&C.width!==L&&(B=!1),C.width>w.width&&(B=!1),new ZI({pixelRatio:nE.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:N,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:B,spaceWidth:a.width,middotWidth:_.width,wsmiddotWidth:E.width,maxDigitWidth:T},!0)}},qDe=class{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){let t=e.getId();return!!this._values[t]}get(e){let t=e.getId();return this._values[t]}put(e,t){let n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){let t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}},rV=new GDe});function goi(i,e,t){e[$b.DI_TARGET]===e?e[$b.DI_DEPENDENCIES].push({id:i,index:t}):(e[$b.DI_DEPENDENCIES]=[{id:i,index:t}],e[$b.DI_TARGET]=e)}function At(i){if($b.serviceIds.has(i))return $b.serviceIds.get(i);let e=function(t,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");goi(e,t,o)};return e.toString=()=>i,$b.serviceIds.set(i,e),e}var $b,Re,ht=D(()=>{(function(i){i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=e})($b||($b={}));Re=At("instantiationService")});var ei,hs=D(()=>{ht();ei=At("codeEditorService")});var an,su=D(()=>{ht();an=At("modelService")});var Ss,dm=D(()=>{ht();Ss=At("textModelService")});function Cy(i){return{id:i.id,label:i.label,tooltip:i.tooltip??i.label,class:i.class,enabled:i.enabled??!0,checked:i.checked,run:async(...e)=>i.run(...e)}}var ta,op,yr,Tg,Oee,il=D(()=>{et();de();Be();ta=class extends H{constructor(e,t="",n="",o=!0,r){super(),this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=o,this._actionCallback=r}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}},op=class extends H{constructor(){super(...arguments),this._onWillRun=this._register(new q),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new q),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{await this.runAction(e,t)}catch(o){n=o}this._onDidRun.fire({action:e,error:n})}async runAction(e,t){await e.run(t)}},yr=class i{constructor(){this.id=i.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(let n of e)n.length&&(t.length?t=[...t,new i,...n]:t=n);return t}static{this.ID="vs.actions.separator"}async run(){}},Tg=class{get actions(){return this._actions}constructor(e,t,n,o){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=o,this._actions=n}async run(){}},Oee=class i extends ta{static{this.ID="vs.actions.empty"}constructor(){super(i.ID,y("submenu.empty","(empty)"),void 0,!1)}}});var KDe,ut,ko=D(()=>{oo();(function(i){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}i.isThemeColor=e})(KDe||(KDe={}));(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9-]+",i.iconModifierExpression="~[A-Za-z]+",i.iconNameCharacter="[A-Za-z0-9~-]";let e=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function t(h){let f=e.exec(h.id);if(!f)return t(De.error);let[,p,g]=f,A=["codicon","codicon-"+p];return g&&A.push("codicon-modifier-"+g.substring(1)),A}i.asClassNameArray=t;function n(h){return t(h).join(" ")}i.asClassName=n;function o(h){return"."+t(h).join(".")}i.asCSSSelector=o;function r(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||KDe.isThemeColor(h.color))}i.isThemeIcon=r;let s=new RegExp(`^\\$\\((${i.iconNameExpression}(?:${i.iconModifierExpression})?)\\)$`);function a(h){let f=s.exec(h);if(!f)return;let[,p]=f;return{id:p}}i.fromString=a;function l(h){return{id:h}}i.fromId=l;function c(h,f){let p=h.id,g=p.lastIndexOf("~");return g!==-1&&(p=p.substring(0,g)),f&&(p=`${p}~${f}`),{id:p}}i.modify=c;function u(h){let f=h.id.lastIndexOf("~");if(f!==-1)return h.id.substring(f+1)}i.getModifier=u;function d(h,f){return h.id===f.id&&h.color?.id===f.color?.id}i.isEqual=d})(ut||(ut={}))});var Ii,ii,to=D(()=>{et();ld();de();Pp();gn();ht();Ii=At("commandService"),ii=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new q,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,e){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:i,handler:e})}if(i.metadata&&Array.isArray(i.metadata.args)){let s=[];for(let l of i.metadata.args)s.push(l.constraint);let a=i.handler;i.handler=function(l,...c){return wYe(c,s),a(l,...c)}}let{id:t}=i,n=this._commands.get(t);n||(n=new Br,this._commands.set(t,n));let o=n.unshift(i),r=He(()=>{o(),this._commands.get(t)?.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),r}registerCommandAlias(i,e){return ii.registerCommand(i,(t,...n)=>t.get(Ii).executeCommand(e,...n))}getCommand(i){let e=this._commands.get(i);if(!(!e||e.isEmpty()))return hi.first(e)}getCommands(){let i=new Map;for(let e of this._commands.keys()){let t=this.getCommand(e);t&&i.set(e,t)}return i}};ii.registerCommand("noop",()=>{})});function JDe(...i){switch(i.length){case 1:return y("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",i[0]);case 2:return y("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",i[0],i[1]);case 3:return y("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",i[0],i[1],i[2]);default:return}}var boi,Aoi,oE,Kst=D(()=>{Tt();Be();boi=y("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),Aoi=y("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'."),oE=class i{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw fR(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(e=>e.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){let t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){let t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(JDe("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(JDe("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(JDe("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){let t=this._start,n=this._input.substring(this._start,this._current),o={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(o)}_string(){this.stringRe.lastIndex=this._start;let e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;let t=this._input.substring(this._start,this._current),n=i._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(boi);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(Aoi);return}let r=this._input.charCodeAt(e);if(t)t=!1;else if(r===47&&!n){e++;break}else r===91?n=!0:r===92?t=!0:r===93&&(n=!1);e++}for(;e=this._input.length}}});function $st(i,e){let t=i?i.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function sV(i,e){return i.cmp(e)}function Gee(i,e){if(typeof i=="string"){let t=parseFloat(i);isNaN(t)||(i=t)}return typeof i=="string"||typeof i=="number"?e(i):ah.INSTANCE}function eat(i){let e=null;for(let t=0,n=i.length;te?1:0}function iL(i,e,t,n){return it?1:en?1:0}function Qee(i,e){if(i.type===0||e.type===1)return!0;if(i.type===9)return e.type===9?Xst(i.expr,e.expr):!1;if(e.type===9){for(let t of e.expr)if(Qee(i,t))return!0;return!1}if(i.type===6){if(e.type===6)return Xst(e.expr,i.expr);for(let t of i.expr)if(Qee(t,e))return!0;return!1}return i.equals(e)}function Xst(i,e){let t=0,n=0;for(;t{wi();Rt();Kst();ht();Be();Gu=new Map;Gu.set("false",!1);Gu.set("true",!0);Gu.set("isMac",jt);Gu.set("isLinux",Cr);Gu.set("isWindows",Fo);Gu.set("isWeb",Cb);Gu.set("isMacNative",jt&&!Cb);Gu.set("isEdge",aYe);Gu.set("isFirefox",rYe);Gu.set("isChrome",D1e);Gu.set("isSafari",sYe);voi=Object.prototype.hasOwnProperty,yoi={regexParsingWithErrorRecovery:!0},woi=y("contextkey.parser.error.emptyString","Empty context key expression"),xoi=y("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),Coi=y("contextkey.parser.error.noInAfterNot","'in' after 'not'."),Jst=y("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),_oi=y("contextkey.parser.error.unexpectedToken","Unexpected token"),Soi=y("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),Eoi=y("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),Doi=y("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?"),XDe=class i{static{this._parseError=new Error}constructor(e=yoi){this._config=e,this._scanner=new oE,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:woi,offset:0,lexeme:"",additionalInfo:xoi});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{let t=this._expr();if(!this._isAtEnd()){let n=this._peek(),o=n.type===17?Soi:void 0;throw this._parsingErrors.push({message:_oi,offset:n.offset,lexeme:oE.getLexeme(n),additionalInfo:o}),i._parseError}return t}catch(t){if(t!==i._parseError)throw t;return}}_expr(){return this._or()}_or(){let e=[this._and()];for(;this._matchOne(16);){let t=this._and();e.push(t)}return e.length===1?e[0]:ge.or(...e)}_and(){let e=[this._term()];for(;this._matchOne(15);){let t=this._term();e.push(t)}return e.length===1?e[0]:ge.and(...e)}_term(){if(this._matchOne(2)){let e=this._peek();switch(e.type){case 11:return this._advance(),ah.INSTANCE;case 12:return this._advance(),rf.INSTANCE;case 0:{this._advance();let t=this._expr();return this._consume(1,Jst),t?.negate()}case 17:return this._advance(),tL.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){let e=this._peek();switch(e.type){case 11:return this._advance(),ge.true();case 12:return this._advance(),ge.false();case 0:{this._advance();let t=this._expr();return this._consume(1,Jst),t}case 17:{let t=e.lexeme;if(this._advance(),this._matchOne(9)){let o=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),o.type!==10)throw this._errExpectedButGot("REGEX",o);let r=o.lexeme,s=r.lastIndexOf("/"),a=s===r.length-1?void 0:this._removeFlagsGY(r.substring(s+1)),l;try{l=new RegExp(r.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",o)}return aV.create(t,l)}switch(o.type){case 10:case 19:{let r=[o.lexeme];this._advance();let s=this._peek(),a=0;for(let h=0;h=0){let c=r.slice(a+1,l),u=r[l+1]==="i"?"i":"";try{s=new RegExp(c,u)}catch{throw this._errExpectedButGot("REGEX",o)}}}if(s===null)throw this._errExpectedButGot("REGEX",o);return aV.create(t,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Coi);let o=this._value();return ge.notIn(t,o)}switch(this._peek().type){case 3:{this._advance();let o=this._value();if(this._previous().type===18)return ge.equals(t,o);switch(o){case"true":return ge.has(t);case"false":return ge.not(t);default:return ge.equals(t,o)}}case 4:{this._advance();let o=this._value();if(this._previous().type===18)return ge.notEquals(t,o);switch(o){case"true":return ge.not(t);case"false":return ge.has(t);default:return ge.notEquals(t,o)}}case 5:return this._advance(),Wee.create(t,this._value());case 6:return this._advance(),Uee.create(t,this._value());case 7:return this._advance(),Vee.create(t,this._value());case 8:return this._advance(),Hee.create(t,this._value());case 13:return this._advance(),ge.in(t,this._value());default:return ge.has(t)}}case 20:throw this._parsingErrors.push({message:Eoi,offset:e.offset,lexeme:"",additionalInfo:Doi}),i._parseError;default:throw this._errExpectedButGot(`true | false | KEY | KEY '=~' REGEX - | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){let e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){let r=y("contextkey.parser.error.expectedButGot",`Expected: {0} -Received: '{1}'.`,e,RS.getLexeme(t)),o=t.offset,s=RS.getLexeme(t);return this._parsingErrors.push({message:r,offset:o,lexeme:s,additionalInfo:n}),i._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},me=class{static false(){return $d.INSTANCE}static true(){return Gh.INSTANCE}static has(e){return AI.create(e)}static equals(e,t){return yI.create(e,t)}static notEquals(e,t){return b$.create(e,t)}static regex(e,t){return k7.create(e,t)}static in(e,t){return m$.create(e,t)}static notIn(e,t){return g$.create(e,t)}static not(e){return wI.create(e)}static and(...e){return x$.create(e,null,!0)}static or(...e){return I7.create(e,null,!0)}static{this._parser=new TDe({regexParsingWithErrorRecovery:!1})}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};$d=class i{static{this.INSTANCE=new i}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Gh.INSTANCE}},Gh=class i{static{this.INSTANCE=new i}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return $d.INSTANCE}},AI=class i{static create(e,t=null){let n=Vu.get(e);return typeof n=="boolean"?n?Gh.INSTANCE:$d.INSTANCE:new i(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:Ylt(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Vu.get(this.key);return typeof e=="boolean"?e?Gh.INSTANCE:$d.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=wI.create(this.key,this)),this.negated}},yI=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?AI.create(e,n):wI.create(e,n);let r=Vu.get(e);return typeof r=="boolean"?t===(r?"true":"false")?Gh.INSTANCE:$d.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){let e=Vu.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?Gh.INSTANCE:$d.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b$.create(this.key,this.value,this)),this.negated}},m$=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):typeof n=="string"&&typeof t=="object"&&t!==null?Spi.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=g$.create(this.key,this.valueKey)),this.negated}},g$=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=m$.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}},b$=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?wI.create(e,n):AI.create(e,n);let r=Vu.get(e);return typeof r=="boolean"?t===(r?"true":"false")?$d.INSTANCE:Gh.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){let e=Vu.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?$d.INSTANCE:Gh.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=yI.create(this.key,this.value,this)),this.negated}},wI=class i{static create(e,t=null){let n=Vu.get(e);return typeof n=="boolean"?n?$d.INSTANCE:Gh.INSTANCE:new i(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:Ylt(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Vu.get(this.key);return typeof e=="boolean"?e?$d.INSTANCE:Gh.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=AI.create(this.key,this)),this.negated}};v$=class i{static create(e,t,n=null){return _$(t,r=>new i(e,r,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w$.create(this.key,this.value,this)),this.negated}},A$=class i{static create(e,t,n=null){return _$(t,r=>new i(e,r,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y$.create(this.key,this.value,this)),this.negated}},y$=class i{static create(e,t,n=null){return _$(t,r=>new i(e,r,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new i(e,r,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:xI(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v$.create(this.key,this.value,this)),this.negated}},k7=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){let e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=kDe.create(this)),this.negated}},kDe=class i{static create(e){return new i(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}};x$=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){let s=r[r.length-1];if(s.type!==9)break;r.pop();let a=r.pop(),l=r.length===0,c=I7.create(s.expr.map(u=>i.create([u,a],null,n)),null,l);c&&(r.push(c),r.sort(T7))}if(r.length===1)return r[0];if(n){for(let s=0;se.serialize()).join(" && ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());this.negated=I7.create(e,this,!0)}return this.negated}},I7=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize()).join(" || ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){let t=e.shift(),n=e.shift(),r=[];for(let o of Qlt(t))for(let s of Qlt(n))r.push(x$.create([o,s],null,!1));e.unshift(i.create(r,null,!1))}this.negated=i.create(e,this,!0)}return this.negated}},Pe=class i extends AI{static{this._info=[]}static all(){return i._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?i._info.push({...n,key:e}):n!==!0&&i._info.push({key:e,description:n,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return yI.create(this.key,e)}},Ze=vt("contextKeyService")});function Fpi(i,e){if(i.weight1!==e.weight1)return i.weight1-e.weight1;if(i.command&&e.command){if(i.commande.command)return 1}return i.weight2-e.weight2}var IDe,La,Rpi,nx=D(()=>{Wk();Si();Xn();sa();ae();Sp();IDe=class i{constructor(){this._coreKeybindings=new Ro,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Qa===1){if(e&&e.win)return e.win}else if(Qa===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){let t=i.bindToCurrentPlatform(e),n=new te;if(t&&t.primary){let r=F9(t.primary,Qa);r&&n.add(this._registerDefaultKeybinding(r,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let r=0,o=t.secondary.length;r{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(Fpi)),this._cachedMergedKeybindings.slice(0)}},La=new IDe,Rpi={EditorModes:"platform.keybindingsRegistry"};Gi.add(Rpi.EditorModes,La)});function FS(i){return i.command!==void 0}function Jlt(i){return i.submenu!==void 0}function Pn(i){let e=[],t=new i,{f1:n,menu:r,keybinding:o,...s}=t.desc;if(ci.getCommand(s.id))throw new Error(`Cannot register two commands with the same id: ${s.id}`);if(e.push(ci.registerCommand({id:s.id,handler:(a,...l)=>t.run(a,...l),metadata:s.metadata})),Array.isArray(r))for(let a of r)e.push(Zo.appendMenuItem(a.id,{command:{...s,precondition:a.precondition===null?void 0:s.precondition},...a}));else r&&e.push(Zo.appendMenuItem(r.id,{command:{...s,precondition:r.precondition===null?void 0:s.precondition},...r}));if(n&&(e.push(Zo.appendMenuItem(tt.CommandPalette,{command:s,when:s.precondition})),e.push(Zo.addCommand(s))),Array.isArray(o))for(let a of o)e.push(La.registerKeybindingRule({...a,id:s.id,when:s.precondition?me.and(s.precondition,a.when):a.when}));else o&&e.push(La.registerKeybindingRule({...o,id:s.id,when:s.precondition?me.and(s.precondition,o.when):o.when}));return{dispose(){Vi(e)}}}var Opi,Klt,S$,tt,el,CI,Zo,Hb,Ql,la,fr=D(()=>{$a();Dr();et();ae();Sp();Xn();Wt();ht();nx();Opi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Klt=function(i,e){return function(t,n){e(t,n,i)}};tt=class i{static{this._instances=new Map}static{this.CommandPalette=new i("CommandPalette")}static{this.DebugBreakpointsContext=new i("DebugBreakpointsContext")}static{this.DebugCallStackContext=new i("DebugCallStackContext")}static{this.DebugConsoleContext=new i("DebugConsoleContext")}static{this.DebugVariablesContext=new i("DebugVariablesContext")}static{this.NotebookVariablesContext=new i("NotebookVariablesContext")}static{this.DebugHoverContext=new i("DebugHoverContext")}static{this.DebugWatchContext=new i("DebugWatchContext")}static{this.DebugToolBar=new i("DebugToolBar")}static{this.DebugToolBarStop=new i("DebugToolBarStop")}static{this.DebugCallStackToolbar=new i("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new i("DebugCreateConfiguration")}static{this.EditorContext=new i("EditorContext")}static{this.SimpleEditorContext=new i("SimpleEditorContext")}static{this.EditorContent=new i("EditorContent")}static{this.EditorLineNumberContext=new i("EditorLineNumberContext")}static{this.EditorContextCopy=new i("EditorContextCopy")}static{this.EditorContextPeek=new i("EditorContextPeek")}static{this.EditorContextShare=new i("EditorContextShare")}static{this.EditorTitle=new i("EditorTitle")}static{this.EditorTitleRun=new i("EditorTitleRun")}static{this.EditorTitleContext=new i("EditorTitleContext")}static{this.EditorTitleContextShare=new i("EditorTitleContextShare")}static{this.EmptyEditorGroup=new i("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new i("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new i("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new i("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new i("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new i("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new i("ExplorerContext")}static{this.ExplorerContextShare=new i("ExplorerContextShare")}static{this.ExtensionContext=new i("ExtensionContext")}static{this.GlobalActivity=new i("GlobalActivity")}static{this.CommandCenter=new i("CommandCenter")}static{this.CommandCenterCenter=new i("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new i("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new i("LayoutControlMenu")}static{this.MenubarMainMenu=new i("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new i("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new i("MenubarDebugMenu")}static{this.MenubarEditMenu=new i("MenubarEditMenu")}static{this.MenubarCopy=new i("MenubarCopy")}static{this.MenubarFileMenu=new i("MenubarFileMenu")}static{this.MenubarGoMenu=new i("MenubarGoMenu")}static{this.MenubarHelpMenu=new i("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new i("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new i("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new i("PanelAlignmentMenu")}static{this.PanelPositionMenu=new i("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new i("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new i("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new i("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new i("MenubarSelectionMenu")}static{this.MenubarShare=new i("MenubarShare")}static{this.MenubarSwitchEditorMenu=new i("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new i("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new i("MenubarTerminalMenu")}static{this.MenubarViewMenu=new i("MenubarViewMenu")}static{this.MenubarHomeMenu=new i("MenubarHomeMenu")}static{this.OpenEditorsContext=new i("OpenEditorsContext")}static{this.OpenEditorsContextShare=new i("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new i("ProblemsPanelContext")}static{this.SCMInputBox=new i("SCMInputBox")}static{this.SCMChangesSeparator=new i("SCMChangesSeparator")}static{this.SCMChangesContext=new i("SCMChangesContext")}static{this.SCMIncomingChanges=new i("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new i("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new i("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new i("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new i("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new i("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new i("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new i("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new i("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new i("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new i("SCMChangeContext")}static{this.SCMResourceContext=new i("SCMResourceContext")}static{this.SCMResourceContextShare=new i("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new i("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new i("SCMResourceGroupContext")}static{this.SCMSourceControl=new i("SCMSourceControl")}static{this.SCMSourceControlInline=new i("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new i("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new i("SCMHistoryTitle")}static{this.SCMTitle=new i("SCMTitle")}static{this.SearchContext=new i("SearchContext")}static{this.SearchActionMenu=new i("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new i("StickyScrollContext")}static{this.TestItem=new i("TestItem")}static{this.TestItemGutter=new i("TestItemGutter")}static{this.TestProfilesContext=new i("TestProfilesContext")}static{this.TestMessageContext=new i("TestMessageContext")}static{this.TestMessageContent=new i("TestMessageContent")}static{this.TestPeekElement=new i("TestPeekElement")}static{this.TestPeekTitle=new i("TestPeekTitle")}static{this.TestCallStack=new i("TestCallStack")}static{this.TouchBarContext=new i("TouchBarContext")}static{this.TitleBarContext=new i("TitleBarContext")}static{this.TitleBarTitleContext=new i("TitleBarTitleContext")}static{this.TunnelContext=new i("TunnelContext")}static{this.TunnelPrivacy=new i("TunnelPrivacy")}static{this.TunnelProtocol=new i("TunnelProtocol")}static{this.TunnelPortInline=new i("TunnelInline")}static{this.TunnelTitle=new i("TunnelTitle")}static{this.TunnelLocalAddressInline=new i("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new i("TunnelOriginInline")}static{this.ViewItemContext=new i("ViewItemContext")}static{this.ViewContainerTitle=new i("ViewContainerTitle")}static{this.ViewContainerTitleContext=new i("ViewContainerTitleContext")}static{this.ViewTitle=new i("ViewTitle")}static{this.ViewTitleContext=new i("ViewTitleContext")}static{this.CommentEditorActions=new i("CommentEditorActions")}static{this.CommentThreadTitle=new i("CommentThreadTitle")}static{this.CommentThreadActions=new i("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new i("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new i("CommentThreadCommentContext")}static{this.CommentTitle=new i("CommentTitle")}static{this.CommentActions=new i("CommentActions")}static{this.CommentsViewThreadActions=new i("CommentsViewThreadActions")}static{this.InteractiveToolbar=new i("InteractiveToolbar")}static{this.InteractiveCellTitle=new i("InteractiveCellTitle")}static{this.InteractiveCellDelete=new i("InteractiveCellDelete")}static{this.InteractiveCellExecute=new i("InteractiveCellExecute")}static{this.InteractiveInputExecute=new i("InteractiveInputExecute")}static{this.InteractiveInputConfig=new i("InteractiveInputConfig")}static{this.ReplInputExecute=new i("ReplInputExecute")}static{this.IssueReporter=new i("IssueReporter")}static{this.NotebookToolbar=new i("NotebookToolbar")}static{this.NotebookStickyScrollContext=new i("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new i("NotebookCellTitle")}static{this.NotebookCellDelete=new i("NotebookCellDelete")}static{this.NotebookCellInsert=new i("NotebookCellInsert")}static{this.NotebookCellBetween=new i("NotebookCellBetween")}static{this.NotebookCellListTop=new i("NotebookCellTop")}static{this.NotebookCellExecute=new i("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new i("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new i("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new i("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new i("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new i("NotebookKernelSource")}static{this.BulkEditTitle=new i("BulkEditTitle")}static{this.BulkEditContext=new i("BulkEditContext")}static{this.TimelineItemContext=new i("TimelineItemContext")}static{this.TimelineTitle=new i("TimelineTitle")}static{this.TimelineTitleContext=new i("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new i("TimelineFilterSubMenu")}static{this.AccountsContext=new i("AccountsContext")}static{this.SidebarTitle=new i("SidebarTitle")}static{this.PanelTitle=new i("PanelTitle")}static{this.AuxiliaryBarTitle=new i("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new i("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new i("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new i("TerminalNewDropdownContext")}static{this.TerminalTabContext=new i("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new i("TerminalStickyScrollContext")}static{this.WebviewContext=new i("WebviewContext")}static{this.InlineCompletionsActions=new i("InlineCompletionsActions")}static{this.InlineEditsActions=new i("InlineEditsActions")}static{this.InlineEditActions=new i("InlineEditActions")}static{this.NewFile=new i("NewFile")}static{this.MergeInput1Toolbar=new i("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new i("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new i("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new i("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new i("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new i("InlineEditToolbar")}static{this.ChatContext=new i("ChatContext")}static{this.ChatCodeBlock=new i("ChatCodeblock")}static{this.ChatCompareBlock=new i("ChatCompareBlock")}static{this.ChatMessageTitle=new i("ChatMessageTitle")}static{this.ChatExecute=new i("ChatExecute")}static{this.ChatExecuteSecondary=new i("ChatExecuteSecondary")}static{this.ChatInputSide=new i("ChatInputSide")}static{this.AccessibleView=new i("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new i("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new i("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new i("DiffEditorSelectionToolbar")}constructor(e){if(i._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(e,this),this.id=e}},el=vt("menuService"),CI=class i{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new i(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let n of e)n instanceof i&&t.add(n.id);return t}constructor(e){this.id=e,this.has=t=>t===e}},Zo=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new nY({merge:CI.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(i){return this._commands.set(i.id,i),this._onDidChangeMenu.fire(CI.for(tt.CommandPalette)),Ve(()=>{this._commands.delete(i.id)&&this._onDidChangeMenu.fire(CI.for(tt.CommandPalette))})}getCommand(i){return this._commands.get(i)}getCommands(){let i=new Map;return this._commands.forEach((e,t)=>i.set(t,e)),i}appendMenuItem(i,e){let t=this._menuItems.get(i);t||(t=new Ro,this._menuItems.set(i,t));let n=t.push(e);return this._onDidChangeMenu.fire(CI.for(i)),Ve(()=>{n(),this._onDidChangeMenu.fire(CI.for(i))})}appendMenuItems(i){let e=new te;for(let{id:t,item:n}of i)e.add(this.appendMenuItem(t,n));return e}getMenuItems(i){let e;return this._menuItems.has(i)?e=[...this._menuItems.get(i)]:e=[],i===tt.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(i){let e=new Set;for(let t of i)FS(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||i.push({command:t})})}},Hb=class extends pg{constructor(e,t,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=t}},Ql=S$=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,n,r,o,s,a){this.hideActions=r,this.menuKeybinding=o,this._commandService=a,this.id=e.id,this.label=S$.label(e,n),this.tooltip=(typeof e.tooltip=="string"?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0;let l;if(e.toggled){let c=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),this.checked&&ut.isThemeIcon(c.icon)&&(l=c.icon),this.checked&&c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}l||(l=ut.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new S$(t,void 0,n,r,void 0,s,a):void 0,this._options=n,this.class=l&&ut.asClassName(l)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};Ql=S$=Opi([Klt(5,Ze),Klt(6,Oi)],Ql);la=class{constructor(e){this.desc=e}}});var io,eh=D(()=>{ht();io=vt("telemetryService")});function Ppi(i){switch(i){case Ac.Trace:return"trace";case Ac.Debug:return"debug";case Ac.Info:return"info";case Ac.Warning:return"warn";case Ac.Error:return"error";case Ac.Off:return"off"}}var no,Ac,Xlt,E$,D$,T$,aYi,th=D(()=>{et();ae();Wt();ht();no=vt("logService");(function(i){i[i.Off=0]="Off",i[i.Trace=1]="Trace",i[i.Debug=2]="Debug",i[i.Info=3]="Info",i[i.Warning=4]="Warning",i[i.Error=5]="Error"})(Ac||(Ac={}));Xlt=Ac.Info,E$=class extends W{constructor(){super(...arguments),this.level=Xlt,this._onDidChangeLogLevel=this._register(new G),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==Ac.Off&&this.level<=e}},D$=class extends E${constructor(e=Xlt,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(Ac.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(Ac.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(Ac.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(Ac.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(Ac.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}},T$=class extends E${constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(let t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(let n of this.loggers)n.trace(e,...t)}debug(e,...t){for(let n of this.loggers)n.debug(e,...t)}info(e,...t){for(let n of this.loggers)n.info(e,...t)}warn(e,...t){for(let n of this.loggers)n.warn(e,...t)}error(e,...t){for(let n of this.loggers)n.error(e,...t)}dispose(){for(let e of this.loggers)e.dispose();super.dispose()}};aYi=new Pe("logLevel",Ppi(Ac.Info))});function yc(i,e){ci.registerCommand(i,function(t,...n){let r=t.get(Ne),[o,s]=n;yi(Xe.isUri(o)),yi(K.isIPosition(s));let a=t.get(an).getModel(o);if(a){let l=K.lift(s);return r.invokeFunction(e,a,l,...n.slice(2))}return t.get(xs).createModelReference(o).then(l=>new Promise((c,u)=>{try{let d=r.invokeFunction(e,l.object.textEditorModel,K.lift(s),n.slice(2));c(d)}catch(d){u(d)}}).finally(()=>{l.dispose()}))})}function Qe(i){return mg.INSTANCE.registerEditorCommand(i),i}function xe(i){let e=new i;return mg.INSTANCE.registerEditorAction(e),e}function LDe(i){return mg.INSTANCE.registerEditorAction(i),i}function Zlt(i){mg.INSTANCE.registerEditorAction(i)}function Tt(i,e,t){mg.INSTANCE.registerEditorContribution(i,e,t)}function N7(i){return i.register(),i}var _I,rx,k$,Sr,Fe,L7,ih,sy,Bpi,mg,NDe,MDe,$lt,ii=D(()=>{Oe();mn();fs();Nt();Zc();Yp();fr();Xn();Wt();ht();nx();sa();eh();gn();th();Ye();_I=class{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(let t of e){let n=t.kbExpr;this.precondition&&(n?n=me.and(n,this.precondition):n=this.precondition);let r={id:this.id,weight:t.weight,args:t.args,when:n,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};La.registerKeybindingRule(r)}}ci.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){Zo.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}},rx=class extends _I{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n,r){return this._implementations.push({priority:e,name:t,implementation:n,when:r}),this._implementations.sort((o,s)=>s.priority-o.priority),{dispose:()=>{for(let o=0;o{if(a.get(Ze).contextMatchesRules(n??void 0))return r(a,s,t)})}runCommand(e,t){return i.runEditorCommand(e,t,this.precondition,(n,r,o)=>this.runEditorCommand(n,r,o))}},Fe=class i extends Sr{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(r){return r.menuId||(r.menuId=tt.EditorContext),r.title||(r.title=e.label),r.when=me.and(e.precondition,r.when),r}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(i.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(io).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}},L7=class extends Fe{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,r)=>r[0]-n[0]),{dispose:()=>{for(let n=0;n{let s=o.get(Ze),a=o.get(no);if(!s.contextMatchesRules(this.desc.precondition??void 0)){a.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize());return}return this.runEditorCommand(o,r,...t)})}};(function(i){function e(s){return mg.INSTANCE.getEditorCommand(s)}i.getEditorCommand=e;function t(){return mg.INSTANCE.getEditorActions()}i.getEditorActions=t;function n(){return mg.INSTANCE.getEditorContributions()}i.getEditorContributions=n;function r(s){return mg.INSTANCE.getEditorContributions().filter(a=>s.indexOf(a.id)>=0)}i.getSomeEditorContributions=r;function o(){return mg.INSTANCE.getDiffEditorContributions()}i.getDiffEditorContributions=o})(sy||(sy={}));Bpi={EditorCommonContributions:"editor.contributions"},mg=class i{static{this.INSTANCE=new i}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,n){this.editorContributions.push({id:e,ctor:t,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}};Gi.add(Bpi.EditorCommonContributions,mg.INSTANCE);NDe=N7(new rx({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:tt.MenubarEditMenu,group:"1_do",title:y({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:tt.CommandPalette,group:"",title:y("undo","Undo"),order:1}]}));N7(new k$(NDe,{id:"default:undo",precondition:void 0}));MDe=N7(new rx({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:tt.MenubarEditMenu,group:"1_do",title:y({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:tt.CommandPalette,group:"",title:y("redo","Redo"),order:1}]}));N7(new k$(MDe,{id:"default:redo",precondition:void 0}));$lt=N7(new rx({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:tt.MenubarSelectionMenu,group:"1_basic",title:y({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:tt.CommandPalette,group:"",title:y("selectAll","Select All"),order:1}]}))});function M7(i){cb&&(tct||(tct=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(i.message))}function ict(i){return i[0]==="o"&&i[1]==="n"&&ng(i.charCodeAt(2))}function nct(i){return/^onDynamic/.test(i)&&ng(i.charCodeAt(9))}var ect,zpi,tct,RDe,I$,FDe,ODe,PDe,BDe,L$,zDe=D(()=>{Lt();et();ae();bl();Si();Pt();ect="default",zpi="$initialize",tct=!1;RDe=class{constructor(e,t,n,r,o){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=o,this.type=0}},I$=class{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}},FDe=class{constructor(e,t,n,r,o){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=o,this.type=2}},ODe=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},PDe=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},BDe=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){let r=String(++this._lastSentReq);return new Promise((o,s)=>{this._pendingReplies[r]={resolve:o,reject:s},this._send(new RDe(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null,o=new G({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,o),this._send(new FDe(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new PDe(this._workerId,r)),r=null}});return o.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){let n={get:(r,o)=>(typeof o=="string"&&!r[o]&&(nct(o)?r[o]=s=>this.listen(e,o,s):ict(o)?r[o]=this.listen(e,o,void 0):o.charCodeAt(0)===36&&(r[o]=async(...s)=>(await t?.(),this.sendMessage(e,o,s)))),r[o])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(r=>{this._send(new I$(this._workerId,t,r,void 0))},r=>{r.detail instanceof Error&&(r.detail=ZAe(r.detail)),this._send(new I$(this._workerId,t,void 0,ZAe(r)))})}_handleSubscribeEventMessage(e){let t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(r=>{this._send(new ODe(this._workerId,t,r))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(o)},o=>{pt(o)})),this._protocol=new BDe({sendMessage:(o,s)=>{this._worker.postMessage(o,s)},handleMessage:(o,s,a)=>this._handleMessage(o,s,a),handleEvent:(o,s,a)=>this._handleEvent(o,s,a)}),this._protocol.setWorkerId(this._worker.getId());let n=null,r=globalThis.require;typeof r<"u"&&typeof r.getConfig=="function"?n=r.getConfig():typeof globalThis.requirejs<"u"&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(ect,zpi,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(ect,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(o=>{this._onError("Worker failed to load "+t.amdModuleId,o)})}_handleMessage(e,t,n){let r=this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if(typeof r[t]!="function")return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(r[t].apply(r,n))}catch(o){return Promise.reject(o)}}_handleEvent(e,t,n){let r=this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on main thread`);if(nct(t)){let o=r[t].call(r,n);if(typeof o!="function")throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return o}if(ict(t)){let o=r[t];if(typeof o!="function")throw new Error(`Missing event ${t} on main thread channel ${e}.`);return o}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}});function fd(i,e){let t=globalThis.MonacoEnvironment;if(t?.createTrustedTypesPolicy)try{return t.createTrustedTypesPolicy(i,e)}catch(n){pt(n);return}try{return globalThis.trustedTypes?.createPolicy(i,e)}catch(n){pt(n);return}}var ay=D(()=>{Lt()});function Vpi(i,e){let t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",e);if(typeof t.getWorkerUrl=="function"){let n=t.getWorkerUrl("workerMain.js",e);return new Worker(MF?MF.createScriptURL(n):n,{name:e,type:SI?"module":void 0})}}if(i){let n=Hpi(e,i.toString(!0)),r=new Worker(MF?MF.createScriptURL(n):n,{name:e,type:SI?"module":void 0});return SI?Wpi(r):r}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function Hpi(i,e,t){let n=/^((http:)|(https:)|(file:)|(vscode-file:))/.test(e);if(!(n&&e.substring(0,globalThis.origin.length)!==globalThis.origin)){let o=e.lastIndexOf("?"),s=e.lastIndexOf("#",o),a=o>0?new URLSearchParams(e.substring(o+1,~s?s:void 0)):new URLSearchParams;sZ.addSearchParam(a,!0,!0),a.toString()?e=`${e}?${a.toString()}#${i}`:e=`${e}#${i}`}!SI&&!n&&(e=new URL(e,globalThis.origin).toString());let r=new Blob([yl([`/*${i}*/`,t?`globalThis.MonacoEnvironment = { baseUrl: '${t}' };`:void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(B5())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(qT())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",SI?`await import(ttPolicy?.createScriptURL('${e}') ?? '${e}');`:`importScripts(ttPolicy?.createScriptURL('${e}') ?? '${e}');`,SI?"globalThis.postMessage({ type: 'vscode-worker-ready' });":void 0,`/*${i}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(r)}function Wpi(i){return new Promise((e,t)=>{i.onmessage=function(n){n.data.type==="vscode-worker-ready"&&(i.onmessage=null,e(i))},i.onerror=t})}function Upi(i){return typeof i.then=="function"}function rct(i,e){let t=typeof i=="string"?new HDe(i,e):i;return new L$(new WDe,t)}var SI,MF,VDe,HDe,WDe,oct=D(()=>{ay();Lt();bl();zDe();ae();Qt();Oe();SI=!0;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?MF=globalThis.workerttPolicy:MF=fd("defaultWorkerFactory",{createScriptURL:i=>i});VDe=class extends W{constructor(e,t,n,r,o,s){super(),this.id=n,this.label=r;let a=Vpi(e,r);Upi(a)?this.worker=a:this.worker=Promise.resolve(a),this.postMessage(t,[]),this.worker.then(l=>{l.onmessage=function(c){o(c.data)},l.onmessageerror=s,typeof l.addEventListener=="function"&&l.addEventListener("error",s)}),this._register(Ve(()=>{this.worker?.then(l=>{l.onmessage=null,l.onmessageerror=null,l.removeEventListener("error",s),l.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){this.worker?.then(n=>{try{n.postMessage(e,t)}catch(r){pt(r),pt(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:r}))}})}},HDe=class{constructor(e,t){this.amdModuleId=e,this.label=t,this.esmModuleLocation=SI?jw.asBrowserUri(`${e}.esm.js`):void 0}},WDe=class i{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(e,t,n){let r=++i.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new VDe(e.esmModuleLocation,e.amdModuleId,r,e.label||"anonymous"+r,t,o=>{M7(o),this._webWorkerFailedBeforeError=o,n(o)})}}});function R7(i,e,t){i.has(e)?i.get(e).push(t):i.set(e,[t])}var $o,RF,N$,OS=D(()=>{(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})($o||($o={}));RF=class{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t{OS();M$=class i{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> + | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){let e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){let o=y("contextkey.parser.error.expectedButGot",`Expected: {0} +Received: '{1}'.`,e,oE.getLexeme(t)),r=t.offset,s=oE.getLexeme(t);return this._parsingErrors.push({message:o,offset:r,lexeme:s,additionalInfo:n}),i._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},ge=class{static false(){return ah.INSTANCE}static true(){return rf.INSTANCE}static has(e){return $I.create(e)}static equals(e,t){return eL.create(e,t)}static notEquals(e,t){return zee.create(e,t)}static regex(e,t){return aV.create(e,t)}static in(e,t){return Pee.create(e,t)}static notIn(e,t){return Bee.create(e,t)}static not(e){return tL.create(e)}static and(...e){return jee.create(e,null,!0)}static or(...e){return lV.create(e,null,!0)}static{this._parser=new XDe({regexParsingWithErrorRecovery:!1})}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};ah=class i{static{this.INSTANCE=new i}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return rf.INSTANCE}},rf=class i{static{this.INSTANCE=new i}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return ah.INSTANCE}},$I=class i{static create(e,t=null){let n=Gu.get(e);return typeof n=="boolean"?n?rf.INSTANCE:ah.INSTANCE:new i(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:tat(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Gu.get(this.key);return typeof e=="boolean"?e?rf.INSTANCE:ah.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=tL.create(this.key,this)),this.negated}},eL=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?$I.create(e,n):tL.create(e,n);let o=Gu.get(e);return typeof o=="boolean"?t===(o?"true":"false")?rf.INSTANCE:ah.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){let e=Gu.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?rf.INSTANCE:ah.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=zee.create(this.key,this.value,this)),this.negated}},Pee=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):typeof n=="string"&&typeof t=="object"&&t!==null?voi.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=Bee.create(this.key,this.valueKey)),this.negated}},Bee=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=Pee.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}},zee=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?tL.create(e,n):$I.create(e,n);let o=Gu.get(e);return typeof o=="boolean"?t===(o?"true":"false")?ah.INSTANCE:rf.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){let e=Gu.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?ah.INSTANCE:rf.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=eL.create(this.key,this.value,this)),this.negated}},tL=class i{static create(e,t=null){let n=Gu.get(e);return typeof n=="boolean"?n?ah.INSTANCE:rf.INSTANCE:new i(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:tat(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Gu.get(this.key);return typeof e=="boolean"?e?ah.INSTANCE:rf.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$I.create(this.key,this)),this.negated}};Vee=class i{static create(e,t,n=null){return Gee(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Uee.create(this.key,this.value,this)),this.negated}},Hee=class i{static create(e,t,n=null){return Gee(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Wee.create(this.key,this.value,this)),this.negated}},Wee=class i{static create(e,t,n=null){return Gee(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:iL(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Vee.create(this.key,this.value,this)),this.negated}},aV=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){let e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ZDe.create(this)),this.negated}},ZDe=class i{static create(e){return new i(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}};jee=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){let s=o[o.length-1];if(s.type!==9)break;o.pop();let a=o.pop(),l=o.length===0,c=lV.create(s.expr.map(u=>i.create([u,a],null,n)),null,l);c&&(o.push(c),o.sort(sV))}if(o.length===1)return o[0];if(n){for(let s=0;se.serialize()).join(" && ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());this.negated=lV.create(e,this,!0)}return this.negated}},lV=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize()).join(" || ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){let t=e.shift(),n=e.shift(),o=[];for(let r of Zst(t))for(let s of Zst(n))o.push(jee.create([r,s],null,!1));e.unshift(i.create(o,null,!1))}this.negated=i.create(e,this,!0)}return this.negated}},ze=class i extends $I{static{this._info=[]}static all(){return i._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?i._info.push({...n,key:e}):n!==!0&&i._info.push({key:e,description:n,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return eL.create(this.key,e)}},Ze=At("contextKeyService")});function koi(i,e){if(i.weight1!==e.weight1)return i.weight1-e.weight1;if(i.command&&e.command){if(i.commande.command)return 1}return i.weight2-e.weight2}var $De,Oa,Toi,Tx=D(()=>{xI();wi();to();fa();de();Pp();$De=class i{constructor(){this._coreKeybindings=new Br,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Ja===1){if(e&&e.win)return e.win}else if(Ja===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){let t=i.bindToCurrentPlatform(e),n=new se;if(t&&t.primary){let o=fz(t.primary,Ja);o&&n.add(this._registerDefaultKeybinding(o,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let o=0,r=t.secondary.length;o{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(koi)),this._cachedMergedKeybindings.slice(0)}},Oa=new $De,Toi={EditorModes:"platform.keybindingsRegistry"};Qi.add(Toi.EditorModes,Oa)});function rE(i){return i.command!==void 0}function nat(i){return i.submenu!==void 0}function Hn(i){let e=[],t=new i,{f1:n,menu:o,keybinding:r,...s}=t.desc;if(ii.getCommand(s.id))throw new Error(`Cannot register two commands with the same id: ${s.id}`);if(e.push(ii.registerCommand({id:s.id,handler:(a,...l)=>t.run(a,...l),metadata:s.metadata})),Array.isArray(o))for(let a of o)e.push(Xr.appendMenuItem(a.id,{command:{...s,precondition:a.precondition===null?void 0:s.precondition},...a}));else o&&e.push(Xr.appendMenuItem(o.id,{command:{...s,precondition:o.precondition===null?void 0:s.precondition},...o}));if(n&&(e.push(Xr.appendMenuItem(tt.CommandPalette,{command:s,when:s.precondition})),e.push(Xr.addCommand(s))),Array.isArray(r))for(let a of r)e.push(Oa.registerKeybindingRule({...a,id:s.id,when:s.precondition?ge.and(s.precondition,a.when):a.when}));else r&&e.push(Oa.registerKeybindingRule({...r,id:s.id,when:s.precondition?ge.and(s.precondition,r.when):r.when}));return{dispose(){Oi(e)}}}var Ioi,iat,qee,tt,nl,nL,Xr,e0,Kl,ma,go=D(()=>{il();ko();et();de();Pp();to();Bt();ht();Tx();Ioi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},iat=function(i,e){return function(t,n){e(t,n,i)}};tt=class i{static{this._instances=new Map}static{this.CommandPalette=new i("CommandPalette")}static{this.DebugBreakpointsContext=new i("DebugBreakpointsContext")}static{this.DebugCallStackContext=new i("DebugCallStackContext")}static{this.DebugConsoleContext=new i("DebugConsoleContext")}static{this.DebugVariablesContext=new i("DebugVariablesContext")}static{this.NotebookVariablesContext=new i("NotebookVariablesContext")}static{this.DebugHoverContext=new i("DebugHoverContext")}static{this.DebugWatchContext=new i("DebugWatchContext")}static{this.DebugToolBar=new i("DebugToolBar")}static{this.DebugToolBarStop=new i("DebugToolBarStop")}static{this.DebugCallStackToolbar=new i("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new i("DebugCreateConfiguration")}static{this.EditorContext=new i("EditorContext")}static{this.SimpleEditorContext=new i("SimpleEditorContext")}static{this.EditorContent=new i("EditorContent")}static{this.EditorLineNumberContext=new i("EditorLineNumberContext")}static{this.EditorContextCopy=new i("EditorContextCopy")}static{this.EditorContextPeek=new i("EditorContextPeek")}static{this.EditorContextShare=new i("EditorContextShare")}static{this.EditorTitle=new i("EditorTitle")}static{this.EditorTitleRun=new i("EditorTitleRun")}static{this.EditorTitleContext=new i("EditorTitleContext")}static{this.EditorTitleContextShare=new i("EditorTitleContextShare")}static{this.EmptyEditorGroup=new i("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new i("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new i("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new i("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new i("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new i("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new i("ExplorerContext")}static{this.ExplorerContextShare=new i("ExplorerContextShare")}static{this.ExtensionContext=new i("ExtensionContext")}static{this.GlobalActivity=new i("GlobalActivity")}static{this.CommandCenter=new i("CommandCenter")}static{this.CommandCenterCenter=new i("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new i("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new i("LayoutControlMenu")}static{this.MenubarMainMenu=new i("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new i("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new i("MenubarDebugMenu")}static{this.MenubarEditMenu=new i("MenubarEditMenu")}static{this.MenubarCopy=new i("MenubarCopy")}static{this.MenubarFileMenu=new i("MenubarFileMenu")}static{this.MenubarGoMenu=new i("MenubarGoMenu")}static{this.MenubarHelpMenu=new i("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new i("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new i("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new i("PanelAlignmentMenu")}static{this.PanelPositionMenu=new i("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new i("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new i("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new i("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new i("MenubarSelectionMenu")}static{this.MenubarShare=new i("MenubarShare")}static{this.MenubarSwitchEditorMenu=new i("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new i("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new i("MenubarTerminalMenu")}static{this.MenubarViewMenu=new i("MenubarViewMenu")}static{this.MenubarHomeMenu=new i("MenubarHomeMenu")}static{this.OpenEditorsContext=new i("OpenEditorsContext")}static{this.OpenEditorsContextShare=new i("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new i("ProblemsPanelContext")}static{this.SCMInputBox=new i("SCMInputBox")}static{this.SCMChangesSeparator=new i("SCMChangesSeparator")}static{this.SCMChangesContext=new i("SCMChangesContext")}static{this.SCMIncomingChanges=new i("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new i("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new i("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new i("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new i("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new i("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new i("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new i("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new i("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new i("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new i("SCMChangeContext")}static{this.SCMResourceContext=new i("SCMResourceContext")}static{this.SCMResourceContextShare=new i("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new i("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new i("SCMResourceGroupContext")}static{this.SCMSourceControl=new i("SCMSourceControl")}static{this.SCMSourceControlInline=new i("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new i("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new i("SCMHistoryTitle")}static{this.SCMTitle=new i("SCMTitle")}static{this.SearchContext=new i("SearchContext")}static{this.SearchActionMenu=new i("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new i("StickyScrollContext")}static{this.TestItem=new i("TestItem")}static{this.TestItemGutter=new i("TestItemGutter")}static{this.TestProfilesContext=new i("TestProfilesContext")}static{this.TestMessageContext=new i("TestMessageContext")}static{this.TestMessageContent=new i("TestMessageContent")}static{this.TestPeekElement=new i("TestPeekElement")}static{this.TestPeekTitle=new i("TestPeekTitle")}static{this.TestCallStack=new i("TestCallStack")}static{this.TouchBarContext=new i("TouchBarContext")}static{this.TitleBarContext=new i("TitleBarContext")}static{this.TitleBarTitleContext=new i("TitleBarTitleContext")}static{this.TunnelContext=new i("TunnelContext")}static{this.TunnelPrivacy=new i("TunnelPrivacy")}static{this.TunnelProtocol=new i("TunnelProtocol")}static{this.TunnelPortInline=new i("TunnelInline")}static{this.TunnelTitle=new i("TunnelTitle")}static{this.TunnelLocalAddressInline=new i("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new i("TunnelOriginInline")}static{this.ViewItemContext=new i("ViewItemContext")}static{this.ViewContainerTitle=new i("ViewContainerTitle")}static{this.ViewContainerTitleContext=new i("ViewContainerTitleContext")}static{this.ViewTitle=new i("ViewTitle")}static{this.ViewTitleContext=new i("ViewTitleContext")}static{this.CommentEditorActions=new i("CommentEditorActions")}static{this.CommentThreadTitle=new i("CommentThreadTitle")}static{this.CommentThreadActions=new i("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new i("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new i("CommentThreadCommentContext")}static{this.CommentTitle=new i("CommentTitle")}static{this.CommentActions=new i("CommentActions")}static{this.CommentsViewThreadActions=new i("CommentsViewThreadActions")}static{this.InteractiveToolbar=new i("InteractiveToolbar")}static{this.InteractiveCellTitle=new i("InteractiveCellTitle")}static{this.InteractiveCellDelete=new i("InteractiveCellDelete")}static{this.InteractiveCellExecute=new i("InteractiveCellExecute")}static{this.InteractiveInputExecute=new i("InteractiveInputExecute")}static{this.InteractiveInputConfig=new i("InteractiveInputConfig")}static{this.ReplInputExecute=new i("ReplInputExecute")}static{this.IssueReporter=new i("IssueReporter")}static{this.NotebookToolbar=new i("NotebookToolbar")}static{this.NotebookStickyScrollContext=new i("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new i("NotebookCellTitle")}static{this.NotebookCellDelete=new i("NotebookCellDelete")}static{this.NotebookCellInsert=new i("NotebookCellInsert")}static{this.NotebookCellBetween=new i("NotebookCellBetween")}static{this.NotebookCellListTop=new i("NotebookCellTop")}static{this.NotebookCellExecute=new i("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new i("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new i("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new i("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new i("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new i("NotebookKernelSource")}static{this.BulkEditTitle=new i("BulkEditTitle")}static{this.BulkEditContext=new i("BulkEditContext")}static{this.TimelineItemContext=new i("TimelineItemContext")}static{this.TimelineTitle=new i("TimelineTitle")}static{this.TimelineTitleContext=new i("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new i("TimelineFilterSubMenu")}static{this.AccountsContext=new i("AccountsContext")}static{this.SidebarTitle=new i("SidebarTitle")}static{this.PanelTitle=new i("PanelTitle")}static{this.AuxiliaryBarTitle=new i("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new i("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new i("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new i("TerminalNewDropdownContext")}static{this.TerminalTabContext=new i("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new i("TerminalStickyScrollContext")}static{this.WebviewContext=new i("WebviewContext")}static{this.InlineCompletionsActions=new i("InlineCompletionsActions")}static{this.InlineEditsActions=new i("InlineEditsActions")}static{this.InlineEditActions=new i("InlineEditActions")}static{this.NewFile=new i("NewFile")}static{this.MergeInput1Toolbar=new i("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new i("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new i("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new i("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new i("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new i("InlineEditToolbar")}static{this.ChatContext=new i("ChatContext")}static{this.ChatCodeBlock=new i("ChatCodeblock")}static{this.ChatCompareBlock=new i("ChatCompareBlock")}static{this.ChatMessageTitle=new i("ChatMessageTitle")}static{this.ChatExecute=new i("ChatExecute")}static{this.ChatExecuteSecondary=new i("ChatExecuteSecondary")}static{this.ChatInputSide=new i("ChatInputSide")}static{this.AccessibleView=new i("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new i("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new i("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new i("DiffEditorSelectionToolbar")}constructor(e){if(i._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(e,this),this.id=e}},nl=At("menuService"),nL=class i{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new i(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let n of e)n instanceof i&&t.add(n.id);return t}constructor(e){this.id=e,this.has=t=>t===e}},Xr=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new FK({merge:nL.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(i){return this._commands.set(i.id,i),this._onDidChangeMenu.fire(nL.for(tt.CommandPalette)),He(()=>{this._commands.delete(i.id)&&this._onDidChangeMenu.fire(nL.for(tt.CommandPalette))})}getCommand(i){return this._commands.get(i)}getCommands(){let i=new Map;return this._commands.forEach((e,t)=>i.set(t,e)),i}appendMenuItem(i,e){let t=this._menuItems.get(i);t||(t=new Br,this._menuItems.set(i,t));let n=t.push(e);return this._onDidChangeMenu.fire(nL.for(i)),He(()=>{n(),this._onDidChangeMenu.fire(nL.for(i))})}appendMenuItems(i){let e=new se;for(let{id:t,item:n}of i)e.add(this.appendMenuItem(t,n));return e}getMenuItems(i){let e;return this._menuItems.has(i)?e=[...this._menuItems.get(i)]:e=[],i===tt.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(i){let e=new Set;for(let t of i)rE(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||i.push({command:t})})}},e0=class extends Tg{constructor(e,t,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=t}},Kl=qee=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,n,o,r,s,a){this.hideActions=o,this.menuKeybinding=r,this._commandService=a,this.id=e.id,this.label=qee.label(e,n),this.tooltip=(typeof e.tooltip=="string"?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0;let l;if(e.toggled){let c=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),this.checked&&ut.isThemeIcon(c.icon)&&(l=c.icon),this.checked&&c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}l||(l=ut.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new qee(t,void 0,n,o,void 0,s,a):void 0,this._options=n,this.class=l&&ut.asClassName(l)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};Kl=qee=Ioi([iat(5,Ze),iat(6,Ii)],Kl);ma=class{constructor(e){this.desc=e}}});var rr,lh=D(()=>{ht();rr=At("telemetryService")});function Loi(i){switch(i){case Sc.Trace:return"trace";case Sc.Debug:return"debug";case Sc.Info:return"info";case Sc.Warning:return"warn";case Sc.Error:return"error";case Sc.Off:return"off"}}var sr,Sc,oat,Yee,Kee,Jee,GJi,ch=D(()=>{et();de();Bt();ht();sr=At("logService");(function(i){i[i.Off=0]="Off",i[i.Trace=1]="Trace",i[i.Debug=2]="Debug",i[i.Info=3]="Info",i[i.Warning=4]="Warning",i[i.Error=5]="Error"})(Sc||(Sc={}));oat=Sc.Info,Yee=class extends H{constructor(){super(...arguments),this.level=oat,this._onDidChangeLogLevel=this._register(new q),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==Sc.Off&&this.level<=e}},Kee=class extends Yee{constructor(e=oat,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(Sc.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(Sc.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(Sc.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(Sc.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(Sc.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}},Jee=class extends Yee{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(let t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(let n of this.loggers)n.trace(e,...t)}debug(e,...t){for(let n of this.loggers)n.debug(e,...t)}info(e,...t){for(let n of this.loggers)n.info(e,...t)}warn(e,...t){for(let n of this.loggers)n.warn(e,...t)}error(e,...t){for(let n of this.loggers)n.error(e,...t)}dispose(){for(let e of this.loggers)e.dispose();super.dispose()}};GJi=new ze("logLevel",Loi(Sc.Info))});function Ec(i,e){ii.registerCommand(i,function(t,...n){let o=t.get(Re),[r,s]=n;gi(Je.isUri(r)),gi(J.isIPosition(s));let a=t.get(an).getModel(r);if(a){let l=J.lift(s);return o.invokeFunction(e,a,l,...n.slice(2))}return t.get(Ss).createModelReference(r).then(l=>new Promise((c,u)=>{try{let d=o.invokeFunction(e,l.object.textEditorModel,J.lift(s),n.slice(2));c(d)}catch(d){u(d)}}).finally(()=>{l.dispose()}))})}function Qe(i){return kg.INSTANCE.registerEditorCommand(i),i}function Ce(i){let e=new i;return kg.INSTANCE.registerEditorAction(e),e}function eTe(i){return kg.INSTANCE.registerEditorAction(i),i}function rat(i){kg.INSTANCE.registerEditorAction(i)}function St(i,e,t){kg.INSTANCE.registerEditorContribution(i,e,t)}function uV(i){return i.register(),i}var oL,kx,Xee,Eo,Pe,cV,uh,_y,Noi,kg,tTe,iTe,sat,Jt=D(()=>{Be();mn();hs();kt();su();dm();go();to();Bt();ht();Tx();fa();lh();gn();ch();Ye();oL=class{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(let t of e){let n=t.kbExpr;this.precondition&&(n?n=ge.and(n,this.precondition):n=this.precondition);let o={id:this.id,weight:t.weight,args:t.args,when:n,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Oa.registerKeybindingRule(o)}}ii.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){Xr.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}},kx=class extends oL{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n,o){return this._implementations.push({priority:e,name:t,implementation:n,when:o}),this._implementations.sort((r,s)=>s.priority-r.priority),{dispose:()=>{for(let r=0;r{if(a.get(Ze).contextMatchesRules(n??void 0))return o(a,s,t)})}runCommand(e,t){return i.runEditorCommand(e,t,this.precondition,(n,o,r)=>this.runEditorCommand(n,o,r))}},Pe=class i extends Eo{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(o){return o.menuId||(o.menuId=tt.EditorContext),o.title||(o.title=e.label),o.when=ge.and(e.precondition,o.when),o}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(i.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(rr).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}},cV=class extends Pe{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,o)=>o[0]-n[0]),{dispose:()=>{for(let n=0;n{let s=r.get(Ze),a=r.get(sr);if(!s.contextMatchesRules(this.desc.precondition??void 0)){a.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize());return}return this.runEditorCommand(r,o,...t)})}};(function(i){function e(s){return kg.INSTANCE.getEditorCommand(s)}i.getEditorCommand=e;function t(){return kg.INSTANCE.getEditorActions()}i.getEditorActions=t;function n(){return kg.INSTANCE.getEditorContributions()}i.getEditorContributions=n;function o(s){return kg.INSTANCE.getEditorContributions().filter(a=>s.indexOf(a.id)>=0)}i.getSomeEditorContributions=o;function r(){return kg.INSTANCE.getDiffEditorContributions()}i.getDiffEditorContributions=r})(_y||(_y={}));Noi={EditorCommonContributions:"editor.contributions"},kg=class i{static{this.INSTANCE=new i}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,n){this.editorContributions.push({id:e,ctor:t,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}};Qi.add(Noi.EditorCommonContributions,kg.INSTANCE);tTe=uV(new kx({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:tt.MenubarEditMenu,group:"1_do",title:y({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:tt.CommandPalette,group:"",title:y("undo","Undo"),order:1}]}));uV(new Xee(tTe,{id:"default:undo",precondition:void 0}));iTe=uV(new kx({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:tt.MenubarEditMenu,group:"1_do",title:y({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:tt.CommandPalette,group:"",title:y("redo","Redo"),order:1}]}));uV(new Xee(iTe,{id:"default:redo",precondition:void 0}));sat=uV(new kx({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:tt.MenubarSelectionMenu,group:"1_basic",title:y({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:tt.CommandPalette,group:"",title:y("selectAll","Select All"),order:1}]}))});function dV(i){Cb&&(lat||(lat=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(i.message))}function cat(i){return i[0]==="o"&&i[1]==="n"&&bg(i.charCodeAt(2))}function uat(i){return/^onDynamic/.test(i)&&bg(i.charCodeAt(9))}var aat,Moi,lat,nTe,Zee,oTe,rTe,sTe,aTe,$ee,lTe=D(()=>{Tt();et();de();xl();wi();Rt();aat="default",Moi="$initialize",lat=!1;nTe=class{constructor(e,t,n,o,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=o,this.args=r,this.type=0}},Zee=class{constructor(e,t,n,o){this.vsWorker=e,this.seq=t,this.res=n,this.err=o,this.type=1}},oTe=class{constructor(e,t,n,o,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=o,this.arg=r,this.type=2}},rTe=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},sTe=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},aTe=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){let o=String(++this._lastSentReq);return new Promise((r,s)=>{this._pendingReplies[o]={resolve:r,reject:s},this._send(new nTe(this._workerId,o,e,t,n))})}listen(e,t,n){let o=null,r=new q({onWillAddFirstListener:()=>{o=String(++this._lastSentReq),this._pendingEmitters.set(o,r),this._send(new oTe(this._workerId,o,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(o),this._send(new sTe(this._workerId,o)),o=null}});return r.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){let n={get:(o,r)=>(typeof r=="string"&&!o[r]&&(uat(r)?o[r]=s=>this.listen(e,r,s):cat(r)?o[r]=this.listen(e,r,void 0):r.charCodeAt(0)===36&&(o[r]=async(...s)=>(await t?.(),this.sendMessage(e,r,s)))),o[r])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(o=>{this._send(new Zee(this._workerId,t,o,void 0))},o=>{o.detail instanceof Error&&(o.detail=p1e(o.detail)),this._send(new Zee(this._workerId,t,void 0,p1e(o)))})}_handleSubscribeEventMessage(e){let t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(o=>{this._send(new rTe(this._workerId,t,o))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(r)},r=>{ft(r)})),this._protocol=new aTe({sendMessage:(r,s)=>{this._worker.postMessage(r,s)},handleMessage:(r,s,a)=>this._handleMessage(r,s,a),handleEvent:(r,s,a)=>this._handleEvent(r,s,a)}),this._protocol.setWorkerId(this._worker.getId());let n=null,o=globalThis.require;typeof o<"u"&&typeof o.getConfig=="function"?n=o.getConfig():typeof globalThis.requirejs<"u"&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(aat,Moi,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(aat,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(r=>{this._onError("Worker failed to load "+t.amdModuleId,r)})}_handleMessage(e,t,n){let o=this._localChannels.get(e);if(!o)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if(typeof o[t]!="function")return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(o[t].apply(o,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,t,n){let o=this._localChannels.get(e);if(!o)throw new Error(`Missing channel ${e} on main thread`);if(uat(t)){let r=o[t].call(o,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return r}if(cat(t)){let r=o[t];if(typeof r!="function")throw new Error(`Missing event ${t} on main thread channel ${e}.`);return r}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}});function xd(i,e){let t=globalThis.MonacoEnvironment;if(t?.createTrustedTypesPolicy)try{return t.createTrustedTypesPolicy(i,e)}catch(n){ft(n);return}try{return globalThis.trustedTypes?.createPolicy(i,e)}catch(n){ft(n);return}}var Sy=D(()=>{Tt()});function Roi(i,e){let t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",e);if(typeof t.getWorkerUrl=="function"){let n=t.getWorkerUrl("workerMain.js",e);return new Worker(SO?SO.createScriptURL(n):n,{name:e,type:rL?"module":void 0})}}if(i){let n=Foi(e,i.toString(!0)),o=new Worker(SO?SO.createScriptURL(n):n,{name:e,type:rL?"module":void 0});return rL?Ooi(o):o}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function Foi(i,e,t){let n=/^((http:)|(https:)|(file:)|(vscode-file:))/.test(e);if(!(n&&e.substring(0,globalThis.origin.length)!==globalThis.origin)){let r=e.lastIndexOf("?"),s=e.lastIndexOf("#",r),a=r>0?new URLSearchParams(e.substring(r+1,~s?s:void 0)):new URLSearchParams;T$.addSearchParam(a,!0,!0),a.toString()?e=`${e}?${a.toString()}#${i}`:e=`${e}#${i}`}!rL&&!n&&(e=new URL(e,globalThis.origin).toString());let o=new Blob([Sl([`/*${i}*/`,t?`globalThis.MonacoEnvironment = { baseUrl: '${t}' };`:void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(T6())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(bk())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",rL?`await import(ttPolicy?.createScriptURL('${e}') ?? '${e}');`:`importScripts(ttPolicy?.createScriptURL('${e}') ?? '${e}');`,rL?"globalThis.postMessage({ type: 'vscode-worker-ready' });":void 0,`/*${i}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(o)}function Ooi(i){return new Promise((e,t)=>{i.onmessage=function(n){n.data.type==="vscode-worker-ready"&&(i.onmessage=null,e(i))},i.onerror=t})}function Poi(i){return typeof i.then=="function"}function dat(i,e){let t=typeof i=="string"?new uTe(i,e):i;return new $ee(new dTe,t)}var rL,SO,cTe,uTe,dTe,hat=D(()=>{Sy();Tt();xl();lTe();de();Wt();Be();rL=!0;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?SO=globalThis.workerttPolicy:SO=xd("defaultWorkerFactory",{createScriptURL:i=>i});cTe=class extends H{constructor(e,t,n,o,r,s){super(),this.id=n,this.label=o;let a=Roi(e,o);Poi(a)?this.worker=a:this.worker=Promise.resolve(a),this.postMessage(t,[]),this.worker.then(l=>{l.onmessage=function(c){r(c.data)},l.onmessageerror=s,typeof l.addEventListener=="function"&&l.addEventListener("error",s)}),this._register(He(()=>{this.worker?.then(l=>{l.onmessage=null,l.onmessageerror=null,l.removeEventListener("error",s),l.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){this.worker?.then(n=>{try{n.postMessage(e,t)}catch(o){ft(o),ft(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:o}))}})}},uTe=class{constructor(e,t){this.amdModuleId=e,this.label=t,this.esmModuleLocation=rL?mx.asBrowserUri(`${e}.esm.js`):void 0}},dTe=class i{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(e,t,n){let o=++i.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new cTe(e.esmModuleLocation,e.amdModuleId,o,e.label||"anonymous"+o,t,r=>{dV(r),this._webWorkerFailedBeforeError=r,n(r)})}}});function hV(i,e,t){i.has(e)?i.get(e).push(t):i.set(e,[t])}var Zr,EO,ete,sE=D(()=>{(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(Zr||(Zr={}));EO=class{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t{sE();tte=class i{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> - `}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new RF(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new RF({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new RF({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}});function ly(i,e){let t=i.getCount(),n=i.findTokenIndexAtOffset(e),r=i.getLanguageId(n),o=n;for(;o+10&&i.getLanguageId(s-1)===r;)s--;return new UDe(i,r,s,o+1,i.getStartOffset(s),i.getEndOffset(o))}function Wb(i){return(i&3)!==0}var UDe,FF=D(()=>{UDe=class{constructor(e,t,n,r,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=r,this.firstCharOffset=o,this._lastCharOffset=s,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}});function jpi(i){let e=i.length;i=i.map(s=>[s[0].toLowerCase(),s[1].toLowerCase()]);let t=[];for(let s=0;s{let[l,c]=s,[u,d]=a;return l===u||l===d||c===u||c===d},r=(s,a)=>{let l=Math.min(s,a),c=Math.max(s,a);for(let u=0;u0&&o.push({open:a,close:l})}return o}function act(i,e,t,n){for(let r=0,o=e.length;r=0&&n.push(a);for(let a of s.close)a.indexOf(i)>=0&&n.push(a)}}function lct(i,e){return i.length-e.length}function F$(i){if(i.length<=1)return i;let e=[],t=new Set;for(let n of i)t.has(n)||(e.push(n),t.add(n));return e}function Qpi(i,e,t,n){let r=[];r=r.concat(i),r=r.concat(e);for(let o=0,s=r.length;o{Pt();$w();We();jDe=class i{constructor(e,t,n,r,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=n,this.close=r,this.forwardRegex=o,this.reversedRegex=s,this._openSet=i._toSet(this.open),this._closeSet=i._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let n of e)t.add(n);return t}};R$=class{constructor(e,t){this._richEditBracketsBrand=void 0;let n=jpi(t);this.brackets=n.map((r,o)=>new jDe(e,o,r.open,r.close,Qpi(r.open,r.close,n,o),Gpi(r.open,r.close,n,o))),this.forwardRegex=qpi(this.brackets),this.reversedRegex=Ypi(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(let r of this.brackets){for(let o of r.open)this.textIsBracket[o]=r,this.textIsOpenBracket[o]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,o.length);for(let o of r.close)this.textIsBracket[o]=r,this.textIsOpenBracket[o]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,o.length)}}};QDe=(function(){function i(n){let r=new Uint16Array(n.length),o=0;for(let s=n.length-1;s>=0;s--)r[o++]=n.charCodeAt(s);return wEe().decode(r)}let e=null,t=null;return function(r){return e!==r&&(e=r,t=i(e)),t}})(),qh=class{static _findPrevBracketInText(e,t,n,r){let o=n.match(e);if(!o)return null;let s=n.length-(o.index||0),a=o[0].length,l=r+s;return new N(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,r,o){let a=QDe(n).substring(n.length-o,n.length-r);return this._findPrevBracketInText(e,t,a,r)}static findNextBracketInText(e,t,n,r){let o=n.match(e);if(!o)return null;let s=o.index||0,a=o[0].length;if(a===0)return null;let l=r+s;return new N(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,r,o){let s=n.substring(r,o);return this.findNextBracketInText(e,t,s,r)}}});var O$,cct=D(()=>{Qt();FF();F7();O$=class{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let n of t.close){let r=n.charAt(n.length-1);e.push(r)}return Uh(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;let r=t.findTokenIndexAtOffset(n-1);if(Wb(t.getStandardTokenType(r)))return null;let o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,a=qh.findPrevBracketInRange(o,1,s,0,s.length);if(!a)return null;let l=s.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;let u=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:l}:null}}});function P$(i){return i.global&&(i.lastIndex=0),!0}var B$,uct=D(()=>{B$=class{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&P$(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&P$(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&P$(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&P$(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}});var z$,dct=D(()=>{Lt();Pt();OS();z$=class i{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{let n=i._createOpenBracketRegExp(t[0]),r=i._createCloseBracketRegExp(t[1]);n&&r&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:r})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,r){if(e>=3)for(let o=0,s=this._regExpRules.length;oc.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&n.length>0&&r.length>0)for(let o=0,s=this._brackets.length;o=2&&n.length>0){for(let o=0,s=this._brackets.length;o"u"?t:o}function pct(i){return i.replace(/[\[\]]/g,"")}var kt,nr=D(()=>{ht();kt=vt("configurationService")});var rn,Sl=D(()=>{ht();rn=vt("languageService")});var qf,H$=D(()=>{qf=class{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}});function ui(i,e,t){e instanceof qf||(e=new qf(e,[],!!t)),mct.push([i,e])}function YDe(){return mct}var mct,wc=D(()=>{H$();mct=[]});var Gr,PS=D(()=>{Gr=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})});function P7(i){let e=[];if(ox.test(i)){let t=bct.exec(i);for(;t?.length;){let n=t[1].trim();n&&e.push(n),t=bct.exec(i)}}return Uh(e)}function Jpi(i){switch(Array.isArray(i)?i[0]:i){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function Xpi(i,e){return i.trim()?ox.test(i)?y("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",i):U$.getConfigurationProperties()[i]!==void 0?y("config.property.duplicate","Cannot register '{0}'. This property is already registered.",i):e.policy?.name&&U$.getPolicyConfigurations().get(e.policy?.name)!==void 0?y("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",i,e.policy?.name,U$.getPolicyConfigurations().get(e.policy?.name)):null:y("config.property.empty","Cannot register an empty property")}var xc,KDe,JDe,XDe,ZDe,$De,W$,O7,gct,eTe,vct,bct,EI,ox,U$,cy=D(()=>{Qt();et();gn();Oe();nr();xZ();sa();xc={Configuration:"base.contributions.configuration"},KDe={properties:{},patternProperties:{}},JDe={properties:{},patternProperties:{}},XDe={properties:{},patternProperties:{}},ZDe={properties:{},patternProperties:{}},$De={properties:{},patternProperties:{}},W$={properties:{},patternProperties:{}},O7="vscode://schemas/settings/resourceLanguage",gct=Gi.as($k.JSONContribution),eTe=class{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new G,this._onDidUpdateConfiguration=new G,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:y("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},gct.registerSchema(O7,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){let n=new Set;this.doRegisterConfigurations(e,t,n),gct.registerSchema(O7,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){let t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);let n=[];for(let{overrides:r,source:o}of e)for(let s in r){t.add(s);let a=this.configurationDefaultsOverrides.get(s)??this.configurationDefaultsOverrides.set(s,{configurationDefaultOverrides:[]}).get(s),l=r[s];if(a.configurationDefaultOverrides.push({value:l,source:o}),ox.test(s)){let c=this.mergeDefaultConfigurationsForOverrideIdentifier(s,l,o,a.configurationDefaultOverrideValue);if(!c)continue;a.configurationDefaultOverrideValue=c,this.updateDefaultOverrideProperty(s,c,o),n.push(...P7(s))}else{let c=this.mergeDefaultConfigurationsForConfigurationProperty(s,l,o,a.configurationDefaultOverrideValue);if(!c)continue;a.configurationDefaultOverrideValue=c;let u=this.configurationProperties[s];u&&(this.updatePropertyDefaultValue(s,u),this.updateSchema(s,u))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){let r={type:"object",default:t.value,description:y("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",pct(e)),$ref:O7,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=r,this.defaultLanguageConfigurationOverridesNode.properties[e]=r}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,r){let o=r?.value||{},s=r?.source??new Map;if(!(s instanceof Map)){console.error("objectConfigurationSources is not a Map");return}for(let a of Object.keys(t)){let l=t[a];if(Fo(l)&&(Ga(o[a])||Fo(o[a]))){if(o[a]={...o[a]??{},...l},n)for(let u in l)s.set(`${a}.${u}`,n)}else o[a]=l,n?s.set(a,n):s.delete(a)}return{value:o,source:s}}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,r){let o=this.configurationProperties[e],s=r?.value??o?.defaultDefaultValue,a=n;if(Fo(t)&&(o!==void 0&&o.type==="object"||o===void 0&&(Ga(s)||Fo(s)))){if(a=r?.source??new Map,!(a instanceof Map)){console.error("defaultValueSource is not a Map");return}for(let c in t)n&&a.set(`${e}.${c}`,n);t={...Fo(s)?s:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(r=>{this.validateAndRegisterProperties(r,t,r.extensionInfo,r.restrictedProperties,void 0,n),this.configurationContributors.push(r),this.registerJSONConfiguration(r)})}validateAndRegisterProperties(e,t=!0,n,r,o=3,s){o=ku(e.scope)?o:e.scope;let a=e.properties;if(a)for(let c in a){let u=a[c];if(t&&Xpi(c,u)){delete a[c];continue}if(u.source=n,u.defaultDefaultValue=a[c].default,this.updatePropertyDefaultValue(c,u),ox.test(c)?u.scope=void 0:(u.scope=ku(u.scope)?o:u.scope,u.restricted=ku(u.restricted)?!!r?.includes(c):u.restricted),a[c].hasOwnProperty("included")&&!a[c].included){this.excludedConfigurationProperties[c]=a[c],delete a[c];continue}else this.configurationProperties[c]=a[c],a[c].policy?.name&&this.policyConfigurations.set(a[c].policy.name,c);!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),s.add(c)}let l=e.allOf;if(l)for(let c of l)this.validateAndRegisterProperties(c,t,n,r,o,s)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){let t=n=>{let r=n.properties;if(r)for(let s in r)this.updateSchema(s,r[s]);n.allOf?.forEach(t)};t(e)}updateSchema(e,t){switch(KDe.properties[e]=t,t.scope){case 1:JDe.properties[e]=t;break;case 2:XDe.properties[e]=t;break;case 6:ZDe.properties[e]=t;break;case 3:$De.properties[e]=t;break;case 4:W$.properties[e]=t;break;case 5:W$.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,n={type:"object",description:y("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:y("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:O7};this.updatePropertyDefaultValue(t,n),KDe.properties[t]=n,JDe.properties[t]=n,XDe.properties[t]=n,ZDe.properties[t]=n,$De.properties[t]=n,W$.properties[t]=n}}registerOverridePropertyPatternKey(){let e={type:"object",description:y("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:y("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:O7};KDe.patternProperties[EI]=e,JDe.patternProperties[EI]=e,XDe.patternProperties[EI]=e,ZDe.patternProperties[EI]=e,$De.patternProperties[EI]=e,W$.patternProperties[EI]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue,r,o;n&&(!t.disallowConfigurationDefault||!n.source)&&(r=n.value,o=n.source),Ga(r)&&(r=t.defaultDefaultValue,o=void 0),Ga(r)&&(r=Jpi(t.type)),t.default=r,t.defaultValueSource=o}},vct="\\[([^\\]]+)\\]",bct=new RegExp(vct,"g"),EI=`^(${vct})+$`,ox=new RegExp(EI);U$=new eTe;Gi.add(xc.Configuration,U$)});var Zpi,tTe,BS,ps,$pi,Yf=D(()=>{Oe();et();sa();PS();cy();Zpi={ModesRegistry:"editor.modesRegistry"},tTe=class{constructor(){this._onDidChangeLanguages=new G,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;te!==""&&t!=="")}var j$,Q$,iTe,nTe,yct=D(()=>{SSe();F7();j$=class{constructor(e,t){this.languageId=e;let n=t.brackets?Act(t.brackets):[],r=new U9(a=>{let l=new Set;return{info:new iTe(this,a,l),closing:l}}),o=new U9(a=>{let l=new Set,c=new Set;return{info:new nTe(this,a,l,c),opening:l,openingColorized:c}});for(let[a,l]of n){let c=r.get(a),u=o.get(l);c.closing.add(u.info),u.opening.add(c.info)}let s=t.colorizedBracketPairs?Act(t.colorizedBracketPairs):n.filter(a=>!(a[0]==="<"&&a[1]===">"));for(let[a,l]of s){let c=r.get(a),u=o.get(l);c.closing.add(u.info),u.openingColorized.add(c.info),u.opening.add(c.info)}this._openingBrackets=new Map([...r.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...o.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){let t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return OF(t,e)}};Q$=class{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}},iTe=class extends Q${constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}},nTe=class extends Q${constructor(e,t,n,r){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=r,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}});function tmi(i,e,t,n){let r=e.getLanguageConfiguration(i);if(!r){if(!n.isRegisteredLanguageId(i))return new PF(i,{});r=new PF(i,{})}let o=imi(r.languageId,t),s=Cct([r.underlyingConfig,o]);return new PF(r.languageId,s)}function imi(i,e){let t=e.getValue(oTe.brackets,{overrideIdentifier:i}),n=e.getValue(oTe.colorizedBracketPairs,{overrideIdentifier:i});return{brackets:xct(t),colorizedBracketPairs:xct(n)}}function xct(i){if(Array.isArray(i))return i.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function Y$(i,e,t){let n=i.getLineContent(e),r=wn(n);return r.length>t-1&&(r=r.substring(0,t-1)),r}function Cct(i){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let t of i)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}var emi,wct,B7,qi,rTe,oTe,sTe,G$,q$,aTe,PF,ks=D(()=>{et();ae();Pt();uI();OS();sct();cct();uct();dct();F7();ht();nr();Sl();wc();Yf();yct();emi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wct=function(i,e){return function(t,n){e(t,n,i)}},B7=class{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}},qi=vt("languageConfigurationService"),rTe=class extends W{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new aTe),this.onDidChangeEmitter=this._register(new G),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let n=new Set(Object.values(oTe));this._register(this.configurationService.onDidChangeConfiguration(r=>{let o=r.change.keys.some(a=>n.has(a)),s=r.change.overrides.filter(([a,l])=>l.some(c=>n.has(c))).map(([a])=>a);if(o)this.configurations.clear(),this.onDidChangeEmitter.fire(new B7(void 0));else for(let a of s)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new B7(a)))})),this._register(this._registry.onDidChange(r=>{this.configurations.delete(r.languageId),this.onDidChangeEmitter.fire(new B7(r.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=tmi(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};rTe=emi([wct(0,kt),wct(1,rn)],rTe);oTe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};sTe=class{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let n=new G$(e,t,++this._order);return this._entries.push(n),this._resolved=null,Ve(()=>{for(let r=0;re.configuration)))}};G$=class{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}},q$=class{constructor(e){this.languageId=e}},aTe=class extends W{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._register(this.register(ps,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let r=this._entries.get(e);r||(r=new sTe(e),this._entries.set(e,r));let o=r.register(t,n);return this._onDidChange.fire(new q$(e)),Ve(()=>{o.dispose(),this._onDidChange.fire(new q$(e))})}getLanguageConfiguration(e){return this._entries.get(e)?.getResolvedConfiguration()||null}},PF=class i{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new z$(this.underlyingConfig):null,this.comments=i._handleComments(this.underlyingConfig),this.characterPair=new M$(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||w7,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new B$(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new j$(e,this.underlyingConfig)}getWordDefinition(){return x7(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new R$(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new O$(this.brackets)),this._electricCharacter}onEnter(e,t,n,r){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,r):null}getAutoClosingPairs(){return new N$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){let[r,o]=t.blockComment;n.blockCommentStartToken=r,n.blockCommentEndToken=o}return n}};ui(qi,rTe,1)});var hv,_ct=D(()=>{hv=class{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}});function Sct(i,e,t){return new sx(new K$(i),new K$(e)).ComputeDiff(t).changes}var K$,zS,VS,J$,sx,z7=D(()=>{_ct();gS();K$=class{constructor(e){this.source=e}getElements(){let e=this.source,t=new Int32Array(e.length);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new hv(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},sx=class i{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;let[r,o,s]=i._getElements(e),[a,l,c]=i._getElements(t);this._hasStrings=s&&c,this._originalStringElements=r,this._originalElementsOrHash=o,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let t=e.getElements();if(i._isStringArray(t)){let n=new Int32Array(t.length);for(let r=0,o=t.length;r=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){let d;return n<=r?(zS.Assert(e===t+1,"originalStart should only be one more than originalEnd"),d=[new hv(e,0,n,r-n+1)]):e<=t?(zS.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),d=[new hv(e,t-e+1,n,0)]):(zS.Assert(e===t+1,"originalStart should only be one more than originalEnd"),zS.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}let s=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,r,s,a,o),c=s[0],u=a[0];if(l!==null)return l;if(!o[0]){let d=this.ComputeDiffRecursive(e,c,n,u,o),h=[];return o[0]?h=[new hv(c+1,t-(c+1)+1,u+1,r-(u+1)+1)]:h=this.ComputeDiffRecursive(c+1,t,u+1,r,o),this.ConcatenateChanges(d,h)}return[new hv(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,o,s,a,l,c,u,d,h,f,p,g,v,A,w){let C=null,_=null,E=new J$,I=t,T=n,L=f[0]-v[0]-r,M=-1073741824,z=this.m_forwardHistory.length-1;do{let H=L+e;H===I||H=0&&(c=this.m_forwardHistory[z],e=c[0],I=1,T=c.length-1)}while(--z>=-1);if(C=E.getReverseChanges(),w[0]){let H=f[0]+1,B=v[0]+1;if(C!==null&&C.length>0){let q=C[C.length-1];H=Math.max(H,q.getOriginalEnd()),B=Math.max(B,q.getModifiedEnd())}_=[new hv(H,h-H+1,B,g-B+1)]}else{E=new J$,I=s,T=a,L=f[0]-v[0]-l,M=1073741824,z=A?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let H=L+o;H===I||H=u[H+1]?(d=u[H+1]-1,p=d-L-l,d>M&&E.MarkNextChange(),M=d+1,E.AddOriginalElement(d+1,p+1),L=H+1-o):(d=u[H-1],p=d-L-l,d>M&&E.MarkNextChange(),M=d,E.AddModifiedElement(d+1,p+1),L=H-1-o),z>=0&&(u=this.m_reverseHistory[z],o=u[0],I=1,T=u.length-1)}while(--z>=-1);_=E.getChanges()}return this.ConcatenateChanges(C,_)}ComputeRecursionPoint(e,t,n,r,o,s,a){let l=0,c=0,u=0,d=0,h=0,f=0;e--,n--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=t-e+(r-n),g=p+1,v=new Int32Array(g),A=new Int32Array(g),w=r-n,C=t-e,_=e-n,E=t-r,T=(C-w)%2===0;v[w]=e,A[C]=t,a[0]=!1;for(let L=1;L<=p/2+1;L++){let M=0,z=0;u=this.ClipDiagonalBound(w-L,L,w,g),d=this.ClipDiagonalBound(w+L,L,w,g);for(let B=u;B<=d;B+=2){B===u||BM+z&&(M=l,z=c),!T&&Math.abs(B-C)<=L-1&&l>=A[B])return o[0]=l,s[0]=c,q<=A[B]&&L<=1448?this.WALKTRACE(w,u,d,_,C,h,f,E,v,A,l,t,o,c,r,s,T,a):null}let H=(M-e+(z-n)-L)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(M,H))return a[0]=!0,o[0]=M,s[0]=z,H>0&&L<=1448?this.WALKTRACE(w,u,d,_,C,h,f,E,v,A,l,t,o,c,r,s,T,a):(e++,n++,[new hv(e,t-e+1,n,r-n+1)]);h=this.ClipDiagonalBound(C-L,L,C,g),f=this.ClipDiagonalBound(C+L,L,C,g);for(let B=h;B<=f;B+=2){B===h||B=A[B+1]?l=A[B+1]-1:l=A[B-1],c=l-(B-C)-E;let q=l;for(;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(A[B]=l,T&&Math.abs(B-w)<=L&&l<=v[B])return o[0]=l,s[0]=c,q>=v[B]&&L<=1448?this.WALKTRACE(w,u,d,_,C,h,f,E,v,A,l,t,o,c,r,s,T,a):null}if(L<=1447){let B=new Int32Array(d-u+2);B[0]=w-u+1,VS.Copy2(v,u,B,1,d-u+1),this.m_forwardHistory.push(B),B=new Int32Array(f-h+2),B[0]=C-h+1,VS.Copy2(A,h,B,1,f-h+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(w,u,d,_,C,h,f,E,v,A,l,t,o,c,r,s,T,a)}PrettifyChanges(e){for(let t=0;t0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){let n=e[t],r=0,o=0;if(t>0){let d=e[t-1];r=d.originalStart+d.originalLength,o=d.modifiedStart+d.modifiedLength}let s=n.originalLength>0,a=n.modifiedLength>0,l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){let h=n.originalStart-d,f=n.modifiedStart-d;if(hc&&(c=g,l=d)}n.originalStart-=l,n.modifiedStart-=l;let u=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],u)){e[t-1]=u[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&f>l&&(l=f,c=d,u=h)}return l>0?[c,u]:null}_contiguousSequenceScore(e,t,n){let r=0;for(let o=0;o=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,r){let o=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,r)?1:0;return o+s}ConcatenateChanges(e,t){let n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){let r=new Array(e.length+t.length-1);return VS.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],VS.Copy(t,1,r,e.length,t.length-1),r}else{let r=new Array(e.length+t.length);return VS.Copy(e,0,r,0,e.length),VS.Copy(t,0,r,e.length,t.length),r}}ChangesOverlap(e,t,n){if(zS.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),zS.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){let r=e.originalStart,o=e.originalLength,s=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new hv(r,o,s,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&e255?255:i|0}function TI(i){return i<0?0:i>4294967295?4294967295:i|0}var V7=D(()=>{});var ax,lx,kI=D(()=>{V7();ax=class i{constructor(e){let t=DI(e);this._defaultValue=t,this._asciiMap=i._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let n=DI(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},lx=class{constructor(){this._actual=new ax(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}});function nmi(){return lTe===null&&(lTe=new uTe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),lTe}function rmi(){if(H7===null){H7=new ax(0);let i=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let t=0;t{kI();cTe=class{constructor(e,t,n){let r=new Uint8Array(e*t);for(let o=0,s=e*t;ot&&(t=l),a>n&&(n=a),c>n&&(n=c)}t++,n++;let r=new cTe(n,t,0);for(let o=0,s=e.length;o=this._maxCharCode?0:this._states.get(e,t)}},lTe=null;H7=null;dTe=class i{static _createLink(e,t,n,r,o){let s=o-1;do{let a=t.charCodeAt(s);if(e.get(a)!==2)break;s--}while(s>r);if(r>0){let a=t.charCodeAt(r-1),l=t.charCodeAt(s);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&s--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:s+2},url:t.substring(r,s+1)}}static computeLinks(e,t=nmi()){let n=rmi(),r=[];for(let o=1,s=e.getLineCount();o<=s;o++){let a=e.getLineContent(o),l=a.length,c=0,u=0,d=0,h=1,f=!1,p=!1,g=!1,v=!1;for(;c{X$=class i{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}static{this.INSTANCE=new i}navigateValueSet(e,t,n,r,o){if(e&&t){let s=this.doNavigateValueSet(t,o);if(s)return{range:e,value:s}}if(n&&r){let s=this.doNavigateValueSet(r,o);if(s)return{range:n,value:s}}return null}doNavigateValueSet(e,t){let n=this.numberReplace(e,t);return n!==null?n:this.textReplace(e,t)}numberReplace(e,t){let n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),r=Number(e),o=parseFloat(e);return!isNaN(r)&&!isNaN(o)&&r===o?r===0&&!t?null:(r=Math.floor(r*n),r+=t?n:-n,String(r/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let r=null;for(let o=0,s=e.length;r===null&&o=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}}});var W7,hTe=D(()=>{W7=class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}});function omi(i){return Array.isArray(i)}var kct,Ict,fTe,ms,pTe,mTe,Gl,Z$,HS,ql=D(()=>{fTe=class{constructor(e,t){this.uri=e,this.value=t}};ms=class i{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[kct]="ResourceMap",e instanceof i)this.map=new Map(e.map),this.toKey=t??i.defaultToKey;else if(omi(e)){this.map=new Map,this.toKey=t??i.defaultToKey;for(let[n,r]of e)this.set(n,r)}else this.map=new Map,this.toKey=e??i.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new fTe(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(let[n,r]of this.map)e(r.value,r.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(kct=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},pTe=class{constructor(){this[Ict]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){let n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,n!==0&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){let e=this,t=this._state,n=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let e=this,t=this._state,n=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let e=this,t=this._state,n=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[(Ict=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;let n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;let n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},mTe=class extends pTe{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},Gl=class extends mTe{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}},Z$=class{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}},HS=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){let t=this.map.get(e);return t||new Set}}});function pd(i,e){let t=`${i}/${e.join(",")}`,n=Lct.get(t);return n||(n=new gTe(i,e),Lct.set(t,n)),n}var gTe,Lct,BF=D(()=>{ql();kI();gTe=class extends ax{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let n=0,r=e.length;nt)break;n=r}return n}findNextIntlWordAtOrAfterOffset(e,t){for(let n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index{Xd();(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(Cc||(Cc={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(Hu||(Hu={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(Yh||(Yh={}));WS=class{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&wl(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}},uy=class{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}};zF=class{constructor(e,t,n,r,o,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=o,this._isTracked=s}},$$=class{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}},eee=class{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}});function lmi(i){if(!i||i.length===0)return!1;for(let e=0,t=i.length;e=t)break;let r=i.charCodeAt(e);if(r===110||r===114||r===87)return!0}}return!1}function US(i,e,t){if(!t)return new uy(i,null);let n=[];for(let r=0,o=e.length;r0){let s=e.charCodeAt(n);if(i.get(s)!==0)return!0}return!1}function umi(i,e,t,n,r){if(n+r===t)return!0;let o=e.charCodeAt(n+r);if(i.get(o)!==0||o===13||o===10)return!0;if(r>0){let s=e.charCodeAt(n+r-1);if(i.get(s)!==0)return!0}return!1}function nee(i,e,t,n,r){return cmi(i,e,t,n,r)&&umi(i,e,t,n,r)}var ami,fv,iee,II,dy,U7=D(()=>{Pt();BF();Nt();We();tl();ami=999,fv=class{constructor(e,t,n,r){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=r}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=lmi(this.searchString):e=this.searchString.indexOf(` -`)>=0;let t=null;try{t=eZ(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new $$(t,this.wordSeparators?pd(this.wordSeparators,[]):null,n?this.searchString:null)}};iee=class{constructor(e){let t=[],n=0;for(let r=0,o=e.length;r>0);t[o]>=e?r=o-1:t[o+1]>=e?(n=o,r=o):n=o+1}return n+1}},II=class{static findMatches(e,t,n,r,o){let s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new dy(s.wordSeparators,s.regex),r,o):this._doFindMatchesLineByLine(e,n,s,r,o):[]}static _getMultilineMatchRange(e,t,n,r,o,s){let a,l=0;r?(l=r.findLineFeedCountBeforeOffset(o),a=t+o+l):a=t+o;let c;if(r){let f=r.findLineFeedCountBeforeOffset(o+s.length)-l;c=a+s.length+f}else c=a+s.length;let u=e.getPositionAt(a),d=e.getPositionAt(c);return new N(u.lineNumber,u.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,n,r,o){let s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r -`?new iee(a):null,c=[],u=0,d;for(n.reset(0);d=n.next(a);)if(c[u++]=US(this._getMultilineMatchRange(e,s,a,l,d.index,d[0]),d,r),u>=o)return c;return c}static _doFindMatchesLineByLine(e,t,n,r,o){let s=[],a=0;if(t.startLineNumber===t.endLineNumber){let c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,a,s,r,o),s}let l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,s,r,o);for(let c=t.startLineNumber+1;c=l))return o;return o}let u=new dy(e.wordSeparators,e.regex),d;u.reset(0);do if(d=u.next(t),d&&(s[o++]=US(new N(n,d.index+1+r,n,d.index+1+d[0].length+r),d,a),o>=l))return o;while(d);return o}static findNextMatch(e,t,n,r){let o=t.parseSearchRequest();if(!o)return null;let s=new dy(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,s,r):this._doFindNextMatchLineByLine(e,n,s,r)}static _doFindNextMatchMultiline(e,t,n,r){let o=new K(t.lineNumber,1),s=e.getOffsetAt(o),a=e.getLineCount(),l=e.getValueInRange(new N(o.lineNumber,o.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r -`?new iee(l):null;n.reset(t.column-1);let u=n.next(l);return u?US(this._getMultilineMatchRange(e,s,l,c,u.index,u[0]),u,r):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new K(1,1),n,r):null}static _doFindNextMatchLineByLine(e,t,n,r){let o=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s),l=this._findFirstMatchInLine(n,a,s,t.column,r);if(l)return l;for(let c=1;c<=o;c++){let u=(s+c-1)%o,d=e.getLineContent(u+1),h=this._findFirstMatchInLine(n,d,u+1,1,r);if(h)return h}return null}static _findFirstMatchInLine(e,t,n,r,o){e.reset(r-1);let s=e.next(t);return s?US(new N(n,s.index+1,n,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,n,r){let o=t.parseSearchRequest();if(!o)return null;let s=new dy(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,r):this._doFindPreviousMatchLineByLine(e,n,s,r)}static _doFindPreviousMatchMultiline(e,t,n,r){let o=this._doFindMatchesMultiline(e,new N(1,1,t.lineNumber,t.column),n,r,10*ami);if(o.length>0)return o[o.length-1];let s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new K(s,e.getLineMaxColumn(s)),n,r):null}static _doFindPreviousMatchLineByLine(e,t,n,r){let o=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s).substring(0,t.column-1),l=this._findLastMatchInLine(n,a,s,r);if(l)return l;for(let c=1;c<=o;c++){let u=(o+s-c-1)%o,d=e.getLineContent(u+1),h=this._findLastMatchInLine(n,d,u+1,r);if(h)return h}return null}static _findLastMatchInLine(e,t,n,r){let o=null,s;for(e.reset(0);s=e.next(t);)o=US(new N(n,s.index+1,n,s.index+1+s[0].length),s,r);return o}};dy=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t=e.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;let r=n.index,o=n[0].length;if(r===this._prevMatchStartIndex&&o===this._prevMatchLength){if(o===0){JR(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=o,!this._wordSeparators||nee(this._wordSeparators,e,t,r,o))return n}while(n);return null}}});function dmi(i,e){return`[${Ja(i.map(n=>String.fromCodePoint(n)).join(""))}]`}function Mct(i){return i===" "||i===` -`||i===" "}var LI,ree,bTe=D(()=>{We();U7();Pt();Mb();uI();LI=class{static computeUnicodeHighlights(e,t,n){let r=n?n.startLineNumber:1,o=n?n.endLineNumber:e.getLineCount(),s=new ree(t),a=s.getCandidateCodePoints(),l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${dmi(Array.from(a))}`,"g");let c=new dy(null,l),u=[],d=!1,h,f=0,p=0,g=0;e:for(let v=r,A=o;v<=A;v++){let w=e.getLineContent(v),C=w.length;c.reset(0);do if(h=c.next(w),h){let _=h.index,E=h.index+h[0].length;if(_>0){let M=w.charCodeAt(_-1);xo(M)&&_--}if(E+1=1e3){d=!0;break e}u.push(new N(v,_+1,v,E+1))}}while(h)}return{ranges:u,hasMore:d,ambiguousCharacterCount:f,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,t){let n=new ree(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let o=e.codePointAt(0),s=n.ambiguousCharacters.getPrimaryConfusable(o),a=qR.getLocales().filter(l=>!qR.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(o));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};ree=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=qR.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let t of Hw.codePoints)Mct(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,o=!1;if(t)for(let s of t){let a=s.codePointAt(0),l=ZA(s);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Hw.isInvisibleCharacter(a)&&(o=!0)}return!r&&o?0:this.options.invisibleCharacters&&!Mct(e)&&Hw.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}});var jS,VF,oee=D(()=>{jS=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},VF=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}});var Di,see,Kf=D(()=>{Lt();Di=class i{static addRange(e,t){let n=0;for(;nt))return new i(e,t)}static ofLength(e){return new i(0,e)}static ofStartAndLength(e,t){return new i(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new vi(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new i(this.start+e,this.endExclusive+e)}deltaStart(e){return new i(this.start+e,this.endExclusive)}deltaEnd(e){return new i(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new vi(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new vi(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}});function cx(i,e){let t=hmi(i,e);if(t!==-1)return i[t]}function hmi(i,e,t=i.length-1){for(let n=t;n>=0;n--){let r=i[n];if(e(r))return n}return-1}function ux(i,e){let t=NI(i,e);return t===-1?void 0:i[t]}function NI(i,e,t=0,n=i.length){let r=t,o=n;for(;r0&&(t=r)}return t}function Fct(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n=0&&(t=r)}return t}function Oct(i,e){return Q7(i,(t,n)=>-e(t,n))}function Pct(i,e){if(i.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function Bct(i,e){for(let t of i){let n=e(t);if(n!==void 0)return n}}var j7,Jf=D(()=>{j7=class i{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(i.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=NI(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,t===-1?void 0:this._array[t]}}});var Yt,gg,md=D(()=>{Lt();Kf();We();Jf();Yt=class i{static fromRangeInclusive(e){return new i(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new gg(e[0].slice());for(let n=1;nt)throw new vi(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&er.endLineNumberExclusive>=e.startLineNumber),n=NI(this._normalizedRanges,r=>r.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){let r=this._normalizedRanges[t];this._normalizedRanges[t]=r.join(e)}else{let r=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,r)}}contains(e){let t=ux(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){let t=ux(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let t=[],n=0,r=0,o=null;for(;n=s.startLineNumber?o=new Yt(o.startLineNumber,Math.max(o.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(o),o=s)}return o!==null&&t.push(o),new i(t)}subtractFrom(e){let t=QS(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),n=NI(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new i([e]);let r=[],o=e.startLineNumber;for(let s=t;so&&r.push(new Yt(o,a.startLineNumber)),o=a.endLineNumberExclusive}return oe.toString()).join(", ")}getIntersection(e){let t=[],n=0,r=0;for(;nt.delta(e)))}}});var $c,dx=D(()=>{Nt();We();$c=class i{static{this.zero=new i(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new i(0,t.column-e.column):new i(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return i.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(let r of e)r===` -`?(t++,n=0):n++;return new i(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return this.lineCount===0?new N(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new N(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return this.lineCount===0?new K(e.lineNumber,e.column+this.columnCount):new K(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}});var aee,zct=D(()=>{Kf();dx();aee=class{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t{Mb();Lt();Nt();zct();We();dx();GS=class{constructor(e){this.edits=e,Nb(()=>oF(e,(t,n)=>t.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}apply(e){let t="",n=new K(1,1);for(let o of this.edits){let s=o.range,a=s.getStartPosition(),l=s.getEndPosition(),c=Vct(n,a);c.isEmpty()||(t+=e.getValueOfRange(c)),t+=o.text,n=l}let r=Vct(n,e.endPositionExclusive);return r.isEmpty()||(t+=e.getValueOfRange(r)),t}applyToString(e){let t=new vTe(e);return this.apply(t)}getNewRanges(){let e=[],t=0,n=0,r=0;for(let o of this.edits){let s=$c.ofText(o.text),a=K.lift({lineNumber:o.range.startLineNumber+n,column:o.range.startColumn+(o.range.startLineNumber===t?r:0)}),l=s.createRange(a);e.push(l),n=l.endLineNumber-o.range.endLineNumber,r=l.endColumn-o.range.endColumn,t=o.range.endLineNumber}return e}},Wu=class{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}};G7=class{get endPositionExclusive(){return this.length.addToPosition(new K(1,1))}},vTe=class extends G7{constructor(e){super(),this.value=e,this._t=new aee(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}});function HF(i,e){if(i.lineNumber<1)return new K(1,1);if(i.lineNumber>e.length)return new K(e.length,e[e.length-1].length+1);let t=e[i.lineNumber-1];return i.column>t.length+1?new K(i.lineNumber,t.length+1):i}function Hct(i,e){return i>=1&&i<=e.length}var tu,gd,eu,fy=D(()=>{Lt();md();Nt();We();hy();tu=class i{static inverse(e,t,n){let r=[],o=1,s=1;for(let l of e){let c=new i(new Yt(o,l.original.startLineNumber),new Yt(s,l.modified.startLineNumber));c.modified.isEmpty||r.push(c),o=l.original.endLineNumberExclusive,s=l.modified.endLineNumberExclusive}let a=new i(new Yt(o,t+1),new Yt(s,n+1));return a.modified.isEmpty||r.push(a),r}static clip(e,t,n){let r=[];for(let o of e){let s=o.original.intersect(t),a=o.modified.intersect(n);s&&!s.isEmpty&&a&&!a.isEmpty&&r.push(new i(s,a))}return r}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new i(this.modified,this.original)}join(e){return new i(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){let e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new eu(e,t);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new vi("not a valid diff");return new eu(new N(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new N(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new eu(new N(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new N(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(Hct(this.original.endLineNumberExclusive,e)&&Hct(this.modified.endLineNumberExclusive,t))return new eu(new N(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new N(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new eu(N.fromPositions(new K(this.original.startLineNumber,1),HF(new K(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),N.fromPositions(new K(this.modified.startLineNumber,1),HF(new K(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new eu(N.fromPositions(HF(new K(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),HF(new K(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),N.fromPositions(HF(new K(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),HF(new K(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new vi}};gd=class i extends tu{static fromRangeMappings(e){let t=Yt.join(e.map(r=>Yt.fromRangeInclusive(r.originalRange))),n=Yt.join(e.map(r=>Yt.fromRangeInclusive(r.modifiedRange)));return new i(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new i(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new i(this.original,this.modified,[this.toRangeMapping()])}},eu=class i{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new i(this.modifiedRange,this.originalRange)}toTextEdit(e){let t=e.getValueOfRange(this.modifiedRange);return new Wu(this.originalRange,t)}}});function Uct(i,e,t,n){return new sx(i,e,t).ComputeDiff(n)}function pmi(i){if(i.length<=1)return i;let e=[i[0]],t=e[0];for(let n=1,r=i.length;n!0;let e=Date.now();return()=>Date.now()-e{z7();oee();fy();Pt();We();Mb();md();fmi=3,lee=class{computeDiff(e,t,n){let o=new yTe(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[],a=null;for(let l of o.changes){let c;l.originalEndLineNumber===0?c=new Yt(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Yt(l.originalStartLineNumber,l.originalEndLineNumber+1);let u;l.modifiedEndLineNumber===0?u=new Yt(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):u=new Yt(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let d=new gd(c,u,l.charChanges?.map(h=>new eu(new N(h.originalStartLineNumber,h.originalStartColumn,h.originalEndLineNumber,h.originalEndColumn),new N(h.modifiedStartLineNumber,h.modifiedStartColumn,h.modifiedEndLineNumber,h.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===d.modified.startLineNumber||a.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new gd(a.original.join(d.original),a.modified.join(d.modified),a.innerChanges&&d.innerChanges?a.innerChanges.concat(d.innerChanges):void 0),s.pop()),s.push(d),a=d}return Nb(()=>oF(s,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},WF=class i{constructor(e,t,n,r,o,s,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,n){let r=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=n.getStartLineNumber(e.modifiedStart),c=n.getStartColumn(e.modifiedStart),u=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new i(r,o,s,a,l,c,u,d)}};q7=class i{constructor(e,t,n,r,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,this.charChanges=o}static createFromDiffResult(e,t,n,r,o,s,a){let l,c,u,d,h;if(t.originalLength===0?(l=n.getStartLineNumber(t.originalStart)-1,c=0):(l=n.getStartLineNumber(t.originalStart),c=n.getEndLineNumber(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(u=r.getStartLineNumber(t.modifiedStart)-1,d=0):(u=r.getStartLineNumber(t.modifiedStart),d=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){let f=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),p=r.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(f.getElements().length>0&&p.getElements().length>0){let g=Uct(f,p,o,!0).changes;a&&(g=pmi(g)),h=[];for(let v=0,A=g.length;v1&&g>1;){let v=h.charCodeAt(p-2),A=f.charCodeAt(g-2);if(v!==A)break;p--,g--}(p>1||g>1)&&this._pushTrimWhitespaceCharChange(r,o+1,1,p,s+1,1,g)}{let p=xTe(h,1),g=xTe(f,1),v=h.length+1,A=f.length+1;for(;p{Qt();Lt();Kf();my=class i{static trivial(e,t){return new i([new ca(Di.ofLength(e.length),Di.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new i([new ca(Di.ofLength(e.length),Di.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}},ca=class i{static invert(e,t){let n=[];return e$(e,(r,o)=>{n.push(i.fromOffsetPairs(r?r.getEndExclusives():py.zero,o?o.getStarts():new py(t,(r?r.seq2Range.endExclusive-r.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new i(new Di(e.offset1,t.offset1),new Di(e.offset2,t.offset2))}static assertSorted(e){let t;for(let n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new vi("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new i(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new i(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new i(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new i(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new i(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new i(t,n)}getStarts(){return new py(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new py(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},py=class i{static{this.zero=new i(0,0)}static{this.max=new i(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new i(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}},qS=class i{static{this.instance=new i}isValid(){return!0}},uee=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new vi("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime{jF=class{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,n){this.array[e+t*this.width]=n}};Y7=class i{static{this.chrKeys=new Map}static getKey(e){let t=this.chrKeys.get(e);return t===void 0&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,n){this.range=e,this.lines=t,this.source=n,this.histogram=[];let r=0;for(let o=e.startLineNumber-1;o{Kf();UF();dee();hee=class{compute(e,t,n=qS.instance,r){if(e.length===0||t.length===0)return my.trivial(e,t);let o=new jF(e.length,t.length),s=new jF(e.length,t.length),a=new jF(e.length,t.length);for(let p=0;p0&&g>0&&s.get(p-1,g-1)===3&&(w+=a.get(p-1,g-1)),w+=r?r(p,g):1):w=-1;let C=Math.max(v,A,w);if(C===w){let _=p>0&&g>0?a.get(p-1,g-1):0;a.set(p,g,_+1),s.set(p,g,3)}else C===v?(a.set(p,g,0),s.set(p,g,1)):C===A&&(a.set(p,g,0),s.set(p,g,2));o.set(p,g,C)}let l=[],c=e.length,u=t.length;function d(p,g){(p+1!==c||g+1!==u)&&l.push(new ca(new Di(p+1,c),new Di(g+1,u))),c=p,u=g}let h=e.length-1,f=t.length-1;for(;h>=0&&f>=0;)s.get(h,f)===3?(d(h,f),h--,f--):s.get(h,f)===1?h--:f--;return d(-1,-1),l.reverse(),new my(l,!1)}}});var QF,fee,CTe,_Te,STe=D(()=>{Kf();UF();QF=class{compute(e,t,n=qS.instance){if(e.length===0||t.length===0)return my.trivial(e,t);let r=e,o=t;function s(g,v){for(;gr.length||E>o.length)continue;let I=s(_,E);l.set(u,I);let T=_===w?c.get(u+1):c.get(u-1);if(c.set(u,I!==_?new fee(T,_,E,I-_):T),l.get(u)===r.length&&l.get(u)-u===o.length)break e}}let d=c.get(u),h=[],f=r.length,p=o.length;for(;;){let g=d?d.x+d.length:0,v=d?d.y+d.length:0;if((g!==f||v!==p)&&h.push(new ca(new Di(g,f),new Di(v,p))),!d)break;f=d.x,p=d.y,d=d.prev}return h.reverse(),new my(h,!1)}},fee=class{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}},CTe=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},_Te=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}});function ETe(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}function Gct(i){return mmi[i]}function qct(i){return i===10?8:i===13?7:K7(i)?6:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:i===44||i===59?5:4}var YS,mmi,DTe=D(()=>{Jf();Kf();Nt();We();dee();YS=class{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let o=e[r-1],s=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,o=o.substring(s)),this.lineStartOffsets.push(s);let a=0;if(!n){let c=o.trimStart();a=o.length-c.length,o=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let l=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-a,o.length):o.length;for(let c=0;cString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let t=qct(e>0?this.elements[e-1]:-1),n=qct(eo<=e),r=e-this.firstElementOffsetByLineIdx[n];return new K(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(r===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){let t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?N.fromPositions(n,n):N.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!ETe(this.elements[e]))return;let t=e;for(;t>0&&ETe(this.elements[t-1]);)t--;let n=e;for(;nr<=e.start)??0,n=Rct(this.firstElementOffsetByLineIdx,r=>e.endExclusive<=r)??this.elements.length;return new Di(t,n)}};mmi={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10}});function Kct(i,e,t,n,r,o){let{moves:s,excludedChanges:a}=bmi(i,e,t,o);if(!o.isValid())return[];let l=i.filter(u=>!a.has(u)),c=vmi(l,n,r,e,t,o);return v7(s,c),s=Ami(s),s=s.filter(u=>{let d=u.original.toOffsetRange().slice(e).map(f=>f.trim());return d.join(` -`).length>=15&&gmi(d,f=>f.length>=2)>=2}),s=ymi(i,s),s}function gmi(i,e){let t=0;for(let n of i)e(n)&&t++;return t}function bmi(i,e,t,n){let r=[],o=i.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new Y7(l.original,e,l)),s=new Set(i.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new Y7(l.modified,t,l))),a=new Set;for(let l of o){let c=-1,u;for(let d of s){let h=l.computeSimilarity(d);h>c&&(c=h,u=d)}if(c>.9&&u&&(s.delete(u),r.push(new tu(l.range,u.range)),a.add(l.source),a.add(u.source)),!n.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}function vmi(i,e,t,n,r,o){let s=[],a=new HS;for(let h of i)for(let f=h.original.startLineNumber;fh.modified.startLineNumber,ud));for(let h of i){let f=[];for(let p=h.modified.startLineNumber;p{for(let _ of f)if(_.originalLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive&&_.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){_.originalLineRange=new Yt(_.originalLineRange.startLineNumber,w.endLineNumberExclusive),_.modifiedLineRange=new Yt(_.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),A.push(_);return}let C={modifiedLineRange:v,originalLineRange:w};l.push(C),A.push(C)}),f=A}if(!o.isValid())return[]}l.sort(n$(aa(h=>h.modifiedLineRange.length,ud)));let c=new gg,u=new gg;for(let h of l){let f=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,p=c.subtractFrom(h.modifiedLineRange),g=u.subtractFrom(h.originalLineRange).getWithDelta(f),v=p.getIntersection(g);for(let A of v.ranges){if(A.length<3)continue;let w=A,C=A.delta(-f);s.push(new tu(C,w)),c.addRange(w),u.addRange(C)}}s.sort(aa(h=>h.original.startLineNumber,ud));let d=new j7(i);for(let h=0;hI.original.startLineNumber<=f.original.startLineNumber),g=ux(i,I=>I.modified.startLineNumber<=f.modified.startLineNumber),v=Math.max(f.original.startLineNumber-p.original.startLineNumber,f.modified.startLineNumber-g.modified.startLineNumber),A=d.findLastMonotonous(I=>I.original.startLineNumberI.modified.startLineNumbern.length||T>r.length||c.contains(T)||u.contains(I)||!Yct(n[I-1],r[T-1],o))break}_>0&&(u.addRange(new Yt(f.original.startLineNumber-_,f.original.startLineNumber)),c.addRange(new Yt(f.modified.startLineNumber-_,f.modified.startLineNumber)));let E;for(E=0;En.length||T>r.length||c.contains(T)||u.contains(I)||!Yct(n[I-1],r[T-1],o))break}E>0&&(u.addRange(new Yt(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+E)),c.addRange(new Yt(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+E))),(_>0||E>0)&&(s[h]=new tu(new Yt(f.original.startLineNumber-_,f.original.endLineNumberExclusive+E),new Yt(f.modified.startLineNumber-_,f.modified.endLineNumberExclusive+E)))}return s}function Yct(i,e,t){if(i.trim()===e.trim())return!0;if(i.length>300&&e.length>300)return!1;let r=new QF().compute(new YS([i],new N(1,1,1,i.length),!1),new YS([e],new N(1,1,1,e.length),!1),t),o=0,s=ca.invert(r.diffs,i.length);for(let u of s)u.seq1Range.forEach(d=>{K7(i.charCodeAt(d))||o++});function a(u){let d=0;for(let h=0;he.length?i:e);return o/l>.6&&l>10}function Ami(i){if(i.length===0)return i;i.sort(aa(t=>t.original.startLineNumber,ud));let e=[i[0]];for(let t=1;t=0&&s>=0&&o+s<=2){e[e.length-1]=n.join(r);continue}e.push(r)}return e}function ymi(i,e){let t=new j7(i);return e=e.filter(n=>{let r=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber{UF();fy();Qt();Jf();ql();md();DTe();dee();STe();We()});function J7(i,e,t){let n=t;return n=Xct(i,e,n),n=Xct(i,e,n),n=wmi(i,e,n),n}function Xct(i,e,t){if(t.length===0)return t;let n=[];n.push(t[0]);for(let o=1;o0&&(a=a.delta(c))}r.push(a)}return n.length>0&&r.push(n[n.length-1]),r}function wmi(i,e,t){if(!i.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,o=t[n],s=n+1=n.start&&i.seq2Range.start-s>=r.start&&t.isStronglyEqual(i.seq2Range.start-s,i.seq2Range.endExclusive-s)&&s<100;)s++;s--;let a=0;for(;i.seq1Range.start+ac&&(c=p,l=u)}return i.delta(l)}function $ct(i,e,t){let n=[];for(let r of t){let o=n[n.length-1];if(!o){n.push(r);continue}r.seq1Range.start-o.seq1Range.endExclusive<=2||r.seq2Range.start-o.seq2Range.endExclusive<=2?n[n.length-1]=new ca(o.seq1Range.join(r.seq1Range),o.seq2Range.join(r.seq2Range)):n.push(r)}return n}function eut(i,e,t){let n=ca.invert(t,i.length),r=[],o=new py(0,0);function s(l,c){if(l.offset10;){let v=n[0];if(!(v.seq1Range.intersects(h.seq1Range)||v.seq2Range.intersects(h.seq2Range)))break;let w=i.findWordContaining(v.seq1Range.start),C=e.findWordContaining(v.seq2Range.start),_=new ca(w,C),E=_.intersect(v);if(p+=E.seq1Range.length,g+=E.seq2Range.length,h=h.join(_),h.seq1Range.endExclusive>=v.seq1Range.endExclusive)n.shift();else break}p+g<(h.seq1Range.length+h.seq2Range.length)*2/3&&r.push(h),o=h.getEndExclusives()}for(;n.length>0;){let l=n.shift();l.seq1Range.isEmpty||(s(l.getStarts(),l),s(l.getEndExclusives().delta(-1),l))}return xmi(t,r)}function xmi(i,e){let t=[];for(;i.length>0||e.length>0;){let n=i[0],r=e[0],o;n&&(!r||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=o.seq1Range.start?t[t.length-1]=t[t.length-1].join(o):t.push(o)}return t}function tut(i,e,t){let n=t;if(n.length===0)return n;let r=0,o;do{o=!1;let s=[n[0]];for(let a=1;a5||f.seq1Range.length+f.seq2Range.length>5)},l=n[a],c=s[s.length-1];u(c,l)?(o=!0,s[s.length-1]=s[s.length-1].join(l)):s.push(l)}n=s}while(r++<10&&o);return n}function iut(i,e,t){let n=t;if(n.length===0)return n;let r=0,o;do{o=!1;let a=[n[0]];for(let l=1;l5||g.length>500)return!1;let A=i.getText(g).trim();if(A.length>20||A.split(/\r\n|\r|\n/).length>1)return!1;let w=i.countLinesIn(f.seq1Range),C=f.seq1Range.length,_=e.countLinesIn(f.seq2Range),E=f.seq2Range.length,I=i.countLinesIn(p.seq1Range),T=p.seq1Range.length,L=e.countLinesIn(p.seq2Range),M=p.seq2Range.length,z=130;function H(B){return Math.min(B,z)}return Math.pow(Math.pow(H(w*40+C),1.5)+Math.pow(H(_*40+E),1.5),1.5)+Math.pow(Math.pow(H(I*40+T),1.5)+Math.pow(H(L*40+M),1.5),1.5)>(z**1.5)**1.5*1.3},c=n[l],u=a[a.length-1];d(u,c)?(o=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(r++<10&&o);let s=[];return Elt(n,(a,l,c)=>{let u=l;function d(A){return A.length>0&&A.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}let h=i.extendToFullLines(l.seq1Range),f=i.getText(new Di(h.start,l.seq1Range.start));d(f)&&(u=u.deltaStart(-f.length));let p=i.getText(new Di(l.seq1Range.endExclusive,h.endExclusive));d(p)&&(u=u.deltaEnd(p.length));let g=ca.fromOffsetPairs(a?a.getEndExclusives():py.zero,c?c.getStarts():py.max),v=u.intersect(g);s.length>0&&v.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(v):s.push(v)}),s}var TTe=D(()=>{Qt();Kf();UF()});function nut(i){let e=0;for(;e{X7=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let t=e===0?0:nut(this.lines[e-1]),n=e===this.lines.length?0:nut(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}});function out(i,e,t,n=!1){let r=[];for(let o of xF(i.map(s=>Cmi(s,e,t)),(s,a)=>s.original.overlapOrTouch(a.original)||s.modified.overlapOrTouch(a.modified))){let s=o[0],a=o[o.length-1];r.push(new gd(s.original.join(a.original),s.modified.join(a.modified),o.map(l=>l.innerChanges[0])))}return Nb(()=>!n&&r.length>0&&(r[0].modified.startLineNumber!==r[0].original.startLineNumber||t.length-r[r.length-1].modified.endLineNumberExclusive!==e.length-r[r.length-1].original.endLineNumberExclusive)?!1:oF(r,(o,s)=>s.original.startLineNumber-o.original.endLineNumberExclusive===s.modified.startLineNumber-o.modified.endLineNumberExclusive&&o.original.endLineNumberExclusive=t[i.modifiedRange.startLineNumber-1].length&&i.originalRange.startColumn-1>=e[i.originalRange.startLineNumber-1].length&&i.originalRange.startLineNumber<=i.originalRange.endLineNumber+r&&i.modifiedRange.startLineNumber<=i.modifiedRange.endLineNumber+r&&(n=1);let o=new Yt(i.originalRange.startLineNumber+n,i.originalRange.endLineNumber+1+r),s=new Yt(i.modifiedRange.startLineNumber+n,i.modifiedRange.endLineNumber+1+r);return new gd(o,s,[i])}function _mi(i){return new tu(new Yt(i.seq1Range.start+1,i.seq1Range.endExclusive+1),new Yt(i.seq2Range.start+1,i.seq2Range.endExclusive+1))}var GF,kTe=D(()=>{Qt();Mb();md();Kf();We();UF();Qct();STe();Jct();TTe();rut();DTe();oee();fy();GF=class{constructor(){this.dynamicProgrammingDiffing=new hee,this.myersDiffingAlgorithm=new QF}computeDiff(e,t,n){if(e.length<=1&&Zi(e,t,(E,I)=>E===I))return new jS([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new jS([new gd(new Yt(1,e.length+1),new Yt(1,t.length+1),[new eu(new N(1,1,e.length,e[e.length-1].length+1),new N(1,1,t.length,t[t.length-1].length+1))])],[],!1);let r=n.maxComputationTimeMs===0?qS.instance:new uee(n.maxComputationTimeMs),o=!n.ignoreTrimWhitespace,s=new Map;function a(E){let I=s.get(E);return I===void 0&&(I=s.size,s.set(E,I)),I}let l=e.map(E=>a(E.trim())),c=t.map(E=>a(E.trim())),u=new X7(l,e),d=new X7(c,t),h=u.length+d.length<1700?this.dynamicProgrammingDiffing.compute(u,d,r,(E,I)=>e[E]===t[I]?t[I].length===0?.1:1+Math.log(1+t[I].length):.99):this.myersDiffingAlgorithm.compute(u,d,r),f=h.diffs,p=h.hitTimeout;f=J7(u,d,f),f=tut(u,d,f);let g=[],v=E=>{if(o)for(let I=0;IE.seq1Range.start-A===E.seq2Range.start-w);let I=E.seq1Range.start-A;v(I),A=E.seq1Range.endExclusive,w=E.seq2Range.endExclusive;let T=this.refineDiff(e,t,E,r,o);T.hitTimeout&&(p=!0);for(let L of T.mappings)g.push(L)}v(e.length-A);let C=out(g,e,t),_=[];return n.computeMoves&&(_=this.computeMoves(C,e,t,l,c,r,o)),Nb(()=>{function E(T,L){if(T.lineNumber<1||T.lineNumber>L.length)return!1;let M=L[T.lineNumber-1];return!(T.column<1||T.column>M.length+1)}function I(T,L){return!(T.startLineNumber<1||T.startLineNumber>L.length+1||T.endLineNumberExclusive<1||T.endLineNumberExclusive>L.length+1)}for(let T of C){if(!T.innerChanges)return!1;for(let L of T.innerChanges)if(!(E(L.modifiedRange.getStartPosition(),t)&&E(L.modifiedRange.getEndPosition(),t)&&E(L.originalRange.getStartPosition(),e)&&E(L.originalRange.getEndPosition(),e)))return!1;if(!I(T.modified,t)||!I(T.original,e))return!1}return!0}),new jS(C,_,p)}computeMoves(e,t,n,r,o,s,a){return Kct(e,t,n,r,o,s).map(u=>{let d=this.refineDiff(t,n,new ca(u.original.toOffsetRange(),u.modified.toOffsetRange()),s,a),h=out(d.mappings,t,n,!0);return new VF(u,h)})}refineDiff(e,t,n,r,o){let a=_mi(n).toRangeMapping2(e,t),l=new YS(e,a.originalRange,o),c=new YS(t,a.modifiedRange,o),u=l.length+c.length<500?this.dynamicProgrammingDiffing.compute(l,c,r):this.myersDiffingAlgorithm.compute(l,c,r),d=!1,h=u.diffs;d&&ca.assertSorted(h),h=J7(l,c,h),d&&ca.assertSorted(h),h=eut(l,c,h),d&&ca.assertSorted(h),h=$ct(l,c,h),d&&ca.assertSorted(h),h=iut(l,c,h),d&&ca.assertSorted(h);let f=h.map(p=>new eu(l.translateRange(p.seq1Range),c.translateRange(p.seq2Range)));return d&&eu.assertSorted(f),{mappings:f,hitTimeout:u.hitTimeout}}}});var ITe,sut=D(()=>{jct();kTe();ITe={getLegacy:()=>new lee,getDefault:()=>new GF}});function cut(i){let e=[];for(let t of i){let n=Number(t);(n||n===0&&t.replace(/\s/g,"")!=="")&&e.push(n)}return e}function LTe(i,e,t,n){return{red:i/255,blue:t/255,green:e/255,alpha:n}}function Z7(i,e){let t=e.index,n=e[0].length;if(!t)return;let r=i.positionAt(t);return{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+n}}function Smi(i,e){if(!i)return;let t=pe.Format.CSS.parseHex(e);if(t)return{range:i,color:LTe(t.rgba.r,t.rgba.g,t.rgba.b,t.rgba.a)}}function aut(i,e,t){if(!i||e.length!==1)return;let r=e[0].values(),o=cut(r);return{range:i,color:LTe(o[0],o[1],o[2],t?o[3]:1)}}function lut(i,e,t){if(!i||e.length!==1)return;let r=e[0].values(),o=cut(r),s=new pe(new $A(o[0],o[1]/100,o[2]/100,t?o[3]:1));return{range:i,color:LTe(s.rgba.r,s.rgba.g,s.rgba.b,s.rgba.a)}}function $7(i,e){return typeof i=="string"?[...i.matchAll(e)]:i.findMatches(e)}function Emi(i){let e=[],n=$7(i,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(let r of n){let o=r.filter(c=>c!==void 0),s=o[1],a=o[2];if(!a)continue;let l;if(s==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=aut(Z7(i,r),$7(a,c),!1)}else if(s==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=aut(Z7(i,r),$7(a,c),!0)}else if(s==="hsl"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=lut(Z7(i,r),$7(a,c),!1)}else if(s==="hsla"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=lut(Z7(i,r),$7(a,c),!0)}else s==="#"&&(l=Smi(Z7(i,r),s+a));l&&e.push(l)}return e}function uut(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:Emi(i)}var dut=D(()=>{Ho()});function fut(i,e){let t=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){let n=Tmi(i,e);t=t.concat(n)}if(e.findMarkSectionHeaders){let n=kmi(i);t=t.concat(n)}return t}function Tmi(i,e){let t=[],n=i.getLineCount();for(let r=1;r<=n;r++){let o=i.getLineContent(r),s=o.match(e.foldingRules.markers.start);if(s){let a={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:o.length+1};if(a.endColumn>a.startColumn){let l={range:a,...put(o.substring(s[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&t.push(l)}}}return t}function kmi(i){let e=[],t=i.getLineCount();for(let n=1;n<=t;n++){let r=i.getLineContent(n);Imi(r,n,e)}return e}function Imi(i,e,t){hut.lastIndex=0;let n=hut.exec(i);if(n){let r=n.indices[1][0]+1,o=n.indices[1][1]+1,s={startLineNumber:e,startColumn:r,endLineNumber:e,endColumn:o};if(s.endColumn>s.startColumn){let a={range:s,...put(n[1]),shouldBeInComments:!0};(a.text||a.hasSeparatorLine)&&t.push(a)}}}function put(i){i=i.trim();let e=i.startsWith("-");return i=i.replace(Dmi,""),{text:i,hasSeparatorLine:e}}var hut,Dmi,mut=D(()=>{hut=new RegExp("\\bMARK:\\s*(.*)$","d"),Dmi=/^-+|-+$/g});var pee,mee,gee,NTe=D(()=>{Qt();V7();pee=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=TI(e);let n=this.values,r=this.prefixSum,o=t.length;return o===0?!1:(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=TI(e),t=TI(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;let o=n.length-e;return t>=o&&(t=o),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=TI(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,o=0,s=0;for(;t<=n;)if(r=t+(n-t)/2|0,o=this.prefixSum[r],s=o-this.values[r],e=o)t=r+1;else break;return new gee(r,e-s)}},mee=class{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new gee(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=DS(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=r+n;for(let o=0;o{Pt();Nt();NTe();bee=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new K(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;r{Jt();ae();mn();Nt();We();uI();gut();but=60*1e3,vee=class extends W{constructor(e,t,n=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let r=new hS;r.cancelAndSet(()=>this._checkStopModelSync(),Math.round(but/2)),this._register(r)}}dispose(){for(let e in this._syncedModels)Vi(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(let n of e){let r=n.toString();this._syncedModels[r]||this._beginModelSync(n,t),this._syncedModels[r]&&(this._syncedModelsLastUsedTime[r]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>but&&t.push(n);for(let n of t)this._stopModelSync(n)}_beginModelSync(e,t){let n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;let r=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});let o=new te;o.add(n.onDidChangeContent(s=>{this._proxy.$acceptModelChanged(r.toString(),s)})),o.add(n.onWillDispose(()=>{this._stopModelSync(r)})),o.add(Ve(()=>{this._proxy.$acceptRemovedModel(r)})),this._syncedModels[r]=o}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Vi(t)}},Aee=class{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new MTe(Xe.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},MTe=class extends bee{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{let o=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>o&&(n=o,r=!0)}return r?{lineNumber:t,column:n}:e}}});var Lmi,FTe,MI,vut=D(()=>{z7();We();Dct();Tct();X5();hTe();id();bTe();sut();Xd();bl();dut();mut();RTe();Lmi=!0,FTe=class{constructor(){this._workerTextModelSyncServer=new Aee}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){let r=this._getModel(e);return r?LI.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){let n=this._getModel(e);return n?fut(n,t):[]}async $computeDiff(e,t,n,r){let o=this._getModel(e),s=this._getModel(t);return!o||!s?null:MI.computeDiff(o,s,n,r)}static computeDiff(e,t,n,r){let o=r==="advanced"?ITe.getDefault():ITe.getLegacy(),s=e.getLinesContent(),a=t.getLinesContent(),l=o.computeDiff(s,a,n),c=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function u(d){return d.map(h=>[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,h.innerChanges?.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])])}return{identical:c,quitEarly:l.hitTimeout,changes:u(l.changes),moves:l.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,u(d.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount(),r=t.getLineCount();if(n!==r)return!1;for(let o=1;o<=n;o++){let s=e.getLineContent(o),a=t.getLineContent(o);if(s!==a)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){let r=this._getModel(e);if(!r)return t;let o=[],s;t=t.slice(0).sort((l,c)=>{if(l.range&&c.range)return N.compareRangesUsingStarts(l.range,c.range);let u=l.range?0:1,d=c.range?0:1;return u-d});let a=0;for(let l=1;lMI._diffLimit){o.push({range:l,text:c});continue}let h=Sct(d,c,n),f=r.offsetAt(N.lift(l).getStartPosition());for(let p of h){let g=r.positionAt(f+p.originalStart),v=r.positionAt(f+p.originalStart+p.originalLength),A={text:c.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:v.lineNumber,endColumn:v.column}};r.getValueInRange(A.range)!==A.text&&o.push(A)}}return typeof s=="number"&&o.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),o}async $computeLinks(e){let t=this._getModel(e);return t?Ect(t):null}async $computeDefaultDocumentColors(e){let t=this._getModel(e);return t?uut(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,r){let o=new Ar,s=new RegExp(n,r),a=new Set;e:for(let l of e){let c=this._getModel(l);if(c){for(let u of c.words(s))if(!(u===t||!isNaN(Number(u)))&&(a.add(u),a.size>MI._suggestionsLimit))break e}}return{words:Array.from(a),duration:o.elapsed()}}async $computeWordRanges(e,t,n,r){let o=this._getModel(e);if(!o)return Object.create(null);let s=new RegExp(n,r),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.$fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(A7(this._foreignModule))):new Promise((a,l)=>{let c=u=>{this._foreignModule=u.create(s,t),a(A7(this._foreignModule))};Lmi?import(`${jw.asBrowserUri(`${e}.js`).toString(!0)}`).then(c).catch(l):require([`${e}`],c,l)})}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};typeof importScripts=="function"&&(globalThis.monaco=pK())});var RI,yee,ez=D(()=>{ht();RI=vt("textResourceConfigurationService"),yee=vt("textResourcePropertiesService")});var Le,Ui=D(()=>{ht();Le=vt("ILanguageFeaturesService")});function OI(i,e){let t=i.getModel(e);return!(!t||t.isTooLargeForSyncing())}var zTe,FI,Aut,wee,OTe,PTe,BTe,tz,VTe=D(()=>{Jt();ae();zDe();oct();We();ks();vut();Zc();ez();Qt();th();id();Lt();Ui();oee();fy();md();ad();Ye();RTe();hTe();zTe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FI=function(i,e){return function(t,n){e(t,n,i)}},Aut=300*1e3;wee=class extends W{constructor(e,t,n,r,o,s){super(),this._languageConfigurationService=o,this._modelService=t,this._workerManager=this._register(new PTe(e,this._modelService)),this._logService=r,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(a,l)=>{if(!OI(this._modelService,a.uri))return Promise.resolve({links:[]});let u=await(await this._workerWithResources([a.uri])).$computeLinks(a.uri.toString());return u&&{links:u}}})),this._register(s.completionProvider.register("*",new OTe(this._workerManager,n,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return OI(this._modelService,e)}async computedUnicodeHighlights(e,t,n){return(await this._workerWithResources([e])).$computeUnicodeHighlights(e.toString(),t,n)}async computeDiff(e,t,n,r){let s=await(await this._workerWithResources([e,t],!0)).$computeDiff(e.toString(),t.toString(),n,r);if(!s)return null;return{identical:s.identical,quitEarly:s.quitEarly,changes:l(s.changes),moves:s.moves.map(c=>new VF(new tu(new Yt(c[0],c[1]),new Yt(c[2],c[3])),l(c[4])))};function l(c){return c.map(u=>new gd(new Yt(u[0],u[1]),new Yt(u[2],u[3]),u[4]?.map(d=>new eu(new N(d[0],d[1],d[2],d[3]),new N(d[4],d[5],d[6],d[7])))))}}async computeMoreMinimalEdits(e,t,n=!1){if(Jo(t)){if(!OI(this._modelService,e))return Promise.resolve(t);let r=Ar.create(),o=this._workerWithResources([e]).then(s=>s.$computeMoreMinimalEdits(e.toString(),t,n));return o.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),r.elapsed())),Promise.race([o,Jd(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return OI(this._modelService,e)}async navigateValueSet(e,t,n){let r=this._modelService.getModel(e);if(!r)return null;let o=this._languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),s=o.source,a=o.flags;return(await this._workerWithResources([e])).$navigateValueSet(e.toString(),t,n,s,a)}canComputeWordRanges(e){return OI(this._modelService,e)}async computeWordRanges(e,t){let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let r=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),o=r.source,s=r.flags;return(await this._workerWithResources([e])).$computeWordRanges(e.toString(),t,o,s)}async findSectionHeaders(e,t){return(await this._workerWithResources([e])).$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){return(await this._workerWithResources([e])).$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){return await(await this._workerManager.withWorker()).workerWithSyncedResources(e,t)}};wee=zTe([FI(1,an),FI(2,RI),FI(3,no),FI(4,qi),FI(5,Le)],wee);OTe=class{constructor(e,t,n,r){this.languageConfigurationService=r,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}async provideCompletionItems(e,t){let n=this._configurationService.getValue(e.uri,t,"editor");if(n.wordBasedSuggestions==="off")return;let r=[];if(n.wordBasedSuggestions==="currentDocument")OI(this._modelService,e.uri)&&r.push(e.uri);else for(let d of this._modelService.getModels())OI(this._modelService,d.uri)&&(d===e?r.unshift(d.uri):(n.wordBasedSuggestions==="allDocuments"||d.getLanguageId()===e.getLanguageId())&&r.push(d.uri));if(r.length===0)return;let o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),a=s?new N(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):N.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),u=await(await this._workerManager.withWorker()).textualSuggest(r,s?.word,o);if(u)return{duration:u.duration,suggestions:u.words.map(d=>({kind:18,label:d,insertText:d,range:{insert:l,replace:a}}))}}},PTe=class extends W{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new bS).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Aut/2),Xi),this._register(this._modelService.onModelRemoved(r=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>Aut&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new tz(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};PTe=zTe([FI(1,an)],PTe);BTe=class{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}},tz=class extends W{constructor(e,t,n){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=n,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(rct(this._workerDescriptor)),W7.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){M7(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{let e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return M7(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new BTe(new MI(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new vee(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject(yqe());let n=await this._getProxy();return this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n}async textualSuggest(e,t,n){let r=await this.workerWithSyncedResources(e),o=n.source,s=n.flags;return r.$textualSuggest(e.map(a=>a.toString()),t,o,s)}dispose(){super.dispose(),this._disposed=!0}};tz=zTe([FI(2,an)],tz)});function Tr(i){return{id:i}}function iz(i){switch(i){case jf.DARK:return"vs-dark";case jf.HIGH_CONTRAST_DARK:return"hc-black";case jf.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}function ua(i){return yut.onColorThemeChange(i)}var Bn,WTe,HTe,yut,xee,Zn=D(()=>{et();ae();ht();sa();Pb();Bn=vt("themeService");WTe={ThemingContribution:"base.contributions.theming"},HTe=class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new G}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Ve(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}},yut=new HTe;Gi.add(WTe.ThemingContribution,yut);xee=class extends W{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}});var Nmi,Mmi,Cee,wut=D(()=>{et();ae();Sp();Zn();Nmi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Mmi=function(i,e){return function(t,n){e(t,n,i)}},Cee=class extends W{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new G),this._onCodeEditorAdd=this._register(new G),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new G),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new G),this._onDiffEditorAdd=this._register(new G),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new G),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Ro,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null,t=this.listCodeEditors();for(let n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){let t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){let r=e.toString(),o;this._modelProperties.has(r)?o=this._modelProperties.get(r):(o=new Map,this._modelProperties.set(r,o)),o.set(t,n)}getModelProperty(e,t){let n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}async openCodeEditor(e,t,n){for(let r of this._codeEditorOpenHandlers){let o=await r(e,t,n);if(o!==null)return o}return null}registerCodeEditorOpenHandler(e){let t=this._codeEditorOpenHandlers.unshift(e);return Ve(t)}};Cee=Nmi([Mmi(0,Bn)],Cee)});var Rmi,xut,nz,UTe=D(()=>{Ye();bl();wut();fs();Wt();wc();Zn();Rmi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xut=function(i,e){return function(t,n){e(t,n,i)}},nz=class extends Cee{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,r,o)=>r?this.doOpenEditor(r,n):null))}_checkContextKey(){let e=!1;for(let t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){let o=t.resource.scheme;if(o===jt.http||o===jt.https)return vZ(t.resource.toString()),e}return null}let r=t.options?t.options.selection:null;if(r)if(typeof r.endLineNumber=="number"&&typeof r.endColumn=="number")e.setSelection(r),e.revealRangeInCenter(r,1);else{let o={lineNumber:r.startLineNumber,column:r.startColumn};e.setPosition(o),e.revealPositionInCenter(o,1)}return e}findModel(e,t){let n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};nz=Rmi([xut(0,Ze),xut(1,Bn)],nz);ui(ai,nz,0)});var Kh,hx=D(()=>{ht();Kh=vt("layoutService")});var Cut,_ut,_ee,See,jTe=D(()=>{Ye();ad();Qt();et();fs();wc();hx();Cut=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_ut=function(i,e){return function(t,n){e(t,n,i)}},_ee=class{get mainContainer(){return CF(this._codeEditorService.listCodeEditors())?.getContainerDomNode()??Xi.document.body}get activeContainer(){return(this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor())?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return zh(this.mainContainer)}get activeContainerDimension(){return zh(this.activeContainer)}get containers(){return yl(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Se.None,this.onDidLayoutActiveContainer=Se.None,this.onDidLayoutContainer=Se.None,this.onDidChangeActiveContainer=Se.None,this.onDidAddContainer=Se.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};_ee=Cut([_ut(0,ai)],_ee);See=class extends _ee{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};See=Cut([_ut(1,ai)],See);ui(Kh,_ee,1)});var rz,qr,fx=D(()=>{Pt();(function(i){i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error"})(rz||(rz={}));(function(i){let e="error",t="warning",n="warn",r="info",o="ignore";function s(l){return l?Uw(e,l)?i.Error:Uw(t,l)||Uw(n,l)?i.Warning:Uw(r,l)?i.Info:i.Ignore:i.Ignore}i.fromValue=s;function a(l){switch(l){case i.Error:return e;case i.Warning:return t;case i.Info:return r;default:return o}}i.toString=a})(rz||(rz={}));qr=rz});var gy,qF=D(()=>{ht();gy=vt("dialogService")});var KS,Cn,Eee,_c=D(()=>{fx();ht();KS=qr,Cn=vt("notificationService"),Eee=class{}});var YF,oz,Dee,JS,Tee=D(()=>{ht();YF=vt("undoRedoService"),oz=class{constructor(e,t){this.resource=e,this.elements=t}},Dee=class i{static{this._ID=0}constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new i}},JS=class i{static{this._ID=0}constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new i}}});function kee(i){return i.scheme===jt.file?i.fsPath:i.path}var Fmi,Sut,KF,Eut,JF,Iee,Lee,QTe,Nee,sz,Dut,GTe,XF,Tut=D(()=>{Lt();ae();bl();fx();Oe();qF();wc();_c();Tee();Fmi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Sut=function(i,e){return function(t,n){e(t,n,i)}},KF=!1;Eut=0,JF=class{constructor(e,t,n,r,o,s,a){this.id=++Eut,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=r,this.groupOrder=o,this.sourceId=s,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}},Iee=class{constructor(e,t){this.resourceLabel=e,this.reason=t}},Lee=class{constructor(){this.elements=new Map}createMessage(){let e=[],t=[];for(let[,r]of this.elements)(r.reason===0?e:t).push(r.resourceLabel);let n=[];return e.length>0&&n.push(y({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(y({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` -`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}},QTe=class{constructor(e,t,n,r,o,s,a){this.id=++Eut,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=r,this.groupOrder=o,this.sourceId=s,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new Lee),this.removedResources.has(t)||this.removedResources.set(t,new Iee(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Lee),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Iee(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}},Nee=class{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` -`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(let n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(let n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(let t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){let t=[];for(let n=0,r=this._past.length;n=0;n--)t.push(this._future[n].id);return new oz(e,t)}restoreSnapshot(e){let t=e.elements.length,n=!0,r=0,o=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[r])&&(n=!1,o=0),!n&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let a=this._future.length-1;a>=0;a--,r++){let l=this._future[a];n&&(r>=t||l.id!==e.elements[r])&&(n=!1,s=a),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}o!==-1&&(this._past=this._past.slice(0,o)),s!==-1&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){let e=[],t=[];for(let n of this._past)e.push(n.actual);for(let n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}},sz=class{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=s,n=r)}return[t,n]}canUndo(e){if(e instanceof JS){let[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}let t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){pt(e);for(let n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(let t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(let t of e.editStacks)t.locked=!0;return()=>{for(let t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,r,o){let s=this._acquireLocks(n),a;try{a=t()}catch(l){return s(),r.dispose(),this._onError(l,e)}return a?a.then(()=>(s(),r.dispose(),o()),l=>(s(),r.dispose(),this._onError(l,e))):(s(),r.dispose(),o())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return W.None;let t=e.actual.prepareUndoRedo();return typeof t>"u"?W.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(W.None);let n=e.actual.prepareUndoRedo();return n?y_(n)?t(n):n.then(r=>t(r)):t(W.None)}_getAffectedEditStacks(e){let t=[];for(let n of e.strResources)t.push(this._editStacks.get(n)||Dut);return new sz(t)}_tryToSplitAndUndo(e,t,n,r){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(r),new XF(this._undo(e,0,!0));for(let o of t.strResources)this.removeElements(o);return this._notificationService.warn(r),new XF}_checkWorkspaceUndo(e,t,n,r){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,y({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(r&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,y({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));let o=[];for(let a of n.editStacks)a.getClosestPastElement()!==t&&o.push(a.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,y({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,y({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,y({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){let r=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,r,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,r,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(let[,t]of this._editStacks){let n=t.getClosestPastElement();if(n){if(n===e){let r=t.getSecondClosestPastElement();if(r&&r.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,n,r){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(u){u[u.All=0]="All",u[u.This=1]="This",u[u.Cancel=2]="Cancel"})(a||(a={}));let{result:l}=await this._dialogService.prompt({type:qr.Info,message:y("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:y({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>a.All},{label:y({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);let c=this._checkWorkspaceUndo(e,t,n,!1);if(c)return c.returnValue;r=!0}let o;try{o=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}let s=this._checkWorkspaceUndo(e,t,n,!0);if(s)return o.dispose(),s.returnValue;for(let a of n.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,o,()=>this._continueUndoInGroup(t.groupId,r))}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){let r=y({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(r);return}return this._invokeResourcePrepare(t,r=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new sz([e]),r,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[r,o]of this._editStacks){let s=o.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,n=r)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;let[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof JS){let[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;let r=this._editStacks.get(e),o=r.getClosestPastElement();if(!o)return;if(o.groupId){let[a,l]=this._findClosestUndoElementInGroup(o.groupId);if(o!==a&&l)return this._undo(l,t,n)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,o);try{return o.type===1?this._workspaceUndo(e,o,n):this._resourceUndo(r,o,n)}finally{KF&&this._print("undo")}}async _confirmAndContinueUndo(e,t,n){if((await this._dialogService.confirm({message:y("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:y({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:y("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(let[r,o]of this._editStacks){let s=o.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,y({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,y({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,y({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){let n=this._getAffectedEditStacks(t),r=this._checkWorkspaceRedo(e,t,n,!1);return r?r.returnValue:this._executeWorkspaceRedo(e,t,n)}async _executeWorkspaceRedo(e,t,n){let r;try{r=await this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}let o=this._checkWorkspaceRedo(e,t,n,!0);if(o)return r.dispose(),o.returnValue;for(let s of n.editStacks)s.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,r,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){let n=y({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new sz([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[r,o]of this._editStacks){let s=o.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder{az=class{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}},Mee=class{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{ht();ZF=vt("environmentService")});var Omi,kut,da,Fee,qTe,YTe,KTe,Kp=D(()=>{gS();ql();PI();Ree();wc();ht();th();bl();Omi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kut=function(i,e){return function(t,n){e(t,n,i)}},da=vt("ILanguageFeatureDebounceService");(function(i){let e=new WeakMap,t=0;function n(r){let o=e.get(r);return o===void 0&&(o=++t,e.set(r,o)),o}i.of=n})(Fee||(Fee={}));qTe=class{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}},YTe=class{constructor(e,t,n,r,o,s){this._logService=e,this._name=t,this._registry=n,this._default=r,this._min=o,this._max=s,this._cache=new Gl(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>X9(Fee.of(n),t),0)}get(e){let t=this._key(e),n=this._cache.get(t);return n?El(n.value,this._min,this._max):this.default()}update(e,t){let n=this._key(e),r=this._cache.get(n);r||(r=new Mee(6),this._cache.set(n,r));let o=El(r.update(t),this._min,this._max);return Gk(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){let e=new az;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=this._overall()|0||this._default;return El(e,this._min,this._max)}},KTe=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){let r=n?.min??50,o=n?.max??r**2,s=n?.key??void 0,a=`${Fee.of(e)},${r}${s?","+s:""}`,l=this._data.get(a);return l||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),l=new qTe(r*1.5)):l=new YTe(this._logService,t,e,this._overallAverage()|0||r*1.5,r,o),this._data.set(a,l)),l}_overallAverage(){let e=new az;for(let t of this._data.values())e.update(t.default());return e.value}};KTe=Omi([kut(0,no),kut(1,ZF)],KTe);ui(da,KTe,1)});var Is,BI=D(()=>{Is=class{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e),r=this.getFontStyle(e);return r&1&&(n+=" mtki"),r&2&&(n+=" mtkb"),r&4&&(n+=" mtku"),r&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){let n=this.getForeground(e),r=this.getFontStyle(e),o=`color: ${t[n]};`;r&1&&(o+="font-style: italic;"),r&2&&(o+="font-weight: bold;");let s="";return r&4&&(s+=" underline"),r&8&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){let t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}});function Jp(i){let e=0,t=0,n=0,r=0;for(let o=0,s=i.length;o{});var Oee,JTe,Pee,Iut=D(()=>{Nt();We();zI();Oee=class i{static create(e,t){return new i(e,new JTe(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e&&new N(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[r,o,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new i(this._startLineNumber,r),new i(this._startLineNumber+s,o)]}applyEdit(e,t){let[n,r,o]=Jp(t);this.acceptEdit(e,n,r,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,r,o){this._acceptDeleteRange(e),this._acceptInsertText(new K(e.startLineNumber,e.startColumn),t,n,r,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){let o=n-t;this._startLineNumber-=o;return}let r=this._tokens.getMaxDeltaLine();if(!(t>=r+1)){if(t<0&&n>=r+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let o=-t;this._startLineNumber-=o,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,r,o){if(t===0&&n===0)return;let s=e.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=t;return}let a=this._tokens.getMaxDeltaLine();s>=a+1||this._tokens.acceptInsertText(s,e.column-1,t,n,r,o)}},JTe=class i{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;ne)n=r-1;else{let s=r;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let a=r;for(;ae||h===e&&p>=t)&&(he||p===e&&v>=t){if(po?g-=o-n:g=n;else if(f===t&&p===n)if(f===r&&g>o)g-=o-n;else{u=!0;continue}else if(fo)f=t,p=n,g=p+(g-o);else{u=!0;continue}else if(f>r){if(l===0&&!u){c=a;break}f-=l}else if(f===r&&p>=o)e&&f===0&&(p+=e,g+=e),f-=l,p-=o-n,g-=o-n;else throw new Error("Not possible!");let A=4*c;s[A]=f,s[A+1]=p,s[A+2]=g,s[A+3]=v,c++}this._tokenCount=c}acceptInsertText(e,t,n,r,o,s){let a=n===0&&r===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),l=this._tokens,c=this._tokenCount;for(let u=0;uu&&n[5*w]===0;)w--;if(w-1===u){let C=d;for(;C+1I)e.warnOverlappingSemanticTokens(E,I+1);else{let H=e.getMetadata(M,z,t);H!==2147483647&&(p===0&&(p=E),h[f]=E-p,h[f+1]=I,h[f+2]=L,h[f+3]=H,f+=4,g=E,v=L)}l=E,c=I,a++}f!==h.length&&(h=h.subarray(0,f));let A=Oee.create(p,h);s.push(A)}return s}var Pmi,XTe,Bee,zee,ZTe,$Te,Hee=D(()=>{BI();Zn();th();Iut();Sl();Pmi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},XTe=function(i,e){return function(t,n){e(t,n,i)}},Bee=!1,zee=class{constructor(e,t,n,r){this._legend=e,this._themeService=t,this._languageService=n,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new $Te}getMetadata(e,t,n){let r=this._languageService.languageIdCodec.encodeLanguageId(n),o=this._hashTable.get(e,t,r),s;if(o)s=o.metadata,Bee&&this._logService.getLevel()===Ac.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Is.getForeground(s)}, fontStyle ${Is.getFontStyle(s).toString(2)}`);else{let a=this._legend.tokenTypes[e],l=[];if(a){let c=t;for(let d=0;c>0&&d>1;Bee&&c>0&&this._logService.getLevel()===Ac.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));let u=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof u>"u")s=2147483647;else{if(s=0,typeof u.italic<"u"){let d=(u.italic?1:0)<<11;s|=d|1}if(typeof u.bold<"u"){let d=(u.bold?2:0)<<11;s|=d|2}if(typeof u.underline<"u"){let d=(u.underline?4:0)<<11;s|=d|4}if(typeof u.strikethrough<"u"){let d=(u.strikethrough?8:0)<<11;s|=d|8}if(u.foreground){let d=u.foreground<<15;s|=d|16}s===0&&(s=2147483647)}}else Bee&&this._logService.getLevel()===Ac.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,a="not-in-legend";this._hashTable.add(e,t,r,s),Bee&&this._logService.getLevel()===Ac.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Is.getForeground(s)}, fontStyle ${Is.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,r,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${r} is outside the previous data (length ${o}).`))}};zee=Pmi([XTe(1,Bn),XTe(2,rn),XTe(3,no)],zee);ZTe=class{constructor(e,t,n,r){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=r,this.next=null}},$Te=class i{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){let o=this._elements;this._currentLengthIndex++,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{ht();VI=vt("semanticTokensStylingService")});var Bmi,eke,tke,Lut=D(()=>{ae();Sl();Zn();th();Hee();Wee();wc();Bmi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eke=function(i,e){return function(t,n){e(t,n,i)}},tke=class extends W{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new zee(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};tke=Bmi([eke(0,Bn),eke(1,no),eke(2,rn)],tke);ui(VI,tke,1)});function XS(i){return i===47||i===92}function ike(i){return i.replace(/[\\/]/g,yo.sep)}function Nut(i){return i.indexOf("/")===-1&&(i=ike(i)),/^[a-zA-Z]:(\/|$)/.test(i)&&(i="/"+i),i}function nke(i,e=yo.sep){if(!i)return"";let t=i.length,n=i.charCodeAt(0);if(XS(n)){if(XS(i.charCodeAt(1))&&!XS(i.charCodeAt(2))){let o=3,s=o;for(;oi.length)return!1;if(t){if(!KR(i,e))return!1;if(e.length===i.length)return!0;let o=e.length;return e.charAt(e.length-1)===n&&o--,i.charAt(o)===n}return e.charAt(e.length-1)!==n&&(e+=n),i.indexOf(e)===0}function Mut(i){return i>=65&&i<=90||i>=97&&i<=122}function Rut(i,e=Nr){return e?Mut(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}var Uee=D(()=>{H0();Si();Pt()});function Out(i,e){switch(i){case 0:return"";case 1:return`${Gee}*?`;default:return`(?:${Qee}|${Gee}+${Qee}${e?`|${Qee}${Gee}+`:""})*?`}}function Put(i,e){if(!i)return[];let t=[],n=!1,r=!1,o="";for(let s of i){switch(s){case e:if(!n&&!r){t.push(o),o="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":r=!0;break;case"]":r=!1;break}o+=s}return o&&t.push(o),t}function Wut(i){if(!i)return"";let e="",t=Put(i,Fut);if(t.every(n=>n===jee))e=".*";else{let n=!1;t.forEach((r,o)=>{if(r===jee){if(n)return;e+=Out(2,o===t.length-1)}else{let s=!1,a="",l=!1,c="";for(let u of r){if(u!=="}"&&s){a+=u;continue}if(l&&(u!=="]"||!c)){let d;u==="-"?d=u:(u==="^"||u==="!")&&!c?d="^":u===Fut?d="":d=Ja(u),c+=d;continue}switch(u){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{let h=`(?:${Put(a,",").map(f=>Wut(f)).join("|")})`;e+=h,s=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=Gee;continue;case"*":e+=Out(1);continue;default:e+=Ja(u)}}ooke(a,e)).filter(a=>a!==by),i),n=t.length;if(!n)return by;if(n===1)return t[0];let r=function(a,l){for(let c=0,u=t.length;c!!a.allBasenames);o&&(r.allBasenames=o.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(r.allPaths=s),r}function Hut(i,e,t){let n=kf===yo.sep,r=n?i:i.replace(Vmi,kf),o=kf+r,s=yo.sep+i,a;return t?a=function(l,c){return typeof l=="string"&&(l===r||l.endsWith(o)||!n&&(l===i||l.endsWith(s)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===r||!n&&l===i)?e:null},a.allPaths=[(t?"*/":"./")+i],a}function Jmi(i){try{let e=new RegExp(`^${Wut(i)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?i:null}}catch{return by}}function Uut(i,e,t){return!i||typeof e!="string"?!1:ske(i)(e,void 0,t)}function ske(i,e={}){if(!i)return zut;if(typeof i=="string"||Xmi(i)){let t=oke(i,e);if(t===by)return zut;let n=function(r,o){return!!t(r,o)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return Zmi(i,e)}function Xmi(i){let e=i;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function Zmi(i,e){let t=jut(Object.getOwnPropertyNames(i).map(a=>$mi(a,i[a],e)).filter(a=>a!==by)),n=t.length;if(!n)return by;if(!t.some(a=>!!a.requiresSiblings)){if(n===1)return t[0];let a=function(u,d){let h;for(let f=0,p=t.length;f{for(let f of h){let p=await f;if(typeof p=="string")return p}return null})():null},l=t.find(u=>!!u.allBasenames);l&&(a.allBasenames=l.allBasenames);let c=t.reduce((u,d)=>d.allPaths?u.concat(d.allPaths):u,[]);return c.length&&(a.allPaths=c),a}let r=function(a,l,c){let u,d;for(let h=0,f=t.length;h{for(let h of d){let f=await h;if(typeof f=="string")return f}return null})():null},o=t.find(a=>!!a.allBasenames);o&&(r.allBasenames=o.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(r.allPaths=s),r}function $mi(i,e,t){if(e===!1)return by;let n=oke(i,t);if(n===by)return by;if(typeof e=="boolean")return n;if(e){let r=e.when;if(typeof r=="string"){let o=(s,a,l,c)=>{if(!c||!n(s,a))return null;let u=r.replace("$(basename)",()=>l),d=c(u);return UX(d)?d.then(h=>h?i:null):d?i:null};return o.requiresSiblings=!0,o}}return n}function jut(i,e){let t=i.filter(a=>!!a.basenames);if(t.length<2)return i;let n=t.reduce((a,l)=>{let c=l.basenames;return c?a.concat(c):a},[]),r;if(e){r=[];for(let a=0,l=n.length;a{let c=l.patterns;return c?a.concat(c):a},[]);let o=function(a,l){if(typeof a!="string")return null;if(!l){let u;for(u=a.length;u>0;u--){let d=a.charCodeAt(u-1);if(d===47||d===92)break}l=a.substr(u)}let c=n.indexOf(l);return c!==-1?r[c]:null};o.basenames=n,o.patterns=r,o.allBasenames=n;let s=i.filter(a=>!a.basenames);return s.push(o),s}var jee,Fut,Qee,Gee,Vmi,Hmi,Wmi,Umi,jmi,Qmi,Gmi,But,zut,by,ake=D(()=>{Jt();Uee();ql();H0();Si();Pt();jee="**",Fut="/",Qee="[/\\\\]",Gee="[^/\\\\]",Vmi=/\//g;Hmi=/^\*\*\/\*\.[\w\.-]+$/,Wmi=/^\*\*\/([\w\.-]+)\/?$/,Umi=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,jmi=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,Qmi=/^\*\*((\/[\w\.-]+)+)\/?$/,Gmi=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,But=new Gl(1e4),zut=function(){return!1},by=function(){return null}});function cz(i,e,t,n,r,o){if(Array.isArray(i)){let s=0;for(let a of i){let l=cz(a,e,t,n,r,o);if(l===10)return l;l>s&&(s=l)}return s}else{if(typeof i=="string")return n?i==="*"?5:i===t?10:0:0;if(i){let{language:s,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:u}=i;if(!n&&!c)return 0;u&&r&&(e=r);let d=0;if(l)if(l===e.scheme)d=10;else if(l==="*")d=5;else return 0;if(s)if(s===t)d=10;else if(s==="*")d=Math.max(d,5);else return 0;if(u)if(u===o)d=10;else if(u==="*"&&o!==void 0)d=Math.max(d,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:mY(a.base)},h===e.fsPath||Uut(h,e.fsPath))d=10;else return 0}return d}else return 0}}var lke=D(()=>{ake();H0()});function Qut(i){return typeof i=="string"?!1:Array.isArray(i)?i.every(Qut):!!i.exclusive}function uz(i){return typeof i=="string"?!1:Array.isArray(i)?i.some(uz):!!i.isBuiltin}var qee,Eo,Gut=D(()=>{et();ae();tl();lke();qee=class{constructor(e,t,n,r,o){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=r,this.recursive=o}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}},Eo=class i{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new G,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Ve(()=>{if(n){let r=this._entries.indexOf(n);r>=0&&(this._entries.splice(r,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);let t=[];for(let n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e,t=!1){let n=[];return this._orderedForEach(e,t,r=>n.push(r.provider)),n}orderedGroups(e){let t=[],n,r;return this._orderedForEach(e,!1,o=>{n&&r===o._score?n.push(o.provider):(r=o._score,n=[o.provider],t.push(n))}),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(let r of this._entries)r._score>0&&n(r)}_updateScores(e,t){let n=this._notebookInfoResolver?.(e.uri),r=n?new qee(e.uri,e.getLanguageId(),n.uri,n.type,t):new qee(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(r)){this._lastCandidate=r;for(let o of this._entries)if(o._score=cz(o.selector,r.uri,r.languageId,tee(e),r.notebookUri,r.notebookType),Qut(o.selector)&&o._score>0)if(t)o._score=0;else{for(let s of this._entries)s._score=0;o._score=1e3;break}this._entries.sort(i._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:uz(e.selector)&&!uz(t.selector)?1:!uz(e.selector)&&uz(t.selector)?-1:e._timet._time?-1:0}}});var cke,qut=D(()=>{Gut();Ui();wc();cke=class{constructor(){this.referenceProvider=new Eo(this._score.bind(this)),this.renameProvider=new Eo(this._score.bind(this)),this.newSymbolNamesProvider=new Eo(this._score.bind(this)),this.codeActionProvider=new Eo(this._score.bind(this)),this.definitionProvider=new Eo(this._score.bind(this)),this.typeDefinitionProvider=new Eo(this._score.bind(this)),this.declarationProvider=new Eo(this._score.bind(this)),this.implementationProvider=new Eo(this._score.bind(this)),this.documentSymbolProvider=new Eo(this._score.bind(this)),this.inlayHintsProvider=new Eo(this._score.bind(this)),this.colorProvider=new Eo(this._score.bind(this)),this.codeLensProvider=new Eo(this._score.bind(this)),this.documentFormattingEditProvider=new Eo(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Eo(this._score.bind(this)),this.onTypeFormattingEditProvider=new Eo(this._score.bind(this)),this.signatureHelpProvider=new Eo(this._score.bind(this)),this.hoverProvider=new Eo(this._score.bind(this)),this.documentHighlightProvider=new Eo(this._score.bind(this)),this.multiDocumentHighlightProvider=new Eo(this._score.bind(this)),this.selectionRangeProvider=new Eo(this._score.bind(this)),this.foldingRangeProvider=new Eo(this._score.bind(this)),this.linkProvider=new Eo(this._score.bind(this)),this.inlineCompletionsProvider=new Eo(this._score.bind(this)),this.inlineEditProvider=new Eo(this._score.bind(this)),this.completionProvider=new Eo(this._score.bind(this)),this.linkedEditingRangeProvider=new Eo(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Eo(this._score.bind(this)),this.documentSemanticTokensProvider=new Eo(this._score.bind(this)),this.documentDropEditProvider=new Eo(this._score.bind(this)),this.documentPasteEditProvider=new Eo(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}};ui(Le,cke,1)});var egi,Yut,nh,vy,px=D(()=>{ht();ae();nr();Ye();egi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Yut=function(i,e){return function(t,n){e(t,n,i)}},nh=vt("hoverService"),vy=class extends W{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,n={},r,o){super(),this.placement=e,this.instantHover=t,this.overrideOptions=n,this.configurationService=r,this.hoverService=o,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new te),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,t){let n=typeof this.overrideOptions=="function"?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();let r=Er(e.target)?[e.target]:e.target.targetElements;for(let s of r)this.hoverDisposables.add(cn(s,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));let o=Er(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...n,persistence:{hideOnKeyDown:!0,...n.persistence},id:o,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...n.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime{ht();rh=vt("contextViewService"),Xs=vt("contextMenuService")});var Kut=D(()=>{});var ni,Yr=D(()=>{ht();ni=vt("keybindingService")});function ro(i,e,t){let n=null,r=null;if(typeof t.value=="function"?(n="value",r=t.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",r=t.get),!r)throw new Error("not supported");let o=`$memoize$${e}`;t[n]=function(...s){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,s)}),this[o]}}var ZS=D(()=>{});var tgi,En,Do,Xf=D(()=>{Ye();ad();Qt();ZS();et();ae();Sp();tgi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o};(function(i){i.Tap="-monaco-gesturetap",i.Change="-monaco-gesturechange",i.Start="-monaco-gesturestart",i.End="-monaco-gesturesend",i.Contextmenu="-monaco-gesturecontextmenu"})(En||(En={}));Do=class i extends W{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new Ro,this.ignoreTargets=new Ro,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Se.runAndSubscribe(qk,({window:e,disposables:t})=>{t.add(re(e.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),t.add(re(e.document,"touchend",n=>this.onTouchEnd(e,n))),t.add(re(e.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Xi,disposables:this._store}))}static addTarget(e){if(!i.isTouchDevice())return W.None;i.INSTANCE||(i.INSTANCE=A_(new i));let t=i.INSTANCE.targets.push(e);return Ve(t)}static ignoreTarget(e){if(!i.isTouchDevice())return W.None;i.INSTANCE||(i.INSTANCE=A_(new i));let t=i.INSTANCE.ignoreTargets.push(e);return Ve(t)}static isTouchDevice(){return"ontouchstart"in Xi||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,r=e.targetTouches.length;n=i.HOLD_DELAY&&Math.abs(l.initialPageX-Qp(l.rollingPageX))<30&&Math.abs(l.initialPageY-Qp(l.rollingPageY))<30){let u=this.newGestureEvent(En.Contextmenu,l.initialTarget);u.pageX=Qp(l.rollingPageX),u.pageY=Qp(l.rollingPageY),this.dispatchEvent(u)}else if(r===1){let u=Qp(l.rollingPageX),d=Qp(l.rollingPageY),h=Qp(l.rollingTimestamps)-l.rollingTimestamps[0],f=u-l.rollingPageX[0],p=d-l.rollingPageY[0],g=[...this.targets].filter(v=>l.initialTarget instanceof Node&&v.contains(l.initialTarget));this.inertia(e,g,n,Math.abs(f)/h,f>0?1:-1,u,Math.abs(p)/h,p>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(En.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===En.Tap){let t=new Date().getTime(),n=0;t-this._lastSetTapCountTime>i.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===En.Change||e.type===En.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(e.initialTarget))return;let t=[];for(let n of this.targets)if(n.contains(e.initialTarget)){let r=0,o=e.initialTarget;for(;o&&o!==n;)r++,o=o.parentElement;t.push([r,n])}t.sort((n,r)=>n[0]-r[0]);for(let[n,r]of t)r.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,n,r,o,s,a,l,c){this.handle=vl(e,()=>{let u=Date.now(),d=u-n,h=0,f=0,p=!0;r+=i.SCROLL_FRICTION*d,a+=i.SCROLL_FRICTION*d,r>0&&(p=!1,h=o*r*d),a>0&&(p=!1,f=l*a*d);let g=this.newGestureEvent(En.Change);g.translationX=h,g.translationY=f,t.forEach(v=>v.dispatchEvent(g)),p||this.inertia(e,t,u,r,o,s+h,a,l,c+f)})}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};tgi([ro],Do,"isTouchDevice",null)});var Ls,bg=D(()=>{Ye();gc();Op();Xf();ae();Ls=class extends W{onclick(e,t){this._register(re(e,De.CLICK,n=>t(new gl(rt(e),n))))}onmousedown(e,t){this._register(re(e,De.MOUSE_DOWN,n=>t(new gl(rt(e),n))))}onmouseover(e,t){this._register(re(e,De.MOUSE_OVER,n=>t(new gl(rt(e),n))))}onmouseleave(e,t){this._register(re(e,De.MOUSE_LEAVE,n=>t(new gl(rt(e),n))))}onkeydown(e,t){this._register(re(e,De.KEY_DOWN,n=>t(new Wi(n))))}onkeyup(e,t){this._register(re(e,De.KEY_UP,n=>t(new Wi(n))))}oninput(e,t){this._register(re(e,De.INPUT,t))}onblur(e,t){this._register(re(e,De.BLUR,t))}onfocus(e,t){this._register(re(e,De.FOCUS,t))}ignoreGesture(e){return Do.ignoreTarget(e)}}});var $S,Yee,Kee=D(()=>{rF();bg();Jt();Dr();Ye();$S=11,Yee=class extends Ls{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ut.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=$S+"px",this.domNode.style.height=$S+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new ag),this._register(cn(this.bgDomNode,De.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(cn(this.domNode,De.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new bS),this._pointerdownScheduleRepeatTimer=this._register(new oa)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,rt(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}});var Jee,Jut=D(()=>{Jt();ae();Jee=class extends W{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new oa)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}});var igi,$F,uke=D(()=>{Ye();Za();rF();Kee();Jut();bg();Si();igi=140,$F=class extends Ls{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Jee(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new ag),this._shouldRender=!0,this.domNode=xi(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(re(this.domNode.domNode,De.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new Yee(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=xi(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(re(this.slider.domNode,De.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);n<=o&&o<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let o=bn(this.domNode.domNode);t=e.pageX-o.left,n=e.pageY-o.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>{let s=this._sliderOrthogonalPointerPosition(o),a=Math.abs(s-n);if(Nr&&a>igi){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let c=this._sliderPointerPosition(o)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}});var eE,Xee=D(()=>{eE=class i{constructor(e,t,n,r,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new i(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,r,o){let s=Math.max(0,n-e),a=Math.max(0,s-2*t),l=r>0&&r>n;if(!l)return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*a/r))),u=(a-c)/(r-n),d=o*u;return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){let e=i._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t{Op();uke();Kee();Xee();er();Zee=class extends $F{constructor(e,t,n){let r=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new eE(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let s=(t.arrowSize-$S)/2,a=(t.horizontalScrollbarSize-$S)/2;this._createArrow({className:"scra",icon:Ee.scrollbarButtonLeft,top:a,left:s,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new eg(null,1,0))}),this._createArrow({className:"scra",icon:Ee.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:s,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new eg(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}});var $ee,Zut=D(()=>{Op();uke();Kee();Xee();er();$ee=class extends $F{constructor(e,t,n){let r=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new eE(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let s=(t.arrowSize-$S)/2,a=(t.verticalScrollbarSize-$S)/2;this._createArrow({className:"scra",icon:Ee.scrollbarButtonUp,top:s,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new eg(null,0,1))}),this._createArrow({className:"scra",icon:Ee.scrollbarButtonDown,top:void 0,left:a,bottom:s,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new eg(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}});function dke(i,e){let t=e-i;return function(n){return i+t*ogi(n)}}function ngi(i,e,t){return function(n){return n{et();ae();hke=class i{constructor(e,t,n,r,o,s,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,r=r|0,o=o|0,s=s|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),o<0&&(o=0),a+o>s&&(a=s-o),a<0&&(a=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=o,this.scrollHeight=s,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new i(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new i(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:a,scrollTopChanged:l}}},vg=class extends W{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new G),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new hke(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;t?r=new tte(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=tte.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},ete=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};tte=class i{constructor(e,t,n,r){this.from=e,this.to=t,this.duration=r,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let o,s;return e{});function agi(i){let e={lazyRender:typeof i.lazyRender<"u"?i.lazyRender:!1,className:typeof i.className<"u"?i.className:"",useShadows:typeof i.useShadows<"u"?i.useShadows:!0,handleMouseWheel:typeof i.handleMouseWheel<"u"?i.handleMouseWheel:!0,flipAxes:typeof i.flipAxes<"u"?i.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof i.consumeMouseWheelIfScrollbarIsNeeded<"u"?i.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof i.alwaysConsumeMouseWheel<"u"?i.alwaysConsumeMouseWheel:!1,scrollYToX:typeof i.scrollYToX<"u"?i.scrollYToX:!1,mouseWheelScrollSensitivity:typeof i.mouseWheelScrollSensitivity<"u"?i.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof i.fastScrollSensitivity<"u"?i.fastScrollSensitivity:5,scrollPredominantAxis:typeof i.scrollPredominantAxis<"u"?i.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof i.mouseWheelSmoothScroll<"u"?i.mouseWheelSmoothScroll:!0,arrowSize:typeof i.arrowSize<"u"?i.arrowSize:11,listenOnDomNode:typeof i.listenOnDomNode<"u"?i.listenOnDomNode:null,horizontal:typeof i.horizontal<"u"?i.horizontal:1,horizontalScrollbarSize:typeof i.horizontalScrollbarSize<"u"?i.horizontalScrollbarSize:10,horizontalSliderSize:typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:0,horizontalHasArrows:typeof i.horizontalHasArrows<"u"?i.horizontalHasArrows:!1,vertical:typeof i.vertical<"u"?i.vertical:1,verticalScrollbarSize:typeof i.verticalScrollbarSize<"u"?i.verticalScrollbarSize:10,verticalHasArrows:typeof i.verticalHasArrows<"u"?i.verticalHasArrows:!1,verticalSliderSize:typeof i.verticalSliderSize<"u"?i.verticalSliderSize:0,scrollByPage:typeof i.scrollByPage<"u"?i.scrollByPage:!1};return e.horizontalSliderSize=typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof i.verticalSliderSize<"u"?i.verticalSliderSize:e.verticalScrollbarSize,qt&&(e.className+=" mac"),e}var sgi,edt,tdt,fke,dz,hz,tO,Ay,Ub,Ag=D(()=>{Ph();Ye();Za();Op();Xut();Zut();bg();Jt();et();ae();Si();eO();$ut();sgi=500,edt=50,tdt=!0,fke=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},dz=class i{static{this.INSTANCE=new i}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,r=this._rear;do{let o=r===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[r].score*o,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}while(!0);return t<=.5}acceptStandardWheelEvent(e){if(dS){let t=rt(e.browserEvent),n=Cot(t);this.accept(Date.now(),e.deltaX*n,e.deltaY*n)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let r=null,o=new fke(e,t,n);this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,r)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),t){let r=Math.abs(e.deltaX),o=Math.abs(e.deltaY),s=Math.abs(t.deltaX),a=Math.abs(t.deltaY),l=Math.max(Math.min(r,s),1),c=Math.max(Math.min(o,a),1),u=Math.max(r,s),d=Math.max(o,a);u%l===0&&d%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}},hz=class extends Ls{get options(){return this._options}constructor(e,t,n){super(),this._onScroll=this._register(new G),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new G),e.style.overflow="hidden",this._options=agi(t),this._scrollable=n,this._register(this._scrollable.onScroll(o=>{this._onWillScroll.fire(o),this._onDidScroll(o),this._onScroll.fire(o)}));let r={onMouseWheel:o=>this._onMouseWheel(o),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new $ee(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new Zee(this._scrollable,this._options,r)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=xi(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=xi(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=xi(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,o=>this._onMouseOver(o)),this.onmouseleave(this._listenOnDomNode,o=>this._onMouseLeave(o)),this._hideTimeout=this._register(new oa),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Vi(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,qt&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new eg(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Vi(this._mouseWheelToDispose),e)){let n=r=>{this._onMouseWheel(new eg(r))};this._mouseWheelToDispose.push(re(this._listenOnDomNode,De.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=dz.INSTANCE;tdt&&t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+o===0?s=o=0:Math.abs(o)>=Math.abs(s)?s=0:o=0),this._options.flipAxes&&([o,s]=[s,o]);let a=!qt&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!s&&(s=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(s=s*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let l=this._scrollable.getFutureScrollPosition(),c={};if(o){let u=edt*o,d=l.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,d)}if(s){let u=edt*s,d=l.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,d)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(tdt&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?" left":"",o=t?" top":"",s=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),sgi)}},tO=class extends hz{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new vg({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:r=>vl(rt(e),r)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}},Ay=class extends hz{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},Ub=class extends hz{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new vg({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:r=>vl(rt(e),r)});super(e,t,n),this._register(n),this._element=e,this._register(this.onScroll(r=>{r.scrollTopChanged&&(this._element.scrollTop=r.scrollTop),r.scrollLeftChanged&&(this._element.scrollLeft=r.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}});var idt=D(()=>{});function nte(i,e){return i&&e?y("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?y("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var ite,tE,iO,fz,pz,nO=D(()=>{Ye();gc();Ag();ae();idt();Oe();ite=we,tE=class extends W{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 Ub(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},iO=class i extends W{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionLabel=t.label,this.actionKeybindingLabel=n,this.actionContainer=be(e,ite("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=be(this.actionContainer,ite("a.action")),this.action.setAttribute("role","button"),t.iconClass&&be(this.action,ite(`span.icon.${t.iconClass}`));let r=be(this.action,ite("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._store.add(new fz(this.actionContainer,t.run)),this._store.add(new pz(this.actionContainer,t.run,[3,10])),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"))}};fz=class extends W{constructor(e,t){super(),this._register(re(e,De.CLICK,n=>{n.stopPropagation(),n.preventDefault(),t(e)}))}},pz=class extends W{constructor(e,t,n){super(),this._register(re(e,De.KEY_DOWN,r=>{let o=new Wi(r);n.some(s=>o.equals(s))&&(r.stopPropagation(),r.preventDefault(),t(e))}))}}});function ndt(i){let e,t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},i=i.with({fragment:""})),{selection:e,uri:i}}var jo,vd=D(()=>{ht();jo=vt("openerService")});var wi,jb=D(()=>{et();wi=class{get event(){return this.emitter.event}constructor(e,t,n){let r=o=>this.emitter.fire(o);this.emitter=new G({onWillAddFirstListener:()=>e.addEventListener(t,r,n),onDidRemoveLastListener:()=>e.removeEventListener(t,r,n)})}dispose(){this.emitter.dispose()}}});function rdt(i,e={}){let t=rte(e);return t.textContent=i,t}function odt(i,e={}){let t=rte(e);return sdt(t,lgi(i,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function rte(i){let e=i.inline?"span":"div",t=document.createElement(e);return i.className&&(t.className=i.className),t}function sdt(i,e,t,n){let r;if(e.type===2)r=document.createTextNode(e.content||"");else if(e.type===3)r=document.createElement("b");else if(e.type===4)r=document.createElement("i");else if(e.type===7&&n)r=document.createElement("code");else if(e.type===5&&t){let o=document.createElement("a");t.disposables.add(cn(o,"click",s=>{t.callback(String(e.index),s)})),r=o}else e.type===8?r=document.createElement("br"):e.type===1&&(r=i);r&&i!==r&&i.appendChild(r),r&&Array.isArray(e.children)&&e.children.forEach(o=>{sdt(r,o,t,n)})}function lgi(i,e){let t={type:1,children:[]},n=0,r=t,o=[],s=new pke(i);for(;!s.eos();){let a=s.next(),l=a==="\\"&&mke(s.peek(),e)!==0;if(l&&(a=s.next()),!l&&cgi(a,e)&&a===s.peek()){s.advance(),r.type===2&&(r=o.pop());let c=mke(a,e);if(r.type===c||r.type===5&&c===6)r=o.pop();else{let u={type:c,children:[]};c===5&&(u.index=n,n++),r.children.push(u),o.push(r),r=u}}else if(a===` -`)r.type===2&&(r=o.pop()),r.children.push({type:8});else if(r.type!==2){let c={type:2,content:a};r.children.push(c),o.push(r),r=c}else r.content+=a}return r.type===2&&(r=o.pop()),o.length,t}function cgi(i,e){return mke(i,e)!==0}function mke(i,e){switch(i){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}var pke,gke=D(()=>{Ye();pke=class{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){let e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}});function Xp(i){let e=new Array,t,n=0,r=0;for(;(t=ugi.exec(i))!==null;){r=t.index||0,n{Ye();Dr();ugi=new RegExp(`(\\\\)?\\$\\((${ut.iconNameExpression}(?:${ut.iconModifierExpression})?)\\)`,"g")});function adt(i){let e=dgi(i);if(e&&e.length>0)return new Uint32Array(e)}function dgi(i){if(Zp=0,wy(i,bke,4352),Zp>0||(wy(i,vke,4449),Zp>0)||(wy(i,Ake,4520),Zp>0)||(wy(i,HI,12593),Zp))return iE.subarray(0,Zp);if(i>=44032&&i<=55203){let e=i-44032,t=e%588,n=Math.floor(e/588),r=Math.floor(t/28),o=t%28-1;if(n=0&&(o0)return iE.subarray(0,Zp)}}function wy(i,e,t){i>=t&&i>8&&(iE[Zp++]=i>>8&255),i>>16&&(iE[Zp++]=i>>16&255))}var Zp,iE,bke,vke,Ake,HI,ldt=D(()=>{Zp=0,iE=new Uint32Array(10);bke=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),vke=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),Ake=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),HI=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});function lte(...i){return function(e,t){for(let n=0,r=i.length;n0?[{start:0,end:e.length}]:[]:null}function Eke(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t===-1?null:[{start:t,end:t+i.length}]}function Dke(i,e){return xke(i.toLowerCase(),e.toLowerCase(),0,0)}function xke(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]===e[n]){let r=null;return(r=xke(i,e,t+1,n+1))?Ike({start:n,end:n+1},r):null}return xke(i,e,t,n+1)}function Tke(i){return 97<=i&&i<=122}function cte(i){return 65<=i&&i<=90}function kke(i){return 48<=i&&i<=57}function pdt(i){return i===32||i===9||i===10||i===13}function ate(i){return pdt(i)||mdt.has(i)}function cdt(i,e){return i===e||ate(i)&&ate(e)}function udt(i){if(yke.has(i))return yke.get(i);let e,t=adt(i);return t&&(e=t),yke.set(i,e),e}function gdt(i){return Tke(i)||cte(i)||kke(i)}function Ike(i,e){return e.length===0?e=[i]:i.end===e[0].start?e[0].start=i.start:e.unshift(i),e}function bdt(i,e){for(let t=e;t0&&!gdt(i.charCodeAt(t-1)))return t}return i.length}function Cke(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]!==e[n].toLowerCase())return null;{let r=null,o=n+1;for(r=Cke(i,e,t+1,n+1);!r&&(o=bdt(e,o)).6}function mgi(i){let{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:r}=i;return t>.2&&e<.8&&n>.6&&r<.2}function ggi(i){let e=0,t=0,n=0,r=0;for(let o=0;o60&&(e=e.substring(0,60));let t=fgi(e);if(!mgi(t)){if(!pgi(t))return null;e=e.toLowerCase()}let n=null,r=0;for(i=i.toLowerCase();r0&&ate(i.charCodeAt(t-1)))return t;return i.length}function Lke(i,e,t=!1){if(typeof i!="string"||typeof e!="string")return null;let n=ddt.get(i);n||(n=new RegExp(Got(i),"i"),ddt.set(i,n));let r=n.exec(e);return r?[{start:r.index,end:r.index+r[0].length}]:t?vgi(i,e):bgi(i,e)}function wdt(i,e){let t=Cy(i,i.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?oE(t):null}function xdt(i,e,t,n,r,o){let s=Math.min(13,i.length);for(;t"u")return[];let e=[],t=i[1];for(let n=i.length-1;n>1;n--){let r=i[n]+t,o=e[e.length-1];o&&o.end===r?o.end=r+1:e.push({start:r,end:r+1})}return e}function Nke(){let i=[],e=[];for(let t=0;t<=rE;t++)e[t]=0;for(let t=0;t<=rE;t++)i.push(e.slice(0));return i}function Cdt(i){let e=[];for(let t=0;t<=i;t++)e[t]=0;return e}function wke(i,e,t,n,r){function o(a,l,c=" "){for(;a.lengtho(a,3)).join("|")} -`;for(let a=0;a<=t;a++)a===0?s+=" |":s+=`${e[a-1]}|`,s+=i[a].slice(0,r+1).map(l=>o(l.toString(),3)).join("|")+` -`;return s}function ygi(i,e,t,n){i=i.substr(e),t=t.substr(n),console.log(wke(nE,i,i.length,t,t.length)),console.log(wke(mz,i,i.length,t,t.length)),console.log(wke(xy,i,i.length,t,t.length))}function ote(i,e){if(e<0||e>=i.length)return!1;let t=i.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!Y9(t)}}function hdt(i,e){if(e<0||e>=i.length)return!1;switch(i.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function ste(i,e,t){return e[i]!==t[i]}function wgi(i,e,t,n,r,o,s=!1){for(;erE?rE:i.length,l=n.length>rE?rE:n.length;if(t>=a||o>=l||a-t>l-o||!wgi(e,t,a,r,o,l,!0))return;xgi(a,l,t,o,e,r);let c=1,u=1,d=t,h=o,f=[!1];for(c=1,d=t;dw,M=L?nE[c][u-1]+(xy[c][u-1]>0?-5:0):0,z=h>w+1&&xy[c][u-1]>0,H=z?nE[c][u-2]+(xy[c][u-2]>0?-5:0):0;if(z&&(!L||H>=M)&&(!I||H>=T))nE[c][u]=H,mz[c][u]=3,xy[c][u]=0;else if(L&&(!I||M>=T))nE[c][u]=M,mz[c][u]=2,xy[c][u]=0;else if(I)nE[c][u]=T,mz[c][u]=1,xy[c][u]=xy[c-1][u-1]+1;else throw new Error("not possible")}}if(Agi&&ygi(i,t,n,o),!f[0]&&!s.firstMatchCanBeWeak)return;c--,u--;let p=[nE[c][u],o],g=0,v=0;for(;c>=1;){let w=u;do{let C=mz[c][w];if(C===3)w=w-2;else if(C===2)w=w-1;else break}while(w>=1);g>1&&e[t+c-1]===r[o+u-1]&&!ste(w+o-1,n,r)&&g+1>xy[c][w]&&(w=u),w===u?g++:g=1,v||(v=w),c--,u=w-1,p.push(u)}l-o===a&&s.boostFullMatch&&(p[0]+=2);let A=v-a;return p[0]-=A,p}function xgi(i,e,t,n,r,o){let s=i-1,a=e-1;for(;s>=t&&a>=n;)r[s]===o[a]&&(Ske[s]=a,s--),a--}function Cgi(i,e,t,n,r,o,s,a,l,c,u){if(e[t]!==o[s])return Number.MIN_SAFE_INTEGER;let d=1,h=!1;return s===t-n?d=i[t]===r[s]?7:5:ste(s,r,o)&&(s===0||!ste(s-1,r,o))?(d=i[t]===r[s]?7:5,h=!0):ote(o,s)&&(s===0||!ote(o,s-1))?d=5:(ote(o,s-1)||hdt(o,s-1))&&(d=5,h=!0),d>1&&t===n&&(u[0]=!0),h||(h=ste(s,r,o)||ote(o,s-1)||hdt(o,s-1)),t===n?s>l&&(d-=h?3:5):c?d+=h?2:0:d+=h?0:1,s+1===a&&(d-=h?3:5),d}function Sdt(i,e,t,n,r,o,s){return _gi(i,e,t,n,r,o,!0,s)}function _gi(i,e,t,n,r,o,s,a){let l=Cy(i,e,t,n,r,o,a);if(l&&!s)return l;if(i.length>=3){let c=Math.min(7,i.length-1);for(let u=t+1;ul[0])&&(l=h))}}}return l}function Sgi(i,e){if(e+1>=i.length)return;let t=i[e],n=i[e+1];if(t!==n)return i.slice(0,e)+n+t+i.slice(e+2)}var Nin,UI,mdt,yke,bgi,vgi,ddt,rE,_dt,Ske,xy,nE,mz,Agi,Jh,WI,yg=D(()=>{ql();ldt();Pt();Nin=fdt.bind(void 0,!1),UI=fdt.bind(void 0,!0);mdt=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(i=>mdt.add(i.charCodeAt(0)));yke=new Map;bgi=lte(UI,vdt,Eke),vgi=lte(UI,vdt,Dke),ddt=new Gl(1e4);rE=128;_dt=Cdt(2*rE),Ske=Cdt(2*rE),xy=Nke(),nE=Nke(),mz=Nke(),Agi=!1;(function(i){i.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}i.isDefault=e})(Jh||(Jh={}));WI=class{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}});function Edt(i){return i.replace(Dgi,(e,t)=>t?e:`\\${e}`)}function Ddt(i){return i.replace(Tgi,e=>`\\${e}`)}function rO(i){return i.indexOf(Egi)===-1?i:i.replace(kgi,(e,t,n,r)=>n?e:t||r||"")}function Tdt(i){return i?i.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}function oO(i){Mke.lastIndex=0;let e="",t=[],n=0;for(;;){let r=Mke.lastIndex,o=Mke.exec(i),s=i.substring(r,o?.index);if(s.length>0){e+=s;for(let a=0;a{yg();Pt();Dr();Egi="$(",Rke=new RegExp(`\\$\\(${ut.iconNameExpression}(?:${ut.iconModifierExpression})?\\)`,"g"),Dgi=new RegExp(`(\\\\)?${Rke.source}`,"g");Tgi=new RegExp(`\\\\${Rke.source}`,"g");kgi=new RegExp(`(\\s)?(\\\\)?${Rke.source}(\\s)?`,"g");Mke=new RegExp(`\\$\\(${ut.iconNameCharacter}+\\)`,"g")});function pv(i){return j5(i,!0)}var gz,oo,Win,Uin,gx,jin,Qin,Ldt,Sc,Ndt,sE,Mdt,Rdt,Fdt,Fke,Gin,kdt,Idt,qin,Yin,_y,Ec=D(()=>{Uee();bl();H0();Si();Pt();mn();gz=class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:pS(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===jt.file)return lz(pv(e),pv(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(kdt(e.authority,t.authority))return lz(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return Xe.joinPath(e,...t)}basenameOrAuthority(e){return Sc(e)||e.authority}basename(e){return yo.basename(e.path)}extname(e){return yo.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===jt.file?t=Xe.file(gY(pv(e))).path:(t=yo.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===jt.file?t=Xe.file(mY(pv(e))).path:t=yo.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!kdt(e.authority,t.authority))return;if(e.scheme===jt.file){let o=Uqe(pv(e),pv(t));return Nr?ike(o):o}let n=e.path||"/",r=t.path||"/";if(this._ignorePathCasing(e)){let o=0;for(let s=Math.min(n.length,r.length);onke(n).length&&n[n.length-1]===t}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=kf){return Idt(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=kf){let n=!1;if(e.scheme===jt.file){let r=pv(e);n=r!==void 0&&r.length===nke(r).length&&r[r.length-1]===t}else{t="/";let r=e.path;n=r.length===1&&r.charCodeAt(r.length-1)===47}return!n&&!Idt(e,t)?e.with({path:e.path+"/"}):e}},oo=new gz(()=>!1),Win=new gz(i=>i.scheme===jt.file?!vo:!0),Uin=new gz(i=>!0),gx=oo.isEqual.bind(oo),jin=oo.isEqualOrParent.bind(oo),Qin=oo.getComparisonKey.bind(oo),Ldt=oo.basenameOrAuthority.bind(oo),Sc=oo.basename.bind(oo),Ndt=oo.extname.bind(oo),sE=oo.dirname.bind(oo),Mdt=oo.joinPath.bind(oo),Rdt=oo.normalizePath.bind(oo),Fdt=oo.relativePath.bind(oo),Fke=oo.resolvePath.bind(oo),Gin=oo.isAbsolutePath.bind(oo),kdt=oo.isEqualAuthority.bind(oo),Idt=oo.hasTrailingPathSeparator.bind(oo),qin=oo.removeTrailingPathSeparator.bind(oo),Yin=oo.addTrailingPathSeparator.bind(oo);(function(i){i.META_DATA_LABEL="label",i.META_DATA_DESCRIPTION="description",i.META_DATA_SIZE="size",i.META_DATA_MIME="mime";function e(t){let n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(s=>{let[a,l]=s.split(":");a&&l&&n.set(a,l)});let o=t.path.substring(0,t.path.indexOf(";"));return o&&n.set(i.META_DATA_MIME,o),n}i.parseMetaData=e})(_y||(_y={}))});function bx(i){return Xh(i)?!i.value:Array.isArray(i)?i.every(bx):!0}function Xh(i){return i instanceof es?!0:i&&typeof i=="object"?typeof i.value=="string"&&(typeof i.isTrusted=="boolean"||typeof i.isTrusted=="object"||i.isTrusted===void 0)&&(typeof i.supportThemeIcons=="boolean"||i.supportThemeIcons===void 0):!1}function Odt(i,e){return i===e?!0:!i||!e?!1:i.value===e.value&&i.isTrusted===e.isTrusted&&i.supportThemeIcons===e.supportThemeIcons&&i.supportHtml===e.supportHtml&&(i.baseUri===e.baseUri||!!i.baseUri&&!!e.baseUri&&gx(Xe.from(i.baseUri),Xe.from(e.baseUri)))}function Lgi(i){return i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function Ngi(i,e){let t=i.match(/^`+/gm)?.reduce((r,o)=>r.length>o.length?r:o).length??0,n=t>=3?t+1:3;return[`${"`".repeat(n)}${e}`,i,`${"`".repeat(n)}`].join(` -`)}function bz(i){return i.replace(/"/g,""")}function dte(i){return i&&i.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function Pdt(i){let e=[],t=i.split("|").map(r=>r.trim());i=t[0];let n=t[1];if(n){let r=/height=(\d+)/.exec(n),o=/width=(\d+)/.exec(n),s=r?r[1]:"",a=o?o[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(s));l&&e.push(`width="${a}"`),c&&e.push(`height="${s}"`)}return{href:i,dimensions:e}}var es,Ad=D(()=>{Lt();jI();Ec();Pt();mn();es=class{constructor(e="",t=!1){if(this.value=e,typeof this.value!="string")throw dc("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){return this.value+=Lgi(this.supportThemeIcons?Edt(e):e).replace(/([ \t]+)/g,(n,r)=>" ".repeat(r.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ + `}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new EO(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new EO({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new EO({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}});function Ey(i,e){let t=i.getCount(),n=i.findTokenIndexAtOffset(e),o=i.getLanguageId(n),r=n;for(;r+10&&i.getLanguageId(s-1)===o;)s--;return new hTe(i,o,s,r+1,i.getStartOffset(s),i.getEndOffset(r))}function t0(i){return(i&3)!==0}var hTe,DO=D(()=>{hTe=class{constructor(e,t,n,o,r,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=o,this.firstCharOffset=r,this._lastCharOffset=s,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}});function Boi(i){let e=i.length;i=i.map(s=>[s[0].toLowerCase(),s[1].toLowerCase()]);let t=[];for(let s=0;s{let[l,c]=s,[u,d]=a;return l===u||l===d||c===u||c===d},o=(s,a)=>{let l=Math.min(s,a),c=Math.max(s,a);for(let u=0;u0&&r.push({open:a,close:l})}return r}function pat(i,e,t,n){for(let o=0,r=e.length;o=0&&n.push(a);for(let a of s.close)a.indexOf(i)>=0&&n.push(a)}}function mat(i,e){return i.length-e.length}function nte(i){if(i.length<=1)return i;let e=[],t=new Set;for(let n of i)t.has(n)||(e.push(n),t.add(n));return e}function zoi(i,e,t,n){let o=[];o=o.concat(i),o=o.concat(e);for(let r=0,s=o.length;r{Rt();_x();Ue();fTe=class i{constructor(e,t,n,o,r,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=n,this.close=o,this.forwardRegex=r,this.reversedRegex=s,this._openSet=i._toSet(this.open),this._closeSet=i._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let n of e)t.add(n);return t}};ite=class{constructor(e,t){this._richEditBracketsBrand=void 0;let n=Boi(t);this.brackets=n.map((o,r)=>new fTe(e,r,o.open,o.close,zoi(o.open,o.close,n,r),Voi(o.open,o.close,n,r))),this.forwardRegex=Hoi(this.brackets),this.reversedRegex=Woi(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(let o of this.brackets){for(let r of o.open)this.textIsBracket[r]=o,this.textIsOpenBracket[r]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,r.length);for(let r of o.close)this.textIsBracket[r]=o,this.textIsOpenBracket[r]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,r.length)}}};pTe=(function(){function i(n){let o=new Uint16Array(n.length),r=0;for(let s=n.length-1;s>=0;s--)o[r++]=n.charCodeAt(s);return jEe().decode(o)}let e=null,t=null;return function(o){return e!==o&&(e=o,t=i(e)),t}})(),sf=class{static _findPrevBracketInText(e,t,n,o){let r=n.match(e);if(!r)return null;let s=n.length-(r.index||0),a=r[0].length,l=o+s;return new R(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,o,r){let a=pTe(n).substring(n.length-r,n.length-o);return this._findPrevBracketInText(e,t,a,o)}static findNextBracketInText(e,t,n,o){let r=n.match(e);if(!r)return null;let s=r.index||0,a=r[0].length;if(a===0)return null;let l=o+s;return new R(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,o,r){let s=n.substring(o,r);return this.findNextBracketInText(e,t,s,o)}}});var ote,gat=D(()=>{Wt();DO();fV();ote=class{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let n of t.close){let o=n.charAt(n.length-1);e.push(o)}return tf(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;let o=t.findTokenIndexAtOffset(n-1);if(t0(t.getStandardTokenType(o)))return null;let r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,a=sf.findPrevBracketInRange(r,1,s,0,s.length);if(!a)return null;let l=s.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;let u=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:l}:null}}});function rte(i){return i.global&&(i.lastIndex=0),!0}var ste,bat=D(()=>{ste=class{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&rte(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&rte(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&rte(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&rte(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}});var ate,Aat=D(()=>{Tt();Rt();sE();ate=class i{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{let n=i._createOpenBracketRegExp(t[0]),o=i._createCloseBracketRegExp(t[1]);n&&o&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:o})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,o){if(e>=3)for(let r=0,s=this._regExpRules.length;rc.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&n.length>0&&o.length>0)for(let r=0,s=this._brackets.length;r=2&&n.length>0){for(let r=0,s=this._brackets.length;r"u"?t:r}function wat(i){return i.replace(/[\[\]]/g,"")}var Et,ao=D(()=>{ht();Et=At("configurationService")});var on,Il=D(()=>{ht();on=At("languageService")});var rp,cte=D(()=>{rp=class{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}});function oi(i,e,t){e instanceof rp||(e=new rp(e,[],!!t)),xat.push([i,e])}function bTe(){return xat}var xat,Dc=D(()=>{cte();xat=[]});var Ko,aE=D(()=>{Ko=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})});function mV(i){let e=[];if(Ix.test(i)){let t=_at.exec(i);for(;t?.length;){let n=t[1].trim();n&&e.push(n),t=_at.exec(i)}}return tf(e)}function joi(i){switch(Array.isArray(i)?i[0]:i){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function Qoi(i,e){return i.trim()?Ix.test(i)?y("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",i):dte.getConfigurationProperties()[i]!==void 0?y("config.property.duplicate","Cannot register '{0}'. This property is already registered.",i):e.policy?.name&&dte.getPolicyConfigurations().get(e.policy?.name)!==void 0?y("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",i,e.policy?.name,dte.getPolicyConfigurations().get(e.policy?.name)):null:y("config.property.empty","Cannot register an empty property")}var Tc,ATe,vTe,yTe,wTe,xTe,ute,pV,Cat,CTe,Sat,_at,sL,Ix,dte,Dy=D(()=>{Wt();et();gn();Be();ao();j$();fa();Tc={Configuration:"base.contributions.configuration"},ATe={properties:{},patternProperties:{}},vTe={properties:{},patternProperties:{}},yTe={properties:{},patternProperties:{}},wTe={properties:{},patternProperties:{}},xTe={properties:{},patternProperties:{}},ute={properties:{},patternProperties:{}},pV="vscode://schemas/settings/resourceLanguage",Cat=Qi.as(MI.JSONContribution),CTe=class{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new q,this._onDidUpdateConfiguration=new q,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:y("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},Cat.registerSchema(pV,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){let n=new Set;this.doRegisterConfigurations(e,t,n),Cat.registerSchema(pV,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){let t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);let n=[];for(let{overrides:o,source:r}of e)for(let s in o){t.add(s);let a=this.configurationDefaultsOverrides.get(s)??this.configurationDefaultsOverrides.set(s,{configurationDefaultOverrides:[]}).get(s),l=o[s];if(a.configurationDefaultOverrides.push({value:l,source:r}),Ix.test(s)){let c=this.mergeDefaultConfigurationsForOverrideIdentifier(s,l,r,a.configurationDefaultOverrideValue);if(!c)continue;a.configurationDefaultOverrideValue=c,this.updateDefaultOverrideProperty(s,c,r),n.push(...mV(s))}else{let c=this.mergeDefaultConfigurationsForConfigurationProperty(s,l,r,a.configurationDefaultOverrideValue);if(!c)continue;a.configurationDefaultOverrideValue=c;let u=this.configurationProperties[s];u&&(this.updatePropertyDefaultValue(s,u),this.updateSchema(s,u))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){let o={type:"object",default:t.value,description:y("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",wat(e)),$ref:pV,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=o,this.defaultLanguageConfigurationOverridesNode.properties[e]=o}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,o){let r=o?.value||{},s=o?.source??new Map;if(!(s instanceof Map)){console.error("objectConfigurationSources is not a Map");return}for(let a of Object.keys(t)){let l=t[a];if(zr(l)&&(Xa(r[a])||zr(r[a]))){if(r[a]={...r[a]??{},...l},n)for(let u in l)s.set(`${a}.${u}`,n)}else r[a]=l,n?s.set(a,n):s.delete(a)}return{value:r,source:s}}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,o){let r=this.configurationProperties[e],s=o?.value??r?.defaultDefaultValue,a=n;if(zr(t)&&(r!==void 0&&r.type==="object"||r===void 0&&(Xa(s)||zr(s)))){if(a=o?.source??new Map,!(a instanceof Map)){console.error("defaultValueSource is not a Map");return}for(let c in t)n&&a.set(`${e}.${c}`,n);t={...zr(s)?s:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(o=>{this.validateAndRegisterProperties(o,t,o.extensionInfo,o.restrictedProperties,void 0,n),this.configurationContributors.push(o),this.registerJSONConfiguration(o)})}validateAndRegisterProperties(e,t=!0,n,o,r=3,s){r=Pu(e.scope)?r:e.scope;let a=e.properties;if(a)for(let c in a){let u=a[c];if(t&&Qoi(c,u)){delete a[c];continue}if(u.source=n,u.defaultDefaultValue=a[c].default,this.updatePropertyDefaultValue(c,u),Ix.test(c)?u.scope=void 0:(u.scope=Pu(u.scope)?r:u.scope,u.restricted=Pu(u.restricted)?!!o?.includes(c):u.restricted),a[c].hasOwnProperty("included")&&!a[c].included){this.excludedConfigurationProperties[c]=a[c],delete a[c];continue}else this.configurationProperties[c]=a[c],a[c].policy?.name&&this.policyConfigurations.set(a[c].policy.name,c);!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),s.add(c)}let l=e.allOf;if(l)for(let c of l)this.validateAndRegisterProperties(c,t,n,o,r,s)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){let t=n=>{let o=n.properties;if(o)for(let s in o)this.updateSchema(s,o[s]);n.allOf?.forEach(t)};t(e)}updateSchema(e,t){switch(ATe.properties[e]=t,t.scope){case 1:vTe.properties[e]=t;break;case 2:yTe.properties[e]=t;break;case 6:wTe.properties[e]=t;break;case 3:xTe.properties[e]=t;break;case 4:ute.properties[e]=t;break;case 5:ute.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,n={type:"object",description:y("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:y("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:pV};this.updatePropertyDefaultValue(t,n),ATe.properties[t]=n,vTe.properties[t]=n,yTe.properties[t]=n,wTe.properties[t]=n,xTe.properties[t]=n,ute.properties[t]=n}}registerOverridePropertyPatternKey(){let e={type:"object",description:y("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:y("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:pV};ATe.patternProperties[sL]=e,vTe.patternProperties[sL]=e,yTe.patternProperties[sL]=e,wTe.patternProperties[sL]=e,xTe.patternProperties[sL]=e,ute.patternProperties[sL]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue,o,r;n&&(!t.disallowConfigurationDefault||!n.source)&&(o=n.value,r=n.source),Xa(o)&&(o=t.defaultDefaultValue,r=void 0),Xa(o)&&(o=joi(t.type)),t.default=o,t.defaultValueSource=r}},Sat="\\[([^\\]]+)\\]",_at=new RegExp(Sat,"g"),sL=`^(${Sat})+$`,Ix=new RegExp(sL);dte=new CTe;Qi.add(Tc.Configuration,dte)});var Goi,_Te,lE,fs,qoi,sp=D(()=>{Be();et();fa();aE();Dy();Goi={ModesRegistry:"editor.modesRegistry"},_Te=class{constructor(){this._onDidChangeLanguages=new q,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;te!==""&&t!=="")}var hte,fte,STe,ETe,Dat=D(()=>{YSe();fV();hte=class{constructor(e,t){this.languageId=e;let n=t.brackets?Eat(t.brackets):[],o=new wz(a=>{let l=new Set;return{info:new STe(this,a,l),closing:l}}),r=new wz(a=>{let l=new Set,c=new Set;return{info:new ETe(this,a,l,c),opening:l,openingColorized:c}});for(let[a,l]of n){let c=o.get(a),u=r.get(l);c.closing.add(u.info),u.opening.add(c.info)}let s=t.colorizedBracketPairs?Eat(t.colorizedBracketPairs):n.filter(a=>!(a[0]==="<"&&a[1]===">"));for(let[a,l]of s){let c=o.get(a),u=r.get(l);c.closing.add(u.info),u.openingColorized.add(c.info),u.opening.add(c.info)}this._openingBrackets=new Map([...o.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...r.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){let t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return TO(t,e)}};fte=class{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}},STe=class extends fte{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}},ETe=class extends fte{constructor(e,t,n,o){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=o,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}});function Koi(i,e,t,n){let o=e.getLanguageConfiguration(i);if(!o){if(!n.isRegisteredLanguageId(i))return new kO(i,{});o=new kO(i,{})}let r=Joi(o.languageId,t),s=Iat([o.underlyingConfig,r]);return new kO(o.languageId,s)}function Joi(i,e){let t=e.getValue(TTe.brackets,{overrideIdentifier:i}),n=e.getValue(TTe.colorizedBracketPairs,{overrideIdentifier:i});return{brackets:kat(t),colorizedBracketPairs:kat(n)}}function kat(i){if(Array.isArray(i))return i.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function gte(i,e,t){let n=i.getLineContent(e),o=wn(n);return o.length>t-1&&(o=o.substring(0,t-1)),o}function Iat(i){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let t of i)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}var Yoi,Tat,gV,Gi,DTe,TTe,kTe,pte,mte,ITe,kO,Rs=D(()=>{et();de();Rt();jI();sE();fat();gat();bat();Aat();fV();ht();ao();Il();Dc();sp();Dat();Yoi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Tat=function(i,e){return function(t,n){e(t,n,i)}},gV=class{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}},Gi=At("languageConfigurationService"),DTe=class extends H{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new ITe),this.onDidChangeEmitter=this._register(new q),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let n=new Set(Object.values(TTe));this._register(this.configurationService.onDidChangeConfiguration(o=>{let r=o.change.keys.some(a=>n.has(a)),s=o.change.overrides.filter(([a,l])=>l.some(c=>n.has(c))).map(([a])=>a);if(r)this.configurations.clear(),this.onDidChangeEmitter.fire(new gV(void 0));else for(let a of s)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new gV(a)))})),this._register(this._registry.onDidChange(o=>{this.configurations.delete(o.languageId),this.onDidChangeEmitter.fire(new gV(o.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=Koi(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};DTe=Yoi([Tat(0,Et),Tat(1,on)],DTe);TTe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};kTe=class{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let n=new pte(e,t,++this._order);return this._entries.push(n),this._resolved=null,He(()=>{for(let o=0;oe.configuration)))}};pte=class{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}},mte=class{constructor(e){this.languageId=e}},ITe=class extends H{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._register(this.register(fs,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let o=this._entries.get(e);o||(o=new kTe(e),this._entries.set(e,o));let r=o.register(t,n);return this._onDidChange.fire(new mte(e)),He(()=>{r.dispose(),this._onDidChange.fire(new mte(e))})}getLanguageConfiguration(e){return this._entries.get(e)?.getResolvedConfiguration()||null}},kO=class i{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new ate(this.underlyingConfig):null,this.comments=i._handleComments(this.underlyingConfig),this.characterPair=new tte(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||$z,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new ste(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new hte(e,this.underlyingConfig)}getWordDefinition(){return eV(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new ite(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new ote(this.brackets)),this._electricCharacter}onEnter(e,t,n,o){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,o):null}getAutoClosingPairs(){return new ete(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){let[o,r]=t.blockComment;n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n}};oi(Gi,DTe,1)});var NA,Lat=D(()=>{NA=class{constructor(e,t,n,o){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=o}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}});function Nat(i,e,t){return new Lx(new bte(i),new bte(e)).ComputeDiff(t).changes}var bte,cE,uE,Ate,Lx,bV=D(()=>{Lat();VS();bte=class{constructor(e){this.source=e}getElements(){let e=this.source,t=new Int32Array(e.length);for(let n=0,o=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new NA(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Lx=class i{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;let[o,r,s]=i._getElements(e),[a,l,c]=i._getElements(t);this._hasStrings=s&&c,this._originalStringElements=o,this._originalElementsOrHash=r,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let t=e.getElements();if(i._isStringArray(t)){let n=new Int32Array(t.length);for(let o=0,r=t.length;o=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){let d;return n<=o?(cE.Assert(e===t+1,"originalStart should only be one more than originalEnd"),d=[new NA(e,0,n,o-n+1)]):e<=t?(cE.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),d=[new NA(e,t-e+1,n,0)]):(cE.Assert(e===t+1,"originalStart should only be one more than originalEnd"),cE.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}let s=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,o,s,a,r),c=s[0],u=a[0];if(l!==null)return l;if(!r[0]){let d=this.ComputeDiffRecursive(e,c,n,u,r),h=[];return r[0]?h=[new NA(c+1,t-(c+1)+1,u+1,o-(u+1)+1)]:h=this.ComputeDiffRecursive(c+1,t,u+1,o,r),this.ConcatenateChanges(d,h)}return[new NA(e,t-e+1,n,o-n+1)]}WALKTRACE(e,t,n,o,r,s,a,l,c,u,d,h,f,p,g,A,v,w){let C=null,_=null,E=new Ate,I=t,T=n,N=f[0]-A[0]-o,L=-1073741824,B=this.m_forwardHistory.length-1;do{let z=N+e;z===I||z=0&&(c=this.m_forwardHistory[B],e=c[0],I=1,T=c.length-1)}while(--B>=-1);if(C=E.getReverseChanges(),w[0]){let z=f[0]+1,Q=A[0]+1;if(C!==null&&C.length>0){let Z=C[C.length-1];z=Math.max(z,Z.getOriginalEnd()),Q=Math.max(Q,Z.getModifiedEnd())}_=[new NA(z,h-z+1,Q,g-Q+1)]}else{E=new Ate,I=s,T=a,N=f[0]-A[0]-l,L=1073741824,B=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let z=N+r;z===I||z=u[z+1]?(d=u[z+1]-1,p=d-N-l,d>L&&E.MarkNextChange(),L=d+1,E.AddOriginalElement(d+1,p+1),N=z+1-r):(d=u[z-1],p=d-N-l,d>L&&E.MarkNextChange(),L=d,E.AddModifiedElement(d+1,p+1),N=z-1-r),B>=0&&(u=this.m_reverseHistory[B],r=u[0],I=1,T=u.length-1)}while(--B>=-1);_=E.getChanges()}return this.ConcatenateChanges(C,_)}ComputeRecursionPoint(e,t,n,o,r,s,a){let l=0,c=0,u=0,d=0,h=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=t-e+(o-n),g=p+1,A=new Int32Array(g),v=new Int32Array(g),w=o-n,C=t-e,_=e-n,E=t-o,T=(C-w)%2===0;A[w]=e,v[C]=t,a[0]=!1;for(let N=1;N<=p/2+1;N++){let L=0,B=0;u=this.ClipDiagonalBound(w-N,N,w,g),d=this.ClipDiagonalBound(w+N,N,w,g);for(let Q=u;Q<=d;Q+=2){Q===u||QL+B&&(L=l,B=c),!T&&Math.abs(Q-C)<=N-1&&l>=v[Q])return r[0]=l,s[0]=c,Z<=v[Q]&&N<=1448?this.WALKTRACE(w,u,d,_,C,h,f,E,A,v,l,t,r,c,o,s,T,a):null}let z=(L-e+(B-n)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(L,z))return a[0]=!0,r[0]=L,s[0]=B,z>0&&N<=1448?this.WALKTRACE(w,u,d,_,C,h,f,E,A,v,l,t,r,c,o,s,T,a):(e++,n++,[new NA(e,t-e+1,n,o-n+1)]);h=this.ClipDiagonalBound(C-N,N,C,g),f=this.ClipDiagonalBound(C+N,N,C,g);for(let Q=h;Q<=f;Q+=2){Q===h||Q=v[Q+1]?l=v[Q+1]-1:l=v[Q-1],c=l-(Q-C)-E;let Z=l;for(;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(v[Q]=l,T&&Math.abs(Q-w)<=N&&l<=A[Q])return r[0]=l,s[0]=c,Z>=A[Q]&&N<=1448?this.WALKTRACE(w,u,d,_,C,h,f,E,A,v,l,t,r,c,o,s,T,a):null}if(N<=1447){let Q=new Int32Array(d-u+2);Q[0]=w-u+1,uE.Copy2(A,u,Q,1,d-u+1),this.m_forwardHistory.push(Q),Q=new Int32Array(f-h+2),Q[0]=C-h+1,uE.Copy2(v,h,Q,1,f-h+1),this.m_reverseHistory.push(Q)}}return this.WALKTRACE(w,u,d,_,C,h,f,E,A,v,l,t,r,c,o,s,T,a)}PrettifyChanges(e){for(let t=0;t0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){let n=e[t],o=0,r=0;if(t>0){let d=e[t-1];o=d.originalStart+d.originalLength,r=d.modifiedStart+d.modifiedLength}let s=n.originalLength>0,a=n.modifiedLength>0,l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){let h=n.originalStart-d,f=n.modifiedStart-d;if(hc&&(c=g,l=d)}n.originalStart-=l,n.modifiedStart-=l;let u=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],u)){e[t-1]=u[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&f>l&&(l=f,c=d,u=h)}return l>0?[c,u]:null}_contiguousSequenceScore(e,t,n){let o=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,o){let r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,o)?1:0;return r+s}ConcatenateChanges(e,t){let n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){let o=new Array(e.length+t.length-1);return uE.Copy(e,0,o,0,e.length-1),o[e.length-1]=n[0],uE.Copy(t,1,o,e.length,t.length-1),o}else{let o=new Array(e.length+t.length);return uE.Copy(e,0,o,0,e.length),uE.Copy(t,0,o,e.length,t.length),o}}ChangesOverlap(e,t,n){if(cE.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),cE.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){let o=e.originalStart,r=e.originalLength,s=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new NA(o,r,s,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,o){if(e>=0&&e255?255:i|0}function lL(i){return i<0?0:i>4294967295?4294967295:i|0}var AV=D(()=>{});var Nx,Mx,cL=D(()=>{AV();Nx=class i{constructor(e){let t=aL(e);this._defaultValue=t,this._asciiMap=i._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let n=aL(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},Mx=class{constructor(){this._actual=new Nx(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}});function Xoi(){return LTe===null&&(LTe=new MTe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),LTe}function Zoi(){if(vV===null){vV=new Nx(0);let i=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let t=0;t{cL();NTe=class{constructor(e,t,n){let o=new Uint8Array(e*t);for(let r=0,s=e*t;rt&&(t=l),a>n&&(n=a),c>n&&(n=c)}t++,n++;let o=new NTe(n,t,0);for(let r=0,s=e.length;r=this._maxCharCode?0:this._states.get(e,t)}},LTe=null;vV=null;RTe=class i{static _createLink(e,t,n,o,r){let s=r-1;do{let a=t.charCodeAt(s);if(e.get(a)!==2)break;s--}while(s>o);if(o>0){let a=t.charCodeAt(o-1),l=t.charCodeAt(s);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&s--}return{range:{startLineNumber:n,startColumn:o+1,endLineNumber:n,endColumn:s+2},url:t.substring(o,s+1)}}static computeLinks(e,t=Xoi()){let n=Zoi(),o=[];for(let r=1,s=e.getLineCount();r<=s;r++){let a=e.getLineContent(r),l=a.length,c=0,u=0,d=0,h=1,f=!1,p=!1,g=!1,A=!1;for(;c{vte=class i{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}static{this.INSTANCE=new i}navigateValueSet(e,t,n,o,r){if(e&&t){let s=this.doNavigateValueSet(t,r);if(s)return{range:e,value:s}}if(n&&o){let s=this.doNavigateValueSet(o,r);if(s)return{range:n,value:s}}return null}doNavigateValueSet(e,t){let n=this.numberReplace(e,t);return n!==null?n:this.textReplace(e,t)}numberReplace(e,t){let n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),o=Number(e),r=parseFloat(e);return!isNaN(o)&&!isNaN(r)&&o===r?o===0&&!t?null:(o=Math.floor(o*n),o+=t?n:-n,String(o/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let o=null;for(let r=0,s=e.length;o===null&&r=0?(o+=n?1:-1,o<0?o=e.length-1:o%=e.length,e[o]):null}}});var yV,FTe=D(()=>{yV=class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}});function $oi(i){return Array.isArray(i)}var Oat,Pat,OTe,ps,PTe,BTe,Jl,yte,dE,Xl=D(()=>{OTe=class{constructor(e,t){this.uri=e,this.value=t}};ps=class i{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[Oat]="ResourceMap",e instanceof i)this.map=new Map(e.map),this.toKey=t??i.defaultToKey;else if($oi(e)){this.map=new Map,this.toKey=t??i.defaultToKey;for(let[n,o]of e)this.set(n,o)}else this.map=new Map,this.toKey=e??i.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new OTe(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(Oat=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},PTe=class{constructor(){this[Pat]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){let n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let o=this._map.get(e);if(o)o.value=t,n!==0&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,o=this._head;for(;o;){if(t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.key,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}values(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.value,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}entries(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:[n.key,n.value],done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}[(Pat=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},BTe=class extends PTe{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},Jl=class extends BTe{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}},yte=class{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}},dE=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){let t=this.map.get(e);return t||new Set}}});function Cd(i,e){let t=`${i}/${e.join(",")}`,n=Bat.get(t);return n||(n=new zTe(i,e),Bat.set(t,n)),n}var zTe,Bat,IO=D(()=>{Xl();cL();zTe=class extends Nx{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let n=0,o=e.length;nt)break;n=o}return n}findNextIntlWordAtOrAfterOffset(e,t){for(let n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index{rh();(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(kc||(kc={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(qu||(qu={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(af||(af={}));hE=class{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&El(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}},Ty=class{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}};LO=class{constructor(e,t,n,o,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=o,this.isAutoWhitespaceEdit=r,this._isTracked=s}},wte=class{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}},xte=class{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}});function iri(i){if(!i||i.length===0)return!1;for(let e=0,t=i.length;e=t)break;let o=i.charCodeAt(e);if(o===110||o===114||o===87)return!0}}return!1}function fE(i,e,t){if(!t)return new Ty(i,null);let n=[];for(let o=0,r=e.length;o0){let s=e.charCodeAt(n);if(i.get(s)!==0)return!0}return!1}function ori(i,e,t,n,o){if(n+o===t)return!0;let r=e.charCodeAt(n+o);if(i.get(r)!==0||r===13||r===10)return!0;if(o>0){let s=e.charCodeAt(n+o-1);if(i.get(s)!==0)return!0}return!1}function Ste(i,e,t,n,o){return nri(i,e,t,n,o)&&ori(i,e,t,n,o)}var tri,MA,_te,uL,ky,wV=D(()=>{Rt();IO();kt();Ue();ol();tri=999,MA=class{constructor(e,t,n,o){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=o}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=iri(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=x$(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new wte(t,this.wordSeparators?Cd(this.wordSeparators,[]):null,n?this.searchString:null)}};_te=class{constructor(e){let t=[],n=0;for(let o=0,r=e.length;o>0);t[r]>=e?o=r-1:t[r+1]>=e?(n=r,o=r):n=r+1}return n+1}},uL=class{static findMatches(e,t,n,o,r){let s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new ky(s.wordSeparators,s.regex),o,r):this._doFindMatchesLineByLine(e,n,s,o,r):[]}static _getMultilineMatchRange(e,t,n,o,r,s){let a,l=0;o?(l=o.findLineFeedCountBeforeOffset(r),a=t+r+l):a=t+r;let c;if(o){let f=o.findLineFeedCountBeforeOffset(r+s.length)-l;c=a+s.length+f}else c=a+s.length;let u=e.getPositionAt(a),d=e.getPositionAt(c);return new R(u.lineNumber,u.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,n,o,r){let s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r +`?new _te(a):null,c=[],u=0,d;for(n.reset(0);d=n.next(a);)if(c[u++]=fE(this._getMultilineMatchRange(e,s,a,l,d.index,d[0]),d,o),u>=r)return c;return c}static _doFindMatchesLineByLine(e,t,n,o,r){let s=[],a=0;if(t.startLineNumber===t.endLineNumber){let c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,a,s,o,r),s}let l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,s,o,r);for(let c=t.startLineNumber+1;c=l))return r;return r}let u=new ky(e.wordSeparators,e.regex),d;u.reset(0);do if(d=u.next(t),d&&(s[r++]=fE(new R(n,d.index+1+o,n,d.index+1+d[0].length+o),d,a),r>=l))return r;while(d);return r}static findNextMatch(e,t,n,o){let r=t.parseSearchRequest();if(!r)return null;let s=new ky(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,o):this._doFindNextMatchLineByLine(e,n,s,o)}static _doFindNextMatchMultiline(e,t,n,o){let r=new J(t.lineNumber,1),s=e.getOffsetAt(r),a=e.getLineCount(),l=e.getValueInRange(new R(r.lineNumber,r.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r +`?new _te(l):null;n.reset(t.column-1);let u=n.next(l);return u?fE(this._getMultilineMatchRange(e,s,l,c,u.index,u[0]),u,o):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new J(1,1),n,o):null}static _doFindNextMatchLineByLine(e,t,n,o){let r=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s),l=this._findFirstMatchInLine(n,a,s,t.column,o);if(l)return l;for(let c=1;c<=r;c++){let u=(s+c-1)%r,d=e.getLineContent(u+1),h=this._findFirstMatchInLine(n,d,u+1,1,o);if(h)return h}return null}static _findFirstMatchInLine(e,t,n,o,r){e.reset(o-1);let s=e.next(t);return s?fE(new R(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,o){let r=t.parseSearchRequest();if(!r)return null;let s=new ky(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,o):this._doFindPreviousMatchLineByLine(e,n,s,o)}static _doFindPreviousMatchMultiline(e,t,n,o){let r=this._doFindMatchesMultiline(e,new R(1,1,t.lineNumber,t.column),n,o,10*tri);if(r.length>0)return r[r.length-1];let s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new J(s,e.getLineMaxColumn(s)),n,o):null}static _doFindPreviousMatchLineByLine(e,t,n,o){let r=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s).substring(0,t.column-1),l=this._findLastMatchInLine(n,a,s,o);if(l)return l;for(let c=1;c<=r;c++){let u=(r+s-c-1)%r,d=e.getLineContent(u+1),h=this._findLastMatchInLine(n,d,u+1,o);if(h)return h}return null}static _findLastMatchInLine(e,t,n,o){let r=null,s;for(e.reset(0);s=e.next(t);)r=fE(new R(n,s.index+1,n,s.index+1+s[0].length),s,o);return r}};ky=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t=e.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;let o=n.index,r=n[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){WF(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||Ste(this._wordSeparators,e,t,o,r))return n}while(n);return null}}});function rri(i,e){return`[${$a(i.map(n=>String.fromCodePoint(n)).join(""))}]`}function Vat(i){return i===" "||i===` +`||i===" "}var dL,Ete,VTe=D(()=>{Ue();wV();Rt();Gb();jI();dL=class{static computeUnicodeHighlights(e,t,n){let o=n?n.startLineNumber:1,r=n?n.endLineNumber:e.getLineCount(),s=new Ete(t),a=s.getCandidateCodePoints(),l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${rri(Array.from(a))}`,"g");let c=new ky(null,l),u=[],d=!1,h,f=0,p=0,g=0;e:for(let A=o,v=r;A<=v;A++){let w=e.getLineContent(A),C=w.length;c.reset(0);do if(h=c.next(w),h){let _=h.index,E=h.index+h[0].length;if(_>0){let L=w.charCodeAt(_-1);Er(L)&&_--}if(E+1=1e3){d=!0;break e}u.push(new R(A,_+1,A,E+1))}}while(h)}return{ranges:u,hasMore:d,ambiguousCharacterCount:f,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,t){let n=new Ete(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let r=e.codePointAt(0),s=n.ambiguousCharacters.getPrimaryConfusable(r),a=zF.getLocales().filter(l=>!zF.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};Ete=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=zF.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let t of hx.codePoints)Vat(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let o=!1,r=!1;if(t)for(let s of t){let a=s.codePointAt(0),l=gy(s);o=o||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!hx.isInvisibleCharacter(a)&&(r=!0)}return!o&&r?0:this.options.invisibleCharacters&&!Vat(e)&&hx.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}});var pE,NO,Dte=D(()=>{pE=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},NO=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}});var Ci,Tte,ap=D(()=>{Tt();Ci=class i{static addRange(e,t){let n=0;for(;nt))return new i(e,t)}static ofLength(e){return new i(0,e)}static ofStartAndLength(e,t){return new i(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new fi(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new i(this.start+e,this.endExclusive+e)}deltaStart(e){return new i(this.start+e,this.endExclusive)}deltaEnd(e){return new i(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new fi(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new fi(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}});function Rx(i,e){let t=sri(i,e);if(t!==-1)return i[t]}function sri(i,e,t=i.length-1){for(let n=t;n>=0;n--){let o=i[n];if(e(o))return n}return-1}function Fx(i,e){let t=hL(i,e);return t===-1?void 0:i[t]}function hL(i,e,t=0,n=i.length){let o=t,r=n;for(;o0&&(t=o)}return t}function Wat(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n=0&&(t=o)}return t}function Uat(i,e){return CV(i,(t,n)=>-e(t,n))}function jat(i,e){if(i.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function Qat(i,e){for(let t of i){let n=e(t);if(n!==void 0)return n}}var xV,lp=D(()=>{xV=class i{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(i.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=hL(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,t===-1?void 0:this._array[t]}}});var Qt,Ig,_d=D(()=>{Tt();ap();Ue();lp();Qt=class i{static fromRangeInclusive(e){return new i(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new Ig(e[0].slice());for(let n=1;nt)throw new fi(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=hL(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){let o=this._normalizedRanges[t];this._normalizedRanges[t]=o.join(e)}else{let o=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,o)}}contains(e){let t=Fx(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){let t=Fx(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let t=[],n=0,o=0,r=null;for(;n=s.startLineNumber?r=new Qt(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return r!==null&&t.push(r),new i(t)}subtractFrom(e){let t=mE(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),n=hL(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new i([e]);let o=[],r=e.startLineNumber;for(let s=t;sr&&o.push(new Qt(r,a.startLineNumber)),r=a.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){let t=[],n=0,o=0;for(;nt.delta(e)))}}});var au,Ox=D(()=>{kt();Ue();au=class i{static{this.zero=new i(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new i(0,t.column-e.column):new i(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return i.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(let o of e)o===` +`?(t++,n=0):n++;return new i(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return this.lineCount===0?new R(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new R(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return this.lineCount===0?new J(e.lineNumber,e.column+this.columnCount):new J(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}});var kte,Gat=D(()=>{ap();Ox();kte=class{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t{Gb();Tt();kt();Gat();Ue();Ox();gE=class{constructor(e){this.edits=e,Qb(()=>XF(e,(t,n)=>t.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}apply(e){let t="",n=new J(1,1);for(let r of this.edits){let s=r.range,a=s.getStartPosition(),l=s.getEndPosition(),c=qat(n,a);c.isEmpty()||(t+=e.getValueOfRange(c)),t+=r.text,n=l}let o=qat(n,e.endPositionExclusive);return o.isEmpty()||(t+=e.getValueOfRange(o)),t}applyToString(e){let t=new HTe(e);return this.apply(t)}getNewRanges(){let e=[],t=0,n=0,o=0;for(let r of this.edits){let s=au.ofText(r.text),a=J.lift({lineNumber:r.range.startLineNumber+n,column:r.range.startColumn+(r.range.startLineNumber===t?o:0)}),l=s.createRange(a);e.push(l),n=l.endLineNumber-r.range.endLineNumber,o=l.endColumn-r.range.endColumn,t=r.range.endLineNumber}return e}},Yu=class{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}};_V=class{get endPositionExclusive(){return this.length.addToPosition(new J(1,1))}},HTe=class extends _V{constructor(e){super(),this.value=e,this._t=new kte(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}});function MO(i,e){if(i.lineNumber<1)return new J(1,1);if(i.lineNumber>e.length)return new J(e.length,e[e.length-1].length+1);let t=e[i.lineNumber-1];return i.column>t.length+1?new J(i.lineNumber,t.length+1):i}function Yat(i,e){return i>=1&&i<=e.length}var cu,Sd,lu,Ly=D(()=>{Tt();_d();kt();Ue();Iy();cu=class i{static inverse(e,t,n){let o=[],r=1,s=1;for(let l of e){let c=new i(new Qt(r,l.original.startLineNumber),new Qt(s,l.modified.startLineNumber));c.modified.isEmpty||o.push(c),r=l.original.endLineNumberExclusive,s=l.modified.endLineNumberExclusive}let a=new i(new Qt(r,t+1),new Qt(s,n+1));return a.modified.isEmpty||o.push(a),o}static clip(e,t,n){let o=[];for(let r of e){let s=r.original.intersect(t),a=r.modified.intersect(n);s&&!s.isEmpty&&a&&!a.isEmpty&&o.push(new i(s,a))}return o}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new i(this.modified,this.original)}join(e){return new i(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){let e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new lu(e,t);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new fi("not a valid diff");return new lu(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new lu(new R(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new R(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(Yat(this.original.endLineNumberExclusive,e)&&Yat(this.modified.endLineNumberExclusive,t))return new lu(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new lu(R.fromPositions(new J(this.original.startLineNumber,1),MO(new J(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(new J(this.modified.startLineNumber,1),MO(new J(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new lu(R.fromPositions(MO(new J(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),MO(new J(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(MO(new J(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),MO(new J(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new fi}};Sd=class i extends cu{static fromRangeMappings(e){let t=Qt.join(e.map(o=>Qt.fromRangeInclusive(o.originalRange))),n=Qt.join(e.map(o=>Qt.fromRangeInclusive(o.modifiedRange)));return new i(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new i(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new i(this.original,this.modified,[this.toRangeMapping()])}},lu=class i{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new i(this.modifiedRange,this.originalRange)}toTextEdit(e){let t=e.getValueOfRange(this.modifiedRange);return new Yu(this.originalRange,t)}}});function Jat(i,e,t,n){return new Lx(i,e,t).ComputeDiff(n)}function lri(i){if(i.length<=1)return i;let e=[i[0]],t=e[0];for(let n=1,o=i.length;n!0;let e=Date.now();return()=>Date.now()-e{bV();Dte();Ly();Rt();Ue();Gb();_d();ari=3,Ite=class{computeDiff(e,t,n){let r=new UTe(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[],a=null;for(let l of r.changes){let c;l.originalEndLineNumber===0?c=new Qt(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Qt(l.originalStartLineNumber,l.originalEndLineNumber+1);let u;l.modifiedEndLineNumber===0?u=new Qt(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):u=new Qt(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let d=new Sd(c,u,l.charChanges?.map(h=>new lu(new R(h.originalStartLineNumber,h.originalStartColumn,h.originalEndLineNumber,h.originalEndColumn),new R(h.modifiedStartLineNumber,h.modifiedStartColumn,h.modifiedEndLineNumber,h.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===d.modified.startLineNumber||a.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new Sd(a.original.join(d.original),a.modified.join(d.modified),a.innerChanges&&d.innerChanges?a.innerChanges.concat(d.innerChanges):void 0),s.pop()),s.push(d),a=d}return Qb(()=>XF(s,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},RO=class i{constructor(e,t,n,o,r,s,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=o,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,n){let o=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=n.getStartLineNumber(e.modifiedStart),c=n.getStartColumn(e.modifiedStart),u=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new i(o,r,s,a,l,c,u,d)}};SV=class i{constructor(e,t,n,o,r){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=o,this.charChanges=r}static createFromDiffResult(e,t,n,o,r,s,a){let l,c,u,d,h;if(t.originalLength===0?(l=n.getStartLineNumber(t.originalStart)-1,c=0):(l=n.getStartLineNumber(t.originalStart),c=n.getEndLineNumber(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(u=o.getStartLineNumber(t.modifiedStart)-1,d=0):(u=o.getStartLineNumber(t.modifiedStart),d=o.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){let f=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),p=o.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(f.getElements().length>0&&p.getElements().length>0){let g=Jat(f,p,r,!0).changes;a&&(g=lri(g)),h=[];for(let A=0,v=g.length;A1&&g>1;){let A=h.charCodeAt(p-2),v=f.charCodeAt(g-2);if(A!==v)break;p--,g--}(p>1||g>1)&&this._pushTrimWhitespaceCharChange(o,r+1,1,p,s+1,1,g)}{let p=QTe(h,1),g=QTe(f,1),A=h.length+1,v=f.length+1;for(;p{Wt();Tt();ap();My=class i{static trivial(e,t){return new i([new ga(Ci.ofLength(e.length),Ci.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new i([new ga(Ci.ofLength(e.length),Ci.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}},ga=class i{static invert(e,t){let n=[];return xee(e,(o,r)=>{n.push(i.fromOffsetPairs(o?o.getEndExclusives():Ny.zero,r?r.getStarts():new Ny(t,(o?o.seq2Range.endExclusive-o.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new i(new Ci(e.offset1,t.offset1),new Ci(e.offset2,t.offset2))}static assertSorted(e){let t;for(let n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new fi("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new i(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new i(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new i(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new i(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new i(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new i(t,n)}getStarts(){return new Ny(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Ny(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Ny=class i{static{this.zero=new i(0,0)}static{this.max=new i(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new i(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}},bE=class i{static{this.instance=new i}isValid(){return!0}},Nte=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new fi("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime{OO=class{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,n){this.array[e+t*this.width]=n}};EV=class i{static{this.chrKeys=new Map}static getKey(e){let t=this.chrKeys.get(e);return t===void 0&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,n){this.range=e,this.lines=t,this.source=n,this.histogram=[];let o=0;for(let r=e.startLineNumber-1;r{ap();FO();Mte();Rte=class{compute(e,t,n=bE.instance,o){if(e.length===0||t.length===0)return My.trivial(e,t);let r=new OO(e.length,t.length),s=new OO(e.length,t.length),a=new OO(e.length,t.length);for(let p=0;p0&&g>0&&s.get(p-1,g-1)===3&&(w+=a.get(p-1,g-1)),w+=o?o(p,g):1):w=-1;let C=Math.max(A,v,w);if(C===w){let _=p>0&&g>0?a.get(p-1,g-1):0;a.set(p,g,_+1),s.set(p,g,3)}else C===A?(a.set(p,g,0),s.set(p,g,1)):C===v&&(a.set(p,g,0),s.set(p,g,2));r.set(p,g,C)}let l=[],c=e.length,u=t.length;function d(p,g){(p+1!==c||g+1!==u)&&l.push(new ga(new Ci(p+1,c),new Ci(g+1,u))),c=p,u=g}let h=e.length-1,f=t.length-1;for(;h>=0&&f>=0;)s.get(h,f)===3?(d(h,f),h--,f--):s.get(h,f)===1?h--:f--;return d(-1,-1),l.reverse(),new My(l,!1)}}});var PO,Fte,GTe,qTe,YTe=D(()=>{ap();FO();PO=class{compute(e,t,n=bE.instance){if(e.length===0||t.length===0)return My.trivial(e,t);let o=e,r=t;function s(g,A){for(;go.length||E>r.length)continue;let I=s(_,E);l.set(u,I);let T=_===w?c.get(u+1):c.get(u-1);if(c.set(u,I!==_?new Fte(T,_,E,I-_):T),l.get(u)===o.length&&l.get(u)-u===r.length)break e}}let d=c.get(u),h=[],f=o.length,p=r.length;for(;;){let g=d?d.x+d.length:0,A=d?d.y+d.length:0;if((g!==f||A!==p)&&h.push(new ga(new Ci(g,f),new Ci(A,p))),!d)break;f=d.x,p=d.y,d=d.prev}return h.reverse(),new My(h,!1)}},Fte=class{constructor(e,t,n,o){this.prev=e,this.x=t,this.y=n,this.length=o}},GTe=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},qTe=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}});function KTe(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}function $at(i){return cri[i]}function elt(i){return i===10?8:i===13?7:DV(i)?6:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:i===44||i===59?5:4}var AE,cri,JTe=D(()=>{lp();ap();kt();Ue();Mte();AE=class{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let o=this.range.startLineNumber;o<=this.range.endLineNumber;o++){let r=e[o-1],s=0;o===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,r=r.substring(s)),this.lineStartOffsets.push(s);let a=0;if(!n){let c=r.trimStart();a=r.length-c.length,r=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let l=o===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-a,r.length):r.length;for(let c=0;cString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let t=elt(e>0?this.elements[e-1]:-1),n=elt(er<=e),o=e-this.firstElementOffsetByLineIdx[n];return new J(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+o+(o===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){let t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?R.fromPositions(n,n):R.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!KTe(this.elements[e]))return;let t=e;for(;t>0&&KTe(this.elements[t-1]);)t--;let n=e;for(;no<=e.start)??0,n=Hat(this.firstElementOffsetByLineIdx,o=>e.endExclusive<=o)??this.elements.length;return new Ci(t,n)}};cri={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10}});function ilt(i,e,t,n,o,r){let{moves:s,excludedChanges:a}=dri(i,e,t,r);if(!r.isValid())return[];let l=i.filter(u=>!a.has(u)),c=hri(l,n,o,e,t,r);return Jz(s,c),s=fri(s),s=s.filter(u=>{let d=u.original.toOffsetRange().slice(e).map(f=>f.trim());return d.join(` +`).length>=15&&uri(d,f=>f.length>=2)>=2}),s=pri(i,s),s}function uri(i,e){let t=0;for(let n of i)e(n)&&t++;return t}function dri(i,e,t,n){let o=[],r=i.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new EV(l.original,e,l)),s=new Set(i.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new EV(l.modified,t,l))),a=new Set;for(let l of r){let c=-1,u;for(let d of s){let h=l.computeSimilarity(d);h>c&&(c=h,u=d)}if(c>.9&&u&&(s.delete(u),o.push(new cu(l.range,u.range)),a.add(l.source),a.add(u.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}function hri(i,e,t,n,o,r){let s=[],a=new dE;for(let h of i)for(let f=h.original.startLineNumber;fh.modified.startLineNumber,vd));for(let h of i){let f=[];for(let p=h.modified.startLineNumber;p{for(let _ of f)if(_.originalLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive&&_.modifiedLineRange.endLineNumberExclusive+1===A.endLineNumberExclusive){_.originalLineRange=new Qt(_.originalLineRange.startLineNumber,w.endLineNumberExclusive),_.modifiedLineRange=new Qt(_.modifiedLineRange.startLineNumber,A.endLineNumberExclusive),v.push(_);return}let C={modifiedLineRange:A,originalLineRange:w};l.push(C),v.push(C)}),f=v}if(!r.isValid())return[]}l.sort(See(pa(h=>h.modifiedLineRange.length,vd)));let c=new Ig,u=new Ig;for(let h of l){let f=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,p=c.subtractFrom(h.modifiedLineRange),g=u.subtractFrom(h.originalLineRange).getWithDelta(f),A=p.getIntersection(g);for(let v of A.ranges){if(v.length<3)continue;let w=v,C=v.delta(-f);s.push(new cu(C,w)),c.addRange(w),u.addRange(C)}}s.sort(pa(h=>h.original.startLineNumber,vd));let d=new xV(i);for(let h=0;hI.original.startLineNumber<=f.original.startLineNumber),g=Fx(i,I=>I.modified.startLineNumber<=f.modified.startLineNumber),A=Math.max(f.original.startLineNumber-p.original.startLineNumber,f.modified.startLineNumber-g.modified.startLineNumber),v=d.findLastMonotonous(I=>I.original.startLineNumberI.modified.startLineNumbern.length||T>o.length||c.contains(T)||u.contains(I)||!tlt(n[I-1],o[T-1],r))break}_>0&&(u.addRange(new Qt(f.original.startLineNumber-_,f.original.startLineNumber)),c.addRange(new Qt(f.modified.startLineNumber-_,f.modified.startLineNumber)));let E;for(E=0;En.length||T>o.length||c.contains(T)||u.contains(I)||!tlt(n[I-1],o[T-1],r))break}E>0&&(u.addRange(new Qt(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+E)),c.addRange(new Qt(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+E))),(_>0||E>0)&&(s[h]=new cu(new Qt(f.original.startLineNumber-_,f.original.endLineNumberExclusive+E),new Qt(f.modified.startLineNumber-_,f.modified.endLineNumberExclusive+E)))}return s}function tlt(i,e,t){if(i.trim()===e.trim())return!0;if(i.length>300&&e.length>300)return!1;let o=new PO().compute(new AE([i],new R(1,1,1,i.length),!1),new AE([e],new R(1,1,1,e.length),!1),t),r=0,s=ga.invert(o.diffs,i.length);for(let u of s)u.seq1Range.forEach(d=>{DV(i.charCodeAt(d))||r++});function a(u){let d=0;for(let h=0;he.length?i:e);return r/l>.6&&l>10}function fri(i){if(i.length===0)return i;i.sort(pa(t=>t.original.startLineNumber,vd));let e=[i[0]];for(let t=1;t=0&&s>=0&&r+s<=2){e[e.length-1]=n.join(o);continue}e.push(o)}return e}function pri(i,e){let t=new xV(i);return e=e.filter(n=>{let o=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber{FO();Ly();Wt();lp();Xl();_d();JTe();Mte();YTe();Ue()});function TV(i,e,t){let n=t;return n=olt(i,e,n),n=olt(i,e,n),n=mri(i,e,n),n}function olt(i,e,t){if(t.length===0)return t;let n=[];n.push(t[0]);for(let r=1;r0&&(a=a.delta(c))}o.push(a)}return n.length>0&&o.push(n[n.length-1]),o}function mri(i,e,t){if(!i.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,r=t[n],s=n+1=n.start&&i.seq2Range.start-s>=o.start&&t.isStronglyEqual(i.seq2Range.start-s,i.seq2Range.endExclusive-s)&&s<100;)s++;s--;let a=0;for(;i.seq1Range.start+ac&&(c=p,l=u)}return i.delta(l)}function slt(i,e,t){let n=[];for(let o of t){let r=n[n.length-1];if(!r){n.push(o);continue}o.seq1Range.start-r.seq1Range.endExclusive<=2||o.seq2Range.start-r.seq2Range.endExclusive<=2?n[n.length-1]=new ga(r.seq1Range.join(o.seq1Range),r.seq2Range.join(o.seq2Range)):n.push(o)}return n}function alt(i,e,t){let n=ga.invert(t,i.length),o=[],r=new Ny(0,0);function s(l,c){if(l.offset10;){let A=n[0];if(!(A.seq1Range.intersects(h.seq1Range)||A.seq2Range.intersects(h.seq2Range)))break;let w=i.findWordContaining(A.seq1Range.start),C=e.findWordContaining(A.seq2Range.start),_=new ga(w,C),E=_.intersect(A);if(p+=E.seq1Range.length,g+=E.seq2Range.length,h=h.join(_),h.seq1Range.endExclusive>=A.seq1Range.endExclusive)n.shift();else break}p+g<(h.seq1Range.length+h.seq2Range.length)*2/3&&o.push(h),r=h.getEndExclusives()}for(;n.length>0;){let l=n.shift();l.seq1Range.isEmpty||(s(l.getStarts(),l),s(l.getEndExclusives().delta(-1),l))}return gri(t,o)}function gri(i,e){let t=[];for(;i.length>0||e.length>0;){let n=i[0],o=e[0],r;n&&(!o||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=r.seq1Range.start?t[t.length-1]=t[t.length-1].join(r):t.push(r)}return t}function llt(i,e,t){let n=t;if(n.length===0)return n;let o=0,r;do{r=!1;let s=[n[0]];for(let a=1;a5||f.seq1Range.length+f.seq2Range.length>5)},l=n[a],c=s[s.length-1];u(c,l)?(r=!0,s[s.length-1]=s[s.length-1].join(l)):s.push(l)}n=s}while(o++<10&&r);return n}function clt(i,e,t){let n=t;if(n.length===0)return n;let o=0,r;do{r=!1;let a=[n[0]];for(let l=1;l5||g.length>500)return!1;let v=i.getText(g).trim();if(v.length>20||v.split(/\r\n|\r|\n/).length>1)return!1;let w=i.countLinesIn(f.seq1Range),C=f.seq1Range.length,_=e.countLinesIn(f.seq2Range),E=f.seq2Range.length,I=i.countLinesIn(p.seq1Range),T=p.seq1Range.length,N=e.countLinesIn(p.seq2Range),L=p.seq2Range.length,B=130;function z(Q){return Math.min(Q,B)}return Math.pow(Math.pow(z(w*40+C),1.5)+Math.pow(z(_*40+E),1.5),1.5)+Math.pow(Math.pow(z(I*40+T),1.5)+Math.pow(z(N*40+L),1.5),1.5)>(B**1.5)**1.5*1.3},c=n[l],u=a[a.length-1];d(u,c)?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(o++<10&&r);let s=[];return Mst(n,(a,l,c)=>{let u=l;function d(v){return v.length>0&&v.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}let h=i.extendToFullLines(l.seq1Range),f=i.getText(new Ci(h.start,l.seq1Range.start));d(f)&&(u=u.deltaStart(-f.length));let p=i.getText(new Ci(l.seq1Range.endExclusive,h.endExclusive));d(p)&&(u=u.deltaEnd(p.length));let g=ga.fromOffsetPairs(a?a.getEndExclusives():Ny.zero,c?c.getStarts():Ny.max),A=u.intersect(g);s.length>0&&A.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(A):s.push(A)}),s}var XTe=D(()=>{Wt();ap();FO()});function ult(i){let e=0;for(;e{kV=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let t=e===0?0:ult(this.lines[e-1]),n=e===this.lines.length?0:ult(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}});function hlt(i,e,t,n=!1){let o=[];for(let r of pO(i.map(s=>bri(s,e,t)),(s,a)=>s.original.overlapOrTouch(a.original)||s.modified.overlapOrTouch(a.modified))){let s=r[0],a=r[r.length-1];o.push(new Sd(s.original.join(a.original),s.modified.join(a.modified),r.map(l=>l.innerChanges[0])))}return Qb(()=>!n&&o.length>0&&(o[0].modified.startLineNumber!==o[0].original.startLineNumber||t.length-o[o.length-1].modified.endLineNumberExclusive!==e.length-o[o.length-1].original.endLineNumberExclusive)?!1:XF(o,(r,s)=>s.original.startLineNumber-r.original.endLineNumberExclusive===s.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=t[i.modifiedRange.startLineNumber-1].length&&i.originalRange.startColumn-1>=e[i.originalRange.startLineNumber-1].length&&i.originalRange.startLineNumber<=i.originalRange.endLineNumber+o&&i.modifiedRange.startLineNumber<=i.modifiedRange.endLineNumber+o&&(n=1);let r=new Qt(i.originalRange.startLineNumber+n,i.originalRange.endLineNumber+1+o),s=new Qt(i.modifiedRange.startLineNumber+n,i.modifiedRange.endLineNumber+1+o);return new Sd(r,s,[i])}function Ari(i){return new cu(new Qt(i.seq1Range.start+1,i.seq1Range.endExclusive+1),new Qt(i.seq2Range.start+1,i.seq2Range.endExclusive+1))}var BO,ZTe=D(()=>{Wt();Gb();_d();ap();Ue();FO();Zat();YTe();nlt();XTe();dlt();JTe();Dte();Ly();BO=class{constructor(){this.dynamicProgrammingDiffing=new Rte,this.myersDiffingAlgorithm=new PO}computeDiff(e,t,n){if(e.length<=1&&Zi(e,t,(E,I)=>E===I))return new pE([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new pE([new Sd(new Qt(1,e.length+1),new Qt(1,t.length+1),[new lu(new R(1,1,e.length,e[e.length-1].length+1),new R(1,1,t.length,t[t.length-1].length+1))])],[],!1);let o=n.maxComputationTimeMs===0?bE.instance:new Nte(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function a(E){let I=s.get(E);return I===void 0&&(I=s.size,s.set(E,I)),I}let l=e.map(E=>a(E.trim())),c=t.map(E=>a(E.trim())),u=new kV(l,e),d=new kV(c,t),h=u.length+d.length<1700?this.dynamicProgrammingDiffing.compute(u,d,o,(E,I)=>e[E]===t[I]?t[I].length===0?.1:1+Math.log(1+t[I].length):.99):this.myersDiffingAlgorithm.compute(u,d,o),f=h.diffs,p=h.hitTimeout;f=TV(u,d,f),f=llt(u,d,f);let g=[],A=E=>{if(r)for(let I=0;IE.seq1Range.start-v===E.seq2Range.start-w);let I=E.seq1Range.start-v;A(I),v=E.seq1Range.endExclusive,w=E.seq2Range.endExclusive;let T=this.refineDiff(e,t,E,o,r);T.hitTimeout&&(p=!0);for(let N of T.mappings)g.push(N)}A(e.length-v);let C=hlt(g,e,t),_=[];return n.computeMoves&&(_=this.computeMoves(C,e,t,l,c,o,r)),Qb(()=>{function E(T,N){if(T.lineNumber<1||T.lineNumber>N.length)return!1;let L=N[T.lineNumber-1];return!(T.column<1||T.column>L.length+1)}function I(T,N){return!(T.startLineNumber<1||T.startLineNumber>N.length+1||T.endLineNumberExclusive<1||T.endLineNumberExclusive>N.length+1)}for(let T of C){if(!T.innerChanges)return!1;for(let N of T.innerChanges)if(!(E(N.modifiedRange.getStartPosition(),t)&&E(N.modifiedRange.getEndPosition(),t)&&E(N.originalRange.getStartPosition(),e)&&E(N.originalRange.getEndPosition(),e)))return!1;if(!I(T.modified,t)||!I(T.original,e))return!1}return!0}),new pE(C,_,p)}computeMoves(e,t,n,o,r,s,a){return ilt(e,t,n,o,r,s).map(u=>{let d=this.refineDiff(t,n,new ga(u.original.toOffsetRange(),u.modified.toOffsetRange()),s,a),h=hlt(d.mappings,t,n,!0);return new NO(u,h)})}refineDiff(e,t,n,o,r){let a=Ari(n).toRangeMapping2(e,t),l=new AE(e,a.originalRange,r),c=new AE(t,a.modifiedRange,r),u=l.length+c.length<500?this.dynamicProgrammingDiffing.compute(l,c,o):this.myersDiffingAlgorithm.compute(l,c,o),d=!1,h=u.diffs;d&&ga.assertSorted(h),h=TV(l,c,h),d&&ga.assertSorted(h),h=alt(l,c,h),d&&ga.assertSorted(h),h=slt(l,c,h),d&&ga.assertSorted(h),h=clt(l,c,h),d&&ga.assertSorted(h);let f=h.map(p=>new lu(l.translateRange(p.seq1Range),c.translateRange(p.seq2Range)));return d&&lu.assertSorted(f),{mappings:f,hitTimeout:u.hitTimeout}}}});var $Te,flt=D(()=>{Xat();ZTe();$Te={getLegacy:()=>new Ite,getDefault:()=>new BO}});function glt(i){let e=[];for(let t of i){let n=Number(t);(n||n===0&&t.replace(/\s/g,"")!=="")&&e.push(n)}return e}function eke(i,e,t,n){return{red:i/255,blue:t/255,green:e/255,alpha:n}}function IV(i,e){let t=e.index,n=e[0].length;if(!t)return;let o=i.positionAt(t);return{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:o.lineNumber,endColumn:o.column+n}}function vri(i,e){if(!i)return;let t=me.Format.CSS.parseHex(e);if(t)return{range:i,color:eke(t.rgba.r,t.rgba.g,t.rgba.b,t.rgba.a)}}function plt(i,e,t){if(!i||e.length!==1)return;let o=e[0].values(),r=glt(o);return{range:i,color:eke(r[0],r[1],r[2],t?r[3]:1)}}function mlt(i,e,t){if(!i||e.length!==1)return;let o=e[0].values(),r=glt(o),s=new me(new by(r[0],r[1]/100,r[2]/100,t?r[3]:1));return{range:i,color:eke(s.rgba.r,s.rgba.g,s.rgba.b,s.rgba.a)}}function LV(i,e){return typeof i=="string"?[...i.matchAll(e)]:i.findMatches(e)}function yri(i){let e=[],n=LV(i,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(let o of n){let r=o.filter(c=>c!==void 0),s=r[1],a=r[2];if(!a)continue;let l;if(s==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=plt(IV(i,o),LV(a,c),!1)}else if(s==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=plt(IV(i,o),LV(a,c),!0)}else if(s==="hsl"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=mlt(IV(i,o),LV(a,c),!1)}else if(s==="hsla"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=mlt(IV(i,o),LV(a,c),!0)}else s==="#"&&(l=vri(IV(i,o),s+a));l&&e.push(l)}return e}function blt(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:yri(i)}var Alt=D(()=>{Wr()});function ylt(i,e){let t=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){let n=xri(i,e);t=t.concat(n)}if(e.findMarkSectionHeaders){let n=Cri(i);t=t.concat(n)}return t}function xri(i,e){let t=[],n=i.getLineCount();for(let o=1;o<=n;o++){let r=i.getLineContent(o),s=r.match(e.foldingRules.markers.start);if(s){let a={startLineNumber:o,startColumn:s[0].length+1,endLineNumber:o,endColumn:r.length+1};if(a.endColumn>a.startColumn){let l={range:a,...wlt(r.substring(s[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&t.push(l)}}}return t}function Cri(i){let e=[],t=i.getLineCount();for(let n=1;n<=t;n++){let o=i.getLineContent(n);_ri(o,n,e)}return e}function _ri(i,e,t){vlt.lastIndex=0;let n=vlt.exec(i);if(n){let o=n.indices[1][0]+1,r=n.indices[1][1]+1,s={startLineNumber:e,startColumn:o,endLineNumber:e,endColumn:r};if(s.endColumn>s.startColumn){let a={range:s,...wlt(n[1]),shouldBeInComments:!0};(a.text||a.hasSeparatorLine)&&t.push(a)}}}function wlt(i){i=i.trim();let e=i.startsWith("-");return i=i.replace(wri,""),{text:i,hasSeparatorLine:e}}var vlt,wri,xlt=D(()=>{vlt=new RegExp("\\bMARK:\\s*(.*)$","d"),wri=/^-+|-+$/g});var Ote,Pte,Bte,tke=D(()=>{Wt();AV();Ote=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=lL(e);let n=this.values,o=this.prefixSum,r=t.length;return r===0?!1:(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=lL(e),t=lL(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;let r=n.length-e;return t>=r&&(t=r),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=lL(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,o=0,r=0,s=0;for(;t<=n;)if(o=t+(n-t)/2|0,r=this.prefixSum[o],s=r-this.values[o],e=r)t=o+1;else break;return new Bte(o,e-s)}},Pte=class{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new Bte(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=XS(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=o+n;for(let r=0;r{Rt();kt();tke();zte=class{constructor(e,t,n,o){this._uri=e,this._lines=t,this._eol=n,this._versionId=o,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new J(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let o=0;o{Gt();de();mn();kt();Ue();jI();Clt();_lt=60*1e3,Vte=class extends H{constructor(e,t,n=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let o=new OS;o.cancelAndSet(()=>this._checkStopModelSync(),Math.round(_lt/2)),this._register(o)}}dispose(){for(let e in this._syncedModels)Oi(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(let n of e){let o=n.toString();this._syncedModels[o]||this._beginModelSync(n,t),this._syncedModels[o]&&(this._syncedModelsLastUsedTime[o]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>_lt&&t.push(n);for(let n of t)this._stopModelSync(n)}_beginModelSync(e,t){let n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;let o=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});let r=new se;r.add(n.onDidChangeContent(s=>{this._proxy.$acceptModelChanged(o.toString(),s)})),r.add(n.onWillDispose(()=>{this._stopModelSync(o)})),r.add(He(()=>{this._proxy.$acceptRemovedModel(o)})),this._syncedModels[o]=r}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Oi(t)}},Hte=class{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new ike(Je.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},ike=class extends zte{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,o=!0;else{let r=this._lines[t-1].length+1;n<1?(n=1,o=!0):n>r&&(n=r,o=!0)}return o?{lineNumber:t,column:n}:e}}});var Sri,oke,fL,Slt=D(()=>{bV();Ue();Rat();Fat();H6();FTe();cd();VTe();flt();rh();xl();Alt();xlt();nke();Sri=!0,oke=class{constructor(){this._workerTextModelSyncServer=new Hte}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){let o=this._getModel(e);return o?dL.computeUnicodeHighlights(o,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){let n=this._getModel(e);return n?ylt(n,t):[]}async $computeDiff(e,t,n,o){let r=this._getModel(e),s=this._getModel(t);return!r||!s?null:fL.computeDiff(r,s,n,o)}static computeDiff(e,t,n,o){let r=o==="advanced"?$Te.getDefault():$Te.getLegacy(),s=e.getLinesContent(),a=t.getLinesContent(),l=r.computeDiff(s,a,n),c=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function u(d){return d.map(h=>[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,h.innerChanges?.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])])}return{identical:c,quitEarly:l.hitTimeout,changes:u(l.changes),moves:l.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,u(d.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount(),o=t.getLineCount();if(n!==o)return!1;for(let r=1;r<=n;r++){let s=e.getLineContent(r),a=t.getLineContent(r);if(s!==a)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){let o=this._getModel(e);if(!o)return t;let r=[],s;t=t.slice(0).sort((l,c)=>{if(l.range&&c.range)return R.compareRangesUsingStarts(l.range,c.range);let u=l.range?0:1,d=c.range?0:1;return u-d});let a=0;for(let l=1;lfL._diffLimit){r.push({range:l,text:c});continue}let h=Nat(d,c,n),f=o.offsetAt(R.lift(l).getStartPosition());for(let p of h){let g=o.positionAt(f+p.originalStart),A=o.positionAt(f+p.originalStart+p.originalLength),v={text:c.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:A.lineNumber,endColumn:A.column}};o.getValueInRange(v.range)!==v.text&&r.push(v)}}return typeof s=="number"&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){let t=this._getModel(e);return t?Mat(t):null}async $computeDefaultDocumentColors(e){let t=this._getModel(e);return t?blt(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,o){let r=new xo,s=new RegExp(n,o),a=new Set;e:for(let l of e){let c=this._getModel(l);if(c){for(let u of c.words(s))if(!(u===t||!isNaN(Number(u)))&&(a.add(u),a.size>fL._suggestionsLimit))break e}}return{words:Array.from(a),duration:r.elapsed()}}async $computeWordRanges(e,t,n,o){let r=this._getModel(e);if(!r)return Object.create(null);let s=new RegExp(n,o),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.$fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(Xz(this._foreignModule))):new Promise((a,l)=>{let c=u=>{this._foreignModule=u.create(s,t),a(Xz(this._foreignModule))};Sri?import(`${mx.asBrowserUri(`${e}.js`).toString(!0)}`).then(c).catch(l):require([`${e}`],c,l)})}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};typeof importScripts=="function"&&(globalThis.monaco=GJ())});var pL,Wte,NV=D(()=>{ht();pL=At("textResourceConfigurationService"),Wte=At("textResourcePropertiesService")});var Me,Hi=D(()=>{ht();Me=At("ILanguageFeaturesService")});function gL(i,e){let t=i.getModel(e);return!(!t||t.isTooLargeForSyncing())}var lke,mL,Elt,Ute,rke,ske,ake,MV,cke=D(()=>{Gt();de();lTe();hat();Ue();Rs();Slt();su();NV();Wt();ch();cd();Tt();Hi();Dte();Ly();_d();gd();Ye();nke();FTe();lke=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},mL=function(i,e){return function(t,n){e(t,n,i)}},Elt=300*1e3;Ute=class extends H{constructor(e,t,n,o,r,s){super(),this._languageConfigurationService=r,this._modelService=t,this._workerManager=this._register(new ske(e,this._modelService)),this._logService=o,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(a,l)=>{if(!gL(this._modelService,a.uri))return Promise.resolve({links:[]});let u=await(await this._workerWithResources([a.uri])).$computeLinks(a.uri.toString());return u&&{links:u}}})),this._register(s.completionProvider.register("*",new rke(this._workerManager,n,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return gL(this._modelService,e)}async computedUnicodeHighlights(e,t,n){return(await this._workerWithResources([e])).$computeUnicodeHighlights(e.toString(),t,n)}async computeDiff(e,t,n,o){let s=await(await this._workerWithResources([e,t],!0)).$computeDiff(e.toString(),t.toString(),n,o);if(!s)return null;return{identical:s.identical,quitEarly:s.quitEarly,changes:l(s.changes),moves:s.moves.map(c=>new NO(new cu(new Qt(c[0],c[1]),new Qt(c[2],c[3])),l(c[4])))};function l(c){return c.map(u=>new Sd(new Qt(u[0],u[1]),new Qt(u[2],u[3]),u[4]?.map(d=>new lu(new R(d[0],d[1],d[2],d[3]),new R(d[4],d[5],d[6],d[7])))))}}async computeMoreMinimalEdits(e,t,n=!1){if(Kr(t)){if(!gL(this._modelService,e))return Promise.resolve(t);let o=xo.create(),r=this._workerWithResources([e]).then(s=>s.$computeMoreMinimalEdits(e.toString(),t,n));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),o.elapsed())),Promise.race([r,oh(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return gL(this._modelService,e)}async navigateValueSet(e,t,n){let o=this._modelService.getModel(e);if(!o)return null;let r=this._languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),s=r.source,a=r.flags;return(await this._workerWithResources([e])).$navigateValueSet(e.toString(),t,n,s,a)}canComputeWordRanges(e){return gL(this._modelService,e)}async computeWordRanges(e,t){let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let o=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),r=o.source,s=o.flags;return(await this._workerWithResources([e])).$computeWordRanges(e.toString(),t,r,s)}async findSectionHeaders(e,t){return(await this._workerWithResources([e])).$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){return(await this._workerWithResources([e])).$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){return await(await this._workerManager.withWorker()).workerWithSyncedResources(e,t)}};Ute=lke([mL(1,an),mL(2,pL),mL(3,sr),mL(4,Gi),mL(5,Me)],Ute);rke=class{constructor(e,t,n,o){this.languageConfigurationService=o,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}async provideCompletionItems(e,t){let n=this._configurationService.getValue(e.uri,t,"editor");if(n.wordBasedSuggestions==="off")return;let o=[];if(n.wordBasedSuggestions==="currentDocument")gL(this._modelService,e.uri)&&o.push(e.uri);else for(let d of this._modelService.getModels())gL(this._modelService,d.uri)&&(d===e?o.unshift(d.uri):(n.wordBasedSuggestions==="allDocuments"||d.getLanguageId()===e.getLanguageId())&&o.push(d.uri));if(o.length===0)return;let r=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),a=s?new R(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):R.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),u=await(await this._workerManager.withWorker()).textualSuggest(o,s?.word,r);if(u)return{duration:u.duration,suggestions:u.words.map(d=>({kind:18,label:d,insertText:d,range:{insert:l,replace:a}}))}}},ske=class extends H{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new HS).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Elt/2),Xi),this._register(this._modelService.onModelRemoved(o=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>Elt&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new MV(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};ske=lke([mL(1,an)],ske);ake=class{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}},MV=class extends H{constructor(e,t,n){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=n,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(dat(this._workerDescriptor)),yV.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){dV(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{let e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return dV(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new ake(new fL(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Vte(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject(jqe());let n=await this._getProxy();return this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n}async textualSuggest(e,t,n){let o=await this.workerWithSyncedResources(e),r=n.source,s=n.flags;return o.$textualSuggest(e.map(a=>a.toString()),t,r,s)}dispose(){super.dispose(),this._disposed=!0}};MV=lke([mL(2,an)],MV)});function Io(i){return{id:i}}function RV(i){switch(i){case ip.DARK:return"vs-dark";case ip.HIGH_CONTRAST_DARK:return"hc-black";case ip.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}function ba(i){return Dlt.onColorThemeChange(i)}var Wn,dke,uke,Dlt,jte,io=D(()=>{et();de();ht();fa();Jb();Wn=At("themeService");dke={ThemingContribution:"base.contributions.theming"},uke=class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new q}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),He(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}},Dlt=new uke;Qi.add(dke.ThemingContribution,Dlt);jte=class extends H{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}});var Eri,Dri,Qte,Tlt=D(()=>{et();de();Pp();io();Eri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Dri=function(i,e){return function(t,n){e(t,n,i)}},Qte=class extends H{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new q),this._onCodeEditorAdd=this._register(new q),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new q),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new q),this._onDiffEditorAdd=this._register(new q),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new q),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Br,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null,t=this.listCodeEditors();for(let n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){let t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){let o=e.toString(),r;this._modelProperties.has(o)?r=this._modelProperties.get(o):(r=new Map,this._modelProperties.set(o,r)),r.set(t,n)}getModelProperty(e,t){let n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}async openCodeEditor(e,t,n){for(let o of this._codeEditorOpenHandlers){let r=await o(e,t,n);if(r!==null)return r}return null}registerCodeEditorOpenHandler(e){let t=this._codeEditorOpenHandlers.unshift(e);return He(t)}};Qte=Eri([Dri(0,Wn)],Qte)});var Tri,klt,FV,hke=D(()=>{Ye();xl();Tlt();hs();Bt();Dc();io();Tri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},klt=function(i,e){return function(t,n){e(t,n,i)}},FV=class extends Qte{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,o,r)=>o?this.doOpenEditor(o,n):null))}_checkContextKey(){let e=!1;for(let t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){let r=t.resource.scheme;if(r===Vt.http||r===Vt.https)return V$(t.resource.toString()),e}return null}let o=t.options?t.options.selection:null;if(o)if(typeof o.endLineNumber=="number"&&typeof o.endColumn=="number")e.setSelection(o),e.revealRangeInCenter(o,1);else{let r={lineNumber:o.startLineNumber,column:o.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e}findModel(e,t){let n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};FV=Tri([klt(0,Ze),klt(1,Wn)],FV);oi(ei,FV,0)});var lf,Px=D(()=>{ht();lf=At("layoutService")});var Ilt,Llt,Gte,qte,fke=D(()=>{Ye();gd();Wt();et();hs();Dc();Px();Ilt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Llt=function(i,e){return function(t,n){e(t,n,i)}},Gte=class{get mainContainer(){return mO(this._codeEditorService.listCodeEditors())?.getContainerDomNode()??Xi.document.body}get activeContainer(){return(this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor())?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return Xh(this.mainContainer)}get activeContainerDimension(){return Xh(this.activeContainer)}get containers(){return Sl(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Ee.None,this.onDidLayoutActiveContainer=Ee.None,this.onDidLayoutContainer=Ee.None,this.onDidChangeActiveContainer=Ee.None,this.onDidAddContainer=Ee.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};Gte=Ilt([Llt(0,ei)],Gte);qte=class extends Gte{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};qte=Ilt([Llt(1,ei)],qte);oi(lf,Gte,1)});var OV,Jo,Bx=D(()=>{Rt();(function(i){i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error"})(OV||(OV={}));(function(i){let e="error",t="warning",n="warn",o="info",r="ignore";function s(l){return l?px(e,l)?i.Error:px(t,l)||px(n,l)?i.Warning:px(o,l)?i.Info:i.Ignore:i.Ignore}i.fromValue=s;function a(l){switch(l){case i.Error:return e;case i.Warning:return t;case i.Info:return o;default:return r}}i.toString=a})(OV||(OV={}));Jo=OV});var Ry,zO=D(()=>{ht();Ry=At("dialogService")});var vE,_n,Yte,Ic=D(()=>{Bx();ht();vE=Jo,_n=At("notificationService"),Yte=class{}});var VO,PV,Kte,yE,Jte=D(()=>{ht();VO=At("undoRedoService"),PV=class{constructor(e,t){this.resource=e,this.elements=t}},Kte=class i{static{this._ID=0}constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new i}},yE=class i{static{this._ID=0}constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new i}}});function Xte(i){return i.scheme===Vt.file?i.fsPath:i.path}var kri,Nlt,HO,Mlt,WO,Zte,$te,pke,eie,BV,Rlt,mke,UO,Flt=D(()=>{Tt();de();xl();Bx();Be();zO();Dc();Ic();Jte();kri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Nlt=function(i,e){return function(t,n){e(t,n,i)}},HO=!1;Mlt=0,WO=class{constructor(e,t,n,o,r,s,a){this.id=++Mlt,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=o,this.groupOrder=r,this.sourceId=s,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}},Zte=class{constructor(e,t){this.resourceLabel=e,this.reason=t}},$te=class{constructor(){this.elements=new Map}createMessage(){let e=[],t=[];for(let[,o]of this.elements)(o.reason===0?e:t).push(o.resourceLabel);let n=[];return e.length>0&&n.push(y({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(y({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}},pke=class{constructor(e,t,n,o,r,s,a){this.id=++Mlt,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=o,this.groupOrder=r,this.sourceId=s,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new $te),this.removedResources.has(t)||this.removedResources.set(t,new Zte(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new $te),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Zte(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}},eie=class{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(let n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(let n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(let t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){let t=[];for(let n=0,o=this._past.length;n=0;n--)t.push(this._future[n].id);return new PV(e,t)}restoreSnapshot(e){let t=e.elements.length,n=!0,o=0,r=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[o])&&(n=!1,r=0),!n&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let a=this._future.length-1;a>=0;a--,o++){let l=this._future[a];n&&(o>=t||l.id!==e.elements[o])&&(n=!1,s=a),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}r!==-1&&(this._past=this._past.slice(0,r)),s!==-1&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){let e=[],t=[];for(let n of this._past)e.push(n.actual);for(let n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}},BV=class{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=s,n=o)}return[t,n]}canUndo(e){if(e instanceof yE){let[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}let t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){ft(e);for(let n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(let t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(let t of e.editStacks)t.locked=!0;return()=>{for(let t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,o,r){let s=this._acquireLocks(n),a;try{a=t()}catch(l){return s(),o.dispose(),this._onError(l,e)}return a?a.then(()=>(s(),o.dispose(),r()),l=>(s(),o.dispose(),this._onError(l,e))):(s(),o.dispose(),r())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return H.None;let t=e.actual.prepareUndoRedo();return typeof t>"u"?H.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(H.None);let n=e.actual.prepareUndoRedo();return n?j_(n)?t(n):n.then(o=>t(o)):t(H.None)}_getAffectedEditStacks(e){let t=[];for(let n of e.strResources)t.push(this._editStacks.get(n)||Rlt);return new BV(t)}_tryToSplitAndUndo(e,t,n,o){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(o),new UO(this._undo(e,0,!0));for(let r of t.strResources)this.removeElements(r);return this._notificationService.warn(o),new UO}_checkWorkspaceUndo(e,t,n,o){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,y({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(o&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,y({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));let r=[];for(let a of n.editStacks)a.getClosestPastElement()!==t&&r.push(a.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,y({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,y({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,y({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){let o=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,o,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,o,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(let[,t]of this._editStacks){let n=t.getClosestPastElement();if(n){if(n===e){let o=t.getSecondClosestPastElement();if(o&&o.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,n,o){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(u){u[u.All=0]="All",u[u.This=1]="This",u[u.Cancel=2]="Cancel"})(a||(a={}));let{result:l}=await this._dialogService.prompt({type:Jo.Info,message:y("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:y({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>a.All},{label:y({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);let c=this._checkWorkspaceUndo(e,t,n,!1);if(c)return c.returnValue;o=!0}let r;try{r=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}let s=this._checkWorkspaceUndo(e,t,n,!0);if(s)return r.dispose(),s.returnValue;for(let a of n.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,r,()=>this._continueUndoInGroup(t.groupId,o))}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){let o=y({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(o);return}return this._invokeResourcePrepare(t,o=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new BV([e]),o,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,n=o)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;let[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof yE){let[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;let o=this._editStacks.get(e),r=o.getClosestPastElement();if(!r)return;if(r.groupId){let[a,l]=this._findClosestUndoElementInGroup(r.groupId);if(r!==a&&l)return this._undo(l,t,n)}if((r.sourceId!==t||r.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,r);try{return r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(o,r,n)}finally{HO&&this._print("undo")}}async _confirmAndContinueUndo(e,t,n){if((await this._dialogService.confirm({message:y("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:y({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:y("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,y({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,y({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,y({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){let n=this._getAffectedEditStacks(t),o=this._checkWorkspaceRedo(e,t,n,!1);return o?o.returnValue:this._executeWorkspaceRedo(e,t,n)}async _executeWorkspaceRedo(e,t,n){let o;try{o=await this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}let r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return o.dispose(),r.returnValue;for(let s of n.editStacks)s.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,o,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){let n=y({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new BV([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder{zV=class{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}},tie=class{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{ht();jO=At("environmentService")});var Iri,Olt,Aa,nie,gke,bke,Ake,hm=D(()=>{VS();Xl();bL();iie();Dc();ht();ch();xl();Iri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Olt=function(i,e){return function(t,n){e(t,n,i)}},Aa=At("ILanguageFeatureDebounceService");(function(i){let e=new WeakMap,t=0;function n(o){let r=e.get(o);return r===void 0&&(r=++t,e.set(o,r)),r}i.of=n})(nie||(nie={}));gke=class{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}},bke=class{constructor(e,t,n,o,r,s){this._logService=e,this._name=t,this._registry=n,this._default=o,this._min=r,this._max=s,this._cache=new Jl(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>kz(nie.of(n),t),0)}get(e){let t=this._key(e),n=this._cache.get(t);return n?Ll(n.value,this._min,this._max):this.default()}update(e,t){let n=this._key(e),o=this._cache.get(n);o||(o=new tie(6),this._cache.set(n,o));let r=Ll(o.update(t),this._min,this._max);return EI(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){let e=new zV;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=this._overall()|0||this._default;return Ll(e,this._min,this._max)}},Ake=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){let o=n?.min??50,r=n?.max??o**2,s=n?.key??void 0,a=`${nie.of(e)},${o}${s?","+s:""}`,l=this._data.get(a);return l||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),l=new gke(o*1.5)):l=new bke(this._logService,t,e,this._overallAverage()|0||o*1.5,o,r),this._data.set(a,l)),l}_overallAverage(){let e=new zV;for(let t of this._data.values())e.update(t.default());return e.value}};Ake=Iri([Olt(0,sr),Olt(1,jO)],Ake);oi(Aa,Ake,1)});var Fs,AL=D(()=>{Fs=class{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e),o=this.getFontStyle(e);return o&1&&(n+=" mtki"),o&2&&(n+=" mtkb"),o&4&&(n+=" mtku"),o&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){let n=this.getForeground(e),o=this.getFontStyle(e),r=`color: ${t[n]};`;o&1&&(r+="font-style: italic;"),o&2&&(r+="font-weight: bold;");let s="";return o&4&&(s+=" underline"),o&8&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){let t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}});function fm(i){let e=0,t=0,n=0,o=0;for(let r=0,s=i.length;r{});var oie,vke,rie,Plt=D(()=>{kt();Ue();vL();oie=class i{static create(e,t){return new i(e,new vke(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e&&new R(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[o,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new i(this._startLineNumber,o),new i(this._startLineNumber+s,r)]}applyEdit(e,t){let[n,o,r]=fm(t);this.acceptEdit(e,n,o,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,o,r){this._acceptDeleteRange(e),this._acceptInsertText(new J(e.startLineNumber,e.startColumn),t,n,o,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){let r=n-t;this._startLineNumber-=r;return}let o=this._tokens.getMaxDeltaLine();if(!(t>=o+1)){if(t<0&&n>=o+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,o,r){if(t===0&&n===0)return;let s=e.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=t;return}let a=this._tokens.getMaxDeltaLine();s>=a+1||this._tokens.acceptInsertText(s,e.column-1,t,n,o,r)}},vke=class i{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;ne)n=o-1;else{let s=o;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let a=o;for(;ae||h===e&&p>=t)&&(he||p===e&&A>=t){if(pr?g-=r-n:g=n;else if(f===t&&p===n)if(f===o&&g>r)g-=r-n;else{u=!0;continue}else if(fr)f=t,p=n,g=p+(g-r);else{u=!0;continue}else if(f>o){if(l===0&&!u){c=a;break}f-=l}else if(f===o&&p>=r)e&&f===0&&(p+=e,g+=e),f-=l,p-=r-n,g-=r-n;else throw new Error("Not possible!");let v=4*c;s[v]=f,s[v+1]=p,s[v+2]=g,s[v+3]=A,c++}this._tokenCount=c}acceptInsertText(e,t,n,o,r,s){let a=n===0&&o===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),l=this._tokens,c=this._tokenCount;for(let u=0;uu&&n[5*w]===0;)w--;if(w-1===u){let C=d;for(;C+1I)e.warnOverlappingSemanticTokens(E,I+1);else{let z=e.getMetadata(L,B,t);z!==2147483647&&(p===0&&(p=E),h[f]=E-p,h[f+1]=I,h[f+2]=N,h[f+3]=z,f+=4,g=E,A=N)}l=E,c=I,a++}f!==h.length&&(h=h.subarray(0,f));let v=oie.create(p,h);s.push(v)}return s}var Lri,yke,sie,aie,wke,xke,cie=D(()=>{AL();io();ch();Plt();Il();Lri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},yke=function(i,e){return function(t,n){e(t,n,i)}},sie=!1,aie=class{constructor(e,t,n,o){this._legend=e,this._themeService=t,this._languageService=n,this._logService=o,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new xke}getMetadata(e,t,n){let o=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,o),s;if(r)s=r.metadata,sie&&this._logService.getLevel()===Sc.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Fs.getForeground(s)}, fontStyle ${Fs.getFontStyle(s).toString(2)}`);else{let a=this._legend.tokenTypes[e],l=[];if(a){let c=t;for(let d=0;c>0&&d>1;sie&&c>0&&this._logService.getLevel()===Sc.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));let u=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof u>"u")s=2147483647;else{if(s=0,typeof u.italic<"u"){let d=(u.italic?1:0)<<11;s|=d|1}if(typeof u.bold<"u"){let d=(u.bold?2:0)<<11;s|=d|2}if(typeof u.underline<"u"){let d=(u.underline?4:0)<<11;s|=d|4}if(typeof u.strikethrough<"u"){let d=(u.strikethrough?8:0)<<11;s|=d|8}if(u.foreground){let d=u.foreground<<15;s|=d|16}s===0&&(s=2147483647)}}else sie&&this._logService.getLevel()===Sc.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,a="not-in-legend";this._hashTable.add(e,t,o,s),sie&&this._logService.getLevel()===Sc.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Fs.getForeground(s)}, fontStyle ${Fs.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,o,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${o} is outside the previous data (length ${r}).`))}};aie=Lri([yke(1,Wn),yke(2,on),yke(3,sr)],aie);wke=class{constructor(e,t,n,o){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=o,this.next=null}},xke=class i{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){let r=this._elements;this._currentLengthIndex++,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{ht();yL=At("semanticTokensStylingService")});var Nri,Cke,_ke,Blt=D(()=>{de();Il();io();ch();cie();uie();Dc();Nri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Cke=function(i,e){return function(t,n){e(t,n,i)}},_ke=class extends H{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new aie(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};_ke=Nri([Cke(0,Wn),Cke(1,sr),Cke(2,on)],_ke);oi(yL,_ke,1)});function wE(i){return i===47||i===92}function Ske(i){return i.replace(/[\\/]/g,Sr.sep)}function zlt(i){return i.indexOf("/")===-1&&(i=Ske(i)),/^[a-zA-Z]:(\/|$)/.test(i)&&(i="/"+i),i}function Eke(i,e=Sr.sep){if(!i)return"";let t=i.length,n=i.charCodeAt(0);if(wE(n)){if(wE(i.charCodeAt(1))&&!wE(i.charCodeAt(2))){let r=3,s=r;for(;ri.length)return!1;if(t){if(!HF(i,e))return!1;if(e.length===i.length)return!0;let r=e.length;return e.charAt(e.length-1)===n&&r--,i.charAt(r)===n}return e.charAt(e.length-1)!==n&&(e+=n),i.indexOf(e)===0}function Vlt(i){return i>=65&&i<=90||i>=97&&i<=122}function Hlt(i,e=Fo){return e?Vlt(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}var die=D(()=>{eA();wi();Rt()});function Ult(i,e){switch(i){case 0:return"";case 1:return`${pie}*?`;default:return`(?:${fie}|${pie}+${fie}${e?`|${fie}${pie}+`:""})*?`}}function jlt(i,e){if(!i)return[];let t=[],n=!1,o=!1,r="";for(let s of i){switch(s){case e:if(!n&&!o){t.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}r+=s}return r&&t.push(r),t}function Klt(i){if(!i)return"";let e="",t=jlt(i,Wlt);if(t.every(n=>n===hie))e=".*";else{let n=!1;t.forEach((o,r)=>{if(o===hie){if(n)return;e+=Ult(2,r===t.length-1)}else{let s=!1,a="",l=!1,c="";for(let u of o){if(u!=="}"&&s){a+=u;continue}if(l&&(u!=="]"||!c)){let d;u==="-"?d=u:(u==="^"||u==="!")&&!c?d="^":u===Wlt?d="":d=$a(u),c+=d;continue}switch(u){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{let h=`(?:${jlt(a,",").map(f=>Klt(f)).join("|")})`;e+=h,s=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=pie;continue;case"*":e+=Ult(1);continue;default:e+=$a(u)}}rTke(a,e)).filter(a=>a!==Fy),i),n=t.length;if(!n)return Fy;if(n===1)return t[0];let o=function(a,l){for(let c=0,u=t.length;c!!a.allBasenames);r&&(o.allBasenames=r.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function Ylt(i,e,t){let n=Vf===Sr.sep,o=n?i:i.replace(Rri,Vf),r=Vf+o,s=Sr.sep+i,a;return t?a=function(l,c){return typeof l=="string"&&(l===o||l.endsWith(r)||!n&&(l===i||l.endsWith(s)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===o||!n&&l===i)?e:null},a.allPaths=[(t?"*/":"./")+i],a}function jri(i){try{let e=new RegExp(`^${Klt(i)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?i:null}}catch{return Fy}}function Jlt(i,e,t){return!i||typeof e!="string"?!1:kke(i)(e,void 0,t)}function kke(i,e={}){if(!i)return Glt;if(typeof i=="string"||Qri(i)){let t=Tke(i,e);if(t===Fy)return Glt;let n=function(o,r){return!!t(o,r)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return Gri(i,e)}function Qri(i){let e=i;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function Gri(i,e){let t=Xlt(Object.getOwnPropertyNames(i).map(a=>qri(a,i[a],e)).filter(a=>a!==Fy)),n=t.length;if(!n)return Fy;if(!t.some(a=>!!a.requiresSiblings)){if(n===1)return t[0];let a=function(u,d){let h;for(let f=0,p=t.length;f{for(let f of h){let p=await f;if(typeof p=="string")return p}return null})():null},l=t.find(u=>!!u.allBasenames);l&&(a.allBasenames=l.allBasenames);let c=t.reduce((u,d)=>d.allPaths?u.concat(d.allPaths):u,[]);return c.length&&(a.allPaths=c),a}let o=function(a,l,c){let u,d;for(let h=0,f=t.length;h{for(let h of d){let f=await h;if(typeof f=="string")return f}return null})():null},r=t.find(a=>!!a.allBasenames);r&&(o.allBasenames=r.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function qri(i,e,t){if(e===!1)return Fy;let n=Tke(i,t);if(n===Fy)return Fy;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let r=(s,a,l,c)=>{if(!c||!n(s,a))return null;let u=o.replace("$(basename)",()=>l),d=c(u);return d$(d)?d.then(h=>h?i:null):d?i:null};return r.requiresSiblings=!0,r}}return n}function Xlt(i,e){let t=i.filter(a=>!!a.basenames);if(t.length<2)return i;let n=t.reduce((a,l)=>{let c=l.basenames;return c?a.concat(c):a},[]),o;if(e){o=[];for(let a=0,l=n.length;a{let c=l.patterns;return c?a.concat(c):a},[]);let r=function(a,l){if(typeof a!="string")return null;if(!l){let u;for(u=a.length;u>0;u--){let d=a.charCodeAt(u-1);if(d===47||d===92)break}l=a.substr(u)}let c=n.indexOf(l);return c!==-1?o[c]:null};r.basenames=n,r.patterns=o,r.allBasenames=n;let s=i.filter(a=>!a.basenames);return s.push(r),s}var hie,Wlt,fie,pie,Rri,Fri,Ori,Pri,Bri,zri,Vri,Qlt,Glt,Fy,Ike=D(()=>{Gt();die();Xl();eA();wi();Rt();hie="**",Wlt="/",fie="[/\\\\]",pie="[^/\\\\]",Rri=/\//g;Fri=/^\*\*\/\*\.[\w\.-]+$/,Ori=/^\*\*\/([\w\.-]+)\/?$/,Pri=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,Bri=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,zri=/^\*\*((\/[\w\.-]+)+)\/?$/,Vri=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,Qlt=new Jl(1e4),Glt=function(){return!1},Fy=function(){return null}});function HV(i,e,t,n,o,r){if(Array.isArray(i)){let s=0;for(let a of i){let l=HV(a,e,t,n,o,r);if(l===10)return l;l>s&&(s=l)}return s}else{if(typeof i=="string")return n?i==="*"?5:i===t?10:0:0;if(i){let{language:s,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:u}=i;if(!n&&!c)return 0;u&&o&&(e=o);let d=0;if(l)if(l===e.scheme)d=10;else if(l==="*")d=5;else return 0;if(s)if(s===t)d=10;else if(s==="*")d=Math.max(d,5);else return 0;if(u)if(u===r)d=10;else if(u==="*"&&r!==void 0)d=Math.max(d,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:qK(a.base)},h===e.fsPath||Jlt(h,e.fsPath))d=10;else return 0}return d}else return 0}}var Lke=D(()=>{Ike();eA()});function Zlt(i){return typeof i=="string"?!1:Array.isArray(i)?i.every(Zlt):!!i.exclusive}function WV(i){return typeof i=="string"?!1:Array.isArray(i)?i.some(WV):!!i.isBuiltin}var mie,Ir,$lt=D(()=>{et();de();ol();Lke();mie=class{constructor(e,t,n,o,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=o,this.recursive=r}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}},Ir=class i{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new q,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),He(()=>{if(n){let o=this._entries.indexOf(n);o>=0&&(this._entries.splice(o,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);let t=[];for(let n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e,t=!1){let n=[];return this._orderedForEach(e,t,o=>n.push(o.provider)),n}orderedGroups(e){let t=[],n,o;return this._orderedForEach(e,!1,r=>{n&&o===r._score?n.push(r.provider):(o=r._score,n=[r.provider],t.push(n))}),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(let o of this._entries)o._score>0&&n(o)}_updateScores(e,t){let n=this._notebookInfoResolver?.(e.uri),o=n?new mie(e.uri,e.getLanguageId(),n.uri,n.type,t):new mie(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(o)){this._lastCandidate=o;for(let r of this._entries)if(r._score=HV(r.selector,o.uri,o.languageId,Cte(e),o.notebookUri,o.notebookType),Zlt(r.selector)&&r._score>0)if(t)r._score=0;else{for(let s of this._entries)s._score=0;r._score=1e3;break}this._entries.sort(i._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:WV(e.selector)&&!WV(t.selector)?1:!WV(e.selector)&&WV(t.selector)?-1:e._timet._time?-1:0}}});var Nke,ect=D(()=>{$lt();Hi();Dc();Nke=class{constructor(){this.referenceProvider=new Ir(this._score.bind(this)),this.renameProvider=new Ir(this._score.bind(this)),this.newSymbolNamesProvider=new Ir(this._score.bind(this)),this.codeActionProvider=new Ir(this._score.bind(this)),this.definitionProvider=new Ir(this._score.bind(this)),this.typeDefinitionProvider=new Ir(this._score.bind(this)),this.declarationProvider=new Ir(this._score.bind(this)),this.implementationProvider=new Ir(this._score.bind(this)),this.documentSymbolProvider=new Ir(this._score.bind(this)),this.inlayHintsProvider=new Ir(this._score.bind(this)),this.colorProvider=new Ir(this._score.bind(this)),this.codeLensProvider=new Ir(this._score.bind(this)),this.documentFormattingEditProvider=new Ir(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Ir(this._score.bind(this)),this.onTypeFormattingEditProvider=new Ir(this._score.bind(this)),this.signatureHelpProvider=new Ir(this._score.bind(this)),this.hoverProvider=new Ir(this._score.bind(this)),this.documentHighlightProvider=new Ir(this._score.bind(this)),this.multiDocumentHighlightProvider=new Ir(this._score.bind(this)),this.selectionRangeProvider=new Ir(this._score.bind(this)),this.foldingRangeProvider=new Ir(this._score.bind(this)),this.linkProvider=new Ir(this._score.bind(this)),this.inlineCompletionsProvider=new Ir(this._score.bind(this)),this.inlineEditProvider=new Ir(this._score.bind(this)),this.completionProvider=new Ir(this._score.bind(this)),this.linkedEditingRangeProvider=new Ir(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Ir(this._score.bind(this)),this.documentSemanticTokensProvider=new Ir(this._score.bind(this)),this.documentDropEditProvider=new Ir(this._score.bind(this)),this.documentPasteEditProvider=new Ir(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}};oi(Me,Nke,1)});var Yri,tct,dh,Oy,zx=D(()=>{ht();de();ao();Ye();Yri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},tct=function(i,e){return function(t,n){e(t,n,i)}},dh=At("hoverService"),Oy=class extends H{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,n={},o,r){super(),this.placement=e,this.instantHover=t,this.overrideOptions=n,this.configurationService=o,this.hoverService=r,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new se),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,t){let n=typeof this.overrideOptions=="function"?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();let o=To(e.target)?[e.target]:e.target.targetElements;for(let s of o)this.hoverDisposables.add(un(s,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));let r=To(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...n,persistence:{hideOnKeyDown:!0,...n.persistence},id:r,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...n.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime{ht();hh=At("contextViewService"),ia=At("contextMenuService")});var ict=D(()=>{});var Xt,Xo=D(()=>{ht();Xt=At("keybindingService")});function ar(i,e,t){let n=null,o=null;if(typeof t.value=="function"?(n="value",o=t.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",o=t.get),!o)throw new Error("not supported");let r=`$memoize$${e}`;t[n]=function(...s){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,s)}),this[r]}}var xE=D(()=>{});var Kri,Tn,Lr,cp=D(()=>{Ye();gd();Wt();xE();et();de();Pp();Kri=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r};(function(i){i.Tap="-monaco-gesturetap",i.Change="-monaco-gesturechange",i.Start="-monaco-gesturestart",i.End="-monaco-gesturesend",i.Contextmenu="-monaco-gesturecontextmenu"})(Tn||(Tn={}));Lr=class i extends H{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new Br,this.ignoreTargets=new Br,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Ee.runAndSubscribe(DI,({window:e,disposables:t})=>{t.add(ce(e.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),t.add(ce(e.document,"touchend",n=>this.onTouchEnd(e,n))),t.add(ce(e.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Xi,disposables:this._store}))}static addTarget(e){if(!i.isTouchDevice())return H.None;i.INSTANCE||(i.INSTANCE=U_(new i));let t=i.INSTANCE.targets.push(e);return He(t)}static ignoreTarget(e){if(!i.isTouchDevice())return H.None;i.INSTANCE||(i.INSTANCE=U_(new i));let t=i.INSTANCE.ignoreTargets.push(e);return He(t)}static isTouchDevice(){return"ontouchstart"in Xi||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=e.targetTouches.length;n=i.HOLD_DELAY&&Math.abs(l.initialPageX-lm(l.rollingPageX))<30&&Math.abs(l.initialPageY-lm(l.rollingPageY))<30){let u=this.newGestureEvent(Tn.Contextmenu,l.initialTarget);u.pageX=lm(l.rollingPageX),u.pageY=lm(l.rollingPageY),this.dispatchEvent(u)}else if(o===1){let u=lm(l.rollingPageX),d=lm(l.rollingPageY),h=lm(l.rollingTimestamps)-l.rollingTimestamps[0],f=u-l.rollingPageX[0],p=d-l.rollingPageY[0],g=[...this.targets].filter(A=>l.initialTarget instanceof Node&&A.contains(l.initialTarget));this.inertia(e,g,n,Math.abs(f)/h,f>0?1:-1,u,Math.abs(p)/h,p>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(Tn.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===Tn.Tap){let t=new Date().getTime(),n=0;t-this._lastSetTapCountTime>i.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===Tn.Change||e.type===Tn.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(e.initialTarget))return;let t=[];for(let n of this.targets)if(n.contains(e.initialTarget)){let o=0,r=e.initialTarget;for(;r&&r!==n;)o++,r=r.parentElement;t.push([o,n])}t.sort((n,o)=>n[0]-o[0]);for(let[n,o]of t)o.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,n,o,r,s,a,l,c){this.handle=Cl(e,()=>{let u=Date.now(),d=u-n,h=0,f=0,p=!0;o+=i.SCROLL_FRICTION*d,a+=i.SCROLL_FRICTION*d,o>0&&(p=!1,h=r*o*d),a>0&&(p=!1,f=l*a*d);let g=this.newGestureEvent(Tn.Change);g.translationX=h,g.translationY=f,t.forEach(A=>A.dispatchEvent(g)),p||this.inertia(e,t,u,o,r,s+h,a,l,c+f)})}onTouchMove(e){let t=Date.now();for(let n=0,o=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};Kri([ar],Lr,"isTouchDevice",null)});var Os,Lg=D(()=>{Ye();xc();$p();cp();de();Os=class extends H{onclick(e,t){this._register(ce(e,Te.CLICK,n=>t(new wl(rt(e),n))))}onmousedown(e,t){this._register(ce(e,Te.MOUSE_DOWN,n=>t(new wl(rt(e),n))))}onmouseover(e,t){this._register(ce(e,Te.MOUSE_OVER,n=>t(new wl(rt(e),n))))}onmouseleave(e,t){this._register(ce(e,Te.MOUSE_LEAVE,n=>t(new wl(rt(e),n))))}onkeydown(e,t){this._register(ce(e,Te.KEY_DOWN,n=>t(new Vi(n))))}onkeyup(e,t){this._register(ce(e,Te.KEY_UP,n=>t(new Vi(n))))}oninput(e,t){this._register(ce(e,Te.INPUT,t))}onblur(e,t){this._register(ce(e,Te.BLUR,t))}onfocus(e,t){this._register(ce(e,Te.FOCUS,t))}ignoreGesture(e){return Lr.ignoreTarget(e)}}});var CE,gie,bie=D(()=>{JF();Lg();Gt();ko();Ye();CE=11,gie=class extends Os{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ut.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=CE+"px",this.domNode.style.height=CE+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new wg),this._register(un(this.bgDomNode,Te.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(un(this.domNode,Te.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new HS),this._pointerdownScheduleRepeatTimer=this._register(new ha)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,rt(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}});var Aie,nct=D(()=>{Gt();de();Aie=class extends H{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new ha)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}});var Jri,QO,Mke=D(()=>{Ye();tl();JF();bie();nct();Lg();wi();Jri=140,QO=class extends Os{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Aie(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new wg),this._shouldRender=!0,this.domNode=Ai(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(ce(this.domNode.domNode,Te.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new gie(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,o){this.slider=Ai(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof o=="number"&&this.slider.setHeight(o),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(ce(this.slider.domNode,Te.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),o=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);n<=r&&r<=o?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let r=bn(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let o=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(o):this._scrollbarState.getDesiredScrollPositionFromOffset(o)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let s=this._sliderOrthogonalPointerPosition(r),a=Math.abs(s-n);if(Fo&&a>Jri){this._setDesiredScrollPositionNow(o.getScrollPosition());return}let c=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}});var _E,vie=D(()=>{_E=class i{constructor(e,t,n,o,r,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=o,this._scrollSize=r,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new i(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,o,r){let s=Math.max(0,n-e),a=Math.max(0,s-2*t),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*a/o))),u=(a-c)/(o-n),d=r*u;return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){let e=i._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t{$p();Mke();bie();vie();oo();yie=class extends QO{constructor(e,t,n){let o=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new _E(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,o.width,o.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let s=(t.arrowSize-CE)/2,a=(t.horizontalScrollbarSize-CE)/2;this._createArrow({className:"scra",icon:De.scrollbarButtonLeft,top:a,left:s,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new pg(null,1,0))}),this._createArrow({className:"scra",icon:De.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:s,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new pg(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}});var wie,rct=D(()=>{$p();Mke();bie();vie();oo();wie=class extends QO{constructor(e,t,n){let o=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new _E(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,o.height,o.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let s=(t.arrowSize-CE)/2,a=(t.verticalScrollbarSize-CE)/2;this._createArrow({className:"scra",icon:De.scrollbarButtonUp,top:s,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new pg(null,0,1))}),this._createArrow({className:"scra",icon:De.scrollbarButtonDown,top:void 0,left:a,bottom:s,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new pg(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}});function Rke(i,e){let t=e-i;return function(n){return i+t*$ri(n)}}function Xri(i,e,t){return function(n){return n{et();de();Fke=class i{constructor(e,t,n,o,r,s,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,o=o|0,r=r|0,s=s|0,a=a|0),this.rawScrollLeft=o,this.rawScrollTop=a,t<0&&(t=0),o+t>n&&(o=n-t),o<0&&(o=0),r<0&&(r=0),a+r>s&&(a=s-r),a<0&&(a=0),this.width=t,this.scrollWidth=n,this.scrollLeft=o,this.height=r,this.scrollHeight=s,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new i(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new i(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,o=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:r,heightChanged:s,scrollHeightChanged:a,scrollTopChanged:l}}},Ng=class extends H{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new q),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Fke(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let o;t?o=new Cie(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):o=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=o}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=Cie.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},xie=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};Cie=class i{constructor(e,t,n,o){this.from=e,this.to=t,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let r,s;return e{});function tsi(i){let e={lazyRender:typeof i.lazyRender<"u"?i.lazyRender:!1,className:typeof i.className<"u"?i.className:"",useShadows:typeof i.useShadows<"u"?i.useShadows:!0,handleMouseWheel:typeof i.handleMouseWheel<"u"?i.handleMouseWheel:!0,flipAxes:typeof i.flipAxes<"u"?i.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof i.consumeMouseWheelIfScrollbarIsNeeded<"u"?i.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof i.alwaysConsumeMouseWheel<"u"?i.alwaysConsumeMouseWheel:!1,scrollYToX:typeof i.scrollYToX<"u"?i.scrollYToX:!1,mouseWheelScrollSensitivity:typeof i.mouseWheelScrollSensitivity<"u"?i.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof i.fastScrollSensitivity<"u"?i.fastScrollSensitivity:5,scrollPredominantAxis:typeof i.scrollPredominantAxis<"u"?i.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof i.mouseWheelSmoothScroll<"u"?i.mouseWheelSmoothScroll:!0,arrowSize:typeof i.arrowSize<"u"?i.arrowSize:11,listenOnDomNode:typeof i.listenOnDomNode<"u"?i.listenOnDomNode:null,horizontal:typeof i.horizontal<"u"?i.horizontal:1,horizontalScrollbarSize:typeof i.horizontalScrollbarSize<"u"?i.horizontalScrollbarSize:10,horizontalSliderSize:typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:0,horizontalHasArrows:typeof i.horizontalHasArrows<"u"?i.horizontalHasArrows:!1,vertical:typeof i.vertical<"u"?i.vertical:1,verticalScrollbarSize:typeof i.verticalScrollbarSize<"u"?i.verticalScrollbarSize:10,verticalHasArrows:typeof i.verticalHasArrows<"u"?i.verticalHasArrows:!1,verticalSliderSize:typeof i.verticalSliderSize<"u"?i.verticalSliderSize:0,scrollByPage:typeof i.scrollByPage<"u"?i.scrollByPage:!1};return e.horizontalSliderSize=typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof i.verticalSliderSize<"u"?i.verticalSliderSize:e.verticalScrollbarSize,jt&&(e.className+=" mac"),e}var esi,act,lct,Oke,UV,jV,qO,Py,i0,Mg=D(()=>{Kh();Ye();tl();$p();oct();rct();Lg();Gt();et();de();wi();GO();sct();esi=500,act=50,lct=!0,Oke=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},UV=class i{static{this.INSTANCE=new i}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,o=this._rear;do{let r=o===this._front?e:Math.pow(2,-n);if(e-=r,t+=this._memory[o].score*r,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return t<=.5}acceptStandardWheelEvent(e){if(FS){let t=rt(e.browserEvent),n=Int(t);this.accept(Date.now(),e.deltaX*n,e.deltaY*n)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let o=null,r=new Oke(e,t,n);this._front===-1&&this._rear===-1?(this._memory[0]=r,this._front=0,this._rear=0):(o=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=r),r.score=this._computeScore(r,o)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),t){let o=Math.abs(e.deltaX),r=Math.abs(e.deltaY),s=Math.abs(t.deltaX),a=Math.abs(t.deltaY),l=Math.max(Math.min(o,s),1),c=Math.max(Math.min(r,a),1),u=Math.max(o,s),d=Math.max(r,a);u%l===0&&d%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}},jV=class extends Os{get options(){return this._options}constructor(e,t,n){super(),this._onScroll=this._register(new q),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new q),e.style.overflow="hidden",this._options=tsi(t),this._scrollable=n,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let o={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new wie(this._scrollable,this._options,o)),this._horizontalScrollbar=this._register(new yie(this._scrollable,this._options,o)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Ai(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Ai(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Ai(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new ha),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Oi(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,jt&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new pg(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Oi(this._mouseWheelToDispose),e)){let n=o=>{this._onMouseWheel(new pg(o))};this._mouseWheelToDispose.push(ce(this._listenOnDomNode,Te.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=UV.INSTANCE;lct&&t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+r===0?s=r=0:Math.abs(r)>=Math.abs(s)?s=0:r=0),this._options.flipAxes&&([r,s]=[s,r]);let a=!jt&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!s&&(s=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(s=s*this._options.fastScrollSensitivity,r=r*this._options.fastScrollSensitivity);let l=this._scrollable.getFutureScrollPosition(),c={};if(r){let u=act*r,d=l.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,d)}if(s){let u=act*s,d=l.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,d)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(lct&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),n=!0)}let o=n;!o&&this._options.alwaysConsumeMouseWheel&&(o=!0),!o&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(o=!0),o&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,o=n?" left":"",r=t?" top":"",s=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${o}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${r}${o}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),esi)}},qO=class extends jV{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new Ng({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:o=>Cl(rt(e),o)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}},Py=class extends jV{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},i0=class extends jV{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new Ng({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:o=>Cl(rt(e),o)});super(e,t,n),this._register(n),this._element=e,this._register(this.onScroll(o=>{o.scrollTopChanged&&(this._element.scrollTop=o.scrollTop),o.scrollLeftChanged&&(this._element.scrollLeft=o.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}});var cct=D(()=>{});function Sie(i,e){return i&&e?y("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?y("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var _ie,SE,YO,QV,GV,KO=D(()=>{Ye();xc();Mg();de();cct();Be();_ie=xe,SE=class extends H{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 i0(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},YO=class i extends H{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionLabel=t.label,this.actionKeybindingLabel=n,this.actionContainer=Ae(e,_ie("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Ae(this.actionContainer,_ie("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Ae(this.action,_ie(`span.icon.${t.iconClass}`));let o=Ae(this.action,_ie("span"));o.textContent=n?`${t.label} (${n})`:t.label,this._store.add(new QV(this.actionContainer,t.run)),this._store.add(new GV(this.actionContainer,t.run,[3,10])),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"))}};QV=class extends H{constructor(e,t){super(),this._register(ce(e,Te.CLICK,n=>{n.stopPropagation(),n.preventDefault(),t(e)}))}},GV=class extends H{constructor(e,t,n){super(),this._register(ce(e,Te.KEY_DOWN,o=>{let r=new Vi(o);n.some(s=>r.equals(s))&&(o.stopPropagation(),o.preventDefault(),t(e))}))}}});function uct(i){let e,t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},i=i.with({fragment:""})),{selection:e,uri:i}}var Qr,Dd=D(()=>{ht();Qr=At("openerService")});var bi,n0=D(()=>{et();bi=class{get event(){return this.emitter.event}constructor(e,t,n){let o=r=>this.emitter.fire(r);this.emitter=new q({onWillAddFirstListener:()=>e.addEventListener(t,o,n),onDidRemoveLastListener:()=>e.removeEventListener(t,o,n)})}dispose(){this.emitter.dispose()}}});function dct(i,e={}){let t=Eie(e);return t.textContent=i,t}function hct(i,e={}){let t=Eie(e);return fct(t,isi(i,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function Eie(i){let e=i.inline?"span":"div",t=document.createElement(e);return i.className&&(t.className=i.className),t}function fct(i,e,t,n){let o;if(e.type===2)o=document.createTextNode(e.content||"");else if(e.type===3)o=document.createElement("b");else if(e.type===4)o=document.createElement("i");else if(e.type===7&&n)o=document.createElement("code");else if(e.type===5&&t){let r=document.createElement("a");t.disposables.add(un(r,"click",s=>{t.callback(String(e.index),s)})),o=r}else e.type===8?o=document.createElement("br"):e.type===1&&(o=i);o&&i!==o&&i.appendChild(o),o&&Array.isArray(e.children)&&e.children.forEach(r=>{fct(o,r,t,n)})}function isi(i,e){let t={type:1,children:[]},n=0,o=t,r=[],s=new Pke(i);for(;!s.eos();){let a=s.next(),l=a==="\\"&&Bke(s.peek(),e)!==0;if(l&&(a=s.next()),!l&&nsi(a,e)&&a===s.peek()){s.advance(),o.type===2&&(o=r.pop());let c=Bke(a,e);if(o.type===c||o.type===5&&c===6)o=r.pop();else{let u={type:c,children:[]};c===5&&(u.index=n,n++),o.children.push(u),r.push(o),o=u}}else if(a===` +`)o.type===2&&(o=r.pop()),o.children.push({type:8});else if(o.type!==2){let c={type:2,content:a};o.children.push(c),r.push(o),o=c}else o.content+=a}return o.type===2&&(o=r.pop()),r.length,t}function nsi(i,e){return Bke(i,e)!==0}function Bke(i,e){switch(i){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}var Pke,zke=D(()=>{Ye();Pke=class{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){let e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}});function pm(i){let e=new Array,t,n=0,o=0;for(;(t=osi.exec(i))!==null;){o=t.index||0,n{Ye();ko();osi=new RegExp(`(\\\\)?\\$\\((${ut.iconNameExpression}(?:${ut.iconModifierExpression})?)\\)`,"g")});function pct(i){let e=rsi(i);if(e&&e.length>0)return new Uint32Array(e)}function rsi(i){if(mm=0,zy(i,Vke,4352),mm>0||(zy(i,Hke,4449),mm>0)||(zy(i,Wke,4520),mm>0)||(zy(i,wL,12593),mm))return EE.subarray(0,mm);if(i>=44032&&i<=55203){let e=i-44032,t=e%588,n=Math.floor(e/588),o=Math.floor(t/28),r=t%28-1;if(n=0&&(r0)return EE.subarray(0,mm)}}function zy(i,e,t){i>=t&&i>8&&(EE[mm++]=i>>8&255),i>>16&&(EE[mm++]=i>>16&255))}var mm,EE,Vke,Hke,Wke,wL,mct=D(()=>{mm=0,EE=new Uint32Array(10);Vke=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),Hke=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),Wke=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),wL=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});function Iie(...i){return function(e,t){for(let n=0,o=i.length;n0?[{start:0,end:e.length}]:[]:null}function Kke(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t===-1?null:[{start:t,end:t+i.length}]}function Jke(i,e){return Qke(i.toLowerCase(),e.toLowerCase(),0,0)}function Qke(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]===e[n]){let o=null;return(o=Qke(i,e,t+1,n+1))?$ke({start:n,end:n+1},o):null}return Qke(i,e,t,n+1)}function Xke(i){return 97<=i&&i<=122}function Lie(i){return 65<=i&&i<=90}function Zke(i){return 48<=i&&i<=57}function wct(i){return i===32||i===9||i===10||i===13}function kie(i){return wct(i)||xct.has(i)}function gct(i,e){return i===e||kie(i)&&kie(e)}function bct(i){if(Uke.has(i))return Uke.get(i);let e,t=pct(i);return t&&(e=t),Uke.set(i,e),e}function Cct(i){return Xke(i)||Lie(i)||Zke(i)}function $ke(i,e){return e.length===0?e=[i]:i.end===e[0].start?e[0].start=i.start:e.unshift(i),e}function _ct(i,e){for(let t=e;t0&&!Cct(i.charCodeAt(t-1)))return t}return i.length}function Gke(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]!==e[n].toLowerCase())return null;{let o=null,r=n+1;for(o=Gke(i,e,t+1,n+1);!o&&(r=_ct(e,r)).6}function csi(i){let{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:o}=i;return t>.2&&e<.8&&n>.6&&o<.2}function usi(i){let e=0,t=0,n=0,o=0;for(let r=0;r60&&(e=e.substring(0,60));let t=asi(e);if(!csi(t)){if(!lsi(t))return null;e=e.toLowerCase()}let n=null,o=0;for(i=i.toLowerCase();o0&&kie(i.charCodeAt(t-1)))return t;return i.length}function eIe(i,e,t=!1){if(typeof i!="string"||typeof e!="string")return null;let n=Act.get(i);n||(n=new RegExp($nt(i),"i"),Act.set(i,n));let o=n.exec(e);return o?[{start:o.index,end:o.index+o[0].length}]:t?hsi(i,e):dsi(i,e)}function Tct(i,e){let t=Hy(i,i.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?kE(t):null}function kct(i,e,t,n,o,r){let s=Math.min(13,i.length);for(;t"u")return[];let e=[],t=i[1];for(let n=i.length-1;n>1;n--){let o=i[n]+t,r=e[e.length-1];r&&r.end===o?r.end=o+1:e.push({start:o,end:o+1})}return e}function tIe(){let i=[],e=[];for(let t=0;t<=TE;t++)e[t]=0;for(let t=0;t<=TE;t++)i.push(e.slice(0));return i}function Ict(i){let e=[];for(let t=0;t<=i;t++)e[t]=0;return e}function jke(i,e,t,n,o){function r(a,l,c=" "){for(;a.lengthr(a,3)).join("|")} +`;for(let a=0;a<=t;a++)a===0?s+=" |":s+=`${e[a-1]}|`,s+=i[a].slice(0,o+1).map(l=>r(l.toString(),3)).join("|")+` +`;return s}function psi(i,e,t,n){i=i.substr(e),t=t.substr(n),console.log(jke(DE,i,i.length,t,t.length)),console.log(jke(qV,i,i.length,t,t.length)),console.log(jke(Vy,i,i.length,t,t.length))}function Die(i,e){if(e<0||e>=i.length)return!1;let t=i.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!Ez(t)}}function vct(i,e){if(e<0||e>=i.length)return!1;switch(i.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function Tie(i,e,t){return e[i]!==t[i]}function msi(i,e,t,n,o,r,s=!1){for(;eTE?TE:i.length,l=n.length>TE?TE:n.length;if(t>=a||r>=l||a-t>l-r||!msi(e,t,a,o,r,l,!0))return;gsi(a,l,t,r,e,o);let c=1,u=1,d=t,h=r,f=[!1];for(c=1,d=t;dw,L=N?DE[c][u-1]+(Vy[c][u-1]>0?-5:0):0,B=h>w+1&&Vy[c][u-1]>0,z=B?DE[c][u-2]+(Vy[c][u-2]>0?-5:0):0;if(B&&(!N||z>=L)&&(!I||z>=T))DE[c][u]=z,qV[c][u]=3,Vy[c][u]=0;else if(N&&(!I||L>=T))DE[c][u]=L,qV[c][u]=2,Vy[c][u]=0;else if(I)DE[c][u]=T,qV[c][u]=1,Vy[c][u]=Vy[c-1][u-1]+1;else throw new Error("not possible")}}if(fsi&&psi(i,t,n,r),!f[0]&&!s.firstMatchCanBeWeak)return;c--,u--;let p=[DE[c][u],r],g=0,A=0;for(;c>=1;){let w=u;do{let C=qV[c][w];if(C===3)w=w-2;else if(C===2)w=w-1;else break}while(w>=1);g>1&&e[t+c-1]===o[r+u-1]&&!Tie(w+r-1,n,o)&&g+1>Vy[c][w]&&(w=u),w===u?g++:g=1,A||(A=w),c--,u=w-1,p.push(u)}l-r===a&&s.boostFullMatch&&(p[0]+=2);let v=A-a;return p[0]-=v,p}function gsi(i,e,t,n,o,r){let s=i-1,a=e-1;for(;s>=t&&a>=n;)o[s]===r[a]&&(Yke[s]=a,s--),a--}function bsi(i,e,t,n,o,r,s,a,l,c,u){if(e[t]!==r[s])return Number.MIN_SAFE_INTEGER;let d=1,h=!1;return s===t-n?d=i[t]===o[s]?7:5:Tie(s,o,r)&&(s===0||!Tie(s-1,o,r))?(d=i[t]===o[s]?7:5,h=!0):Die(r,s)&&(s===0||!Die(r,s-1))?d=5:(Die(r,s-1)||vct(r,s-1))&&(d=5,h=!0),d>1&&t===n&&(u[0]=!0),h||(h=Tie(s,o,r)||Die(r,s-1)||vct(r,s-1)),t===n?s>l&&(d-=h?3:5):c?d+=h?2:0:d+=h?0:1,s+1===a&&(d-=h?3:5),d}function Nct(i,e,t,n,o,r,s){return Asi(i,e,t,n,o,r,!0,s)}function Asi(i,e,t,n,o,r,s,a){let l=Hy(i,e,t,n,o,r,a);if(l&&!s)return l;if(i.length>=3){let c=Math.min(7,i.length-1);for(let u=t+1;ul[0])&&(l=h))}}}return l}function vsi(i,e){if(e+1>=i.length)return;let t=i[e],n=i[e+1];if(t!==n)return i.slice(0,e)+n+t+i.slice(e+2)}var brn,CL,xct,Uke,dsi,hsi,Act,TE,Lct,Yke,Vy,DE,qV,fsi,cf,xL,Rg=D(()=>{Xl();mct();Rt();brn=yct.bind(void 0,!1),CL=yct.bind(void 0,!0);xct=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(i=>xct.add(i.charCodeAt(0)));Uke=new Map;dsi=Iie(CL,Sct,Kke),hsi=Iie(CL,Sct,Jke),Act=new Jl(1e4);TE=128;Lct=Ict(2*TE),Yke=Ict(2*TE),Vy=tIe(),DE=tIe(),qV=tIe(),fsi=!1;(function(i){i.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}i.isDefault=e})(cf||(cf={}));xL=class{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}});function Mct(i){return i.replace(wsi,(e,t)=>t?e:`\\${e}`)}function Rct(i){return i.replace(xsi,e=>`\\${e}`)}function JO(i){return i.indexOf(ysi)===-1?i:i.replace(Csi,(e,t,n,o)=>n?e:t||o||"")}function Fct(i){return i?i.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}function XO(i){iIe.lastIndex=0;let e="",t=[],n=0;for(;;){let o=iIe.lastIndex,r=iIe.exec(i),s=i.substring(o,r?.index);if(s.length>0){e+=s;for(let a=0;a{Rg();Rt();ko();ysi="$(",nIe=new RegExp(`\\$\\(${ut.iconNameExpression}(?:${ut.iconModifierExpression})?\\)`,"g"),wsi=new RegExp(`(\\\\)?${nIe.source}`,"g");xsi=new RegExp(`\\\\${nIe.source}`,"g");Csi=new RegExp(`(\\s)?(\\\\)?${nIe.source}(\\s)?`,"g");iIe=new RegExp(`\\$\\(${ut.iconNameCharacter}+\\)`,"g")});function RA(i){return R6(i,!0)}var YV,lr,Drn,Trn,Hx,krn,Irn,Bct,Lc,zct,IE,Vct,Hct,Wct,oIe,Lrn,Oct,Pct,Nrn,Mrn,Wy,Nc=D(()=>{die();xl();eA();wi();Rt();mn();YV=class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:BS(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===Vt.file)return VV(RA(e),RA(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(Oct(e.authority,t.authority))return VV(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return Je.joinPath(e,...t)}basenameOrAuthority(e){return Lc(e)||e.authority}basename(e){return Sr.basename(e.path)}extname(e){return Sr.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Vt.file?t=Je.file(YK(RA(e))).path:(t=Sr.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===Vt.file?t=Je.file(qK(RA(e))).path:t=Sr.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Oct(e.authority,t.authority))return;if(e.scheme===Vt.file){let r=fYe(RA(e),RA(t));return Fo?Ske(r):r}let n=e.path||"/",o=t.path||"/";if(this._ignorePathCasing(e)){let r=0;for(let s=Math.min(n.length,o.length);rEke(n).length&&n[n.length-1]===t}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Vf){return Pct(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Vf){let n=!1;if(e.scheme===Vt.file){let o=RA(e);n=o!==void 0&&o.length===Eke(o).length&&o[o.length-1]===t}else{t="/";let o=e.path;n=o.length===1&&o.charCodeAt(o.length-1)===47}return!n&&!Pct(e,t)?e.with({path:e.path+"/"}):e}},lr=new YV(()=>!1),Drn=new YV(i=>i.scheme===Vt.file?!Cr:!0),Trn=new YV(i=>!0),Hx=lr.isEqual.bind(lr),krn=lr.isEqualOrParent.bind(lr),Irn=lr.getComparisonKey.bind(lr),Bct=lr.basenameOrAuthority.bind(lr),Lc=lr.basename.bind(lr),zct=lr.extname.bind(lr),IE=lr.dirname.bind(lr),Vct=lr.joinPath.bind(lr),Hct=lr.normalizePath.bind(lr),Wct=lr.relativePath.bind(lr),oIe=lr.resolvePath.bind(lr),Lrn=lr.isAbsolutePath.bind(lr),Oct=lr.isEqualAuthority.bind(lr),Pct=lr.hasTrailingPathSeparator.bind(lr),Nrn=lr.removeTrailingPathSeparator.bind(lr),Mrn=lr.addTrailingPathSeparator.bind(lr);(function(i){i.META_DATA_LABEL="label",i.META_DATA_DESCRIPTION="description",i.META_DATA_SIZE="size",i.META_DATA_MIME="mime";function e(t){let n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(s=>{let[a,l]=s.split(":");a&&l&&n.set(a,l)});let r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(i.META_DATA_MIME,r),n}i.parseMetaData=e})(Wy||(Wy={}))});function Wx(i){return uf(i)?!i.value:Array.isArray(i)?i.every(Wx):!0}function uf(i){return i instanceof $r?!0:i&&typeof i=="object"?typeof i.value=="string"&&(typeof i.isTrusted=="boolean"||typeof i.isTrusted=="object"||i.isTrusted===void 0)&&(typeof i.supportThemeIcons=="boolean"||i.supportThemeIcons===void 0):!1}function Uct(i,e){return i===e?!0:!i||!e?!1:i.value===e.value&&i.isTrusted===e.isTrusted&&i.supportThemeIcons===e.supportThemeIcons&&i.supportHtml===e.supportHtml&&(i.baseUri===e.baseUri||!!i.baseUri&&!!e.baseUri&&Hx(Je.from(i.baseUri),Je.from(e.baseUri)))}function Ssi(i){return i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function Esi(i,e){let t=i.match(/^`+/gm)?.reduce((o,r)=>o.length>r.length?o:r).length??0,n=t>=3?t+1:3;return[`${"`".repeat(n)}${e}`,i,`${"`".repeat(n)}`].join(` +`)}function KV(i){return i.replace(/"/g,""")}function Mie(i){return i&&i.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function jct(i){let e=[],t=i.split("|").map(o=>o.trim());i=t[0];let n=t[1];if(n){let o=/height=(\d+)/.exec(n),r=/width=(\d+)/.exec(n),s=o?o[1]:"",a=r?r[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(s));l&&e.push(`width="${a}"`),c&&e.push(`height="${s}"`)}return{href:i,dimensions:e}}var $r,Td=D(()=>{Tt();_L();Nc();Rt();mn();$r=class{constructor(e="",t=!1){if(this.value=e,typeof this.value!="string")throw mc("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){return this.value+=Ssi(this.supportThemeIcons?Mct(e):e).replace(/([ \t]+)/g,(n,o)=>" ".repeat(o.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ `:` `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=` -${Ngi(t,e)} -`,this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){let n=new RegExp(Ja(t),"g");return e.replace(n,(r,o)=>e.charAt(o-1)!=="\\"?`\\${r}`:r)}}});var QI,vz,Az=D(()=>{QI=class{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},vz=new QI("id#")});var Uu,inn,nnn,rnn,onn,Oke,snn,ann,Bdt,lnn,yz,cnn,unn,Pke,dnn,zdt,hnn,fnn,pnn,Vdt=D(()=>{Uu={};(function(){function i(e,t){t(Uu)}i.amd=!0,(function(e,t){typeof i=="function"&&i.amd?i(["exports"],t):typeof exports=="object"&&typeof module<"u"?t(exports):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))})(this,(function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}e.defaults=t();function n(Pi){e.defaults=Pi}let r=/[&<>"']/,o=new RegExp(r.source,"g"),s=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,a=new RegExp(s.source,"g"),l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=Pi=>l[Pi];function u(Pi,J){if(J){if(r.test(Pi))return Pi.replace(o,c)}else if(s.test(Pi))return Pi.replace(a,c);return Pi}let d=/(^|[^\[])\^/g;function h(Pi,J){let Z=typeof Pi=="string"?Pi:Pi.source;J=J||"";let ie={replace:(de,ve)=>{let ze=typeof ve=="string"?ve:ve.source;return ze=ze.replace(d,"$1"),Z=Z.replace(de,ze),ie},getRegex:()=>new RegExp(Z,J)};return ie}function f(Pi){try{Pi=encodeURI(Pi).replace(/%25/g,"%")}catch{return null}return Pi}let p={exec:()=>null};function g(Pi,J){let Z=Pi.replace(/\|/g,(ve,ze,$e)=>{let Mt=!1,Zt=ze;for(;--Zt>=0&&$e[Zt]==="\\";)Mt=!Mt;return Mt?"|":" |"}),ie=Z.split(/ \|/),de=0;if(ie[0].trim()||ie.shift(),ie.length>0&&!ie[ie.length-1].trim()&&ie.pop(),J)if(ie.length>J)ie.splice(J);else for(;ie.length{let ve=de.match(/^\s+/);if(ve===null)return de;let[ze]=ve;return ze.length>=ie.length?de.slice(ie.length):de}).join(` -`)}class _{options;rules;lexer;constructor(J){this.options=J||e.defaults}space(J){let Z=this.rules.block.newline.exec(J);if(Z&&Z[0].length>0)return{type:"space",raw:Z[0]}}code(J){let Z=this.rules.block.code.exec(J);if(Z){let ie=Z[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:Z[0],codeBlockStyle:"indented",text:this.options.pedantic?ie:v(ie,` -`)}}}fences(J){let Z=this.rules.block.fences.exec(J);if(Z){let ie=Z[0],de=C(ie,Z[3]||"");return{type:"code",raw:ie,lang:Z[2]?Z[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):Z[2],text:de}}}heading(J){let Z=this.rules.block.heading.exec(J);if(Z){let ie=Z[2].trim();if(/#$/.test(ie)){let de=v(ie,"#");(this.options.pedantic||!de||/ $/.test(de))&&(ie=de.trim())}return{type:"heading",raw:Z[0],depth:Z[1].length,text:ie,tokens:this.lexer.inline(ie)}}}hr(J){let Z=this.rules.block.hr.exec(J);if(Z)return{type:"hr",raw:v(Z[0],` -`)}}blockquote(J){let Z=this.rules.block.blockquote.exec(J);if(Z){let ie=v(Z[0],` +${Esi(t,e)} +`,this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){let n=new RegExp($a(t),"g");return e.replace(n,(o,r)=>e.charAt(r-1)!=="\\"?`\\${o}`:o)}}});var SL,JV,XV=D(()=>{SL=class{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},JV=new SL("id#")});var Ku,Hrn,Wrn,Urn,jrn,rIe,Qrn,Grn,Qct,qrn,ZV,Yrn,Krn,sIe,Jrn,Gct,Xrn,Zrn,$rn,qct=D(()=>{Ku={};(function(){function i(e,t){t(Ku)}i.amd=!0,(function(e,t){typeof i=="function"&&i.amd?i(["exports"],t):typeof exports=="object"&&typeof module<"u"?t(exports):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))})(this,(function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}e.defaults=t();function n(Ni){e.defaults=Ni}let o=/[&<>"']/,r=new RegExp(o.source,"g"),s=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,a=new RegExp(s.source,"g"),l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=Ni=>l[Ni];function u(Ni,te){if(te){if(o.test(Ni))return Ni.replace(r,c)}else if(s.test(Ni))return Ni.replace(a,c);return Ni}let d=/(^|[^\[])\^/g;function h(Ni,te){let ne=typeof Ni=="string"?Ni:Ni.source;te=te||"";let le={replace:(fe,ve)=>{let Ve=typeof ve=="string"?ve:ve.source;return Ve=Ve.replace(d,"$1"),ne=ne.replace(fe,Ve),le},getRegex:()=>new RegExp(ne,te)};return le}function f(Ni){try{Ni=encodeURI(Ni).replace(/%25/g,"%")}catch{return null}return Ni}let p={exec:()=>null};function g(Ni,te){let ne=Ni.replace(/\|/g,(ve,Ve,$e)=>{let It=!1,qt=Ve;for(;--qt>=0&&$e[qt]==="\\";)It=!It;return It?"|":" |"}),le=ne.split(/ \|/),fe=0;if(le[0].trim()||le.shift(),le.length>0&&!le[le.length-1].trim()&&le.pop(),te)if(le.length>te)le.splice(te);else for(;le.length{let ve=fe.match(/^\s+/);if(ve===null)return fe;let[Ve]=ve;return Ve.length>=le.length?fe.slice(le.length):fe}).join(` +`)}class _{options;rules;lexer;constructor(te){this.options=te||e.defaults}space(te){let ne=this.rules.block.newline.exec(te);if(ne&&ne[0].length>0)return{type:"space",raw:ne[0]}}code(te){let ne=this.rules.block.code.exec(te);if(ne){let le=ne[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?le:A(le,` +`)}}}fences(te){let ne=this.rules.block.fences.exec(te);if(ne){let le=ne[0],fe=C(le,ne[3]||"");return{type:"code",raw:le,lang:ne[2]?ne[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):ne[2],text:fe}}}heading(te){let ne=this.rules.block.heading.exec(te);if(ne){let le=ne[2].trim();if(/#$/.test(le)){let fe=A(le,"#");(this.options.pedantic||!fe||/ $/.test(fe))&&(le=fe.trim())}return{type:"heading",raw:ne[0],depth:ne[1].length,text:le,tokens:this.lexer.inline(le)}}}hr(te){let ne=this.rules.block.hr.exec(te);if(ne)return{type:"hr",raw:A(ne[0],` +`)}}blockquote(te){let ne=this.rules.block.blockquote.exec(te);if(ne){let le=A(ne[0],` `).split(` -`),de="",ve="",ze=[];for(;ie.length>0;){let $e=!1,Mt=[],Zt;for(Zt=0;Zt/.test(ie[Zt]))Mt.push(ie[Zt]),$e=!0;else if(!$e)Mt.push(ie[Zt]);else break;ie=ie.slice(Zt);let _i=Mt.join(` -`),pn=_i.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` - $1`).replace(/^ {0,3}>[ \t]?/gm,"");de=de?`${de} -${_i}`:_i,ve=ve?`${ve} -${pn}`:pn;let Ln=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(pn,ze,!0),this.lexer.state.top=Ln,ie.length===0)break;let fo=ze[ze.length-1];if(fo?.type==="code")break;if(fo?.type==="blockquote"){let vr=fo,Ua=vr.raw+` -`+ie.join(` -`),ia=this.blockquote(Ua);ze[ze.length-1]=ia,de=de.substring(0,de.length-vr.raw.length)+ia.raw,ve=ve.substring(0,ve.length-vr.text.length)+ia.text;break}else if(fo?.type==="list"){let vr=fo,Ua=vr.raw+` -`+ie.join(` -`),ia=this.list(Ua);ze[ze.length-1]=ia,de=de.substring(0,de.length-fo.raw.length)+ia.raw,ve=ve.substring(0,ve.length-vr.raw.length)+ia.raw,ie=Ua.substring(ze[ze.length-1].raw.length).split(` -`);continue}}return{type:"blockquote",raw:de,tokens:ze,text:ve}}}list(J){let Z=this.rules.block.list.exec(J);if(Z){let ie=Z[1].trim(),de=ie.length>1,ve={type:"list",raw:"",ordered:de,start:de?+ie.slice(0,-1):"",loose:!1,items:[]};ie=de?`\\d{1,9}\\${ie.slice(-1)}`:`\\${ie}`,this.options.pedantic&&(ie=de?ie:"[*+-]");let ze=new RegExp(`^( {0,3}${ie})((?:[ ][^\\n]*)?(?:\\n|$))`),$e=!1;for(;J;){let Mt=!1,Zt="",_i="";if(!(Z=ze.exec(J))||this.rules.block.hr.test(J))break;Zt=Z[0],J=J.substring(Zt.length);let pn=Z[2].split(` -`,1)[0].replace(/^\t+/,ed=>" ".repeat(3*ed.length)),Ln=J.split(` -`,1)[0],fo=!pn.trim(),vr=0;if(this.options.pedantic?(vr=2,_i=pn.trimStart()):fo?vr=Z[1].length+1:(vr=Z[2].search(/[^ ]/),vr=vr>4?1:vr,_i=pn.slice(vr),vr+=Z[1].length),fo&&/^ *$/.test(Ln)&&(Zt+=Ln+` -`,J=J.substring(Ln.length+1),Mt=!0),!Mt){let ed=new RegExp(`^ {0,${Math.min(3,vr-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),gi=new RegExp(`^ {0,${Math.min(3,vr-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Ce=new RegExp(`^ {0,${Math.min(3,vr-1)}}(?:\`\`\`|~~~)`),Et=new RegExp(`^ {0,${Math.min(3,vr-1)}}#`);for(;J;){let nt=J.split(` -`,1)[0];if(Ln=nt,this.options.pedantic&&(Ln=Ln.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Ce.test(Ln)||Et.test(Ln)||ed.test(Ln)||gi.test(J))break;if(Ln.search(/[^ ]/)>=vr||!Ln.trim())_i+=` -`+Ln.slice(vr);else{if(fo||pn.search(/[^ ]/)>=4||Ce.test(pn)||Et.test(pn)||gi.test(pn))break;_i+=` -`+Ln}!fo&&!Ln.trim()&&(fo=!0),Zt+=nt+` -`,J=J.substring(nt.length+1),pn=Ln.slice(vr)}}ve.loose||($e?ve.loose=!0:/\n *\n *$/.test(Zt)&&($e=!0));let Ua=null,ia;this.options.gfm&&(Ua=/^\[[ xX]\] /.exec(_i),Ua&&(ia=Ua[0]!=="[ ] ",_i=_i.replace(/^\[[ xX]\] +/,""))),ve.items.push({type:"list_item",raw:Zt,task:!!Ua,checked:ia,loose:!1,text:_i,tokens:[]}),ve.raw+=Zt}ve.items[ve.items.length-1].raw=ve.items[ve.items.length-1].raw.trimEnd(),ve.items[ve.items.length-1].text=ve.items[ve.items.length-1].text.trimEnd(),ve.raw=ve.raw.trimEnd();for(let Mt=0;Mtpn.type==="space"),_i=Zt.length>0&&Zt.some(pn=>/\n.*\n/.test(pn.raw));ve.loose=_i}if(ve.loose)for(let Mt=0;Mt$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",ve=Z[3]?Z[3].substring(1,Z[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):Z[3];return{type:"def",tag:ie,raw:Z[0],href:de,title:ve}}}table(J){let Z=this.rules.block.table.exec(J);if(!Z||!/[:|]/.test(Z[2]))return;let ie=g(Z[1]),de=Z[2].replace(/^\||\| *$/g,"").split("|"),ve=Z[3]&&Z[3].trim()?Z[3].replace(/\n[ \t]*$/,"").split(` -`):[],ze={type:"table",raw:Z[0],header:[],align:[],rows:[]};if(ie.length===de.length){for(let $e of de)/^ *-+: *$/.test($e)?ze.align.push("right"):/^ *:-+: *$/.test($e)?ze.align.push("center"):/^ *:-+ *$/.test($e)?ze.align.push("left"):ze.align.push(null);for(let $e=0;$e({text:Mt,tokens:this.lexer.inline(Mt),header:!1,align:ze.align[Zt]})));return ze}}lheading(J){let Z=this.rules.block.lheading.exec(J);if(Z)return{type:"heading",raw:Z[0],depth:Z[2].charAt(0)==="="?1:2,text:Z[1],tokens:this.lexer.inline(Z[1])}}paragraph(J){let Z=this.rules.block.paragraph.exec(J);if(Z){let ie=Z[1].charAt(Z[1].length-1)===` -`?Z[1].slice(0,-1):Z[1];return{type:"paragraph",raw:Z[0],text:ie,tokens:this.lexer.inline(ie)}}}text(J){let Z=this.rules.block.text.exec(J);if(Z)return{type:"text",raw:Z[0],text:Z[0],tokens:this.lexer.inline(Z[0])}}escape(J){let Z=this.rules.inline.escape.exec(J);if(Z)return{type:"escape",raw:Z[0],text:u(Z[1])}}tag(J){let Z=this.rules.inline.tag.exec(J);if(Z)return!this.lexer.state.inLink&&/^/i.test(Z[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(Z[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Z[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:Z[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:Z[0]}}link(J){let Z=this.rules.inline.link.exec(J);if(Z){let ie=Z[2].trim();if(!this.options.pedantic&&/^$/.test(ie))return;let ze=v(ie.slice(0,-1),"\\");if((ie.length-ze.length)%2===0)return}else{let ze=A(Z[2],"()");if(ze>-1){let Mt=(Z[0].indexOf("!")===0?5:4)+Z[1].length+ze;Z[2]=Z[2].substring(0,ze),Z[0]=Z[0].substring(0,Mt).trim(),Z[3]=""}}let de=Z[2],ve="";if(this.options.pedantic){let ze=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(de);ze&&(de=ze[1],ve=ze[3])}else ve=Z[3]?Z[3].slice(1,-1):"";return de=de.trim(),/^$/.test(ie)?de=de.slice(1):de=de.slice(1,-1)),w(Z,{href:de&&de.replace(this.rules.inline.anyPunctuation,"$1"),title:ve&&ve.replace(this.rules.inline.anyPunctuation,"$1")},Z[0],this.lexer)}}reflink(J,Z){let ie;if((ie=this.rules.inline.reflink.exec(J))||(ie=this.rules.inline.nolink.exec(J))){let de=(ie[2]||ie[1]).replace(/\s+/g," "),ve=Z[de.toLowerCase()];if(!ve){let ze=ie[0].charAt(0);return{type:"text",raw:ze,text:ze}}return w(ie,ve,ie[0],this.lexer)}}emStrong(J,Z,ie=""){let de=this.rules.inline.emStrongLDelim.exec(J);if(!de||de[3]&&ie.match(/[\p{L}\p{N}]/u))return;if(!(de[1]||de[2]||"")||!ie||this.rules.inline.punctuation.exec(ie)){let ze=[...de[0]].length-1,$e,Mt,Zt=ze,_i=0,pn=de[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(pn.lastIndex=0,Z=Z.slice(-1*J.length+ze);(de=pn.exec(Z))!=null;){if($e=de[1]||de[2]||de[3]||de[4]||de[5]||de[6],!$e)continue;if(Mt=[...$e].length,de[3]||de[4]){Zt+=Mt;continue}else if((de[5]||de[6])&&ze%3&&!((ze+Mt)%3)){_i+=Mt;continue}if(Zt-=Mt,Zt>0)continue;Mt=Math.min(Mt,Mt+Zt+_i);let Ln=[...de[0]][0].length,fo=J.slice(0,ze+de.index+Ln+Mt);if(Math.min(ze,Mt)%2){let Ua=fo.slice(1,-1);return{type:"em",raw:fo,text:Ua,tokens:this.lexer.inlineTokens(Ua)}}let vr=fo.slice(2,-2);return{type:"strong",raw:fo,text:vr,tokens:this.lexer.inlineTokens(vr)}}}}codespan(J){let Z=this.rules.inline.code.exec(J);if(Z){let ie=Z[2].replace(/\n/g," "),de=/[^ ]/.test(ie),ve=/^ /.test(ie)&&/ $/.test(ie);return de&&ve&&(ie=ie.substring(1,ie.length-1)),ie=u(ie,!0),{type:"codespan",raw:Z[0],text:ie}}}br(J){let Z=this.rules.inline.br.exec(J);if(Z)return{type:"br",raw:Z[0]}}del(J){let Z=this.rules.inline.del.exec(J);if(Z)return{type:"del",raw:Z[0],text:Z[2],tokens:this.lexer.inlineTokens(Z[2])}}autolink(J){let Z=this.rules.inline.autolink.exec(J);if(Z){let ie,de;return Z[2]==="@"?(ie=u(Z[1]),de="mailto:"+ie):(ie=u(Z[1]),de=ie),{type:"link",raw:Z[0],text:ie,href:de,tokens:[{type:"text",raw:ie,text:ie}]}}}url(J){let Z;if(Z=this.rules.inline.url.exec(J)){let ie,de;if(Z[2]==="@")ie=u(Z[0]),de="mailto:"+ie;else{let ve;do ve=Z[0],Z[0]=this.rules.inline._backpedal.exec(Z[0])?.[0]??"";while(ve!==Z[0]);ie=u(Z[0]),Z[1]==="www."?de="http://"+Z[0]:de=Z[0]}return{type:"link",raw:Z[0],text:ie,href:de,tokens:[{type:"text",raw:ie,text:ie}]}}}inlineText(J){let Z=this.rules.inline.text.exec(J);if(Z){let ie;return this.lexer.state.inRawBlock?ie=Z[0]:ie=u(Z[0]),{type:"text",raw:Z[0],text:ie}}}}let E=/^(?: *(?:\n|$))+/,I=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,T=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,M=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,z=/(?:[*+-]|\d{1,9}[.)])/,H=h(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,z).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),B=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,q=/^[^\n]+/,U=/(?!\s*\])(?:\\.|[^\[\]\\])+/,F=h(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ne=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,z).getRegex(),ce="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",se=/|$))/,le=h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",se).replace("tag",ce).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe=h(B).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex(),Re={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",oe).getRegex(),code:I,def:F,fences:T,heading:M,hr:L,html:le,lheading:H,list:ne,newline:E,paragraph:oe,table:p,text:q},ft=h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex(),At={...Re,table:ft,paragraph:h(B).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ft).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex()},Dt={...Re,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:p,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(B).replace("hr",L).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",H).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Xt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Be=/^( {2,}|\\)\n(?!\s*$)/,Vt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Ke=h(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Li).getRegex(),St=h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Li).getRegex(),yt=h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Li).getRegex(),at=h(/\\([punct])/,"gu").replace(/punct/g,Li).getRegex(),Je=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),xt=h(se).replace("(?:-->|$)","-->").getRegex(),Ti=h("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",xt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ut=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xr=h(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lr=h(/^!?\[(label)\]\[(ref)\]/).replace("label",Ut).replace("ref",U).getRegex(),qo=h(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),As=h("reflink|nolink(?!\\()","g").replace("reflink",lr).replace("nolink",qo).getRegex(),Vr={_backpedal:p,anyPunctuation:at,autolink:Je,blockSkip:Ni,br:Be,code:Xt,del:p,emStrongLDelim:Ke,emStrongRDelimAst:St,emStrongRDelimUnd:yt,escape:Ct,link:xr,nolink:qo,punctuation:ei,reflink:lr,reflinkSearch:As,tag:Ti,text:Vt,url:p},Ca={...Vr,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",Ut).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ut).getRegex()},br={...Vr,escape:h(Ct).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\Mt+" ".repeat(Zt.length));let de,ve,ze;for(;J;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some($e=>(de=$e.call({lexer:this},J,Z))?(J=J.substring(de.raw.length),Z.push(de),!0):!1))){if(de=this.tokenizer.space(J)){J=J.substring(de.raw.length),de.raw.length===1&&Z.length>0?Z[Z.length-1].raw+=` -`:Z.push(de);continue}if(de=this.tokenizer.code(J)){J=J.substring(de.raw.length),ve=Z[Z.length-1],ve&&(ve.type==="paragraph"||ve.type==="text")?(ve.raw+=` -`+de.raw,ve.text+=` -`+de.text,this.inlineQueue[this.inlineQueue.length-1].src=ve.text):Z.push(de);continue}if(de=this.tokenizer.fences(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.heading(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.hr(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.blockquote(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.list(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.html(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.def(J)){J=J.substring(de.raw.length),ve=Z[Z.length-1],ve&&(ve.type==="paragraph"||ve.type==="text")?(ve.raw+=` -`+de.raw,ve.text+=` -`+de.raw,this.inlineQueue[this.inlineQueue.length-1].src=ve.text):this.tokens.links[de.tag]||(this.tokens.links[de.tag]={href:de.href,title:de.title});continue}if(de=this.tokenizer.table(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(de=this.tokenizer.lheading(J)){J=J.substring(de.raw.length),Z.push(de);continue}if(ze=J,this.options.extensions&&this.options.extensions.startBlock){let $e=1/0,Mt=J.slice(1),Zt;this.options.extensions.startBlock.forEach(_i=>{Zt=_i.call({lexer:this},Mt),typeof Zt=="number"&&Zt>=0&&($e=Math.min($e,Zt))}),$e<1/0&&$e>=0&&(ze=J.substring(0,$e+1))}if(this.state.top&&(de=this.tokenizer.paragraph(ze))){ve=Z[Z.length-1],ie&&ve?.type==="paragraph"?(ve.raw+=` -`+de.raw,ve.text+=` -`+de.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ve.text):Z.push(de),ie=ze.length!==J.length,J=J.substring(de.raw.length);continue}if(de=this.tokenizer.text(J)){J=J.substring(de.raw.length),ve=Z[Z.length-1],ve&&ve.type==="text"?(ve.raw+=` -`+de.raw,ve.text+=` -`+de.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ve.text):Z.push(de);continue}if(J){let $e="Infinite loop on byte: "+J.charCodeAt(0);if(this.options.silent){console.error($e);break}else throw new Error($e)}}return this.state.top=!0,Z}inline(J,Z=[]){return this.inlineQueue.push({src:J,tokens:Z}),Z}inlineTokens(J,Z=[]){let ie,de,ve,ze=J,$e,Mt,Zt;if(this.tokens.links){let _i=Object.keys(this.tokens.links);if(_i.length>0)for(;($e=this.tokenizer.rules.inline.reflinkSearch.exec(ze))!=null;)_i.includes($e[0].slice($e[0].lastIndexOf("[")+1,-1))&&(ze=ze.slice(0,$e.index)+"["+"a".repeat($e[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;($e=this.tokenizer.rules.inline.blockSkip.exec(ze))!=null;)ze=ze.slice(0,$e.index)+"["+"a".repeat($e[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;($e=this.tokenizer.rules.inline.anyPunctuation.exec(ze))!=null;)ze=ze.slice(0,$e.index)+"++"+ze.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;J;)if(Mt||(Zt=""),Mt=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(_i=>(ie=_i.call({lexer:this},J,Z))?(J=J.substring(ie.raw.length),Z.push(ie),!0):!1))){if(ie=this.tokenizer.escape(J)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ie=this.tokenizer.tag(J)){J=J.substring(ie.raw.length),de=Z[Z.length-1],de&&ie.type==="text"&&de.type==="text"?(de.raw+=ie.raw,de.text+=ie.text):Z.push(ie);continue}if(ie=this.tokenizer.link(J)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ie=this.tokenizer.reflink(J,this.tokens.links)){J=J.substring(ie.raw.length),de=Z[Z.length-1],de&&ie.type==="text"&&de.type==="text"?(de.raw+=ie.raw,de.text+=ie.text):Z.push(ie);continue}if(ie=this.tokenizer.emStrong(J,ze,Zt)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ie=this.tokenizer.codespan(J)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ie=this.tokenizer.br(J)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ie=this.tokenizer.del(J)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ie=this.tokenizer.autolink(J)){J=J.substring(ie.raw.length),Z.push(ie);continue}if(!this.state.inLink&&(ie=this.tokenizer.url(J))){J=J.substring(ie.raw.length),Z.push(ie);continue}if(ve=J,this.options.extensions&&this.options.extensions.startInline){let _i=1/0,pn=J.slice(1),Ln;this.options.extensions.startInline.forEach(fo=>{Ln=fo.call({lexer:this},pn),typeof Ln=="number"&&Ln>=0&&(_i=Math.min(_i,Ln))}),_i<1/0&&_i>=0&&(ve=J.substring(0,_i+1))}if(ie=this.tokenizer.inlineText(ve)){J=J.substring(ie.raw.length),ie.raw.slice(-1)!=="_"&&(Zt=ie.raw.slice(-1)),Mt=!0,de=Z[Z.length-1],de&&de.type==="text"?(de.raw+=ie.raw,de.text+=ie.text):Z.push(ie);continue}if(J){let _i="Infinite loop on byte: "+J.charCodeAt(0);if(this.options.silent){console.error(_i);break}else throw new Error(_i)}}return Z}}class cl{options;parser;constructor(J){this.options=J||e.defaults}space(J){return""}code({text:J,lang:Z,escaped:ie}){let de=(Z||"").match(/^\S*/)?.[0],ve=J.replace(/\n$/,"")+` -`;return de?'
'+(ie?ve:u(ve,!0))+`
-`:"
"+(ie?ve:u(ve,!0))+`
-`}blockquote({tokens:J}){return`
-${this.parser.parse(J)}
-`}html({text:J}){return J}heading({tokens:J,depth:Z}){return`${this.parser.parseInline(J)} -`}hr(J){return`
-`}list(J){let Z=J.ordered,ie=J.start,de="";for(let $e=0;$e -`+de+" -`}listitem(J){let Z="";if(J.task){let ie=this.checkbox({checked:!!J.checked});J.loose?J.tokens.length>0&&J.tokens[0].type==="paragraph"?(J.tokens[0].text=ie+" "+J.tokens[0].text,J.tokens[0].tokens&&J.tokens[0].tokens.length>0&&J.tokens[0].tokens[0].type==="text"&&(J.tokens[0].tokens[0].text=ie+" "+J.tokens[0].tokens[0].text)):J.tokens.unshift({type:"text",raw:ie+" ",text:ie+" "}):Z+=ie+" "}return Z+=this.parser.parse(J.tokens,!!J.loose),`
  • ${Z}
  • -`}checkbox({checked:J}){return"'}paragraph({tokens:J}){return`

    ${this.parser.parseInline(J)}

    -`}table(J){let Z="",ie="";for(let ve=0;ve${de}`),` +`),fe="",ve="",Ve=[];for(;le.length>0;){let $e=!1,It=[],qt;for(qt=0;qt/.test(le[qt]))It.push(le[qt]),$e=!0;else if(!$e)It.push(le[qt]);else break;le=le.slice(qt);let yi=It.join(` +`),pn=yi.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");fe=fe?`${fe} +${yi}`:yi,ve=ve?`${ve} +${pn}`:pn;let Mn=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(pn,Ve,!0),this.lexer.state.top=Mn,le.length===0)break;let br=Ve[Ve.length-1];if(br?.type==="code")break;if(br?.type==="blockquote"){let wo=br,Ya=wo.raw+` +`+le.join(` +`),aa=this.blockquote(Ya);Ve[Ve.length-1]=aa,fe=fe.substring(0,fe.length-wo.raw.length)+aa.raw,ve=ve.substring(0,ve.length-wo.text.length)+aa.text;break}else if(br?.type==="list"){let wo=br,Ya=wo.raw+` +`+le.join(` +`),aa=this.list(Ya);Ve[Ve.length-1]=aa,fe=fe.substring(0,fe.length-br.raw.length)+aa.raw,ve=ve.substring(0,ve.length-wo.raw.length)+aa.raw,le=Ya.substring(Ve[Ve.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:fe,tokens:Ve,text:ve}}}list(te){let ne=this.rules.block.list.exec(te);if(ne){let le=ne[1].trim(),fe=le.length>1,ve={type:"list",raw:"",ordered:fe,start:fe?+le.slice(0,-1):"",loose:!1,items:[]};le=fe?`\\d{1,9}\\${le.slice(-1)}`:`\\${le}`,this.options.pedantic&&(le=fe?le:"[*+-]");let Ve=new RegExp(`^( {0,3}${le})((?:[ ][^\\n]*)?(?:\\n|$))`),$e=!1;for(;te;){let It=!1,qt="",yi="";if(!(ne=Ve.exec(te))||this.rules.block.hr.test(te))break;qt=ne[0],te=te.substring(qt.length);let pn=ne[2].split(` +`,1)[0].replace(/^\t+/,sd=>" ".repeat(3*sd.length)),Mn=te.split(` +`,1)[0],br=!pn.trim(),wo=0;if(this.options.pedantic?(wo=2,yi=pn.trimStart()):br?wo=ne[1].length+1:(wo=ne[2].search(/[^ ]/),wo=wo>4?1:wo,yi=pn.slice(wo),wo+=ne[1].length),br&&/^ *$/.test(Mn)&&(qt+=Mn+` +`,te=te.substring(Mn.length+1),It=!0),!It){let sd=new RegExp(`^ {0,${Math.min(3,wo-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),di=new RegExp(`^ {0,${Math.min(3,wo-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),_e=new RegExp(`^ {0,${Math.min(3,wo-1)}}(?:\`\`\`|~~~)`),_t=new RegExp(`^ {0,${Math.min(3,wo-1)}}#`);for(;te;){let ot=te.split(` +`,1)[0];if(Mn=ot,this.options.pedantic&&(Mn=Mn.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),_e.test(Mn)||_t.test(Mn)||sd.test(Mn)||di.test(te))break;if(Mn.search(/[^ ]/)>=wo||!Mn.trim())yi+=` +`+Mn.slice(wo);else{if(br||pn.search(/[^ ]/)>=4||_e.test(pn)||_t.test(pn)||di.test(pn))break;yi+=` +`+Mn}!br&&!Mn.trim()&&(br=!0),qt+=ot+` +`,te=te.substring(ot.length+1),pn=Mn.slice(wo)}}ve.loose||($e?ve.loose=!0:/\n *\n *$/.test(qt)&&($e=!0));let Ya=null,aa;this.options.gfm&&(Ya=/^\[[ xX]\] /.exec(yi),Ya&&(aa=Ya[0]!=="[ ] ",yi=yi.replace(/^\[[ xX]\] +/,""))),ve.items.push({type:"list_item",raw:qt,task:!!Ya,checked:aa,loose:!1,text:yi,tokens:[]}),ve.raw+=qt}ve.items[ve.items.length-1].raw=ve.items[ve.items.length-1].raw.trimEnd(),ve.items[ve.items.length-1].text=ve.items[ve.items.length-1].text.trimEnd(),ve.raw=ve.raw.trimEnd();for(let It=0;Itpn.type==="space"),yi=qt.length>0&&qt.some(pn=>/\n.*\n/.test(pn.raw));ve.loose=yi}if(ve.loose)for(let It=0;It$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",ve=ne[3]?ne[3].substring(1,ne[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):ne[3];return{type:"def",tag:le,raw:ne[0],href:fe,title:ve}}}table(te){let ne=this.rules.block.table.exec(te);if(!ne||!/[:|]/.test(ne[2]))return;let le=g(ne[1]),fe=ne[2].replace(/^\||\| *$/g,"").split("|"),ve=ne[3]&&ne[3].trim()?ne[3].replace(/\n[ \t]*$/,"").split(` +`):[],Ve={type:"table",raw:ne[0],header:[],align:[],rows:[]};if(le.length===fe.length){for(let $e of fe)/^ *-+: *$/.test($e)?Ve.align.push("right"):/^ *:-+: *$/.test($e)?Ve.align.push("center"):/^ *:-+ *$/.test($e)?Ve.align.push("left"):Ve.align.push(null);for(let $e=0;$e({text:It,tokens:this.lexer.inline(It),header:!1,align:Ve.align[qt]})));return Ve}}lheading(te){let ne=this.rules.block.lheading.exec(te);if(ne)return{type:"heading",raw:ne[0],depth:ne[2].charAt(0)==="="?1:2,text:ne[1],tokens:this.lexer.inline(ne[1])}}paragraph(te){let ne=this.rules.block.paragraph.exec(te);if(ne){let le=ne[1].charAt(ne[1].length-1)===` +`?ne[1].slice(0,-1):ne[1];return{type:"paragraph",raw:ne[0],text:le,tokens:this.lexer.inline(le)}}}text(te){let ne=this.rules.block.text.exec(te);if(ne)return{type:"text",raw:ne[0],text:ne[0],tokens:this.lexer.inline(ne[0])}}escape(te){let ne=this.rules.inline.escape.exec(te);if(ne)return{type:"escape",raw:ne[0],text:u(ne[1])}}tag(te){let ne=this.rules.inline.tag.exec(te);if(ne)return!this.lexer.state.inLink&&/^/i.test(ne[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ne[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ne[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:ne[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:ne[0]}}link(te){let ne=this.rules.inline.link.exec(te);if(ne){let le=ne[2].trim();if(!this.options.pedantic&&/^$/.test(le))return;let Ve=A(le.slice(0,-1),"\\");if((le.length-Ve.length)%2===0)return}else{let Ve=v(ne[2],"()");if(Ve>-1){let It=(ne[0].indexOf("!")===0?5:4)+ne[1].length+Ve;ne[2]=ne[2].substring(0,Ve),ne[0]=ne[0].substring(0,It).trim(),ne[3]=""}}let fe=ne[2],ve="";if(this.options.pedantic){let Ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(fe);Ve&&(fe=Ve[1],ve=Ve[3])}else ve=ne[3]?ne[3].slice(1,-1):"";return fe=fe.trim(),/^$/.test(le)?fe=fe.slice(1):fe=fe.slice(1,-1)),w(ne,{href:fe&&fe.replace(this.rules.inline.anyPunctuation,"$1"),title:ve&&ve.replace(this.rules.inline.anyPunctuation,"$1")},ne[0],this.lexer)}}reflink(te,ne){let le;if((le=this.rules.inline.reflink.exec(te))||(le=this.rules.inline.nolink.exec(te))){let fe=(le[2]||le[1]).replace(/\s+/g," "),ve=ne[fe.toLowerCase()];if(!ve){let Ve=le[0].charAt(0);return{type:"text",raw:Ve,text:Ve}}return w(le,ve,le[0],this.lexer)}}emStrong(te,ne,le=""){let fe=this.rules.inline.emStrongLDelim.exec(te);if(!fe||fe[3]&&le.match(/[\p{L}\p{N}]/u))return;if(!(fe[1]||fe[2]||"")||!le||this.rules.inline.punctuation.exec(le)){let Ve=[...fe[0]].length-1,$e,It,qt=Ve,yi=0,pn=fe[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(pn.lastIndex=0,ne=ne.slice(-1*te.length+Ve);(fe=pn.exec(ne))!=null;){if($e=fe[1]||fe[2]||fe[3]||fe[4]||fe[5]||fe[6],!$e)continue;if(It=[...$e].length,fe[3]||fe[4]){qt+=It;continue}else if((fe[5]||fe[6])&&Ve%3&&!((Ve+It)%3)){yi+=It;continue}if(qt-=It,qt>0)continue;It=Math.min(It,It+qt+yi);let Mn=[...fe[0]][0].length,br=te.slice(0,Ve+fe.index+Mn+It);if(Math.min(Ve,It)%2){let Ya=br.slice(1,-1);return{type:"em",raw:br,text:Ya,tokens:this.lexer.inlineTokens(Ya)}}let wo=br.slice(2,-2);return{type:"strong",raw:br,text:wo,tokens:this.lexer.inlineTokens(wo)}}}}codespan(te){let ne=this.rules.inline.code.exec(te);if(ne){let le=ne[2].replace(/\n/g," "),fe=/[^ ]/.test(le),ve=/^ /.test(le)&&/ $/.test(le);return fe&&ve&&(le=le.substring(1,le.length-1)),le=u(le,!0),{type:"codespan",raw:ne[0],text:le}}}br(te){let ne=this.rules.inline.br.exec(te);if(ne)return{type:"br",raw:ne[0]}}del(te){let ne=this.rules.inline.del.exec(te);if(ne)return{type:"del",raw:ne[0],text:ne[2],tokens:this.lexer.inlineTokens(ne[2])}}autolink(te){let ne=this.rules.inline.autolink.exec(te);if(ne){let le,fe;return ne[2]==="@"?(le=u(ne[1]),fe="mailto:"+le):(le=u(ne[1]),fe=le),{type:"link",raw:ne[0],text:le,href:fe,tokens:[{type:"text",raw:le,text:le}]}}}url(te){let ne;if(ne=this.rules.inline.url.exec(te)){let le,fe;if(ne[2]==="@")le=u(ne[0]),fe="mailto:"+le;else{let ve;do ve=ne[0],ne[0]=this.rules.inline._backpedal.exec(ne[0])?.[0]??"";while(ve!==ne[0]);le=u(ne[0]),ne[1]==="www."?fe="http://"+ne[0]:fe=ne[0]}return{type:"link",raw:ne[0],text:le,href:fe,tokens:[{type:"text",raw:le,text:le}]}}}inlineText(te){let ne=this.rules.inline.text.exec(te);if(ne){let le;return this.lexer.state.inRawBlock?le=ne[0]:le=u(ne[0]),{type:"text",raw:ne[0],text:le}}}}let E=/^(?: *(?:\n|$))+/,I=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,T=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,N=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,L=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,B=/(?:[*+-]|\d{1,9}[.)])/,z=h(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,B).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Q=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Z=/^[^\n]+/,U=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M=h(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ee=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,B).getRegex(),X="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Y=/|$))/,$=h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Y).replace("tag",X).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),re=h(Q).replace("hr",N).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",X).getRegex(),Ie={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",re).getRegex(),code:I,def:M,fences:T,heading:L,hr:N,html:$,lheading:z,list:ee,newline:E,paragraph:re,table:p,text:Z},nt=h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",N).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",X).getRegex(),mt={...Ie,table:nt,paragraph:h(Q).replace("hr",N).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",X).getRegex()},xt={...Ie,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Y).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:p,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(Q).replace("hr",N).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",z).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fe=/^( {2,}|\\)\n(?!\s*$)/,zt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Bn=h(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Fi).getRegex(),zn=h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Fi).getRegex(),yo=h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Fi).getRegex(),Ei=h(/\\([punct])/,"gu").replace(/punct/g,Fi).getRegex(),vt=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ni=h(Y).replace("(?:-->|$)","-->").getRegex(),mr=h("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ni).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xr=h(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Wi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Do=h(/^!?\[(label)\]\[(ref)\]/).replace("label",Wi).replace("ref",U).getRegex(),As=h(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),ra=h("reflink|nolink(?!\\()","g").replace("reflink",Do).replace("nolink",As).getRegex(),gr={_backpedal:p,anyPunctuation:Ei,autolink:vt,blockSkip:Li,br:Fe,code:Ht,del:p,emStrongLDelim:Bn,emStrongRDelimAst:zn,emStrongRDelimUnd:yo,escape:wt,link:xr,nolink:As,punctuation:Kt,reflink:Do,reflinkSearch:ra,tag:mr,text:zt,url:p},hl={...gr,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",Wi).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Wi).getRegex()},Ro={...gr,escape:h(wt).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\It+" ".repeat(qt.length));let fe,ve,Ve;for(;te;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some($e=>(fe=$e.call({lexer:this},te,ne))?(te=te.substring(fe.raw.length),ne.push(fe),!0):!1))){if(fe=this.tokenizer.space(te)){te=te.substring(fe.raw.length),fe.raw.length===1&&ne.length>0?ne[ne.length-1].raw+=` +`:ne.push(fe);continue}if(fe=this.tokenizer.code(te)){te=te.substring(fe.raw.length),ve=ne[ne.length-1],ve&&(ve.type==="paragraph"||ve.type==="text")?(ve.raw+=` +`+fe.raw,ve.text+=` +`+fe.text,this.inlineQueue[this.inlineQueue.length-1].src=ve.text):ne.push(fe);continue}if(fe=this.tokenizer.fences(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.heading(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.hr(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.blockquote(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.list(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.html(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.def(te)){te=te.substring(fe.raw.length),ve=ne[ne.length-1],ve&&(ve.type==="paragraph"||ve.type==="text")?(ve.raw+=` +`+fe.raw,ve.text+=` +`+fe.raw,this.inlineQueue[this.inlineQueue.length-1].src=ve.text):this.tokens.links[fe.tag]||(this.tokens.links[fe.tag]={href:fe.href,title:fe.title});continue}if(fe=this.tokenizer.table(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(fe=this.tokenizer.lheading(te)){te=te.substring(fe.raw.length),ne.push(fe);continue}if(Ve=te,this.options.extensions&&this.options.extensions.startBlock){let $e=1/0,It=te.slice(1),qt;this.options.extensions.startBlock.forEach(yi=>{qt=yi.call({lexer:this},It),typeof qt=="number"&&qt>=0&&($e=Math.min($e,qt))}),$e<1/0&&$e>=0&&(Ve=te.substring(0,$e+1))}if(this.state.top&&(fe=this.tokenizer.paragraph(Ve))){ve=ne[ne.length-1],le&&ve?.type==="paragraph"?(ve.raw+=` +`+fe.raw,ve.text+=` +`+fe.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ve.text):ne.push(fe),le=Ve.length!==te.length,te=te.substring(fe.raw.length);continue}if(fe=this.tokenizer.text(te)){te=te.substring(fe.raw.length),ve=ne[ne.length-1],ve&&ve.type==="text"?(ve.raw+=` +`+fe.raw,ve.text+=` +`+fe.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ve.text):ne.push(fe);continue}if(te){let $e="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error($e);break}else throw new Error($e)}}return this.state.top=!0,ne}inline(te,ne=[]){return this.inlineQueue.push({src:te,tokens:ne}),ne}inlineTokens(te,ne=[]){let le,fe,ve,Ve=te,$e,It,qt;if(this.tokens.links){let yi=Object.keys(this.tokens.links);if(yi.length>0)for(;($e=this.tokenizer.rules.inline.reflinkSearch.exec(Ve))!=null;)yi.includes($e[0].slice($e[0].lastIndexOf("[")+1,-1))&&(Ve=Ve.slice(0,$e.index)+"["+"a".repeat($e[0].length-2)+"]"+Ve.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;($e=this.tokenizer.rules.inline.blockSkip.exec(Ve))!=null;)Ve=Ve.slice(0,$e.index)+"["+"a".repeat($e[0].length-2)+"]"+Ve.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;($e=this.tokenizer.rules.inline.anyPunctuation.exec(Ve))!=null;)Ve=Ve.slice(0,$e.index)+"++"+Ve.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;te;)if(It||(qt=""),It=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(yi=>(le=yi.call({lexer:this},te,ne))?(te=te.substring(le.raw.length),ne.push(le),!0):!1))){if(le=this.tokenizer.escape(te)){te=te.substring(le.raw.length),ne.push(le);continue}if(le=this.tokenizer.tag(te)){te=te.substring(le.raw.length),fe=ne[ne.length-1],fe&&le.type==="text"&&fe.type==="text"?(fe.raw+=le.raw,fe.text+=le.text):ne.push(le);continue}if(le=this.tokenizer.link(te)){te=te.substring(le.raw.length),ne.push(le);continue}if(le=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(le.raw.length),fe=ne[ne.length-1],fe&&le.type==="text"&&fe.type==="text"?(fe.raw+=le.raw,fe.text+=le.text):ne.push(le);continue}if(le=this.tokenizer.emStrong(te,Ve,qt)){te=te.substring(le.raw.length),ne.push(le);continue}if(le=this.tokenizer.codespan(te)){te=te.substring(le.raw.length),ne.push(le);continue}if(le=this.tokenizer.br(te)){te=te.substring(le.raw.length),ne.push(le);continue}if(le=this.tokenizer.del(te)){te=te.substring(le.raw.length),ne.push(le);continue}if(le=this.tokenizer.autolink(te)){te=te.substring(le.raw.length),ne.push(le);continue}if(!this.state.inLink&&(le=this.tokenizer.url(te))){te=te.substring(le.raw.length),ne.push(le);continue}if(ve=te,this.options.extensions&&this.options.extensions.startInline){let yi=1/0,pn=te.slice(1),Mn;this.options.extensions.startInline.forEach(br=>{Mn=br.call({lexer:this},pn),typeof Mn=="number"&&Mn>=0&&(yi=Math.min(yi,Mn))}),yi<1/0&&yi>=0&&(ve=te.substring(0,yi+1))}if(le=this.tokenizer.inlineText(ve)){te=te.substring(le.raw.length),le.raw.slice(-1)!=="_"&&(qt=le.raw.slice(-1)),It=!0,fe=ne[ne.length-1],fe&&fe.type==="text"?(fe.raw+=le.raw,fe.text+=le.text):ne.push(le);continue}if(te){let yi="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(yi);break}else throw new Error(yi)}}return ne}}class fl{options;parser;constructor(te){this.options=te||e.defaults}space(te){return""}code({text:te,lang:ne,escaped:le}){let fe=(ne||"").match(/^\S*/)?.[0],ve=te.replace(/\n$/,"")+` +`;return fe?'
    '+(le?ve:u(ve,!0))+`
    +`:"
    "+(le?ve:u(ve,!0))+`
    +`}blockquote({tokens:te}){return`
    +${this.parser.parse(te)}
    +`}html({text:te}){return te}heading({tokens:te,depth:ne}){return`${this.parser.parseInline(te)} +`}hr(te){return`
    +`}list(te){let ne=te.ordered,le=te.start,fe="";for(let $e=0;$e +`+fe+" +`}listitem(te){let ne="";if(te.task){let le=this.checkbox({checked:!!te.checked});te.loose?te.tokens.length>0&&te.tokens[0].type==="paragraph"?(te.tokens[0].text=le+" "+te.tokens[0].text,te.tokens[0].tokens&&te.tokens[0].tokens.length>0&&te.tokens[0].tokens[0].type==="text"&&(te.tokens[0].tokens[0].text=le+" "+te.tokens[0].tokens[0].text)):te.tokens.unshift({type:"text",raw:le+" ",text:le+" "}):ne+=le+" "}return ne+=this.parser.parse(te.tokens,!!te.loose),`
  • ${ne}
  • +`}checkbox({checked:te}){return"'}paragraph({tokens:te}){return`

    ${this.parser.parseInline(te)}

    +`}table(te){let ne="",le="";for(let ve=0;ve${fe}`),`
    -`+Z+` -`+de+`
    -`}tablerow({text:J}){return` -${J} -`}tablecell(J){let Z=this.parser.parseInline(J.tokens),ie=J.header?"th":"td";return(J.align?`<${ie} align="${J.align}">`:`<${ie}>`)+Z+` -`}strong({tokens:J}){return`${this.parser.parseInline(J)}`}em({tokens:J}){return`${this.parser.parseInline(J)}`}codespan({text:J}){return`${J}`}br(J){return"
    "}del({tokens:J}){return`${this.parser.parseInline(J)}`}link({href:J,title:Z,tokens:ie}){let de=this.parser.parseInline(ie),ve=f(J);if(ve===null)return de;J=ve;let ze='
    ",ze}image({href:J,title:Z,text:ie}){let de=f(J);if(de===null)return ie;J=de;let ve=`${ie}{let $e=ve[ze].flat(1/0);ie=ie.concat(this.walkTokens($e,Z))}):ve.tokens&&(ie=ie.concat(this.walkTokens(ve.tokens,Z)))}}return ie}use(...J){let Z=this.defaults.extensions||{renderers:{},childTokens:{}};return J.forEach(ie=>{let de={...ie};if(de.async=this.defaults.async||de.async||!1,ie.extensions&&(ie.extensions.forEach(ve=>{if(!ve.name)throw new Error("extension name required");if("renderer"in ve){let ze=Z.renderers[ve.name];ze?Z.renderers[ve.name]=function(...$e){let Mt=ve.renderer.apply(this,$e);return Mt===!1&&(Mt=ze.apply(this,$e)),Mt}:Z.renderers[ve.name]=ve.renderer}if("tokenizer"in ve){if(!ve.level||ve.level!=="block"&&ve.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let ze=Z[ve.level];ze?ze.unshift(ve.tokenizer):Z[ve.level]=[ve.tokenizer],ve.start&&(ve.level==="block"?Z.startBlock?Z.startBlock.push(ve.start):Z.startBlock=[ve.start]:ve.level==="inline"&&(Z.startInline?Z.startInline.push(ve.start):Z.startInline=[ve.start]))}"childTokens"in ve&&ve.childTokens&&(Z.childTokens[ve.name]=ve.childTokens)}),de.extensions=Z),ie.renderer){let ve=this.defaults.renderer||new cl(this.defaults);for(let ze in ie.renderer){if(!(ze in ve))throw new Error(`renderer '${ze}' does not exist`);if(["options","parser"].includes(ze))continue;let $e=ze,Mt=ie.renderer[$e],Zt=ve[$e];ve[$e]=(..._i)=>{let pn=Mt.apply(ve,_i);return pn===!1&&(pn=Zt.apply(ve,_i)),pn||""}}de.renderer=ve}if(ie.tokenizer){let ve=this.defaults.tokenizer||new _(this.defaults);for(let ze in ie.tokenizer){if(!(ze in ve))throw new Error(`tokenizer '${ze}' does not exist`);if(["options","rules","lexer"].includes(ze))continue;let $e=ze,Mt=ie.tokenizer[$e],Zt=ve[$e];ve[$e]=(..._i)=>{let pn=Mt.apply(ve,_i);return pn===!1&&(pn=Zt.apply(ve,_i)),pn}}de.tokenizer=ve}if(ie.hooks){let ve=this.defaults.hooks||new cs;for(let ze in ie.hooks){if(!(ze in ve))throw new Error(`hook '${ze}' does not exist`);if(ze==="options")continue;let $e=ze,Mt=ie.hooks[$e],Zt=ve[$e];cs.passThroughHooks.has(ze)?ve[$e]=_i=>{if(this.defaults.async)return Promise.resolve(Mt.call(ve,_i)).then(Ln=>Zt.call(ve,Ln));let pn=Mt.call(ve,_i);return Zt.call(ve,pn)}:ve[$e]=(..._i)=>{let pn=Mt.apply(ve,_i);return pn===!1&&(pn=Zt.apply(ve,_i)),pn}}de.hooks=ve}if(ie.walkTokens){let ve=this.defaults.walkTokens,ze=ie.walkTokens;de.walkTokens=function($e){let Mt=[];return Mt.push(ze.call(this,$e)),ve&&(Mt=Mt.concat(ve.call(this,$e))),Mt}}this.defaults={...this.defaults,...de}}),this}setOptions(J){return this.defaults={...this.defaults,...J},this}lexer(J,Z){return Hr.lex(J,Z??this.defaults)}parser(J,Z){return Xr.parse(J,Z??this.defaults)}parseMarkdown(J,Z){return(de,ve)=>{let ze={...ve},$e={...this.defaults,...ze},Mt=this.onError(!!$e.silent,!!$e.async);if(this.defaults.async===!0&&ze.async===!1)return Mt(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof de>"u"||de===null)return Mt(new Error("marked(): input parameter is undefined or null"));if(typeof de!="string")return Mt(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(de)+", string expected"));if($e.hooks&&($e.hooks.options=$e),$e.async)return Promise.resolve($e.hooks?$e.hooks.preprocess(de):de).then(Zt=>J(Zt,$e)).then(Zt=>$e.hooks?$e.hooks.processAllTokens(Zt):Zt).then(Zt=>$e.walkTokens?Promise.all(this.walkTokens(Zt,$e.walkTokens)).then(()=>Zt):Zt).then(Zt=>Z(Zt,$e)).then(Zt=>$e.hooks?$e.hooks.postprocess(Zt):Zt).catch(Mt);try{$e.hooks&&(de=$e.hooks.preprocess(de));let Zt=J(de,$e);$e.hooks&&(Zt=$e.hooks.processAllTokens(Zt)),$e.walkTokens&&this.walkTokens(Zt,$e.walkTokens);let _i=Z(Zt,$e);return $e.hooks&&(_i=$e.hooks.postprocess(_i)),_i}catch(Zt){return Mt(Zt)}}}onError(J,Z){return ie=>{if(ie.message+=` -Please report this to https://github.com/markedjs/marked.`,J){let de="

    An error occurred:

    "+u(ie.message+"",!0)+"
    ";return Z?Promise.resolve(de):de}if(Z)return Promise.reject(ie);throw ie}}}let ta=new No;function Ki(Pi,J){return ta.parse(Pi,J)}Ki.options=Ki.setOptions=function(Pi){return ta.setOptions(Pi),Ki.defaults=ta.defaults,n(Ki.defaults),Ki},Ki.getDefaults=t,Ki.defaults=e.defaults,Ki.use=function(...Pi){return ta.use(...Pi),Ki.defaults=ta.defaults,n(Ki.defaults),Ki},Ki.walkTokens=function(Pi,J){return ta.walkTokens(Pi,J)},Ki.parseInline=ta.parseInline,Ki.Parser=Xr,Ki.parser=Xr.parse,Ki.Renderer=cl,Ki.TextRenderer=ul,Ki.Lexer=Hr,Ki.lexer=Hr.lex,Ki.Tokenizer=_,Ki.Hooks=cs,Ki.parse=Ki;let Zr=Ki.options,$u=Ki.setOptions,Cr=Ki.use,Mo=Ki.walkTokens,Th=Ki.parseInline,ob=Ki,Df=Xr.parse,kh=Hr.lex;e.Hooks=cs,e.Lexer=Hr,e.Marked=No,e.Parser=Xr,e.Renderer=cl,e.TextRenderer=ul,e.Tokenizer=_,e.getDefaults=t,e.lexer=kh,e.marked=Ki,e.options=Zr,e.parse=ob,e.parseInline=Th,e.parser=Df,e.setOptions=$u,e.use=Cr,e.walkTokens=Mo}))})();inn=Uu.Hooks||exports.Hooks,nnn=Uu.Lexer||exports.Lexer,rnn=Uu.Marked||exports.Marked,onn=Uu.Parser||exports.Parser,Oke=Uu.Renderer||exports.Renderer,snn=Uu.TextRenderer||exports.TextRenderer,ann=Uu.Tokenizer||exports.Tokenizer,Bdt=Uu.defaults||exports.defaults,lnn=Uu.getDefaults||exports.getDefaults,yz=Uu.lexer||exports.lexer,cnn=Uu.marked||exports.marked,unn=Uu.options||exports.options,Pke=Uu.parse||exports.parse,dnn=Uu.parseInline||exports.parseInline,zdt=Uu.parser||exports.parser,hnn=Uu.setOptions||exports.setOptions,fnn=Uu.use||exports.use,pnn=Uu.walkTokens||exports.walkTokens});function Hdt(i){return JSON.stringify(i,Rgi)}function wz(i){let e=JSON.parse(i);return e=Bke(e),e}function Rgi(i,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function Bke(i,e=0){if(!i||e>200)return i;if(typeof i=="object"){switch(i.$mid){case 1:return Xe.revive(i);case 2:return new RegExp(i.source,i.flags);case 17:return new Date(i.source)}if(i instanceof vF||i instanceof Uint8Array)return i;if(Array.isArray(i))for(let t=0;t{AF();mn()});function aE(i,e={},t={}){let n=new te,r=!1,o=rte(e),s=function(g){let v;try{v=wz(decodeURIComponent(g))}catch{}return v?(v=r$(v,A=>{if(i.uris&&i.uris[A])return Xe.revive(i.uris[A])}),encodeURIComponent(JSON.stringify(v))):g},a=function(g,v){let A=i.uris&&i.uris[g],w=Xe.revive(A);return v?g.startsWith(jt.data+":")?g:(w||(w=Xe.parse(g)),jw.uriToBrowserUri(w).toString(!0)):!w||Xe.parse(g).toString()===w.toString()?g:(w.query&&(w=w.with({query:s(w.query)})),w.toString())},l=new Oke;l.image=zke.image,l.link=zke.link,l.paragraph=zke.paragraph;let c=[],u=[];if(e.codeBlockRendererSync?l.code=({text:g,lang:v})=>{let A=vz.nextId(),w=e.codeBlockRendererSync(Wdt(v),g);return u.push([A,w]),`
    ${fS(g)}
    `}:e.codeBlockRenderer&&(l.code=({text:g,lang:v})=>{let A=vz.nextId(),w=e.codeBlockRenderer(Wdt(v),g);return c.push(w.then(C=>[A,C])),`
    ${fS(g)}
    `}),e.actionHandler){let g=function(w){let C=w.target;if(!(C.tagName!=="A"&&(C=C.parentElement,!C||C.tagName!=="A")))try{let _=C.dataset.href;_&&(i.baseUri&&(_=Vke(Xe.from(i.baseUri),_)),e.actionHandler.callback(_,w))}catch(_){pt(_)}finally{w.preventDefault()}},v=e.actionHandler.disposables.add(new wi(o,"click")),A=e.actionHandler.disposables.add(new wi(o,"auxclick"));e.actionHandler.disposables.add(Se.any(v.event,A.event)(w=>{let C=new gl(rt(o),w);!C.leftButton&&!C.middleButton||g(C)})),e.actionHandler.disposables.add(re(o,"keydown",w=>{let C=new Wi(w);!C.equals(10)&&!C.equals(3)||g(C)}))}i.supportHtml||(l.html=({text:g})=>e.sanitizerOptions?.replaceWithPlaintext?fS(g):(i.isTrusted?g.match(/^(]+>)|(<\/\s*span>)$/):void 0)?g:""),t.renderer=l;let d=i.value??"";d.length>1e5&&(d=`${d.substr(0,1e5)}\u2026`),i.supportThemeIcons&&(d=Ddt(d));let h;if(e.fillInIncompleteTokens){let g={...Bdt,...t},v=yz(d,g),A=Ggi(v);h=zdt(A,g)}else h=Pke(d,{...t,async:!1});i.supportThemeIcons&&(h=Xp(h).map(v=>typeof v=="string"?v:v.outerHTML).join(""));let p=new DOMParser().parseFromString(Hke({isTrusted:i.isTrusted,...e.sanitizerOptions},h),"text/html");if(p.body.querySelectorAll("img, audio, video, source").forEach(g=>{let v=g.getAttribute("src");if(v){let A=v;try{i.baseUri&&(A=Vke(Xe.from(i.baseUri),A))}catch{}if(g.setAttribute("src",a(A,!0)),e.remoteImageIsAllowed){let w=Xe.parse(A);w.scheme!==jt.file&&w.scheme!==jt.data&&!e.remoteImageIsAllowed(w)&&g.replaceWith(we("",void 0,g.outerHTML))}}}),p.body.querySelectorAll("a").forEach(g=>{let v=g.getAttribute("href");if(g.setAttribute("href",""),!v||/^data:|javascript:/i.test(v)||/^command:/i.test(v)&&!i.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(v))g.replaceWith(...g.childNodes);else{let A=a(v,!1);i.baseUri&&(A=Vke(Xe.from(i.baseUri),v)),g.dataset.href=A}}),o.innerHTML=Hke({isTrusted:i.isTrusted,...e.sanitizerOptions},p.body.innerHTML),c.length>0)Promise.all(c).then(g=>{if(r)return;let v=new Map(g),A=o.querySelectorAll("div[data-code]");for(let w of A){let C=v.get(w.dataset.code??"");C&&So(w,C)}e.asyncRenderCallback?.()});else if(u.length>0){let g=new Map(u),v=o.querySelectorAll("div[data-code]");for(let A of v){let w=g.get(A.dataset.code??"");w&&So(A,w)}}if(e.asyncRenderCallback)for(let g of o.getElementsByTagName("img")){let v=n.add(re(g,"load",()=>{v.dispose(),e.asyncRenderCallback()}))}return{element:o,dispose:()=>{r=!0,n.dispose()}}}function Wdt(i){if(!i)return"";let e=i.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:i}function Vke(i,e){return/^\w[\w\d+.-]*:/.test(e)?e:i.path.endsWith("/")?Fke(i,e).toString():Fke(sE(i),e).toString()}function Hke(i,e){let{config:t,allowedSchemes:n}=Pgi(i),r=new te;r.add(Udt("uponSanitizeAttribute",(o,s)=>{if(s.attrName==="style"||s.attrName==="class"){if(o.tagName==="SPAN"){if(s.attrName==="style"){s.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(s.attrValue);return}else if(s.attrName==="class"){s.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(s.attrValue);return}}s.keepAttr=!1;return}else if(o.tagName==="INPUT"&&o.attributes.getNamedItem("type")?.value==="checkbox"){if(s.attrName==="type"&&s.attrValue==="checkbox"||s.attrName==="disabled"||s.attrName==="checked"){s.keepAttr=!0;return}s.keepAttr=!1}})),r.add(Udt("uponSanitizeElement",(o,s)=>{if(s.tagName==="input"&&(o.attributes.getNamedItem("type")?.value==="checkbox"?o.setAttribute("disabled",""):i.replaceWithPlaintext||o.remove()),i.replaceWithPlaintext&&!s.allowedTags[s.tagName]&&s.tagName!=="body"&&o.parentElement){let a,l;if(s.tagName==="#comment")a=``;else{let h=Fgi.includes(s.tagName),f=o.attributes.length?" "+Array.from(o.attributes).map(p=>`${p.name}="${p.value}"`).join(" "):"";a=`<${s.tagName}${f}>`,h||(l=``)}let c=document.createDocumentFragment(),u=o.parentElement.ownerDocument.createTextNode(a);c.appendChild(u);let d=l?o.parentElement.ownerDocument.createTextNode(l):void 0;for(;o.firstChild;)c.appendChild(o.firstChild);d&&c.appendChild(d),o.nodeType===Node.COMMENT_NODE?o.parentElement.insertBefore(c,o):o.parentElement.replaceChild(c,o)}})),r.add(Ast(n));try{return qX(e,{...t,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}function Pgi(i){let e=[jt.http,jt.https,jt.mailto,jt.data,jt.file,jt.vscodeFileResource,jt.vscodeRemote,jt.vscodeRemoteResource];return i.isTrusted&&e.push(jt.command),{config:{ALLOWED_TAGS:i.allowedTags??[...yst],ALLOWED_ATTR:Ogi,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function jdt(i){return typeof i=="string"?i:Bgi(i)}function Bgi(i,e){let t=i.value??"";t.length>1e5&&(t=`${t.substr(0,1e5)}\u2026`);let n=Pke(t,{async:!1,renderer:e?Hgi.value:Vgi.value}).replace(/&(#\d+|[a-zA-Z]+);/g,r=>zgi.get(r)??r);return Hke({isTrusted:!1},n).toString()}function Qdt(){let i=new Oke;return i.code=({text:e})=>e,i.blockquote=({text:e})=>e+` +`+ne+` +`+fe+` +`}tablerow({text:te}){return` +${te} +`}tablecell(te){let ne=this.parser.parseInline(te.tokens),le=te.header?"th":"td";return(te.align?`<${le} align="${te.align}">`:`<${le}>`)+ne+` +`}strong({tokens:te}){return`${this.parser.parseInline(te)}`}em({tokens:te}){return`${this.parser.parseInline(te)}`}codespan({text:te}){return`${te}`}br(te){return"
    "}del({tokens:te}){return`${this.parser.parseInline(te)}`}link({href:te,title:ne,tokens:le}){let fe=this.parser.parseInline(le),ve=f(te);if(ve===null)return fe;te=ve;let Ve='
    ",Ve}image({href:te,title:ne,text:le}){let fe=f(te);if(fe===null)return le;te=fe;let ve=`${le}{let $e=ve[Ve].flat(1/0);le=le.concat(this.walkTokens($e,ne))}):ve.tokens&&(le=le.concat(this.walkTokens(ve.tokens,ne)))}}return le}use(...te){let ne=this.defaults.extensions||{renderers:{},childTokens:{}};return te.forEach(le=>{let fe={...le};if(fe.async=this.defaults.async||fe.async||!1,le.extensions&&(le.extensions.forEach(ve=>{if(!ve.name)throw new Error("extension name required");if("renderer"in ve){let Ve=ne.renderers[ve.name];Ve?ne.renderers[ve.name]=function(...$e){let It=ve.renderer.apply(this,$e);return It===!1&&(It=Ve.apply(this,$e)),It}:ne.renderers[ve.name]=ve.renderer}if("tokenizer"in ve){if(!ve.level||ve.level!=="block"&&ve.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let Ve=ne[ve.level];Ve?Ve.unshift(ve.tokenizer):ne[ve.level]=[ve.tokenizer],ve.start&&(ve.level==="block"?ne.startBlock?ne.startBlock.push(ve.start):ne.startBlock=[ve.start]:ve.level==="inline"&&(ne.startInline?ne.startInline.push(ve.start):ne.startInline=[ve.start]))}"childTokens"in ve&&ve.childTokens&&(ne.childTokens[ve.name]=ve.childTokens)}),fe.extensions=ne),le.renderer){let ve=this.defaults.renderer||new fl(this.defaults);for(let Ve in le.renderer){if(!(Ve in ve))throw new Error(`renderer '${Ve}' does not exist`);if(["options","parser"].includes(Ve))continue;let $e=Ve,It=le.renderer[$e],qt=ve[$e];ve[$e]=(...yi)=>{let pn=It.apply(ve,yi);return pn===!1&&(pn=qt.apply(ve,yi)),pn||""}}fe.renderer=ve}if(le.tokenizer){let ve=this.defaults.tokenizer||new _(this.defaults);for(let Ve in le.tokenizer){if(!(Ve in ve))throw new Error(`tokenizer '${Ve}' does not exist`);if(["options","rules","lexer"].includes(Ve))continue;let $e=Ve,It=le.tokenizer[$e],qt=ve[$e];ve[$e]=(...yi)=>{let pn=It.apply(ve,yi);return pn===!1&&(pn=qt.apply(ve,yi)),pn}}fe.tokenizer=ve}if(le.hooks){let ve=this.defaults.hooks||new ls;for(let Ve in le.hooks){if(!(Ve in ve))throw new Error(`hook '${Ve}' does not exist`);if(Ve==="options")continue;let $e=Ve,It=le.hooks[$e],qt=ve[$e];ls.passThroughHooks.has(Ve)?ve[$e]=yi=>{if(this.defaults.async)return Promise.resolve(It.call(ve,yi)).then(Mn=>qt.call(ve,Mn));let pn=It.call(ve,yi);return qt.call(ve,pn)}:ve[$e]=(...yi)=>{let pn=It.apply(ve,yi);return pn===!1&&(pn=qt.apply(ve,yi)),pn}}fe.hooks=ve}if(le.walkTokens){let ve=this.defaults.walkTokens,Ve=le.walkTokens;fe.walkTokens=function($e){let It=[];return It.push(Ve.call(this,$e)),ve&&(It=It.concat(ve.call(this,$e))),It}}this.defaults={...this.defaults,...fe}}),this}setOptions(te){return this.defaults={...this.defaults,...te},this}lexer(te,ne){return jo.lex(te,ne??this.defaults)}parser(te,ne){return tr.parse(te,ne??this.defaults)}parseMarkdown(te,ne){return(fe,ve)=>{let Ve={...ve},$e={...this.defaults,...Ve},It=this.onError(!!$e.silent,!!$e.async);if(this.defaults.async===!0&&Ve.async===!1)return It(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof fe>"u"||fe===null)return It(new Error("marked(): input parameter is undefined or null"));if(typeof fe!="string")return It(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(fe)+", string expected"));if($e.hooks&&($e.hooks.options=$e),$e.async)return Promise.resolve($e.hooks?$e.hooks.preprocess(fe):fe).then(qt=>te(qt,$e)).then(qt=>$e.hooks?$e.hooks.processAllTokens(qt):qt).then(qt=>$e.walkTokens?Promise.all(this.walkTokens(qt,$e.walkTokens)).then(()=>qt):qt).then(qt=>ne(qt,$e)).then(qt=>$e.hooks?$e.hooks.postprocess(qt):qt).catch(It);try{$e.hooks&&(fe=$e.hooks.preprocess(fe));let qt=te(fe,$e);$e.hooks&&(qt=$e.hooks.processAllTokens(qt)),$e.walkTokens&&this.walkTokens(qt,$e.walkTokens);let yi=ne(qt,$e);return $e.hooks&&(yi=$e.hooks.postprocess(yi)),yi}catch(qt){return It(qt)}}}onError(te,ne){return le=>{if(le.message+=` +Please report this to https://github.com/markedjs/marked.`,te){let fe="

    An error occurred:

    "+u(le.message+"",!0)+"
    ";return ne?Promise.resolve(fe):fe}if(ne)return Promise.reject(le);throw le}}}let sa=new Or;function Yi(Ni,te){return sa.parse(Ni,te)}Yi.options=Yi.setOptions=function(Ni){return sa.setOptions(Ni),Yi.defaults=sa.defaults,n(Yi.defaults),Yi},Yi.getDefaults=t,Yi.defaults=e.defaults,Yi.use=function(...Ni){return sa.use(...Ni),Yi.defaults=sa.defaults,n(Yi.defaults),Yi},Yi.walkTokens=function(Ni,te){return sa.walkTokens(Ni,te)},Yi.parseInline=sa.parseInline,Yi.Parser=tr,Yi.parser=tr.parse,Yi.Renderer=fl,Yi.TextRenderer=pl,Yi.Lexer=jo,Yi.lexer=jo.lex,Yi.Tokenizer=_,Yi.Hooks=ls,Yi.parse=Yi;let ir=Yi.options,rd=Yi.setOptions,_o=Yi.use,Pr=Yi.walkTokens,Oh=Yi.parseInline,vb=Yi,Bf=tr.parse,Ph=jo.lex;e.Hooks=ls,e.Lexer=jo,e.Marked=Or,e.Parser=tr,e.Renderer=fl,e.TextRenderer=pl,e.Tokenizer=_,e.getDefaults=t,e.lexer=Ph,e.marked=Yi,e.options=ir,e.parse=vb,e.parseInline=Oh,e.parser=Bf,e.setOptions=rd,e.use=_o,e.walkTokens=Pr}))})();Hrn=Ku.Hooks||exports.Hooks,Wrn=Ku.Lexer||exports.Lexer,Urn=Ku.Marked||exports.Marked,jrn=Ku.Parser||exports.Parser,rIe=Ku.Renderer||exports.Renderer,Qrn=Ku.TextRenderer||exports.TextRenderer,Grn=Ku.Tokenizer||exports.Tokenizer,Qct=Ku.defaults||exports.defaults,qrn=Ku.getDefaults||exports.getDefaults,ZV=Ku.lexer||exports.lexer,Yrn=Ku.marked||exports.marked,Krn=Ku.options||exports.options,sIe=Ku.parse||exports.parse,Jrn=Ku.parseInline||exports.parseInline,Gct=Ku.parser||exports.parser,Xrn=Ku.setOptions||exports.setOptions,Zrn=Ku.use||exports.use,$rn=Ku.walkTokens||exports.walkTokens});function Yct(i){return JSON.stringify(i,Tsi)}function $V(i){let e=JSON.parse(i);return e=aIe(e),e}function Tsi(i,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function aIe(i,e=0){if(!i||e>200)return i;if(typeof i=="object"){switch(i.$mid){case 1:return Je.revive(i);case 2:return new RegExp(i.source,i.flags);case 17:return new Date(i.source)}if(i instanceof uO||i instanceof Uint8Array)return i;if(Array.isArray(i))for(let t=0;t{dO();mn()});function LE(i,e={},t={}){let n=new se,o=!1,r=Eie(e),s=function(g){let A;try{A=$V(decodeURIComponent(g))}catch{}return A?(A=Eee(A,v=>{if(i.uris&&i.uris[v])return Je.revive(i.uris[v])}),encodeURIComponent(JSON.stringify(A))):g},a=function(g,A){let v=i.uris&&i.uris[g],w=Je.revive(v);return A?g.startsWith(Vt.data+":")?g:(w||(w=Je.parse(g)),mx.uriToBrowserUri(w).toString(!0)):!w||Je.parse(g).toString()===w.toString()?g:(w.query&&(w=w.with({query:s(w.query)})),w.toString())},l=new rIe;l.image=lIe.image,l.link=lIe.link,l.paragraph=lIe.paragraph;let c=[],u=[];if(e.codeBlockRendererSync?l.code=({text:g,lang:A})=>{let v=JV.nextId(),w=e.codeBlockRendererSync(Kct(A),g);return u.push([v,w]),`
    ${PS(g)}
    `}:e.codeBlockRenderer&&(l.code=({text:g,lang:A})=>{let v=JV.nextId(),w=e.codeBlockRenderer(Kct(A),g);return c.push(w.then(C=>[v,C])),`
    ${PS(g)}
    `}),e.actionHandler){let g=function(w){let C=w.target;if(!(C.tagName!=="A"&&(C=C.parentElement,!C||C.tagName!=="A")))try{let _=C.dataset.href;_&&(i.baseUri&&(_=cIe(Je.from(i.baseUri),_)),e.actionHandler.callback(_,w))}catch(_){ft(_)}finally{w.preventDefault()}},A=e.actionHandler.disposables.add(new bi(r,"click")),v=e.actionHandler.disposables.add(new bi(r,"auxclick"));e.actionHandler.disposables.add(Ee.any(A.event,v.event)(w=>{let C=new wl(rt(r),w);!C.leftButton&&!C.middleButton||g(C)})),e.actionHandler.disposables.add(ce(r,"keydown",w=>{let C=new Vi(w);!C.equals(10)&&!C.equals(3)||g(C)}))}i.supportHtml||(l.html=({text:g})=>e.sanitizerOptions?.replaceWithPlaintext?PS(g):(i.isTrusted?g.match(/^(]+>)|(<\/\s*span>)$/):void 0)?g:""),t.renderer=l;let d=i.value??"";d.length>1e5&&(d=`${d.substr(0,1e5)}\u2026`),i.supportThemeIcons&&(d=Rct(d));let h;if(e.fillInIncompleteTokens){let g={...Qct,...t},A=ZV(d,g),v=Vsi(A);h=Gct(v,g)}else h=sIe(d,{...t,async:!1});i.supportThemeIcons&&(h=pm(h).map(A=>typeof A=="string"?A:A.outerHTML).join(""));let p=new DOMParser().parseFromString(uIe({isTrusted:i.isTrusted,...e.sanitizerOptions},h),"text/html");if(p.body.querySelectorAll("img, audio, video, source").forEach(g=>{let A=g.getAttribute("src");if(A){let v=A;try{i.baseUri&&(v=cIe(Je.from(i.baseUri),v))}catch{}if(g.setAttribute("src",a(v,!0)),e.remoteImageIsAllowed){let w=Je.parse(v);w.scheme!==Vt.file&&w.scheme!==Vt.data&&!e.remoteImageIsAllowed(w)&&g.replaceWith(xe("",void 0,g.outerHTML))}}}),p.body.querySelectorAll("a").forEach(g=>{let A=g.getAttribute("href");if(g.setAttribute("href",""),!A||/^data:|javascript:/i.test(A)||/^command:/i.test(A)&&!i.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(A))g.replaceWith(...g.childNodes);else{let v=a(A,!1);i.baseUri&&(v=cIe(Je.from(i.baseUri),A)),g.dataset.href=v}}),r.innerHTML=uIe({isTrusted:i.isTrusted,...e.sanitizerOptions},p.body.innerHTML),c.length>0)Promise.all(c).then(g=>{if(o)return;let A=new Map(g),v=r.querySelectorAll("div[data-code]");for(let w of v){let C=A.get(w.dataset.code??"");C&&kr(w,C)}e.asyncRenderCallback?.()});else if(u.length>0){let g=new Map(u),A=r.querySelectorAll("div[data-code]");for(let v of A){let w=g.get(v.dataset.code??"");w&&kr(v,w)}}if(e.asyncRenderCallback)for(let g of r.getElementsByTagName("img")){let A=n.add(ce(g,"load",()=>{A.dispose(),e.asyncRenderCallback()}))}return{element:r,dispose:()=>{o=!0,n.dispose()}}}function Kct(i){if(!i)return"";let e=i.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:i}function cIe(i,e){return/^\w[\w\d+.-]*:/.test(e)?e:i.path.endsWith("/")?oIe(i,e).toString():oIe(IE(i),e).toString()}function uIe(i,e){let{config:t,allowedSchemes:n}=Lsi(i),o=new se;o.add(Jct("uponSanitizeAttribute",(r,s)=>{if(s.attrName==="style"||s.attrName==="class"){if(r.tagName==="SPAN"){if(s.attrName==="style"){s.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(s.attrValue);return}else if(s.attrName==="class"){s.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(s.attrValue);return}}s.keepAttr=!1;return}else if(r.tagName==="INPUT"&&r.attributes.getNamedItem("type")?.value==="checkbox"){if(s.attrName==="type"&&s.attrValue==="checkbox"||s.attrName==="disabled"||s.attrName==="checked"){s.keepAttr=!0;return}s.keepAttr=!1}})),o.add(Jct("uponSanitizeElement",(r,s)=>{if(s.tagName==="input"&&(r.attributes.getNamedItem("type")?.value==="checkbox"?r.setAttribute("disabled",""):i.replaceWithPlaintext||r.remove()),i.replaceWithPlaintext&&!s.allowedTags[s.tagName]&&s.tagName!=="body"&&r.parentElement){let a,l;if(s.tagName==="#comment")a=``;else{let h=ksi.includes(s.tagName),f=r.attributes.length?" "+Array.from(r.attributes).map(p=>`${p.name}="${p.value}"`).join(" "):"";a=`<${s.tagName}${f}>`,h||(l=``)}let c=document.createDocumentFragment(),u=r.parentElement.ownerDocument.createTextNode(a);c.appendChild(u);let d=l?r.parentElement.ownerDocument.createTextNode(l):void 0;for(;r.firstChild;)c.appendChild(r.firstChild);d&&c.appendChild(d),r.nodeType===Node.COMMENT_NODE?r.parentElement.insertBefore(c,r):r.parentElement.replaceChild(c,r)}})),o.add(Eot(n));try{return m$(e,{...t,RETURN_TRUSTED_TYPE:!0})}finally{o.dispose()}}function Lsi(i){let e=[Vt.http,Vt.https,Vt.mailto,Vt.data,Vt.file,Vt.vscodeFileResource,Vt.vscodeRemote,Vt.vscodeRemoteResource];return i.isTrusted&&e.push(Vt.command),{config:{ALLOWED_TAGS:i.allowedTags??[...Dot],ALLOWED_ATTR:Isi,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function Xct(i){return typeof i=="string"?i:Nsi(i)}function Nsi(i,e){let t=i.value??"";t.length>1e5&&(t=`${t.substr(0,1e5)}\u2026`);let n=sIe(t,{async:!1,renderer:e?Fsi.value:Rsi.value}).replace(/&(#\d+|[a-zA-Z]+);/g,o=>Msi.get(o)??o);return uIe({isTrusted:!1},n).toString()}function Zct(){let i=new rIe;return i.code=({text:e})=>e,i.blockquote=({text:e})=>e+` `,i.html=e=>"",i.heading=function({tokens:e}){return this.parser.parseInline(e)+` `},i.hr=()=>"",i.list=function({items:e}){return e.map(t=>this.listitem(t)).join(` `)+` `},i.listitem=({text:e})=>e+` `,i.paragraph=function({tokens:e}){return this.parser.parseInline(e)+` `},i.table=function({header:e,rows:t}){return e.map(n=>this.tablecell(n)).join(" ")+` -`+t.map(n=>n.map(r=>this.tablecell(r)).join(" ")).join(` +`+t.map(n=>n.map(o=>this.tablecell(o)).join(" ")).join(` `)+` `},i.tablerow=({text:e})=>e,i.tablecell=function({tokens:e}){return this.parser.parseInline(e)},i.strong=({text:e})=>e,i.em=({text:e})=>e,i.codespan=({text:e})=>e,i.br=e=>` -`,i.del=({text:e})=>e,i.image=e=>"",i.text=({text:e})=>e,i.link=({text:e})=>e,i}function fte(i){let e="";return i.forEach(t=>{e+=t.raw}),e}function Gdt(i){if(i.tokens)for(let e=i.tokens.length-1;e>=0;e--){let t=i.tokens[e];if(t.type==="text"){let n=t.raw.split(` -`),r=n[n.length-1];if(r.includes("`"))return Ygi(i);if(r.includes("**"))return ebi(i);if(r.match(/\*\w/))return Kgi(i);if(r.match(/(^|\s)__\w/))return tbi(i);if(r.match(/(^|\s)_\w/))return Jgi(i);if(Wgi(r)||Ugi(r)&&i.tokens.slice(0,e).some(o=>o.type==="text"&&o.raw.match(/\[[^\]]*$/))){let o=i.tokens.slice(e+1);return o[0]?.type==="link"&&o[1]?.type==="text"&&o[1].raw.match(/^ *"[^"]*$/)||r.match(/^[^"]* +"[^"]*$/)?Zgi(i):Xgi(i)}else if(r.match(/(^|\s)\[\w*/))return $gi(i)}}}function Wgi(i){return!!i.match(/(^|\s)\[.*\]\(\w*/)}function Ugi(i){return!!i.match(/^[^\[]*\]\([^\)]*$/)}function jgi(i){let e=i.items[i.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,n;if(t?.type==="text"&&!("inRawBlock"in e)&&(n=Gdt(t)),!n||n.type!=="paragraph")return;let r=fte(i.items.slice(0,-1)),o=e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!o)return;let s=o+fte(e.tokens.slice(0,-1))+n.raw,a=yz(r+s)[0];if(a.type==="list")return a}function Ggi(i){for(let e=0;e"u"&&s.match(/^\s*\|/)){let a=s.match(/(\|[^\|]+)(?=\||$)/g);a&&(n=a.length)}else if(typeof n=="number")if(s.match(/^\s*\|/)){if(o!==t.length-1)return;r=!0}else return}if(typeof n=="number"&&n>0){let o=r?t.slice(0,-1).join(` -`):e,s=!!o.match(/\|\s*$/),a=o+(s?"":"|")+` -|${" --- |".repeat(n)}`;return yz(a)}}function Udt(i,e){return YX(i,e),Ve(()=>KX(i))}var zke,Fgi,Ogi,zgi,Vgi,Hgi,Qgi,xz=D(()=>{Ye();JX();jb();gke();gc();Op();mx();Lt();et();Ad();jI();Az();nv();ae();Vdt();hte();bl();Xd();Ec();Pt();mn();zke=Object.freeze({image:({href:i,title:e,text:t})=>{let n=[],r=[];return i&&({href:i,dimensions:n}=Pdt(i),r.push(`src="${bz(i)}"`)),t&&r.push(`alt="${bz(t)}"`),e&&r.push(`title="${bz(e)}"`),n.length&&(r=r.concat(n)),""},paragraph({tokens:i}){return`

    ${this.parser.parseInline(i)}

    `},link({href:i,title:e,tokens:t}){let n=this.parser.parseInline(t);return typeof i!="string"?"":(i===n&&(n=dte(n)),e=typeof e=="string"?bz(dte(e)):"",i=dte(i),i=i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${n}`)}});Fgi=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];Ogi=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];zgi=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);Vgi=new Ys(i=>Qdt()),Hgi=new Ys(()=>{let i=Qdt();return i.code=({text:e})=>` +`,i.del=({text:e})=>e,i.image=e=>"",i.text=({text:e})=>e,i.link=({text:e})=>e,i}function Fie(i){let e="";return i.forEach(t=>{e+=t.raw}),e}function $ct(i){if(i.tokens)for(let e=i.tokens.length-1;e>=0;e--){let t=i.tokens[e];if(t.type==="text"){let n=t.raw.split(` +`),o=n[n.length-1];if(o.includes("`"))return Wsi(i);if(o.includes("**"))return Ysi(i);if(o.match(/\*\w/))return Usi(i);if(o.match(/(^|\s)__\w/))return Ksi(i);if(o.match(/(^|\s)_\w/))return jsi(i);if(Osi(o)||Psi(o)&&i.tokens.slice(0,e).some(r=>r.type==="text"&&r.raw.match(/\[[^\]]*$/))){let r=i.tokens.slice(e+1);return r[0]?.type==="link"&&r[1]?.type==="text"&&r[1].raw.match(/^ *"[^"]*$/)||o.match(/^[^"]* +"[^"]*$/)?Gsi(i):Qsi(i)}else if(o.match(/(^|\s)\[\w*/))return qsi(i)}}}function Osi(i){return!!i.match(/(^|\s)\[.*\]\(\w*/)}function Psi(i){return!!i.match(/^[^\[]*\]\([^\)]*$/)}function Bsi(i){let e=i.items[i.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,n;if(t?.type==="text"&&!("inRawBlock"in e)&&(n=$ct(t)),!n||n.type!=="paragraph")return;let o=Fie(i.items.slice(0,-1)),r=e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!r)return;let s=r+Fie(e.tokens.slice(0,-1))+n.raw,a=ZV(o+s)[0];if(a.type==="list")return a}function Vsi(i){for(let e=0;e"u"&&s.match(/^\s*\|/)){let a=s.match(/(\|[^\|]+)(?=\||$)/g);a&&(n=a.length)}else if(typeof n=="number")if(s.match(/^\s*\|/)){if(r!==t.length-1)return;o=!0}else return}if(typeof n=="number"&&n>0){let r=o?t.slice(0,-1).join(` +`):e,s=!!r.match(/\|\s*$/),a=r+(s?"":"|")+` +|${" --- |".repeat(n)}`;return ZV(a)}}function Jct(i,e){return g$(i,e),He(()=>b$(i))}var lIe,ksi,Isi,Msi,Rsi,Fsi,zsi,eH=D(()=>{Ye();A$();n0();zke();xc();$p();Vx();Tt();et();Td();_L();XV();CA();de();qct();Rie();xl();rh();Nc();Rt();mn();lIe=Object.freeze({image:({href:i,title:e,text:t})=>{let n=[],o=[];return i&&({href:i,dimensions:n}=jct(i),o.push(`src="${KV(i)}"`)),t&&o.push(`alt="${KV(t)}"`),e&&o.push(`title="${KV(e)}"`),n.length&&(o=o.concat(n)),""},paragraph({tokens:i}){return`

    ${this.parser.parseInline(i)}

    `},link({href:i,title:e,tokens:t}){let n=this.parser.parseInline(t);return typeof i!="string"?"":(i===n&&(n=Mie(n)),e=typeof e=="string"?KV(Mie(e)):"",i=Mie(i),i=i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`${n}`)}});ksi=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];Isi=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];Msi=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);Rsi=new $s(i=>Zct()),Fsi=new $s(()=>{let i=Zct();return i.code=({text:e})=>` \`\`\` ${e} \`\`\` -`,i});Qgi=3});var qdt=D(()=>{});function Ydt(i,e){let t=e.lineNumber;if(!i.tokenization.isCheapToTokenize(t))return;i.tokenization.forceTokenization(t);let n=i.tokenization.getLineTokens(t),r=n.findTokenIndexAtOffset(e.column-1);return n.getStandardTokenType(r)}var To,Wke,wg=D(()=>{BI();To=class i{static{this.defaultTokenMetadata=(32768|2<<24)>>>0}static createEmpty(e,t){let n=i.defaultTokenMetadata,r=new Uint32Array(2);return r[0]=e.length,r[1]=n,new i(r,e,t)}static createFromTextAndMetadata(e,t){let n=0,r="",o=new Array;for(let{text:s,metadata:a}of e)o.push(n+s.length,a),n+=s.length,r+=s;return new i(new Uint32Array(o),r,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof i?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let r=t<<1,o=r+(n<<1);for(let s=r;s0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){let t=this._tokens[(e<<1)+1],n=Is.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return Is.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return Is.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return Is.getClassNameFromMetadata(t)}getInlineStyle(e,t){let n=this._tokens[(e<<1)+1];return Is.getInlineStyleFromMetadata(n,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return Is.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return i.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new Wke(this,e,t,n)}static convertToEndOffset(e,t){let r=(e.length>>>1)-1;for(let o=0;o>>1)-1;for(;nt&&(r=o)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,r="",o=new Array,s=0;for(;;){let a=ts){r+=this._text.substring(s,l.offset);let c=this._tokens[(t<<1)+1];o.push(r.length,c),s=l.offset}r+=l.text,o.push(r.length,l.tokenMetadata),n++}else break}return new i(new Uint32Array(o),r,this.languageIdCodec)}getTokenText(e){let t=this.getStartOffset(e),n=this.getEndOffset(e);return this._text.substring(t,n)}forEach(e){let t=this.getCount();for(let n=0;n=n);o++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof i?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){let t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){let t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),r=this._source.getEndOffset(t),o=this._source.getTokenText(t);return nthis._endOffset&&(o=o.substring(0,o.length-(r-this._endOffset))),o}forEach(e){for(let t=0;t>>0,new pw(t,e===null?Sy:e)}var Sy,aO=D(()=>{tr();Sy=new class{clone(){return this}equals(i){return this===i}}});async function Xdt(i,e,t){if(!t)return Jdt(e,i.languageIdCodec,Kdt);let n=await Wn.getOrCreate(t);return Jdt(e,i.languageIdCodec,n||Kdt)}function Zdt(i,e,t,n,r,o,s){let a="
    ",l=n,c=0,u=!0;for(let d=0,h=e.getCount();d0;)s&&u?(p+=" ",u=!1):(p+=" ",u=!0),v--;break}case 60:p+="<",u=!1;break;case 62:p+=">",u=!1;break;case 38:p+="&",u=!1;break;case 0:p+="�",u=!1;break;case 65279:case 8232:case 8233:case 133:p+="\uFFFD",u=!1;break;case 13:p+="​",u=!1;break;case 32:s&&u?(p+=" ",u=!1):(p+=" ",u=!0);break;default:p+=String.fromCharCode(g),u=!1}}if(a+=`${p}`,f>r||l>=r)break}return a+="
    ",a}function Jdt(i,e,t){let n='
    ',r=Pu(i),o=t.getInitialState();for(let s=0,a=r.length;s0&&(n+="
    ");let c=t.tokenizeEncoded(l,!0,o);To.convertToEndOffset(c.tokens,l.length);let d=new To(c.tokens,l,e).inflate(),h=0;for(let f=0,p=d.getCount();f${fS(l.substring(h,v))}`,h=v}o=c.endState}return n+="
    ",n}var Kdt,Uke=D(()=>{Pt();wg();tr();aO();Kdt={getInitialState:()=>Sy,tokenizeEncoded:(i,e,t)=>cE(0,t)}});async function Cz(i,e,t){try{return await i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:rbi(t)})}catch(n){return pt(n),!1}}function rbi(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var nbi,$dt,jke,Zh,vx=D(()=>{xz();ay();Lt();et();ae();qdt();qp();Sl();Yf();Uke();vd();nbi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$dt=function(i,e){return function(t,n){e(t,n,i)}},Zh=class{static{jke=this}static{this._ttpTokenizer=fd("tokenizeToString",{createHTML(e){return e}})}constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new G,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let r=new te,o=r.add(aE(e,{...this._getRenderOptions(e,r),...t},n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(n,r)=>{let o;n?o=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(o=this._options.editor.getModel()?.getLanguageId()),o||(o=ps);let s=await Xdt(this._languageService,r,o),a=document.createElement("span");if(a.innerHTML=jke._ttpTokenizer?.createHTML(s)??s,this._options.editor){let l=this._options.editor.getOption(50);mo(a,l)}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(a.style.fontSize=this._options.codeBlockFontSize),a},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Cz(this._openerService,n,e.isTrusted),disposables:t}}}};Zh=jke=nbi([$dt(1,rn),$dt(2,jo)],Zh)});var Cs,GI,oh=D(()=>{Wt();ht();Cs=vt("accessibilityService"),GI=new Pe("accessibilityModeEnabled",!1)});var eht=D(()=>{});function iht(i){qI=document.createElement("div"),qI.className="monaco-aria-container";let e=()=>{let n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),qI.appendChild(n),n};pte=e(),Qke=e();let t=()=>{let n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),qI.appendChild(n),n};mte=t(),Gke=t(),i.appendChild(qI)}function gs(i){qI&&(pte.textContent!==i?(_o(Qke),gte(pte,i)):(_o(pte),gte(Qke,i)))}function yd(i){qI&&(mte.textContent!==i?(_o(Gke),gte(mte,i)):(_o(mte),gte(Gke,i)))}function gte(i,e){_o(i),e.length>tht&&(e=e.substr(0,tht)),i.textContent=e,i.style.visibility="hidden",i.style.visibility="visible"}var tht,qI,pte,Qke,mte,Gke,Yl=D(()=>{Ye();eht();tht=2e4});var obi,Sz,Ey,bte,vte,qke,nht=D(()=>{Kut();ae();et();Ye();Yr();nr();Ks();nO();bg();vd();ht();vx();Ad();Oe();Si();oh();Yl();obi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Sz=function(i,e){return function(t,n){e(t,n,i)}},Ey=we,bte=class extends Ls{get _targetWindow(){return rt(this._target.targetElements[0])}get _targetDocumentElement(){return rt(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,n,r,o,s){super(),this._keybindingService=t,this._configurationService=n,this._openerService=r,this._instantiationService=o,this._accessibilityService=s,this._messageListeners=new te,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new G),this._onRequestLayout=this._register(new G),this._linkHandler=e.linkHandler||(h=>Cz(this._openerService,h,Xh(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new qke(e.target),this._hoverPointer=e.appearance?.showPointer?Ey("div.workbench-hover-pointer"):void 0,this._hover=this._register(new tE),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.appearance?.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=e.position?.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,h=>h.stopPropagation()),this.onkeydown(this._hover.containerDomNode,h=>{h.equals(9)&&this.dispose()}),this._register(re(this._targetWindow,"blur",()=>this.dispose()));let a=Ey("div.hover-row.markdown-hover"),l=Ey("div.hover-contents");if(typeof e.content=="string")l.textContent=e.content,l.style.whiteSpace="pre-wrap";else if(Er(e.content))l.appendChild(e.content),l.classList.add("html-hover-contents");else{let h=e.content,f=this._instantiationService.createInstance(Zh,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||_l.fontFamily}),{element:p}=f.render(h,{actionHandler:{callback:g=>this._linkHandler(g),disposables:this._messageListeners},asyncRenderCallback:()=>{l.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});l.appendChild(p)}if(a.appendChild(l),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){let h=Ey("div.hover-row.status-bar"),f=Ey("div.actions");e.actions.forEach(p=>{let g=this._keybindingService.lookupKeybinding(p.commandId),v=g?g.getLabel():null;iO.render(f,{label:p.label,commandId:p.commandId,run:A=>{p.run(A),this.dispose()},iconClass:p.iconClass},v)}),h.appendChild(f),this._hover.containerDomNode.appendChild(h)}this._hoverContainer=Ey("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let c;if(e.actions&&e.actions.length>0?c=!1:e.persistence?.hideOnHover===void 0?c=typeof e.content=="string"||Xh(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):c=e.persistence.hideOnHover,e.appearance?.showHoverHint){let h=Ey("div.hover-row.status-bar"),f=Ey("div.info");f.textContent=y("hoverhint","Hold {0} key to mouse over",qt?"Option":"Alt"),h.appendChild(f),this._hover.containerDomNode.appendChild(h)}let u=[...this._target.targetElements];c||u.push(this._hoverContainer);let d=this._register(new vte(u));if(this._register(d.onMouseOut(()=>{this._isLocked||this.dispose()})),c){let h=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new vte(h)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=d}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){let n=nF(this._hoverContainer,Ey("div")),r=be(this._hoverContainer,Ey("div"));n.tabIndex=0,r.tabIndex=0,this._register(re(r,"focus",o=>{e.focus(),o.preventDefault()})),this._register(re(n,"focus",o=>{t.focus(),o.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return o}let r=this.findLastFocusableChild(n);if(r)return r}}render(e){e.appendChild(this._hoverContainer);let n=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&nte(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());n&&yd(n),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";let e=u=>{let d=hZ(u),h=u.getBoundingClientRect();return{top:h.top*d,bottom:h.bottom*d,right:h.right*d,left:h.left*d}},t=this._target.targetElements.map(u=>e(u)),{top:n,right:r,bottom:o,left:s}=t[0],a=r-s,l=o-n,c={top:n,right:r,bottom:o,left:s,width:a,height:l,center:{x:s+a/2,y:n+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){let t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;let t=this._hoverPointer?3:0;if(this._forcePosition){let n=t+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-n}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-n}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;let t=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){let n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-n):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");let t=this._hover.containerDomNode.clientWidth,n=Math.round(t/2)-3,r=this._x+n;(re.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};bte=obi([Sz(1,ni),Sz(2,kt),Sz(3,jo),Sz(4,Ne),Sz(5,Cs)],bte);vte=class extends Ls{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new G),this._elements.forEach(t=>this.onmouseover(t,()=>this._onTargetMouseOver(t))),this._elements.forEach(t=>this.onmouseleave(t,()=>this._onTargetMouseLeave(t)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=rt(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(rt(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}},qke=class{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}});var Dl,Ez=D(()=>{(function(i){function e(o,s){if(o.start>=s.end||s.start>=o.end)return{start:0,end:0};let a=Math.max(o.start,s.start),l=Math.min(o.end,s.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}i.intersect=e;function t(o){return o.end-o.start<=0}i.isEmpty=t;function n(o,s){return!t(e(o,s))}i.intersects=n;function r(o,s){let a=[],l={start:o.start,end:Math.min(s.start,o.end)},c={start:Math.max(s.end,o.start),end:o.end};return t(l)||a.push(l),t(c)||a.push(c),a}i.relativeComplement=r})(Dl||(Dl={}))});var rht=D(()=>{});function sbi(i){let e=i;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}function YI(i,e,t){let n=t.mode===uE.ALIGN?t.offset:t.offset+t.size,r=t.mode===uE.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=i-n?n:e<=r?r-e:Math.max(i-e,0):e<=r?r-e:e<=i-n?n:0}var uE,Ate,abi,Yke=D(()=>{FX();Ye();ae();Si();Ez();rht();(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(uE||(uE={}));Ate=class i extends W{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=W.None,this.toDisposeOnSetContainer=W.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=we(".context-view"),Al(this.view),this.setContainer(e,t),this._register(Ve(()=>this.setContainer(null,1)))}setContainer(e,t){this.useFixedPosition=t!==1;let n=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&n===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=we(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let o=document.createElement("style");o.textContent=abi,this.shadowRoot.appendChild(o),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(we("slot"))}else this.container.appendChild(this.view);let r=new te;i.BUBBLE_UP_EVENTS.forEach(o=>{r.add(cn(this.container,o,s=>{this.onDOMEvent(s,!1)}))}),i.BUBBLE_DOWN_EVENTS.forEach(o=>{r.add(cn(this.container,o,s=>{this.onDOMEvent(s,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(e){this.isVisible()&&this.hide(),_o(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",Ul(this.view),this.toDisposeOnClean=e.render(this.view)||W.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Tu&&jR.pointerEvents)){this.hide();return}this.delegate?.layout?.(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(Er(e)){let h=bn(e),f=hZ(e);t={top:h.top*f,left:h.left*f,width:h.width*f,height:h.height*f}}else sbi(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};let n=bc(this.view),r=og(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0,l,c,u=Xk();if(a===0){let h={offset:t.top-u.pageYOffset,size:t.height,position:o===0?0:1},f={offset:t.left,size:t.width,position:s===0?0:1,mode:uE.ALIGN};l=YI(u.innerHeight,r,h)+u.pageYOffset,Dl.intersects({start:l,end:l+r},{start:h.offset,end:h.offset+h.size})&&(f.mode=uE.AVOID),c=YI(u.innerWidth,n,f)}else{let h={offset:t.left,size:t.width,position:s===0?0:1},f={offset:t.top,size:t.height,position:o===0?0:1,mode:uE.ALIGN};c=YI(u.innerWidth,n,h),Dl.intersects({start:c,end:c+n},{start:h.offset,end:h.offset+h.size})&&(f.mode=uE.AVOID),l=YI(u.innerHeight,r,f)+u.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(o===0?"bottom":"top"),this.view.classList.add(s===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let d=bn(this.container);this.view.style.top=`${l-(this.useFixedPosition?bn(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?bn(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){let t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Al(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,rt(e).document.activeElement):t&&!Co(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}},abi=` +`,i});zsi=3});var eut=D(()=>{});function tut(i,e){let t=e.lineNumber;if(!i.tokenization.isCheapToTokenize(t))return;i.tokenization.forceTokenization(t);let n=i.tokenization.getLineTokens(t),o=n.findTokenIndexAtOffset(e.column-1);return n.getStandardTokenType(o)}var Nr,dIe,Fg=D(()=>{AL();Nr=class i{static{this.defaultTokenMetadata=(32768|2<<24)>>>0}static createEmpty(e,t){let n=i.defaultTokenMetadata,o=new Uint32Array(2);return o[0]=e.length,o[1]=n,new i(o,e,t)}static createFromTextAndMetadata(e,t){let n=0,o="",r=new Array;for(let{text:s,metadata:a}of e)r.push(n+s.length,a),n+=s.length,o+=s;return new i(new Uint32Array(r),o,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof i?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let o=t<<1,r=o+(n<<1);for(let s=o;s0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){let t=this._tokens[(e<<1)+1],n=Fs.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return Fs.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return Fs.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return Fs.getClassNameFromMetadata(t)}getInlineStyle(e,t){let n=this._tokens[(e<<1)+1];return Fs.getInlineStyleFromMetadata(n,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return Fs.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return i.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new dIe(this,e,t,n)}static convertToEndOffset(e,t){let o=(e.length>>>1)-1;for(let r=0;r>>1)-1;for(;nt&&(o=r)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,o="",r=new Array,s=0;for(;;){let a=ts){o+=this._text.substring(s,l.offset);let c=this._tokens[(t<<1)+1];r.push(o.length,c),s=l.offset}o+=l.text,r.push(o.length,l.tokenMetadata),n++}else break}return new i(new Uint32Array(r),o,this.languageIdCodec)}getTokenText(e){let t=this.getStartOffset(e),n=this.getEndOffset(e);return this._text.substring(t,n)}forEach(e){let t=this.getCount();for(let n=0;n=n);r++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof i?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){let t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){let t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),o=this._source.getEndOffset(t),r=this._source.getTokenText(t);return nthis._endOffset&&(r=r.substring(0,r.length-(o-this._endOffset))),r}forEach(e){for(let t=0;t>>0,new Lw(t,e===null?Uy:e)}var Uy,$O=D(()=>{ro();Uy=new class{clone(){return this}equals(i){return this===i}}});async function out(i,e,t){if(!t)return nut(e,i.languageIdCodec,iut);let n=await Gn.getOrCreate(t);return nut(e,i.languageIdCodec,n||iut)}function rut(i,e,t,n,o,r,s){let a="
    ",l=n,c=0,u=!0;for(let d=0,h=e.getCount();d0;)s&&u?(p+=" ",u=!1):(p+=" ",u=!0),A--;break}case 60:p+="<",u=!1;break;case 62:p+=">",u=!1;break;case 38:p+="&",u=!1;break;case 0:p+="�",u=!1;break;case 65279:case 8232:case 8233:case 133:p+="\uFFFD",u=!1;break;case 13:p+="​",u=!1;break;case 32:s&&u?(p+=" ",u=!1):(p+=" ",u=!0);break;default:p+=String.fromCharCode(g),u=!1}}if(a+=`${p}`,f>o||l>=o)break}return a+="
    ",a}function nut(i,e,t){let n='
    ',o=Uu(i),r=t.getInitialState();for(let s=0,a=o.length;s0&&(n+="
    ");let c=t.tokenizeEncoded(l,!0,r);Nr.convertToEndOffset(c.tokens,l.length);let d=new Nr(c.tokens,l,e).inflate(),h=0;for(let f=0,p=d.getCount();f${PS(l.substring(h,A))}`,h=A}r=c.endState}return n+="
    ",n}var iut,hIe=D(()=>{Rt();Fg();ro();$O();iut={getInitialState:()=>Uy,tokenizeEncoded:(i,e,t)=>ME(0,t)}});async function tH(i,e,t){try{return await i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Zsi(t)})}catch(n){return ft(n),!1}}function Zsi(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var Xsi,sut,fIe,df,Ux=D(()=>{eH();Sy();Tt();et();de();eut();um();Il();sp();hIe();Dd();Xsi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},sut=function(i,e){return function(t,n){e(t,n,i)}},df=class{static{fIe=this}static{this._ttpTokenizer=xd("tokenizeToString",{createHTML(e){return e}})}constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new q,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let o=new se,r=o.add(LE(e,{...this._getRenderOptions(e,o),...t},n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>o.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(n,o)=>{let r;n?r=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(r=this._options.editor.getModel()?.getLanguageId()),r||(r=fs);let s=await out(this._languageService,o,r),a=document.createElement("span");if(a.innerHTML=fIe._ttpTokenizer?.createHTML(s)??s,this._options.editor){let l=this._options.editor.getOption(50);vr(a,l)}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(a.style.fontSize=this._options.codeBlockFontSize),a},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>tH(this._openerService,n,e.isTrusted),disposables:t}}}};df=fIe=Xsi([sut(1,on),sut(2,Qr)],df)});var Es,EL,fh=D(()=>{Bt();ht();Es=At("accessibilityService"),EL=new ze("accessibilityModeEnabled",!1)});var aut=D(()=>{});function cut(i){DL=document.createElement("div"),DL.className="monaco-aria-container";let e=()=>{let n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),DL.appendChild(n),n};Oie=e(),pIe=e();let t=()=>{let n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),DL.appendChild(n),n};Pie=t(),mIe=t(),i.appendChild(DL)}function ms(i){DL&&(Oie.textContent!==i?(Tr(pIe),Bie(Oie,i)):(Tr(Oie),Bie(pIe,i)))}function kd(i){DL&&(Pie.textContent!==i?(Tr(mIe),Bie(Pie,i)):(Tr(Pie),Bie(mIe,i)))}function Bie(i,e){Tr(i),e.length>lut&&(e=e.substr(0,lut)),i.textContent=e,i.style.visibility="hidden",i.style.visibility="visible"}var lut,DL,Oie,pIe,Pie,mIe,Zl=D(()=>{Ye();aut();lut=2e4});var $si,nH,jy,zie,Vie,gIe,uut=D(()=>{ict();de();et();Ye();Xo();ao();ea();KO();Lg();Dd();ht();Ux();Td();Be();wi();fh();Zl();$si=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},nH=function(i,e){return function(t,n){e(t,n,i)}},jy=xe,zie=class extends Os{get _targetWindow(){return rt(this._target.targetElements[0])}get _targetDocumentElement(){return rt(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,n,o,r,s){super(),this._keybindingService=t,this._configurationService=n,this._openerService=o,this._instantiationService=r,this._accessibilityService=s,this._messageListeners=new se,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new q),this._onRequestLayout=this._register(new q),this._linkHandler=e.linkHandler||(h=>tH(this._openerService,h,uf(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new gIe(e.target),this._hoverPointer=e.appearance?.showPointer?jy("div.workbench-hover-pointer"):void 0,this._hover=this._register(new SE),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.appearance?.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=e.position?.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,h=>h.stopPropagation()),this.onkeydown(this._hover.containerDomNode,h=>{h.equals(9)&&this.dispose()}),this._register(ce(this._targetWindow,"blur",()=>this.dispose()));let a=jy("div.hover-row.markdown-hover"),l=jy("div.hover-contents");if(typeof e.content=="string")l.textContent=e.content,l.style.whiteSpace="pre-wrap";else if(To(e.content))l.appendChild(e.content),l.classList.add("html-hover-contents");else{let h=e.content,f=this._instantiationService.createInstance(df,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||kl.fontFamily}),{element:p}=f.render(h,{actionHandler:{callback:g=>this._linkHandler(g),disposables:this._messageListeners},asyncRenderCallback:()=>{l.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});l.appendChild(p)}if(a.appendChild(l),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){let h=jy("div.hover-row.status-bar"),f=jy("div.actions");e.actions.forEach(p=>{let g=this._keybindingService.lookupKeybinding(p.commandId),A=g?g.getLabel():null;YO.render(f,{label:p.label,commandId:p.commandId,run:v=>{p.run(v),this.dispose()},iconClass:p.iconClass},A)}),h.appendChild(f),this._hover.containerDomNode.appendChild(h)}this._hoverContainer=jy("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let c;if(e.actions&&e.actions.length>0?c=!1:e.persistence?.hideOnHover===void 0?c=typeof e.content=="string"||uf(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):c=e.persistence.hideOnHover,e.appearance?.showHoverHint){let h=jy("div.hover-row.status-bar"),f=jy("div.info");f.textContent=y("hoverhint","Hold {0} key to mouse over",jt?"Option":"Alt"),h.appendChild(f),this._hover.containerDomNode.appendChild(h)}let u=[...this._target.targetElements];c||u.push(this._hoverContainer);let d=this._register(new Vie(u));if(this._register(d.onMouseOut(()=>{this._isLocked||this.dispose()})),c){let h=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Vie(h)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=d}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){let n=KF(this._hoverContainer,jy("div")),o=Ae(this._hoverContainer,jy("div"));n.tabIndex=0,o.tabIndex=0,this._register(ce(o,"focus",r=>{e.focus(),r.preventDefault()})),this._register(ce(n,"focus",r=>{t.focus(),r.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return r}let o=this.findLastFocusableChild(n);if(o)return o}}render(e){e.appendChild(this._hoverContainer);let n=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&Sie(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());n&&kd(n),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";let e=u=>{let d=R$(u),h=u.getBoundingClientRect();return{top:h.top*d,bottom:h.bottom*d,right:h.right*d,left:h.left*d}},t=this._target.targetElements.map(u=>e(u)),{top:n,right:o,bottom:r,left:s}=t[0],a=o-s,l=r-n,c={top:n,right:o,bottom:r,left:s,width:a,height:l,center:{x:s+a/2,y:n+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){let t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;let t=this._hoverPointer?3:0;if(this._forcePosition){let n=t+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-n}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-n}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;let t=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){let n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-n):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");let t=this._hover.containerDomNode.clientWidth,n=Math.round(t/2)-3,o=this._x+n;(oe.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};zie=$si([nH(1,Xt),nH(2,Et),nH(3,Qr),nH(4,Re),nH(5,Es)],zie);Vie=class extends Os{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new q),this._elements.forEach(t=>this.onmouseover(t,()=>this._onTargetMouseOver(t))),this._elements.forEach(t=>this.onmouseleave(t,()=>this._onTargetMouseLeave(t)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=rt(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(rt(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}},gIe=class{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}});var Nl,oH=D(()=>{(function(i){function e(r,s){if(r.start>=s.end||s.start>=r.end)return{start:0,end:0};let a=Math.max(r.start,s.start),l=Math.min(r.end,s.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}i.intersect=e;function t(r){return r.end-r.start<=0}i.isEmpty=t;function n(r,s){return!t(e(r,s))}i.intersects=n;function o(r,s){let a=[],l={start:r.start,end:Math.min(s.start,r.end)},c={start:Math.max(s.end,r.start),end:r.end};return t(l)||a.push(l),t(c)||a.push(c),a}i.relativeComplement=o})(Nl||(Nl={}))});var dut=D(()=>{});function eai(i){let e=i;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}function TL(i,e,t){let n=t.mode===RE.ALIGN?t.offset:t.offset+t.size,o=t.mode===RE.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=i-n?n:e<=o?o-e:Math.max(i-e,0):e<=o?o-e:e<=i-n?n:0}var RE,Hie,tai,bIe=D(()=>{n$();Ye();de();wi();oH();dut();(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(RE||(RE={}));Hie=class i extends H{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=H.None,this.toDisposeOnSetContainer=H.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=xe(".context-view"),_l(this.view),this.setContainer(e,t),this._register(He(()=>this.setContainer(null,1)))}setContainer(e,t){this.useFixedPosition=t!==1;let n=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&n===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=xe(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let r=document.createElement("style");r.textContent=tai,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(xe("slot"))}else this.container.appendChild(this.view);let o=new se;i.BUBBLE_UP_EVENTS.forEach(r=>{o.add(un(this.container,r,s=>{this.onDOMEvent(s,!1)}))}),i.BUBBLE_DOWN_EVENTS.forEach(r=>{o.add(un(this.container,r,s=>{this.onDOMEvent(s,!0)},!0))}),this.toDisposeOnSetContainer=o}}show(e){this.isVisible()&&this.hide(),Tr(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",ql(this.view),this.toDisposeOnClean=e.render(this.view)||H.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Ou&&OF.pointerEvents)){this.hide();return}this.delegate?.layout?.(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(To(e)){let h=bn(e),f=R$(e);t={top:h.top*f,left:h.left*f,width:h.width*f,height:h.height*f}}else eai(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};let n=Cc(this.view),o=vg(this.view),r=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0,l,c,u=LI();if(a===0){let h={offset:t.top-u.pageYOffset,size:t.height,position:r===0?0:1},f={offset:t.left,size:t.width,position:s===0?0:1,mode:RE.ALIGN};l=TL(u.innerHeight,o,h)+u.pageYOffset,Nl.intersects({start:l,end:l+o},{start:h.offset,end:h.offset+h.size})&&(f.mode=RE.AVOID),c=TL(u.innerWidth,n,f)}else{let h={offset:t.left,size:t.width,position:s===0?0:1},f={offset:t.top,size:t.height,position:r===0?0:1,mode:RE.ALIGN};c=TL(u.innerWidth,n,h),Nl.intersects({start:c,end:c+n},{start:h.offset,end:h.offset+h.size})&&(f.mode=RE.AVOID),l=TL(u.innerHeight,o,f)+u.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(s===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let d=bn(this.container);this.view.style.top=`${l-(this.useFixedPosition?bn(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?bn(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){let t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),_l(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,rt(e).document.activeElement):t&&!Dr(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}},tai=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @@ -429,18 +429,18 @@ ${e} :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } -`});var lbi,cbi,Dz,yte,Kke=D(()=>{Yke();ae();hx();Ye();lbi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},cbi=function(i,e){return function(t,n){e(t,n,i)}},Dz=class extends W{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new Ate(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,n){let r;t?t===this.layoutService.getContainer(rt(t))?r=1:n?r=3:r=2:r=1,this.contextView.setContainer(t??this.layoutService.activeContainer,r),this.contextView.show(e);let o={close:()=>{this.openContextView===o&&this.hideContextView()}};return this.openContextView=o,o}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Dz=lbi([cbi(0,Kh)],Dz);yte=class extends Dz{getContextViewElement(){return this.contextView.getViewElement()}}});var wte,oht=D(()=>{Ye();sn();Ad();gn();Oe();wte=class{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}async update(e,t,n){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let r;if(e===void 0||Ea(e)||Er(e))r=e;else if(!S_(e.markdown))r=e.markdown??e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(y("iconLabel.loading","Loading..."),t,n),this._cancellationTokenSource=new Bi;let o=this._cancellationTokenSource.token;if(r=await e.markdown(o),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||o.isCancellationRequested)return}this.show(r,t,n)}show(e,t,n){let r=this._hoverWidget;if(this.hasContent(e)){let o={content:e,target:this.target,actions:n?.actions,linkHandler:n?.linkHandler,trapFocus:n?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!r,showHoverHint:n?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(o,t)}r?.dispose()}hasContent(e){return e?Xh(e)?!!e.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}});function sht(i){if(i!==void 0)return i?.id??i}function aht(i,e){for(e=e??rt(i).document.body;!i.hasAttribute("custom-hover")&&i!==e;)i=i.parentElement;return i}var ubi,Tz,Jke,Xke,lht=D(()=>{wc();Zn();eo();px();bd();ht();nht();ae();Ye();Yr();gc();oh();hx();ad();Kke();oht();Jt();ubi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Tz=function(i,e){return function(t,n){e(t,n,i)}},Jke=class extends W{constructor(e,t,n,r,o){super(),this._instantiationService=e,this._keybindingService=n,this._layoutService=r,this._accessibilityService=o,this._managedHovers=new Map,t.onDidShowContextMenu(()=>this.hideHover()),this._contextViewHandler=this._register(new Dz(this._layoutService))}showHover(e,t,n){if(sht(this._currentHoverOptions)===sht(e)||this._currentHover&&this._currentHoverOptions?.persistence?.sticky)return;this._currentHoverOptions=e,this._lastHoverOptions=e;let r=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),o=hs();n||(r&&o?o.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=o):this._lastFocusedElementBeforeOpen=void 0);let s=new te,a=this._instantiationService.createInstance(bte,e);if(e.persistence?.sticky&&(a.isLocked=!0),a.onDispose(()=>{this._currentHover?.domNode&&mZ(this._currentHover.domNode)&&this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),s.dispose()},void 0,s),!e.container){let l=Er(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(rt(l))}if(this._contextViewHandler.showContextView(new Xke(a,t),e.container),a.onRequestLayout(()=>this._contextViewHandler.layout(),void 0,s),e.persistence?.sticky)s.add(re(rt(e.container).document,De.MOUSE_DOWN,l=>{Co(l.target,a.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(let c of e.target.targetElements)s.add(re(c,De.CLICK,()=>this.hideHover()));else s.add(re(e.target,De.CLICK,()=>this.hideHover()));let l=hs();if(l){let c=rt(l).document;s.add(re(l,De.KEY_DOWN,u=>this._keyDown(u,a,!!e.persistence?.hideOnKeyDown))),s.add(re(c,De.KEY_DOWN,u=>this._keyDown(u,a,!!e.persistence?.hideOnKeyDown))),s.add(re(l,De.KEY_UP,u=>this._keyUp(u,a))),s.add(re(c,De.KEY_UP,u=>this._keyUp(u,a)))}}if("IntersectionObserver"in Xi){let l=new IntersectionObserver(u=>this._intersectionChange(u,a),{threshold:0}),c="targetElements"in e.target?e.target.targetElements[0]:e.target;l.observe(c),s.add(Ve(()=>l.disconnect()))}return this._currentHover=a,a}hideHover(){this._currentHover?.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,n){if(e.key==="Alt"){t.isLocked=!0;return}let r=new Wi(e);this._keybindingService.resolveKeyboardEvent(r).getSingleModifierDispatchChords().some(s=>!!s)||this._keybindingService.softDispatch(r,r.target).kind!==0||n&&(!this._currentHoverOptions?.trapFocus||e.key!=="Tab")&&(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(e,t){e.key==="Alt"&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}setupManagedHover(e,t,n,r){t.setAttribute("custom-hover","true"),t.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");let o,s,a=(C,_)=>{let E=s!==void 0;C&&(s?.dispose(),s=void 0),_&&(o?.dispose(),o=void 0),E&&(e.onDidHideHover?.(),s=void 0)},l=(C,_,E,I)=>new oa(async()=>{(!s||s.isDisposed)&&(s=new wte(e,E||t,C>0),await s.update(typeof n=="function"?n():n,_,{...r,trapFocus:I}))},C),c=!1,u=re(t,De.MOUSE_DOWN,()=>{c=!0,a(!0,!0)},!0),d=re(t,De.MOUSE_UP,()=>{c=!1},!0),h=re(t,De.MOUSE_LEAVE,C=>{c=!1,a(!1,C.fromElement===t)},!0),f=C=>{if(o)return;let _=new te,E={targetElements:[t],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){let I=T=>{E.x=T.x+10,Er(T.target)&&aht(T.target,t)!==t&&a(!0,!0)};_.add(re(t,De.MOUSE_MOVE,I,!0))}o=_,!(Er(C.target)&&aht(C.target,t)!==t)&&_.add(l(e.delay,!1,E))},p=re(t,De.MOUSE_OVER,f,!0),g=()=>{if(c||o)return;let C={targetElements:[t],dispose:()=>{}},_=new te,E=()=>a(!0,!0);_.add(re(t,De.BLUR,E,!0)),_.add(l(e.delay,!1,C)),o=_},v,A=t.tagName.toLowerCase();A!=="input"&&A!=="textarea"&&(v=re(t,De.FOCUS,g,!0));let w={show:C=>{a(!1,!0),l(0,C,void 0,C)},hide:()=>{a(!0,!0)},update:async(C,_)=>{n=C,await s?.update(n,void 0,_)},dispose:()=>{this._managedHovers.delete(t),p.dispose(),h.dispose(),u.dispose(),d.dispose(),v?.dispose(),a(!0,!0)}};return this._managedHovers.set(t,w),w}showManagedHover(e){let t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};Jke=ubi([Tz(0,Ne),Tz(1,Xs),Tz(2,ni),Tz(3,Kh),Tz(4,Cs)],Jke);Xke=class{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}};ui(nh,Jke,1);ua((i,e)=>{let t=i.getColor(LZ);t&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))})});var Dy,lO,dE,xte,KI=D(()=>{ht();mn();gn();Dy=vt("IWorkspaceEditService"),lO=class{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(dE.is(t))return dE.lift(t);if(xte.is(t))return xte.lift(t);throw new Error("Unsupported edit")})}},dE=class i extends lO{static is(e){return e instanceof i?!0:Fo(e)&&Xe.isUri(e.resource)&&Fo(e.textEdit)}static lift(e){return e instanceof i?e:new i(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,r){super(r),this.resource=e,this.textEdit=t,this.versionId=n}},xte=class i extends lO{static is(e){return e instanceof i?!0:Fo(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof i?e:new i(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},r){super(r),this.oldResource=e,this.newResource=t,this.options=n}}});var Kl,Zke=D(()=>{Kl={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}});function dbi(i){return typeof i.type<"u"||typeof i.anyOf<"u"}function cht(){return Cte===null&&(Cte=Object.create(null),Object.keys(_te.properties).forEach(i=>{Cte[i]=!0})),Cte}function uht(i){return cht()[`editor.${i}`]||!1}function dht(i){return cht()[`diffEditor.${i}`]||!1}var JI,_te,Cte,hbi,Ste=D(()=>{Zke();Ks();y7();Oe();cy();sa();JI=Object.freeze({id:"editor",order:5,type:"object",title:y("editorConfigurationTitle","Editor"),scope:5}),_te={...JI,properties:{"editor.tabSize":{type:"number",default:xl.tabSize,minimum:1,markdownDescription:y("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:y("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:xl.insertSpaces,markdownDescription:y("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:xl.detectIndentation,markdownDescription:y("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:xl.trimAutoWhitespace,description:y("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:xl.largeFileOptimizations,description:y("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[y("wordBasedSuggestions.off","Turn off Word Based Suggestions."),y("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),y("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),y("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:y("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[y("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),y("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),y("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:y("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:y("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:y("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:y("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:y("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:y("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:y("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:y("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:y("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:y("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:y("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:y("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:y("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:Kl.maxComputationTime,description:y("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:Kl.maxFileSize,description:y("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:Kl.renderSideBySide,description:y("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:Kl.renderSideBySideInlineBreakpoint,description:y("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:Kl.useInlineViewWhenSpaceIsLimited,description:y("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:Kl.renderMarginRevertIcon,description:y("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:Kl.renderGutterMenu,description:y("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:Kl.ignoreTrimWhitespace,description:y("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:Kl.renderIndicators,description:y("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:Kl.diffCodeLens,description:y("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:Kl.diffWordWrap,markdownEnumDescriptions:[y("wordWrap.off","Lines will never wrap."),y("wordWrap.on","Lines will wrap at the viewport width."),y("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:Kl.diffAlgorithm,markdownEnumDescriptions:[y("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),y("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:Kl.hideUnchangedRegions.enabled,markdownDescription:y("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:Kl.hideUnchangedRegions.revealLineCount,markdownDescription:y("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:Kl.hideUnchangedRegions.minimumLineCount,markdownDescription:y("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:Kl.hideUnchangedRegions.contextLineCount,markdownDescription:y("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:Kl.experimental.showMoves,markdownDescription:y("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:Kl.experimental.showEmptyDecorations,description:y("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:Kl.experimental.useTrueInlineView,description:y("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};for(let i of NS){let e=i.schema;if(typeof e<"u")if(dbi(e))_te.properties[`editor.${i.name}`]=e;else for(let t in e)Object.hasOwnProperty.call(e,t)&&(_te.properties[t]=e[t])}Cte=null;hbi=Gi.as(xc.Configuration);hbi.registerConfiguration(_te)});var Dn,$p=D(()=>{We();Dn=class{static insert(e,t){return{range:new N(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}});function Ete(i){return Object.isFrozen(i)?i:Ilt(i)}var wd,$ke,eIe,kz,Dte,tIe=D(()=>{Qt();ql();Xd();gn();mn();nr();cy();sa();wd=class i{static createEmptyModel(e){return new i({},[],[],void 0,e)}constructor(e,t,n,r,o){this._contents=e,this._keys=t,this._overrides=n,this.raw=r,this.logService=o,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){let e=this.raw.map(t=>{if(t instanceof i)return t;let n=new $ke("",this.logService);return n.parseRaw(t),n.configurationModel});this._rawConfiguration=e.reduce((t,n)=>n===t?n:t.merge(n),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?qDe(this.contents,e):this.contents}inspect(e,t){let n=this;return{get value(){return Ete(n.rawConfiguration.getValue(e))},get override(){return t?Ete(n.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Ete(t?n.rawConfiguration.override(t).getValue(e):n.rawConfiguration.getValue(e))},get overrides(){let r=[];for(let{contents:o,identifiers:s,keys:a}of n.rawConfiguration.overrides){let l=new i(o,a,[],void 0,n.logService).getValue(e);l!==void 0&&r.push({identifiers:s,value:l})}return r.length?Ete(r):void 0}}}getOverrideValue(e,t){let n=this.getContentsForOverrideIdentifer(t);return n?e?qDe(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){let t=Bb(this.contents),n=Bb(this.overrides),r=[...this.keys],o=this.raw?.length?[...this.raw]:[this];for(let s of e)if(o.push(...s.raw?.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(t,s.contents);for(let a of s.overrides){let[l]=n.filter(c=>Zi(c.identifiers,a.identifiers));l?(this.mergeContents(l.contents,a.contents),l.keys.push(...a.keys),l.keys=Uh(l.keys)):n.push(Bb(a))}for(let a of s.keys)r.indexOf(a)===-1&&r.push(a)}return new i(t,r,n,o.every(s=>s instanceof i)?void 0:o,this.logService)}createOverrideConfigurationModel(e){let t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let n={};for(let r of Uh([...Object.keys(this.contents),...Object.keys(t)])){let o=this.contents[r],s=t[r];s&&(typeof o=="object"&&typeof s=="object"?(o=Bb(o),this.mergeContents(o,s)):o=s),n[r]=o}return new i(n,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(let n of Object.keys(t)){if(n in e&&Fo(e[n])&&Fo(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=Bb(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null,r=o=>{o&&(n?this.mergeContents(n,o):n=Bb(o))};for(let o of this.overrides)o.identifiers.length===1&&o.identifiers[0]===e?t=o.contents:o.identifiers.includes(e)&&r(o.contents);return r(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){let t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),hct(this.contents,e),ox.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>Zi(n.identifiers,P7(e))),1))}updateValue(e,t,n){if(GDe(this.contents,e,t,r=>this.logService.error(r)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),ox.test(e)){let r=P7(e),o={identifiers:r,keys:Object.keys(this.contents[e]),contents:V$(this.contents[e],a=>this.logService.error(a))},s=this.overrides.findIndex(a=>Zi(a.identifiers,r));s!==-1?this.overrides[s]=o:this.overrides.push(o)}}},$ke=class{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||wd.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;let{contents:n,keys:r,overrides:o,restricted:s,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new wd(n,r,o,a?[e]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseRaw(e,t){let n=Gi.as(xc.Configuration).getConfigurationProperties(),r=this.filter(e,n,!0,t);e=r.raw;let o=V$(e,l=>this.logService.error(`Conflict in settings file ${this._name}: ${l}`)),s=Object.keys(e),a=this.toOverrides(e,l=>this.logService.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:o,keys:s,overrides:a,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(e,t,n,r){let o=!1;if(!r?.scopes&&!r?.skipRestricted&&!r?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:o};let s={},a=[];for(let l in e)if(ox.test(l)&&n){let c=this.filter(e[l],t,!1,r);s[l]=c.raw,o=o||c.hasExcludedProperties,a.push(...c.restricted)}else{let c=t[l],u=c?typeof c.scope<"u"?c.scope:3:void 0;c?.restricted&&a.push(l),!r.exclude?.includes(l)&&(r.include?.includes(l)||(u===void 0||r.scopes===void 0||r.scopes.includes(u))&&!(r.skipRestricted&&c?.restricted))?s[l]=e[l]:o=!0}return{raw:s,restricted:a,hasExcludedProperties:o}}toOverrides(e,t){let n=[];for(let r of Object.keys(e))if(ox.test(r)){let o={};for(let s in e[r])o[s]=e[r][s];n.push({identifiers:P7(r),keys:Object.keys(o),contents:V$(o,t)})}return n}},eIe=class{constructor(e,t,n,r,o,s,a,l,c,u,d,h,f){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=r,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=u,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=f}toInspectValue(e){return e?.value!==void 0||e?.override!==void 0||e?.overrides!==void 0?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}},kz=class i{constructor(e,t,n,r,o,s,a,l,c,u){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=r,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this.logService=u,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new ms,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let r;n.resource?(r=this._memoryConfigurationByResource.get(n.resource),r||(r=wd.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(n.resource,r))):r=this._memoryConfiguration,t===void 0?r.removeValue(e):r.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){let r=this.getConsolidatedConfigurationModel(e,t,n),o=this.getFolderConfigurationModelForResource(t.resource,n),s=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of r.overrides)for(let c of l.identifiers)r.getOverrideValue(e,c)!==void 0&&a.add(c);return new eIe(e,t,r.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let r=this.getConsolidatedConfigurationModelForResource(t,n);return t.overrideIdentifier&&(r=r.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(r=r.merge(this._policyConfiguration)),r}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){let r=t.getFolder(e);r&&(n=this.getFolderConsolidatedConfiguration(r.uri)||n);let o=this._memoryConfigurationByResource.get(e);o&&(n=n.merge(o))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){let n=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(e);r?(t=n.merge(r),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){let n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{let{contents:n,overrides:r,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:r,keys:o}]),e},[])}}static parse(e,t){let n=this.parseConfigurationModel(e.defaults,t),r=this.parseConfigurationModel(e.policy,t),o=this.parseConfigurationModel(e.application,t),s=this.parseConfigurationModel(e.user,t),a=this.parseConfigurationModel(e.workspace,t),l=e.folders.reduce((c,u)=>(c.set(Xe.revive(u[0]),this.parseConfigurationModel(u[1],t)),c),new ms);return new i(n,r,o,s,wd.createEmptyModel(t),a,l,wd.createEmptyModel(t),new ms,t)}static parseConfigurationModel(e,t){return new wd(e.contents,e.keys,e.overrides,void 0,t)}},Dte=class{constructor(e,t,n,r,o){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=r,this.logService=o,this._marker=` -`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(let s of e.keys)this.affectedKeys.add(s);for(let[,s]of e.overrides)for(let a of s)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(let s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=kz.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){let n=this._marker+e,r=this._affectsConfigStr.indexOf(n);if(r<0)return!1;let o=r+n.length;if(o>=this._affectsConfigStr.length)return!1;let s=this._affectsConfigStr.charCodeAt(o);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(t){let a=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!wl(a,l)}return!0}}});var iIe,XI,nIe=D(()=>{et();iIe=class{constructor(){this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}},XI=new iIe});function pbi(i,e,t){return{kind:2,commandId:i,commandArgs:e,isBubble:t}}function hht(i){return i?`${i.serialize()}`:"no when condition"}function fht(i){return i.extensionId?i.isBuiltinExtension?`built-in extension ${i.extensionId}`:`user extension ${i.extensionId}`:i.isDefault?"built-in":"user"}var Iz,fbi,Tte,rIe=D(()=>{Wt();Iz={kind:0},fbi={kind:1};Tte=class i{constructor(e,t,n){this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let r of e){let o=r.command;o&&o.charAt(0)!=="-"&&this._defaultBoundCommands.set(o,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=i.handleRemovals([].concat(e).concat(t));for(let r=0,o=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let r=n.length-1;r>=0;r--){let o=n[r];if(o.command===t.command)continue;let s=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,r=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let r=n.length-1;r>=0;r--){let o=n[r];if(t.contextMatchesRules(o.when))return o}return n[n.length-1]}resolve(e,t,n){let r=[...t,n];this._log(`| Resolving ${r}`);let o=this._map.get(r[0]);if(o===void 0)return this._log("\\ No keybinding entries."),Iz;let s=null;if(r.length<2)s=o;else{s=[];for(let l=0,c=o.length;lu.chords.length)continue;let d=!0;for(let h=1;h=0;n--){let r=t[n];if(i._contextMatchesRules(e,r.when))return r}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}});var mbi,kte,cO,pht=D(()=>{Jt();Lt();et();nIe();ae();Oe();rIe();mbi=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/,kte=class extends W{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Se.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,r,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=r,this._logService=o,this._onDidUpdateKeybindings=this._register(new G),this._currentChords=[],this._currentChordChecker=new hS,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=cO.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new oa,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){let n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");let n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),Iz;let[r]=n.getDispatchChords();if(r===null)return this._log("\\ Keyboard event cannot be dispatched"),Iz;let o=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:a})=>a));return this._getResolver().resolve(o,s,r)}_scheduleLeaveChordMode(){let e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw MM("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(y("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{let n=this._currentChords.map(({label:r})=>r).join(", ");this._currentChordStatusMessage=this._notificationService.status(y("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),XI.enabled&&XI.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],XI.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){let n=this.resolveKeyboardEvent(e),[r]=n.getSingleModifierDispatchChords();if(r)return this._ignoreSingleModifiers.has(r)?(this._log(`+ Ignoring single modifier ${r} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=cO.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=cO.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${r}.`),this._currentSingleModifier=r,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):r===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${r} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));let[o]=n.getChords();return this._ignoreSingleModifiers=new cO(o),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){let r=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,s=null;if(n){let[u]=e.getSingleModifierDispatchChords();o=u,s=u?[u]:[]}else[o]=e.getDispatchChords(),s=this._currentChords.map(({keypress:u})=>u);if(o===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;let a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,s,o);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){let u=this._currentChords.map(({label:d})=>d).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(y("missing.chord","The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}return r}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),r=!0,this._expectAnotherChord(o,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),r;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){let u=this._currentChords.map(({label:d})=>d).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(y("missing.chord","The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}}else{this.inChordMode&&this._leaveChordMode(),c.isBubble||(r=!0),this._log(`+ Invoking command ${c.commandId}.`),this._currentlyDispatchingCommandId=c.commandId;try{typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u))}finally{this._currentlyDispatchingCommandId=null}mbi.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return r}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}},cO=class i{static{this.EMPTY=new i(null)}constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}});function Ite(i){let e=[];for(let t=0,n=i.length;t{Lz=class{constructor(e,t,n,r,o,s,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Ite(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=Ite(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=r,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=a}}});function gbi(i,e,t){if(e===null)return"";let n=[];return i.ctrlKey&&n.push(t.ctrlKey),i.shiftKey&&n.push(t.shiftKey),i.altKey&&n.push(t.altKey),i.metaKey&&n.push(t.metaKey),e!==""&&n.push(e),n.join(t.separator)}var uO,dO,mht,ght,bht,Lte=D(()=>{Oe();uO=class{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(t.length===0)return null;let r=[];for(let o=0,s=t.length;o{Lt();Lte();Wk();Nte=class extends BX{constructor(e,t){if(super(),t.length===0)throw dc("chords");this._os=e,this._chords=t}getLabel(){return dO.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return mht.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:ght.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return bht.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new PX(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}});var Nz,Aht=D(()=>{Ep();Wk();vht();oIe();Nz=class i extends Nte{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return lb.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":lb.toString(e.keyCode)}_getElectronAccelerator(e){return lb.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";let t=lb.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return i.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=lb.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){let t=sY[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof $m)return e;let t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new $m(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){let n=Ite(e.chords.map(r=>this._toKeyCodeChord(r)));return n.length>0?[new i(n,t)]:[]}}});var mv,hO=D(()=>{ht();mv=vt("labelService")});var Mte,ssn,Zf,$f,Qb=D(()=>{ht();Mte=vt("progressService"),ssn=Object.freeze({total(){},worked(){},done(){}}),Zf=class{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}},$f=vt("editorProgressService")});var sIe,aIe,lIe,cIe,fO,ZI,Rte=D(()=>{Pt();sIe=class{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){let n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new i(new cIe(e,t))}static forStrings(){return new i(new sIe)}static forConfigKeys(){return new i(new aIe)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){let n=this._iter.reset(e),r;this._root||(this._root=new fO,this._root.segment=n.value());let o=[];for(r=this._root;;){let a=n.cmp(r.segment);if(a>0)r.left||(r.left=new fO,r.left.segment=n.value()),o.push([-1,r]),r=r.left;else if(a<0)r.right||(r.right=new fO,r.right.segment=n.value()),o.push([1,r]),r=r.right;else if(n.hasNext())n.next(),r.mid||(r.mid=new fO,r.mid.segment=n.value()),o.push([0,r]),r=r.mid;else break}let s=r.value;r.value=t,r.key=e;for(let a=o.length-1;a>=0;a--){let l=o[a][1];l.updateHeight();let c=l.balanceFactor();if(c<-1||c>1){let u=o[a][0],d=o[a+1][0];if(u===1&&d===1)o[a][1]=l.rotateLeft();else if(u===-1&&d===-1)o[a][1]=l.rotateRight();else if(u===1&&d===-1)l.right=o[a+1][1]=o[a+1][1].rotateRight(),o[a][1]=l.rotateLeft();else if(u===-1&&d===1)l.left=o[a+1][1]=o[a+1][1].rotateLeft(),o[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(o[a-1][0]){case-1:o[a-1][1].left=o[a][1];break;case 1:o[a-1][1].right=o[a][1];break;case 0:o[a-1][1].mid=o[a][1];break}else this._root=o[0][1]}}return s}get(e){return this._getNode(e)?.value}_getNode(e){let t=this._iter.reset(e),n=this._root;for(;n;){let r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){let t=this._getNode(e);return!(t?.value===void 0&&t?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){let n=this._iter.reset(e),r=[],o=this._root;for(;o;){let s=n.cmp(o.segment);if(s>0)r.push([-1,o]),o=o.left;else if(s<0)r.push([1,o]),o=o.right;else if(n.hasNext())n.next(),r.push([0,o]),o=o.mid;else break}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){let s=this._min(o.right);if(s.key){let{key:a,value:l,segment:c}=s;this._delete(s.key,!1),o.key=a,o.value=l,o.segment=c}}else{let s=o.left??o.right;if(r.length>0){let[a,l]=r[r.length-1];switch(a){case-1:l.left=s;break;case 0:l.mid=s;break;case 1:l.right=s;break}}else this._root=s}for(let s=r.length-1;s>=0;s--){let a=r[s][1];a.updateHeight();let l=a.balanceFactor();if(l>1?(a.right.balanceFactor()>=0||(a.right=a.right.rotateRight()),r[s][1]=a.rotateLeft()):l<-1&&(a.left.balanceFactor()<=0||(a.left=a.left.rotateLeft()),r[s][1]=a.rotateRight()),s>0)switch(r[s-1][0]){case-1:r[s-1][1].left=r[s][1];break;case 1:r[s-1][1].right=r[s][1];break;case 0:r[s-1][1].mid=r[s][1];break}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){let t=this._iter.reset(e),n=this._root,r;for(;n;){let o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(t.hasNext())t.next(),r=n.value||r,n=n.mid;else break}return n&&n.value||r}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){let n=this._iter.reset(e),r=this._root;for(;r;){let o=n.cmp(r.segment);if(o>0)r=r.left;else if(o<0)r=r.right;else if(n.hasNext())n.next(),r=r.mid;else return r.mid?this._entries(r.mid):t?r.value:void 0}}forEach(e){for(let[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}});function Ote(i){let e=i;return typeof e?.id=="string"&&Xe.isUri(e.uri)}function yht(i){return typeof i?.id=="string"&&!Ote(i)&&!Abi(i)}function wht(i,e){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:ub(i)}:e?bbi:vbi;let t=i;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function Abi(i){let e=i;return typeof e?.id=="string"&&Xe.isUri(e.configPath)}function xht(i){return i.id===uIe}var gv,bbi,vbi,Fte,Pte,msn,uIe,pO=D(()=>{Oe();H0();Rte();mn();ht();gv=vt("contextService");bbi={id:"ext-dev"},vbi={id:"empty-window"};Fte=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},Pte="code-workspace",msn=[{name:y("codeWorkspace","Code Workspace"),extensions:[Pte]}],uIe="4064f6ec-cb38-4ad0-af64-ee6467e63c82"});var Bte,Mz,zte,Rz,mO,Vte,Hte,Wte,Ty=D(()=>{Oe();(function(i){i.inspectTokensAction=y("inspectTokens","Developer: Inspect Tokens")})(Bte||(Bte={}));(function(i){i.gotoLineActionLabel=y("gotoLineActionLabel","Go to Line/Column...")})(Mz||(Mz={}));(function(i){i.helpQuickAccessActionLabel=y("helpQuickAccess","Show all Quick Access Providers")})(zte||(zte={}));(function(i){i.quickCommandActionLabel=y("quickCommandActionLabel","Command Palette"),i.quickCommandHelp=y("quickCommandActionHelp","Show And Run Commands")})(Rz||(Rz={}));(function(i){i.quickOutlineActionLabel=y("quickOutlineActionLabel","Go to Symbol..."),i.quickOutlineByCategoryActionLabel=y("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(mO||(mO={}));(function(i){i.editorViewAccessibleLabel=y("editorViewAccessibleLabel","Editor content")})(Vte||(Vte={}));(function(i){i.toggleHighContrast=y("toggleHighContrast","Toggle High Contrast Theme")})(Hte||(Hte={}));(function(i){i.bulkEditServiceSummary=y("bulkEditServiceSummary","Made {0} edits in {1} files")})(Wte||(Wte={}))});var Ute,dIe=D(()=>{ht();Ute=vt("workspaceTrustManagementService")});function Fz(i,e=!1){ybi(i,!1,e)}function ybi(i,e,t){let n=wbi(i,e);gO.push(n),n.userConfigured?_ht.push(n):hIe.push(n),t&&!n.userConfigured&&gO.forEach(r=>{r.mime===n.mime||r.userConfigured||(n.extension&&r.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&r.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&r.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&r.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function wbi(i,e){return{id:i.id,mime:i.mime,filename:i.filename,extension:i.extension,filepattern:i.filepattern,firstline:i.firstline,userConfigured:e,filenameLowercase:i.filename?i.filename.toLowerCase():void 0,extensionLowercase:i.extension?i.extension.toLowerCase():void 0,filepatternLowercase:i.filepattern?ske(i.filepattern.toLowerCase()):void 0,filepatternOnPath:i.filepattern?i.filepattern.indexOf(yo.sep)>=0:!1}}function Sht(){gO=gO.filter(i=>i.userConfigured),hIe=[]}function Eht(i,e){return xbi(i,e).map(t=>t.id)}function xbi(i,e){let t;if(i)switch(i.scheme){case jt.file:t=i.fsPath;break;case jt.data:{t=_y.parseMetaData(i).get(_y.META_DATA_LABEL);break}case jt.vscodeNotebookCell:t=void 0;break;default:t=i.path}if(!t)return[{id:"unknown",mime:Gr.unknown}];t=t.toLowerCase();let n=ub(t),r=Cht(t,n,_ht);if(r)return[r,{id:ps,mime:Gr.text}];let o=Cht(t,n,hIe);if(o)return[o,{id:ps,mime:Gr.text}];if(e){let s=Cbi(e);if(s)return[s,{id:ps,mime:Gr.text}]}return[{id:"unknown",mime:Gr.unknown}]}function Cht(i,e,t){let n,r,o;for(let s=t.length-1;s>=0;s--){let a=t[s];if(e===a.filenameLowercase){n=a;break}if(a.filepattern&&(!r||a.filepattern.length>r.filepattern.length)){let l=a.filepatternOnPath?i:e;a.filepatternLowercase?.(l)&&(r=a)}a.extension&&(!o||a.extension.length>o.extension.length)&&e.endsWith(a.extensionLowercase)&&(o=a)}if(n)return n;if(r)return r;if(o)return o}function Cbi(i){if(XR(i)&&(i=i.substr(1)),i.length>0)for(let e=gO.length-1;e>=0;e--){let t=gO[e];if(!t.firstline)continue;let n=i.match(t.firstline);if(n&&n.length>0)return t}}var gO,hIe,_ht,Dht=D(()=>{ake();PS();bl();H0();Ec();Pt();Yf();gO=[],hIe=[],_ht=[]});var jte,Tht,fIe,Qte,kht=D(()=>{et();ae();Pt();Dht();Yf();cy();sa();jte=Object.prototype.hasOwnProperty,Tht="vs.editor.nullLanguage",fIe=class{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Tht,0),this._register(ps,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;let t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Tht}},Qte=class i extends W{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new fIe,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(BS.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Sht();let e=[].concat(BS.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(let t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(r=>{this._lowercaseNameMap[r.toLowerCase()]=n.identifier}),n.mimetypes.forEach(r=>{this._mimeTypesMap[r]=n.identifier})}),Gi.as(xc.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){let t=e.id,n;jte.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){let n=t.id,r=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),r=t.mimetypes[0]),r||(r=`text/x-${n}`,e.mimetypes.push(r)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let a of t.extensions)Fz({id:n,mime:r,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)Fz({id:n,mime:r,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)Fz({id:n,mime:r,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);Yot(l)||Fz({id:n,mime:r,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(n);let o=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?o=[null]:o=t.aliases),o!==null)for(let a of o)!a||a.length===0||e.aliases.push(a);let s=o!==null&&o.length>0;if(!(s&&o[0]===null)){let a=(s?o[0]:null)||n;(s||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?jte.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){let t=e.toLowerCase();return jte.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&jte.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Eht(e,t)}}});function $I(i=xd){return(e,t)=>Zi(e,t,i)}function Iht(){return(i,e)=>i.equals(e)}function Oz(i,e,t){if(t!==void 0){let n=i;return n==null||e===void 0||e===null?e===n:t(n,e)}else{let n=i;return(r,o)=>r==null||o===void 0||o===null?o===r:n(r,o)}}function bO(i,e){if(i===e)return!0;if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(let t=0;t{Qt();xd=(i,e)=>i===e});function _bi(i,e){let t=pIe.get(i);if(t)return t;let n=Sbi(i,e);if(n){let r=Lht.get(n)??0;r++,Lht.set(n,r);let o=r===1?n:`${n}#${r}`;return pIe.set(i,o),o}}function Sbi(i,e){let t=pIe.get(i);if(t)return t;let n=e.owner?Dbi(e.owner)+".":"",r,o=e.debugNameSource;if(o!==void 0)if(typeof o=="function"){if(r=o(),r!==void 0)return n+r}else return n+o;let s=e.referenceFn;if(s!==void 0&&(r=Gte(s),r!==void 0))return n+r;if(e.owner!==void 0){let a=Ebi(e.owner,i);if(a!==void 0)return n+a}}function Ebi(i,e){for(let t in i)if(i[t]===e)return t}function Dbi(i){let e=Mht.get(i);if(e)return e;let t=Tbi(i),n=Nht.get(t)??0;n++,Nht.set(t,n);let r=n===1?t:`${t}#${n}`;return Mht.set(i,r),r}function Tbi(i){let e=i.constructor;return e?e.name:"Object"}function Gte(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e);return(n?n[1]:void 0)?.trim()}var ha,Lht,pIe,Nht,Mht,vO=D(()=>{ha=class{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return _bi(e,this)}},Lht=new Map,pIe=new WeakMap;Nht=new Map,Mht=new WeakMap});function Fht(i){Rht=i}function em(){return Rht}function kbi(i){let e=new Array,t=[],n="";function r(s){if("length"in s)for(let a of s)a&&r(a);else"text"in s?(n+=`%c${s.text}`,e.push(s.style),s.data&&t.push(...s.data)):"data"in s&&t.push(...s.data)}r(i);let o=[n,...e];return o.push(...t),o}function AO(i){return bv(i,{color:"black"})}function Pz(i){return bv(Mbi(`${i}: `,10),{color:"black",bold:!0})}function bv(i,e={color:"black"}){function t(r){return Object.entries(r).reduce((o,[s,a])=>`${o}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function Bz(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?Ibi(i,e):Lbi(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function Ibi(i,e){let t="[ ",n=!0;for(let r of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${Bz(r,e-t.length)}`}return t+=" ]",t}function Lbi(i,e){let t="{ ",n=!0;for(let[r,o]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${r}: ${Bz(o,e-t.length)}`}return t+=" }",t}function Nbi(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function Mbi(i,e){for(;i.length{qte=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return kbi([AO(Nbi("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[AO(" "),bv(Bz(e.oldValue,70),{color:"red",strikeThrough:!0}),AO(" "),bv(Bz(e.newValue,60),{color:"green"})]:[AO(" (unchanged)")]:[AO(" "),bv(Bz(e.newValue,60),{color:"green"}),AO(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([Pz("observable value changed"),bv(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return bv(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([Pz("derived recomputed"),bv(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([Pz("observable from event triggered"),bv(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([Pz("autorun"),bv(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([Pz("transaction"),bv(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}});function Pht(i){Oht=i}function zht(i){Bht=i}function Vht(i){mIe=i}function fn(i,e){let t=new Iy(i,e);try{i(t)}finally{t.finish()}}function eL(i){if(Yte)i(Yte);else{let e=new Iy(i,void 0);Yte=e;try{i(e)}finally{e.finish(),Yte=void 0}}}async function Kte(i,e){let t=new Iy(i,e);try{await i(t)}finally{t.finish()}}function xg(i,e,t){i?e(i):fn(e,t)}function Gt(i,e){let t;return typeof i=="string"?t=new ha(void 0,i,void 0):t=new ha(i,void 0,void 0),new wO(t,e,xd)}function Ly(i,e){let t;return typeof i=="string"?t=new ha(void 0,i,void 0):t=new ha(i,void 0,void 0),new gIe(t,e,xd)}var Oht,Bht,mIe,zz,vv,Yte,Iy,wO,gIe,Gb=D(()=>{ky();vO();yO();zz=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){let n=t===void 0?void 0:e,r=t===void 0?e:t;return mIe({owner:n,debugName:()=>{let o=Gte(r);if(o!==void 0)return o;let a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(r.toString());if(a)return`${this.debugName}.${a[2]}`;if(!n)return`${this.debugName} (mapped)`},debugReferenceFn:r},o=>r(this.read(o),o))}flatten(){return mIe({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,t){return e.add(Oht(this,t)),this}keepObserved(e){return e.add(Bht(this)),this}},vv=class extends zz{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};Iy=class{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],em()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Gte(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this.updatingObservers;for(let t=0;t{},()=>`Setting ${this.debugName}`));try{let o=this._value;this._setValue(e),em()?.handleObservableChanged(this,{oldValue:o,newValue:e,change:n,didChange:!0,hadValue:!0});for(let s of this.observers)t.updateObserver(s,this),s.handleChange(this,n)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};gIe=class extends wO{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}});function st(i,e){return e!==void 0?new Ax(new ha(i,void 0,e),e,void 0,void 0,void 0,xd):new Ax(new ha(void 0,void 0,i),i,void 0,void 0,void 0,xd)}function Ny(i,e,t){return new bIe(new ha(i,void 0,e),e,void 0,void 0,void 0,xd,t)}function Jl(i,e){return new Ax(new ha(i.owner,i.debugName,i.debugReferenceFn),e,void 0,void 0,i.onLastObserverRemoved,i.equalsFn??xd)}function Vz(i,e){return new Ax(new ha(i.owner,i.debugName,void 0),e,i.createEmptyChangeSummary,i.handleChange,void 0,i.equalityComparer??xd)}function sh(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let r=new te;return new Ax(new ha(n,void 0,t),o=>(r.clear(),t(o,r)),void 0,void 0,()=>r.dispose(),xd)}function fa(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let r;return new Ax(new ha(n,void 0,t),o=>{r?r.clear():r=new te;let s=t(o);return s&&r.add(s),s},void 0,void 0,()=>{r&&(r.dispose(),r=void 0)},xd)}var Ax,bIe,$h=D(()=>{Mb();ky();ae();Gb();vO();yO();Vht(Jl);Ax=class extends vv{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,r,o=void 0,s){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=n,this._handleChange=r,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),em()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(this.observers.size===0){let e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}else{do{if(this.state===1){for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){if(this.state===3)return;let e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;let t=this.state!==0,n=this.value;this.state=3;let r=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,r)}finally{for(let s of this.dependenciesToBeRemoved)s.removeObserver(this);this.dependenciesToBeRemoved.clear()}let o=t&&!this._equalityComparator(n,this.value);if(em()?.handleDerivedRecomputed(this,{oldValue:n,newValue:this.value,change:void 0,didChange:o,hadValue:t}),o)for(let s of this.observers)s.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}Nb(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(n&&(this.state===1||r)&&(this.state=2,r))for(let o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}},bIe=class extends Ax{constructor(e,t,n,r,o=void 0,s,a){super(e,t,n,r,o,s),this.set=a}}});function _t(i){return new xO(new ha(void 0,void 0,i),i,void 0,void 0)}function My(i,e){return new xO(new ha(i.owner,i.debugName,i.debugReferenceFn??e),e,void 0,void 0)}function yx(i,e){return new xO(new ha(i.owner,i.debugName,i.debugReferenceFn??e),e,i.createEmptyChangeSummary,i.handleChange)}function vIe(i,e){let t=new te,n=yx({owner:i.owner,debugName:i.debugName,debugReferenceFn:i.debugReferenceFn??e,createEmptyChangeSummary:i.createEmptyChangeSummary,handleChange:i.handleChange},(r,o)=>{t.clear(),e(r,o,t)});return Ve(()=>{n.dispose(),t.dispose()})}function ts(i){let e=new te,t=My({owner:void 0,debugName:void 0,debugReferenceFn:i},n=>{e.clear(),i(n,e)});return Ve(()=>{t.dispose(),e.dispose()})}var xO,AIe=D(()=>{Mb();ae();vO();yO();xO=class{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,r){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),em()?.handleAutorunCreated(this),this._runIfNeeded(),QT(this)}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),GT(this)}_runIfNeeded(){if(this.state===3)return;let e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;let t=this.disposed;try{if(!t){em()?.handleAutorunTriggered(this);let n=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,n)}}finally{t||em()?.handleAutorunFinished(this);for(let n of this.dependenciesToBeRemoved)n.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,Nb(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=xO})(_t||(_t={}))});function Xl(i){return new yIe(i)}function zi(...i){let e,t,n;return i.length===3?[e,t,n]=i:[t,n]=i,new Ry(new ha(e,void 0,n),t,n,()=>Ry.globalTransaction,xd)}function Hht(i,e,t){return new Ry(new ha(i.owner,i.debugName,i.debugReferenceFn??t),e,t,()=>Ry.globalTransaction,i.equalsFn??xd)}function bs(i,e){return new wIe(i,e)}function Cg(i){return typeof i=="string"?new Jte(i):new Jte(void 0,i)}function Wht(i){let e=new Xte(!1,void 0);return i.addObserver(e),Ve(()=>{i.removeObserver(e)})}function qb(i,e){let t=new Xte(!0,e);return i.addObserver(t),e?e(i.get()):i.reportChanges(),Ve(()=>{i.removeObserver(t)})}function Fy(i,e){let t;return Jl({owner:i,debugReferenceFn:e},r=>(t=e(r,t),t))}function Uht(i,e,t,n){let r=new Zte(t,n);return Jl({debugReferenceFn:t,owner:i,onLastObserverRemoved:()=>{r.dispose(),r=new Zte(t)}},s=>(r.setItems(e.read(s)),r.getItems()))}function jht(i,e){return Fy(i,(t,n)=>n??e(t))}var yIe,Ry,wIe,Jte,Xte,Zte,Hz=D(()=>{et();ae();Gb();vO();$h();yO();ky();yIe=class extends zz{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};Ry=class extends vv{constructor(e,t,n,r,o){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=r,this._equalityComparator=o,this.hasValue=!1,this.handleEvent=s=>{let a=this._getValue(s),l=this.value,c=!this.hasValue||!this._equalityComparator(l,a),u=!1;c&&(this.value=a,this.hasValue&&(u=!0,xg(this._getTransaction(),d=>{em()?.handleFromEventObservableTriggered(this,{oldValue:l,newValue:a,change:void 0,didChange:c,hadValue:this.hasValue});for(let h of this.observers)d.updateObserver(h,this),h.handleChange(this,void 0)},()=>{let d=this.getDebugName();return"Event fired"+(d?`: ${d}`:"")})),this.hasValue=!0),u||em()?.handleFromEventObservableTriggered(this,{oldValue:l,newValue:a,change:void 0,didChange:c,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}};(function(i){i.Observer=Ry;function e(t,n){let r=!1;Ry.globalTransaction===void 0&&(Ry.globalTransaction=t,r=!0);try{n()}finally{r&&(Ry.globalTransaction=void 0)}}i.batchEventsGlobally=e})(zi||(zi={}));wIe=class extends vv{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{fn(n=>{for(let r of this.observers)n.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};Jte=class extends vv{get debugName(){return new ha(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){fn(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};zht(Wht);Pht(qb);Xte=class{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}};Zte=class{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let t=[],n=new Set(this._cache.keys());for(let r of e){let o=this._keySelector?this._keySelector(r):r,s=this._cache.get(o);if(s)n.delete(o);else{let a=new te;s={out:this._map(r,a),store:a},this._cache.set(o,s)}t.push(s.out)}for(let r of n)this._cache.get(r).store.dispose(),this._cache.delete(r);this._items=t}getItems(){return this._items}}});function Uz(i,e,t,n){return e||(e=r=>r!=null),new Promise((r,o)=>{let s=!0,a=!1,l=i.map(u=>({isFinished:e(u),error:t?t(u):!1,state:u})),c=_t(u=>{let{isFinished:d,error:h,state:f}=l.read(u);(d||h)&&(s?a=!0:c.dispose(),h?o(h===!0?f:h):r(f))});if(n){let u=n.onCancellationRequested(()=>{c.dispose(),u.dispose(),o(new Hc)});if(n.isCancellationRequested){c.dispose(),u.dispose(),o(new Hc);return}}s=!1,a&&c.dispose()})}var tL,Wz,Qht=D(()=>{AIe();Gb();Lt();tL=class i{static fromFn(e){return new i(e())}constructor(e){this._value=Gt(this,void 0),this.promiseResult=this._value,this.promise=e.then(t=>(fn(n=>{this._value.set(new Wz(t,void 0),n)}),t),t=>{throw fn(n=>{this._value.set(new Wz(void 0,t),n)}),t})}},Wz=class{constructor(e,t){this.data=e,this.error=t}}});var $te,Ght=D(()=>{Gb();$te=class extends vv{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,n){super(),this._debugNameData=e,this._equalityComparator=n,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this.observers)for(let t of this._deltas)e.handleChange(this,t);this._deltas.length=0}else for(let e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(let e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();let e=[...this.observers];for(let t of e)t.endUpdate(this)}}addObserver(e){let t=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let r;t||(t=r=new Iy(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),n!==void 0&&this._deltas.push(n),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(o,s)=>{},handlePossibleChange:o=>{}},this),this._updateCounter>1)for(let o of this.observers)o.handlePossibleChange(this)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}});function CO(i,e){return i.lazy?new $te(new ha(i.owner,i.debugName,void 0),e,i.equalsFn??xd):new wO(new ha(i.owner,i.debugName,void 0),e,i.equalsFn??xd)}var qht=D(()=>{ky();Gb();vO();Ght()});var Rbi,Tn=D(()=>{Gb();$h();AIe();Hz();Qht();qht();yO();Rbi=!1;Rbi&&Fht(new qte)});var eie,tie,Yht=D(()=>{et();ae();kht();Qt();tr();Yf();Tn();eie=class i extends W{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new G),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new G),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new G({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,i.instanceCount++,this._registry=this._register(new Qte(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){i.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){let n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return CF(n,null)}createById(e){return new tie(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new tie(this.onDidChange,()=>{let n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=ps),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Wn.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}},tie=class{constructor(e,t){this._value=zi(this,e,()=>t()),this.onDidChange=Se.fromObservable(this._value)}get languageId(){return this._value.get()}}});var hE,iie=D(()=>{PS();hE={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Gr.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}});function Kht(i){nie=i}function ko(i){return i==="element"?Pbi.value:Obi.value}function Yb(){return nie("element",!0)}var Fbi,nie,Obi,Pbi,Zl=D(()=>{nv();Fbi=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}}),nie=Fbi,Obi=new Ys(()=>nie("mouse",!1)),Pbi=new Ys(()=>nie("element",!1))});function Xht(i){Jht=i}function $l(){return Jht}var Jht,_g=D(()=>{Jht={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}}});var rie,Zht=D(()=>{rie=class{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(r=>r.splice(e,t,n))}}});var xIe=D(()=>{});var Oy,$ht=D(()=>{Oy=class extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}});function eft(i,e){let t=[];for(let n of e){if(i.start>=n.range.end)continue;if(i.ende.concat(t),[]))}var oie,tft=D(()=>{Ez();oie=class{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){let r=n.length-t,o=eft({start:0,end:e},this.groups),s=eft({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:sie(l.range,r),size:l.size})),a=n.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=zbi(o,a,s),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{Ye();aie=class{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),n=!1;if(t)n=this.transactionNodesPendingRemoval.has(t.domNode),n&&this.transactionNodesPendingRemoval.delete(t.domNode);else{let r=we(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(r);t={domNode:r,templateId:e,templateData:s}}return{row:t,isReusingConnectedDomNode:n}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:n}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(n).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}});function Vbi(i,e){return Array.isArray(i)&&Array.isArray(e)?Zi(i,e):i===e}var xx,iL,Py,wx,CIe,_Ie,SIe,Sg,lie=D(()=>{iie();Ye();jb();Xf();Ag();Qt();Jt();ZS();et();ae();Ez();eO();tft();ift();Lt();PI();xx=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},iL={CurrentDragAndDropData:void 0},Py={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(i){return[i]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0},wx=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},CIe=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},_Ie=class{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tr,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}},Sg=class i{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:fZ(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,r=Py){if(this.virtualDelegate=t,this.domId=`list_id_${++i.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new ra(50),this.splicing=!1,this.dragOverAnimationStopDisposable=W.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=W.None,this.onDragLeaveTimeout=W.None,this.disposables=new te,this._onDidChangeContentHeight=new G,this._onDidChangeContentWidth=new G,this.onDidChangeContentHeight=Se.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,r.horizontalScrolling&&r.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(r.paddingTop??0);for(let s of n)this.renderers.set(s.templateId,s);this.cache=this.disposables.add(new aie(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof r.mouseSupport=="boolean"?r.mouseSupport:!0),this._horizontalScrolling=r.horizontalScrolling??Py.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof r.paddingBottom>"u"?0:r.paddingBottom,this.accessibilityProvider=new SIe(r.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(r.transformOptimization??Py.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(Do.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new vg({forceIntegerValues:!0,smoothScrollDuration:r.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:s=>vl(rt(this.domNode),s)})),this.scrollableElement=this.disposables.add(new Ay(this.rowsContainer,{alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel??Py.alwaysConsumeMouseWheel,horizontal:1,vertical:r.verticalScrollMode??Py.verticalScrollMode,useShadows:r.useShadows??Py.useShadows,mouseWheelScrollSensitivity:r.mouseWheelScrollSensitivity,fastScrollSensitivity:r.fastScrollSensitivity,scrollByPage:r.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(re(this.rowsContainer,En.Change,s=>this.onTouchChange(s))),this.disposables.add(re(this.scrollableElement.getDomNode(),"scroll",s=>s.target.scrollTop=0)),this.disposables.add(re(this.domNode,"dragover",s=>this.onDragOver(this.toDragEvent(s)))),this.disposables.add(re(this.domNode,"drop",s=>this.onDrop(this.toDragEvent(s)))),this.disposables.add(re(this.domNode,"dragleave",s=>this.onDragLeave(this.toDragEvent(s)))),this.disposables.add(re(this.domNode,"dragend",s=>this.onDragEnd(s))),this.setRowLineHeight=r.setRowLineHeight??Py.setRowLineHeight,this.setRowHeight=r.setRowHeight??Py.setRowHeight,this.supportDynamicHeights=r.supportDynamicHeights??Py.supportDynamicHeights,this.dnd=r.dnd??this.disposables.add(Py.dnd),this.layout(r.initialSize?.height,r.initialSize?.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){let n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+r),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new oie(e)}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){let r=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=Dl.intersect(r,o),a=new Map;for(let E=s.end-1;E>=s.start;E--){let I=this.items[E];if(I.dragStartDisposable.dispose(),I.checkedDisposable.dispose(),I.row){let T=a.get(I.templateId);T||(T=[],a.set(I.templateId,T));let L=this.renderers.get(I.templateId);L&&L.disposeElement&&L.disposeElement(I.element,E,I.row.templateData,I.size),T.unshift(I.row)}I.row=null,I.stale=!0}let l={start:e+t,end:this.items.length},c=Dl.intersect(l,r),u=Dl.relativeComplement(l,r),d=n.map(E=>({id:String(this.itemId++),element:E,templateId:this.virtualDelegate.getTemplateId(E),size:this.virtualDelegate.getHeight(E),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(E),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:W.None,checkedDisposable:W.None,stale:!1})),h;e===0&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));let f=n.length-t,p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),g=sie(c,f),v=Dl.intersect(p,g);for(let E=v.start;Esie(E,f)),_=[{start:e,end:e+n.length},...w].map(E=>Dl.intersect(p,E)).reverse();for(let E of _)for(let I=E.end-1;I>=E.start;I--){let T=this.items[I],M=a.get(T.templateId)?.pop();this.insertItemInDOM(I,M)}for(let E of a.values())for(let I of E)this.cache.release(I);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map(E=>E.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=vl(rt(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:typeof e=="number"?e:ast(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:fZ(this.domNode)})}render(e,t,n,r,o,s=!1){let a=this.getRenderRange(t,n),l=Dl.relativeComplement(a,e).reverse(),c=Dl.relativeComplement(e,a);if(s){let u=Dl.intersect(e,a);for(let d=u.start;d{for(let u of c)for(let d=u.start;d=u.start;d--)this.insertItemInDOM(d)}),r!==void 0&&(this.rowsContainer.style.left=`-${r}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&o!==void 0&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=n}insertItemInDOM(e,t){let n=this.items[e];if(!n.row)if(t)n.row=t,n.stale=!0;else{let l=this.cache.alloc(n.templateId);n.row=l.row,n.stale||=l.isReusingConnectedDomNode}let r=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",r);let o=this.accessibilityProvider.isChecked(n.element);if(typeof o=="boolean")n.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){let l=c=>n.row.domNode.setAttribute("aria-checked",String(!!c));l(o.value),n.checkedDisposable=o.onDidChange(()=>l(o.value))}if(n.stale||!n.row.domNode.parentElement){let l=this.items.at(e+1)?.row?.domNode??null;(n.row.domNode.parentElement!==this.rowsContainer||n.row.domNode.nextElementSibling!==l)&&this.rowsContainer.insertBefore(n.row.domNode,l),n.stale=!1}this.updateItemInDOM(n,e);let s=this.renderers.get(n.templateId);if(!s)throw new Error(`No renderer found for template id ${n.templateId}`);s?.renderElement(n.element,e,n.row.templateData,n.size);let a=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!a,a&&(n.dragStartDisposable=re(n.row.domNode,"dragstart",l=>this.onDragStart(n.element,a,l))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=fZ(e.row.domNode);let t=rt(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){let t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Se.map(this.disposables.add(new wi(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Se.map(this.disposables.add(new wi(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Se.filter(Se.map(this.disposables.add(new wi(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Se.map(this.disposables.add(new wi(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Se.map(this.disposables.add(new wi(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Se.map(this.disposables.add(new wi(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Se.any(Se.map(this.disposables.add(new wi(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Se.map(this.disposables.add(new wi(this.domNode,En.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Se.map(this.disposables.add(new wi(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Se.map(this.disposables.add(new wi(this.rowsContainer,En.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element,o=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:r,sector:o}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){if(!n.dataTransfer)return;let r=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(hE.TEXT,t),n.dataTransfer.setDragImage){let o;this.dnd.getDragLabel&&(o=this.dnd.getDragLabel(r,n)),typeof o>"u"&&(o=String(r.length));let s=we(".monaco-drag-image");s.textContent=o,(c=>{for(;c&&!c.classList.contains("monaco-workbench");)c=c.parentElement;return c||this.domNode.ownerDocument})(this.domNode).appendChild(s),n.dataTransfer.setDragImage(s,-10,-10),setTimeout(()=>s.remove(),0)}this.domNode.classList.add("dragging"),this.currentDragData=new wx(r),iL.CurrentDragAndDropData=new CIe(r),this.dnd.onDragStart?.(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),iL.CurrentDragAndDropData&&iL.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(iL.CurrentDragAndDropData)this.currentDragData=iL.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new _Ie}let t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect?.type===0?"copy":"move";let n;typeof t!="boolean"&&t.feedback?n=t.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=Uh(n).filter(o=>o>=-1&&oo-s),n=n[0]===-1?[-1]:n;let r=typeof t!="boolean"&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(Vbi(this.currentDragFeedback,n)&&this.currentDragFeedbackPosition===r)return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackPosition=r,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add(r),this.rowsContainer.classList.add(r),this.currentDragFeedbackDisposable=Ve(()=>{this.domNode.classList.remove(r),this.rowsContainer.classList.remove(r)});else{if(n.length>1&&r!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");r==="drop-target-after"&&n[0]{for(let o of n){let s=this.items[o];s.dropTarget=!1,s.row?.domNode.classList.remove(r)}})}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Bp(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,iL.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,iL.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=W.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let t=dZ(this.domNode).top;this.dragOverAnimationDisposable=vst(rt(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Bp(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;let t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;let n=e.offsetY/this.items[t].size,r=Math.floor(n/.25);return El(r,0,3)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),n=e;for(;(Er(n)||dst(n))&&n!==this.rowsContainer&&t.contains(n);){let r=n.getAttribute("data-index");if(r){let o=Number(r);if(!isNaN(o))return o}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){let r=this.getRenderRange(e,t),o,s;e===this.elementTop(r.start)?(o=r.start,s=0):r.end-r.start>1&&(o=r.start+1,s=this.elementTop(o)-e);let a=0;for(;;){let l=this.getRenderRange(e,t),c=!1;for(let u=l.start;u=h.start;f--)this.insertItemInDOM(f);for(let h=l.start;h=0&&i[r]===e-(t-r);)n.push(i[r--]);for(n.reverse(),r=t;r=i.length)t.push(e[r++]);else if(r>=e.length)t.push(i[n++]);else if(i[n]===e[r]){t.push(i[n]),n++,r++;continue}else i[n]=i.length)t.push(e[r++]);else if(r>=e.length)t.push(i[n++]);else if(i[n]===e[r]){n++,r++;continue}else i[n]{Ye();jb();gc();Xf();Yl();Zht();Qt();Jt();Ho();ZS();et();yg();ae();PI();Si();gn();xIe();$ht();lie();Op();Tn();fE=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EIe=class{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){let r=this.renderedElements.findIndex(o=>o.templateData===n);if(r>=0){let o=this.renderedElements[r];this.trait.unrender(n),o.index=t}else{let o={index:t,templateData:n};this.renderedElements.push(o)}this.trait.renderIndex(t,n)}splice(e,t,n){let r=[];for(let o of this.renderedElements)o.index=e+t&&r.push({index:o.index+n-t,templateData:o.templateData});this.renderedElements=r}renderIndexes(e){for(let{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){let t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}},EO=class{get name(){return this._trait}get renderer(){return new EIe(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new G,this.onChange=this._onChange.event}splice(e,t,n){let r=n.length-t,o=e+t,s=[],a=0;for(;a=o;)s.push(this.sortedIndexes[a++]+r);this.renderer.splice(e,t,n.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(rft),t)}_set(e,t,n){let r=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;let s=IIe(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:n}),r}get(){return this.indexes}contains(e){return ix(this.sortedIndexes,e,rft)>=0}dispose(){Vi(this._onChange)}};fE([ro],EO.prototype,"renderer",null);DIe=class extends EO{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}},jz=class{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));let r=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(r.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));let o=new Set(r),s=n.map(a=>o.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,s)}};cie=class{get onKeyDown(){return Se.chain(this.disposables.add(new wi(this.view.domNode,"keydown")).event,e=>e.filter(t=>!Cx(t.target)).map(t=>new Wi(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new te,this.multipleSelectionDisposables=new te,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(r=>{switch(r.keyCode){case 3:return this.onEnter(r);case 16:return this.onUpArrow(r);case 18:return this.onDownArrow(r);case 11:return this.onPageUpArrow(r);case 12:return this.onPageDownArrow(r);case 9:return this.onEscape(r);case 31:this.multipleSelectionSupport&&(qt?r.metaKey:r.ctrlKey)&&this.onCtrlA(r)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Xc(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}};fE([ro],cie.prototype,"onKeyDown",null);(function(i){i[i.Automatic=0]="Automatic",i[i.Trigger=1]="Trigger"})(Av||(Av={}));(function(i){i[i.Idle=0]="Idle",i[i.Typing=1]="Typing"})(SO||(SO={}));Hbi=new class{mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey||i.altKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30||i.keyCode>=98&&i.keyCode<=107||i.keyCode>=85&&i.keyCode<=95}},TIe=class{constructor(e,t,n,r,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=r,this.delegate=o,this.enabled=!1,this.state=SO.Idle,this.mode=Av.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new te,this.disposables=new te,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??Av.Automatic}enable(){if(this.enabled)return;let e=!1,t=Se.chain(this.enabledDisposables.add(new wi(this.view.domNode,"keydown")).event,o=>o.filter(s=>!Cx(s.target)).filter(()=>this.mode===Av.Automatic||this.triggered).map(s=>new Wi(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(s=>Ai.stop(s,!0)).map(s=>s.browserEvent.key)),n=Se.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Se.reduce(Se.any(t,n),(o,s)=>s===null?null:(o||"")+s,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){let e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){let t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));typeof t=="string"?gs(t):t&&gs(t.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=SO.Idle,this.triggered=!1;return}let t=this.list.getFocus(),n=t.length>0?t[0]:0,r=this.state===SO.Idle?1:0;this.state=SO.Typing;for(let o=0;o1&&c.length===1){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}else if(typeof l>"u"||UI(e,l)){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}},kIe=class{constructor(e,t){this.list=e,this.view=t,this.disposables=new te;let n=Se.chain(this.disposables.add(new wi(t.domNode,"keydown")).event,o=>o.filter(s=>!Cx(s.target)).map(s=>new Wi(s)));Se.chain(n,o=>o.filter(s=>s.keyCode===2&&!s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;let t=this.list.getFocus();if(t.length===0)return;let n=this.view.domElement(t[0]);if(!n)return;let r=n.querySelector("[tabIndex]");if(!r||!Er(r)||r.tabIndex===-1)return;let o=rt(r).getComputedStyle(r);o.visibility==="hidden"||o.display==="none"||(e.preventDefault(),e.stopPropagation(),r.focus())}dispose(){this.disposables.dispose()}};nft={isSelectionSingleChangeEvent:FIe,isSelectionRangeChangeEvent:OIe},Qz=class{constructor(e){this.list=e,this.disposables=new te,this._onPointer=new G,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||nft),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Do.addTarget(e.getHTMLElement()))),Se.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||nft))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){_O(e.browserEvent.target)||hs()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Cx(e.browserEvent.target)||_O(e.browserEvent.target))return;let t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||Cx(e.browserEvent.target)||_O(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Wbi(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(Cx(e.browserEvent.target)||_O(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){let t=e.index,n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof n>"u"&&(n=this.list.getFocus()[0]??t,this.list.setAnchor(n));let r=Math.min(n,t),o=Math.max(n,t),s=Xc(r,o+1),a=this.list.getSelection(),l=jbi(IIe(a,[n]),n);if(l.length===0)return;let c=IIe(s,Qbi(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){let r=this.list.getSelection(),o=r.filter(s=>s!==t);this.list.setFocus([t]),this.list.setAnchor(t),r.length===o.length?this.list.setSelection([...o,t],e.browserEvent):this.list.setSelection(o,e.browserEvent)}}dispose(){this.disposables.dispose()}},Gz=class{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){let t=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(` +`});var iai,nai,rH,Wie,AIe=D(()=>{bIe();de();Px();Ye();iai=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},nai=function(i,e){return function(t,n){e(t,n,i)}},rH=class extends H{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new Hie(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,n){let o;t?t===this.layoutService.getContainer(rt(t))?o=1:n?o=3:o=2:o=1,this.contextView.setContainer(t??this.layoutService.activeContainer,o),this.contextView.show(e);let r={close:()=>{this.openContextView===r&&this.hideContextView()}};return this.openContextView=r,r}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};rH=iai([nai(0,lf)],rH);Wie=class extends rH{getContextViewElement(){return this.contextView.getViewElement()}}});var Uie,hut=D(()=>{Ye();sn();Td();gn();Be();Uie=class{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}async update(e,t,n){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(e===void 0||Na(e)||To(e))o=e;else if(!K_(e.markdown))o=e.markdown??e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(y("iconLabel.loading","Loading..."),t,n),this._cancellationTokenSource=new Mi;let r=this._cancellationTokenSource.token;if(o=await e.markdown(r),o===void 0&&(o=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(o,t,n)}show(e,t,n){let o=this._hoverWidget;if(this.hasContent(e)){let r={content:e,target:this.target,actions:n?.actions,linkHandler:n?.linkHandler,trapFocus:n?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!o,showHoverHint:n?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(r,t)}o?.dispose()}hasContent(e){return e?uf(e)?!!e.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}});function fut(i){if(i!==void 0)return i?.id??i}function put(i,e){for(e=e??rt(i).document.body;!i.hasAttribute("custom-hover")&&i!==e;)i=i.parentElement;return i}var oai,sH,vIe,yIe,mut=D(()=>{Dc();io();nr();zx();Ed();ht();uut();de();Ye();Xo();xc();fh();Px();gd();AIe();hut();Gt();oai=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},sH=function(i,e){return function(t,n){e(t,n,i)}},vIe=class extends H{constructor(e,t,n,o,r){super(),this._instantiationService=e,this._keybindingService=n,this._layoutService=o,this._accessibilityService=r,this._managedHovers=new Map,t.onDidShowContextMenu(()=>this.hideHover()),this._contextViewHandler=this._register(new rH(this._layoutService))}showHover(e,t,n){if(fut(this._currentHoverOptions)===fut(e)||this._currentHover&&this._currentHoverOptions?.persistence?.sticky)return;this._currentHoverOptions=e,this._lastHoverOptions=e;let o=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),r=ds();n||(o&&r?r.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=r):this._lastFocusedElementBeforeOpen=void 0);let s=new se,a=this._instantiationService.createInstance(zie,e);if(e.persistence?.sticky&&(a.isLocked=!0),a.onDispose(()=>{this._currentHover?.domNode&&P$(this._currentHover.domNode)&&this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),s.dispose()},void 0,s),!e.container){let l=To(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(rt(l))}if(this._contextViewHandler.showContextView(new yIe(a,t),e.container),a.onRequestLayout(()=>this._contextViewHandler.layout(),void 0,s),e.persistence?.sticky)s.add(ce(rt(e.container).document,Te.MOUSE_DOWN,l=>{Dr(l.target,a.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(let c of e.target.targetElements)s.add(ce(c,Te.CLICK,()=>this.hideHover()));else s.add(ce(e.target,Te.CLICK,()=>this.hideHover()));let l=ds();if(l){let c=rt(l).document;s.add(ce(l,Te.KEY_DOWN,u=>this._keyDown(u,a,!!e.persistence?.hideOnKeyDown))),s.add(ce(c,Te.KEY_DOWN,u=>this._keyDown(u,a,!!e.persistence?.hideOnKeyDown))),s.add(ce(l,Te.KEY_UP,u=>this._keyUp(u,a))),s.add(ce(c,Te.KEY_UP,u=>this._keyUp(u,a)))}}if("IntersectionObserver"in Xi){let l=new IntersectionObserver(u=>this._intersectionChange(u,a),{threshold:0}),c="targetElements"in e.target?e.target.targetElements[0]:e.target;l.observe(c),s.add(He(()=>l.disconnect()))}return this._currentHover=a,a}hideHover(){this._currentHover?.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,n){if(e.key==="Alt"){t.isLocked=!0;return}let o=new Vi(e);this._keybindingService.resolveKeyboardEvent(o).getSingleModifierDispatchChords().some(s=>!!s)||this._keybindingService.softDispatch(o,o.target).kind!==0||n&&(!this._currentHoverOptions?.trapFocus||e.key!=="Tab")&&(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(e,t){e.key==="Alt"&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}setupManagedHover(e,t,n,o){t.setAttribute("custom-hover","true"),t.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");let r,s,a=(C,_)=>{let E=s!==void 0;C&&(s?.dispose(),s=void 0),_&&(r?.dispose(),r=void 0),E&&(e.onDidHideHover?.(),s=void 0)},l=(C,_,E,I)=>new ha(async()=>{(!s||s.isDisposed)&&(s=new Uie(e,E||t,C>0),await s.update(typeof n=="function"?n():n,_,{...o,trapFocus:I}))},C),c=!1,u=ce(t,Te.MOUSE_DOWN,()=>{c=!0,a(!0,!0)},!0),d=ce(t,Te.MOUSE_UP,()=>{c=!1},!0),h=ce(t,Te.MOUSE_LEAVE,C=>{c=!1,a(!1,C.fromElement===t)},!0),f=C=>{if(r)return;let _=new se,E={targetElements:[t],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){let I=T=>{E.x=T.x+10,To(T.target)&&put(T.target,t)!==t&&a(!0,!0)};_.add(ce(t,Te.MOUSE_MOVE,I,!0))}r=_,!(To(C.target)&&put(C.target,t)!==t)&&_.add(l(e.delay,!1,E))},p=ce(t,Te.MOUSE_OVER,f,!0),g=()=>{if(c||r)return;let C={targetElements:[t],dispose:()=>{}},_=new se,E=()=>a(!0,!0);_.add(ce(t,Te.BLUR,E,!0)),_.add(l(e.delay,!1,C)),r=_},A,v=t.tagName.toLowerCase();v!=="input"&&v!=="textarea"&&(A=ce(t,Te.FOCUS,g,!0));let w={show:C=>{a(!1,!0),l(0,C,void 0,C)},hide:()=>{a(!0,!0)},update:async(C,_)=>{n=C,await s?.update(n,void 0,_)},dispose:()=>{this._managedHovers.delete(t),p.dispose(),h.dispose(),u.dispose(),d.dispose(),A?.dispose(),a(!0,!0)}};return this._managedHovers.set(t,w),w}showManagedHover(e){let t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};vIe=oai([sH(0,Re),sH(1,ia),sH(2,Xt),sH(3,lf),sH(4,Es)],vIe);yIe=class{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}};oi(dh,vIe,1);ba((i,e)=>{let t=i.getColor($$);t&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))})});var Qy,eP,FE,jie,kL=D(()=>{ht();mn();gn();Qy=At("IWorkspaceEditService"),eP=class{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(FE.is(t))return FE.lift(t);if(jie.is(t))return jie.lift(t);throw new Error("Unsupported edit")})}},FE=class i extends eP{static is(e){return e instanceof i?!0:zr(e)&&Je.isUri(e.resource)&&zr(e.textEdit)}static lift(e){return e instanceof i?e:new i(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,o){super(o),this.resource=e,this.textEdit=t,this.versionId=n}},jie=class i extends eP{static is(e){return e instanceof i?!0:zr(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof i?e:new i(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},o){super(o),this.oldResource=e,this.newResource=t,this.options=n}}});var $l,wIe=D(()=>{$l={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}});function rai(i){return typeof i.type<"u"||typeof i.anyOf<"u"}function gut(){return Qie===null&&(Qie=Object.create(null),Object.keys(Gie.properties).forEach(i=>{Qie[i]=!0})),Qie}function but(i){return gut()[`editor.${i}`]||!1}function Aut(i){return gut()[`diffEditor.${i}`]||!1}var IL,Gie,Qie,sai,qie=D(()=>{wIe();ea();Zz();Be();Dy();fa();IL=Object.freeze({id:"editor",order:5,type:"object",title:y("editorConfigurationTitle","Editor"),scope:5}),Gie={...IL,properties:{"editor.tabSize":{type:"number",default:Dl.tabSize,minimum:1,markdownDescription:y("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:y("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:Dl.insertSpaces,markdownDescription:y("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:Dl.detectIndentation,markdownDescription:y("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:Dl.trimAutoWhitespace,description:y("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Dl.largeFileOptimizations,description:y("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[y("wordBasedSuggestions.off","Turn off Word Based Suggestions."),y("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),y("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),y("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:y("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[y("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),y("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),y("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:y("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:y("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:y("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:y("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:y("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:y("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:y("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:y("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:y("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:y("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:y("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:y("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:y("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:$l.maxComputationTime,description:y("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:$l.maxFileSize,description:y("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:$l.renderSideBySide,description:y("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:$l.renderSideBySideInlineBreakpoint,description:y("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:$l.useInlineViewWhenSpaceIsLimited,description:y("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:$l.renderMarginRevertIcon,description:y("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:$l.renderGutterMenu,description:y("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:$l.ignoreTrimWhitespace,description:y("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:$l.renderIndicators,description:y("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:$l.diffCodeLens,description:y("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:$l.diffWordWrap,markdownEnumDescriptions:[y("wordWrap.off","Lines will never wrap."),y("wordWrap.on","Lines will wrap at the viewport width."),y("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:$l.diffAlgorithm,markdownEnumDescriptions:[y("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),y("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:$l.hideUnchangedRegions.enabled,markdownDescription:y("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:$l.hideUnchangedRegions.revealLineCount,markdownDescription:y("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:$l.hideUnchangedRegions.minimumLineCount,markdownDescription:y("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:$l.hideUnchangedRegions.contextLineCount,markdownDescription:y("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:$l.experimental.showMoves,markdownDescription:y("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:$l.experimental.showEmptyDecorations,description:y("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:$l.experimental.useTrueInlineView,description:y("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};for(let i of iE){let e=i.schema;if(typeof e<"u")if(rai(e))Gie.properties[`editor.${i.name}`]=e;else for(let t in e)Object.hasOwnProperty.call(e,t)&&(Gie.properties[t]=e[t])}Qie=null;sai=Qi.as(Tc.Configuration);sai.registerConfiguration(Gie)});var kn,gm=D(()=>{Ue();kn=class{static insert(e,t){return{range:new R(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}});function Yie(i){return Object.isFrozen(i)?i:Pst(i)}var Id,xIe,CIe,aH,Kie,_Ie=D(()=>{Wt();Xl();rh();gn();mn();ao();Dy();fa();Id=class i{static createEmptyModel(e){return new i({},[],[],void 0,e)}constructor(e,t,n,o,r){this._contents=e,this._keys=t,this._overrides=n,this.raw=o,this.logService=r,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){let e=this.raw.map(t=>{if(t instanceof i)return t;let n=new xIe("",this.logService);return n.parseRaw(t),n.configurationModel});this._rawConfiguration=e.reduce((t,n)=>n===t?n:t.merge(n),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?gTe(this.contents,e):this.contents}inspect(e,t){let n=this;return{get value(){return Yie(n.rawConfiguration.getValue(e))},get override(){return t?Yie(n.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Yie(t?n.rawConfiguration.override(t).getValue(e):n.rawConfiguration.getValue(e))},get overrides(){let o=[];for(let{contents:r,identifiers:s,keys:a}of n.rawConfiguration.overrides){let l=new i(r,a,[],void 0,n.logService).getValue(e);l!==void 0&&o.push({identifiers:s,value:l})}return o.length?Yie(o):void 0}}}getOverrideValue(e,t){let n=this.getContentsForOverrideIdentifer(t);return n?e?gTe(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){let t=Xb(this.contents),n=Xb(this.overrides),o=[...this.keys],r=this.raw?.length?[...this.raw]:[this];for(let s of e)if(r.push(...s.raw?.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(t,s.contents);for(let a of s.overrides){let[l]=n.filter(c=>Zi(c.identifiers,a.identifiers));l?(this.mergeContents(l.contents,a.contents),l.keys.push(...a.keys),l.keys=tf(l.keys)):n.push(Xb(a))}for(let a of s.keys)o.indexOf(a)===-1&&o.push(a)}return new i(t,o,n,r.every(s=>s instanceof i)?void 0:r,this.logService)}createOverrideConfigurationModel(e){let t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let n={};for(let o of tf([...Object.keys(this.contents),...Object.keys(t)])){let r=this.contents[o],s=t[o];s&&(typeof r=="object"&&typeof s=="object"?(r=Xb(r),this.mergeContents(r,s)):r=s),n[o]=r}return new i(n,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(let n of Object.keys(t)){if(n in e&&zr(e[n])&&zr(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=Xb(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null,o=r=>{r&&(n?this.mergeContents(n,r):n=Xb(r))};for(let r of this.overrides)r.identifiers.length===1&&r.identifiers[0]===e?t=r.contents:r.identifiers.includes(e)&&o(r.contents);return o(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){let t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),vat(this.contents,e),Ix.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>Zi(n.identifiers,mV(e))),1))}updateValue(e,t,n){if(mTe(this.contents,e,t,o=>this.logService.error(o)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),Ix.test(e)){let o=mV(e),r={identifiers:o,keys:Object.keys(this.contents[e]),contents:lte(this.contents[e],a=>this.logService.error(a))},s=this.overrides.findIndex(a=>Zi(a.identifiers,o));s!==-1?this.overrides[s]=r:this.overrides.push(r)}}},xIe=class{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||Id.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;let{contents:n,keys:o,overrides:r,restricted:s,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new Id(n,o,r,a?[e]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseRaw(e,t){let n=Qi.as(Tc.Configuration).getConfigurationProperties(),o=this.filter(e,n,!0,t);e=o.raw;let r=lte(e,l=>this.logService.error(`Conflict in settings file ${this._name}: ${l}`)),s=Object.keys(e),a=this.toOverrides(e,l=>this.logService.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:r,keys:s,overrides:a,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(e,t,n,o){let r=!1;if(!o?.scopes&&!o?.skipRestricted&&!o?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:r};let s={},a=[];for(let l in e)if(Ix.test(l)&&n){let c=this.filter(e[l],t,!1,o);s[l]=c.raw,r=r||c.hasExcludedProperties,a.push(...c.restricted)}else{let c=t[l],u=c?typeof c.scope<"u"?c.scope:3:void 0;c?.restricted&&a.push(l),!o.exclude?.includes(l)&&(o.include?.includes(l)||(u===void 0||o.scopes===void 0||o.scopes.includes(u))&&!(o.skipRestricted&&c?.restricted))?s[l]=e[l]:r=!0}return{raw:s,restricted:a,hasExcludedProperties:r}}toOverrides(e,t){let n=[];for(let o of Object.keys(e))if(Ix.test(o)){let r={};for(let s in e[o])r[s]=e[o][s];n.push({identifiers:mV(o),keys:Object.keys(r),contents:lte(r,t)})}return n}},CIe=class{constructor(e,t,n,o,r,s,a,l,c,u,d,h,f){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=o,this.defaultConfiguration=r,this.policyConfiguration=s,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=u,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=f}toInspectValue(e){return e?.value!==void 0||e?.override!==void 0||e?.overrides!==void 0?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}},aH=class i{constructor(e,t,n,o,r,s,a,l,c,u){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=o,this._remoteUserConfiguration=r,this._workspaceConfiguration=s,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this.logService=u,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new ps,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let o;n.resource?(o=this._memoryConfigurationByResource.get(n.resource),o||(o=Id.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(n.resource,o))):o=this._memoryConfiguration,t===void 0?o.removeValue(e):o.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){let o=this.getConsolidatedConfigurationModel(e,t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),s=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of o.overrides)for(let c of l.identifiers)o.getOverrideValue(e,c)!==void 0&&a.add(c);return new CIe(e,t,o.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,r||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let o=this.getConsolidatedConfigurationModelForResource(t,n);return t.overrideIdentifier&&(o=o.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){let o=t.getFolder(e);o&&(n=this.getFolderConsolidatedConfiguration(o.uri)||n);let r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){let n=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(e);o?(t=n.merge(o),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){let n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{let{contents:n,overrides:o,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:o,keys:r}]),e},[])}}static parse(e,t){let n=this.parseConfigurationModel(e.defaults,t),o=this.parseConfigurationModel(e.policy,t),r=this.parseConfigurationModel(e.application,t),s=this.parseConfigurationModel(e.user,t),a=this.parseConfigurationModel(e.workspace,t),l=e.folders.reduce((c,u)=>(c.set(Je.revive(u[0]),this.parseConfigurationModel(u[1],t)),c),new ps);return new i(n,o,r,s,Id.createEmptyModel(t),a,l,Id.createEmptyModel(t),new ps,t)}static parseConfigurationModel(e,t){return new Id(e.contents,e.keys,e.overrides,void 0,t)}},Kie=class{constructor(e,t,n,o,r){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=o,this.logService=r,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(let s of e.keys)this.affectedKeys.add(s);for(let[,s]of e.overrides)for(let a of s)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(let s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=aH.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){let n=this._marker+e,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;let r=o+n.length;if(r>=this._affectsConfigStr.length)return!1;let s=this._affectsConfigStr.charCodeAt(r);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(t){let a=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!El(a,l)}return!0}}});var SIe,LL,EIe=D(()=>{et();SIe=class{constructor(){this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}},LL=new SIe});function lai(i,e,t){return{kind:2,commandId:i,commandArgs:e,isBubble:t}}function vut(i){return i?`${i.serialize()}`:"no when condition"}function yut(i){return i.extensionId?i.isBuiltinExtension?`built-in extension ${i.extensionId}`:`user extension ${i.extensionId}`:i.isDefault?"built-in":"user"}var lH,aai,Jie,DIe=D(()=>{Bt();lH={kind:0},aai={kind:1};Jie=class i{constructor(e,t,n){this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let o of e){let r=o.command;r&&r.charAt(0)!=="-"&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=i.handleRemovals([].concat(e).concat(t));for(let o=0,r=this._keybindings.length;o"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let o=n.length-1;o>=0;o--){let r=n[o];if(r.command===t.command)continue;let s=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,o=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let o=n.length-1;o>=0;o--){let r=n[o];if(t.contextMatchesRules(r.when))return r}return n[n.length-1]}resolve(e,t,n){let o=[...t,n];this._log(`| Resolving ${o}`);let r=this._map.get(o[0]);if(r===void 0)return this._log("\\ No keybinding entries."),lH;let s=null;if(o.length<2)s=r;else{s=[];for(let l=0,c=r.length;lu.chords.length)continue;let d=!0;for(let h=1;h=0;n--){let o=t[n];if(i._contextMatchesRules(e,o.when))return o}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}});var cai,Xie,tP,wut=D(()=>{Gt();Tt();et();EIe();de();Be();DIe();cai=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/,Xie=class extends H{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Ee.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,o,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=o,this._logService=r,this._onDidUpdateKeybindings=this._register(new q),this._currentChords=[],this._currentChordChecker=new OS,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=tP.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new ha,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){let n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");let n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),lH;let[o]=n.getDispatchChords();if(o===null)return this._log("\\ Keyboard event cannot be dispatched"),lH;let r=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:a})=>a));return this._getResolver().resolve(r,s,o)}_scheduleLeaveChordMode(){let e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw fR("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(y("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{let n=this._currentChords.map(({label:o})=>o).join(", ");this._currentChordStatusMessage=this._notificationService.status(y("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),LL.enabled&&LL.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],LL.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){let n=this.resolveKeyboardEvent(e),[o]=n.getSingleModifierDispatchChords();if(o)return this._ignoreSingleModifiers.has(o)?(this._log(`+ Ignoring single modifier ${o} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=tP.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=tP.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${o}.`),this._currentSingleModifier=o,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):o===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${o} ${o}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${o}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));let[r]=n.getChords();return this._ignoreSingleModifiers=new tP(r),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){let o=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let r=null,s=null;if(n){let[u]=e.getSingleModifierDispatchChords();r=u,s=u?[u]:[]}else[r]=e.getDispatchChords(),s=this._currentChords.map(({keypress:u})=>u);if(r===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),o;let a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,s,r);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){let u=this._currentChords.map(({label:d})=>d).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(y("missing.chord","The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),o=!0}return o}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),o=!0,this._expectAnotherChord(r,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),o;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){let u=this._currentChords.map(({label:d})=>d).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(y("missing.chord","The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),o=!0}}else{this.inChordMode&&this._leaveChordMode(),c.isBubble||(o=!0),this._log(`+ Invoking command ${c.commandId}.`),this._currentlyDispatchingCommandId=c.commandId;try{typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u))}finally{this._currentlyDispatchingCommandId=null}cai.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return o}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}},tP=class i{static{this.EMPTY=new i(null)}constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}});function Zie(i){let e=[];for(let t=0,n=i.length;t{cH=class{constructor(e,t,n,o,r,s,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Zie(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=Zie(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=o,this.isDefault=r,this.extensionId=s,this.isBuiltinExtension=a}}});function uai(i,e,t){if(e===null)return"";let n=[];return i.ctrlKey&&n.push(t.ctrlKey),i.shiftKey&&n.push(t.shiftKey),i.altKey&&n.push(t.altKey),i.metaKey&&n.push(t.metaKey),e!==""&&n.push(e),n.join(t.separator)}var iP,nP,xut,Cut,_ut,$ie=D(()=>{Be();iP=class{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(t.length===0)return null;let o=[];for(let r=0,s=t.length;r{Tt();$ie();xI();ene=class extends s${constructor(e,t){if(super(),t.length===0)throw mc("chords");this._os=e,this._chords=t}getLabel(){return nP.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return xut.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Cut.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return _ut.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new r$(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}});var uH,Eut=D(()=>{Bp();xI();Sut();TIe();uH=class i extends ene{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return xb.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":xb.toString(e.keyCode)}_getElectronAccelerator(e){return xb.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";let t=xb.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return i.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=xb.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){let t=BK[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof fg)return e;let t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new fg(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){let n=Zie(e.chords.map(o=>this._toKeyCodeChord(o)));return n.length>0?[new i(n,t)]:[]}}});var FA,oP=D(()=>{ht();FA=At("labelService")});var tne,Qln,up,dp,o0=D(()=>{ht();tne=At("progressService"),Qln=Object.freeze({total(){},worked(){},done(){}}),up=class{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}},dp=At("editorProgressService")});var kIe,IIe,LIe,NIe,rP,NL,ine=D(()=>{Rt();kIe=class{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){let n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new i(new NIe(e,t))}static forStrings(){return new i(new kIe)}static forConfigKeys(){return new i(new IIe)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){let n=this._iter.reset(e),o;this._root||(this._root=new rP,this._root.segment=n.value());let r=[];for(o=this._root;;){let a=n.cmp(o.segment);if(a>0)o.left||(o.left=new rP,o.left.segment=n.value()),r.push([-1,o]),o=o.left;else if(a<0)o.right||(o.right=new rP,o.right.segment=n.value()),r.push([1,o]),o=o.right;else if(n.hasNext())n.next(),o.mid||(o.mid=new rP,o.mid.segment=n.value()),r.push([0,o]),o=o.mid;else break}let s=o.value;o.value=t,o.key=e;for(let a=r.length-1;a>=0;a--){let l=r[a][1];l.updateHeight();let c=l.balanceFactor();if(c<-1||c>1){let u=r[a][0],d=r[a+1][0];if(u===1&&d===1)r[a][1]=l.rotateLeft();else if(u===-1&&d===-1)r[a][1]=l.rotateRight();else if(u===1&&d===-1)l.right=r[a+1][1]=r[a+1][1].rotateRight(),r[a][1]=l.rotateLeft();else if(u===-1&&d===1)l.left=r[a+1][1]=r[a+1][1].rotateLeft(),r[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1];break}else this._root=r[0][1]}}return s}get(e){return this._getNode(e)?.value}_getNode(e){let t=this._iter.reset(e),n=this._root;for(;n;){let o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){let t=this._getNode(e);return!(t?.value===void 0&&t?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){let n=this._iter.reset(e),o=[],r=this._root;for(;r;){let s=n.cmp(r.segment);if(s>0)o.push([-1,r]),r=r.left;else if(s<0)o.push([1,r]),r=r.right;else if(n.hasNext())n.next(),o.push([0,r]),r=r.mid;else break}if(r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){let s=this._min(r.right);if(s.key){let{key:a,value:l,segment:c}=s;this._delete(s.key,!1),r.key=a,r.value=l,r.segment=c}}else{let s=r.left??r.right;if(o.length>0){let[a,l]=o[o.length-1];switch(a){case-1:l.left=s;break;case 0:l.mid=s;break;case 1:l.right=s;break}}else this._root=s}for(let s=o.length-1;s>=0;s--){let a=o[s][1];a.updateHeight();let l=a.balanceFactor();if(l>1?(a.right.balanceFactor()>=0||(a.right=a.right.rotateRight()),o[s][1]=a.rotateLeft()):l<-1&&(a.left.balanceFactor()<=0||(a.left=a.left.rotateLeft()),o[s][1]=a.rotateRight()),s>0)switch(o[s-1][0]){case-1:o[s-1][1].left=o[s][1];break;case 1:o[s-1][1].right=o[s][1];break;case 0:o[s-1][1].mid=o[s][1];break}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){let t=this._iter.reset(e),n=this._root,o;for(;n;){let r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),o=n.value||o,n=n.mid;else break}return n&&n.value||o}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){let n=this._iter.reset(e),o=this._root;for(;o;){let r=n.cmp(o.segment);if(r>0)o=o.left;else if(r<0)o=o.right;else if(n.hasNext())n.next(),o=o.mid;else return o.mid?this._entries(o.mid):t?o.value:void 0}}forEach(e){for(let[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}});function one(i){let e=i;return typeof e?.id=="string"&&Je.isUri(e.uri)}function Dut(i){return typeof i?.id=="string"&&!one(i)&&!fai(i)}function Tut(i,e){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:_b(i)}:e?dai:hai;let t=i;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function fai(i){let e=i;return typeof e?.id=="string"&&Je.isUri(e.configPath)}function kut(i){return i.id===MIe}var OA,dai,hai,nne,rne,ecn,MIe,sP=D(()=>{Be();eA();ine();mn();ht();OA=At("contextService");dai={id:"ext-dev"},hai={id:"empty-window"};nne=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},rne="code-workspace",ecn=[{name:y("codeWorkspace","Code Workspace"),extensions:[rne]}],MIe="4064f6ec-cb38-4ad0-af64-ee6467e63c82"});var sne,dH,ane,hH,aP,lne,cne,une,Gy=D(()=>{Be();(function(i){i.inspectTokensAction=y("inspectTokens","Developer: Inspect Tokens")})(sne||(sne={}));(function(i){i.gotoLineActionLabel=y("gotoLineActionLabel","Go to Line/Column...")})(dH||(dH={}));(function(i){i.helpQuickAccessActionLabel=y("helpQuickAccess","Show all Quick Access Providers")})(ane||(ane={}));(function(i){i.quickCommandActionLabel=y("quickCommandActionLabel","Command Palette"),i.quickCommandHelp=y("quickCommandActionHelp","Show And Run Commands")})(hH||(hH={}));(function(i){i.quickOutlineActionLabel=y("quickOutlineActionLabel","Go to Symbol..."),i.quickOutlineByCategoryActionLabel=y("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(aP||(aP={}));(function(i){i.editorViewAccessibleLabel=y("editorViewAccessibleLabel","Editor content")})(lne||(lne={}));(function(i){i.toggleHighContrast=y("toggleHighContrast","Toggle High Contrast Theme")})(cne||(cne={}));(function(i){i.bulkEditServiceSummary=y("bulkEditServiceSummary","Made {0} edits in {1} files")})(une||(une={}))});var dne,RIe=D(()=>{ht();dne=At("workspaceTrustManagementService")});function fH(i,e=!1){pai(i,!1,e)}function pai(i,e,t){let n=mai(i,e);lP.push(n),n.userConfigured?Lut.push(n):FIe.push(n),t&&!n.userConfigured&&lP.forEach(o=>{o.mime===n.mime||o.userConfigured||(n.extension&&o.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&o.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&o.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&o.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function mai(i,e){return{id:i.id,mime:i.mime,filename:i.filename,extension:i.extension,filepattern:i.filepattern,firstline:i.firstline,userConfigured:e,filenameLowercase:i.filename?i.filename.toLowerCase():void 0,extensionLowercase:i.extension?i.extension.toLowerCase():void 0,filepatternLowercase:i.filepattern?kke(i.filepattern.toLowerCase()):void 0,filepatternOnPath:i.filepattern?i.filepattern.indexOf(Sr.sep)>=0:!1}}function Nut(){lP=lP.filter(i=>i.userConfigured),FIe=[]}function Mut(i,e){return gai(i,e).map(t=>t.id)}function gai(i,e){let t;if(i)switch(i.scheme){case Vt.file:t=i.fsPath;break;case Vt.data:{t=Wy.parseMetaData(i).get(Wy.META_DATA_LABEL);break}case Vt.vscodeNotebookCell:t=void 0;break;default:t=i.path}if(!t)return[{id:"unknown",mime:Ko.unknown}];t=t.toLowerCase();let n=_b(t),o=Iut(t,n,Lut);if(o)return[o,{id:fs,mime:Ko.text}];let r=Iut(t,n,FIe);if(r)return[r,{id:fs,mime:Ko.text}];if(e){let s=bai(e);if(s)return[s,{id:fs,mime:Ko.text}]}return[{id:"unknown",mime:Ko.unknown}]}function Iut(i,e,t){let n,o,r;for(let s=t.length-1;s>=0;s--){let a=t[s];if(e===a.filenameLowercase){n=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){let l=a.filepatternOnPath?i:e;a.filepatternLowercase?.(l)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&e.endsWith(a.extensionLowercase)&&(r=a)}if(n)return n;if(o)return o;if(r)return r}function bai(i){if(UF(i)&&(i=i.substr(1)),i.length>0)for(let e=lP.length-1;e>=0;e--){let t=lP[e];if(!t.firstline)continue;let n=i.match(t.firstline);if(n&&n.length>0)return t}}var lP,FIe,Lut,Rut=D(()=>{Ike();aE();xl();eA();Nc();Rt();sp();lP=[],FIe=[],Lut=[]});var hne,Fut,OIe,fne,Out=D(()=>{et();de();Rt();Rut();sp();Dy();fa();hne=Object.prototype.hasOwnProperty,Fut="vs.editor.nullLanguage",OIe=class{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Fut,0),this._register(fs,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;let t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Fut}},fne=class i extends H{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new OIe,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(lE.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Nut();let e=[].concat(lE.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(let t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(o=>{this._lowercaseNameMap[o.toLowerCase()]=n.identifier}),n.mimetypes.forEach(o=>{this._mimeTypesMap[o]=n.identifier})}),Qi.as(Tc.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){let t=e.id,n;hne.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){let n=t.id,o=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),o=t.mimetypes[0]),o||(o=`text/x-${n}`,e.mimetypes.push(o)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let a of t.extensions)fH({id:n,mime:o,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)fH({id:n,mime:o,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)fH({id:n,mime:o,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);tot(l)||fH({id:n,mime:o,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(n);let r=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?r=[null]:r=t.aliases),r!==null)for(let a of r)!a||a.length===0||e.aliases.push(a);let s=r!==null&&r.length>0;if(!(s&&r[0]===null)){let a=(s?r[0]:null)||n;(s||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?hne.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){let t=e.toLowerCase();return hne.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&hne.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Mut(e,t)}}});function ML(i=Ld){return(e,t)=>Zi(e,t,i)}function Put(){return(i,e)=>i.equals(e)}function pH(i,e,t){if(t!==void 0){let n=i;return n==null||e===void 0||e===null?e===n:t(n,e)}else{let n=i;return(o,r)=>o==null||r===void 0||r===null?r===o:n(o,r)}}function cP(i,e){if(i===e)return!0;if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(let t=0;t{Wt();Ld=(i,e)=>i===e});function Aai(i,e){let t=PIe.get(i);if(t)return t;let n=vai(i,e);if(n){let o=But.get(n)??0;o++,But.set(n,o);let r=o===1?n:`${n}#${o}`;return PIe.set(i,r),r}}function vai(i,e){let t=PIe.get(i);if(t)return t;let n=e.owner?wai(e.owner)+".":"",o,r=e.debugNameSource;if(r!==void 0)if(typeof r=="function"){if(o=r(),o!==void 0)return n+o}else return n+r;let s=e.referenceFn;if(s!==void 0&&(o=pne(s),o!==void 0))return n+o;if(e.owner!==void 0){let a=yai(e.owner,i);if(a!==void 0)return n+a}}function yai(i,e){for(let t in i)if(i[t]===e)return t}function wai(i){let e=Vut.get(i);if(e)return e;let t=xai(i),n=zut.get(t)??0;n++,zut.set(t,n);let o=n===1?t:`${t}#${n}`;return Vut.set(i,o),o}function xai(i){let e=i.constructor;return e?e.name:"Object"}function pne(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e);return(n?n[1]:void 0)?.trim()}var va,But,PIe,zut,Vut,uP=D(()=>{va=class{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return Aai(e,this)}},But=new Map,PIe=new WeakMap;zut=new Map,Vut=new WeakMap});function Wut(i){Hut=i}function bm(){return Hut}function Cai(i){let e=new Array,t=[],n="";function o(s){if("length"in s)for(let a of s)a&&o(a);else"text"in s?(n+=`%c${s.text}`,e.push(s.style),s.data&&t.push(...s.data)):"data"in s&&t.push(...s.data)}o(i);let r=[n,...e];return r.push(...t),r}function dP(i){return PA(i,{color:"black"})}function mH(i){return PA(Dai(`${i}: `,10),{color:"black",bold:!0})}function PA(i,e={color:"black"}){function t(o){return Object.entries(o).reduce((r,[s,a])=>`${r}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function gH(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?_ai(i,e):Sai(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function _ai(i,e){let t="[ ",n=!0;for(let o of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${gH(o,e-t.length)}`}return t+=" ]",t}function Sai(i,e){let t="{ ",n=!0;for(let[o,r]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${o}: ${gH(r,e-t.length)}`}return t+=" }",t}function Eai(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function Dai(i,e){for(;i.length{mne=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return Cai([dP(Eai("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[dP(" "),PA(gH(e.oldValue,70),{color:"red",strikeThrough:!0}),dP(" "),PA(gH(e.newValue,60),{color:"green"})]:[dP(" (unchanged)")]:[dP(" "),PA(gH(e.newValue,60),{color:"green"}),dP(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([mH("observable value changed"),PA(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return PA(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,o)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,o]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([mH("derived recomputed"),PA(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([mH("observable from event triggered"),PA(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,o)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,o]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([mH("autorun"),PA(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([mH("transaction"),PA(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}});function jut(i){Uut=i}function Gut(i){Qut=i}function qut(i){BIe=i}function fn(i,e){let t=new Yy(i,e);try{i(t)}finally{t.finish()}}function RL(i){if(gne)i(gne);else{let e=new Yy(i,void 0);gne=e;try{i(e)}finally{e.finish(),gne=void 0}}}async function bne(i,e){let t=new Yy(i,e);try{await i(t)}finally{t.finish()}}function Og(i,e,t){i?e(i):fn(e,t)}function Ut(i,e){let t;return typeof i=="string"?t=new va(void 0,i,void 0):t=new va(i,void 0,void 0),new fP(t,e,Ld)}function Ky(i,e){let t;return typeof i=="string"?t=new va(void 0,i,void 0):t=new va(i,void 0,void 0),new zIe(t,e,Ld)}var Uut,Qut,BIe,bH,BA,gne,Yy,fP,zIe,r0=D(()=>{qy();uP();hP();bH=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){let n=t===void 0?void 0:e,o=t===void 0?e:t;return BIe({owner:n,debugName:()=>{let r=pne(o);if(r!==void 0)return r;let a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());if(a)return`${this.debugName}.${a[2]}`;if(!n)return`${this.debugName} (mapped)`},debugReferenceFn:o},r=>o(this.read(r),r))}flatten(){return BIe({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,t){return e.add(Uut(this,t)),this}keepObserved(e){return e.add(Qut(this)),this}},BA=class extends bH{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};Yy=class{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],bm()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():pne(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this.updatingObservers;for(let t=0;t{},()=>`Setting ${this.debugName}`));try{let r=this._value;this._setValue(e),bm()?.handleObservableChanged(this,{oldValue:r,newValue:e,change:n,didChange:!0,hadValue:!0});for(let s of this.observers)t.updateObserver(s,this),s.handleChange(this,n)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};zIe=class extends fP{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}});function at(i,e){return e!==void 0?new jx(new va(i,void 0,e),e,void 0,void 0,void 0,Ld):new jx(new va(void 0,void 0,i),i,void 0,void 0,void 0,Ld)}function Jy(i,e,t){return new VIe(new va(i,void 0,e),e,void 0,void 0,void 0,Ld,t)}function ec(i,e){return new jx(new va(i.owner,i.debugName,i.debugReferenceFn),e,void 0,void 0,i.onLastObserverRemoved,i.equalsFn??Ld)}function AH(i,e){return new jx(new va(i.owner,i.debugName,void 0),e,i.createEmptyChangeSummary,i.handleChange,void 0,i.equalityComparer??Ld)}function ph(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let o=new se;return new jx(new va(n,void 0,t),r=>(o.clear(),t(r,o)),void 0,void 0,()=>o.dispose(),Ld)}function ya(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let o;return new jx(new va(n,void 0,t),r=>{o?o.clear():o=new se;let s=t(r);return s&&o.add(s),s},void 0,void 0,()=>{o&&(o.dispose(),o=void 0)},Ld)}var jx,VIe,hf=D(()=>{Gb();qy();de();r0();uP();hP();qut(ec);jx=class extends BA{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,o,r=void 0,s){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=n,this._handleChange=o,this._handleLastObserverRemoved=r,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),bm()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(this.observers.size===0){let e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}else{do{if(this.state===1){for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){if(this.state===3)return;let e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;let t=this.state!==0,n=this.value;this.state=3;let o=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,o)}finally{for(let s of this.dependenciesToBeRemoved)s.removeObserver(this);this.dependenciesToBeRemoved.clear()}let r=t&&!this._equalityComparator(n,this.value);if(bm()?.handleDerivedRecomputed(this,{oldValue:n,newValue:this.value,change:void 0,didChange:r,hadValue:t}),r)for(let s of this.observers)s.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}Qb(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0,o=this.state===3;if(n&&(this.state===1||o)&&(this.state=2,o))for(let r of this.observers)r.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}},VIe=class extends jx{constructor(e,t,n,o,r=void 0,s,a){super(e,t,n,o,r,s),this.set=a}}});function Ct(i){return new pP(new va(void 0,void 0,i),i,void 0,void 0)}function Xy(i,e){return new pP(new va(i.owner,i.debugName,i.debugReferenceFn??e),e,void 0,void 0)}function Qx(i,e){return new pP(new va(i.owner,i.debugName,i.debugReferenceFn??e),e,i.createEmptyChangeSummary,i.handleChange)}function HIe(i,e){let t=new se,n=Qx({owner:i.owner,debugName:i.debugName,debugReferenceFn:i.debugReferenceFn??e,createEmptyChangeSummary:i.createEmptyChangeSummary,handleChange:i.handleChange},(o,r)=>{t.clear(),e(o,r,t)});return He(()=>{n.dispose(),t.dispose()})}function es(i){let e=new se,t=Xy({owner:void 0,debugName:void 0,debugReferenceFn:i},n=>{e.clear(),i(n,e)});return He(()=>{t.dispose(),e.dispose()})}var pP,WIe=D(()=>{Gb();de();uP();hP();pP=class{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,o){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=o,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),bm()?.handleAutorunCreated(this),this._runIfNeeded(),mk(this)}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),gk(this)}_runIfNeeded(){if(this.state===3)return;let e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;let t=this.disposed;try{if(!t){bm()?.handleAutorunTriggered(this);let n=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,n)}}finally{t||bm()?.handleAutorunFinished(this);for(let n of this.dependenciesToBeRemoved)n.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,Qb(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=pP})(Ct||(Ct={}))});function tc(i){return new UIe(i)}function Ri(...i){let e,t,n;return i.length===3?[e,t,n]=i:[t,n]=i,new Zy(new va(e,void 0,n),t,n,()=>Zy.globalTransaction,Ld)}function Yut(i,e,t){return new Zy(new va(i.owner,i.debugName,i.debugReferenceFn??t),e,t,()=>Zy.globalTransaction,i.equalsFn??Ld)}function gs(i,e){return new jIe(i,e)}function Pg(i){return typeof i=="string"?new Ane(i):new Ane(void 0,i)}function Kut(i){let e=new vne(!1,void 0);return i.addObserver(e),He(()=>{i.removeObserver(e)})}function s0(i,e){let t=new vne(!0,e);return i.addObserver(t),e?e(i.get()):i.reportChanges(),He(()=>{i.removeObserver(t)})}function $y(i,e){let t;return ec({owner:i,debugReferenceFn:e},o=>(t=e(o,t),t))}function Jut(i,e,t,n){let o=new yne(t,n);return ec({debugReferenceFn:t,owner:i,onLastObserverRemoved:()=>{o.dispose(),o=new yne(t)}},s=>(o.setItems(e.read(s)),o.getItems()))}function Xut(i,e){return $y(i,(t,n)=>n??e(t))}var UIe,Zy,jIe,Ane,vne,yne,vH=D(()=>{et();de();r0();uP();hf();hP();qy();UIe=class extends bH{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};Zy=class extends BA{constructor(e,t,n,o,r){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=o,this._equalityComparator=r,this.hasValue=!1,this.handleEvent=s=>{let a=this._getValue(s),l=this.value,c=!this.hasValue||!this._equalityComparator(l,a),u=!1;c&&(this.value=a,this.hasValue&&(u=!0,Og(this._getTransaction(),d=>{bm()?.handleFromEventObservableTriggered(this,{oldValue:l,newValue:a,change:void 0,didChange:c,hadValue:this.hasValue});for(let h of this.observers)d.updateObserver(h,this),h.handleChange(this,void 0)},()=>{let d=this.getDebugName();return"Event fired"+(d?`: ${d}`:"")})),this.hasValue=!0),u||bm()?.handleFromEventObservableTriggered(this,{oldValue:l,newValue:a,change:void 0,didChange:c,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}};(function(i){i.Observer=Zy;function e(t,n){let o=!1;Zy.globalTransaction===void 0&&(Zy.globalTransaction=t,o=!0);try{n()}finally{o&&(Zy.globalTransaction=void 0)}}i.batchEventsGlobally=e})(Ri||(Ri={}));jIe=class extends BA{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{fn(n=>{for(let o of this.observers)n.updateObserver(o,this),o.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};Ane=class extends BA{get debugName(){return new va(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){fn(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};Gut(Kut);jut(s0);vne=class{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}};yne=class{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let t=[],n=new Set(this._cache.keys());for(let o of e){let r=this._keySelector?this._keySelector(o):o,s=this._cache.get(r);if(s)n.delete(r);else{let a=new se;s={out:this._map(o,a),store:a},this._cache.set(r,s)}t.push(s.out)}for(let o of n)this._cache.get(o).store.dispose(),this._cache.delete(o);this._items=t}getItems(){return this._items}}});function wH(i,e,t,n){return e||(e=o=>o!=null),new Promise((o,r)=>{let s=!0,a=!1,l=i.map(u=>({isFinished:e(u),error:t?t(u):!1,state:u})),c=Ct(u=>{let{isFinished:d,error:h,state:f}=l.read(u);(d||h)&&(s?a=!0:c.dispose(),h?r(h===!0?f:h):o(f))});if(n){let u=n.onCancellationRequested(()=>{c.dispose(),u.dispose(),r(new qc)});if(n.isCancellationRequested){c.dispose(),u.dispose(),r(new qc);return}}s=!1,a&&c.dispose()})}var FL,yH,Zut=D(()=>{WIe();r0();Tt();FL=class i{static fromFn(e){return new i(e())}constructor(e){this._value=Ut(this,void 0),this.promiseResult=this._value,this.promise=e.then(t=>(fn(n=>{this._value.set(new yH(t,void 0),n)}),t),t=>{throw fn(n=>{this._value.set(new yH(void 0,t),n)}),t})}},yH=class{constructor(e,t){this.data=e,this.error=t}}});var wne,$ut=D(()=>{r0();wne=class extends BA{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,n){super(),this._debugNameData=e,this._equalityComparator=n,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this.observers)for(let t of this._deltas)e.handleChange(this,t);this._deltas.length=0}else for(let e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(let e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();let e=[...this.observers];for(let t of e)t.endUpdate(this)}}addObserver(e){let t=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let o;t||(t=o=new Yy(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),n!==void 0&&this._deltas.push(n),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(r,s)=>{},handlePossibleChange:r=>{}},this),this._updateCounter>1)for(let r of this.observers)r.handlePossibleChange(this)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}});function mP(i,e){return i.lazy?new wne(new va(i.owner,i.debugName,void 0),e,i.equalsFn??Ld):new fP(new va(i.owner,i.debugName,void 0),e,i.equalsFn??Ld)}var edt=D(()=>{qy();r0();uP();$ut()});var Tai,In=D(()=>{r0();hf();WIe();vH();Zut();edt();hP();Tai=!1;Tai&&Wut(new mne)});var xne,Cne,tdt=D(()=>{et();de();Out();Wt();ro();sp();In();xne=class i extends H{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new q),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new q),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new q({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,i.instanceCount++,this._registry=this._register(new fne(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){i.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){let n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return mO(n,null)}createById(e){return new Cne(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new Cne(this.onDidChange,()=>{let n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=fs),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Gn.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}},Cne=class{constructor(e,t){this._value=Ri(this,e,()=>t()),this.onDidChange=Ee.fromObservable(this._value)}get languageId(){return this._value.get()}}});var OE,_ne=D(()=>{aE();OE={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Ko.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}});function idt(i){Sne=i}function Mr(i){return i==="element"?Lai.value:Iai.value}function a0(){return Sne("element",!0)}var kai,Sne,Iai,Lai,ic=D(()=>{CA();kai=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}}),Sne=kai,Iai=new $s(()=>Sne("mouse",!1)),Lai=new $s(()=>Sne("element",!1))});function odt(i){ndt=i}function nc(){return ndt}var ndt,Bg=D(()=>{ndt={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}}});var Ene,rdt=D(()=>{Ene=class{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(o=>o.splice(e,t,n))}}});var QIe=D(()=>{});var e1,sdt=D(()=>{e1=class extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}});function adt(i,e){let t=[];for(let n of e){if(i.start>=n.range.end)continue;if(i.ende.concat(t),[]))}var Dne,ldt=D(()=>{oH();Dne=class{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){let o=n.length-t,r=adt({start:0,end:e},this.groups),s=adt({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:Tne(l.range,o),size:l.size})),a=n.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=Mai(r,a,s),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{Ye();kne=class{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),n=!1;if(t)n=this.transactionNodesPendingRemoval.has(t.domNode),n&&this.transactionNodesPendingRemoval.delete(t.domNode);else{let o=xe(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(o);t={domNode:o,templateId:e,templateData:s}}return{row:t,isReusingConnectedDomNode:n}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:n}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(n).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}});function Rai(i,e){return Array.isArray(i)&&Array.isArray(e)?Zi(i,e):i===e}var qx,OL,t1,Gx,GIe,qIe,YIe,zg,Ine=D(()=>{_ne();Ye();n0();cp();Mg();Wt();Gt();xE();et();de();oH();GO();ldt();cdt();Tt();bL();qx=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},OL={CurrentDragAndDropData:void 0},t1={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(i){return[i]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0},Gx=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},GIe=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},qIe=class{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;to,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}},zg=class i{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:F$(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,o=t1){if(this.virtualDelegate=t,this.domId=`list_id_${++i.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new da(50),this.splicing=!1,this.dragOverAnimationStopDisposable=H.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=H.None,this.onDragLeaveTimeout=H.None,this.disposables=new se,this._onDidChangeContentHeight=new q,this._onDidChangeContentWidth=new q,this.onDidChangeContentHeight=Ee.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,o.horizontalScrolling&&o.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(o.paddingTop??0);for(let s of n)this.renderers.set(s.templateId,s);this.cache=this.disposables.add(new kne(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof o.mouseSupport=="boolean"?o.mouseSupport:!0),this._horizontalScrolling=o.horizontalScrolling??t1.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof o.paddingBottom>"u"?0:o.paddingBottom,this.accessibilityProvider=new YIe(o.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(o.transformOptimization??t1.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(Lr.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new Ng({forceIntegerValues:!0,smoothScrollDuration:o.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:s=>Cl(rt(this.domNode),s)})),this.scrollableElement=this.disposables.add(new Py(this.rowsContainer,{alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel??t1.alwaysConsumeMouseWheel,horizontal:1,vertical:o.verticalScrollMode??t1.verticalScrollMode,useShadows:o.useShadows??t1.useShadows,mouseWheelScrollSensitivity:o.mouseWheelScrollSensitivity,fastScrollSensitivity:o.fastScrollSensitivity,scrollByPage:o.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(ce(this.rowsContainer,Tn.Change,s=>this.onTouchChange(s))),this.disposables.add(ce(this.scrollableElement.getDomNode(),"scroll",s=>s.target.scrollTop=0)),this.disposables.add(ce(this.domNode,"dragover",s=>this.onDragOver(this.toDragEvent(s)))),this.disposables.add(ce(this.domNode,"drop",s=>this.onDrop(this.toDragEvent(s)))),this.disposables.add(ce(this.domNode,"dragleave",s=>this.onDragLeave(this.toDragEvent(s)))),this.disposables.add(ce(this.domNode,"dragend",s=>this.onDragEnd(s))),this.setRowLineHeight=o.setRowLineHeight??t1.setRowLineHeight,this.setRowHeight=o.setRowHeight??t1.setRowHeight,this.supportDynamicHeights=o.supportDynamicHeights??t1.supportDynamicHeights,this.dnd=o.dnd??this.disposables.add(t1.dnd),this.layout(o.initialSize?.height,o.initialSize?.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){let n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+o),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new Dne(e)}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){let o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},s=Nl.intersect(o,r),a=new Map;for(let E=s.end-1;E>=s.start;E--){let I=this.items[E];if(I.dragStartDisposable.dispose(),I.checkedDisposable.dispose(),I.row){let T=a.get(I.templateId);T||(T=[],a.set(I.templateId,T));let N=this.renderers.get(I.templateId);N&&N.disposeElement&&N.disposeElement(I.element,E,I.row.templateData,I.size),T.unshift(I.row)}I.row=null,I.stale=!0}let l={start:e+t,end:this.items.length},c=Nl.intersect(l,o),u=Nl.relativeComplement(l,o),d=n.map(E=>({id:String(this.itemId++),element:E,templateId:this.virtualDelegate.getTemplateId(E),size:this.virtualDelegate.getHeight(E),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(E),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:H.None,checkedDisposable:H.None,stale:!1})),h;e===0&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));let f=n.length-t,p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),g=Tne(c,f),A=Nl.intersect(p,g);for(let E=A.start;ETne(E,f)),_=[{start:e,end:e+n.length},...w].map(E=>Nl.intersect(p,E)).reverse();for(let E of _)for(let I=E.end-1;I>=E.start;I--){let T=this.items[I],L=a.get(T.templateId)?.pop();this.insertItemInDOM(I,L)}for(let E of a.values())for(let I of E)this.cache.release(I);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map(E=>E.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Cl(rt(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:typeof e=="number"?e:pot(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:F$(this.domNode)})}render(e,t,n,o,r,s=!1){let a=this.getRenderRange(t,n),l=Nl.relativeComplement(a,e).reverse(),c=Nl.relativeComplement(e,a);if(s){let u=Nl.intersect(e,a);for(let d=u.start;d{for(let u of c)for(let d=u.start;d=u.start;d--)this.insertItemInDOM(d)}),o!==void 0&&(this.rowsContainer.style.left=`-${o}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&r!==void 0&&(this.rowsContainer.style.width=`${Math.max(r,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=n}insertItemInDOM(e,t){let n=this.items[e];if(!n.row)if(t)n.row=t,n.stale=!0;else{let l=this.cache.alloc(n.templateId);n.row=l.row,n.stale||=l.isReusingConnectedDomNode}let o=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",o);let r=this.accessibilityProvider.isChecked(n.element);if(typeof r=="boolean")n.row.domNode.setAttribute("aria-checked",String(!!r));else if(r){let l=c=>n.row.domNode.setAttribute("aria-checked",String(!!c));l(r.value),n.checkedDisposable=r.onDidChange(()=>l(r.value))}if(n.stale||!n.row.domNode.parentElement){let l=this.items.at(e+1)?.row?.domNode??null;(n.row.domNode.parentElement!==this.rowsContainer||n.row.domNode.nextElementSibling!==l)&&this.rowsContainer.insertBefore(n.row.domNode,l),n.stale=!1}this.updateItemInDOM(n,e);let s=this.renderers.get(n.templateId);if(!s)throw new Error(`No renderer found for template id ${n.templateId}`);s?.renderElement(n.element,e,n.row.templateData,n.size);let a=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!a,a&&(n.dragStartDisposable=ce(n.row.domNode,"dragstart",l=>this.onDragStart(n.element,a,l))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=F$(e.row.domNode);let t=rt(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){let t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Ee.map(this.disposables.add(new bi(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Ee.map(this.disposables.add(new bi(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Ee.filter(Ee.map(this.disposables.add(new bi(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Ee.map(this.disposables.add(new bi(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Ee.map(this.disposables.add(new bi(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Ee.map(this.disposables.add(new bi(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Ee.any(Ee.map(this.disposables.add(new bi(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Ee.map(this.disposables.add(new bi(this.domNode,Tn.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Ee.map(this.disposables.add(new bi(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Ee.map(this.disposables.add(new bi(this.rowsContainer,Tn.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element,r=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:o,sector:r}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){if(!n.dataTransfer)return;let o=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(OE.TEXT,t),n.dataTransfer.setDragImage){let r;this.dnd.getDragLabel&&(r=this.dnd.getDragLabel(o,n)),typeof r>"u"&&(r=String(o.length));let s=xe(".monaco-drag-image");s.textContent=r,(c=>{for(;c&&!c.classList.contains("monaco-workbench");)c=c.parentElement;return c||this.domNode.ownerDocument})(this.domNode).appendChild(s),n.dataTransfer.setDragImage(s,-10,-10),setTimeout(()=>s.remove(),0)}this.domNode.classList.add("dragging"),this.currentDragData=new Gx(o),OL.CurrentDragAndDropData=new GIe(o),this.dnd.onDragStart?.(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),OL.CurrentDragAndDropData&&OL.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(OL.CurrentDragAndDropData)this.currentDragData=OL.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new qIe}let t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect?.type===0?"copy":"move";let n;typeof t!="boolean"&&t.feedback?n=t.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=tf(n).filter(r=>r>=-1&&rr-s),n=n[0]===-1?[-1]:n;let o=typeof t!="boolean"&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(Rai(this.currentDragFeedback,n)&&this.currentDragFeedbackPosition===o)return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackPosition=o,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add(o),this.rowsContainer.classList.add(o),this.currentDragFeedbackDisposable=He(()=>{this.domNode.classList.remove(o),this.rowsContainer.classList.remove(o)});else{if(n.length>1&&o!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");o==="drop-target-after"&&n[0]{for(let r of n){let s=this.items[r];s.dropTarget=!1,s.row?.domNode.classList.remove(o)}})}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=tm(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,OL.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,OL.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=H.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let t=M$(this.domNode).top;this.dragOverAnimationDisposable=Sot(rt(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=tm(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;let t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;let n=e.offsetY/this.items[t].size,o=Math.floor(n/.25);return Ll(o,0,3)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),n=e;for(;(To(n)||Aot(n))&&n!==this.rowsContainer&&t.contains(n);){let o=n.getAttribute("data-index");if(o){let r=Number(o);if(!isNaN(r))return r}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){let o=this.getRenderRange(e,t),r,s;e===this.elementTop(o.start)?(r=o.start,s=0):o.end-o.start>1&&(r=o.start+1,s=this.elementTop(r)-e);let a=0;for(;;){let l=this.getRenderRange(e,t),c=!1;for(let u=l.start;u=h.start;f--)this.insertItemInDOM(f);for(let h=l.start;h=0&&i[o]===e-(t-o);)n.push(i[o--]);for(n.reverse(),o=t;o=i.length)t.push(e[o++]);else if(o>=e.length)t.push(i[n++]);else if(i[n]===e[o]){t.push(i[n]),n++,o++;continue}else i[n]=i.length)t.push(e[o++]);else if(o>=e.length)t.push(i[n++]);else if(i[n]===e[o]){n++,o++;continue}else i[n]{Ye();n0();xc();cp();Zl();rdt();Wt();Gt();Wr();xE();et();Rg();de();bL();wi();gn();QIe();sdt();Ine();$p();In();PE=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},KIe=class{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){let o=this.renderedElements.findIndex(r=>r.templateData===n);if(o>=0){let r=this.renderedElements[o];this.trait.unrender(n),r.index=t}else{let r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)}splice(e,t,n){let o=[];for(let r of this.renderedElements)r.index=e+t&&o.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=o}renderIndexes(e){for(let{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){let t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}},AP=class{get name(){return this._trait}get renderer(){return new KIe(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new q,this.onChange=this._onChange.event}splice(e,t,n){let o=n.length-t,r=e+t,s=[],a=0;for(;a=r;)s.push(this.sortedIndexes[a++]+o);this.renderer.splice(e,t,n.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(ddt),t)}_set(e,t,n){let o=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;let s=$Ie(r,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:n}),o}get(){return this.indexes}contains(e){return Dx(this.sortedIndexes,e,ddt)>=0}dispose(){Oi(this._onChange)}};PE([ar],AP.prototype,"renderer",null);JIe=class extends AP{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}},xH=class{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));let o=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(o.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));let r=new Set(o),s=n.map(a=>r.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,s)}};Lne=class{get onKeyDown(){return Ee.chain(this.disposables.add(new bi(this.view.domNode,"keydown")).event,e=>e.filter(t=>!Yx(t.target)).map(t=>new Vi(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new se,this.multipleSelectionDisposables=new se,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(o=>{switch(o.keyCode){case 3:return this.onEnter(o);case 16:return this.onUpArrow(o);case 18:return this.onDownArrow(o);case 11:return this.onPageUpArrow(o);case 12:return this.onPageDownArrow(o);case 9:return this.onEscape(o);case 31:this.multipleSelectionSupport&&(jt?o.metaKey:o.ctrlKey)&&this.onCtrlA(o)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(ru(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}};PE([ar],Lne.prototype,"onKeyDown",null);(function(i){i[i.Automatic=0]="Automatic",i[i.Trigger=1]="Trigger"})(zA||(zA={}));(function(i){i[i.Idle=0]="Idle",i[i.Typing=1]="Typing"})(bP||(bP={}));Fai=new class{mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey||i.altKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30||i.keyCode>=98&&i.keyCode<=107||i.keyCode>=85&&i.keyCode<=95}},XIe=class{constructor(e,t,n,o,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=o,this.delegate=r,this.enabled=!1,this.state=bP.Idle,this.mode=zA.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new se,this.disposables=new se,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??zA.Automatic}enable(){if(this.enabled)return;let e=!1,t=Ee.chain(this.enabledDisposables.add(new bi(this.view.domNode,"keydown")).event,r=>r.filter(s=>!Yx(s.target)).filter(()=>this.mode===zA.Automatic||this.triggered).map(s=>new Vi(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(s=>mi.stop(s,!0)).map(s=>s.browserEvent.key)),n=Ee.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Ee.reduce(Ee.any(t,n),(r,s)=>s===null?null:(r||"")+s,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){let e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){let t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));typeof t=="string"?ms(t):t&&ms(t.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=bP.Idle,this.triggered=!1;return}let t=this.list.getFocus(),n=t.length>0?t[0]:0,o=this.state===bP.Idle?1:0;this.state=bP.Typing;for(let r=0;r1&&c.length===1){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}else if(typeof l>"u"||CL(e,l)){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}},ZIe=class{constructor(e,t){this.list=e,this.view=t,this.disposables=new se;let n=Ee.chain(this.disposables.add(new bi(t.domNode,"keydown")).event,r=>r.filter(s=>!Yx(s.target)).map(s=>new Vi(s)));Ee.chain(n,r=>r.filter(s=>s.keyCode===2&&!s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;let t=this.list.getFocus();if(t.length===0)return;let n=this.view.domElement(t[0]);if(!n)return;let o=n.querySelector("[tabIndex]");if(!o||!To(o)||o.tabIndex===-1)return;let r=rt(o).getComputedStyle(o);r.visibility==="hidden"||r.display==="none"||(e.preventDefault(),e.stopPropagation(),o.focus())}dispose(){this.disposables.dispose()}};udt={isSelectionSingleChangeEvent:oLe,isSelectionRangeChangeEvent:rLe},CH=class{constructor(e){this.list=e,this.disposables=new se,this._onPointer=new q,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||udt),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Lr.addTarget(e.getHTMLElement()))),Ee.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||udt))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){gP(e.browserEvent.target)||ds()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Yx(e.browserEvent.target)||gP(e.browserEvent.target))return;let t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||Yx(e.browserEvent.target)||gP(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Oai(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(Yx(e.browserEvent.target)||gP(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){let t=e.index,n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof n>"u"&&(n=this.list.getFocus()[0]??t,this.list.setAnchor(n));let o=Math.min(n,t),r=Math.max(n,t),s=ru(o,r+1),a=this.list.getSelection(),l=Bai($Ie(a,[n]),n);if(l.length===0)return;let c=$Ie(s,zai(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){let o=this.list.getSelection(),r=o.filter(s=>s!==t);this.list.setFocus([t]),this.list.setAnchor(t),o.length===r.length?this.list.setSelection([...r,t],e.browserEvent):this.list.setSelection(r,e.browserEvent)}}dispose(){this.disposables.dispose()}},_H=class{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){let t=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(` .monaco-drag-image, .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } `),e.listFocusAndSelectionForeground&&n.push(` .monaco-drag-image, .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } - `),e.listInactiveFocusForeground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);let r=sg(e.listFocusAndSelectionOutline,sg(e.listSelectionOutline,e.listFocusOutline??""));r&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),e.listFocusOutline&&n.push(` + `),e.listInactiveFocusForeground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);let o=yg(e.listFocusAndSelectionOutline,yg(e.listSelectionOutline,e.listFocusOutline??""));o&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),e.listFocusOutline&&n.push(` .monaco-drag-image, .monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } - `);let o=sg(e.listSelectionOutline,e.listInactiveFocusOutline??"");o&&n.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${o}; outline-offset: -1px; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&n.push(` + `);let r=yg(e.listSelectionOutline,e.listInactiveFocusOutline??"");r&&n.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${r}; outline-offset: -1px; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&n.push(` .monaco-list${t}.drop-target, .monaco-list${t} .monaco-list-rows.drop-target, .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; } @@ -473,17 +473,17 @@ ${e} background-color: ${e.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=n.join(` -`)}},aft={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:pe.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:pe.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:pe.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},Ubi={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};rft=(i,e)=>i-e,LIe=class{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,r){let o=0;for(let s of this.renderers)s.renderElement(e,t,n[o++],r)}disposeElement(e,t,n,r){let o=0;for(let s of this.renderers)s.disposeElement?.(e,t,n[o],r),o+=1}disposeTemplate(e){let t=0;for(let n of this.renderers)n.disposeTemplate(e[t++])}},NIe=class{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new te}}renderElement(e,t,n){let r=this.accessibilityProvider.getAriaLabel(e),o=r&&typeof r!="string"?r:Xl(r);n.disposables.add(_t(a=>{this.setAriaLabel(a.readObservable(o),n.container)}));let s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?n.container.setAttribute("aria-level",`${s}`):n.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,n,r){n.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}},MIe=class{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,n,r,o){return this.dnd.onDragOver(e,t,n,r,o)}onDragLeave(e,t,n,r){this.dnd.onDragLeave?.(e,t,n,r)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,n,r,o){this.dnd.drop(e,t,n,r,o)}dispose(){this.dnd.dispose()}},il=class{get onDidChangeFocus(){return Se.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Se.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=Se.chain(this.disposables.add(new wi(this.view.domNode,"keydown")).event,o=>o.map(s=>new Wi(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>Ai.stop(s,!0)).filter(()=>!1)),n=Se.chain(this.disposables.add(new wi(this.view.domNode,"keyup")).event,o=>o.forEach(()=>e=!1).map(s=>new Wi(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>Ai.stop(s,!0)).map(({browserEvent:s})=>{let a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,u=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:u,browserEvent:s}})),r=Se.chain(this.view.onContextMenu,o=>o.filter(s=>!e).map(({element:s,index:a,browserEvent:l})=>({element:s,index:a,anchor:new gl(rt(this.view.domNode),l),browserEvent:l})));return Se.any(t,n,r)}get onKeyDown(){return this.disposables.add(new wi(this.view.domNode,"keydown")).event}get onDidFocus(){return Se.signal(this.disposables.add(new wi(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return Se.signal(this.disposables.add(new wi(this.view.domNode,"blur",!0)).event)}constructor(e,t,n,r,o=Ubi){this.user=e,this._options=o,this.focus=new EO("focused"),this.anchor=new EO("anchor"),this.eventBufferer=new ab,this._ariaLabel="",this.disposables=new te,this._onDidDispose=new G,this.onDidDispose=this._onDidDispose.event;let s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new DIe(s!=="listbox");let a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new NIe(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),r=r.map(c=>new LIe(c.templateId,[...a,c]));let l={...o,dnd:o.dnd&&new MIe(this,o.dnd)};if(this.view=this.createListView(t,n,r,l),this.view.domNode.setAttribute("role",s),o.styleController)this.styleController=o.styleController(this.view.domId);else{let c=Xa(this.view.domNode);this.styleController=new Gz(c,this.view.domId)}if(this.spliceable=new rie([new jz(this.focus,this.view,o.identityProvider),new jz(this.selection,this.view,o.identityProvider),new jz(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new kIe(this,this.view)),(typeof o.keyboardSupport!="boolean"||o.keyboardSupport)&&(this.keyboardController=new cie(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){let c=o.keyboardNavigationDelegate||Hbi;this.typeNavigationController=new TIe(this,this.view,o.keyboardNavigationLabelProvider,o.keyboardNavigationEventFilter??(()=>!0),c),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,r){return new Sg(e,t,n,r)}createMouseController(e){return new Qz(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new Oy(this.user,`Invalid start index: ${e}`);if(t<0)throw new Oy(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let n of e)if(n<0||n>=this.length)throw new Oy(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new Oy(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return CF(this.anchor.get(),void 0)}getAnchorElement(){let e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(let n of e)if(n<0||n>=this.length)throw new Oy(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,r){if(this.length===0)return;let o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,r);s>-1&&this.setFocus([s],n)}focusPrevious(e=1,t=!1,n,r){if(this.length===0)return;let o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,r);s>-1&&this.setFocus([s],n)}async focusNextPage(e,t){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;let r=this.getFocus()[0];if(r!==n&&(r===void 0||n>r)){let o=this.findPreviousIndex(n,!1,t);o>-1&&r!==o?this.setFocus([o],e):this.setFocus([n],e)}else{let o=this.view.getScrollTop(),s=o+this.view.renderHeight;n>r&&(s-=this.view.elementHeight(n)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),await Jd(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,n=()=>0){let r,o=n(),s=this.view.getScrollTop()+o;s===0?r=this.view.indexAt(s):r=this.view.indexAfter(s-1);let a=this.getFocus()[0];if(a!==r&&(a===void 0||a>=r)){let l=this.findNextIndex(r,!1,t);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([r],e)}else{let l=s;this.view.setScrollTop(s-this.view.renderHeight-o),this.view.getScrollTop()+n()!==l&&(this.setFocus([]),await Jd(0),await this.focusPreviousPage(e,t,n))}}focusLast(e,t){if(this.length===0)return;let n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;let r=this.findNextIndex(e,!1,n);r>-1&&this.setFocus([r],t)}findNextIndex(e,t=!1,n){for(let r=0;r=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let r=0;rthis.view.element(e))}reveal(e,t,n=0){if(e<0||e>=this.length)throw new Oy(this.user,`Invalid index ${e}`);let r=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if(Tp(t)){let a=s-this.view.renderHeight+n;this.view.setScrollTop(a*El(t,0,1)+o-n)}else{let a=o+s,l=r+this.view.renderHeight;o=l||(o=l&&s>=this.view.renderHeight?this.view.setScrollTop(o-n):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new Oy(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),r=this.view.elementTop(e),o=this.view.elementHeight(e);if(rn+this.view.renderHeight)return null;let s=o-this.view.renderHeight+t;return Math.abs((n+t-r)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){let e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}};fE([ro],il.prototype,"onDidChangeFocus",null);fE([ro],il.prototype,"onDidChangeSelection",null);fE([ro],il.prototype,"onContextMenu",null);fE([ro],il.prototype,"onKeyDown",null);fE([ro],il.prototype,"onDidFocus",null);fE([ro],il.prototype,"onDidBlur",null)});var lft=D(()=>{});var nL,cft,PIe,uie,uft=D(()=>{Ye();jb();gc();xz();_g();Zl();_x();Qt();et();Ep();ae();Si();lft();Oe();nL=we,cft="selectOption.entry.template",PIe=class{get templateId(){return cft}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=be(e,nL(".option-text")),t.detail=be(e,nL(".option-detail")),t.decoratorRight=be(e,nL(".option-decorator-right")),t}renderElement(e,t,n){let r=n,o=e.text,s=e.detail,a=e.decoratorRight,l=e.isDisabled;r.text.textContent=o,r.detail.textContent=s||"",r.decoratorRight.innerText=a||"",l?r.root.classList.add("option-disabled"):r.root.classList.remove("option-disabled")}disposeTemplate(e){}},uie=class i extends W{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,n,r,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=r,this.selectBoxOptions=o||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=i.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new G,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register($l().setupManagedHover(ko("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return cft}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=we(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=be(this.selectDropDownContainer,nL(".select-box-details-pane"));let t=be(this.selectDropDownContainer,nL(".select-box-dropdown-container-width-control")),n=be(t,nL(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",be(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Xa(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(re(this.selectDropDownContainer,De.DRAG_START,r=>{Ai.stop(r,!0)}))}registerListeners(){this._register(cn(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(re(this.selectElement,De.CLICK,t=>{Ai.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(re(this.selectElement,De.MOUSE_DOWN,t=>{Ai.stop(t)}));let e;this._register(re(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(re(this.selectElement,"touchend",t=>{Ai.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(re(this.selectElement,De.KEY_DOWN,t=>{let n=new Wi(t),r=!1;qt?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(r=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(r=!0),r&&(this.showSelectDropDown(),Ai.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Zi(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,r)=>{this.selectElement.add(this.createOption(n.text,r,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` -`)}styleSelectElement(){let e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",n=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=n}styleList(){let e=this.styles.selectBackground??"",t=sg(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;let n=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=n,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){let r=document.createElement("option");return r.value=e,r.text=e,r.disabled=!!n,r}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");let t=rt(this.selectElement),n=bn(this.selectElement),r=rt(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(r.getPropertyValue("--dropdown-padding-top"))+parseFloat(r.getPropertyValue("--dropdown-padding-bottom")),s=t.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),a=n.top-i.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),u=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=u,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let h=this._hasDetails?this._cachedMaxDetailsHeight:0,f=d+o+h,p=Math.floor((s-o-h)/this.getHeight()),g=Math.floor((a-o-h)/this.getHeight());if(e)return n.top+n.height>t.innerHeight-22||n.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>t.innerHeight-22||n.tops&&(d=p*this.getHeight())}else f>a&&(d=g*this.getHeight());return this.selectList.layout(d),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=d+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=d+o+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=u,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,r=0;this.options.forEach((o,s)=>{let a=o.detail?o.detail.length:0,l=o.decoratorRight?o.decoratorRight.length:0,c=o.text.length+a+l;c>r&&(n=s,r=c)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=bc(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=be(e,nL(".select-box-dropdown-list-container")),this.listRenderer=new PIe,this.selectList=this._register(new il("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:r=>{let o=r.text;return r.detail&&(o+=`. ${r.detail}`),r.decoratorRight&&(o+=`. ${r.decoratorRight}`),r.description&&(o+=`. ${r.description}`),o},getWidgetAriaLabel:()=>y({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>qt?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new wi(this.selectDropDownListContainer,"keydown")),n=Se.chain(t.event,r=>r.filter(()=>this.selectList.length>0).map(o=>new Wi(o)));this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===3))(this.onEnter,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===2))(this.onEnter,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===9))(this.onEscape,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===16))(this.onUpArrow,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===18))(this.onDownArrow,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===12))(this.onPageDown,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===11))(this.onPageUp,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===14))(this.onHome,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode===13))(this.onEnd,this)),this._register(Se.chain(n,r=>r.filter(o=>o.keyCode>=21&&o.keyCode<=56||o.keyCode>=85&&o.keyCode<=113))(this.onCharacter,this)),this._register(re(this.selectList.getHTMLElement(),De.POINTER_UP,r=>this.onPointerUp(r))),this._register(this.selectList.onMouseOver(r=>typeof r.index<"u"&&this.selectList.setFocus([r.index]))),this._register(this.selectList.onDidChangeFocus(r=>this.onListFocus(r))),this._register(re(this.selectDropDownContainer,De.FOCUS_OUT,r=>{!this._isVisible||Co(r.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;Ai.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let n=t.closest(".monaco-list-row");if(!n)return;let r=Number(n.getAttribute("data-index")),o=n.classList.contains("option-disabled");r>=0&&r{for(let s=0;sthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(Ai.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){Ai.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){Ai.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){Ai.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=lb.toString(e.keyCode),n=-1;for(let r=0;r{Ye();Xf();Qt();et();ae();Si();die=class extends W{constructor(e,t,n,r){super(),this.selected=0,this.selectBoxOptions=r||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new G),this.styles=n,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(Do.addTarget(this.selectElement)),[En.Tap].forEach(e=>{this._register(re(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(cn(this.selectElement,"click",e=>{Ai.stop(e,!0)})),this._register(cn(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(cn(this.selectElement,"keydown",e=>{let t=!1;qt?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!Zi(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,r)=>{this.selectElement.add(this.createOption(n.text,r,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{});var hie,fft=D(()=>{uft();dft();bg();Si();hft();hie=class extends Ls{constructor(e,t,n,r,o){super(),qt&&!o?.useCustomDrawn?this.selectBoxDelegate=new die(e,t,r,o):this.selectBoxDelegate=new uie(e,t,n,r,o),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}});var BIe=D(()=>{});var ah,Eg,fie,rL=D(()=>{Ph();iie();Ye();Xf();Zl();fft();$a();ae();Si();gn();BIe();Oe();_g();ah=class extends W{get action(){return this._action}constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof Js&&this._register(t.onDidChange(r=>{this.element&&this.handleActionChangeEvent(r)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Gf)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(Do.addTarget(e));let n=this.options&&this.options.draggable;n&&(e.draggable=!0,ml&&this._register(re(e,De.DRAG_START,r=>r.dataTransfer?.setData(hE.TEXT,this._action.label)))),this._register(re(t,En.Tap,r=>this.onClick(r,!0))),this._register(re(t,De.MOUSE_DOWN,r=>{n||Ai.stop(r,!0),this._action.enabled&&r.button===0&&t.classList.add("active")})),qt&&this._register(re(t,De.CONTEXT_MENU,r=>{r.button===0&&r.ctrlKey===!0&&this.onClick(r)})),this._register(re(t,De.CLICK,r=>{Ai.stop(r,!0),this.options&&this.options.isMenu||this.onClick(r)})),this._register(re(t,De.DBLCLICK,r=>{Ai.stop(r,!0)})),[De.MOUSE_UP,De.MOUSE_OUT].forEach(r=>{this._register(re(t,r,o=>{Ai.stop(o),t.classList.remove("active")}))})}onClick(e,t=!1){Ai.stop(e,!0);let n=ku(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;let e=this.getTooltip()??"";if(this.updateAriaLabel(),this.options.hoverDelegate?.showNativeHover)this.element.title=e;else if(!this.customHover&&e!==""){let t=this.options.hoverDelegate??ko("element");this.customHover=this._store.add($l().setupManagedHover(t,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){let e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}},Eg=class extends ah{constructor(e,t,n){super(e,t,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),yi(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){let n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===go.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=y({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){let e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}},fie=class extends ah{constructor(e,t,n,r,o,s,a){super(e,t),this.selectBox=new hie(n,r,o,s,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}});var zIe=D(()=>{});var VIe,pie,pft=D(()=>{Ye();gc();Xf();$a();et();zIe();VIe=class extends Gf{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new G),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=be(e,we(".monaco-dropdown")),this._label=be(this._element,we(".dropdown-label"));let n=t.labelRenderer;n||(n=o=>(o.textContent=t.label||"",null));for(let o of[De.CLICK,De.MOUSE_DOWN,En.Tap])this._register(re(this.element,o,s=>Ai.stop(s,!0)));for(let o of[De.MOUSE_DOWN,En.Tap])this._register(re(this._label,o,s=>{iF(s)&&(s.detail>1||s.button!==0)||(this.visible?this.hide():this.show())}));this._register(re(this._label,De.KEY_UP,o=>{let s=new Wi(o);(s.equals(3)||s.equals(10))&&(Ai.stop(o,!0),this.visible?this.hide():this.show())}));let r=n(this._label);r&&this._register(r),this._register(Do.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},pie=class extends VIe{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}});var pE,HIe=D(()=>{Ye();rL();pft();et();zIe();Zl();_g();pE=class extends ah{constructor(e,t,n,r=Object.create(null)){super(null,e,r),this.actionItem=null,this._onDidChangeVisibility=this._register(new G),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=r,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=o=>{this.element=be(o,we("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(s=this.options.classNames),s.find(a=>a==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register($l().setupManagedHover(this.options.hoverDelegate??ko("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),r={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new pie(e,r)),this._register(this.dropdownMenu.onDidChangeVisibility(o=>{this.element?.setAttribute("aria-expanded",`${o}`),this._onDidChangeVisibility.fire(o)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let o=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return o.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){let e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}});var mft=D(()=>{});function gft(i){return i&&typeof i=="object"&&typeof i.original=="string"&&typeof i.value=="string"}function bft(i){return i?i.condition!==void 0:!1}var WIe=D(()=>{});var oL,kO,IO,LO,vft=D(()=>{Jt();et();ae();hte();gn();(function(i){i[i.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",i[i.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(oL||(oL={}));(function(i){i[i.None=0]="None",i[i.Initialized=1]="Initialized",i[i.Closed=2]="Closed"})(kO||(kO={}));IO=class i extends W{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Fm),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=kO.None,this.cache=new Map,this.flushDelayer=this._register(new GR(i.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach((t,n)=>this.acceptExternal(n,t)),e.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===kO.Closed)return;let n=!1;ku(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){let n=this.cache.get(e);return ku(n)?t:n}getBoolean(e,t){let n=this.get(e);return ku(n)?t:n==="true"}getNumber(e,t){let n=this.get(e);return ku(n)?t:parseInt(n,10)}async set(e,t,n=!1){if(this.state===kO.Closed)return;if(ku(t))return this.delete(e,n);let r=Fo(t)||Array.isArray(t)?Hdt(t):String(t);if(this.cache.get(e)!==r)return this.cache.set(e,r),this.pendingInserts.set(e,r),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,t=!1){if(!(this.state===kO.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async doFlush(e){return this.options.hint===oL.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}},LO=class{constructor(){this.onDidChangeItemsExternal=Se.None,this.items=new Map}async updateItems(e){e.insert?.forEach((t,n)=>this.items.set(n,t)),e.delete?.forEach(t=>this.items.delete(t))}}});function Gbi(i){let e=i.get(mie);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}var mie,ec,mE,UIe,gie,yv=D(()=>{et();ae();gn();vft();ht();mie="__$__targetStorageMarker",ec=vt("storageService");(function(i){i[i.NONE=0]="NONE",i[i.SHUTDOWN=1]="SHUTDOWN"})(mE||(mE={}));UIe=class i extends W{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(e={flushInterval:i.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Fm),this._onDidChangeTarget=this._register(new Fm),this._onWillSaveState=this._register(new G),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,n){return Se.filter(this._onDidChangeValue.event,r=>r.scope===e&&(t===void 0||r.key===t),n)}emitDidChangeValue(e,t){let{key:n,external:r}=t;if(n===mie){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:r})}get(e,t,n){return this.getStorage(t)?.get(e,n)}getBoolean(e,t,n){return this.getStorage(t)?.getBoolean(e,n)}getNumber(e,t,n){return this.getStorage(t)?.getNumber(e,n)}store(e,t,n,r,o=!1){if(ku(t)){this.remove(e,n,o);return}this.withPausedEmitters(()=>{this.updateKeyTarget(e,n,r),this.getStorage(n)?.set(e,t,o)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,r=!1){let o=this.getKeyTargets(t);typeof n=="number"?o[e]!==n&&(o[e]=n,this.getStorage(t)?.set(mie,JSON.stringify(o),r)):typeof o[e]=="number"&&(delete o[e],this.getStorage(t)?.set(mie,JSON.stringify(o),r))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.getStorage(e);return t?Gbi(t):Object.create(null)}},gie=class extends UIe{constructor(){super(),this.applicationStorage=this._register(new IO(new LO,{hint:oL.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new IO(new LO,{hint:oL.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new IO(new LO,{hint:oL.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}});function qbi(i,e){let t={...e};for(let n in i){let r=i[n];t[n]=r!==void 0?it(r):void 0}return t}function wv(i){return qbi(i,Sx)}var Aft,yft,wft,NO,iun,nun,run,MO,xft,bie,oun,Sx,Cft,_ft,By=D(()=>{eo();Ho();Aft={keybindingLabelBackground:it(Mat),keybindingLabelForeground:it(Rat),keybindingLabelBorder:it(Fat),keybindingLabelBottomBorder:it(Oat),keybindingLabelShadow:it(ty)},yft={buttonForeground:it(nEe),buttonSeparator:it(Aat),buttonBackground:it(cF),buttonHoverBackground:it(yat),buttonSecondaryForeground:it(xat),buttonSecondaryBackground:it(OZ),buttonSecondaryHoverBackground:it(Cat),buttonBorder:it(wat)},wft={progressBarBackground:it(kst)},NO={inputActiveOptionBorder:it(rI),inputActiveOptionForeground:it(oI),inputActiveOptionBackground:it(Jw)},iun={activeForeground:it(uF),activeBackground:it(_at),activeBorder:it(Sat),inactiveForeground:it(Eat),inactiveBackground:it(Dat),inactiveBorder:it(Tat),inactiveHoverBackground:it(kat)},nun={checkboxBackground:it(Iat),checkboxBorder:it(Nat),checkboxForeground:it(Lat)},run={dialogBackground:it(Kc),dialogForeground:it(iI),dialogShadow:it(ty),dialogBorder:it(Fi),errorIconForeground:it(eat),warningIconForeground:it(tat),infoIconForeground:it(iat),textLinkForeground:it(Dst)},MO={inputBackground:it(a7),inputForeground:it(PZ),inputBorder:it(BZ),inputValidationInfoBorder:it(dat),inputValidationInfoBackground:it(cat),inputValidationInfoForeground:it(uat),inputValidationWarningBorder:it(pat),inputValidationWarningBackground:it(hat),inputValidationWarningForeground:it(fat),inputValidationErrorBorder:it(bat),inputValidationErrorBackground:it(mat),inputValidationErrorForeground:it(gat)},xft={listFilterWidgetBackground:it(Kat),listFilterWidgetOutline:it(Jat),listFilterWidgetNoMatchesOutline:it(Xat),listFilterWidgetShadow:it(Zat),inputBoxStyles:MO,toggleStyles:NO},bie={badgeBackground:it(sF),badgeForeground:it(Tst),badgeBorder:it(Fi)},oun={breadcrumbsBackground:it(Xst),breadcrumbsForeground:it(Jst),breadcrumbsHoverForeground:it(ZSe),breadcrumbsFocusForeground:it(ZSe),breadcrumbsFocusAndSelectionForeground:it(Zst)},Sx={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:it(Pat),listFocusForeground:it(Bat),listFocusOutline:it(zat),listActiveSelectionBackground:it(iy),listActiveSelectionForeground:it(_S),listActiveSelectionIconForeground:it(zZ),listFocusAndSelectionOutline:it(Vat),listFocusAndSelectionBackground:it(iy),listFocusAndSelectionForeground:it(_S),listInactiveSelectionBackground:it(Hat),listInactiveSelectionIconForeground:it(Uat),listInactiveSelectionForeground:it(Wat),listInactiveFocusBackground:it(jat),listInactiveFocusOutline:it(Qat),listHoverBackground:it(oEe),listHoverForeground:it(sEe),listDropOverBackground:it(Gat),listDropBetweenBackground:it(qat),listSelectionOutline:it(Jn),listHoverOutline:it(Jn),treeIndentGuidesStroke:it(aEe),treeInactiveIndentGuidesStroke:it($at),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:it(t7),tableColumnsBorder:it(elt),tableOddRowsBackgroundColor:it(tlt)};Cft={selectBackground:it(dF),selectListBackground:it(vat),selectForeground:it(l7),decoratorRightForeground:it(HZ),selectBorder:it(c7),focusBorder:it(Hp),listFocusBackground:it(Zw),listInactiveSelectionIconForeground:it(hF),listFocusForeground:it(Xw),listFocusOutline:Cst(Jn,pe.transparent.toString()),listHoverBackground:it(oEe),listHoverForeground:it(sEe),listHoverOutline:it(Jn),selectListBorder:it(n7),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},_ft={shadowColor:it(ty),borderColor:it(ilt),foregroundColor:it(nlt),backgroundColor:it(rlt),selectionForegroundColor:it(olt),selectionBackgroundColor:it(slt),selectionBorderColor:it(alt),separatorColor:it(llt),scrollbarShadow:it(t7),scrollbarSliderBackground:it(SZ),scrollbarSliderHoverBackground:it(EZ),scrollbarSliderActiveBackground:it(DZ)}});function Sft(i,e,t,n){let r,o,s;if(Array.isArray(i))s=i,r=e,o=t;else{let c=e;s=i.getActions(c),r=t,o=n}let a=Gw.getInstance(),l=a.keyStatus.altKey||(Nr||vo)&&a.keyStatus.shiftKey;Eft(s,r,l,o?c=>c===o:c=>c==="navigation")}function gE(i,e,t,n,r,o){let s,a,l,c,u;if(Array.isArray(i))u=i,s=e,a=t,l=n,c=r;else{let h=e;u=i.getActions(h),s=t,a=n,l=r,c=o}Eft(u,s,!1,typeof a=="string"?h=>h===a:a,l,c)}function Eft(i,e,t,n=s=>s==="navigation",r=()=>!1,o=!1){let s,a;Array.isArray(e)?(s=e,a=e):(s=e.primary,a=e.secondary);let l=new Set;for(let[c,u]of i){let d;n(c)?(d=s,d.length>0&&o&&d.push(new go)):(d=a,d.length>0&&d.push(new go));for(let h of u){t&&(h=h instanceof Ql&&h.alt?h.alt:h);let f=d.push(h);h instanceof pg&&l.add({group:c,action:h,index:f-1})}}for(let{group:c,action:u,index:d}of l){let h=n(c)?s:a,f=u.actions;r(u,c,h.length)&&h.splice(d,1,...f)}}function yie(i,e,t){return e instanceof Ql?i.createInstance(zy,e,t):e instanceof Hb?e.item.isSelection?i.createInstance(GIe,e):e.item.rememberDefaultAction?i.createInstance(QIe,e,{...t,persistLastActionId:!0}):i.createInstance(jIe,e,t):void 0}var Aie,ef,zy,vie,jIe,QIe,GIe,Ex=D(()=>{Ye();gc();rL();HIe();$a();Lte();ae();Si();mft();Oe();fr();WIe();Wt();bd();ht();Yr();_c();yv();Zn();Dr();Pb();gn();eo();By();oh();Aie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ef=function(i,e){return function(t,n){e(t,n,i)}};zy=class extends Eg{constructor(e,t,n,r,o,s,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._options=t,this._keybindingService=n,this._notificationService=r,this._contextKeyService=o,this._themeService=s,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new On),this._altKey=Gw.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1,n=()=>{let r=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(re(e,"mouseleave",r=>{t=!1,n()})),this._register(re(e,"mouseenter",r=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){let e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label,r=t?y("titleAndKb","{0} ({1})",n,t):n;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){let o=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,s=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),a=s&&s.getLabel(),l=a?y("titleAndKb","{0} ({1})",o,a):o;r=y("titleAndKbAndAlt",`{0} -[{1}] {2}`,r,dO.modifierLabels[Qa].altKey,l)}return r}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;let{element:t,label:n}=this;if(!t||!n)return;let r=this._commandAction.checked&&bft(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(r)if(ut.isThemeIcon(r)){let o=ut.asClassNameArray(r);n.classList.add(...o),this._itemClassDispose.value=Ve(()=>{n.classList.remove(...o)})}else n.style.backgroundImage=ny(this._themeService.getColorTheme().type)?zp(r.dark):zp(r.light),n.classList.add("icon"),this._itemClassDispose.value=hc(Ve(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};zy=Aie([ef(2,ni),ef(3,Cn),ef(4,Ze),ef(5,Bn),ef(6,Xs),ef(7,Cs)],zy);vie=class i extends zy{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=i._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=y({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,t):this.label.textContent=y({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"\u23CE").replace(/\bEscape\b/gi,"Esc")}},jIe=class extends pE{constructor(e,t,n,r,o){let s={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(ut.isThemeIcon(e.item.icon)?ut.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(a=>n.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},r,s),this._keybindingService=n,this._contextMenuService=r,this._themeService=o}render(e){super.render(e),yi(this.element),e.classList.add("menu-entry");let t=this._action,{icon:n}=t.item;if(n&&!ut.isThemeIcon(n)){this.element.classList.add("icon");let r=()=>{this.element&&(this.element.style.backgroundImage=ny(this._themeService.getColorTheme().type)?zp(n.dark):zp(n.light))};r(),this._register(this._themeService.onDidColorThemeChange(()=>{r()}))}}};jIe=Aie([ef(2,ni),ef(3,Xs),ef(4,Bn)],jIe);QIe=class extends ah{constructor(e,t,n,r,o,s,a,l){super(null,e),this._keybindingService=n,this._notificationService=r,this._contextMenuService=o,this._menuService=s,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let c,u=t?.persistLastActionId?l.get(this._storageKey,1):void 0;u&&(c=e.actions.find(h=>u===h.id)),c||(c=e.actions[0]),this._defaultAction=this._instaService.createInstance(zy,c,{keybinding:this._getDefaultActionKeybindingLabel(c)});let d={keybindingProvider:h=>this._keybindingService.lookupKeybinding(h.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??new Gf};this._dropdown=new pE(e,e.actions,this._contextMenuService,d),this._register(this._dropdown.actionRunner.onDidRun(h=>{h.action instanceof Ql&&this.update(h.action)}))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(zy,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Gf{async runAction(t,n){await t.run(void 0)}},this._container&&this._defaultAction.render(nF(this._container,we(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){let n=this._keybindingService.lookupKeybinding(e.id);n&&(t=`(${n.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let t=we(".action-container");this._defaultAction.render(be(this._container,t)),this._register(re(t,De.KEY_DOWN,r=>{let o=new Wi(r);o.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),o.stopPropagation())}));let n=we(".dropdown-action-container");this._dropdown.render(be(this._container,n)),this._register(re(n,De.KEY_DOWN,r=>{let o=new Wi(r);o.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),o.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};QIe=Aie([ef(2,ni),ef(3,Cn),ef(4,Xs),ef(5,el),ef(6,Ne),ef(7,ec)],QIe);GIe=class extends fie{constructor(e,t){super(null,e,e.actions.map(n=>({text:n.id===go.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":n.label,isDisabled:!n.enabled})),0,t,Cft,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=it(c7)}runAction(e,t){let n=this.action.actions[t];n&&this.actionRunner.run(n)}};GIe=Aie([ef(1,rh)],GIe)});var Ns,Dg=D(()=>{Ye();gc();rL();Zl();$a();et();ae();gn();BIe();Ns=class extends W{constructor(e,t={}){super(),this._actionRunnerDisposables=this._register(new te),this.viewItemDisposables=this._register(new v_),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new G),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new G({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new G),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new G),this.onWillRun=this._onWillRun.event,this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register(Yb()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Gf,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(o=>this._onDidRun.fire(o))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(o=>this._onWillRun.fire(o))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let n,r;switch(this._orientation){case 0:n=[15],r=[17];break;case 1:n=[16],r=[18],this.domNode.className+=" vertical";break}this._register(re(this.domNode,De.KEY_DOWN,o=>{let s=new Wi(o),a=!0,l=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;n&&(s.equals(n[0])||s.equals(n[1]))?a=this.focusPrevious():r&&(s.equals(r[0])||s.equals(r[1]))?a=this.focusNext():s.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():s.equals(14)?a=this.focusFirst():s.equals(13)?a=this.focusLast():s.equals(2)&&l instanceof ah&&l.trapsArrowNavigation?a=this.focusNext(void 0,!0):this.isTriggerKeyEvent(s)?this._triggerKeys.keyDown?this.doTrigger(s):this.triggerKeyDown=!0:a=!1,a&&(s.preventDefault(),s.stopPropagation())})),this._register(re(this.domNode,De.KEY_UP,o=>{let s=new Wi(o);this.isTriggerKeyEvent(s)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(s)),s.preventDefault(),s.stopPropagation()):(s.equals(2)||s.equals(1026)||s.equals(16)||s.equals(18)||s.equals(15)||s.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(Yc(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(hs()===this.domNode||!Co(hs(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let t=this.viewItems.find(n=>n instanceof ah&&n.isEnabled());t instanceof ah&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof ah&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){if(typeof e=="number")return this.viewItems[e]?.action;if(Er(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{let s=document.createElement("li");s.className="action-item",s.setAttribute("role","presentation");let a,l={hoverDelegate:this._hoverDelegate,...t,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(o,l)),a||(a=new Eg(this.context,o,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,re(s,De.CONTEXT_MENU,c=>{Ai.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(s),this.focusable&&a instanceof ah&&this.viewItems.length===0&&a.setFocusable(!0),r===null||r<0||r>=this.actionsList.children.length?(this.actionsList.appendChild(s),this.viewItems.push(a)):(this.actionsList.insertBefore(s,this.actionsList.children[r]),this.viewItems.splice(r,0,a),r++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Vi(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),_o(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,n;if(e===void 0?t=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){let r=this.viewItems.findIndex(o=>o.isEnabled());this.focusedItem=r===-1?void 0:r,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let n=this.focusedItem,r;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,r=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!r.isEnabled()||r.action.id===go.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===go.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();let r=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(r){let o=!0;S_(r.focus)||(o=!1),this.options.focusOnlyEnabledItems&&S_(r.isEnabled)&&!r.isEnabled()&&(o=!1),r.action.id===go.ID&&(o=!1),o?(n||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),o&&r.showHover?.()}}doTrigger(e){if(typeof this.focusedItem>"u")return;let t=this.viewItems[this.focusedItem];if(t instanceof ah){let n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=Vi(this.viewItems),this.getContainer().remove(),super.dispose()}}});function Ybi(i){let e=YIe,t=e.exec(i);if(!t)return i;let n=!t[1];return i.replace(e,n?"$2$3":"").trim()}function Dft(i){let e=yY()[i.id];return`.codicon-${i.id}:before { content: '\\${e.toString(16)}'; }`}function Kbi(i,e){let t=` +`)}},pdt={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:me.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:me.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:me.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},Pai={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};ddt=(i,e)=>i-e,eLe=class{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,o){let r=0;for(let s of this.renderers)s.renderElement(e,t,n[r++],o)}disposeElement(e,t,n,o){let r=0;for(let s of this.renderers)s.disposeElement?.(e,t,n[r],o),r+=1}disposeTemplate(e){let t=0;for(let n of this.renderers)n.disposeTemplate(e[t++])}},tLe=class{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new se}}renderElement(e,t,n){let o=this.accessibilityProvider.getAriaLabel(e),r=o&&typeof o!="string"?o:tc(o);n.disposables.add(Ct(a=>{this.setAriaLabel(a.readObservable(r),n.container)}));let s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?n.container.setAttribute("aria-level",`${s}`):n.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,n,o){n.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}},iLe=class{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,n,o,r){return this.dnd.onDragOver(e,t,n,o,r)}onDragLeave(e,t,n,o){this.dnd.onDragLeave?.(e,t,n,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,n,o,r){this.dnd.drop(e,t,n,o,r)}dispose(){this.dnd.dispose()}},rl=class{get onDidChangeFocus(){return Ee.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Ee.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=Ee.chain(this.disposables.add(new bi(this.view.domNode,"keydown")).event,r=>r.map(s=>new Vi(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>mi.stop(s,!0)).filter(()=>!1)),n=Ee.chain(this.disposables.add(new bi(this.view.domNode,"keyup")).event,r=>r.forEach(()=>e=!1).map(s=>new Vi(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>mi.stop(s,!0)).map(({browserEvent:s})=>{let a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,u=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:u,browserEvent:s}})),o=Ee.chain(this.view.onContextMenu,r=>r.filter(s=>!e).map(({element:s,index:a,browserEvent:l})=>({element:s,index:a,anchor:new wl(rt(this.view.domNode),l),browserEvent:l})));return Ee.any(t,n,o)}get onKeyDown(){return this.disposables.add(new bi(this.view.domNode,"keydown")).event}get onDidFocus(){return Ee.signal(this.disposables.add(new bi(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return Ee.signal(this.disposables.add(new bi(this.view.domNode,"blur",!0)).event)}constructor(e,t,n,o,r=Pai){this.user=e,this._options=r,this.focus=new AP("focused"),this.anchor=new AP("anchor"),this.eventBufferer=new wb,this._ariaLabel="",this.disposables=new se,this._onDidDispose=new q,this.onDidDispose=this._onDidDispose.event;let s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new JIe(s!=="listbox");let a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(a.push(new tLe(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map(c=>new eLe(c.templateId,[...a,c]));let l={...r,dnd:r.dnd&&new iLe(this,r.dnd)};if(this.view=this.createListView(t,n,o,l),this.view.domNode.setAttribute("role",s),r.styleController)this.styleController=r.styleController(this.view.domId);else{let c=el(this.view.domNode);this.styleController=new _H(c,this.view.domId)}if(this.spliceable=new Ene([new xH(this.focus,this.view,r.identityProvider),new xH(this.selection,this.view,r.identityProvider),new xH(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new ZIe(this,this.view)),(typeof r.keyboardSupport!="boolean"||r.keyboardSupport)&&(this.keyboardController=new Lne(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){let c=r.keyboardNavigationDelegate||Fai;this.typeNavigationController=new XIe(this,this.view,r.keyboardNavigationLabelProvider,r.keyboardNavigationEventFilter??(()=>!0),c),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,o){return new zg(e,t,n,o)}createMouseController(e){return new CH(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new e1(this.user,`Invalid start index: ${e}`);if(t<0)throw new e1(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let n of e)if(n<0||n>=this.length)throw new e1(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new e1(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return mO(this.anchor.get(),void 0)}getAnchorElement(){let e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(let n of e)if(n<0||n>=this.length)throw new e1(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,o){if(this.length===0)return;let r=this.focus.get(),s=this.findNextIndex(r.length>0?r[0]+e:0,t,o);s>-1&&this.setFocus([s],n)}focusPrevious(e=1,t=!1,n,o){if(this.length===0)return;let r=this.focus.get(),s=this.findPreviousIndex(r.length>0?r[0]-e:0,t,o);s>-1&&this.setFocus([s],n)}async focusNextPage(e,t){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;let o=this.getFocus()[0];if(o!==n&&(o===void 0||n>o)){let r=this.findPreviousIndex(n,!1,t);r>-1&&o!==r?this.setFocus([r],e):this.setFocus([n],e)}else{let r=this.view.getScrollTop(),s=r+this.view.renderHeight;n>o&&(s-=this.view.elementHeight(n)),this.view.setScrollTop(s),this.view.getScrollTop()!==r&&(this.setFocus([]),await oh(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,n=()=>0){let o,r=n(),s=this.view.getScrollTop()+r;s===0?o=this.view.indexAt(s):o=this.view.indexAfter(s-1);let a=this.getFocus()[0];if(a!==o&&(a===void 0||a>=o)){let l=this.findNextIndex(o,!1,t);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([o],e)}else{let l=s;this.view.setScrollTop(s-this.view.renderHeight-r),this.view.getScrollTop()+n()!==l&&(this.setFocus([]),await oh(0),await this.focusPreviousPage(e,t,n))}}focusLast(e,t){if(this.length===0)return;let n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;let o=this.findNextIndex(e,!1,n);o>-1&&this.setFocus([o],t)}findNextIndex(e,t=!1,n){for(let o=0;o=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let o=0;othis.view.element(e))}reveal(e,t,n=0){if(e<0||e>=this.length)throw new e1(this.user,`Invalid index ${e}`);let o=this.view.getScrollTop(),r=this.view.elementTop(e),s=this.view.elementHeight(e);if(Vp(t)){let a=s-this.view.renderHeight+n;this.view.setScrollTop(a*Ll(t,0,1)+r-n)}else{let a=r+s,l=o+this.view.renderHeight;r=l||(r=l&&s>=this.view.renderHeight?this.view.setScrollTop(r-n):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new e1(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if(on+this.view.renderHeight)return null;let s=r-this.view.renderHeight+t;return Math.abs((n+t-o)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){let e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}};PE([ar],rl.prototype,"onDidChangeFocus",null);PE([ar],rl.prototype,"onDidChangeSelection",null);PE([ar],rl.prototype,"onContextMenu",null);PE([ar],rl.prototype,"onKeyDown",null);PE([ar],rl.prototype,"onDidFocus",null);PE([ar],rl.prototype,"onDidBlur",null)});var mdt=D(()=>{});var PL,gdt,sLe,Nne,bdt=D(()=>{Ye();n0();xc();eH();Bg();ic();Kx();Wt();et();Bp();de();wi();mdt();Be();PL=xe,gdt="selectOption.entry.template",sLe=class{get templateId(){return gdt}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=Ae(e,PL(".option-text")),t.detail=Ae(e,PL(".option-detail")),t.decoratorRight=Ae(e,PL(".option-decorator-right")),t}renderElement(e,t,n){let o=n,r=e.text,s=e.detail,a=e.decoratorRight,l=e.isDisabled;o.text.textContent=r,o.detail.textContent=s||"",o.decoratorRight.innerText=a||"",l?o.root.classList.add("option-disabled"):o.root.classList.remove("option-disabled")}disposeTemplate(e){}},Nne=class i extends H{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,n,o,r){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=o,this.selectBoxOptions=r||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=i.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new q,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(nc().setupManagedHover(Mr("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return gdt}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=xe(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=Ae(this.selectDropDownContainer,PL(".select-box-details-pane"));let t=Ae(this.selectDropDownContainer,PL(".select-box-dropdown-container-width-control")),n=Ae(t,PL(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",Ae(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=el(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(ce(this.selectDropDownContainer,Te.DRAG_START,o=>{mi.stop(o,!0)}))}registerListeners(){this._register(un(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(ce(this.selectElement,Te.CLICK,t=>{mi.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(ce(this.selectElement,Te.MOUSE_DOWN,t=>{mi.stop(t)}));let e;this._register(ce(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(ce(this.selectElement,"touchend",t=>{mi.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(ce(this.selectElement,Te.KEY_DOWN,t=>{let n=new Vi(t),o=!1;jt?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(o=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(o=!0),o&&(this.showSelectDropDown(),mi.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Zi(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,o)=>{this.selectElement.add(this.createOption(n.text,o,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){let e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",n=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=n}styleList(){let e=this.styles.selectBackground??"",t=yg(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;let n=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=n,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){let o=document.createElement("option");return o.value=e,o.text=e,o.disabled=!!n,o}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");let t=rt(this.selectElement),n=bn(this.selectElement),o=rt(this.selectElement).getComputedStyle(this.selectElement),r=parseFloat(o.getPropertyValue("--dropdown-padding-top"))+parseFloat(o.getPropertyValue("--dropdown-padding-bottom")),s=t.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),a=n.top-i.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),u=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=u,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let h=this._hasDetails?this._cachedMaxDetailsHeight:0,f=d+r+h,p=Math.floor((s-r-h)/this.getHeight()),g=Math.floor((a-r-h)/this.getHeight());if(e)return n.top+n.height>t.innerHeight-22||n.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>t.innerHeight-22||n.tops&&(d=p*this.getHeight())}else f>a&&(d=g*this.getHeight());return this.selectList.layout(d),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=d+r+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=d+r+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=u,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,o=0;this.options.forEach((r,s)=>{let a=r.detail?r.detail.length:0,l=r.decoratorRight?r.decoratorRight.length:0,c=r.text.length+a+l;c>o&&(n=s,o=c)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=Cc(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=Ae(e,PL(".select-box-dropdown-list-container")),this.listRenderer=new sLe,this.selectList=this._register(new rl("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:o=>{let r=o.text;return o.detail&&(r+=`. ${o.detail}`),o.decoratorRight&&(r+=`. ${o.decoratorRight}`),o.description&&(r+=`. ${o.description}`),r},getWidgetAriaLabel:()=>y({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>jt?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new bi(this.selectDropDownListContainer,"keydown")),n=Ee.chain(t.event,o=>o.filter(()=>this.selectList.length>0).map(r=>new Vi(r)));this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===3))(this.onEnter,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===2))(this.onEnter,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===9))(this.onEscape,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===16))(this.onUpArrow,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===18))(this.onDownArrow,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===12))(this.onPageDown,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===11))(this.onPageUp,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===14))(this.onHome,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode===13))(this.onEnd,this)),this._register(Ee.chain(n,o=>o.filter(r=>r.keyCode>=21&&r.keyCode<=56||r.keyCode>=85&&r.keyCode<=113))(this.onCharacter,this)),this._register(ce(this.selectList.getHTMLElement(),Te.POINTER_UP,o=>this.onPointerUp(o))),this._register(this.selectList.onMouseOver(o=>typeof o.index<"u"&&this.selectList.setFocus([o.index]))),this._register(this.selectList.onDidChangeFocus(o=>this.onListFocus(o))),this._register(ce(this.selectDropDownContainer,Te.FOCUS_OUT,o=>{!this._isVisible||Dr(o.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;mi.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let n=t.closest(".monaco-list-row");if(!n)return;let o=Number(n.getAttribute("data-index")),r=n.classList.contains("option-disabled");o>=0&&o{for(let s=0;sthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(mi.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){mi.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){mi.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){mi.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=xb.toString(e.keyCode),n=-1;for(let o=0;o{Ye();cp();Wt();et();de();wi();Mne=class extends H{constructor(e,t,n,o){super(),this.selected=0,this.selectBoxOptions=o||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new q),this.styles=n,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(Lr.addTarget(this.selectElement)),[Tn.Tap].forEach(e=>{this._register(ce(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(un(this.selectElement,"click",e=>{mi.stop(e,!0)})),this._register(un(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(un(this.selectElement,"keydown",e=>{let t=!1;jt?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!Zi(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,o)=>{this.selectElement.add(this.createOption(n.text,o,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{});var Rne,ydt=D(()=>{bdt();Adt();Lg();wi();vdt();Rne=class extends Os{constructor(e,t,n,o,r){super(),jt&&!r?.useCustomDrawn?this.selectBoxDelegate=new Mne(e,t,o,r):this.selectBoxDelegate=new Nne(e,t,n,o,r),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}});var aLe=D(()=>{});var mh,Vg,Fne,BL=D(()=>{Kh();_ne();Ye();cp();ic();ydt();il();de();wi();gn();aLe();Be();Bg();mh=class extends H{get action(){return this._action}constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof ta&&this._register(t.onDidChange(o=>{this.element&&this.handleActionChangeEvent(o)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new op)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(Lr.addTarget(e));let n=this.options&&this.options.draggable;n&&(e.draggable=!0,yl&&this._register(ce(e,Te.DRAG_START,o=>o.dataTransfer?.setData(OE.TEXT,this._action.label)))),this._register(ce(t,Tn.Tap,o=>this.onClick(o,!0))),this._register(ce(t,Te.MOUSE_DOWN,o=>{n||mi.stop(o,!0),this._action.enabled&&o.button===0&&t.classList.add("active")})),jt&&this._register(ce(t,Te.CONTEXT_MENU,o=>{o.button===0&&o.ctrlKey===!0&&this.onClick(o)})),this._register(ce(t,Te.CLICK,o=>{mi.stop(o,!0),this.options&&this.options.isMenu||this.onClick(o)})),this._register(ce(t,Te.DBLCLICK,o=>{mi.stop(o,!0)})),[Te.MOUSE_UP,Te.MOUSE_OUT].forEach(o=>{this._register(ce(t,o,r=>{mi.stop(r),t.classList.remove("active")}))})}onClick(e,t=!1){mi.stop(e,!0);let n=Pu(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;let e=this.getTooltip()??"";if(this.updateAriaLabel(),this.options.hoverDelegate?.showNativeHover)this.element.title=e;else if(!this.customHover&&e!==""){let t=this.options.hoverDelegate??Mr("element");this.customHover=this._store.add(nc().setupManagedHover(t,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){let e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}},Vg=class extends mh{constructor(e,t,n){super(e,t,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),gi(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){let n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===yr.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=y({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){let e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}},Fne=class extends mh{constructor(e,t,n,o,r,s,a){super(e,t),this.selectBox=new Rne(n,o,r,s,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}});var lLe=D(()=>{});var cLe,One,wdt=D(()=>{Ye();xc();cp();il();et();lLe();cLe=class extends op{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new q),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=Ae(e,xe(".monaco-dropdown")),this._label=Ae(this._element,xe(".dropdown-label"));let n=t.labelRenderer;n||(n=r=>(r.textContent=t.label||"",null));for(let r of[Te.CLICK,Te.MOUSE_DOWN,Tn.Tap])this._register(ce(this.element,r,s=>mi.stop(s,!0)));for(let r of[Te.MOUSE_DOWN,Tn.Tap])this._register(ce(this._label,r,s=>{YF(s)&&(s.detail>1||s.button!==0)||(this.visible?this.hide():this.show())}));this._register(ce(this._label,Te.KEY_UP,r=>{let s=new Vi(r);(s.equals(3)||s.equals(10))&&(mi.stop(r,!0),this.visible?this.hide():this.show())}));let o=n(this._label);o&&this._register(o),this._register(Lr.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},One=class extends cLe{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}});var BE,uLe=D(()=>{Ye();BL();wdt();et();lLe();ic();Bg();BE=class extends mh{constructor(e,t,n,o=Object.create(null)){super(null,e,o),this.actionItem=null,this._onDidChangeVisibility=this._register(new q),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=o,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=r=>{this.element=Ae(r,xe("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(s=this.options.classNames),s.find(a=>a==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register(nc().setupManagedHover(this.options.hoverDelegate??Mr("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),o={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new One(e,o)),this._register(this.dropdownMenu.onDidChangeVisibility(r=>{this.element?.setAttribute("aria-expanded",`${r}`),this._onDidChangeVisibility.fire(r)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let r=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return r.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){let e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}});var xdt=D(()=>{});function Cdt(i){return i&&typeof i=="object"&&typeof i.original=="string"&&typeof i.value=="string"}function _dt(i){return i?i.condition!==void 0:!1}var dLe=D(()=>{});var zL,wP,xP,CP,Sdt=D(()=>{Gt();et();de();Rie();gn();(function(i){i[i.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",i[i.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(zL||(zL={}));(function(i){i[i.None=0]="None",i[i.Initialized=1]="Initialized",i[i.Closed=2]="Closed"})(wP||(wP={}));xP=class i extends H{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Jm),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=wP.None,this.cache=new Map,this.flushDelayer=this._register(new BF(i.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach((t,n)=>this.acceptExternal(n,t)),e.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===wP.Closed)return;let n=!1;Pu(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){let n=this.cache.get(e);return Pu(n)?t:n}getBoolean(e,t){let n=this.get(e);return Pu(n)?t:n==="true"}getNumber(e,t){let n=this.get(e);return Pu(n)?t:parseInt(n,10)}async set(e,t,n=!1){if(this.state===wP.Closed)return;if(Pu(t))return this.delete(e,n);let o=zr(t)||Array.isArray(t)?Yct(t):String(t);if(this.cache.get(e)!==o)return this.cache.set(e,o),this.pendingInserts.set(e,o),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,t=!1){if(!(this.state===wP.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async doFlush(e){return this.options.hint===zL.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}},CP=class{constructor(){this.onDidChangeItemsExternal=Ee.None,this.items=new Map}async updateItems(e){e.insert?.forEach((t,n)=>this.items.set(n,t)),e.delete?.forEach(t=>this.items.delete(t))}}});function Vai(i){let e=i.get(Pne);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}var Pne,oc,zE,hLe,Bne,VA=D(()=>{et();de();gn();Sdt();ht();Pne="__$__targetStorageMarker",oc=At("storageService");(function(i){i[i.NONE=0]="NONE",i[i.SHUTDOWN=1]="SHUTDOWN"})(zE||(zE={}));hLe=class i extends H{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(e={flushInterval:i.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Jm),this._onDidChangeTarget=this._register(new Jm),this._onWillSaveState=this._register(new q),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,n){return Ee.filter(this._onDidChangeValue.event,o=>o.scope===e&&(t===void 0||o.key===t),n)}emitDidChangeValue(e,t){let{key:n,external:o}=t;if(n===Pne){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:o})}get(e,t,n){return this.getStorage(t)?.get(e,n)}getBoolean(e,t,n){return this.getStorage(t)?.getBoolean(e,n)}getNumber(e,t,n){return this.getStorage(t)?.getNumber(e,n)}store(e,t,n,o,r=!1){if(Pu(t)){this.remove(e,n,r);return}this.withPausedEmitters(()=>{this.updateKeyTarget(e,n,o),this.getStorage(n)?.set(e,t,r)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,o=!1){let r=this.getKeyTargets(t);typeof n=="number"?r[e]!==n&&(r[e]=n,this.getStorage(t)?.set(Pne,JSON.stringify(r),o)):typeof r[e]=="number"&&(delete r[e],this.getStorage(t)?.set(Pne,JSON.stringify(r),o))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.getStorage(e);return t?Vai(t):Object.create(null)}},Bne=class extends hLe{constructor(){super(),this.applicationStorage=this._register(new xP(new CP,{hint:zL.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new xP(new CP,{hint:zL.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new xP(new CP,{hint:zL.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}});function Hai(i,e){let t={...e};for(let n in i){let o=i[n];t[n]=o!==void 0?it(o):void 0}return t}function HA(i){return Hai(i,Jx)}var Edt,Ddt,Tdt,_P,Hhn,Whn,Uhn,SP,kdt,zne,jhn,Jx,Idt,Ldt,i1=D(()=>{nr();Wr();Edt={keybindingLabelBackground:it(Vrt),keybindingLabelForeground:it(Hrt),keybindingLabelBorder:it(Wrt),keybindingLabelBottomBorder:it(Urt),keybindingLabelShadow:it(vy)},Ddt={buttonForeground:it(EEe),buttonSeparator:it(Ert),buttonBackground:it(tO),buttonHoverBackground:it(Drt),buttonSecondaryForeground:it(krt),buttonSecondaryBackground:it(oee),buttonSecondaryHoverBackground:it(Irt),buttonBorder:it(Trt)},Tdt={progressBarBackground:it(Oot)},_P={inputActiveOptionBorder:it(BI),inputActiveOptionForeground:it(zI),inputActiveOptionBackground:it(wx)},Hhn={activeForeground:it(iO),activeBackground:it(Lrt),activeBorder:it(Nrt),inactiveForeground:it(Mrt),inactiveBackground:it(Rrt),inactiveBorder:it(Frt),inactiveHoverBackground:it(Ort)},Whn={checkboxBackground:it(Prt),checkboxBorder:it(zrt),checkboxForeground:it(Brt)},Uhn={dialogBackground:it(nu),dialogForeground:it(OI),dialogShadow:it(vy),dialogBorder:it(ki),errorIconForeground:it(art),warningIconForeground:it(lrt),infoIconForeground:it(crt),textLinkForeground:it(Rot)},SP={inputBackground:it(zz),inputForeground:it(ree),inputBorder:it(see),inputValidationInfoBorder:it(Art),inputValidationInfoBackground:it(grt),inputValidationInfoForeground:it(brt),inputValidationWarningBorder:it(wrt),inputValidationWarningBackground:it(vrt),inputValidationWarningForeground:it(yrt),inputValidationErrorBorder:it(_rt),inputValidationErrorBackground:it(xrt),inputValidationErrorForeground:it(Crt)},kdt={listFilterWidgetBackground:it(ist),listFilterWidgetOutline:it(nst),listFilterWidgetNoMatchesOutline:it(ost),listFilterWidgetShadow:it(rst),inputBoxStyles:SP,toggleStyles:_P},zne={badgeBackground:it(ZF),badgeForeground:it(Fot),badgeBorder:it(ki)},jhn={breadcrumbsBackground:it(ort),breadcrumbsForeground:it(nrt),breadcrumbsHoverForeground:it(wEe),breadcrumbsFocusForeground:it(wEe),breadcrumbsFocusAndSelectionForeground:it(rrt)},Jx={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:it(jrt),listFocusForeground:it(Qrt),listFocusOutline:it(Grt),listActiveSelectionBackground:it(yy),listActiveSelectionForeground:it(YS),listActiveSelectionIconForeground:it(aee),listFocusAndSelectionOutline:it(qrt),listFocusAndSelectionBackground:it(yy),listFocusAndSelectionForeground:it(YS),listInactiveSelectionBackground:it(Yrt),listInactiveSelectionIconForeground:it(Jrt),listInactiveSelectionForeground:it(Krt),listInactiveFocusBackground:it(Xrt),listInactiveFocusOutline:it(Zrt),listHoverBackground:it(TEe),listHoverForeground:it(kEe),listDropOverBackground:it($rt),listDropBetweenBackground:it(est),listSelectionOutline:it(eo),listHoverOutline:it(eo),treeIndentGuidesStroke:it(IEe),treeInactiveIndentGuidesStroke:it(sst),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:it(Mz),tableColumnsBorder:it(ast),tableOddRowsBackgroundColor:it(lst)};Idt={selectBackground:it(nO),selectListBackground:it(Srt),selectForeground:it(Vz),decoratorRightForeground:it(cee),selectBorder:it(Hz),focusBorder:it(om),listFocusBackground:it(Cx),listInactiveSelectionIconForeground:it(oO),listFocusForeground:it(xx),listFocusOutline:Iot(eo,me.transparent.toString()),listHoverBackground:it(TEe),listHoverForeground:it(kEe),listHoverOutline:it(eo),selectListBorder:it(Fz),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},Ldt={shadowColor:it(vy),borderColor:it(cst),foregroundColor:it(ust),backgroundColor:it(dst),selectionForegroundColor:it(hst),selectionBackgroundColor:it(fst),selectionBorderColor:it(pst),separatorColor:it(mst),scrollbarShadow:it(Mz),scrollbarSliderBackground:it(q$),scrollbarSliderHoverBackground:it(Y$),scrollbarSliderActiveBackground:it(K$)}});function Ndt(i,e,t,n){let o,r,s;if(Array.isArray(i))s=i,o=e,r=t;else{let c=e;s=i.getActions(c),o=t,r=n}let a=bx.getInstance(),l=a.keyStatus.altKey||(Fo||Cr)&&a.keyStatus.shiftKey;Mdt(s,o,l,r?c=>c===r:c=>c==="navigation")}function VE(i,e,t,n,o,r){let s,a,l,c,u;if(Array.isArray(i))u=i,s=e,a=t,l=n,c=o;else{let h=e;u=i.getActions(h),s=t,a=n,l=o,c=r}Mdt(u,s,!1,typeof a=="string"?h=>h===a:a,l,c)}function Mdt(i,e,t,n=s=>s==="navigation",o=()=>!1,r=!1){let s,a;Array.isArray(e)?(s=e,a=e):(s=e.primary,a=e.secondary);let l=new Set;for(let[c,u]of i){let d;n(c)?(d=s,d.length>0&&r&&d.push(new yr)):(d=a,d.length>0&&d.push(new yr));for(let h of u){t&&(h=h instanceof Kl&&h.alt?h.alt:h);let f=d.push(h);h instanceof Tg&&l.add({group:c,action:h,index:f-1})}}for(let{group:c,action:u,index:d}of l){let h=n(c)?s:a,f=u.actions;o(u,c,h.length)&&h.splice(d,1,...f)}}function Wne(i,e,t){return e instanceof Kl?i.createInstance(n1,e,t):e instanceof e0?e.item.isSelection?i.createInstance(mLe,e):e.item.rememberDefaultAction?i.createInstance(pLe,e,{...t,persistLastActionId:!0}):i.createInstance(fLe,e,t):void 0}var Hne,ff,n1,Vne,fLe,pLe,mLe,Xx=D(()=>{Ye();xc();BL();uLe();il();$ie();de();wi();xdt();Be();go();dLe();Bt();Ed();ht();Xo();Ic();VA();io();ko();Jb();gn();nr();i1();fh();Hne=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ff=function(i,e){return function(t,n){e(t,n,i)}};n1=class extends Vg{constructor(e,t,n,o,r,s,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._options=t,this._keybindingService=n,this._notificationService=o,this._contextKeyService=r,this._themeService=s,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Vn),this._altKey=bx.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1,n=()=>{let o=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);o!==this._wantsAltCommand&&(this._wantsAltCommand=o,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(ce(e,"mouseleave",o=>{t=!1,n()})),this._register(ce(e,"mouseenter",o=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){let e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label,o=t?y("titleAndKb","{0} ({1})",n,t):n;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){let r=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,s=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),a=s&&s.getLabel(),l=a?y("titleAndKb","{0} ({1})",r,a):r;o=y("titleAndKbAndAlt",`{0} +[{1}] {2}`,o,nP.modifierLabels[Ja].altKey,l)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;let{element:t,label:n}=this;if(!t||!n)return;let o=this._commandAction.checked&&_dt(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(o)if(ut.isThemeIcon(o)){let r=ut.asClassNameArray(o);n.classList.add(...r),this._itemClassDispose.value=He(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=wy(this._themeService.getColorTheme().type)?im(o.dark):im(o.light),n.classList.add("icon"),this._itemClassDispose.value=gc(He(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};n1=Hne([ff(2,Xt),ff(3,_n),ff(4,Ze),ff(5,Wn),ff(6,ia),ff(7,Es)],n1);Vne=class i extends n1{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=i._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=y({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,t):this.label.textContent=y({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"\u23CE").replace(/\bEscape\b/gi,"Esc")}},fLe=class extends BE{constructor(e,t,n,o,r){let s={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(ut.isThemeIcon(e.item.icon)?ut.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(a=>n.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},o,s),this._keybindingService=n,this._contextMenuService=o,this._themeService=r}render(e){super.render(e),gi(this.element),e.classList.add("menu-entry");let t=this._action,{icon:n}=t.item;if(n&&!ut.isThemeIcon(n)){this.element.classList.add("icon");let o=()=>{this.element&&(this.element.style.backgroundImage=wy(this._themeService.getColorTheme().type)?im(n.dark):im(n.light))};o(),this._register(this._themeService.onDidColorThemeChange(()=>{o()}))}}};fLe=Hne([ff(2,Xt),ff(3,ia),ff(4,Wn)],fLe);pLe=class extends mh{constructor(e,t,n,o,r,s,a,l){super(null,e),this._keybindingService=n,this._notificationService=o,this._contextMenuService=r,this._menuService=s,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let c,u=t?.persistLastActionId?l.get(this._storageKey,1):void 0;u&&(c=e.actions.find(h=>u===h.id)),c||(c=e.actions[0]),this._defaultAction=this._instaService.createInstance(n1,c,{keybinding:this._getDefaultActionKeybindingLabel(c)});let d={keybindingProvider:h=>this._keybindingService.lookupKeybinding(h.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??new op};this._dropdown=new BE(e,e.actions,this._contextMenuService,d),this._register(this._dropdown.actionRunner.onDidRun(h=>{h.action instanceof Kl&&this.update(h.action)}))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(n1,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends op{async runAction(t,n){await t.run(void 0)}},this._container&&this._defaultAction.render(KF(this._container,xe(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){let n=this._keybindingService.lookupKeybinding(e.id);n&&(t=`(${n.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let t=xe(".action-container");this._defaultAction.render(Ae(this._container,t)),this._register(ce(t,Te.KEY_DOWN,o=>{let r=new Vi(o);r.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),r.stopPropagation())}));let n=xe(".dropdown-action-container");this._dropdown.render(Ae(this._container,n)),this._register(ce(n,Te.KEY_DOWN,o=>{let r=new Vi(o);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};pLe=Hne([ff(2,Xt),ff(3,_n),ff(4,ia),ff(5,nl),ff(6,Re),ff(7,oc)],pLe);mLe=class extends Fne{constructor(e,t){super(null,e,e.actions.map(n=>({text:n.id===yr.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":n.label,isDisabled:!n.enabled})),0,t,Idt,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=it(Hz)}runAction(e,t){let n=this.action.actions[t];n&&this.actionRunner.run(n)}};mLe=Hne([ff(1,hh)],mLe)});var Ps,Hg=D(()=>{Ye();xc();BL();ic();il();et();de();gn();aLe();Ps=class extends H{constructor(e,t={}){super(),this._actionRunnerDisposables=this._register(new se),this.viewItemDisposables=this._register(new W_),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new q),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new q({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new q),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new q),this.onWillRun=this._onWillRun.event,this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register(a0()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new op,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(r=>this._onDidRun.fire(r))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(r=>this._onWillRun.fire(r))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let n,o;switch(this._orientation){case 0:n=[15],o=[17];break;case 1:n=[16],o=[18],this.domNode.className+=" vertical";break}this._register(ce(this.domNode,Te.KEY_DOWN,r=>{let s=new Vi(r),a=!0,l=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;n&&(s.equals(n[0])||s.equals(n[1]))?a=this.focusPrevious():o&&(s.equals(o[0])||s.equals(o[1]))?a=this.focusNext():s.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():s.equals(14)?a=this.focusFirst():s.equals(13)?a=this.focusLast():s.equals(2)&&l instanceof mh&&l.trapsArrowNavigation?a=this.focusNext(void 0,!0):this.isTriggerKeyEvent(s)?this._triggerKeys.keyDown?this.doTrigger(s):this.triggerKeyDown=!0:a=!1,a&&(s.preventDefault(),s.stopPropagation())})),this._register(ce(this.domNode,Te.KEY_UP,r=>{let s=new Vi(r);this.isTriggerKeyEvent(s)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(s)),s.preventDefault(),s.stopPropagation()):(s.equals(2)||s.equals(1026)||s.equals(16)||s.equals(18)||s.equals(15)||s.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(iu(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(ds()===this.domNode||!Dr(ds(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let t=this.viewItems.find(n=>n instanceof mh&&n.isEnabled());t instanceof mh&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof mh&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){if(typeof e=="number")return this.viewItems[e]?.action;if(To(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{let s=document.createElement("li");s.className="action-item",s.setAttribute("role","presentation");let a,l={hoverDelegate:this._hoverDelegate,...t,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(r,l)),a||(a=new Vg(this.context,r,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,ce(s,Te.CONTEXT_MENU,c=>{mi.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(s),this.focusable&&a instanceof mh&&this.viewItems.length===0&&a.setFocusable(!0),o===null||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(s),this.viewItems.push(a)):(this.actionsList.insertBefore(s,this.actionsList.children[o]),this.viewItems.splice(o,0,a),o++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Oi(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),Tr(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,n;if(e===void 0?t=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){let o=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=o===-1?void 0:o,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let n=this.focusedItem,o;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,o=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!o.isEnabled()||o.action.id===yr.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===yr.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();let o=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(o){let r=!0;K_(o.focus)||(r=!1),this.options.focusOnlyEnabledItems&&K_(o.isEnabled)&&!o.isEnabled()&&(r=!1),o.action.id===yr.ID&&(r=!1),r?(n||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),r&&o.showHover?.()}}doTrigger(e){if(typeof this.focusedItem>"u")return;let t=this.viewItems[this.focusedItem];if(t instanceof mh){let n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=Oi(this.viewItems),this.getContainer().remove(),super.dispose()}}});function Wai(i){let e=bLe,t=e.exec(i);if(!t)return i;let n=!t[1];return i.replace(e,n?"$2$3":"").trim()}function Rdt(i){let e=ZK()[i.id];return`.codicon-${i.id}:before { content: '\\${e.toString(16)}'; }`}function Uai(i,e){let t=` .monaco-menu { font-size: 13px; border-radius: 5px; min-width: 160px; } -${Dft(Ee.menuSelection)} -${Dft(Ee.menuSubmenu)} +${Rdt(De.menuSelection)} +${Rdt(De.menuSubmenu)} .monaco-menu .monaco-action-bar { text-align: right; @@ -828,86 +828,86 @@ ${Dft(Ee.menuSubmenu)} .monaco-scrollable-element > .shadow.top.left { box-shadow: ${n} 6px 6px 6px -6px inset; } - `);let r=i.scrollbarSliderBackground;r&&(t+=` + `);let o=i.scrollbarSliderBackground;o&&(t+=` .monaco-scrollable-element > .scrollbar > .slider { - background: ${r}; + background: ${o}; } - `);let o=i.scrollbarSliderHoverBackground;o&&(t+=` + `);let r=i.scrollbarSliderHoverBackground;r&&(t+=` .monaco-scrollable-element > .scrollbar > .slider:hover { - background: ${o}; + background: ${r}; } `);let s=i.scrollbarSliderActiveBackground;s&&(t+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${s}; } - `)}return t}var YIe,qIe,wie,KIe,Yz,xie,Cie,_ie,Tft=D(()=>{Ph();Xf();Ye();gc();Op();Dg();rL();Yke();Ag();$a();Jt();er();Q5();Dr();jI();ae();Si();Pt();YIe=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,qIe=/(&)?(&)([^\s&])/g;(function(i){i[i.Right=0]="Right",i[i.Left=1]="Left"})(wie||(wie={}));(function(i){i[i.Above=0]="Above",i[i.Below=1]="Below"})(KIe||(KIe={}));Yz=class i extends Ns{constructor(e,t,n,r){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");let o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,n,s),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...qt||vo?[10]:[]],keyDown:!0}}),this.menuStyles=r,this.menuElement=o,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,r),this._register(Do.addTarget(o)),this._register(re(o,De.KEY_DOWN,c=>{new Wi(c).equals(2)&&c.preventDefault()})),n.enableMnemonics&&this._register(re(o,De.KEY_DOWN,c=>{let u=c.key.toLocaleLowerCase();if(this.mnemonics.has(u)){Ai.stop(c,!0);let d=this.mnemonics.get(u);if(d.length===1&&(d[0]instanceof Cie&&d[0].container&&this.focusItemByElement(d[0].container),d[0].onClick(c)),d.length>1){let h=d.shift();h&&h.container&&(this.focusItemByElement(h.container),d.push(h)),this.mnemonics.set(u,d)}}})),vo&&this._register(re(o,De.KEY_DOWN,c=>{let u=new Wi(c);u.equals(14)||u.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Ai.stop(c,!0)):(u.equals(13)||u.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Ai.stop(c,!0))})),this._register(re(this.domNode,De.MOUSE_OUT,c=>{let u=c.relatedTarget;Co(u,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(re(this.actionsList,De.MOUSE_OVER,c=>{let u=c.target;if(!(!u||!Co(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){let d=this.focusedItem;this.setFocusedItem(u),d!==this.focusedItem&&this.updateFocus()}}})),this._register(Do.addTarget(this.actionsList)),this._register(re(this.actionsList,En.Tap,c=>{let u=c.initialTarget;if(!(!u||!Co(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){let d=this.focusedItem;this.setFocusedItem(u),d!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Ub(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));let a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,r),this._register(re(o,En.Change,c=>{Ai.stop(c,!0);let u=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:u-c.translationY})})),this._register(re(a,De.MOUSE_UP,c=>{c.preventDefault()}));let l=rt(e);o.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((c,u)=>n.submenuIds?.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof go&&(u===t.length-1||u===0||t[u-1]instanceof go))),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof _ie)).forEach((c,u,d)=>{c.updatePositionInSet(u+1,d.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Kk(e)?this.styleSheet=Xa(e):(i.globalStyleSheet||(i.globalStyleSheet=Xa()),this.styleSheet=i.globalStyleSheet)),this.styleSheet.textContent=Kbi(t,Kk(e))}styleScrollElement(e,t){let n=t.foregroundColor??"",r=t.backgroundColor??"",o=t.borderColor?`1px solid ${t.borderColor}`:"",s="5px",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=o,e.style.borderRadius=s,e.style.color=n,e.style.backgroundColor=r,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){let t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(re(this.element,De.MOUSE_UP,o=>{if(Ai.stop(o,!0),ml){if(new gl(rt(this.element),o).rightButton)return;this.onClick(o)}else setTimeout(()=>{this.onClick(o)},0)})),this._register(re(this.element,De.CONTEXT_MENU,o=>{Ai.stop(o,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=be(this.element,we("a.action-menu-item")),this._action.id===go.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=be(this.item,we("span.menu-item-check"+ut.asCSSSelector(Ee.menuSelection))),this.check.setAttribute("role","none"),this.label=be(this.item,we("span.action-label")),this.options.label&&this.options.keybinding&&(be(this.item,we("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){_o(this.label);let e=rO(this.action.label);if(e){let t=Ybi(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));let n=YIe.exec(e);if(n){e=fS(e),qIe.lastIndex=0;let r=qIe.exec(e);for(;r&&r[1];)r=qIe.exec(e);let o=s=>s.replace(/&&/g,"&");r?this.label.append(Ww(o(e.substr(0,r.index))," "),we("u",{"aria-hidden":"true"},r[3]),DSe(o(e.substr(r.index+r[0].length))," ")):this.label.innerText=o(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;let e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){let e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,r=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=r,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=t??"")}},Cie=class extends xie{constructor(e,t,n,r,o){super(e,e,r,o),this.submenuActions=t,this.parentData=n,this.submenuOptions=r,this.mysubmenu=null,this.submenuDisposables=this._register(new te),this.mouseOver=!1,this.expandDirection=r&&r.expandDirection!==void 0?r.expandDirection:{horizontal:wie.Right,vertical:KIe.Below},this.showScheduler=new di(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new di(()=>{this.element&&!Co(hs(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=be(this.item,we("span.submenu-indicator"+ut.asCSSSelector(Ee.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(re(this.element,De.KEY_UP,t=>{let n=new Wi(t);(n.equals(17)||n.equals(3))&&(Ai.stop(t,!0),this.createSubmenu(!0))})),this._register(re(this.element,De.KEY_DOWN,t=>{let n=new Wi(t);hs()===this.item&&(n.equals(17)||n.equals(3))&&Ai.stop(t,!0)})),this._register(re(this.element,De.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(re(this.element,De.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(re(this.element,De.FOCUS_OUT,t=>{this.element&&!Co(hs(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){Ai.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,r){let o={top:0,left:0};return o.left=YI(e.width,t.width,{position:r.horizontal===wie.Right?0:1,offset:n.left,size:n.width}),o.left>=n.left&&o.left{new Wi(u).equals(15)&&(Ai.stop(u,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(re(this.submenuContainer,De.KEY_DOWN,u=>{new Wi(u).equals(15)&&Ai.stop(u,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();let t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}},_ie=class extends Eg{constructor(e,t,n,r){super(e,t,n),this.menuStyles=r}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}});var Sie,kft=D(()=>{Ye();Op();Tft();$a();Lt();ae();By();Sie=class{constructor(e,t,n,r){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=r,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){let t=e.getActions();if(!t.length)return;this.focusToReturn=hs();let n,r=Er(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:o=>{this.lastContainer=o;let s=e.getMenuClassName?e.getMenuClassName():"";s&&(o.className+=" "+s),this.options.blockMouse&&(this.block=o.appendChild(we(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=re(this.block,De.MOUSE_DOWN,u=>u.stopPropagation()));let a=new te,l=e.actionRunner||new Gf;l.onWillRun(u=>this.onActionRun(u,!e.skipTelemetry),this,a),l.onDidRun(this.onDidActionRun,this,a),n=new Yz(o,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:u=>this.keybindingService.lookupKeybinding(u.id)},_ft),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);let c=rt(o);return a.add(re(c,De.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(re(c,De.MOUSE_DOWN,u=>{if(u.defaultPrevented)return;let d=new gl(c,u),h=d.target;if(!d.rightButton){for(;h;){if(h===o)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),hc(a,n)},focus:()=>{n?.focus(!!e.autoSelectFirstItem)},onHide:o=>{e.onHide?.(!!o),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&(hs()===this.lastContainer||Co(hs(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},r,!!r)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!ja(e.error)&&this.notificationService.error(e.error)}}});var Jbi,RO,Eie,JIe,Ift=D(()=>{Ye();$a();et();ae();Ex();fr();Wt();Yr();_c();eh();kft();bd();Jbi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},RO=function(i,e){return function(t,n){e(t,n,i)}},Eie=class extends W{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Sie(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,r,o,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=r,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new G),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new G)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=JIe.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),Gw.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};Eie=Jbi([RO(0,io),RO(1,Cn),RO(2,rh),RO(3,ni),RO(4,el),RO(5,Ze)],Eie);(function(i){function e(n){return n&&n.menuId instanceof tt}function t(n,r,o){if(!e(n))return n;let{menuId:s,menuActionOptions:a,contextKeyService:l}=n;return{...n,getActions:()=>{let c=[];if(s){let u=r.getMenuActions(s,l??o,a);Sft(u,c)}return n.getActions?go.join(n.getActions(),c):c}}}i.transform=t})(JIe||(JIe={}))});var Kz,Lft=D(()=>{(function(i){i[i.API=0]="API",i[i.USER=1]="USER"})(Kz||(Kz={}))});var $Ie,Die,XIe,ZIe,Tie,Nft=D(()=>{Ye();ad();sn();Sp();ql();hte();bl();Ec();mn();fs();Xn();Lft();vd();$Ie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Die=function(i,e){return function(t,n){e(t,n,i)}},XIe=class{constructor(e){this._commandService=e}async open(e,t){if(!Gk(e,jt.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=Xe.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=wz(decodeURIComponent(e.query))}catch{try{n=wz(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};XIe=$Ie([Die(0,Oi)],XIe);ZIe=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=Xe.parse(e));let{selection:n,uri:r}=ndt(e);return e=r,e.scheme===jt.file&&(e=Rdt(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:t?.fromUserGesture?Kz.USER:Kz.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};ZIe=$Ie([Die(0,ai)],ZIe);Tie=class{constructor(e,t){this._openers=new Ro,this._validators=new Ro,this._resolvers=new Ro,this._resolvedUriTargets=new ms(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ro,this._defaultExternalOpener={openExternal:async n=>(K9(n,jt.http,jt.https)?vZ(n):Xi.location.href=n,!0)},this._openers.push({open:async(n,r)=>r?.openExternal||K9(n,jt.mailto,jt.http,jt.https,jt.vsls)?(await this._doOpenExternal(n,r),!0):!1}),this._openers.push(new XIe(t)),this._openers.push(new ZIe(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){let n=typeof e=="string"?Xe.parse(e):e,r=this._resolvedUriTargets.get(n)??e;for(let o of this._validators)if(!await o.shouldOpen(r,t))return!1;for(let o of this._openers)if(await o.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(let n of this._resolvers)try{let r=await n.resolveExternalUri(e,t);if(r)return this._resolvedUriTargets.has(r.resolved)||this._resolvedUriTargets.set(r.resolved,e),r}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){let n=typeof e=="string"?Xe.parse(e):e,r;try{r=(await this.resolveExternalUri(n,t)).resolved}catch{r=n}let o;if(typeof e=="string"&&n.toString()===r.toString()?o=e:o=encodeURI(r.toString(!0)),t?.allowContributedOpeners){let s=typeof t?.allowContributedOpeners=="string"?t?.allowContributedOpeners:void 0;for(let a of this._externalOpeners)if(await a.openExternal(o,{sourceUri:n,preferredOpenerId:s},Ft.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:n},Ft.None)}dispose(){this._validators.clear()}};Tie=$Ie([Die(0,ai),Die(1,Oi)],Tie)});var pa,xv=D(()=>{ht();pa=vt("editorWorkerService")});var so,Jz,tf,Vy=D(()=>{fx();Oe();ht();(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(so||(so={}));(function(i){function e(s,a){return a-s}i.compare=e;let t=Object.create(null);t[i.Error]=y("sev.error","Error"),t[i.Warning]=y("sev.warning","Warning"),t[i.Info]=y("sev.info","Info");function n(s){return t[s]||""}i.toString=n;function r(s){switch(s){case qr.Error:return i.Error;case qr.Warning:return i.Warning;case qr.Info:return i.Info;case qr.Ignore:return i.Hint}}i.fromSeverity=r;function o(s){switch(s){case i.Error:return qr.Error;case i.Warning:return qr.Warning;case i.Info:return qr.Info;case i.Hint:return qr.Ignore}}i.toSeverity=o})(so||(so={}));(function(i){function t(r){return n(r,!0)}i.makeKey=t;function n(r,o){let s=[""];return r.source?s.push(r.source.replace("\xA6","\\\xA6")):s.push(""),r.code?typeof r.code=="string"?s.push(r.code.replace("\xA6","\\\xA6")):s.push(r.code.value.replace("\xA6","\\\xA6")):s.push(""),r.severity!==void 0&&r.severity!==null?s.push(so.toString(r.severity)):s.push(""),r.message&&o?s.push(r.message.replace("\xA6","\\\xA6")):s.push(""),r.startLineNumber!==void 0&&r.startLineNumber!==null?s.push(r.startLineNumber.toString()):s.push(""),r.startColumn!==void 0&&r.startColumn!==null?s.push(r.startColumn.toString()):s.push(""),r.endLineNumber!==void 0&&r.endLineNumber!==null?s.push(r.endLineNumber.toString()):s.push(""),r.endColumn!==void 0&&r.endColumn!==null?s.push(r.endColumn.toString()):s.push(""),s.push(""),s.join("\xA6")}i.makeKeyOptionalMessage=n})(Jz||(Jz={}));tf=vt("markerService")});var eLe,tLe,rhn,ohn,shn,ahn,FO,kie,Iie,Mft,Lie,Rft,Nie,Fft,Xbi,Zbi,sL,Oft,Pft,Bft,zft,Vft,aL,Hft,Wft,Uft,jft,Qft,$bi,lhn,Gft,chn,uhn,dhn,hhn,qft,Yft,fhn,phn,Kft,mhn,Jft,ghn,e0i,Mie,Xft,Zft,$ft,Rie,Fie,Oie,Pie,Bie,zie,ept,tpt,ipt,npt,rpt,opt,spt,apt,lpt,cpt,upt,dpt,hpt,bhn,vhn,tm=D(()=>{Oe();Ho();eo();Zn();eLe=j("editor.lineHighlightBackground",null,y("lineHighlight","Background color for the highlight of line at the cursor position.")),tLe=j("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Fi},y("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),rhn=j("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},y("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),ohn=j("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Jn,hcLight:Jn},y("rangeHighlightBorder","Background color of the border around highlighted ranges.")),shn=j("editor.symbolHighlightBackground",{dark:cg,light:cg,hcDark:null,hcLight:null},y("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),ahn=j("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Jn,hcLight:Jn},y("symbolHighlightBorder","Background color of the border around highlighted symbols.")),FO=j("editorCursor.foreground",{dark:"#AEAFAD",light:pe.black,hcDark:pe.white,hcLight:"#0F4A85"},y("caret","Color of the editor cursor.")),kie=j("editorCursor.background",null,y("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Iie=j("editorMultiCursor.primary.foreground",FO,y("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),Mft=j("editorMultiCursor.primary.background",kie,y("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),Lie=j("editorMultiCursor.secondary.foreground",FO,y("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),Rft=j("editorMultiCursor.secondary.background",kie,y("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),Nie=j("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},y("editorWhitespaces","Color of whitespace characters in the editor.")),Fft=j("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:pe.white,hcLight:"#292929"},y("editorLineNumbers","Color of editor line numbers.")),Xbi=j("editorIndentGuide.background",Nie,y("editorIndentGuides","Color of the editor indentation guides."),!1,y("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),Zbi=j("editorIndentGuide.activeBackground",Nie,y("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,y("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),sL=j("editorIndentGuide.background1",Xbi,y("editorIndentGuides1","Color of the editor indentation guides (1).")),Oft=j("editorIndentGuide.background2","#00000000",y("editorIndentGuides2","Color of the editor indentation guides (2).")),Pft=j("editorIndentGuide.background3","#00000000",y("editorIndentGuides3","Color of the editor indentation guides (3).")),Bft=j("editorIndentGuide.background4","#00000000",y("editorIndentGuides4","Color of the editor indentation guides (4).")),zft=j("editorIndentGuide.background5","#00000000",y("editorIndentGuides5","Color of the editor indentation guides (5).")),Vft=j("editorIndentGuide.background6","#00000000",y("editorIndentGuides6","Color of the editor indentation guides (6).")),aL=j("editorIndentGuide.activeBackground1",Zbi,y("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),Hft=j("editorIndentGuide.activeBackground2","#00000000",y("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Wft=j("editorIndentGuide.activeBackground3","#00000000",y("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Uft=j("editorIndentGuide.activeBackground4","#00000000",y("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),jft=j("editorIndentGuide.activeBackground5","#00000000",y("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),Qft=j("editorIndentGuide.activeBackground6","#00000000",y("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),$bi=j("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Jn,hcLight:Jn},y("editorActiveLineNumber","Color of editor active line number"),!1,y("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),lhn=j("editorLineNumber.activeForeground",$bi,y("editorActiveLineNumber","Color of editor active line number")),Gft=j("editorLineNumber.dimmedForeground",null,y("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),chn=j("editorRuler.foreground",{dark:"#5A5A5A",light:pe.lightgrey,hcDark:pe.white,hcLight:"#292929"},y("editorRuler","Color of the editor rulers.")),uhn=j("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},y("editorCodeLensForeground","Foreground color of editor CodeLens")),dhn=j("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},y("editorBracketMatchBackground","Background color behind matching brackets")),hhn=j("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Fi,hcLight:Fi},y("editorBracketMatchBorder","Color for matching brackets boxes")),qft=j("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},y("editorOverviewRulerBorder","Color of the overview ruler border.")),Yft=j("editorOverviewRuler.background",null,y("editorOverviewRulerBackground","Background color of the editor overview ruler.")),fhn=j("editorGutter.background",Vh,y("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),phn=j("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:pe.fromHex("#fff").transparent(.8),hcLight:Fi},y("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),Kft=j("editorUnnecessaryCode.opacity",{dark:pe.fromHex("#000a"),light:pe.fromHex("#0007"),hcDark:null,hcLight:null},y("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`)),mhn=j("editorGhostText.border",{dark:null,light:null,hcDark:pe.fromHex("#fff").transparent(.8),hcLight:pe.fromHex("#292929").transparent(.8)},y("editorGhostTextBorder","Border color of ghost text in the editor.")),Jft=j("editorGhostText.foreground",{dark:pe.fromHex("#ffffff56"),light:pe.fromHex("#0007"),hcDark:null,hcLight:null},y("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),ghn=j("editorGhostText.background",null,y("editorGhostTextBackground","Background color of the ghost text in the editor.")),e0i=new pe(new Ri(0,122,204,.6)),Mie=j("editorOverviewRuler.rangeHighlightForeground",e0i,y("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Xft=j("editorOverviewRuler.errorForeground",{dark:new pe(new Ri(255,18,18,.7)),light:new pe(new Ri(255,18,18,.7)),hcDark:new pe(new Ri(255,50,50,1)),hcLight:"#B5200D"},y("overviewRuleError","Overview ruler marker color for errors.")),Zft=j("editorOverviewRuler.warningForeground",{dark:Up,light:Up,hcDark:yS,hcLight:yS},y("overviewRuleWarning","Overview ruler marker color for warnings.")),$ft=j("editorOverviewRuler.infoForeground",{dark:Hh,light:Hh,hcDark:wS,hcLight:wS},y("overviewRuleInfo","Overview ruler marker color for infos.")),Rie=j("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},y("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),Fie=j("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},y("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),Oie=j("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},y("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),Pie=j("editorBracketHighlight.foreground4","#00000000",y("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Bie=j("editorBracketHighlight.foreground5","#00000000",y("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),zie=j("editorBracketHighlight.foreground6","#00000000",y("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),ept=j("editorBracketHighlight.unexpectedBracket.foreground",{dark:new pe(new Ri(255,18,18,.8)),light:new pe(new Ri(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},y("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),tpt=j("editorBracketPairGuide.background1","#00000000",y("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),ipt=j("editorBracketPairGuide.background2","#00000000",y("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),npt=j("editorBracketPairGuide.background3","#00000000",y("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),rpt=j("editorBracketPairGuide.background4","#00000000",y("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),opt=j("editorBracketPairGuide.background5","#00000000",y("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),spt=j("editorBracketPairGuide.background6","#00000000",y("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),apt=j("editorBracketPairGuide.activeBackground1","#00000000",y("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),lpt=j("editorBracketPairGuide.activeBackground2","#00000000",y("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),cpt=j("editorBracketPairGuide.activeBackground3","#00000000",y("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),upt=j("editorBracketPairGuide.activeBackground4","#00000000",y("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),dpt=j("editorBracketPairGuide.activeBackground5","#00000000",y("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),hpt=j("editorBracketPairGuide.activeBackground6","#00000000",y("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),bhn=j("editorUnicodeHighlight.border",Up,y("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),vhn=j("editorUnicodeHighlight.background",Fst,y("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));ua((i,e)=>{let t=i.getColor(Vh),n=i.getColor(eLe),r=n&&!n.isTransparent()?n:t;r&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)})});function fpt(i,e){let t=[],n=[];for(let r of i)e.has(r)||t.push(r);for(let r of e)i.has(r)||n.push(r);return{removed:t,added:n}}function ppt(i,e){let t=new Set;for(let n of e)i.has(n)&&t.add(n);return t}var iLe=D(()=>{});var t0i,mpt,Vie,nLe,gpt=D(()=>{Vy();ae();tl();Zn();tm();Zc();We();bl();et();eo();ql();iLe();t0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mpt=function(i,e){return function(t,n){e(t,n,i)}},Vie=class extends W{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new G),this._markerDecorations=new ms,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){let n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{let n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){let t=new nLe(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){let t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===jt.inMemory||e.uri.scheme===jt.internal||e.uri.scheme===jt.vscode)&&this._markerService?.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri]))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};Vie=t0i([mpt(0,an),mpt(1,tf)],Vie);nLe=class extends W{constructor(e){super(),this.model=e,this._map=new Z$,this._register(Ve(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){let{added:t,removed:n}=fpt(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;let r=n.map(a=>this._map.get(a)),o=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),s=this.model.deltaDecorations(r,o);for(let a of n)this._map.delete(a);for(let a=0;a=r)return n;let o=e.getWordAtPosition(n.getStartPosition());o&&(n=new N(n.startLineNumber,o.startColumn,n.endLineNumber,o.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){let r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0:!1}}});var OO,Hie=D(()=>{ht();OO=vt("markerDecorationsService")});function i0i(i,e,t){let n=0;for(let o=0;o{Pt();zb()});var Xz,rLe,Uie,bpt=D(()=>{Xz=class{constructor(e,t,n,r){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=r}},rLe=class{constructor(e,t,n,r,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=r,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}},Uie=class extends rLe{constructor(e,t,n,r,o,s,a){super(e,t,n,r,o,s),this.minVisibleColumnIndentation=a}}});function vpt(i,e,t,n){return i!==t?is(t-i,n):is(0,n-e)}function BO(i){return i===0}function is(i,e){return i*im+e}function lh(i){let e=i,t=Math.floor(e/im),n=e-t*im;return new $c(t,n)}function Apt(i){return Math.floor(i/im)}function Fr(i,e){let t=i+e;return e>=im&&(t=t-i%im),t}function ypt(i,e){return i.reduce((t,n)=>Fr(t,e(n)),Tl)}function oLe(i,e){return i===e}function lL(i,e){let t=i,n=e;if(n-t<=0)return Tl;let o=Math.floor(t/im),s=Math.floor(n/im),a=n-s*im;if(o===s){let l=t-o*im;return is(0,a-l)}else return is(s-o,a)}function Dx(i,e){return i=e}function vE(i){return is(i.lineNumber-1,i.column-1)}function AE(i,e){let t=i,n=Math.floor(t/im),r=t-n*im,o=e,s=Math.floor(o/im),a=o-s*im;return new N(n+1,r+1,s+1,a+1)}function wpt(i){let e=Pu(i);return is(e.length-1,e[e.length-1].length)}var Tl,im,Hy=D(()=>{Pt();We();dx();Tl=0;im=2**26});var Kb,jie,sLe,Zz=D(()=>{We();Hy();Kb=class i{static fromModelContentChanges(e){return e.map(n=>{let r=N.lift(n.range);return new i(vE(r.getStartPosition()),vE(r.getEndPosition()),wpt(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${lh(this.startOffset)}...${lh(this.endOffset)}) -> ${lh(this.newLength)}`}},jie=class{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>sLe.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:lL(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?is(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):is(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=lh(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?is(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):is(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{Qie=[],ju=class i{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&t.length===0){let n=i.cache[e];return n||(n=new i(e,t),i.cache[e]=n),n}return new i(e,t)}static{this.empty=i.create(0,Qie)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){let n=t.getKey(e),r=n>>5;if(r===0){let s=1<{Lt();zb();Hy();cL();$z=class{get length(){return this._length}constructor(e){this._length=e}},eV=class i extends $z{static create(e,t,n){let r=e.length;return t&&(r=Fr(r,t.length)),n&&(r=Fr(r,n.length)),new i(r,e,t,n,t?t.missingOpeningBracketIds:ju.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,n,r,o){super(e),this.openingBracket=t,this.child=n,this.closingBracket=r,this.missingOpeningBracketIds=o}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new i(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(Fr(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}},nm=class extends $z{static create23(e,t,n,r=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=Fr(o,t.length),s=s.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");o=Fr(o,n.length),s=s.merge(n.missingOpeningBracketIds)}return r?new lLe(o,e.listHeight+1,e,t,n,s):new tV(o,e.listHeight+1,e,t,n,s)}static getEmpty(){return new cLe(Tl,0,[],ju.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(e===0)return;let t=this.getChild(e-1),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;let t=this.getChild(0),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(0,n),n}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let t=this;for(;t.kind===4;){let n=t.childrenLength;if(n===0)throw new vi;t=t.getChild(n-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let r=1;r{Lt();BI();rV();Hy();cL();_v=class{constructor(e,t,n,r,o){this.length=e,this.kind=t,this.bracketId=n,this.bracketIds=r,this.astNode=o}},HO=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new uLe(this.textModel,this.bracketTokens),this._offset=Tl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return is(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Fr(this._offset,e);let t=lh(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=Fr(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}},uLe=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let o=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=o.length,o}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,n=0;for(;;){let o=this.lineTokens,s=o.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}let r=vpt(e,t,this.lineIdx,this.lineCharOffset);return new _v(r,0,-1,ju.getEmpty(),new Cv(r))}},Yie=class{constructor(e,t){this.text=e,this._offset=Tl,this.idx=0;let n=t.getRegExpStr(),r=n?new RegExp(n+`| -`,"gi"):null,o=[],s,a=0,l=0,c=0,u=0,d=[];for(let p=0;p<60;p++)d.push(new _v(is(0,p),0,-1,ju.getEmpty(),new Cv(is(0,p))));let h=[];for(let p=0;p<60;p++)h.push(new _v(is(1,p),0,-1,ju.getEmpty(),new Cv(is(1,p))));if(r)for(r.lastIndex=0;(s=r.exec(e))!==null;){let p=s.index,g=s[0];if(g===` -`)a++,l=p+1;else{if(c!==p){let v;if(u===a){let A=p-c;if(A{Pt();rV();Hy();cL();Kie();dLe=class i{static createFromLanguage(e,t){function n(o){return t.getKey(`${o.languageId}:::${o.bracketText}`)}let r=new Map;for(let o of e.bracketsNew.openingBrackets){let s=is(0,o.bracketText.length),a=n(o),l=ju.getEmpty().add(a,aLe);r.set(o.bracketText,new _v(s,1,a,l,nV.create(s,o,l)))}for(let o of e.bracketsNew.closingBrackets){let s=is(0,o.bracketText.length),a=ju.getEmpty(),l=o.getOpeningBrackets();for(let c of l)a=a.add(n(c),aLe);r.set(o.bracketText,new _v(s,2,n(l[0]),a,nV.create(s,o,a)))}return new i(r)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{let e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>o0i(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}};WO=class{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=dLe.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}});function Cpt(i){if(i.length===0)return null;if(i.length===1)return i[0];let e=0;function t(){if(e>=i.length)return null;let s=e,a=i[s].listHeight;for(e++;e=2?pLe(s===0&&e===i.length?i:i.slice(s,e),!1):i[s]}let n=t(),r=t();if(!r)return n;for(let s=t();s;s=t())xpt(n,r)<=xpt(r,s)?(n=fLe(n,r),r=s):r=fLe(r,s);return fLe(n,r)}function pLe(i,e=!1){if(i.length===0)return null;if(i.length===1)return i[0];let t=i.length;for(;t>3;){let n=t>>1;for(let r=0;r=3?i[2]:null,e)}function xpt(i,e){return Math.abs(i.listHeight-e.listHeight)}function fLe(i,e){return i.listHeight===e.listHeight?nm.create23(i,e,null,!1):i.listHeight>e.listHeight?s0i(i,e):a0i(e,i)}function s0i(i,e){i=i.toMutable();let t=i,n=[],r;for(;;){if(e.listHeight===t.listHeight){r=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let o=n.length-1;o>=0;o--){let s=n[o];r?s.childrenLength>=3?r=nm.create23(s.unappendChild(),r,null,!1):(s.appendChildOfSameHeight(r),r=void 0):s.handleChildrenChanged()}return r?nm.create23(i,r,null,!1):i}function a0i(i,e){i=i.toMutable();let t=i,n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let r=e;for(let o=n.length-1;o>=0;o--){let s=n[o];r?s.childrenLength>=3?r=nm.create23(r,s.unprependChild(),null,!1):(s.prependChildOfSameHeight(r),r=void 0):s.handleChildrenChanged()}return r?nm.create23(r,i,null,!1):i}var _pt=D(()=>{rV()});function mLe(i,e=-1){for(;;){if(e++,e>=i.childrenLength)return-1;if(i.getChild(e))return e}}function oV(i){return i.length>0?i[i.length-1]:void 0}var Jie,Spt=D(()=>{Hy();Jie=class{constructor(e){this.lastOffset=Tl,this.nextNodes=[e],this.offsets=[Tl],this.idxs=[]}readLongestNodeAt(e,t){if(Dx(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){let n=oV(this.nextNodes);if(!n)return;let r=oV(this.offsets);if(Dx(e,r))return;if(Dx(r,e))if(Fr(r,n.length)<=e)this.nextNodeAfterCurrent();else{let o=mLe(n);o!==-1?(this.nextNodes.push(n.getChild(o)),this.offsets.push(r),this.idxs.push(o)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{let o=mLe(n);if(o===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(o)),this.offsets.push(r),this.idxs.push(o)}}}}nextNodeAfterCurrent(){for(;;){let e=oV(this.offsets),t=oV(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;let n=oV(this.nextNodes),r=mLe(n,this.idxs[this.idxs.length-1]);if(r!==-1){this.nextNodes.push(n.getChild(r)),this.offsets.push(Fr(e,t.length)),this.idxs[this.idxs.length-1]=r;break}else this.idxs.pop()}}}});function sV(i,e,t,n){return new gLe(i,e,t,n).parseDocument()}var gLe,bLe=D(()=>{rV();Zz();cL();Hy();_pt();Spt();gLe=class{constructor(e,t,n,r){if(this.tokenizer=e,this.createImmutableLists=r,this._itemsConstructed=0,this._itemsFromCache=0,n&&r)throw new Error("Not supported");this.oldNodeReader=n?new Jie(n):void 0,this.positionMapper=new jie(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(ju.getEmpty(),0);return e||(e=nm.getEmpty()),e}parseList(e,t){let n=[];for(;;){let o=this.tryReadChildFromCache(e);if(!o){let s=this.tokenizer.peek();if(!s||s.kind===2&&s.bracketIds.intersects(e))break;o=this.parseChild(e,t+1)}o.kind===4&&o.childrenLength===0||n.push(o)}return this.oldNodeReader?Cpt(n):pLe(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!BO(t)){let n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),r=>t!==null&&!Dx(r.length,t)?!1:r.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;let n=this.tokenizer.read();switch(n.kind){case 2:return new qie(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Cv(n.length);let r=e.merge(n.bracketIds),o=this.parseList(r,t+1),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),eV.create(n.astNode,o,s.astNode)):eV.create(n.astNode,o,null)}default:throw new Error("unexpected")}}}});function UO(i,e){if(i.length===0)return e;if(e.length===0)return i;let t=new cd(Ept(i)),n=Ept(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=t.dequeue();function o(c){if(c===void 0){let d=t.takeWhile(h=>!0)||[];return r&&d.unshift(r),d}let u=[];for(;r&&!BO(c);){let[d,h]=r.splitAt(c);u.push(d),c=lL(d.lengthAfter,c),r=h??t.dequeue()}return BO(c)||u.push(new aV(!1,c,c)),u}let s=[];function a(c,u,d){if(s.length>0&&oLe(s[s.length-1].endOffset,c)){let h=s[s.length-1];s[s.length-1]=new Kb(h.startOffset,u,Fr(h.newLength,d))}else s.push({startOffset:c,endOffset:u,newLength:d})}let l=Tl;for(let c of n){let u=o(c.lengthBefore);if(c.modified){let d=ypt(u,f=>f.lengthBefore),h=Fr(l,d);a(l,h,c.lengthAfter),l=h}else for(let d of u){let h=l;l=Fr(l,d.lengthBefore),d.modified&&a(h,l,d.lengthAfter)}}return s}function Ept(i){let e=[],t=Tl;for(let n of i){let r=lL(t,n.startOffset);BO(r)||e.push(new aV(!1,r,r));let o=lL(n.startOffset,n.endOffset);e.push(new aV(!0,o,n.newLength)),t=n.endOffset}return e}var aV,vLe=D(()=>{Qt();Zz();Hy();aV=class i{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){let t=lL(e,this.lengthAfter);return oLe(t,Tl)?[this,void 0]:this.modified?[new i(this.modified,this.lengthBefore,e),new i(this.modified,Tl,t)]:[new i(this.modified,e,e),new i(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${lh(this.lengthBefore)} -> ${lh(this.lengthAfter)}`}}});function Dpt(i,e,t,n){if(i.kind===4||i.kind===2){let r=[];for(let o of i.children)t=Fr(e,o.length),r.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let o=r.length-1;o>=0;o--){let{nodeOffsetStart:s,nodeOffsetEnd:a}=r[o];if(Dx(s,n)){let l=Dpt(i.children[o],s,a,n);if(l)return l}}return null}else{if(i.kind===3)return null;if(i.kind===1){let r=AE(e,t);return{bracketInfo:i.bracketInfo,range:r}}}return null}function Tpt(i,e,t,n){if(i.kind===4||i.kind===2){for(let r of i.children){if(t=Fr(e,r.length),Dx(n,t)){let o=Tpt(r,e,t,n);if(o)return o}e=t}return null}else{if(i.kind===3)return null;if(i.kind===1){let r=AE(e,t);return{bracketInfo:i.bracketInfo,range:r}}}return null}function ALe(i,e,t,n,r,o,s,a,l,c,u=!1){if(s>200)return!0;e:for(;;)switch(i.kind){case 4:{let d=i.childrenLength;for(let h=0;h200)return!0;let l=!0;if(i.kind===2){let c=0;if(a){let h=a.get(i.openingBracket.text);h===void 0&&(h=0),c=h,h++,a.set(i.openingBracket.text,h)}let u=Fr(e,i.openingBracket.length),d=-1;if(o.includeMinIndentation&&(d=i.computeMinIndentation(e,o.textModel)),l=o.push(new Uie(AE(e,t),AE(e,u),i.closingBracket?AE(Fr(u,i.child?.length||Tl),t):void 0,s,c,i,d)),e=u,l&&i.child){let h=i.child;if(t=Fr(e,h.length),bE(e,r)&&zO(t,n)&&(l=wLe(h,e,t,n,r,o,s+1,a),!l))return!1}a?.set(i.openingBracket.text,c)}else{let c=e;for(let u of i.children){let d=c;if(c=Fr(c,u.length),bE(d,r)&&bE(n,c)&&(l=wLe(u,d,c,n,r,o,s,a),!l))return!1}}return l}var Xie,yLe,kpt=D(()=>{et();ae();bpt();Zz();hLe();Hy();bLe();cL();Kie();Qt();vLe();Xie=class extends W{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new G,this.denseKeyProvider=new VO,this.brackets=new WO(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{let n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),r=new Yie(this.textModel.getValue(),n);this.initialAstWithoutTokens=sV(r,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){let e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){let t=e.map(n=>new Kb(is(n.fromLineNumber-1,0),is(n.toLineNumber,0),is(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=Kb.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){let n=UO(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=UO(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){let o=t,s=new HO(this.textModel,this.brackets);return sV(s,e,o,n)}getBracketsInRange(e,t){this.flushQueue();let n=is(e.startLineNumber-1,e.startColumn-1),r=is(e.endLineNumber-1,e.endColumn-1);return new tx(o=>{let s=this.initialAstWithoutTokens||this.astWithTokens;ALe(s,Tl,s.length,n,r,o,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();let n=vE(e.getStartPosition()),r=vE(e.getEndPosition());return new tx(o=>{let s=this.initialAstWithoutTokens||this.astWithTokens,a=new yLe(o,t,this.textModel);wLe(s,Tl,s.length,n,r,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return Tpt(t,Tl,t.length,vE(e))}getFirstBracketBefore(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return Dpt(t,Tl,t.length,vE(e))}};yLe=class{constructor(e,t,n){this.push=e,this.includeMinIndentation=t,this.textModel=n}}});function l0i(i,e){return{object:i,dispose:()=>e?.dispose()}}function xLe(i){if(typeof i>"u")return()=>!0;{let e=Date.now();return()=>Date.now()-e<=i}}function Zie(i){return i instanceof Tx?null:i}var $ie,Tx,Ipt=D(()=>{Qt();et();ae();We();FF();F7();kpt();$ie=class extends W{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new On),this.onDidChangeEmitter=new G,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){(!e.languageId||this.bracketPairsTree.value?.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new te;this.bracketPairsTree.value=l0i(e.add(new Xie(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||tx.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||tx.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||tx.empty}findMatchingBracketUp(e,t,n){let r=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(r.lineNumber,r.column);if(this.canBuildAST){let s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!s)return null;let a=this.getBracketPairsInRange(N.fromPositions(t,t)).findLast(l=>s.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{let s=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!a)return null;let l=a.textIsBracket[s];return l?Zie(this._findMatchingBracketUp(l,r,xLe(n))):null}}matchBracket(e,t){if(this.canBuildAST){let n=this.getBracketPairsInRange(N.fromPositions(e,e)).filter(r=>r.closingBracketRange!==void 0&&(r.openingBracketRange.containsPosition(e)||r.closingBracketRange.containsPosition(e))).findLastMaxBy(aa(r=>r.openingBracketRange.containsPosition(e)?r.openingBracketRange:r.closingBracketRange,N.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{let n=xLe(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,r){let o=t.getCount(),s=t.getLanguageId(r),a=Math.max(0,e.column-1-n.maxBracketLength);for(let c=r-1;c>=0;c--){let u=t.getEndOffset(c);if(u<=a)break;if(Wb(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){a=u;break}}let l=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let c=r+1;c=l)break;if(Wb(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){l=u;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){let n=e.lineNumber,r=this.textModel.tokenization.getLineTokens(n),o=this.textModel.getLineContent(n),s=r.findTokenIndexAtOffset(e.column-1);if(s<0)return null;let a=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(s)).brackets;if(a&&!Wb(r.getStandardTokenType(s))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,r,a,s),u=null;for(;;){let d=qh.findNextBracketInRange(a.forwardRegex,n,o,l,c);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){let h=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),f=this._matchFoundBracket(d,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(f){if(f instanceof Tx)return null;u=f}}l=d.endColumn-1}if(u)return u}if(s>0&&r.getStartOffset(s)===e.column-1){let l=s-1,c=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(l)).brackets;if(c&&!Wb(r.getStandardTokenType(l))){let{searchStartOffset:u,searchEndOffset:d}=this._establishBracketSearchOffsets(e,r,c,l),h=qh.findPrevBracketInRange(c.reversedRegex,n,o,u,d);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){let f=o.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),p=this._matchFoundBracket(h,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(p)return p instanceof Tx?null:p}}}return null}_matchFoundBracket(e,t,n,r){if(!t)return null;let o=n?this._findMatchingBracketDown(t,e.getEndPosition(),r):this._findMatchingBracketUp(t,e.getStartPosition(),r);return o?o instanceof Tx?o:[e,o]:null}_findMatchingBracketUp(e,t,n){let r=e.languageId,o=e.reversedRegex,s=-1,a=0,l=(c,u,d,h)=>{for(;;){if(n&&++a%100===0&&!n())return Tx.INSTANCE;let f=qh.findPrevBracketInRange(o,c,u,d,h);if(!f)break;let p=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(p)?s++:e.isClose(p)&&s--,s===0)return f;h=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){let u=this.textModel.tokenization.getLineTokens(c),d=u.getCount(),h=this.textModel.getLineContent(c),f=d-1,p=h.length,g=h.length;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,g=t.column-1);let v=!0;for(;f>=0;f--){let A=u.getLanguageId(f)===r&&!Wb(u.getStandardTokenType(f));if(A)v?p=u.getStartOffset(f):(p=u.getStartOffset(f),g=u.getEndOffset(f));else if(v&&p!==g){let w=l(c,h,p,g);if(w)return w}v=A}if(v&&p!==g){let A=l(c,h,p,g);if(A)return A}}return null}_findMatchingBracketDown(e,t,n){let r=e.languageId,o=e.forwardRegex,s=1,a=0,l=(u,d,h,f)=>{for(;;){if(n&&++a%100===0&&!n())return Tx.INSTANCE;let p=qh.findNextBracketInRange(o,u,d,h,f);if(!p)break;let g=d.substring(p.startColumn-1,p.endColumn-1).toLowerCase();if(e.isOpen(g)?s++:e.isClose(g)&&s--,s===0)return p;h=p.endColumn-1}return null},c=this.textModel.getLineCount();for(let u=t.lineNumber;u<=c;u++){let d=this.textModel.tokenization.getLineTokens(u),h=d.getCount(),f=this.textModel.getLineContent(u),p=0,g=0,v=0;u===t.lineNumber&&(p=d.findTokenIndexAtOffset(t.column-1),g=t.column-1,v=t.column-1);let A=!0;for(;p=1;s--){let a=this.textModel.tokenization.getLineTokens(s),l=a.getCount(),c=this.textModel.getLineContent(s),u=l-1,d=c.length,h=c.length;if(s===t.lineNumber){u=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1;let p=a.getLanguageId(u);n!==p&&(n=p,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let f=!0;for(;u>=0;u--){let p=a.getLanguageId(u);if(n!==p){if(r&&o&&f&&d!==h){let v=qh.findPrevBracketInRange(r.reversedRegex,s,c,d,h);if(v)return this._toFoundBracket(o,v);f=!1}n=p,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}let g=!!r&&!Wb(a.getStandardTokenType(u));if(g)f?d=a.getStartOffset(u):(d=a.getStartOffset(u),h=a.getEndOffset(u));else if(o&&r&&f&&d!==h){let v=qh.findPrevBracketInRange(r.reversedRegex,s,c,d,h);if(v)return this._toFoundBracket(o,v)}f=g}if(o&&r&&f&&d!==h){let p=qh.findPrevBracketInRange(r.reversedRegex,s,c,d,h);if(p)return this._toFoundBracket(o,p)}}return null}findNextBracket(e){let t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;let n=this.textModel.getLineCount(),r=null,o=null,s=null;for(let a=t.lineNumber;a<=n;a++){let l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),u=this.textModel.getLineContent(a),d=0,h=0,f=0;if(a===t.lineNumber){d=l.findTokenIndexAtOffset(t.column-1),h=t.column-1,f=t.column-1;let g=l.getLanguageId(d);r!==g&&(r=g,o=this.languageConfigurationService.getLanguageConfiguration(r).brackets,s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let p=!0;for(;dg.closingBracketRange!==void 0&&g.range.strictContainsRange(f));return p?[p.openingBracketRange,p.closingBracketRange]:null}let r=xLe(t),o=this.textModel.getLineCount(),s=new Map,a=[],l=(f,p)=>{if(!s.has(f)){let g=[];for(let v=0,A=p?p.brackets.length:0;v{for(;;){if(r&&++c%100===0&&!r())return Tx.INSTANCE;let w=qh.findNextBracketInRange(f.forwardRegex,p,g,v,A);if(!w)break;let C=g.substring(w.startColumn-1,w.endColumn-1).toLowerCase(),_=f.textIsBracket[C];if(_&&(_.isOpen(C)?a[_.index]++:_.isClose(C)&&a[_.index]--,a[_.index]===-1))return this._matchFoundBracket(w,_,!1,r);v=w.endColumn-1}return null},d=null,h=null;for(let f=n.lineNumber;f<=o;f++){let p=this.textModel.tokenization.getLineTokens(f),g=p.getCount(),v=this.textModel.getLineContent(f),A=0,w=0,C=0;if(f===n.lineNumber){A=p.findTokenIndexAtOffset(n.column-1),w=n.column-1,C=n.column-1;let E=p.getLanguageId(A);d!==E&&(d=E,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l(d,h))}let _=!0;for(;A{et();ae();We();tm();Zn();ene=class extends W{constructor(e){super(),this.textModel=e,this.colorProvider=new tne,this.onDidChangeEmitter=new G,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,r){return r?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(s=>({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:s.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new N(1,1,this.textModel.getLineCount(),1),e,t):[]}},tne=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}};ua((i,e)=>{let t=[Rie,Fie,Oie,Pie,Bie,zie],n=new tne;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${i.getColor(ept)}; }`);let r=t.map(o=>i.getColor(o)).filter(o=>!!o).filter(o=>!o.isTransparent());for(let o=0;o<30;o++){let s=r[o%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(o)} { color: ${s}; }`)}})});function ine(i){return i.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function Npt(i,e){return i===null||i.length===0?e:new CLe(i,e).compress()}var rm,CLe,_Le=D(()=>{AF();$w();rm=class i{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,r){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=r}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${ine(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${ine(this.oldText)}")`:`(replace@${this.oldPosition} "${ine(this.oldText)}" with "${ine(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){let r=t.length;dg(e,r,n),n+=4;for(let o=0;o{Oe();Lt();Hn();mn();_Le();AF();Ec();ep=class i{static create(e,t){let n=e.getAlternativeVersionId(),r=ELe(e);return new i(n,n,r,r,t,t,[])}constructor(e,t,n,r,o,s,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=r,this.beforeCursorState=o,this.afterCursorState=s,this.changes=a}append(e,t,n,r,o){t.length>0&&(this.changes=Npt(this.changes,t)),this.afterEOL=n,this.afterVersionId=r,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(dg(e,t?t.length:0,n),n+=4,t)for(let r of t)dg(e,r.selectionStartLineNumber,n),n+=4,dg(e,r.selectionStartColumn,n),n+=4,dg(e,r.positionLineNumber,n),n+=4,dg(e,r.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){let r=ug(e,t);t+=4;for(let o=0;ot.toString()).join(", ")}matchesResource(e){return(Xe.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof ep}append(e,t,n,r,o){this._data instanceof ep&&this._data.append(e,t,n,r,o)}close(){this._data instanceof ep&&(this._data=this._data.serialize())}open(){this._data instanceof ep||(this._data=ep.deserialize(this._data))}undo(){if(Xe.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof ep&&(this._data=this._data.serialize());let e=ep.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Xe.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof ep&&(this._data=this._data.serialize());let e=ep.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof ep&&(this._data=this._data.serialize()),this._data.byteLength+168}},SLe=class{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(let r of this._editStackElementsArr){let o=jO(r.resource);this._editStackElementsMap.set(o,r)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=jO(e);return this._editStackElementsMap.has(t)}setModel(e){let t=jO(Xe.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=jO(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,r,o){let s=jO(e.uri);this._editStackElementsMap.get(s).append(e,t,n,r,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(let e of this._editStackElementsArr)e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=jO(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${Sc(t.resource)}: ${t}`);return`{${e.join(", ")}}`}};rne=class i{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);Wy(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);Wy(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let n=this._undoRedoService.getLastElement(this._model.uri);if(Wy(n)&&n.canAppend(this._model))return n;let r=new nne(y("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(r,t),r}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],ELe(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,r){let o=this._getOrCreateEditStackElement(e,r),s=this._model.applyEdits(t,!0),a=i._computeCursorState(n,s),l=s.map((c,u)=>({index:u,textChange:c.textChange}));return l.sort((c,u)=>c.textChange.oldPosition===u.textChange.oldPosition?c.index-u.index:c.textChange.oldPosition-u.textChange.oldPosition),o.append(this._model,l.map(c=>c.textChange),ELe(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return pt(n),null}}}});var QO,TLe=D(()=>{ae();QO=class extends W{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}});function uL(i,e){let t=0,n=0,r=i.length;for(;n{});var kx,Jb,Ix,sne=D(()=>{(function(i){i[i.Disabled=0]="Disabled",i[i.EnabledForActive=1]="EnabledForActive",i[i.Enabled=2]="Enabled"})(kx||(kx={}));Jb=class{constructor(e,t,n,r,o,s){if(this.visibleColumn=e,this.column=t,this.className=n,this.horizontalLine=r,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,e!==-1==(t!==-1))throw new Error}},Ix=class{constructor(e,t){this.top=e,this.endColumn=t}}});var ane,lV,kLe=D(()=>{Jf();Pt();zb();We();TLe();one();sne();Lt();ane=class extends QO{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return uL(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,n){this.assertNotDisposed();let r=this.textModel.getLineCount();if(e<1||e>r)throw new vi("Illegal value for lineNumber");let o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(o&&o.offSide),a=-2,l=-1,c=-2,u=-1,d=T=>{if(a!==-1&&(a===-2||a>T-1)){a=-1,l=-1;for(let L=T-2;L>=0;L--){let M=this._computeIndentLevel(L);if(M>=0){a=L,l=M;break}}}if(c===-2){c=-1,u=-1;for(let L=T;L=0){c=L,u=M;break}}}},h=-2,f=-1,p=-2,g=-1,v=T=>{if(h===-2){h=-1,f=-1;for(let L=T-2;L>=0;L--){let M=this._computeIndentLevel(L);if(M>=0){h=L,f=M;break}}}if(p!==-1&&(p===-2||p=0){p=L,g=M;break}}}},A=0,w=!0,C=0,_=!0,E=0,I=0;for(let T=0;w||_;T++){let L=e-T,M=e+T;T>1&&(L<1||L1&&(M>r||M>n)&&(_=!1),T>5e4&&(w=!1,_=!1);let z=-1;if(w&&L>=1){let B=this._computeIndentLevel(L-1);B>=0?(c=L-1,u=B,z=Math.ceil(B/this.textModel.getOptions().indentSize)):(d(L),z=this._getIndentLevelForWhitespaceLine(s,l,u))}let H=-1;if(_&&M<=r){let B=this._computeIndentLevel(M-1);B>=0?(h=M-1,f=B,H=Math.ceil(B/this.textModel.getOptions().indentSize)):(v(M),H=this._getIndentLevelForWhitespaceLine(s,f,g))}if(T===0){I=z;continue}if(T===1){if(M<=r&&H>=0&&I+1===H){w=!1,A=M,C=M,E=H;continue}if(L>=1&&z>=0&&z-1===I){_=!1,A=L,C=L,E=z;continue}if(A=e,C=e,E=I,E===0)return{startLineNumber:A,endLineNumber:C,indent:E}}w&&(z>=E?A=L:w=!1),_&&(H>=E?C=M:_=!1)}return{startLineNumber:A,endLineNumber:C,indent:E}}getLinesBracketGuides(e,t,n,r){let o=[];for(let d=e;d<=t;d++)o.push([]);let s=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new N(e,1,t,this.textModel.getLineMaxColumn(t))).toArray(),l;if(n&&a.length>0){let d=(e<=n.lineNumber&&n.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(N.fromPositions(n)).toArray()).filter(h=>N.strictContainsPosition(h.range,n));l=cx(d,h=>s||h.range.startLineNumber!==h.range.endLineNumber)?.range}let c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new lV;for(let d of a){if(!d.closingBracketRange)continue;let h=l&&d.range.equalsRange(l);if(!h&&!r.includeInactive)continue;let f=u.getInlineClassName(d.nestingLevel,d.nestingLevelOfEqualBracketType,c)+(r.highlightActive&&h?" "+u.activeClassName:""),p=d.openingBracketRange.getStartPosition(),g=d.closingBracketRange.getStartPosition(),v=r.horizontalGuides===kx.Enabled||r.horizontalGuides===kx.EnabledForActive&&h;if(d.range.startLineNumber===d.range.endLineNumber){s&&v&&o[d.range.startLineNumber-e].push(new Jb(-1,d.openingBracketRange.getEndPosition().column,f,new Ix(!1,g.column),-1,-1));continue}let A=this.getVisibleColumnFromPosition(g),w=this.getVisibleColumnFromPosition(d.openingBracketRange.getStartPosition()),C=Math.min(w,A,d.minVisibleColumnIndentation+1),_=!1;Vo(this.textModel.getLineContent(d.closingBracketRange.startLineNumber))=e&&w>C&&o[p.lineNumber-e].push(new Jb(C,-1,f,new Ix(!1,p.column),-1,-1)),g.lineNumber<=t&&A>C&&o[g.lineNumber-e].push(new Jb(C,-1,f,new Ix(!_,g.column),-1,-1)))}for(let d of o)d.sort((h,f)=>h.visibleColumn-f.visibleColumn);return o}getVisibleColumnFromPosition(e){return to.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");let r=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(o&&o.offSide),a=new Array(t-e+1),l=-2,c=-1,u=-2,d=-1;for(let h=e;h<=t;h++){let f=h-e,p=this._computeIndentLevel(h-1);if(p>=0){l=h-1,c=p,a[f]=Math.ceil(p/r.indentSize);continue}if(l===-2){l=-1,c=-1;for(let g=h-2;g>=0;g--){let v=this._computeIndentLevel(g);if(v>=0){l=g,c=v;break}}}if(u!==-1&&(u===-2||u=0){u=g,d=v;break}}}a[f]=this._getIndentLevelForWhitespaceLine(s,c,d)}return a}_getIndentLevelForWhitespaceLine(e,t,n){let r=this.textModel.getOptions();return t===-1||n===-1?0:t0&&a>0||l>0&&c>0)return;let u=Math.abs(a-c),d=Math.abs(s-l);if(u===0){r.spacesDiff=d,d>0&&0<=l-1&&l-10?r++:_>1&&o++,c0i(s,a,v,C,d),d.looksLikeAlignment&&!(t&&e===d.spacesDiff)))continue;let I=d.spacesDiff;I<=c&&u[I]++,s=v,a=C}let h=t;r!==o&&(h=r{let v=u[g];v>p&&(p=v,f=g)}),f===4&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}var ILe,Mpt=D(()=>{ILe=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}});function nf(i){return(i.metadata&1)>>>0}function bo(i,e){i.metadata=i.metadata&254|e<<0}function iu(i){return(i.metadata&2)>>>1===1}function ao(i,e){i.metadata=i.metadata&253|(e?1:0)<<1}function Vpt(i){return(i.metadata&4)>>>2===1}function Rpt(i,e){i.metadata=i.metadata&251|(e?1:0)<<2}function Hpt(i){return(i.metadata&64)>>>6===1}function Fpt(i,e){i.metadata=i.metadata&191|(e?1:0)<<6}function u0i(i){return(i.metadata&24)>>>3}function Opt(i,e){i.metadata=i.metadata&231|e<<3}function d0i(i){return(i.metadata&32)>>>5===1}function Ppt(i,e){i.metadata=i.metadata&223|(e?1:0)<<5}function h0i(i){let e=i.root,t=0;for(;e!==Yi;){if(e.left!==Yi&&!iu(e.left)){e=e.left;continue}if(e.right!==Yi&&!iu(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,Lx(e),ao(e,!0),ao(e.left,!1),ao(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}ao(i.root,!1)}function GO(i,e,t,n){return it||n===1?!1:n===2?!0:e}function f0i(i,e,t,n,r){let o=u0i(i),s=o===0||o===2,a=o===1||o===2,l=t-e,c=n,u=Math.min(l,c),d=i.start,h=!1,f=i.end,p=!1;e<=d&&f<=t&&d0i(i)&&(i.start=e,h=!0,i.end=e,p=!0);{let v=r?1:l>0?2:0;!h&&GO(d,s,e,v)&&(h=!0),!p&&GO(f,a,e,v)&&(p=!0)}if(u>0&&!r){let v=l>c?2:0;!h&&GO(d,s,e+u,v)&&(h=!0),!p&&GO(f,a,e+u,v)&&(p=!0)}{let v=r?1:0;!h&&GO(d,s,t,v)&&(i.start=e+c,h=!0),!p&&GO(f,a,t,v)&&(i.end=e+c,p=!0)}let g=c-l;h||(i.start=Math.max(0,d+g)),p||(i.end=Math.max(0,f+g)),i.start>i.end&&(i.end=i.start)}function p0i(i,e,t){let n=i.root,r=0,o=0,s=0,a=0,l=[],c=0;for(;n!==Yi;){if(iu(n)){ao(n.left,!1),ao(n.right,!1),n===n.parent.right&&(r-=n.parent.delta),n=n.parent;continue}if(!iu(n.left)){if(o=r+n.maxEnd,ot){ao(n,!0);continue}if(a=r+n.end,a>=e&&(n.setCachedOffsets(s,a,0),l[c++]=n),ao(n,!0),n.right!==Yi&&!iu(n.right)){r+=n.delta,n=n.right;continue}}return ao(i.root,!1),l}function m0i(i,e,t,n){let r=i.root,o=0,s=0,a=0,l=n-(t-e);for(;r!==Yi;){if(iu(r)){ao(r.left,!1),ao(r.right,!1),r===r.parent.right&&(o-=r.parent.delta),Lx(r),r=r.parent;continue}if(!iu(r.left)){if(s=o+r.maxEnd,st){r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(i.requestNormalizeDelta=!0),ao(r,!0);continue}if(ao(r,!0),r.right!==Yi&&!iu(r.right)){o+=r.delta,r=r.right;continue}}ao(i.root,!1)}function g0i(i,e){let t=i.root,n=[],r=0;for(;t!==Yi;){if(iu(t)){ao(t.left,!1),ao(t.right,!1),t=t.parent;continue}if(t.left!==Yi&&!iu(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[r++]=t),ao(t,!0),t.right!==Yi&&!iu(t.right)){t=t.right;continue}}return ao(i.root,!1),n}function b0i(i){let e=i.root,t=[],n=0;for(;e!==Yi;){if(iu(e)){ao(e.left,!1),ao(e.right,!1),e=e.parent;continue}if(e.left!==Yi&&!iu(e.left)){e=e.left;continue}if(e.right!==Yi&&!iu(e.right)){e=e.right;continue}t[n++]=e,ao(e,!0)}return ao(i.root,!1),t}function v0i(i,e,t,n,r){let o=i.root,s=0,a=0,l=0,c=[],u=0;for(;o!==Yi;){if(iu(o)){ao(o.left,!1),ao(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==Yi&&!iu(o.left)){o=o.left;continue}a=s+o.start,l=s+o.end,o.setCachedOffsets(a,l,n);let d=!0;if(e&&o.ownerId&&o.ownerId!==e&&(d=!1),t&&Vpt(o)&&(d=!1),r&&!Hpt(o)&&(d=!1),d&&(c[u++]=o),ao(o,!0),o.right!==Yi&&!iu(o.right)){s+=o.delta,o=o.right;continue}}return ao(i.root,!1),c}function A0i(i,e,t,n,r,o,s){let a=i.root,l=0,c=0,u=0,d=0,h=[],f=0;for(;a!==Yi;){if(iu(a)){ao(a.left,!1),ao(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!iu(a.left)){if(c=l+a.maxEnd,ct){ao(a,!0);continue}if(d=l+a.end,d>=e){a.setCachedOffsets(u,d,o);let p=!0;n&&a.ownerId&&a.ownerId!==n&&(p=!1),r&&Vpt(a)&&(p=!1),s&&!Hpt(a)&&(p=!1),p&&(h[f++]=a)}if(ao(a,!0),a.right!==Yi&&!iu(a.right)){l+=a.delta,a=a.right;continue}}return ao(i.root,!1),h}function Bpt(i,e){if(i.root===Yi)return e.parent=Yi,e.left=Yi,e.right=Yi,bo(e,0),i.root=e,i.root;y0i(i,e),yE(e.parent);let t=e;for(;t!==i.root&&nf(t.parent)===1;)if(t.parent===t.parent.parent.left){let n=t.parent.parent.right;nf(n)===1?(bo(t.parent,0),bo(n,0),bo(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,cV(i,t)),bo(t.parent,0),bo(t.parent.parent,1),uV(i,t.parent.parent))}else{let n=t.parent.parent.left;nf(n)===1?(bo(t.parent,0),bo(n,0),bo(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,uV(i,t)),bo(t.parent,0),bo(t.parent.parent,1),cV(i,t.parent.parent))}return bo(i.root,0),e}function y0i(i,e){let t=0,n=i.root,r=e.start,o=e.end;for(;;)if(x0i(r,o,n.start+t,n.end+t)<0)if(n.left===Yi){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===Yi){e.start-=t+n.delta,e.end-=t+n.delta,e.maxEnd-=t+n.delta,n.right=e;break}else t+=n.delta,n=n.right;e.parent=n,e.left=Yi,e.right=Yi,bo(e,1)}function zpt(i,e){let t,n;if(e.left===Yi?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Yi?(t=e.left,n=e):(n=w0i(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(i.requestNormalizeDelta=!0)),n===i.root){i.root=t,bo(t,0),e.detach(),NLe(),Lx(t),i.root.parent=Yi;return}let r=nf(n)===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?t.parent=n.parent:(n.parent===e?t.parent=n:t.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,bo(n,nf(e)),e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Yi&&(n.left.parent=n),n.right!==Yi&&(n.right.parent=n)),e.detach(),r){yE(t.parent),n!==e&&(yE(n),yE(n.parent)),NLe();return}yE(t),yE(t.parent),n!==e&&(yE(n),yE(n.parent));let o;for(;t!==i.root&&nf(t)===0;)t===t.parent.left?(o=t.parent.right,nf(o)===1&&(bo(o,0),bo(t.parent,1),cV(i,t.parent),o=t.parent.right),nf(o.left)===0&&nf(o.right)===0?(bo(o,1),t=t.parent):(nf(o.right)===0&&(bo(o.left,0),bo(o,1),uV(i,o),o=t.parent.right),bo(o,nf(t.parent)),bo(t.parent,0),bo(o.right,0),cV(i,t.parent),t=i.root)):(o=t.parent.left,nf(o)===1&&(bo(o,0),bo(t.parent,1),uV(i,t.parent),o=t.parent.left),nf(o.left)===0&&nf(o.right)===0?(bo(o,1),t=t.parent):(nf(o.left)===0&&(bo(o.right,0),bo(o,1),cV(i,o),o=t.parent.left),bo(o,nf(t.parent)),bo(t.parent,0),bo(o.left,0),uV(i,t.parent),t=i.root));bo(t,0),NLe()}function w0i(i){for(;i.left!==Yi;)i=i.left;return i}function NLe(){Yi.parent=Yi,Yi.delta=0,Yi.start=0,Yi.end=0}function cV(i,e){let t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Yi&&(t.left.parent=e),t.parent=e.parent,e.parent===Yi?i.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,Lx(e),Lx(t)}function uV(i,e){let t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(i.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Yi&&(t.right.parent=e),t.parent=e.parent,e.parent===Yi?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,Lx(e),Lx(t)}function Wpt(i){let e=i.end;if(i.left!==Yi){let t=i.left.maxEnd;t>e&&(e=t)}if(i.right!==Yi){let t=i.right.maxEnd+i.delta;t>e&&(e=t)}return e}function Lx(i){i.maxEnd=Wpt(i)}function yE(i){for(;i!==Yi;){let e=Wpt(i);if(i.maxEnd===e)return;i.maxEnd=e,i=i.parent}}function x0i(i,e,t,n){return i===t?e-n:i-t}var dV,Yi,qO,Upt=D(()=>{dV=class{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,bo(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Rpt(this,!1),Fpt(this,!1),Opt(this,1),Ppt(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,ao(this,!1)}reset(e,t,n,r){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=r}setOptions(e){this.options=e;let t=this.options.className;Rpt(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),Fpt(this,this.options.glyphMarginClassName!==null),Opt(this,this.options.stickiness),Ppt(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}},Yi=new dV(null,0,0);Yi.parent=Yi;Yi.left=Yi;Yi.right=Yi;bo(Yi,0);qO=class{constructor(){this.root=Yi,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,r,o,s){return this.root===Yi?[]:A0i(this,e,t,n,r,o,s)}search(e,t,n,r){return this.root===Yi?[]:v0i(this,e,t,n,r)}collectNodesFromOwner(e){return g0i(this,e)}collectNodesPostOrder(){return b0i(this)}insert(e){Bpt(this,e),this._normalizeDeltaIfNecessary()}delete(e){zpt(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let n=e,r=0;for(;e!==this.root;)e===e.parent.right&&(r+=e.parent.delta),e=e.parent;let o=n.start+r,s=n.end+r;n.setCachedOffsets(o,s,t)}acceptReplace(e,t,n,r){let o=p0i(this,e,e+t);for(let s=0,a=o.length;s{YO=class{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Ci)return lne(this.right);let e=this;for(;e.parent!==Ci&&e.parent.left!==e;)e=e.parent;return e.parent===Ci?Ci:e.parent}prev(){if(this.left!==Ci)return RLe(this.left);let e=this;for(;e.parent!==Ci&&e.parent.right!==e;)e=e.parent;return e.parent===Ci?Ci:e.parent}detach(){this.parent=null,this.left=null,this.right=null}},Ci=new YO(null,0);Ci.parent=Ci;Ci.left=Ci;Ci.right=Ci;Ci.color=0});function Qpt(i){let e;return i[i.length-1]<65536?e=new Uint16Array(i.length):e=new Uint32Array(i.length),e.set(i,0),e}function jy(i,e=!0){let t=[0],n=1;for(let r=0,o=i.length;r126)&&(s=!1)}let a=new BLe(Qpt(i),n,r,o,s);return i.length=0,a}var Nx,BLe,ch,Qy,zLe,VLe,cne,HLe=D(()=>{Nt();We();tl();jpt();U7();Nx=65535;BLe=class{constructor(e,t,n,r,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=r,this.isBasicASCII=o}};ch=class{constructor(e,t,n,r,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=r,this.length=o}},Qy=class{constructor(e,t){this.buffer=e,this.lineStarts=t}},zLe=class{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Ci&&e.iterate(e.root,n=>(n!==Ci&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},VLe=class{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let r=0;r=e){n[r]=null,t=!0;continue}}if(t){let r=[];for(let o of n)o!==null&&r.push(o);this._cache=r}}},cne=class{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new Qy("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Ci,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let r=null;for(let o=0,s=e.length;o0){e[o].lineStarts||(e[o].lineStarts=jy(e[o].buffer));let a=new ch(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),r=this.rbInsertRight(r,a)}this._searchCache=new VLe(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=Nx,n=t-Math.floor(t/3),r=n*2,o="",s=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),u=c.length;if(s<=n||s+u0){let l=o.replace(/\r\n|\r|\n/g,e);a.push(new Qy(l,jy(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new zLe(this,e)}getOffsetAt(e,t){let n=0,r=this.root;for(;r!==Ci;)if(r.left!==Ci&&r.lf_left+1>=e)r=r.left;else if(r.lf_left+r.piece.lineFeedCnt+1>=e){n+=r.size_left;let o=this.getAccumulatedValue(r,e-r.lf_left-2);return n+=o+t-1}else e-=r.lf_left+r.piece.lineFeedCnt,n+=r.size_left+r.piece.length,r=r.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,r=e;for(;t!==Ci;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,o.index===0){let s=this.getOffsetAt(n+1,1),a=r-s;return new K(n+1,a+1)}return new K(n+1,o.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===Ci){let o=this.getOffsetAt(n+1,1),s=r-e-o;return new K(n+1,s+1)}else t=t.right;return new K(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),r=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,r);return t?t!==this._EOL||!this._EOLNormalized?o.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let n=e.node,r=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),s=r.substring(o+e.remainder,o+n.piece.length);for(n=n.next();n!==Ci;){let a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=a.substring(l,l+t.remainder);break}else s+=a.substr(l,n.piece.length);n=n.next()}return s}getLinesContent(){let e=[],t=0,n="",r=!1;return this.iterate(this.root,o=>{if(o===Ci)return!0;let s=o.piece,a=s.length;if(a===0)return!0;let l=this._buffers[s.bufferIndex].buffer,c=this._buffers[s.bufferIndex].lineStarts,u=s.start.line,d=s.end.line,h=c[u]+s.start.column;if(r&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=n,n="",r=!1,a===0))return!0;if(u===d)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(r=!0,n+=l.substr(h,a-1)):n+=l.substr(h,a),!0;n+=this._EOLNormalized?l.substring(h,Math.max(h,c[u+1]-this._EOLLength)):l.substring(h,c[u+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let f=u+1;f_+p,t.reset(0)):(w=h.buffer,C=_=>_,t.reset(p));do if(v=t.next(w),v){if(C(v.index)>=g)return u;this.positionInBuffer(e,C(v.index)-f,A);let _=this.getLineFeedCnt(e.piece.bufferIndex,o,A),E=A.line===o.line?A.column-o.column+r:A.column+1,I=E+v[0].length;if(d[u++]=US(new N(n+_,E,n+_,I),v,l),C(v.index)+v[0].length>=g||u>=c)return u}while(v);return u}findMatchesLineByLine(e,t,n,r){let o=[],s=0,a=new dy(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let u=this.positionInBuffer(l.node,l.remainder),d=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,u,d,t,n,r,s,o),o;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){let g=this.getLineFeedCnt(f.piece.bufferIndex,u,f.piece.end);if(g>=1){let A=this._buffers[f.piece.bufferIndex].lineStarts,w=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),C=A[u.line+g],_=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(f,a,h,_,u,this.positionInBuffer(f,C-w),t,n,r,s,o),s>=r)return o;h+=g}let v=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){let A=this.getLineContent(h).substring(v,e.endColumn-1);return s=this._findMatchesInLine(t,a,A,e.endLineNumber,v,s,o,n,r),o}if(s=this._findMatchesInLine(t,a,this.getLineContent(h).substr(v),h,v,s,o,n,r),s>=r)return o;h++,l=this.nodeAt2(h,1),f=l.node,u=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){let g=h===e.startLineNumber?e.startColumn-1:0,v=this.getLineContent(h).substring(g,e.endColumn-1);return s=this._findMatchesInLine(t,a,v,e.endLineNumber,g,s,o,n,r),o}let p=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(c.node,a,h,p,u,d,t,n,r,s,o),o}_findMatchesInLine(e,t,n,r,o,s,a,l,c){let u=e.wordSeparators;if(!l&&e.simpleSearch){let h=e.simpleSearch,f=h.length,p=n.length,g=-f;for(;(g=n.indexOf(h,g+f))!==-1;)if((!u||nee(u,n,p,g,f))&&(a[s++]=new uy(new N(r,g+1+o,r,g+1+f+o),null),s>=c))return s;return s}let d;t.reset(0);do if(d=t.next(n),d&&(a[s++]=US(new N(r,d.index+1+o,r,d.index+1+d[0].length+o),d,l),s>=c))return s;while(d);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Ci){let{node:r,remainder:o,nodeStartOffset:s}=this.nodeAt(e),a=r.piece,l=a.bufferIndex,c=this.positionInBuffer(r,o);if(r.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.lengthe){let u=[],d=new ch(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(r,o)===10){let g={line:d.start.line+1,column:0};d=new ch(d.bufferIndex,g,d.end,this.getLineFeedCnt(d.bufferIndex,g,d.end),d.length-1),t+=` -`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(r,o-1)===13){let g=this.positionInBuffer(r,o-1);this.deleteNodeTail(r,g),t="\r"+t,r.piece.length===0&&u.push(r)}else this.deleteNodeTail(r,c);else this.deleteNodeTail(r,c);let h=this.createNewPieces(t);d.length>0&&this.rbInsertRight(r,d);let f=r;for(let p=0;p=0;s--)o=this.rbInsertLeft(o,r[s]);this.validateCRLFWithPrevNode(o),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` -`);let n=this.createNewPieces(e),r=this.rbInsertRight(t,n[0]),o=r;for(let s=1;s=h)c=d+1;else break;return n?(n.line=d,n.column=l-f,null):{line:d,column:l-f}}getLineFeedCnt(e,t,n){if(n.column===0)return n.line-t.line;let r=this._buffers[e].lineStarts;if(n.line===r.length-1)return n.line-t.line;let o=r[n.line+1],s=r[n.line]+n.column;if(o>s+1)return n.line-t.line;let a=s-1;return this._buffers[e].buffer.charCodeAt(a)===13?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tNx){let u=[];for(;e.length>Nx;){let h=e.charCodeAt(Nx-1),f;h===13||h>=55296&&h<=56319?(f=e.substring(0,Nx-1),e=e.substring(Nx-1)):(f=e.substring(0,Nx),e=e.substring(Nx));let p=jy(f);u.push(new ch(this._buffers.length,{line:0,column:0},{line:p.length-1,column:f.length-p[p.length-1]},p.length-1,f.length)),this._buffers.push(new Qy(f,p))}let d=jy(e);return u.push(new ch(this._buffers.length,{line:0,column:0},{line:d.length-1,column:e.length-d[d.length-1]},d.length-1,e.length)),this._buffers.push(new Qy(e,d)),u}let t=this._buffers[0].buffer.length,n=jy(e,!1),r=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},r=this._lastChangeBufferPos;for(let u=0;u=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this.getAccumulatedValue(n,e-n.lf_left-1),u=this._buffers[n.piece.bufferIndex].buffer,d=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:s,nodeStartLineNumber:a-(e-1-n.lf_left)}),u.substring(d+l,d+c-t)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this._buffers[n.piece.bufferIndex].buffer,u=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r=c.substring(u+l,u+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==Ci;){let s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=s.substring(l,l+a-t),r}else{let a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r+=s.substr(a,n.piece.length)}n=n.next()}return r}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==Ci;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,r=this.positionInBuffer(e,t),o=r.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let s=this.getLineFeedCnt(e.piece.bufferIndex,n.start,r);if(s!==o)return{index:s,remainder:0}}return{index:o,remainder:r.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,r=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?r[n.end.line]+n.end.column-r[n.start.line]-n.start.column:r[o]-r[n.start.line]-n.start.column}deleteNodeTail(e,t){let n=e.piece,r=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),c=l-r,u=a-o,d=n.length+u;e.piece=new ch(n.bufferIndex,n.start,s,l,d),Uy(this,e,u,c)}deleteNodeHead(e,t){let n=e.piece,r=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=this.offsetInBuffer(n.bufferIndex,s),c=a-r,u=o-l,d=n.length+u;e.piece=new ch(n.bufferIndex,s,n.end,a,d),Uy(this,e,u,c)}shrinkNode(e,t,n){let r=e.piece,o=r.start,s=r.end,a=r.length,l=r.lineFeedCnt,c=t,u=this.getLineFeedCnt(r.bufferIndex,r.start,c),d=this.offsetInBuffer(r.bufferIndex,t)-this.offsetInBuffer(r.bufferIndex,o);e.piece=new ch(r.bufferIndex,r.start,c,u,d),Uy(this,e,d-a,u-l);let h=new ch(r.bufferIndex,n,s,this.getLineFeedCnt(r.bufferIndex,n,s),this.offsetInBuffer(r.bufferIndex,s)-this.offsetInBuffer(r.bufferIndex,n)),f=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` -`);let n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),r=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let o=jy(t,!1);for(let f=0;fe)t=t.left;else if(t.size_left+t.piece.length>=e){r+=t.size_left;let o={node:t,remainder:e-t.size_left,nodeStartOffset:r};return this._searchCache.set(o),o}else e-=t.size_left+t.piece.length,r+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let n=this.root,r=0;for(;n!==Ci;)if(n.left!==Ci&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return r+=n.size_left,{node:n,remainder:Math.min(o+t-1,s),nodeStartOffset:r}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2);if(o+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:r};t-=n.piece.length-o;break}else e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==Ci;){if(n.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(n,0),s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,o),nodeStartOffset:s}}else if(n.piece.length>=t-1){let o=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:o}}else t-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],r=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(r)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` -`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Ci||e.piece.lineFeedCnt===0)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,r=t.start.line,o=n[r]+t.start.column;return r===n.length-1||n[r+1]>o+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(o)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Ci||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n=[],r=this._buffers[e.piece.bufferIndex].lineStarts,o;e.piece.end.column===0?o={line:e.piece.end.line-1,column:r[e.piece.end.line]-r[e.piece.end.line-1]-1}:o={line:e.piece.end.line,column:e.piece.end.column-1};let s=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new ch(e.piece.bufferIndex,e.piece.start,o,a,s),Uy(this,e,-1,-1),e.piece.length===0&&n.push(e);let l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,u=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new ch(t.piece.bufferIndex,l,t.piece.end,u,c),Uy(this,t,-1,-1),t.piece.length===0&&n.push(t);let d=this.createNewPieces(`\r -`);this.rbInsertRight(e,d[0]);for(let h=0;h{et();Pt();We();tl();HLe();zI();_Le();ae();KO=class i extends W{constructor(e,t,n,r,o,s,a){super(),this._onDidChangeContent=this._register(new G),this._BOM=t,this._mightContainNonBasicASCII=!s,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=o,this._pieceTree=new cne(e,n,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let n=e+t,r=this.getPositionAt(e),o=this.getPositionAt(n);return new N(r.lineNumber,r.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";let n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let n=this.getOffsetAt(e.startLineNumber,e.startColumn),r=this.getOffsetAt(e.endLineNumber,e.endColumn),o=0,s=this._getEndOfLine(t),a=this.getEOL();if(s.length!==a.length){let l=s.length-a.length,c=e.endLineNumber-e.startLineNumber;o=l*c}return r-n+o}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let n=0,r=e.startLineNumber,o=e.endLineNumber;for(let s=r;s<=o;s++){let a=this.getLineContent(s),l=s===r?e.startColumn-1:0,c=s===o?e.endColumn-1:a.length;for(let u=l;u{Kh();cp();Ye();xc();$p();Hg();BL();bIe();Mg();il();Gt();oo();F6();ko();_L();de();wi();Rt();bLe=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,gLe=/(&)?(&)([^\s&])/g;(function(i){i[i.Right=0]="Right",i[i.Left=1]="Left"})(Une||(Une={}));(function(i){i[i.Above=0]="Above",i[i.Below=1]="Below"})(ALe||(ALe={}));EH=class i extends Ps{constructor(e,t,n,o){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");let r=document.createElement("div");r.classList.add("monaco-menu"),r.setAttribute("role","presentation"),super(r,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,n,s),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...jt||Cr?[10]:[]],keyDown:!0}}),this.menuStyles=o,this.menuElement=r,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,o),this._register(Lr.addTarget(r)),this._register(ce(r,Te.KEY_DOWN,c=>{new Vi(c).equals(2)&&c.preventDefault()})),n.enableMnemonics&&this._register(ce(r,Te.KEY_DOWN,c=>{let u=c.key.toLocaleLowerCase();if(this.mnemonics.has(u)){mi.stop(c,!0);let d=this.mnemonics.get(u);if(d.length===1&&(d[0]instanceof Qne&&d[0].container&&this.focusItemByElement(d[0].container),d[0].onClick(c)),d.length>1){let h=d.shift();h&&h.container&&(this.focusItemByElement(h.container),d.push(h)),this.mnemonics.set(u,d)}}})),Cr&&this._register(ce(r,Te.KEY_DOWN,c=>{let u=new Vi(c);u.equals(14)||u.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),mi.stop(c,!0)):(u.equals(13)||u.equals(12))&&(this.focusedItem=0,this.focusPrevious(),mi.stop(c,!0))})),this._register(ce(this.domNode,Te.MOUSE_OUT,c=>{let u=c.relatedTarget;Dr(u,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(ce(this.actionsList,Te.MOUSE_OVER,c=>{let u=c.target;if(!(!u||!Dr(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){let d=this.focusedItem;this.setFocusedItem(u),d!==this.focusedItem&&this.updateFocus()}}})),this._register(Lr.addTarget(this.actionsList)),this._register(ce(this.actionsList,Tn.Tap,c=>{let u=c.initialTarget;if(!(!u||!Dr(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){let d=this.focusedItem;this.setFocusedItem(u),d!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new i0(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));let a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,o),this._register(ce(r,Tn.Change,c=>{mi.stop(c,!0);let u=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:u-c.translationY})})),this._register(ce(a,Te.MOUSE_UP,c=>{c.preventDefault()}));let l=rt(e);r.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((c,u)=>n.submenuIds?.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof yr&&(u===t.length-1||u===0||t[u-1]instanceof yr))),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof Gne)).forEach((c,u,d)=>{c.updatePositionInSet(u+1,d.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(kI(e)?this.styleSheet=el(e):(i.globalStyleSheet||(i.globalStyleSheet=el()),this.styleSheet=i.globalStyleSheet)),this.styleSheet.textContent=Uai(t,kI(e))}styleScrollElement(e,t){let n=t.foregroundColor??"",o=t.backgroundColor??"",r=t.borderColor?`1px solid ${t.borderColor}`:"",s="5px",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius=s,e.style.color=n,e.style.backgroundColor=o,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){let t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(ce(this.element,Te.MOUSE_UP,r=>{if(mi.stop(r,!0),yl){if(new wl(rt(this.element),r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(ce(this.element,Te.CONTEXT_MENU,r=>{mi.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=Ae(this.element,xe("a.action-menu-item")),this._action.id===yr.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=Ae(this.item,xe("span.menu-item-check"+ut.asCSSSelector(De.menuSelection))),this.check.setAttribute("role","none"),this.label=Ae(this.item,xe("span.action-label")),this.options.label&&this.options.keybinding&&(Ae(this.item,xe("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){Tr(this.label);let e=JO(this.action.label);if(e){let t=Wai(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));let n=bLe.exec(e);if(n){e=PS(e),gLe.lastIndex=0;let o=gLe.exec(e);for(;o&&o[1];)o=gLe.exec(e);let r=s=>s.replace(/&&/g,"&");o?this.label.append(fx(r(e.substr(0,o.index))," "),xe("u",{"aria-hidden":"true"},o[3]),JSe(r(e.substr(o.index+o[0].length))," ")):this.label.innerText=r(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;let e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){let e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,o=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",r=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=o,this.item.style.outlineOffset=r),this.check&&(this.check.style.color=t??"")}},Qne=class extends jne{constructor(e,t,n,o,r){super(e,e,o,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=o,this.mysubmenu=null,this.submenuDisposables=this._register(new se),this.mouseOver=!1,this.expandDirection=o&&o.expandDirection!==void 0?o.expandDirection:{horizontal:Une.Right,vertical:ALe.Below},this.showScheduler=new si(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new si(()=>{this.element&&!Dr(ds(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Ae(this.item,xe("span.submenu-indicator"+ut.asCSSSelector(De.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(ce(this.element,Te.KEY_UP,t=>{let n=new Vi(t);(n.equals(17)||n.equals(3))&&(mi.stop(t,!0),this.createSubmenu(!0))})),this._register(ce(this.element,Te.KEY_DOWN,t=>{let n=new Vi(t);ds()===this.item&&(n.equals(17)||n.equals(3))&&mi.stop(t,!0)})),this._register(ce(this.element,Te.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(ce(this.element,Te.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(ce(this.element,Te.FOCUS_OUT,t=>{this.element&&!Dr(ds(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){mi.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,o){let r={top:0,left:0};return r.left=TL(e.width,t.width,{position:o.horizontal===Une.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new Vi(u).equals(15)&&(mi.stop(u,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(ce(this.submenuContainer,Te.KEY_DOWN,u=>{new Vi(u).equals(15)&&mi.stop(u,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();let t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}},Gne=class extends Vg{constructor(e,t,n,o){super(e,t,n),this.menuStyles=o}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}});var qne,Odt=D(()=>{Ye();$p();Fdt();il();Tt();de();i1();qne=class{constructor(e,t,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=o,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){let t=e.getActions();if(!t.length)return;this.focusToReturn=ds();let n,o=To(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:r=>{this.lastContainer=r;let s=e.getMenuClassName?e.getMenuClassName():"";s&&(r.className+=" "+s),this.options.blockMouse&&(this.block=r.appendChild(xe(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=ce(this.block,Te.MOUSE_DOWN,u=>u.stopPropagation()));let a=new se,l=e.actionRunner||new op;l.onWillRun(u=>this.onActionRun(u,!e.skipTelemetry),this,a),l.onDidRun(this.onDidActionRun,this,a),n=new EH(r,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:u=>this.keybindingService.lookupKeybinding(u.id)},Ldt),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);let c=rt(r);return a.add(ce(c,Te.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(ce(c,Te.MOUSE_DOWN,u=>{if(u.defaultPrevented)return;let d=new wl(c,u),h=d.target;if(!d.rightButton){for(;h;){if(h===r)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),gc(a,n)},focus:()=>{n?.focus(!!e.autoSelectFirstItem)},onHide:r=>{e.onHide?.(!!r),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&(ds()===this.lastContainer||Dr(ds(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},o,!!o)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Ka(e.error)&&this.notificationService.error(e.error)}}});var jai,EP,Yne,vLe,Pdt=D(()=>{Ye();il();et();de();Xx();go();Bt();Xo();Ic();lh();Odt();Ed();jai=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},EP=function(i,e){return function(t,n){e(t,n,i)}},Yne=class extends H{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new qne(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,o,r,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=o,this.menuService=r,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new q),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new q)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=vLe.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),bx.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};Yne=jai([EP(0,rr),EP(1,_n),EP(2,hh),EP(3,Xt),EP(4,nl),EP(5,Ze)],Yne);(function(i){function e(n){return n&&n.menuId instanceof tt}function t(n,o,r){if(!e(n))return n;let{menuId:s,menuActionOptions:a,contextKeyService:l}=n;return{...n,getActions:()=>{let c=[];if(s){let u=o.getMenuActions(s,l??r,a);Ndt(u,c)}return n.getActions?yr.join(n.getActions(),c):c}}}i.transform=t})(vLe||(vLe={}))});var DH,Bdt=D(()=>{(function(i){i[i.API=0]="API",i[i.USER=1]="USER"})(DH||(DH={}))});var xLe,Kne,yLe,wLe,Jne,zdt=D(()=>{Ye();gd();sn();Pp();Xl();Rie();xl();Nc();mn();hs();to();Bdt();Dd();xLe=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Kne=function(i,e){return function(t,n){e(t,n,i)}},yLe=class{constructor(e){this._commandService=e}async open(e,t){if(!EI(e,Vt.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=Je.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=$V(decodeURIComponent(e.query))}catch{try{n=$V(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};yLe=xLe([Kne(0,Ii)],yLe);wLe=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=Je.parse(e));let{selection:n,uri:o}=uct(e);return e=o,e.scheme===Vt.file&&(e=Hct(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:t?.fromUserGesture?DH.USER:DH.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};wLe=xLe([Kne(0,ei)],wLe);Jne=class{constructor(e,t){this._openers=new Br,this._validators=new Br,this._resolvers=new Br,this._resolvedUriTargets=new ps(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Br,this._defaultExternalOpener={openExternal:async n=>(Dz(n,Vt.http,Vt.https)?V$(n):Xi.location.href=n,!0)},this._openers.push({open:async(n,o)=>o?.openExternal||Dz(n,Vt.mailto,Vt.http,Vt.https,Vt.vsls)?(await this._doOpenExternal(n,o),!0):!1}),this._openers.push(new yLe(t)),this._openers.push(new wLe(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){let n=typeof e=="string"?Je.parse(e):e,o=this._resolvedUriTargets.get(n)??e;for(let r of this._validators)if(!await r.shouldOpen(o,t))return!1;for(let r of this._openers)if(await r.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(let n of this._resolvers)try{let o=await n.resolveExternalUri(e,t);if(o)return this._resolvedUriTargets.has(o.resolved)||this._resolvedUriTargets.set(o.resolved,e),o}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){let n=typeof e=="string"?Je.parse(e):e,o;try{o=(await this.resolveExternalUri(n,t)).resolved}catch{o=n}let r;if(typeof e=="string"&&n.toString()===o.toString()?r=e:r=encodeURI(o.toString(!0)),t?.allowContributedOpeners){let s=typeof t?.allowContributedOpeners=="string"?t?.allowContributedOpeners:void 0;for(let a of this._externalOpeners)if(await a.openExternal(r,{sourceUri:n,preferredOpenerId:s},Nt.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},Nt.None)}dispose(){this._validators.clear()}};Jne=xLe([Kne(0,ei),Kne(1,Ii)],Jne)});var wa,WA=D(()=>{ht();wa=At("editorWorkerService")});var cr,TH,pf,o1=D(()=>{Bx();Be();ht();(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(cr||(cr={}));(function(i){function e(s,a){return a-s}i.compare=e;let t=Object.create(null);t[i.Error]=y("sev.error","Error"),t[i.Warning]=y("sev.warning","Warning"),t[i.Info]=y("sev.info","Info");function n(s){return t[s]||""}i.toString=n;function o(s){switch(s){case Jo.Error:return i.Error;case Jo.Warning:return i.Warning;case Jo.Info:return i.Info;case Jo.Ignore:return i.Hint}}i.fromSeverity=o;function r(s){switch(s){case i.Error:return Jo.Error;case i.Warning:return Jo.Warning;case i.Info:return Jo.Info;case i.Hint:return Jo.Ignore}}i.toSeverity=r})(cr||(cr={}));(function(i){function t(o){return n(o,!0)}i.makeKey=t;function n(o,r){let s=[""];return o.source?s.push(o.source.replace("\xA6","\\\xA6")):s.push(""),o.code?typeof o.code=="string"?s.push(o.code.replace("\xA6","\\\xA6")):s.push(o.code.value.replace("\xA6","\\\xA6")):s.push(""),o.severity!==void 0&&o.severity!==null?s.push(cr.toString(o.severity)):s.push(""),o.message&&r?s.push(o.message.replace("\xA6","\\\xA6")):s.push(""),o.startLineNumber!==void 0&&o.startLineNumber!==null?s.push(o.startLineNumber.toString()):s.push(""),o.startColumn!==void 0&&o.startColumn!==null?s.push(o.startColumn.toString()):s.push(""),o.endLineNumber!==void 0&&o.endLineNumber!==null?s.push(o.endLineNumber.toString()):s.push(""),o.endColumn!==void 0&&o.endColumn!==null?s.push(o.endColumn.toString()):s.push(""),s.push(""),s.join("\xA6")}i.makeKeyOptionalMessage=n})(TH||(TH={}));pf=At("markerService")});var CLe,_Le,Upn,jpn,Qpn,Gpn,DP,Xne,Zne,Vdt,$ne,Hdt,eoe,Wdt,Qai,Gai,VL,Udt,jdt,Qdt,Gdt,qdt,HL,Ydt,Kdt,Jdt,Xdt,Zdt,qai,qpn,$dt,Ypn,Kpn,Jpn,Xpn,eht,tht,Zpn,$pn,iht,emn,nht,tmn,Yai,toe,oht,rht,sht,ioe,noe,ooe,roe,soe,aoe,aht,lht,cht,uht,dht,hht,fht,pht,mht,ght,bht,Aht,vht,imn,nmn,Am=D(()=>{Be();Wr();nr();io();CLe=j("editor.lineHighlightBackground",null,y("lineHighlight","Background color for the highlight of line at the cursor position.")),_Le=j("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:ki},y("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),Upn=j("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},y("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),jpn=j("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:eo,hcLight:eo},y("rangeHighlightBorder","Background color of the border around highlighted ranges.")),Qpn=j("editor.symbolHighlightBackground",{dark:Cg,light:Cg,hcDark:null,hcLight:null},y("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),Gpn=j("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:eo,hcLight:eo},y("symbolHighlightBorder","Background color of the border around highlighted symbols.")),DP=j("editorCursor.foreground",{dark:"#AEAFAD",light:me.black,hcDark:me.white,hcLight:"#0F4A85"},y("caret","Color of the editor cursor.")),Xne=j("editorCursor.background",null,y("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Zne=j("editorMultiCursor.primary.foreground",DP,y("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),Vdt=j("editorMultiCursor.primary.background",Xne,y("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),$ne=j("editorMultiCursor.secondary.foreground",DP,y("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),Hdt=j("editorMultiCursor.secondary.background",Xne,y("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),eoe=j("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},y("editorWhitespaces","Color of whitespace characters in the editor.")),Wdt=j("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:me.white,hcLight:"#292929"},y("editorLineNumbers","Color of editor line numbers.")),Qai=j("editorIndentGuide.background",eoe,y("editorIndentGuides","Color of the editor indentation guides."),!1,y("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),Gai=j("editorIndentGuide.activeBackground",eoe,y("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,y("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),VL=j("editorIndentGuide.background1",Qai,y("editorIndentGuides1","Color of the editor indentation guides (1).")),Udt=j("editorIndentGuide.background2","#00000000",y("editorIndentGuides2","Color of the editor indentation guides (2).")),jdt=j("editorIndentGuide.background3","#00000000",y("editorIndentGuides3","Color of the editor indentation guides (3).")),Qdt=j("editorIndentGuide.background4","#00000000",y("editorIndentGuides4","Color of the editor indentation guides (4).")),Gdt=j("editorIndentGuide.background5","#00000000",y("editorIndentGuides5","Color of the editor indentation guides (5).")),qdt=j("editorIndentGuide.background6","#00000000",y("editorIndentGuides6","Color of the editor indentation guides (6).")),HL=j("editorIndentGuide.activeBackground1",Gai,y("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),Ydt=j("editorIndentGuide.activeBackground2","#00000000",y("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Kdt=j("editorIndentGuide.activeBackground3","#00000000",y("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Jdt=j("editorIndentGuide.activeBackground4","#00000000",y("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Xdt=j("editorIndentGuide.activeBackground5","#00000000",y("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),Zdt=j("editorIndentGuide.activeBackground6","#00000000",y("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),qai=j("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:eo,hcLight:eo},y("editorActiveLineNumber","Color of editor active line number"),!1,y("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),qpn=j("editorLineNumber.activeForeground",qai,y("editorActiveLineNumber","Color of editor active line number")),$dt=j("editorLineNumber.dimmedForeground",null,y("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),Ypn=j("editorRuler.foreground",{dark:"#5A5A5A",light:me.lightgrey,hcDark:me.white,hcLight:"#292929"},y("editorRuler","Color of the editor rulers.")),Kpn=j("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},y("editorCodeLensForeground","Foreground color of editor CodeLens")),Jpn=j("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},y("editorBracketMatchBackground","Background color behind matching brackets")),Xpn=j("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:ki,hcLight:ki},y("editorBracketMatchBorder","Color for matching brackets boxes")),eht=j("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},y("editorOverviewRulerBorder","Color of the overview ruler border.")),tht=j("editorOverviewRuler.background",null,y("editorOverviewRulerBackground","Background color of the editor overview ruler.")),Zpn=j("editorGutter.background",Zh,y("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),$pn=j("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:me.fromHex("#fff").transparent(.8),hcLight:ki},y("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),iht=j("editorUnnecessaryCode.opacity",{dark:me.fromHex("#000a"),light:me.fromHex("#0007"),hcDark:null,hcLight:null},y("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`)),emn=j("editorGhostText.border",{dark:null,light:null,hcDark:me.fromHex("#fff").transparent(.8),hcLight:me.fromHex("#292929").transparent(.8)},y("editorGhostTextBorder","Border color of ghost text in the editor.")),nht=j("editorGhostText.foreground",{dark:me.fromHex("#ffffff56"),light:me.fromHex("#0007"),hcDark:null,hcLight:null},y("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),tmn=j("editorGhostText.background",null,y("editorGhostTextBackground","Background color of the ghost text in the editor.")),Yai=new me(new Ti(0,122,204,.6)),toe=j("editorOverviewRuler.rangeHighlightForeground",Yai,y("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),oht=j("editorOverviewRuler.errorForeground",{dark:new me(new Ti(255,18,18,.7)),light:new me(new Ti(255,18,18,.7)),hcDark:new me(new Ti(255,50,50,1)),hcLight:"#B5200D"},y("overviewRuleError","Overview ruler marker color for errors.")),rht=j("editorOverviewRuler.warningForeground",{dark:sm,light:sm,hcDark:jS,hcLight:jS},y("overviewRuleWarning","Overview ruler marker color for warnings.")),sht=j("editorOverviewRuler.infoForeground",{dark:$h,light:$h,hcDark:QS,hcLight:QS},y("overviewRuleInfo","Overview ruler marker color for infos.")),ioe=j("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},y("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),noe=j("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},y("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),ooe=j("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},y("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),roe=j("editorBracketHighlight.foreground4","#00000000",y("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),soe=j("editorBracketHighlight.foreground5","#00000000",y("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),aoe=j("editorBracketHighlight.foreground6","#00000000",y("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),aht=j("editorBracketHighlight.unexpectedBracket.foreground",{dark:new me(new Ti(255,18,18,.8)),light:new me(new Ti(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},y("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),lht=j("editorBracketPairGuide.background1","#00000000",y("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),cht=j("editorBracketPairGuide.background2","#00000000",y("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),uht=j("editorBracketPairGuide.background3","#00000000",y("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),dht=j("editorBracketPairGuide.background4","#00000000",y("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),hht=j("editorBracketPairGuide.background5","#00000000",y("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),fht=j("editorBracketPairGuide.background6","#00000000",y("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),pht=j("editorBracketPairGuide.activeBackground1","#00000000",y("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),mht=j("editorBracketPairGuide.activeBackground2","#00000000",y("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ght=j("editorBracketPairGuide.activeBackground3","#00000000",y("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),bht=j("editorBracketPairGuide.activeBackground4","#00000000",y("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Aht=j("editorBracketPairGuide.activeBackground5","#00000000",y("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),vht=j("editorBracketPairGuide.activeBackground6","#00000000",y("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),imn=j("editorUnicodeHighlight.border",sm,y("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),nmn=j("editorUnicodeHighlight.background",Wot,y("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));ba((i,e)=>{let t=i.getColor(Zh),n=i.getColor(CLe),o=n&&!n.isTransparent()?n:t;o&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)})});function yht(i,e){let t=[],n=[];for(let o of i)e.has(o)||t.push(o);for(let o of e)i.has(o)||n.push(o);return{removed:t,added:n}}function wht(i,e){let t=new Set;for(let n of e)i.has(n)&&t.add(n);return t}var SLe=D(()=>{});var Kai,xht,loe,ELe,Cht=D(()=>{o1();de();ol();io();Am();su();Ue();xl();et();nr();Xl();SLe();Kai=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},xht=function(i,e){return function(t,n){e(t,n,i)}},loe=class extends H{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new q),this._markerDecorations=new ps,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){let n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{let n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){let t=new ELe(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){let t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Vt.inMemory||e.uri.scheme===Vt.internal||e.uri.scheme===Vt.vscode)&&this._markerService?.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri]))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};loe=Kai([xht(0,an),xht(1,pf)],loe);ELe=class extends H{constructor(e){super(),this.model=e,this._map=new yte,this._register(He(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){let{added:t,removed:n}=yht(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;let o=n.map(a=>this._map.get(a)),r=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),s=this.model.deltaDecorations(o,r);for(let a of n)this._map.delete(a);for(let a=0;a=o)return n;let r=e.getWordAtPosition(n.getStartPosition());r&&(n=new R(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){let o=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);o=0:!1}}});var TP,coe=D(()=>{ht();TP=At("markerDecorationsService")});function Jai(i,e,t){let n=0;for(let r=0;r{Rt();Zb()});var kH,DLe,doe,_ht=D(()=>{kH=class{constructor(e,t,n,o){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=o}},DLe=class{constructor(e,t,n,o,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=o,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}},doe=class extends DLe{constructor(e,t,n,o,r,s,a){super(e,t,n,o,r,s),this.minVisibleColumnIndentation=a}}});function Sht(i,e,t,n){return i!==t?ts(t-i,n):ts(0,n-e)}function IP(i){return i===0}function ts(i,e){return i*vm+e}function gh(i){let e=i,t=Math.floor(e/vm),n=e-t*vm;return new au(t,n)}function Eht(i){return Math.floor(i/vm)}function zo(i,e){let t=i+e;return e>=vm&&(t=t-i%vm),t}function Dht(i,e){return i.reduce((t,n)=>zo(t,e(n)),Ml)}function TLe(i,e){return i===e}function WL(i,e){let t=i,n=e;if(n-t<=0)return Ml;let r=Math.floor(t/vm),s=Math.floor(n/vm),a=n-s*vm;if(r===s){let l=t-r*vm;return ts(0,a-l)}else return ts(s-r,a)}function Zx(i,e){return i=e}function WE(i){return ts(i.lineNumber-1,i.column-1)}function UE(i,e){let t=i,n=Math.floor(t/vm),o=t-n*vm,r=e,s=Math.floor(r/vm),a=r-s*vm;return new R(n+1,o+1,s+1,a+1)}function Tht(i){let e=Uu(i);return ts(e.length-1,e[e.length-1].length)}var Ml,vm,r1=D(()=>{Rt();Ue();Ox();Ml=0;vm=2**26});var l0,hoe,kLe,IH=D(()=>{Ue();r1();l0=class i{static fromModelContentChanges(e){return e.map(n=>{let o=R.lift(n.range);return new i(WE(o.getStartPosition()),WE(o.getEndPosition()),Tht(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${gh(this.startOffset)}...${gh(this.endOffset)}) -> ${gh(this.newLength)}`}},hoe=class{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>kLe.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:WL(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?ts(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):ts(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=gh(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?ts(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):ts(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{foe=[],Ju=class i{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&t.length===0){let n=i.cache[e];return n||(n=new i(e,t),i.cache[e]=n),n}return new i(e,t)}static{this.empty=i.create(0,foe)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){let n=t.getKey(e),o=n>>5;if(o===0){let s=1<{Tt();Zb();r1();UL();LH=class{get length(){return this._length}constructor(e){this._length=e}},NH=class i extends LH{static create(e,t,n){let o=e.length;return t&&(o=zo(o,t.length)),n&&(o=zo(o,n.length)),new i(o,e,t,n,t?t.missingOpeningBracketIds:Ju.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,n,o,r){super(e),this.openingBracket=t,this.child=n,this.closingBracket=o,this.missingOpeningBracketIds=r}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new i(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(zo(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}},ym=class extends LH{static create23(e,t,n,o=!1){let r=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(r=zo(r,t.length),s=s.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");r=zo(r,n.length),s=s.merge(n.missingOpeningBracketIds)}return o?new LLe(r,e.listHeight+1,e,t,n,s):new MH(r,e.listHeight+1,e,t,n,s)}static getEmpty(){return new NLe(Ml,0,[],Ju.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(e===0)return;let t=this.getChild(e-1),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;let t=this.getChild(0),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(0,n),n}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let t=this;for(;t.kind===4;){let n=t.childrenLength;if(n===0)throw new fi;t=t.getChild(n-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let o=1;o{Tt();AL();OH();r1();UL();jA=class{constructor(e,t,n,o,r){this.length=e,this.kind=t,this.bracketId=n,this.bracketIds=o,this.astNode=r}},MP=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new MLe(this.textModel,this.bracketTokens),this._offset=Ml,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return ts(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=zo(this._offset,e);let t=gh(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=zo(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}},MLe=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let r=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=r.length,r}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,n=0;for(;;){let r=this.lineTokens,s=r.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}let o=Sht(e,t,this.lineIdx,this.lineCharOffset);return new jA(o,0,-1,Ju.getEmpty(),new UA(o))}},goe=class{constructor(e,t){this.text=e,this._offset=Ml,this.idx=0;let n=t.getRegExpStr(),o=n?new RegExp(n+`| +`,"gi"):null,r=[],s,a=0,l=0,c=0,u=0,d=[];for(let p=0;p<60;p++)d.push(new jA(ts(0,p),0,-1,Ju.getEmpty(),new UA(ts(0,p))));let h=[];for(let p=0;p<60;p++)h.push(new jA(ts(1,p),0,-1,Ju.getEmpty(),new UA(ts(1,p))));if(o)for(o.lastIndex=0;(s=o.exec(e))!==null;){let p=s.index,g=s[0];if(g===` +`)a++,l=p+1;else{if(c!==p){let A;if(u===a){let v=p-c;if(v{Rt();OH();r1();UL();boe();RLe=class i{static createFromLanguage(e,t){function n(r){return t.getKey(`${r.languageId}:::${r.bracketText}`)}let o=new Map;for(let r of e.bracketsNew.openingBrackets){let s=ts(0,r.bracketText.length),a=n(r),l=Ju.getEmpty().add(a,ILe);o.set(r.bracketText,new jA(s,1,a,l,FH.create(s,r,l)))}for(let r of e.bracketsNew.closingBrackets){let s=ts(0,r.bracketText.length),a=Ju.getEmpty(),l=r.getOpeningBrackets();for(let c of l)a=a.add(n(c),ILe);o.set(r.bracketText,new jA(s,2,n(l[0]),a,FH.create(s,r,a)))}return new i(o)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{let e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>$ai(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}};RP=class{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=RLe.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}});function Iht(i){if(i.length===0)return null;if(i.length===1)return i[0];let e=0;function t(){if(e>=i.length)return null;let s=e,a=i[s].listHeight;for(e++;e=2?PLe(s===0&&e===i.length?i:i.slice(s,e),!1):i[s]}let n=t(),o=t();if(!o)return n;for(let s=t();s;s=t())kht(n,o)<=kht(o,s)?(n=OLe(n,o),o=s):o=OLe(o,s);return OLe(n,o)}function PLe(i,e=!1){if(i.length===0)return null;if(i.length===1)return i[0];let t=i.length;for(;t>3;){let n=t>>1;for(let o=0;o=3?i[2]:null,e)}function kht(i,e){return Math.abs(i.listHeight-e.listHeight)}function OLe(i,e){return i.listHeight===e.listHeight?ym.create23(i,e,null,!1):i.listHeight>e.listHeight?eli(i,e):tli(e,i)}function eli(i,e){i=i.toMutable();let t=i,n=[],o;for(;;){if(e.listHeight===t.listHeight){o=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){let s=n[r];o?s.childrenLength>=3?o=ym.create23(s.unappendChild(),o,null,!1):(s.appendChildOfSameHeight(o),o=void 0):s.handleChildrenChanged()}return o?ym.create23(i,o,null,!1):i}function tli(i,e){i=i.toMutable();let t=i,n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let o=e;for(let r=n.length-1;r>=0;r--){let s=n[r];o?s.childrenLength>=3?o=ym.create23(o,s.unprependChild(),null,!1):(s.prependChildOfSameHeight(o),o=void 0):s.handleChildrenChanged()}return o?ym.create23(o,i,null,!1):i}var Lht=D(()=>{OH()});function BLe(i,e=-1){for(;;){if(e++,e>=i.childrenLength)return-1;if(i.getChild(e))return e}}function PH(i){return i.length>0?i[i.length-1]:void 0}var Aoe,Nht=D(()=>{r1();Aoe=class{constructor(e){this.lastOffset=Ml,this.nextNodes=[e],this.offsets=[Ml],this.idxs=[]}readLongestNodeAt(e,t){if(Zx(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){let n=PH(this.nextNodes);if(!n)return;let o=PH(this.offsets);if(Zx(e,o))return;if(Zx(o,e))if(zo(o,n.length)<=e)this.nextNodeAfterCurrent();else{let r=BLe(n);r!==-1?(this.nextNodes.push(n.getChild(r)),this.offsets.push(o),this.idxs.push(r)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{let r=BLe(n);if(r===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(r)),this.offsets.push(o),this.idxs.push(r)}}}}nextNodeAfterCurrent(){for(;;){let e=PH(this.offsets),t=PH(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;let n=PH(this.nextNodes),o=BLe(n,this.idxs[this.idxs.length-1]);if(o!==-1){this.nextNodes.push(n.getChild(o)),this.offsets.push(zo(e,t.length)),this.idxs[this.idxs.length-1]=o;break}else this.idxs.pop()}}}});function BH(i,e,t,n){return new zLe(i,e,t,n).parseDocument()}var zLe,VLe=D(()=>{OH();IH();UL();r1();Lht();Nht();zLe=class{constructor(e,t,n,o){if(this.tokenizer=e,this.createImmutableLists=o,this._itemsConstructed=0,this._itemsFromCache=0,n&&o)throw new Error("Not supported");this.oldNodeReader=n?new Aoe(n):void 0,this.positionMapper=new hoe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ju.getEmpty(),0);return e||(e=ym.getEmpty()),e}parseList(e,t){let n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){let s=this.tokenizer.peek();if(!s||s.kind===2&&s.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?Iht(n):PLe(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!IP(t)){let n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),o=>t!==null&&!Zx(o.length,t)?!1:o.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;let n=this.tokenizer.read();switch(n.kind){case 2:return new moe(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new UA(n.length);let o=e.merge(n.bracketIds),r=this.parseList(o,t+1),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),NH.create(n.astNode,r,s.astNode)):NH.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}});function FP(i,e){if(i.length===0)return e;if(e.length===0)return i;let t=new Ad(Mht(i)),n=Mht(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let o=t.dequeue();function r(c){if(c===void 0){let d=t.takeWhile(h=>!0)||[];return o&&d.unshift(o),d}let u=[];for(;o&&!IP(c);){let[d,h]=o.splitAt(c);u.push(d),c=WL(d.lengthAfter,c),o=h??t.dequeue()}return IP(c)||u.push(new zH(!1,c,c)),u}let s=[];function a(c,u,d){if(s.length>0&&TLe(s[s.length-1].endOffset,c)){let h=s[s.length-1];s[s.length-1]=new l0(h.startOffset,u,zo(h.newLength,d))}else s.push({startOffset:c,endOffset:u,newLength:d})}let l=Ml;for(let c of n){let u=r(c.lengthBefore);if(c.modified){let d=Dht(u,f=>f.lengthBefore),h=zo(l,d);a(l,h,c.lengthAfter),l=h}else for(let d of u){let h=l;l=zo(l,d.lengthBefore),d.modified&&a(h,l,d.lengthAfter)}}return s}function Mht(i){let e=[],t=Ml;for(let n of i){let o=WL(t,n.startOffset);IP(o)||e.push(new zH(!1,o,o));let r=WL(n.startOffset,n.endOffset);e.push(new zH(!0,r,n.newLength)),t=n.endOffset}return e}var zH,HLe=D(()=>{Wt();IH();r1();zH=class i{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){let t=WL(e,this.lengthAfter);return TLe(t,Ml)?[this,void 0]:this.modified?[new i(this.modified,this.lengthBefore,e),new i(this.modified,Ml,t)]:[new i(this.modified,e,e),new i(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${gh(this.lengthBefore)} -> ${gh(this.lengthAfter)}`}}});function Rht(i,e,t,n){if(i.kind===4||i.kind===2){let o=[];for(let r of i.children)t=zo(e,r.length),o.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let r=o.length-1;r>=0;r--){let{nodeOffsetStart:s,nodeOffsetEnd:a}=o[r];if(Zx(s,n)){let l=Rht(i.children[r],s,a,n);if(l)return l}}return null}else{if(i.kind===3)return null;if(i.kind===1){let o=UE(e,t);return{bracketInfo:i.bracketInfo,range:o}}}return null}function Fht(i,e,t,n){if(i.kind===4||i.kind===2){for(let o of i.children){if(t=zo(e,o.length),Zx(n,t)){let r=Fht(o,e,t,n);if(r)return r}e=t}return null}else{if(i.kind===3)return null;if(i.kind===1){let o=UE(e,t);return{bracketInfo:i.bracketInfo,range:o}}}return null}function WLe(i,e,t,n,o,r,s,a,l,c,u=!1){if(s>200)return!0;e:for(;;)switch(i.kind){case 4:{let d=i.childrenLength;for(let h=0;h200)return!0;let l=!0;if(i.kind===2){let c=0;if(a){let h=a.get(i.openingBracket.text);h===void 0&&(h=0),c=h,h++,a.set(i.openingBracket.text,h)}let u=zo(e,i.openingBracket.length),d=-1;if(r.includeMinIndentation&&(d=i.computeMinIndentation(e,r.textModel)),l=r.push(new doe(UE(e,t),UE(e,u),i.closingBracket?UE(zo(u,i.child?.length||Ml),t):void 0,s,c,i,d)),e=u,l&&i.child){let h=i.child;if(t=zo(e,h.length),HE(e,o)&&LP(t,n)&&(l=jLe(h,e,t,n,o,r,s+1,a),!l))return!1}a?.set(i.openingBracket.text,c)}else{let c=e;for(let u of i.children){let d=c;if(c=zo(c,u.length),HE(d,o)&&HE(n,c)&&(l=jLe(u,d,c,n,o,r,s,a),!l))return!1}}return l}var voe,ULe,Oht=D(()=>{et();de();_ht();IH();FLe();r1();VLe();UL();boe();Wt();HLe();voe=class extends H{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new q,this.denseKeyProvider=new NP,this.brackets=new RP(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{let n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),o=new goe(this.textModel.getValue(),n);this.initialAstWithoutTokens=BH(o,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){let e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){let t=e.map(n=>new l0(ts(n.fromLineNumber-1,0),ts(n.toLineNumber,0),ts(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=l0.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){let n=FP(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=FP(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){let r=t,s=new MP(this.textModel,this.brackets);return BH(s,e,r,n)}getBracketsInRange(e,t){this.flushQueue();let n=ts(e.startLineNumber-1,e.startColumn-1),o=ts(e.endLineNumber-1,e.endColumn-1);return new Ex(r=>{let s=this.initialAstWithoutTokens||this.astWithTokens;WLe(s,Ml,s.length,n,o,r,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();let n=WE(e.getStartPosition()),o=WE(e.getEndPosition());return new Ex(r=>{let s=this.initialAstWithoutTokens||this.astWithTokens,a=new ULe(r,t,this.textModel);jLe(s,Ml,s.length,n,o,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return Fht(t,Ml,t.length,WE(e))}getFirstBracketBefore(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return Rht(t,Ml,t.length,WE(e))}};ULe=class{constructor(e,t,n){this.push=e,this.includeMinIndentation=t,this.textModel=n}}});function ili(i,e){return{object:i,dispose:()=>e?.dispose()}}function QLe(i){if(typeof i>"u")return()=>!0;{let e=Date.now();return()=>Date.now()-e<=i}}function yoe(i){return i instanceof $x?null:i}var woe,$x,Pht=D(()=>{Wt();et();de();Ue();DO();fV();Oht();woe=class extends H{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Vn),this.onDidChangeEmitter=new q,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){(!e.languageId||this.bracketPairsTree.value?.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new se;this.bracketPairsTree.value=ili(e.add(new voe(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||Ex.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||Ex.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||Ex.empty}findMatchingBracketUp(e,t,n){let o=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){let s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!s)return null;let a=this.getBracketPairsInRange(R.fromPositions(t,t)).findLast(l=>s.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{let s=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!a)return null;let l=a.textIsBracket[s];return l?yoe(this._findMatchingBracketUp(l,o,QLe(n))):null}}matchBracket(e,t){if(this.canBuildAST){let n=this.getBracketPairsInRange(R.fromPositions(e,e)).filter(o=>o.closingBracketRange!==void 0&&(o.openingBracketRange.containsPosition(e)||o.closingBracketRange.containsPosition(e))).findLastMaxBy(pa(o=>o.openingBracketRange.containsPosition(e)?o.openingBracketRange:o.closingBracketRange,R.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{let n=QLe(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,o){let r=t.getCount(),s=t.getLanguageId(o),a=Math.max(0,e.column-1-n.maxBracketLength);for(let c=o-1;c>=0;c--){let u=t.getEndOffset(c);if(u<=a)break;if(t0(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){a=u;break}}let l=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let c=o+1;c=l)break;if(t0(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){l=u;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){let n=e.lineNumber,o=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=o.findTokenIndexAtOffset(e.column-1);if(s<0)return null;let a=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(s)).brackets;if(a&&!t0(o.getStandardTokenType(s))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,o,a,s),u=null;for(;;){let d=sf.findNextBracketInRange(a.forwardRegex,n,r,l,c);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){let h=r.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),f=this._matchFoundBracket(d,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(f){if(f instanceof $x)return null;u=f}}l=d.endColumn-1}if(u)return u}if(s>0&&o.getStartOffset(s)===e.column-1){let l=s-1,c=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(l)).brackets;if(c&&!t0(o.getStandardTokenType(l))){let{searchStartOffset:u,searchEndOffset:d}=this._establishBracketSearchOffsets(e,o,c,l),h=sf.findPrevBracketInRange(c.reversedRegex,n,r,u,d);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){let f=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),p=this._matchFoundBracket(h,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(p)return p instanceof $x?null:p}}}return null}_matchFoundBracket(e,t,n,o){if(!t)return null;let r=n?this._findMatchingBracketDown(t,e.getEndPosition(),o):this._findMatchingBracketUp(t,e.getStartPosition(),o);return r?r instanceof $x?r:[e,r]:null}_findMatchingBracketUp(e,t,n){let o=e.languageId,r=e.reversedRegex,s=-1,a=0,l=(c,u,d,h)=>{for(;;){if(n&&++a%100===0&&!n())return $x.INSTANCE;let f=sf.findPrevBracketInRange(r,c,u,d,h);if(!f)break;let p=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(p)?s++:e.isClose(p)&&s--,s===0)return f;h=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){let u=this.textModel.tokenization.getLineTokens(c),d=u.getCount(),h=this.textModel.getLineContent(c),f=d-1,p=h.length,g=h.length;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,g=t.column-1);let A=!0;for(;f>=0;f--){let v=u.getLanguageId(f)===o&&!t0(u.getStandardTokenType(f));if(v)A?p=u.getStartOffset(f):(p=u.getStartOffset(f),g=u.getEndOffset(f));else if(A&&p!==g){let w=l(c,h,p,g);if(w)return w}A=v}if(A&&p!==g){let v=l(c,h,p,g);if(v)return v}}return null}_findMatchingBracketDown(e,t,n){let o=e.languageId,r=e.forwardRegex,s=1,a=0,l=(u,d,h,f)=>{for(;;){if(n&&++a%100===0&&!n())return $x.INSTANCE;let p=sf.findNextBracketInRange(r,u,d,h,f);if(!p)break;let g=d.substring(p.startColumn-1,p.endColumn-1).toLowerCase();if(e.isOpen(g)?s++:e.isClose(g)&&s--,s===0)return p;h=p.endColumn-1}return null},c=this.textModel.getLineCount();for(let u=t.lineNumber;u<=c;u++){let d=this.textModel.tokenization.getLineTokens(u),h=d.getCount(),f=this.textModel.getLineContent(u),p=0,g=0,A=0;u===t.lineNumber&&(p=d.findTokenIndexAtOffset(t.column-1),g=t.column-1,A=t.column-1);let v=!0;for(;p=1;s--){let a=this.textModel.tokenization.getLineTokens(s),l=a.getCount(),c=this.textModel.getLineContent(s),u=l-1,d=c.length,h=c.length;if(s===t.lineNumber){u=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1;let p=a.getLanguageId(u);n!==p&&(n=p,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let f=!0;for(;u>=0;u--){let p=a.getLanguageId(u);if(n!==p){if(o&&r&&f&&d!==h){let A=sf.findPrevBracketInRange(o.reversedRegex,s,c,d,h);if(A)return this._toFoundBracket(r,A);f=!1}n=p,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}let g=!!o&&!t0(a.getStandardTokenType(u));if(g)f?d=a.getStartOffset(u):(d=a.getStartOffset(u),h=a.getEndOffset(u));else if(r&&o&&f&&d!==h){let A=sf.findPrevBracketInRange(o.reversedRegex,s,c,d,h);if(A)return this._toFoundBracket(r,A)}f=g}if(r&&o&&f&&d!==h){let p=sf.findPrevBracketInRange(o.reversedRegex,s,c,d,h);if(p)return this._toFoundBracket(r,p)}}return null}findNextBracket(e){let t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;let n=this.textModel.getLineCount(),o=null,r=null,s=null;for(let a=t.lineNumber;a<=n;a++){let l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),u=this.textModel.getLineContent(a),d=0,h=0,f=0;if(a===t.lineNumber){d=l.findTokenIndexAtOffset(t.column-1),h=t.column-1,f=t.column-1;let g=l.getLanguageId(d);o!==g&&(o=g,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let p=!0;for(;dg.closingBracketRange!==void 0&&g.range.strictContainsRange(f));return p?[p.openingBracketRange,p.closingBracketRange]:null}let o=QLe(t),r=this.textModel.getLineCount(),s=new Map,a=[],l=(f,p)=>{if(!s.has(f)){let g=[];for(let A=0,v=p?p.brackets.length:0;A{for(;;){if(o&&++c%100===0&&!o())return $x.INSTANCE;let w=sf.findNextBracketInRange(f.forwardRegex,p,g,A,v);if(!w)break;let C=g.substring(w.startColumn-1,w.endColumn-1).toLowerCase(),_=f.textIsBracket[C];if(_&&(_.isOpen(C)?a[_.index]++:_.isClose(C)&&a[_.index]--,a[_.index]===-1))return this._matchFoundBracket(w,_,!1,o);A=w.endColumn-1}return null},d=null,h=null;for(let f=n.lineNumber;f<=r;f++){let p=this.textModel.tokenization.getLineTokens(f),g=p.getCount(),A=this.textModel.getLineContent(f),v=0,w=0,C=0;if(f===n.lineNumber){v=p.findTokenIndexAtOffset(n.column-1),w=n.column-1,C=n.column-1;let E=p.getLanguageId(v);d!==E&&(d=E,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l(d,h))}let _=!0;for(;v{et();de();Ue();Am();io();xoe=class extends H{constructor(e){super(),this.textModel=e,this.colorProvider=new Coe,this.onDidChangeEmitter=new q,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,o){return o?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(s=>({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:s.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new R(1,1,this.textModel.getLineCount(),1),e,t):[]}},Coe=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}};ba((i,e)=>{let t=[ioe,noe,ooe,roe,soe,aoe],n=new Coe;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${i.getColor(aht)}; }`);let o=t.map(r=>i.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){let s=o[r%o.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${s}; }`)}})});function _oe(i){return i.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function zht(i,e){return i===null||i.length===0?e:new GLe(i,e).compress()}var wm,GLe,qLe=D(()=>{dO();_x();wm=class i{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,o){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=o}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${_oe(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${_oe(this.oldText)}")`:`(replace@${this.oldPosition} "${_oe(this.oldText)}" with "${_oe(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){let o=t.length;Sg(e,o,n),n+=4;for(let r=0;r{Be();Tt();Qn();mn();qLe();dO();Nc();hp=class i{static create(e,t){let n=e.getAlternativeVersionId(),o=KLe(e);return new i(n,n,o,o,t,t,[])}constructor(e,t,n,o,r,s,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=o,this.beforeCursorState=r,this.afterCursorState=s,this.changes=a}append(e,t,n,o,r){t.length>0&&(this.changes=zht(this.changes,t)),this.afterEOL=n,this.afterVersionId=o,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(Sg(e,t?t.length:0,n),n+=4,t)for(let o of t)Sg(e,o.selectionStartLineNumber,n),n+=4,Sg(e,o.selectionStartColumn,n),n+=4,Sg(e,o.positionLineNumber,n),n+=4,Sg(e,o.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){let o=_g(e,t);t+=4;for(let r=0;rt.toString()).join(", ")}matchesResource(e){return(Je.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof hp}append(e,t,n,o,r){this._data instanceof hp&&this._data.append(e,t,n,o,r)}close(){this._data instanceof hp&&(this._data=this._data.serialize())}open(){this._data instanceof hp||(this._data=hp.deserialize(this._data))}undo(){if(Je.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof hp&&(this._data=this._data.serialize());let e=hp.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Je.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof hp&&(this._data=this._data.serialize());let e=hp.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof hp&&(this._data=this._data.serialize()),this._data.byteLength+168}},YLe=class{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(let o of this._editStackElementsArr){let r=OP(o.resource);this._editStackElementsMap.set(r,o)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=OP(e);return this._editStackElementsMap.has(t)}setModel(e){let t=OP(Je.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=OP(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,o,r){let s=OP(e.uri);this._editStackElementsMap.get(s).append(e,t,n,o,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(let e of this._editStackElementsArr)e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=OP(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${Lc(t.resource)}: ${t}`);return`{${e.join(", ")}}`}};Eoe=class i{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);s1(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);s1(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let n=this._undoRedoService.getLastElement(this._model.uri);if(s1(n)&&n.canAppend(this._model))return n;let o=new Soe(y("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],KLe(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,o){let r=this._getOrCreateEditStackElement(e,o),s=this._model.applyEdits(t,!0),a=i._computeCursorState(n,s),l=s.map((c,u)=>({index:u,textChange:c.textChange}));return l.sort((c,u)=>c.textChange.oldPosition===u.textChange.oldPosition?c.index-u.index:c.textChange.oldPosition-u.textChange.oldPosition),r.append(this._model,l.map(c=>c.textChange),KLe(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return ft(n),null}}}});var PP,XLe=D(()=>{de();PP=class extends H{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}});function jL(i,e){let t=0,n=0,o=i.length;for(;n{});var eC,c0,tC,Toe=D(()=>{(function(i){i[i.Disabled=0]="Disabled",i[i.EnabledForActive=1]="EnabledForActive",i[i.Enabled=2]="Enabled"})(eC||(eC={}));c0=class{constructor(e,t,n,o,r,s){if(this.visibleColumn=e,this.column=t,this.className=n,this.horizontalLine=o,this.forWrappedLinesAfterColumn=r,this.forWrappedLinesBeforeOrAtColumn=s,e!==-1==(t!==-1))throw new Error}},tC=class{constructor(e,t){this.top=e,this.endColumn=t}}});var koe,VH,ZLe=D(()=>{lp();Rt();Zb();Ue();XLe();Doe();Toe();Tt();koe=class extends PP{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return jL(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,n){this.assertNotDisposed();let o=this.textModel.getLineCount();if(e<1||e>o)throw new fi("Illegal value for lineNumber");let r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(r&&r.offSide),a=-2,l=-1,c=-2,u=-1,d=T=>{if(a!==-1&&(a===-2||a>T-1)){a=-1,l=-1;for(let N=T-2;N>=0;N--){let L=this._computeIndentLevel(N);if(L>=0){a=N,l=L;break}}}if(c===-2){c=-1,u=-1;for(let N=T;N=0){c=N,u=L;break}}}},h=-2,f=-1,p=-2,g=-1,A=T=>{if(h===-2){h=-1,f=-1;for(let N=T-2;N>=0;N--){let L=this._computeIndentLevel(N);if(L>=0){h=N,f=L;break}}}if(p!==-1&&(p===-2||p=0){p=N,g=L;break}}}},v=0,w=!0,C=0,_=!0,E=0,I=0;for(let T=0;w||_;T++){let N=e-T,L=e+T;T>1&&(N<1||N1&&(L>o||L>n)&&(_=!1),T>5e4&&(w=!1,_=!1);let B=-1;if(w&&N>=1){let Q=this._computeIndentLevel(N-1);Q>=0?(c=N-1,u=Q,B=Math.ceil(Q/this.textModel.getOptions().indentSize)):(d(N),B=this._getIndentLevelForWhitespaceLine(s,l,u))}let z=-1;if(_&&L<=o){let Q=this._computeIndentLevel(L-1);Q>=0?(h=L-1,f=Q,z=Math.ceil(Q/this.textModel.getOptions().indentSize)):(A(L),z=this._getIndentLevelForWhitespaceLine(s,f,g))}if(T===0){I=B;continue}if(T===1){if(L<=o&&z>=0&&I+1===z){w=!1,v=L,C=L,E=z;continue}if(N>=1&&B>=0&&B-1===I){_=!1,v=N,C=N,E=B;continue}if(v=e,C=e,E=I,E===0)return{startLineNumber:v,endLineNumber:C,indent:E}}w&&(B>=E?v=N:w=!1),_&&(z>=E?C=L:_=!1)}return{startLineNumber:v,endLineNumber:C,indent:E}}getLinesBracketGuides(e,t,n,o){let r=[];for(let d=e;d<=t;d++)r.push([]);let s=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new R(e,1,t,this.textModel.getLineMaxColumn(t))).toArray(),l;if(n&&a.length>0){let d=(e<=n.lineNumber&&n.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(R.fromPositions(n)).toArray()).filter(h=>R.strictContainsPosition(h.range,n));l=Rx(d,h=>s||h.range.startLineNumber!==h.range.endLineNumber)?.range}let c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new VH;for(let d of a){if(!d.closingBracketRange)continue;let h=l&&d.range.equalsRange(l);if(!h&&!o.includeInactive)continue;let f=u.getInlineClassName(d.nestingLevel,d.nestingLevelOfEqualBracketType,c)+(o.highlightActive&&h?" "+u.activeClassName:""),p=d.openingBracketRange.getStartPosition(),g=d.closingBracketRange.getStartPosition(),A=o.horizontalGuides===eC.Enabled||o.horizontalGuides===eC.EnabledForActive&&h;if(d.range.startLineNumber===d.range.endLineNumber){s&&A&&r[d.range.startLineNumber-e].push(new c0(-1,d.openingBracketRange.getEndPosition().column,f,new tC(!1,g.column),-1,-1));continue}let v=this.getVisibleColumnFromPosition(g),w=this.getVisibleColumnFromPosition(d.openingBracketRange.getStartPosition()),C=Math.min(w,v,d.minVisibleColumnIndentation+1),_=!1;Hr(this.textModel.getLineContent(d.closingBracketRange.startLineNumber))=e&&w>C&&r[p.lineNumber-e].push(new c0(C,-1,f,new tC(!1,p.column),-1,-1)),g.lineNumber<=t&&v>C&&r[g.lineNumber-e].push(new c0(C,-1,f,new tC(!_,g.column),-1,-1)))}for(let d of r)d.sort((h,f)=>h.visibleColumn-f.visibleColumn);return r}getVisibleColumnFromPosition(e){return or.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");let o=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(r&&r.offSide),a=new Array(t-e+1),l=-2,c=-1,u=-2,d=-1;for(let h=e;h<=t;h++){let f=h-e,p=this._computeIndentLevel(h-1);if(p>=0){l=h-1,c=p,a[f]=Math.ceil(p/o.indentSize);continue}if(l===-2){l=-1,c=-1;for(let g=h-2;g>=0;g--){let A=this._computeIndentLevel(g);if(A>=0){l=g,c=A;break}}}if(u!==-1&&(u===-2||u=0){u=g,d=A;break}}}a[f]=this._getIndentLevelForWhitespaceLine(s,c,d)}return a}_getIndentLevelForWhitespaceLine(e,t,n){let o=this.textModel.getOptions();return t===-1||n===-1?0:t0&&a>0||l>0&&c>0)return;let u=Math.abs(a-c),d=Math.abs(s-l);if(u===0){o.spacesDiff=d,d>0&&0<=l-1&&l-10?o++:_>1&&r++,nli(s,a,A,C,d),d.looksLikeAlignment&&!(t&&e===d.spacesDiff)))continue;let I=d.spacesDiff;I<=c&&u[I]++,s=A,a=C}let h=t;o!==r&&(h=o{let A=u[g];A>p&&(p=A,f=g)}),f===4&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}var $Le,Vht=D(()=>{$Le=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}});function mf(i){return(i.metadata&1)>>>0}function wr(i,e){i.metadata=i.metadata&254|e<<0}function uu(i){return(i.metadata&2)>>>1===1}function ur(i,e){i.metadata=i.metadata&253|(e?1:0)<<1}function qht(i){return(i.metadata&4)>>>2===1}function Hht(i,e){i.metadata=i.metadata&251|(e?1:0)<<2}function Yht(i){return(i.metadata&64)>>>6===1}function Wht(i,e){i.metadata=i.metadata&191|(e?1:0)<<6}function oli(i){return(i.metadata&24)>>>3}function Uht(i,e){i.metadata=i.metadata&231|e<<3}function rli(i){return(i.metadata&32)>>>5===1}function jht(i,e){i.metadata=i.metadata&223|(e?1:0)<<5}function sli(i){let e=i.root,t=0;for(;e!==qi;){if(e.left!==qi&&!uu(e.left)){e=e.left;continue}if(e.right!==qi&&!uu(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,iC(e),ur(e,!0),ur(e.left,!1),ur(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}ur(i.root,!1)}function BP(i,e,t,n){return it||n===1?!1:n===2?!0:e}function ali(i,e,t,n,o){let r=oli(i),s=r===0||r===2,a=r===1||r===2,l=t-e,c=n,u=Math.min(l,c),d=i.start,h=!1,f=i.end,p=!1;e<=d&&f<=t&&rli(i)&&(i.start=e,h=!0,i.end=e,p=!0);{let A=o?1:l>0?2:0;!h&&BP(d,s,e,A)&&(h=!0),!p&&BP(f,a,e,A)&&(p=!0)}if(u>0&&!o){let A=l>c?2:0;!h&&BP(d,s,e+u,A)&&(h=!0),!p&&BP(f,a,e+u,A)&&(p=!0)}{let A=o?1:0;!h&&BP(d,s,t,A)&&(i.start=e+c,h=!0),!p&&BP(f,a,t,A)&&(i.end=e+c,p=!0)}let g=c-l;h||(i.start=Math.max(0,d+g)),p||(i.end=Math.max(0,f+g)),i.start>i.end&&(i.end=i.start)}function lli(i,e,t){let n=i.root,o=0,r=0,s=0,a=0,l=[],c=0;for(;n!==qi;){if(uu(n)){ur(n.left,!1),ur(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;continue}if(!uu(n.left)){if(r=o+n.maxEnd,rt){ur(n,!0);continue}if(a=o+n.end,a>=e&&(n.setCachedOffsets(s,a,0),l[c++]=n),ur(n,!0),n.right!==qi&&!uu(n.right)){o+=n.delta,n=n.right;continue}}return ur(i.root,!1),l}function cli(i,e,t,n){let o=i.root,r=0,s=0,a=0,l=n-(t-e);for(;o!==qi;){if(uu(o)){ur(o.left,!1),ur(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),iC(o),o=o.parent;continue}if(!uu(o.left)){if(s=r+o.maxEnd,st){o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(i.requestNormalizeDelta=!0),ur(o,!0);continue}if(ur(o,!0),o.right!==qi&&!uu(o.right)){r+=o.delta,o=o.right;continue}}ur(i.root,!1)}function uli(i,e){let t=i.root,n=[],o=0;for(;t!==qi;){if(uu(t)){ur(t.left,!1),ur(t.right,!1),t=t.parent;continue}if(t.left!==qi&&!uu(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[o++]=t),ur(t,!0),t.right!==qi&&!uu(t.right)){t=t.right;continue}}return ur(i.root,!1),n}function dli(i){let e=i.root,t=[],n=0;for(;e!==qi;){if(uu(e)){ur(e.left,!1),ur(e.right,!1),e=e.parent;continue}if(e.left!==qi&&!uu(e.left)){e=e.left;continue}if(e.right!==qi&&!uu(e.right)){e=e.right;continue}t[n++]=e,ur(e,!0)}return ur(i.root,!1),t}function hli(i,e,t,n,o){let r=i.root,s=0,a=0,l=0,c=[],u=0;for(;r!==qi;){if(uu(r)){ur(r.left,!1),ur(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),r=r.parent;continue}if(r.left!==qi&&!uu(r.left)){r=r.left;continue}a=s+r.start,l=s+r.end,r.setCachedOffsets(a,l,n);let d=!0;if(e&&r.ownerId&&r.ownerId!==e&&(d=!1),t&&qht(r)&&(d=!1),o&&!Yht(r)&&(d=!1),d&&(c[u++]=r),ur(r,!0),r.right!==qi&&!uu(r.right)){s+=r.delta,r=r.right;continue}}return ur(i.root,!1),c}function fli(i,e,t,n,o,r,s){let a=i.root,l=0,c=0,u=0,d=0,h=[],f=0;for(;a!==qi;){if(uu(a)){ur(a.left,!1),ur(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!uu(a.left)){if(c=l+a.maxEnd,ct){ur(a,!0);continue}if(d=l+a.end,d>=e){a.setCachedOffsets(u,d,r);let p=!0;n&&a.ownerId&&a.ownerId!==n&&(p=!1),o&&qht(a)&&(p=!1),s&&!Yht(a)&&(p=!1),p&&(h[f++]=a)}if(ur(a,!0),a.right!==qi&&!uu(a.right)){l+=a.delta,a=a.right;continue}}return ur(i.root,!1),h}function Qht(i,e){if(i.root===qi)return e.parent=qi,e.left=qi,e.right=qi,wr(e,0),i.root=e,i.root;pli(i,e),jE(e.parent);let t=e;for(;t!==i.root&&mf(t.parent)===1;)if(t.parent===t.parent.parent.left){let n=t.parent.parent.right;mf(n)===1?(wr(t.parent,0),wr(n,0),wr(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,HH(i,t)),wr(t.parent,0),wr(t.parent.parent,1),WH(i,t.parent.parent))}else{let n=t.parent.parent.left;mf(n)===1?(wr(t.parent,0),wr(n,0),wr(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,WH(i,t)),wr(t.parent,0),wr(t.parent.parent,1),HH(i,t.parent.parent))}return wr(i.root,0),e}function pli(i,e){let t=0,n=i.root,o=e.start,r=e.end;for(;;)if(gli(o,r,n.start+t,n.end+t)<0)if(n.left===qi){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===qi){e.start-=t+n.delta,e.end-=t+n.delta,e.maxEnd-=t+n.delta,n.right=e;break}else t+=n.delta,n=n.right;e.parent=n,e.left=qi,e.right=qi,wr(e,1)}function Ght(i,e){let t,n;if(e.left===qi?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===qi?(t=e.left,n=e):(n=mli(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(i.requestNormalizeDelta=!0)),n===i.root){i.root=t,wr(t,0),e.detach(),tNe(),iC(t),i.root.parent=qi;return}let o=mf(n)===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?t.parent=n.parent:(n.parent===e?t.parent=n:t.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,wr(n,mf(e)),e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==qi&&(n.left.parent=n),n.right!==qi&&(n.right.parent=n)),e.detach(),o){jE(t.parent),n!==e&&(jE(n),jE(n.parent)),tNe();return}jE(t),jE(t.parent),n!==e&&(jE(n),jE(n.parent));let r;for(;t!==i.root&&mf(t)===0;)t===t.parent.left?(r=t.parent.right,mf(r)===1&&(wr(r,0),wr(t.parent,1),HH(i,t.parent),r=t.parent.right),mf(r.left)===0&&mf(r.right)===0?(wr(r,1),t=t.parent):(mf(r.right)===0&&(wr(r.left,0),wr(r,1),WH(i,r),r=t.parent.right),wr(r,mf(t.parent)),wr(t.parent,0),wr(r.right,0),HH(i,t.parent),t=i.root)):(r=t.parent.left,mf(r)===1&&(wr(r,0),wr(t.parent,1),WH(i,t.parent),r=t.parent.left),mf(r.left)===0&&mf(r.right)===0?(wr(r,1),t=t.parent):(mf(r.left)===0&&(wr(r.right,0),wr(r,1),HH(i,r),r=t.parent.left),wr(r,mf(t.parent)),wr(t.parent,0),wr(r.left,0),WH(i,t.parent),t=i.root));wr(t,0),tNe()}function mli(i){for(;i.left!==qi;)i=i.left;return i}function tNe(){qi.parent=qi,qi.delta=0,qi.start=0,qi.end=0}function HH(i,e){let t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==qi&&(t.left.parent=e),t.parent=e.parent,e.parent===qi?i.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,iC(e),iC(t)}function WH(i,e){let t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(i.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==qi&&(t.right.parent=e),t.parent=e.parent,e.parent===qi?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,iC(e),iC(t)}function Kht(i){let e=i.end;if(i.left!==qi){let t=i.left.maxEnd;t>e&&(e=t)}if(i.right!==qi){let t=i.right.maxEnd+i.delta;t>e&&(e=t)}return e}function iC(i){i.maxEnd=Kht(i)}function jE(i){for(;i!==qi;){let e=Kht(i);if(i.maxEnd===e)return;i.maxEnd=e,i=i.parent}}function gli(i,e,t,n){return i===t?e-n:i-t}var UH,qi,zP,Jht=D(()=>{UH=class{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,wr(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Hht(this,!1),Wht(this,!1),Uht(this,1),jht(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,ur(this,!1)}reset(e,t,n,o){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=o}setOptions(e){this.options=e;let t=this.options.className;Hht(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),Wht(this,this.options.glyphMarginClassName!==null),Uht(this,this.options.stickiness),jht(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}},qi=new UH(null,0,0);qi.parent=qi;qi.left=qi;qi.right=qi;wr(qi,0);zP=class{constructor(){this.root=qi,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,o,r,s){return this.root===qi?[]:fli(this,e,t,n,o,r,s)}search(e,t,n,o){return this.root===qi?[]:hli(this,e,t,n,o)}collectNodesFromOwner(e){return uli(this,e)}collectNodesPostOrder(){return dli(this)}insert(e){Qht(this,e),this._normalizeDeltaIfNecessary()}delete(e){Ght(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let n=e,o=0;for(;e!==this.root;)e===e.parent.right&&(o+=e.parent.delta),e=e.parent;let r=n.start+o,s=n.end+o;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,o){let r=lli(this,e,e+t);for(let s=0,a=r.length;s{VP=class{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==vi)return Ioe(this.right);let e=this;for(;e.parent!==vi&&e.parent.left!==e;)e=e.parent;return e.parent===vi?vi:e.parent}prev(){if(this.left!==vi)return nNe(this.left);let e=this;for(;e.parent!==vi&&e.parent.right!==e;)e=e.parent;return e.parent===vi?vi:e.parent}detach(){this.parent=null,this.left=null,this.right=null}},vi=new VP(null,0);vi.parent=vi;vi.left=vi;vi.right=vi;vi.color=0});function Zht(i){let e;return i[i.length-1]<65536?e=new Uint16Array(i.length):e=new Uint32Array(i.length),e.set(i,0),e}function l1(i,e=!0){let t=[0],n=1;for(let o=0,r=i.length;o126)&&(s=!1)}let a=new aNe(Zht(i),n,o,r,s);return i.length=0,a}var nC,aNe,bh,c1,lNe,cNe,Loe,uNe=D(()=>{kt();Ue();ol();Xht();wV();nC=65535;aNe=class{constructor(e,t,n,o,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=o,this.isBasicASCII=r}};bh=class{constructor(e,t,n,o,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=o,this.length=r}},c1=class{constructor(e,t){this.buffer=e,this.lineStarts=t}},lNe=class{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==vi&&e.iterate(e.root,n=>(n!==vi&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},cNe=class{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let o=0;o=e){n[o]=null,t=!0;continue}}if(t){let o=[];for(let r of n)r!==null&&o.push(r);this._cache=o}}},Loe=class{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new c1("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=vi,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let o=null;for(let r=0,s=e.length;r0){e[r].lineStarts||(e[r].lineStarts=l1(e[r].buffer));let a=new bh(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),o=this.rbInsertRight(o,a)}this._searchCache=new cNe(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=nC,n=t-Math.floor(t/3),o=n*2,r="",s=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),u=c.length;if(s<=n||s+u0){let l=r.replace(/\r\n|\r|\n/g,e);a.push(new c1(l,l1(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new lNe(this,e)}getOffsetAt(e,t){let n=0,o=this.root;for(;o!==vi;)if(o.left!==vi&&o.lf_left+1>=e)o=o.left;else if(o.lf_left+o.piece.lineFeedCnt+1>=e){n+=o.size_left;let r=this.getAccumulatedValue(o,e-o.lf_left-2);return n+=r+t-1}else e-=o.lf_left+o.piece.lineFeedCnt,n+=o.size_left+o.piece.length,o=o.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,o=e;for(;t!==vi;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,r.index===0){let s=this.getOffsetAt(n+1,1),a=o-s;return new J(n+1,a+1)}return new J(n+1,r.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===vi){let r=this.getOffsetAt(n+1,1),s=o-e-r;return new J(n+1,s+1)}else t=t.right;return new J(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),o=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,o);return t?t!==this._EOL||!this._EOLNormalized?r.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let n=e.node,o=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),s=o.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==vi;){let a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=a.substring(l,l+t.remainder);break}else s+=a.substr(l,n.piece.length);n=n.next()}return s}getLinesContent(){let e=[],t=0,n="",o=!1;return this.iterate(this.root,r=>{if(r===vi)return!0;let s=r.piece,a=s.length;if(a===0)return!0;let l=this._buffers[s.bufferIndex].buffer,c=this._buffers[s.bufferIndex].lineStarts,u=s.start.line,d=s.end.line,h=c[u]+s.start.column;if(o&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=n,n="",o=!1,a===0))return!0;if(u===d)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(o=!0,n+=l.substr(h,a-1)):n+=l.substr(h,a),!0;n+=this._EOLNormalized?l.substring(h,Math.max(h,c[u+1]-this._EOLLength)):l.substring(h,c[u+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let f=u+1;f_+p,t.reset(0)):(w=h.buffer,C=_=>_,t.reset(p));do if(A=t.next(w),A){if(C(A.index)>=g)return u;this.positionInBuffer(e,C(A.index)-f,v);let _=this.getLineFeedCnt(e.piece.bufferIndex,r,v),E=v.line===r.line?v.column-r.column+o:v.column+1,I=E+A[0].length;if(d[u++]=fE(new R(n+_,E,n+_,I),A,l),C(A.index)+A[0].length>=g||u>=c)return u}while(A);return u}findMatchesLineByLine(e,t,n,o){let r=[],s=0,a=new ky(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let u=this.positionInBuffer(l.node,l.remainder),d=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,u,d,t,n,o,s,r),r;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){let g=this.getLineFeedCnt(f.piece.bufferIndex,u,f.piece.end);if(g>=1){let v=this._buffers[f.piece.bufferIndex].lineStarts,w=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),C=v[u.line+g],_=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(f,a,h,_,u,this.positionInBuffer(f,C-w),t,n,o,s,r),s>=o)return r;h+=g}let A=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){let v=this.getLineContent(h).substring(A,e.endColumn-1);return s=this._findMatchesInLine(t,a,v,e.endLineNumber,A,s,r,n,o),r}if(s=this._findMatchesInLine(t,a,this.getLineContent(h).substr(A),h,A,s,r,n,o),s>=o)return r;h++,l=this.nodeAt2(h,1),f=l.node,u=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){let g=h===e.startLineNumber?e.startColumn-1:0,A=this.getLineContent(h).substring(g,e.endColumn-1);return s=this._findMatchesInLine(t,a,A,e.endLineNumber,g,s,r,n,o),r}let p=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(c.node,a,h,p,u,d,t,n,o,s,r),r}_findMatchesInLine(e,t,n,o,r,s,a,l,c){let u=e.wordSeparators;if(!l&&e.simpleSearch){let h=e.simpleSearch,f=h.length,p=n.length,g=-f;for(;(g=n.indexOf(h,g+f))!==-1;)if((!u||Ste(u,n,p,g,f))&&(a[s++]=new Ty(new R(o,g+1+r,o,g+1+f+r),null),s>=c))return s;return s}let d;t.reset(0);do if(d=t.next(n),d&&(a[s++]=fE(new R(o,d.index+1+r,o,d.index+1+d[0].length+r),d,l),s>=c))return s;while(d);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==vi){let{node:o,remainder:r,nodeStartOffset:s}=this.nodeAt(e),a=o.piece,l=a.bufferIndex,c=this.positionInBuffer(o,r);if(o.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.lengthe){let u=[],d=new bh(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(o,r)===10){let g={line:d.start.line+1,column:0};d=new bh(d.bufferIndex,g,d.end,this.getLineFeedCnt(d.bufferIndex,g,d.end),d.length-1),t+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(o,r-1)===13){let g=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,g),t="\r"+t,o.piece.length===0&&u.push(o)}else this.deleteNodeTail(o,c);else this.deleteNodeTail(o,c);let h=this.createNewPieces(t);d.length>0&&this.rbInsertRight(o,d);let f=o;for(let p=0;p=0;s--)r=this.rbInsertLeft(r,o[s]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` +`);let n=this.createNewPieces(e),o=this.rbInsertRight(t,n[0]),r=o;for(let s=1;s=h)c=d+1;else break;return n?(n.line=d,n.column=l-f,null):{line:d,column:l-f}}getLineFeedCnt(e,t,n){if(n.column===0)return n.line-t.line;let o=this._buffers[e].lineStarts;if(n.line===o.length-1)return n.line-t.line;let r=o[n.line+1],s=o[n.line]+n.column;if(r>s+1)return n.line-t.line;let a=s-1;return this._buffers[e].buffer.charCodeAt(a)===13?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tnC){let u=[];for(;e.length>nC;){let h=e.charCodeAt(nC-1),f;h===13||h>=55296&&h<=56319?(f=e.substring(0,nC-1),e=e.substring(nC-1)):(f=e.substring(0,nC),e=e.substring(nC));let p=l1(f);u.push(new bh(this._buffers.length,{line:0,column:0},{line:p.length-1,column:f.length-p[p.length-1]},p.length-1,f.length)),this._buffers.push(new c1(f,p))}let d=l1(e);return u.push(new bh(this._buffers.length,{line:0,column:0},{line:d.length-1,column:e.length-d[d.length-1]},d.length-1,e.length)),this._buffers.push(new c1(e,d)),u}let t=this._buffers[0].buffer.length,n=l1(e,!1),o=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},o=this._lastChangeBufferPos;for(let u=0;u=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this.getAccumulatedValue(n,e-n.lf_left-1),u=this._buffers[n.piece.bufferIndex].buffer,d=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:s,nodeStartLineNumber:a-(e-1-n.lf_left)}),u.substring(d+l,d+c-t)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this._buffers[n.piece.bufferIndex].buffer,u=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);o=c.substring(u+l,u+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==vi;){let s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=s.substring(l,l+a-t),o}else{let a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);o+=s.substr(a,n.piece.length)}n=n.next()}return o}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==vi;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,o=this.positionInBuffer(e,t),r=o.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let s=this.getLineFeedCnt(e.piece.bufferIndex,n.start,o);if(s!==r)return{index:s,remainder:0}}return{index:r,remainder:o.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,o=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?o[n.end.line]+n.end.column-o[n.start.line]-n.start.column:o[r]-o[n.start.line]-n.start.column}deleteNodeTail(e,t){let n=e.piece,o=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),c=l-o,u=a-r,d=n.length+u;e.piece=new bh(n.bufferIndex,n.start,s,l,d),a1(this,e,u,c)}deleteNodeHead(e,t){let n=e.piece,o=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=this.offsetInBuffer(n.bufferIndex,s),c=a-o,u=r-l,d=n.length+u;e.piece=new bh(n.bufferIndex,s,n.end,a,d),a1(this,e,u,c)}shrinkNode(e,t,n){let o=e.piece,r=o.start,s=o.end,a=o.length,l=o.lineFeedCnt,c=t,u=this.getLineFeedCnt(o.bufferIndex,o.start,c),d=this.offsetInBuffer(o.bufferIndex,t)-this.offsetInBuffer(o.bufferIndex,r);e.piece=new bh(o.bufferIndex,o.start,c,u,d),a1(this,e,d-a,u-l);let h=new bh(o.bufferIndex,n,s,this.getLineFeedCnt(o.bufferIndex,n,s),this.offsetInBuffer(o.bufferIndex,s)-this.offsetInBuffer(o.bufferIndex,n)),f=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` +`);let n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),o=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let r=l1(t,!1);for(let f=0;fe)t=t.left;else if(t.size_left+t.piece.length>=e){o+=t.size_left;let r={node:t,remainder:e-t.size_left,nodeStartOffset:o};return this._searchCache.set(r),r}else e-=t.size_left+t.piece.length,o+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let n=this.root,o=0;for(;n!==vi;)if(n.left!==vi&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return o+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:o}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:o};t-=n.piece.length-r;break}else e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==vi;){if(n.piece.lineFeedCnt>0){let r=this.getAccumulatedValue(n,0),s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}else if(n.piece.length>=t-1){let r=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:r}}else t-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],o=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(o)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===vi||e.piece.lineFeedCnt===0)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,o=t.start.line,r=n[o]+t.start.column;return o===n.length-1||n[o+1]>r+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(r)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===vi||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n=[],o=this._buffers[e.piece.bufferIndex].lineStarts,r;e.piece.end.column===0?r={line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:r={line:e.piece.end.line,column:e.piece.end.column-1};let s=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new bh(e.piece.bufferIndex,e.piece.start,r,a,s),a1(this,e,-1,-1),e.piece.length===0&&n.push(e);let l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,u=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new bh(t.piece.bufferIndex,l,t.piece.end,u,c),a1(this,t,-1,-1),t.piece.length===0&&n.push(t);let d=this.createNewPieces(`\r +`);this.rbInsertRight(e,d[0]);for(let h=0;h{et();Rt();Ue();ol();uNe();vL();qLe();de();HP=class i extends H{constructor(e,t,n,o,r,s,a){super(),this._onDidChangeContent=this._register(new q),this._BOM=t,this._mightContainNonBasicASCII=!s,this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._pieceTree=new Loe(e,n,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let n=e+t,o=this.getPositionAt(e),r=this.getPositionAt(n);return new R(o.lineNumber,o.column,r.lineNumber,r.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";let n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let n=this.getOffsetAt(e.startLineNumber,e.startColumn),o=this.getOffsetAt(e.endLineNumber,e.endColumn),r=0,s=this._getEndOfLine(t),a=this.getEOL();if(s.length!==a.length){let l=s.length-a.length,c=e.endLineNumber-e.startLineNumber;r=l*c}return o-n+r}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let n=0,o=e.startLineNumber,r=e.endLineNumber;for(let s=o;s<=r;s++){let a=this.getLineContent(s),l=s===o?e.startColumn-1:0,c=s===r?e.endColumn-1:a.length;for(let u=l;uv.sortIndex-A.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;let f=this._doApplyEdits(l),p=null;if(t&&d.length>0){d.sort((g,v)=>v.lineNumber-g.lineNumber),p=[];for(let g=0,v=d.length;g0&&d[g-1].lineNumber===A)continue;let w=d[g].oldContent,C=this.getLineContent(A);C.length===0||C===w||Vo(C)!==-1||p.push(A)}}return this._onDidChangeContent.fire(),new eee(h,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,n=e[0].range,r=e[e.length-1].range,o=new N(n.startLineNumber,n.startColumn,r.endLineNumber,r.endColumn),s=n.startLineNumber,a=n.startColumn,l=[];for(let f=0,p=e.length;f0&&l.push(g.text),s=v.endLineNumber,a=v.endColumn}let c=l.join(""),[u,d,h]=Jp(c);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:c,eolCount:u,firstLineLength:d,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(i._sortOpsDescending);let t=[];for(let n=0;n0){let h=l.eolCount+1;h===1?d=new N(c,u,c,u+l.firstLineLength):d=new N(c,u,c+h-1,l.lastLineLength+1)}else d=new N(c,u,c,u);n=d.endLineNumber,r=d.endColumn,t.push(d),o=l}return t}static _sortOpsAscending(e,t){let n=N.compareRangesUsingEnds(e.range,t.range);return n===0?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=N.compareRangesUsingEnds(e.range,t.range);return n===0?t.sortIndex-e.sortIndex:-n}}});var ULe,gV,qpt=D(()=>{Pt();HLe();WLe();ULe=class{constructor(e,t,n,r,o,s,a,l,c){this._chunks=e,this._bom=t,this._cr=n,this._lf=r,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){let t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?` +`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,n){let o=this._mightContainRTL,r=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,a=!0,l=[];for(let g=0;gA.sortIndex-v.sortIndex)}this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;let f=this._doApplyEdits(l),p=null;if(t&&d.length>0){d.sort((g,A)=>A.lineNumber-g.lineNumber),p=[];for(let g=0,A=d.length;g0&&d[g-1].lineNumber===v)continue;let w=d[g].oldContent,C=this.getLineContent(v);C.length===0||C===w||Hr(C)!==-1||p.push(v)}}return this._onDidChangeContent.fire(),new xte(h,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,n=e[0].range,o=e[e.length-1].range,r=new R(n.startLineNumber,n.startColumn,o.endLineNumber,o.endColumn),s=n.startLineNumber,a=n.startColumn,l=[];for(let f=0,p=e.length;f0&&l.push(g.text),s=A.endLineNumber,a=A.endColumn}let c=l.join(""),[u,d,h]=fm(c);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:c,eolCount:u,firstLineLength:d,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(i._sortOpsDescending);let t=[];for(let n=0;n0){let h=l.eolCount+1;h===1?d=new R(c,u,c,u+l.firstLineLength):d=new R(c,u,c+h-1,l.lastLineLength+1)}else d=new R(c,u,c,u);n=d.endLineNumber,o=d.endColumn,t.push(d),r=l}return t}static _sortOpsAscending(e,t){let n=R.compareRangesUsingEnds(e.range,t.range);return n===0?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=R.compareRangesUsingEnds(e.range,t.range);return n===0?t.sortIndex-e.sortIndex:-n}}});var hNe,YH,eft=D(()=>{Rt();uNe();dNe();hNe=class{constructor(e,t,n,o,r,s,a,l,c){this._chunks=e,this._bom=t,this._cr=n,this._lf=o,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){let t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?` `:`\r `:n>t/2?`\r `:` `}create(e){let t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(t===`\r `&&(this._cr>0||this._lf>0)||t===` -`&&(this._cr>0||this._crlf>0)))for(let o=0,s=n.length;o=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=Gpt(this._tmpLineStarts,e);this.chunks.push(new Qy(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=rv(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=nZ(e)))}finish(e=!0){return this._finish(),new ULe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=jy(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}});function C0i(i,e){let t=[];for(let n=0;n{Qt();une=class{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(t===0){this.insert(e,n);return}else if(n===0){this.delete(e,t);return}let r=this._store.slice(0,e),o=this._store.slice(e+t),s=C0i(n,this._default);this._store=r.concat(s,o)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;let n=[];for(let r=0;r{dne=class{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}});var dL,jLe=D(()=>{Kpt();dL=class{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new dne(e,[t]))}finalize(){return this._tokens}}});function bV(i,e,t,n,r,o){let s=null;if(t)try{s=t.tokenizeEncoded(n,r,o.clone())}catch(a){pt(a)}return s||(s=cE(i.encodeLanguageId(e),o)),To.convertToEndOffset(s.tokens,n.length),s}var QLe,hne,JO,GLe,qLe,fne,Jpt=D(()=>{Jt();Lt();Si();id();zI();md();Kf();aO();Ypt();jLe();wg();QLe=class{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new JO(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}},hne=class extends QLe{constructor(e,t,n,r){super(e,t),this._textModel=n,this._languageIdCodec=r}updateTokensUntilLine(e,t){let n=this._textModel.getLanguageId();for(;;){let r=this.getFirstInvalidLine();if(!r||r.lineNumber>t)break;let o=this._textModel.getLineContent(r.lineNumber),s=bV(this._languageIdCodec,n,this.tokenizationSupport,o,!0,r.startState);e.add(r.lineNumber,s.tokens),this.store.setEndState(r.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){let n=this.getStartState(e.lineNumber);if(!n)return 0;let r=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),a=bV(this._languageIdCodec,r,this.tokenizationSupport,s,!0,n),l=new To(a.tokens,s,this._languageIdCodec);if(l.getCount()===0)return 0;let c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,n){let r=e.lineNumber,o=e.column,s=this.getStartState(r);if(!s)return null;let a=this._textModel.getLineContent(r),l=a.substring(0,o-1)+n+a.substring(o-1+t),c=this._textModel.getLanguageIdAtPosition(r,0),u=bV(this._languageIdCodec,c,this.tokenizationSupport,l,!0,s);return new To(u.tokens,l,this._languageIdCodec)}hasAccurateTokensForLine(e){let t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&a>=1;a--){let l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}},qLe=class{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){let t=this._ranges.findIndex(n=>n.contains(e));if(t!==-1){let n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Di(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Di(n.start,e):this._ranges.splice(t,1,new Di(n.start,e),new Di(e+1,n.endExclusive))}}addRange(e){Di.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let r=n;for(;!(r>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}};fne=class{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,bSe(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){let t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Yt(e,t))}}});var pne,YLe,mne,XO,gne=D(()=>{Qt();Jt();et();ae();md();pne=class{constructor(){this._onDidChangeVisibleRanges=new G,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){let e=new YLe(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}},YLe=class{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){let n=e.map(r=>new Yt(r.startLineNumber,r.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}},mne=class extends W{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new di(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Zi(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}},XO=class extends W{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new G),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new G),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}});var vV,Xpt=D(()=>{tr();wg();gne();vV=class extends XO{constructor(e,t,n,r){super(t,n,r),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){let e=this.getLanguageId();(!this._tokenizationSupport||this._lastLanguageId!==e)&&(this._lastLanguageId=e,this._tokenizationSupport=K5.get(e))}getLineTokens(e){let t=this._textModel.getLineContent(e);if(this._tokenizationSupport){let n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new To(n,t,this._languageIdCodec)}return To.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){return this._treeSitterService.getParseResult(this._textModel)!==void 0}}});var bne,KLe=D(()=>{ht();bne=vt("treeSitterParserService")});function qy(i){return i instanceof Uint32Array?i:new Uint32Array(i)}var Gy,Yy,Zpt=D(()=>{wg();Gy=new Uint32Array(0).buffer,Yy=class i{static deleteBeginning(e,t){return e===null||e===Gy?e:i.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===Gy)return e;let n=qy(e),r=n[n.length-2];return i.delete(e,t,r)}static delete(e,t,n){if(e===null||e===Gy||t===n)return e;let r=qy(e),o=r.length>>>1;if(t===0&&r[r.length-2]===n)return Gy;let s=To.findIndexInTokensArray(r,t),a=s>0?r[s-1<<1]:0,l=r[s<<1];if(nu&&(r[c++]=p,r[c++]=r[(f<<1)+1],u=p)}if(c===r.length)return e;let h=new Uint32Array(c);return h.set(r.subarray(0,c),0),h.buffer}static append(e,t){if(t===Gy)return e;if(e===Gy)return t;if(e===null)return e;if(t===null)return null;let n=qy(e),r=qy(t),o=r.length>>>1,s=new Uint32Array(n.length+r.length);s.set(n,0);let a=n.length,l=n[n.length-2];for(let c=0;c>>1,s=To.findIndexInTokensArray(r,t);s>0&&r[s-1<<1]===t&&s--;for(let a=s;a>>0}var AV,emt=D(()=>{Qt();Nt();Zpt();wg();BI();AV=class i{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,n){let r=null;if(t1&&(o=Is.getLanguageId(r[1])!==e),!o)return Gy}if(!r||r.length===0){let o=new Uint32Array(2);return o[0]=t,o[1]=$pt(e),o.buffer}return r[r.length-2]=t,r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r.buffer:r}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let n=[];for(let r=0;r=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Yy.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Yy.deleteEnding(this._lineTokens[t],e.startColumn-1);let n=e.endLineNumber-1,r=null;n=this._len)){if(t===0){this._lineTokens[r]=Yy.insert(this._lineTokens[r],e.column-1,n);return}this._lineTokens[r]=Yy.deleteEnding(this._lineTokens[r],e.column-1),this._lineTokens[r]=Yy.insert(this._lineTokens[r],e.column-1,n),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};let n=[];for(let r=0,o=e.length;r{Qt();wg();vne=class i{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){let o=t[0].getRange(),s=t[t.length-1].getRange();if(!o||!s)return e;n=e.plusRange(o).plusRange(s)}let r=null;for(let o=0,s=this._pieces.length;on.endLineNumber){r=r||{index:o};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(o,1),o--,s--;continue}if(a.endLineNumbern.endLineNumber){r=r||{index:o};continue}let[l,c]=a.split(n);if(l.isEmpty()){r=r||{index:o};continue}c.isEmpty()||(this._pieces.splice(o,1,l,c),o++,s++,r=r||{index:o})}return r=r||{index:this._pieces.length},t.length>0&&(this._pieces=DS(this._pieces,r.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;let n=this._pieces;if(n.length===0)return t;let r=i._findFirstPieceWithLine(n,e),o=n[r].getLineTokens(e);if(!o)return t;let s=t.getCount(),a=o.getCount(),l=0,c=[],u=0,d=0,h=(f,p)=>{f!==d&&(d=f,c[u++]=f,c[u++]=p)};for(let f=0;f>>0,w=~A>>>0;for(;lt)r=o-1;else{for(;o>n&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}}return n}acceptEdit(e,t,n,r,o){for(let s of this._pieces)s.acceptEdit(e,t,n,r,o)}}});var _0i,JLe,Ane,yne,wne,imt=D(()=>{Lt();et();ae();zI();md();Nt();uI();tr();Sl();ks();TLe();Jpt();gne();Xpt();KLe();jLe();emt();tmt();_0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},JLe=function(i,e){return function(t,n){e(t,n,i)}},yne=Ane=class extends QO{constructor(e,t,n,r,o,s,a){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=r,this._languageService=o,this._languageConfigurationService=s,this._treeSitterService=a,this._semanticTokens=new vne(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new G),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new G),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new G),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new te),this._register(this._languageConfigurationService.onDidChange(l=>{l.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(Se.filter(K5.onDidChange,l=>l.changedLanguages.includes(this._languageId))(()=>{this.createPreferredTokenProvider()})),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new wne(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews))}createTreeSitterTokens(){return this._register(new vV(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,()=>this._languageId))}createTokens(e){let t=this._tokens!==void 0;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens(n=>{this._emitModelTokensChangedEvent(n)})),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState(n=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){K5.get(this._languageId)?this._tokens instanceof vV||this.createTokens(!0):this._tokens instanceof wne||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(let t of e.changes){let[n,r,o]=Jp(t.text);this._semanticTokens.acceptEdit(t.range,n,r,o,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);let t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new vi("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),r=this.getLineTokens(t.lineNumber),o=r.findTokenIndexAtOffset(t.column-1),[s,a]=Ane._findLanguageBoundaries(r,o),l=TS(t.column,this.getLanguageConfiguration(r.getLanguageId(o)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(o>0&&s===t.column-1){let[c,u]=Ane._findLanguageBoundaries(r,o-1),d=TS(t.column,this.getLanguageConfiguration(r.getLanguageId(o-1)).getWordDefinition(),n.substring(c,u),c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){let n=e.getLanguageId(t),r=0;for(let s=t;s>=0&&e.getLanguageId(s)===n;s--)r=e.getStartOffset(s);let o=e.getLineContent().length;for(let s=t,a=e.getCount();s{let s=this.getLanguageId();o.changedLanguages.indexOf(s)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(r.onDidChangeVisibleRanges(({view:o,state:s})=>{if(s){let a=this._attachedViewStates.get(o);a||(a=new mne(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(o,a)),a.handleStateChange(s)}else this._attachedViewStates.deleteAndDispose(o)}))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new JO(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});let t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];let o=Wn.get(this.getLanguageId());if(!o)return[null,null];let s;try{s=o.getInitialState()}catch(a){return pt(a),[null,null]}return[o,s]},[n,r]=t();if(n&&r?this._tokenizer=new hne(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){let o={setTokens:s=>{this.setTokens(s)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;let s=2;this._backgroundTokenizationState=s,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(s,a)=>{if(!this._tokenizer)return;let l=this._tokenizer.store.getFirstInvalidEndStateLineNumber();l!==null&&s>=l&&this._tokenizer?.store.setEndState(s,a)}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,o)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new fne(this._tokenizer,o),this._defaultBackgroundTokenizer.handleChanges()),n?.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new AV(this._languageIdCodec),this._debugBackgroundStates=new JO(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:s=>{this._debugBackgroundTokens?.setMultilineTokens(s,this._textModel)},backgroundTokenizationFinished(){},setEndState:(s,a)=>{this._debugBackgroundStates?.setEndState(s,a)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(let t of e.changes){let[n,r]=Jp(t.text);this._tokens.acceptEdit(t.range,n,r),this._debugBackgroundTokens?.acceptEdit(t.range,n,r)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){let{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){let e=Yt.joinMany([...this._attachedViewStates].map(([t,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(let t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);let n=new dL,{heuristicTokens:r}=this._tokenizer.tokenizeHeuristically(n,e,t),o=this.setTokens(n.finalize());if(r)for(let s of o.changes)this._backgroundTokenizer.value?.requestTokens(s.fromLineNumber,s.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){let t=new dL;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}getLineTokens(e){let t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){let r=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(r)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;let r=this._textModel.validatePosition(new K(e,t));return this.forceTokenization(r.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(r,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;let r=this._textModel.validatePosition(e);return this.forceTokenization(r.lineNumber),this._tokenizer.tokenizeLineWithEdit(r,t,n)}get hasTokens(){return this._tokens.hasTokens}}});var xne,tp,yV,Cne,_ne,Sne,hL,ZO,wE,xE=D(()=>{xne=class{constructor(){this.changeType=1}},tp=class i{static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",r=0;for(let o of t)n+=e.substring(r,o.column-1),r=o.column-1,n+=o.options.content;return n+=e.substring(r),n}static fromDecorations(e){let t=[];for(let n of e)n.options.before&&n.options.before.content.length>0&&t.push(new i(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new i(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,r)=>n.lineNumber===r.lineNumber?n.column===r.column?n.order-r.order:n.column-r.column:n.lineNumber-r.lineNumber),t}constructor(e,t,n,r,o){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=r,this.order=o}},yV=class{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}},Cne=class{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}},_ne=class{constructor(e,t,n,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}},Sne=class{constructor(){this.changeType=5}},hL=class i{constructor(e,t,n,r){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=r,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t{Qt();Ho();Lt();et();ae();Pt();mn();zI();Wie();Nt();We();Hn();y7();Sl();ks();tl();Ipt();Lpt();DLe();kLe();Mpt();Upt();WLe();qpt();U7();imt();gne();xE();ht();Tee();E0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ene=function(i,e){return function(t,n){e(t,n,i)}};Dne=0,k0i=999,I0i=1e4,ZLe=class{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;do{let r=this._source.read();if(r===null)return this._eos=!0,t===0?null:e.join("");if(r.length>0&&(e[t++]=r,n+=r.length),n>=64*1024)return e.join("")}while(!0)}},wV=()=>{throw new Error("Invalid change accessor")},ip=class extends W{static{fL=this}static{this._MODEL_SYNC_LIMIT=50*1024*1024}static{this.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:xl.tabSize,indentSize:xl.indentSize,insertSpaces:xl.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:xl.trimAutoWhitespace,largeFileOptimizations:xl.largeFileOptimizations,bracketPairColorizationOptions:xl.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){let n=LLe(e,t.tabSize,t.insertSpaces);return new WS({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new WS(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return hc(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,r=null,o,s,a,l){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=a,this.instantiationService=l,this._onWillDispose=this._register(new G),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new iNe(p=>this.handleBeforeFireDecorationsChangedEvent(p))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new G),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new G),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new G),this._eventEmitter=this._register(new nNe),this._languageSelectionListener=this._register(new On),this._deltaDecorationCallCnt=0,this._attachedViews=new pne,Dne++,this.id="$model"+Dne,this.isForSimpleWidget=n.isForSimpleWidget,typeof r>"u"||r===null?this._associatedResource=Xe.parse("inmemory://model/"+Dne):this._associatedResource=r,this._attachedEditorCount=0;let{textBuffer:c,disposable:u}=nmt(e,n.defaultEOL);this._buffer=c,this._bufferDisposable=u,this._options=fL.resolveOptions(this._buffer,n);let d=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new $ie(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new ane(this,this._languageConfigurationService)),this._decorationProvider=this._register(new ene(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(yne,this,this._bracketPairs,d,this._attachedViews);let h=this._buffer.getLineCount(),f=this._buffer.getValueLengthInRange(new N(1,1,h,this._buffer.getLineLength(h)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=f>fL.LARGE_FILE_SIZE_THRESHOLD||h>fL.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=f>fL.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=f>fL._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=rZ(Dne),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new kne,this._commandManager=new rne(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(d),this._register(this._languageConfigurationService.onDidChange(p=>{this._bracketPairs.handleLanguageConfigurationServiceChange(p),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(p)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new KO([],"",` -`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=W.None}_assertNotDisposed(){if(this._isDisposed)throw new vi("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new wE(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw dc();let{textBuffer:t,disposable:n}=nmt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,r,o,s,a,l){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:r}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();let n=this.getFullModelRange(),r=this.getValueLengthInRange(n),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new kne,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new hL([new xne],this._versionId,!1,!1),this._createContentChanged2(new N(1,1,o,s),0,r,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();let t=e===1?`\r +`&&(this._cr>0||this._crlf>0)))for(let r=0,s=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=$ht(this._tmpLineStarts,e);this.chunks.push(new c1(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=_A(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=S$(e)))}finish(e=!0){return this._finish(),new hNe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=l1(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}});function bli(i,e){let t=[];for(let n=0;n{Wt();Noe=class{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(t===0){this.insert(e,n);return}else if(n===0){this.delete(e,t);return}let o=this._store.slice(0,e),r=this._store.slice(e+t),s=bli(n,this._default);this._store=o.concat(s,r)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;let n=[];for(let o=0;o{Moe=class{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}});var QL,fNe=D(()=>{ift();QL=class{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new Moe(e,[t]))}finalize(){return this._tokens}}});function KH(i,e,t,n,o,r){let s=null;if(t)try{s=t.tokenizeEncoded(n,o,r.clone())}catch(a){ft(a)}return s||(s=ME(i.encodeLanguageId(e),r)),Nr.convertToEndOffset(s.tokens,n.length),s}var pNe,Roe,WP,mNe,gNe,Foe,nft=D(()=>{Gt();Tt();wi();cd();vL();_d();ap();$O();tft();fNe();Fg();pNe=class{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new WP(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}},Roe=class extends pNe{constructor(e,t,n,o){super(e,t),this._textModel=n,this._languageIdCodec=o}updateTokensUntilLine(e,t){let n=this._textModel.getLanguageId();for(;;){let o=this.getFirstInvalidLine();if(!o||o.lineNumber>t)break;let r=this._textModel.getLineContent(o.lineNumber),s=KH(this._languageIdCodec,n,this.tokenizationSupport,r,!0,o.startState);e.add(o.lineNumber,s.tokens),this.store.setEndState(o.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){let n=this.getStartState(e.lineNumber);if(!n)return 0;let o=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),a=KH(this._languageIdCodec,o,this.tokenizationSupport,s,!0,n),l=new Nr(a.tokens,s,this._languageIdCodec);if(l.getCount()===0)return 0;let c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,n){let o=e.lineNumber,r=e.column,s=this.getStartState(o);if(!s)return null;let a=this._textModel.getLineContent(o),l=a.substring(0,r-1)+n+a.substring(r-1+t),c=this._textModel.getLanguageIdAtPosition(o,0),u=KH(this._languageIdCodec,c,this.tokenizationSupport,l,!0,s);return new Nr(u.tokens,l,this._languageIdCodec)}hasAccurateTokensForLine(e){let t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&a>=1;a--){let l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}},gNe=class{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){let t=this._ranges.findIndex(n=>n.contains(e));if(t!==-1){let n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Ci(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Ci(n.start,e):this._ranges.splice(t,1,new Ci(n.start,e),new Ci(e+1,n.endExclusive))}}addRange(e){Ci.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let o=n;for(;!(o>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}};Foe=class{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,VSe(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){let t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Qt(e,t))}}});var Ooe,bNe,Poe,UP,Boe=D(()=>{Wt();Gt();et();de();_d();Ooe=class{constructor(){this._onDidChangeVisibleRanges=new q,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){let e=new bNe(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}},bNe=class{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){let n=e.map(o=>new Qt(o.startLineNumber,o.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}},Poe=class extends H{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new si(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Zi(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}},UP=class extends H{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new q),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new q),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}});var JH,oft=D(()=>{ro();Fg();Boe();JH=class extends UP{constructor(e,t,n,o){super(t,n,o),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){let e=this.getLanguageId();(!this._tokenizationSupport||this._lastLanguageId!==e)&&(this._lastLanguageId=e,this._tokenizationSupport=z6.get(e))}getLineTokens(e){let t=this._textModel.getLineContent(e);if(this._tokenizationSupport){let n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new Nr(n,t,this._languageIdCodec)}return Nr.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){return this._treeSitterService.getParseResult(this._textModel)!==void 0}}});var zoe,ANe=D(()=>{ht();zoe=At("treeSitterParserService")});function d1(i){return i instanceof Uint32Array?i:new Uint32Array(i)}var u1,h1,rft=D(()=>{Fg();u1=new Uint32Array(0).buffer,h1=class i{static deleteBeginning(e,t){return e===null||e===u1?e:i.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===u1)return e;let n=d1(e),o=n[n.length-2];return i.delete(e,t,o)}static delete(e,t,n){if(e===null||e===u1||t===n)return e;let o=d1(e),r=o.length>>>1;if(t===0&&o[o.length-2]===n)return u1;let s=Nr.findIndexInTokensArray(o,t),a=s>0?o[s-1<<1]:0,l=o[s<<1];if(nu&&(o[c++]=p,o[c++]=o[(f<<1)+1],u=p)}if(c===o.length)return e;let h=new Uint32Array(c);return h.set(o.subarray(0,c),0),h.buffer}static append(e,t){if(t===u1)return e;if(e===u1)return t;if(e===null)return e;if(t===null)return null;let n=d1(e),o=d1(t),r=o.length>>>1,s=new Uint32Array(n.length+o.length);s.set(n,0);let a=n.length,l=n[n.length-2];for(let c=0;c>>1,s=Nr.findIndexInTokensArray(o,t);s>0&&o[s-1<<1]===t&&s--;for(let a=s;a>>0}var XH,aft=D(()=>{Wt();kt();rft();Fg();AL();XH=class i{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,n){let o=null;if(t1&&(r=Fs.getLanguageId(o[1])!==e),!r)return u1}if(!o||o.length===0){let r=new Uint32Array(2);return r[0]=t,r[1]=sft(e),r.buffer}return o[o.length-2]=t,o.byteOffset===0&&o.byteLength===o.buffer.byteLength?o.buffer:o}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let n=[];for(let o=0;o=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=h1.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=h1.deleteEnding(this._lineTokens[t],e.startColumn-1);let n=e.endLineNumber-1,o=null;n=this._len)){if(t===0){this._lineTokens[o]=h1.insert(this._lineTokens[o],e.column-1,n);return}this._lineTokens[o]=h1.deleteEnding(this._lineTokens[o],e.column-1),this._lineTokens[o]=h1.insert(this._lineTokens[o],e.column-1,n),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};let n=[];for(let o=0,r=e.length;o{Wt();Fg();Voe=class i{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){let r=t[0].getRange(),s=t[t.length-1].getRange();if(!r||!s)return e;n=e.plusRange(r).plusRange(s)}let o=null;for(let r=0,s=this._pieces.length;rn.endLineNumber){o=o||{index:r};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(r,1),r--,s--;continue}if(a.endLineNumbern.endLineNumber){o=o||{index:r};continue}let[l,c]=a.split(n);if(l.isEmpty()){o=o||{index:r};continue}c.isEmpty()||(this._pieces.splice(r,1,l,c),r++,s++,o=o||{index:r})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=XS(this._pieces,o.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;let n=this._pieces;if(n.length===0)return t;let o=i._findFirstPieceWithLine(n,e),r=n[o].getLineTokens(e);if(!r)return t;let s=t.getCount(),a=r.getCount(),l=0,c=[],u=0,d=0,h=(f,p)=>{f!==d&&(d=f,c[u++]=f,c[u++]=p)};for(let f=0;f>>0,w=~v>>>0;for(;lt)o=r-1;else{for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}}return n}acceptEdit(e,t,n,o,r){for(let s of this._pieces)s.acceptEdit(e,t,n,o,r)}}});var Ali,vNe,Hoe,Woe,Uoe,cft=D(()=>{Tt();et();de();vL();_d();kt();jI();ro();Il();Rs();XLe();nft();Boe();oft();ANe();fNe();aft();lft();Ali=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},vNe=function(i,e){return function(t,n){e(t,n,i)}},Woe=Hoe=class extends PP{constructor(e,t,n,o,r,s,a){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=o,this._languageService=r,this._languageConfigurationService=s,this._treeSitterService=a,this._semanticTokens=new Voe(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new q),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new q),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new q),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new se),this._register(this._languageConfigurationService.onDidChange(l=>{l.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(Ee.filter(z6.onDidChange,l=>l.changedLanguages.includes(this._languageId))(()=>{this.createPreferredTokenProvider()})),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new Uoe(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews))}createTreeSitterTokens(){return this._register(new JH(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,()=>this._languageId))}createTokens(e){let t=this._tokens!==void 0;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens(n=>{this._emitModelTokensChangedEvent(n)})),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState(n=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){z6.get(this._languageId)?this._tokens instanceof JH||this.createTokens(!0):this._tokens instanceof Uoe||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(let t of e.changes){let[n,o,r]=fm(t.text);this._semanticTokens.acceptEdit(t.range,n,o,r,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);let t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new fi("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),o=this.getLineTokens(t.lineNumber),r=o.findTokenIndexAtOffset(t.column-1),[s,a]=Hoe._findLanguageBoundaries(o,r),l=ZS(t.column,this.getLanguageConfiguration(o.getLanguageId(r)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&s===t.column-1){let[c,u]=Hoe._findLanguageBoundaries(o,r-1),d=ZS(t.column,this.getLanguageConfiguration(o.getLanguageId(r-1)).getWordDefinition(),n.substring(c,u),c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){let n=e.getLanguageId(t),o=0;for(let s=t;s>=0&&e.getLanguageId(s)===n;s--)o=e.getStartOffset(s);let r=e.getLineContent().length;for(let s=t,a=e.getCount();s{let s=this.getLanguageId();r.changedLanguages.indexOf(s)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(o.onDidChangeVisibleRanges(({view:r,state:s})=>{if(s){let a=this._attachedViewStates.get(r);a||(a=new Poe(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(r,a)),a.handleStateChange(s)}else this._attachedViewStates.deleteAndDispose(r)}))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new WP(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});let t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];let r=Gn.get(this.getLanguageId());if(!r)return[null,null];let s;try{s=r.getInitialState()}catch(a){return ft(a),[null,null]}return[r,s]},[n,o]=t();if(n&&o?this._tokenizer=new Roe(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){let r={setTokens:s=>{this.setTokens(s)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;let s=2;this._backgroundTokenizationState=s,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(s,a)=>{if(!this._tokenizer)return;let l=this._tokenizer.store.getFirstInvalidEndStateLineNumber();l!==null&&s>=l&&this._tokenizer?.store.setEndState(s,a)}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,r)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Foe(this._tokenizer,r),this._defaultBackgroundTokenizer.handleChanges()),n?.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new XH(this._languageIdCodec),this._debugBackgroundStates=new WP(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:s=>{this._debugBackgroundTokens?.setMultilineTokens(s,this._textModel)},backgroundTokenizationFinished(){},setEndState:(s,a)=>{this._debugBackgroundStates?.setEndState(s,a)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(let t of e.changes){let[n,o]=fm(t.text);this._tokens.acceptEdit(t.range,n,o),this._debugBackgroundTokens?.acceptEdit(t.range,n,o)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){let{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){let e=Qt.joinMany([...this._attachedViewStates].map(([t,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(let t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);let n=new QL,{heuristicTokens:o}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(o)for(let s of r.changes)this._backgroundTokenizer.value?.requestTokens(s.fromLineNumber,s.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){let t=new QL;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}getLineTokens(e){let t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){let o=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(o)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;let o=this._textModel.validatePosition(new J(e,t));return this.forceTokenization(o.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(o,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;let o=this._textModel.validatePosition(e);return this.forceTokenization(o.lineNumber),this._tokenizer.tokenizeLineWithEdit(o,t,n)}get hasTokens(){return this._tokens.hasTokens}}});var joe,fp,ZH,Qoe,Goe,qoe,GL,jP,QE,GE=D(()=>{joe=class{constructor(){this.changeType=1}},fp=class i{static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",o=0;for(let r of t)n+=e.substring(o,r.column-1),o=r.column-1,n+=r.options.content;return n+=e.substring(o),n}static fromDecorations(e){let t=[];for(let n of e)n.options.before&&n.options.before.content.length>0&&t.push(new i(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new i(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,o)=>n.lineNumber===o.lineNumber?n.column===o.column?n.order-o.order:n.column-o.column:n.lineNumber-o.lineNumber),t}constructor(e,t,n,o,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=o,this.order=r}},ZH=class{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}},Qoe=class{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}},Goe=class{constructor(e,t,n,o){this.changeType=4,this.injectedTexts=o,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}},qoe=class{constructor(){this.changeType=5}},GL=class i{constructor(e,t,n,o){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=o,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t{Wt();Wr();Tt();et();de();Rt();mn();vL();uoe();kt();Ue();Qn();Zz();Il();Rs();ol();Pht();Bht();JLe();ZLe();Vht();Jht();dNe();eft();wV();cft();Boe();GE();ht();Jte();yli=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Yoe=function(i,e){return function(t,n){e(t,n,i)}};Koe=0,Cli=999,_li=1e4,wNe=class{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;do{let o=this._source.read();if(o===null)return this._eos=!0,t===0?null:e.join("");if(o.length>0&&(e[t++]=o,n+=o.length),n>=64*1024)return e.join("")}while(!0)}},$H=()=>{throw new Error("Invalid change accessor")},pp=class extends H{static{qL=this}static{this._MODEL_SYNC_LIMIT=50*1024*1024}static{this.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Dl.tabSize,indentSize:Dl.indentSize,insertSpaces:Dl.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Dl.trimAutoWhitespace,largeFileOptimizations:Dl.largeFileOptimizations,bracketPairColorizationOptions:Dl.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){let n=eNe(e,t.tabSize,t.insertSpaces);return new hE({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new hE(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return gc(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,o=null,r,s,a,l){super(),this._undoRedoService=r,this._languageService=s,this._languageConfigurationService=a,this.instantiationService=l,this._onWillDispose=this._register(new q),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new SNe(p=>this.handleBeforeFireDecorationsChangedEvent(p))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new q),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new q),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new q),this._eventEmitter=this._register(new ENe),this._languageSelectionListener=this._register(new Vn),this._deltaDecorationCallCnt=0,this._attachedViews=new Ooe,Koe++,this.id="$model"+Koe,this.isForSimpleWidget=n.isForSimpleWidget,typeof o>"u"||o===null?this._associatedResource=Je.parse("inmemory://model/"+Koe):this._associatedResource=o,this._attachedEditorCount=0;let{textBuffer:c,disposable:u}=uft(e,n.defaultEOL);this._buffer=c,this._bufferDisposable=u,this._options=qL.resolveOptions(this._buffer,n);let d=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new woe(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new koe(this,this._languageConfigurationService)),this._decorationProvider=this._register(new xoe(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(Woe,this,this._bracketPairs,d,this._attachedViews);let h=this._buffer.getLineCount(),f=this._buffer.getValueLengthInRange(new R(1,1,h,this._buffer.getLineLength(h)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=f>qL.LARGE_FILE_SIZE_THRESHOLD||h>qL.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=f>qL.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=f>qL._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=E$(Koe),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Xoe,this._commandManager=new Eoe(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(d),this._register(this._languageConfigurationService.onDidChange(p=>{this._bracketPairs.handleLanguageConfigurationServiceChange(p),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(p)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new HP([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=H.None}_assertNotDisposed(){if(this._isDisposed)throw new fi("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new QE(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw mc();let{textBuffer:t,disposable:n}=uft(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,o,r,s,a,l){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:o}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();let n=this.getFullModelRange(),o=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Xoe,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new GL([new joe],this._versionId,!1,!1),this._createContentChanged2(new R(1,1,r,s),0,o,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();let t=e===1?`\r `:` -`;if(this._buffer.getEOL()===t)return;let n=this.getFullModelRange(),r=this.getValueLengthInRange(n),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new hL([new Sne],this._versionId,!1,!1),this._createContentChanged2(new N(1,1,o,s),0,r,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,r=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,n=this._buffer.getLineCount();for(let r=1;r<=n;r++){let o=this._buffer.getLineLength(r);o>=I0i?t+=o:e+=o}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,r=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,o=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new WS({tabSize:t,indentSize:n,insertSpaces:r,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let n=LLe(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),PO(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(kSe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new vi("Operation would exceed heap memory limits");let n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._buffer.getBOM()+r:r}createSnapshot(e=!1){return new ZLe(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let n=this.getFullModelRange(),r=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+r:r}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new vi("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new vi("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new vi("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` -`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new vi("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new vi("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new vi("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){let t=this._buffer.getLineCount(),n=e.startLineNumber,r=e.startColumn,o=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),s=Math.floor(typeof r=="number"&&!isNaN(r)?r:1);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{let d=this.getLineMaxColumn(o);s>=d&&(s=d)}let a=e.endLineNumber,l=e.endColumn,c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),u=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,u=1;else if(c>t)c=t,u=this.getLineMaxColumn(c);else if(u<=1)u=1;else{let d=this.getLineMaxColumn(c);u>=d&&(u=d)}return n===o&&r===s&&a===c&&l===u&&e instanceof N&&!(e instanceof qe)?e:new N(o,s,c,u)}_isValidPosition(e,t,n){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;let r=this._buffer.getLineCount();if(e>r)return!1;if(t===1)return!0;let o=this.getLineMaxColumn(e);if(t>o)return!1;if(n===1){let s=this._buffer.getLineCharCode(e,t-2);if(xo(s))return!1}return!0}_validatePosition(e,t,n){let r=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),o=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),s=this._buffer.getLineCount();if(r<1)return new K(1,1);if(r>s)return new K(s,this.getLineMaxColumn(s));if(o<=1)return new K(r,1);let a=this.getLineMaxColumn(r);if(o>=a)return new K(r,a);if(n===1){let l=this._buffer.getLineCharCode(r,o-2);if(xo(l))return new K(r,o-1)}return new K(r,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof K&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){let n=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,r,0)||!this._isValidPosition(o,s,0))return!1;if(t===1){let a=r>1?this._buffer.getLineCharCode(n,r-2):0,l=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,c=xo(a),u=xo(l);return!c&&!u}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof N&&!(e instanceof qe)&&this._isValidRange(e,1))return e;let n=this._validatePosition(e.startLineNumber,e.startColumn,0),r=this._validatePosition(e.endLineNumber,e.endColumn,0),o=n.lineNumber,s=n.column,a=r.lineNumber,l=r.column;{let c=s>1?this._buffer.getLineCharCode(o,s-2):0,u=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,d=xo(c),h=xo(u);return!d&&!h?new N(o,s,a,l):o===a&&s===l?new N(o,s-1,a,l-1):d&&h?new N(o,s-1,a,l+1):d?new N(o,s-1,a,l):new N(o,s,a,l+1)}return new N(o,s,a,l)}modifyPosition(e,t){this._assertNotDisposed();let n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();let e=this.getLineCount();return new N(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,r){return this._buffer.findMatchesLineByLine(e,t,n,r)}findMatches(e,t,n,r,o,s,a=k0i){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(d=>N.isIRange(d))&&(l=t.map(d=>this.validateRange(d)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((d,h)=>d.startLineNumber-h.startLineNumber||d.startColumn-h.startColumn);let c=[];c.push(l.reduce((d,h)=>N.areIntersecting(d,h)?d.plusRange(h):(c.push(d),h)));let u;if(!n&&e.indexOf(` -`)<0){let h=new fv(e,n,r,o).parseSearchRequest();if(!h)return[];u=f=>this.findMatchesLineByLine(f,h,s,a)}else u=d=>II.findMatches(this,new fv(e,n,r,o),d,s,a);return c.map(u).reduce((d,h)=>d.concat(h),[])}findNextMatch(e,t,n,r,o,s){this._assertNotDisposed();let a=this.validatePosition(t);if(!n&&e.indexOf(` -`)<0){let c=new fv(e,n,r,o).parseSearchRequest();if(!c)return null;let u=this.getLineCount(),d=new N(a.lineNumber,a.column,u,this.getLineMaxColumn(u)),h=this.findMatchesLineByLine(d,c,s,1);return II.findNextMatch(this,new fv(e,n,r,o),a,s),h.length>0||(d=new N(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(d,c,s,1),h.length>0)?h[0]:null}return II.findNextMatch(this,new fv(e,n,r,o),a,s)}findPreviousMatch(e,t,n,r,o,s){this._assertNotDisposed();let a=this.validatePosition(t);return II.findPreviousMatch(this,new fv(e,n,r,o),a,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` -`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof zF?e:new zF(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){let t=[];for(let n=0,r=e.length;n({range:this.validateRange(a.range),text:a.text})),s=!0;if(e)for(let a=0,l=e.length;ac.endLineNumber,g=c.startLineNumber>f.endLineNumber;if(!p&&!g){u=!0;break}}if(!u){s=!1;break}}if(s)for(let a=0,l=this._trimAutoWhitespaceLines.length;ap.endLineNumber)&&!(c===p.startLineNumber&&p.startColumn===u&&p.isEmpty()&&g&&g.length>0&&g.charAt(0)===` +`;if(this._buffer.getEOL()===t)return;let n=this.getFullModelRange(),o=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new GL([new qoe],this._versionId,!1,!1),this._createContentChanged2(new R(1,1,r,s),0,o,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,o=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,n=this._buffer.getLineCount();for(let o=1;o<=n;o++){let r=this._buffer.getLineLength(o);r>=_li?t+=r:e+=r}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,o=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,r=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new hE({tabSize:t,indentSize:n,insertSpaces:o,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let n=eNe(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),kP(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(ZSe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new fi("Operation would exceed heap memory limits");let n=this.getFullModelRange(),o=this.getValueInRange(n,e);return t?this._buffer.getBOM()+o:o}createSnapshot(e=!1){return new wNe(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let n=this.getFullModelRange(),o=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+o:o}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fi("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fi("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new fi("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fi("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fi("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fi("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){let t=this._buffer.getLineCount(),n=e.startLineNumber,o=e.startColumn,r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),s=Math.floor(typeof o=="number"&&!isNaN(o)?o:1);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{let d=this.getLineMaxColumn(r);s>=d&&(s=d)}let a=e.endLineNumber,l=e.endColumn,c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),u=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,u=1;else if(c>t)c=t,u=this.getLineMaxColumn(c);else if(u<=1)u=1;else{let d=this.getLineMaxColumn(c);u>=d&&(u=d)}return n===r&&o===s&&a===c&&l===u&&e instanceof R&&!(e instanceof qe)?e:new R(r,s,c,u)}_isValidPosition(e,t,n){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;let o=this._buffer.getLineCount();if(e>o)return!1;if(t===1)return!0;let r=this.getLineMaxColumn(e);if(t>r)return!1;if(n===1){let s=this._buffer.getLineCharCode(e,t-2);if(Er(s))return!1}return!0}_validatePosition(e,t,n){let o=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),r=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),s=this._buffer.getLineCount();if(o<1)return new J(1,1);if(o>s)return new J(s,this.getLineMaxColumn(s));if(r<=1)return new J(o,1);let a=this.getLineMaxColumn(o);if(r>=a)return new J(o,a);if(n===1){let l=this._buffer.getLineCharCode(o,r-2);if(Er(l))return new J(o,r-1)}return new J(o,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof J&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,o,0)||!this._isValidPosition(r,s,0))return!1;if(t===1){let a=o>1?this._buffer.getLineCharCode(n,o-2):0,l=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,c=Er(a),u=Er(l);return!c&&!u}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof R&&!(e instanceof qe)&&this._isValidRange(e,1))return e;let n=this._validatePosition(e.startLineNumber,e.startColumn,0),o=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,s=n.column,a=o.lineNumber,l=o.column;{let c=s>1?this._buffer.getLineCharCode(r,s-2):0,u=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,d=Er(c),h=Er(u);return!d&&!h?new R(r,s,a,l):r===a&&s===l?new R(r,s-1,a,l-1):d&&h?new R(r,s-1,a,l+1):d?new R(r,s-1,a,l):new R(r,s,a,l+1)}return new R(r,s,a,l)}modifyPosition(e,t){this._assertNotDisposed();let n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();let e=this.getLineCount();return new R(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,o){return this._buffer.findMatchesLineByLine(e,t,n,o)}findMatches(e,t,n,o,r,s,a=Cli){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(d=>R.isIRange(d))&&(l=t.map(d=>this.validateRange(d)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((d,h)=>d.startLineNumber-h.startLineNumber||d.startColumn-h.startColumn);let c=[];c.push(l.reduce((d,h)=>R.areIntersecting(d,h)?d.plusRange(h):(c.push(d),h)));let u;if(!n&&e.indexOf(` +`)<0){let h=new MA(e,n,o,r).parseSearchRequest();if(!h)return[];u=f=>this.findMatchesLineByLine(f,h,s,a)}else u=d=>uL.findMatches(this,new MA(e,n,o,r),d,s,a);return c.map(u).reduce((d,h)=>d.concat(h),[])}findNextMatch(e,t,n,o,r,s){this._assertNotDisposed();let a=this.validatePosition(t);if(!n&&e.indexOf(` +`)<0){let c=new MA(e,n,o,r).parseSearchRequest();if(!c)return null;let u=this.getLineCount(),d=new R(a.lineNumber,a.column,u,this.getLineMaxColumn(u)),h=this.findMatchesLineByLine(d,c,s,1);return uL.findNextMatch(this,new MA(e,n,o,r),a,s),h.length>0||(d=new R(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(d,c,s,1),h.length>0)?h[0]:null}return uL.findNextMatch(this,new MA(e,n,o,r),a,s)}findPreviousMatch(e,t,n,o,r,s){this._assertNotDisposed();let a=this.validatePosition(t);return uL.findPreviousMatch(this,new MA(e,n,o,r),a,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` +`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof LO?e:new LO(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){let t=[];for(let n=0,o=e.length;n({range:this.validateRange(a.range),text:a.text})),s=!0;if(e)for(let a=0,l=e.length;ac.endLineNumber,g=c.startLineNumber>f.endLineNumber;if(!p&&!g){u=!0;break}}if(!u){s=!1;break}}if(s)for(let a=0,l=this._trimAutoWhitespaceLines.length;ap.endLineNumber)&&!(c===p.startLineNumber&&p.startColumn===u&&p.isEmpty()&&g&&g.length>0&&g.charAt(0)===` `)&&!(c===p.startLineNumber&&p.startColumn===1&&p.isEmpty()&&g&&g.length>0&&g.charAt(g.length-1)===` -`)){d=!1;break}}if(d){let h=new N(c,1,c,u);t.push(new zF(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,r)}_applyUndo(e,t,n,r){let o=e.map(s=>{let a=this.getPositionAt(s.newPosition),l=this.getPositionAt(s.newEnd);return{range:new N(a.lineNumber,a.column,l.lineNumber,l.column),text:s.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,n,r)}_applyRedo(e,t,n,r){let o=e.map(s=>{let a=this.getPositionAt(s.oldPosition),l=this.getPositionAt(s.oldEnd);return{range:new N(a.lineNumber,a.column,l.lineNumber,l.column),text:s.newText}});this._applyUndoRedoEdits(o,t,!1,!0,n,r)}_applyUndoRedoEdits(e,t,n,r,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=r,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){let n=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,s.length!==0){for(let c=0,u=s.length;c=0;M--){let z=f+M,H=C+M;L.takeFromEndWhile(q=>q.lineNumber>H);let B=L.takeFromEndWhile(q=>q.lineNumber===H);a.push(new yV(z,this.getLineContent(H),B))}if(Ace.lineNumberce.lineNumber===ne)}a.push(new _ne(z+1,f+v,U,q))}l+=w}this._emitContentChangedEvent(new hL(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return r.reverseEdits===null?void 0:r.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;let n=Array.from(e).map(r=>new yV(r,this.getLineContent(r),this._getInjectedTextInLine(r)));this._onDidChangeInjectedText.fire(new ZO(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let n={addDecoration:(o,s)=>this._deltaDecorationsImpl(e,[],[{range:o,options:s}])[0],changeDecoration:(o,s)=>{this._changeDecorationImpl(o,s)},changeDecorationOptions:(o,s)=>{this._changeDecorationOptionsImpl(o,omt(s))},removeDecoration:o=>{this._deltaDecorationsImpl(e,[o],[])},deltaDecorations:(o,s)=>o.length===0&&s.length===0?[]:this._deltaDecorationsImpl(e,o,s)},r=null;try{r=t(n)}catch(o){pt(o)}return n.addDecoration=wV,n.changeDecoration=wV,n.changeDecorationOptions=wV,n.removeDecoration=wV,n.deltaDecorations=wV,r}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),pt(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){let r=e?this._decorations[e]:null;if(!r)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:rmt[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(r),delete this._decorations[r.id],null;let o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(r),r.reset(this.getVersionId(),s,a,o),r.setOptions(rmt[n]),this._decorationsTree.insert(r),r.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,r=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,r=!1,o=!1){let s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),u=new N(a,1,l,c),d=this._getDecorationsInRange(u,n,r,o);return v7(d,this._decorationProvider.getDecorationsInRange(u,n,r)),d}getDecorationsInRange(e,t=0,n=!1,r=!1,o=!1){let s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,o);return v7(a,this._decorationProvider.getDecorationsInRange(s,t,n,r)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){let t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),r=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return tp.fromDecorations(r).filter(o=>o.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,r){let o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,t,n,r)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){let n=this._decorations[e];if(!n)return;if(n.options.after){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}let r=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),s=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,s,r),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}_changeDecorationOptionsImpl(e,t){let n=this._decorations[e];if(!n)return;let r=!!(n.options.overviewRuler&&n.options.overviewRuler.color),o=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(n.options.before||t.before){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}let s=r!==o,a=N0i(t)!==Tne(n);s||a?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,r=!1){let o=this.getVersionId(),s=t.length,a=0,l=n.length,c=0;this._onDidChangeDecorations.beginDeferredEmit();try{let u=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return L0i(this.getLineContent(e))+1}};ip=fL=E0i([Ene(4,YF),Ene(5,rn),Ene(6,qi),Ene(7,Ne)],ip);kne=class{constructor(){this._decorationsTree0=new qO,this._decorationsTree1=new qO,this._injectedTextDecorationsTree=new qO}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(let n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,r,o,s){let a=e.getVersionId(),l=this._intervalSearch(t,n,r,o,a,s);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,t,n,r,o,s){let a=this._decorationsTree0.intervalSearch(e,t,n,r,o,s),l=this._decorationsTree1.intervalSearch(e,t,n,r,o,s),c=this._injectedTextDecorationsTree.intervalSearch(e,t,n,r,o,s);return a.concat(l).concat(c)}getInjectedTextInInterval(e,t,n,r){let o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,r,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){let n=e.getVersionId(),r=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,r).filter(o=>o.options.showIfCollapsed||!o.range.isEmpty())}getAll(e,t,n,r,o){let s=e.getVersionId(),a=this._search(t,n,r,s,o);return this._ensureNodesHaveRanges(e,a)}_search(e,t,n,r,o){if(n)return this._decorationsTree1.search(e,t,r,o);{let s=this._decorationsTree0.search(e,t,r,o),a=this._decorationsTree1.search(e,t,r,o),l=this._injectedTextDecorationsTree.search(e,t,r,o);return s.concat(a).concat(l)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),r=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(r)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){Tne(e)?this._injectedTextDecorationsTree.insert(e):XLe(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Tne(e)?this._injectedTextDecorationsTree.delete(e):XLe(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Tne(e)?this._injectedTextDecorationsTree.resolveNode(e,t):XLe(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,r){this._decorationsTree0.acceptReplace(e,t,n,r),this._decorationsTree1.acceptReplace(e,t,n,r),this._injectedTextDecorationsTree.acceptReplace(e,t,n,r)}};Ine=class{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}},$Le=class extends Ine{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Cc.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;let n=e?t.getColor(e.id):null;return n?n.toString():""}},eNe=class{constructor(e){this.position=e?.position??Hu.Center,this.persistLane=e?.persistLane}},tNe=class extends Ine{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?pe.fromHex(e):t.getColor(e.id)}},Jy=class i{static from(e){return e instanceof i?e:new i(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}},zt=class i{static register(e){return new i(e)}static createDynamic(e){return new i(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?Ky(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Ky(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new $Le(e.overviewRuler):null,this.minimap=e.minimap?new tNe(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new eNe(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Ky(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Ky(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?Ky(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?jot(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Ky(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Ky(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Ky(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Ky(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Ky(e.afterContentClassName):null,this.after=e.after?Jy.from(e.after):null,this.before=e.before?Jy.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}};zt.EMPTY=zt.register({description:"empty"});rmt=[zt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),zt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),zt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),zt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];iNe=class extends W{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new G),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}},nNe=class extends W{constructor(){super(),this._fastEmitter=this._register(new G),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new G),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}});function pL(i){return i.toString()}var M0i,Lne,$O,rNe,R0i,oNe,Nne,sNe,smt=D(()=>{et();ae();Si();vs();y7();Yf();ez();nr();Tee();gS();DLe();bl();Xd();ht();M0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Lne=function(i,e){return function(t,n){e(t,n,i)}};rNe=class{constructor(e,t,n){this.model=e,this._modelEventListeners=new te,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(r=>n(e,r)))}dispose(){this._modelEventListeners.dispose()}},R0i=vo||qt?1:2,oNe=class{constructor(e,t,n,r,o,s,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=r,this.heapSize=o,this.sha1=s,this.versionId=a,this.alternativeVersionId=l}},Nne=class extends W{static{$O=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024}constructor(e,t,n,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=r,this._onModelAdded=this._register(new G),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new G),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new G),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(o=>this._updateModelOptions(o))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=xl.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){let h=parseInt(e.editor.tabSize,10);isNaN(h)||(n=h),n<1&&(n=1)}let r="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){let h=parseInt(e.editor.indentSize,10);isNaN(h)||(r=Math.max(h,1))}let o=xl.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(o=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let s=R0i,a=e.eol;a===`\r +`)){d=!1;break}}if(d){let h=new R(c,1,c,u);t.push(new LO(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,o)}_applyUndo(e,t,n,o){let r=e.map(s=>{let a=this.getPositionAt(s.newPosition),l=this.getPositionAt(s.newEnd);return{range:new R(a.lineNumber,a.column,l.lineNumber,l.column),text:s.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,o)}_applyRedo(e,t,n,o){let r=e.map(s=>{let a=this.getPositionAt(s.oldPosition),l=this.getPositionAt(s.oldEnd);return{range:new R(a.lineNumber,a.column,l.lineNumber,l.column),text:s.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,o)}_applyUndoRedoEdits(e,t,n,o,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=o,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){let n=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,s.length!==0){for(let c=0,u=s.length;c=0;L--){let B=f+L,z=C+L;N.takeFromEndWhile(Z=>Z.lineNumber>z);let Q=N.takeFromEndWhile(Z=>Z.lineNumber===z);a.push(new ZH(B,this.getLineContent(z),Q))}if(vX.lineNumberX.lineNumber===ee)}a.push(new Goe(B+1,f+A,U,Z))}l+=w}this._emitContentChangedEvent(new GL(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return o.reverseEdits===null?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;let n=Array.from(e).map(o=>new ZH(o,this.getLineContent(o),this._getInjectedTextInLine(o)));this._onDidChangeInjectedText.fire(new jP(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let n={addDecoration:(r,s)=>this._deltaDecorationsImpl(e,[],[{range:r,options:s}])[0],changeDecoration:(r,s)=>{this._changeDecorationImpl(r,s)},changeDecorationOptions:(r,s)=>{this._changeDecorationOptionsImpl(r,hft(s))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,s)=>r.length===0&&s.length===0?[]:this._deltaDecorationsImpl(e,r,s)},o=null;try{o=t(n)}catch(r){ft(r)}return n.addDecoration=$H,n.changeDecoration=$H,n.changeDecorationOptions=$H,n.removeDecoration=$H,n.deltaDecorations=$H,o}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),ft(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){let o=e?this._decorations[e]:null;if(!o)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:dft[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(o),delete this._decorations[o.id],null;let r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(o),o.reset(this.getVersionId(),s,a,r),o.setOptions(dft[n]),this._decorationsTree.insert(o),o.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,o=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,o=!1,r=!1){let s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),u=new R(a,1,l,c),d=this._getDecorationsInRange(u,n,o,r);return Jz(d,this._decorationProvider.getDecorationsInRange(u,n,o)),d}getDecorationsInRange(e,t=0,n=!1,o=!1,r=!1){let s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return Jz(a,this._decorationProvider.getDecorationsInRange(s,t,n,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){let t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),o=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return fp.fromDecorations(o).filter(r=>r.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,o){let r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,o)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){let n=this._decorations[e];if(!n)return;if(n.options.after){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}let o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}_changeDecorationOptionsImpl(e,t){let n=this._decorations[e];if(!n)return;let o=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(n.options.before||t.before){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}let s=o!==r,a=Eli(t)!==Joe(n);s||a?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,o=!1){let r=this.getVersionId(),s=t.length,a=0,l=n.length,c=0;this._onDidChangeDecorations.beginDeferredEmit();try{let u=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Sli(this.getLineContent(e))+1}};pp=qL=yli([Yoe(4,VO),Yoe(5,on),Yoe(6,Gi),Yoe(7,Re)],pp);Xoe=class{constructor(){this._decorationsTree0=new zP,this._decorationsTree1=new zP,this._injectedTextDecorationsTree=new zP}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(let n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,o,r,s){let a=e.getVersionId(),l=this._intervalSearch(t,n,o,r,a,s);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,t,n,o,r,s){let a=this._decorationsTree0.intervalSearch(e,t,n,o,r,s),l=this._decorationsTree1.intervalSearch(e,t,n,o,r,s),c=this._injectedTextDecorationsTree.intervalSearch(e,t,n,o,r,s);return a.concat(l).concat(c)}getInjectedTextInInterval(e,t,n,o){let r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,o,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){let n=e.getVersionId(),o=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,o).filter(r=>r.options.showIfCollapsed||!r.range.isEmpty())}getAll(e,t,n,o,r){let s=e.getVersionId(),a=this._search(t,n,o,s,r);return this._ensureNodesHaveRanges(e,a)}_search(e,t,n,o,r){if(n)return this._decorationsTree1.search(e,t,o,r);{let s=this._decorationsTree0.search(e,t,o,r),a=this._decorationsTree1.search(e,t,o,r),l=this._injectedTextDecorationsTree.search(e,t,o,r);return s.concat(a).concat(l)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),o=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(o)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){Joe(e)?this._injectedTextDecorationsTree.insert(e):yNe(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Joe(e)?this._injectedTextDecorationsTree.delete(e):yNe(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Joe(e)?this._injectedTextDecorationsTree.resolveNode(e,t):yNe(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,o){this._decorationsTree0.acceptReplace(e,t,n,o),this._decorationsTree1.acceptReplace(e,t,n,o),this._injectedTextDecorationsTree.acceptReplace(e,t,n,o)}};Zoe=class{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}},xNe=class extends Zoe{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:kc.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;let n=e?t.getColor(e.id):null;return n?n.toString():""}},CNe=class{constructor(e){this.position=e?.position??qu.Center,this.persistLane=e?.persistLane}},_Ne=class extends Zoe{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?me.fromHex(e):t.getColor(e.id)}},p1=class i{static from(e){return e instanceof i?e:new i(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}},Ot=class i{static register(e){return new i(e)}static createDynamic(e){return new i(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?f1(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?f1(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new xNe(e.overviewRuler):null,this.minimap=e.minimap?new _Ne(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new CNe(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?f1(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?f1(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?f1(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?Xnt(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?f1(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?f1(e.marginClassName):null,this.inlineClassName=e.inlineClassName?f1(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?f1(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?f1(e.afterContentClassName):null,this.after=e.after?p1.from(e.after):null,this.before=e.before?p1.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}};Ot.EMPTY=Ot.register({description:"empty"});dft=[Ot.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ot.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ot.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ot.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];SNe=class extends H{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new q),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}},ENe=class extends H{constructor(){super(),this._fastEmitter=this._register(new q),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new q),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}});function YL(i){return i.toString()}var Dli,$oe,QP,DNe,Tli,TNe,ere,kNe,fft=D(()=>{et();de();wi();bs();Zz();sp();NV();ao();Jte();VS();JLe();xl();rh();ht();Dli=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},$oe=function(i,e){return function(t,n){e(t,n,i)}};DNe=class{constructor(e,t,n){this.model=e,this._modelEventListeners=new se,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(o=>n(e,o)))}dispose(){this._modelEventListeners.dispose()}},Tli=Cr||jt?1:2,TNe=class{constructor(e,t,n,o,r,s,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=o,this.heapSize=r,this.sha1=s,this.versionId=a,this.alternativeVersionId=l}},ere=class extends H{static{QP=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024}constructor(e,t,n,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=o,this._onModelAdded=this._register(new q),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new q),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new q),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(r=>this._updateModelOptions(r))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=Dl.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){let h=parseInt(e.editor.tabSize,10);isNaN(h)||(n=h),n<1&&(n=1)}let o="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){let h=parseInt(e.editor.indentSize,10);isNaN(h)||(o=Math.max(h,1))}let r=Dl.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(r=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let s=Tli,a=e.eol;a===`\r `?s=2:a===` -`&&(s=1);let l=xl.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=xl.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let u=xl.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let d=xl.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(d={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:r,insertSpaces:o,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:l,largeFileOptimizations:u,bracketPairColorizationOptions:d}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);let n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&typeof n=="string"&&n!=="auto"?n:Qa===3||Qa===2?` +`&&(s=1);let l=Dl.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=Dl.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let u=Dl.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let d=Dl.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(d={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:r,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:l,largeFileOptimizations:u,bracketPairColorizationOptions:d}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);let n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&typeof n=="string"&&n!=="auto"?n:Ja===3||Ja===2?` `:`\r -`}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){let r=typeof e=="string"?e:e.languageId,o=this._modelCreationOptionsByLanguageAndResource[r+t];if(!o){let s=this._configurationService.getValue("editor",{overrideIdentifier:r,resource:t}),a=this._getEOL(t,r);o=$O._readModelOptions({editor:s,eol:a},n),this._modelCreationOptionsByLanguageAndResource[r+t]=o}return o}_updateModelOptions(e){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let n=Object.keys(this._models);for(let r=0,o=n.length;re){let t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,r)=>n.time-r.time);t.length>0&&this._disposedModelsHeapSize>e;){let n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,r){let o=this.getCreationOptions(t,n,r),s=this._instantiationService.createInstance(ip,e,t,o,n);if(n&&this._disposedModels.has(pL(n))){let c=this._removeDisposedModel(n),u=this._undoRedoService.getElements(n),d=this._getSHA1Computer(),h=d.canComputeSHA1(s)?d.computeSHA1(s)===c.sha1:!1;if(h||c.sharesUndoRedoStack){for(let f of u.past)Wy(f)&&f.matchesResource(n)&&f.setModel(s);for(let f of u.future)Wy(f)&&f.matchesResource(n)&&f.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,f=>Wy(f)&&f.matchesResource(n)),h&&(s._overwriteVersionId(c.versionId),s._overwriteAlternativeVersionId(c.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}let a=pL(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");let l=new rNe(s,c=>this._onWillDispose(c),(c,u)=>this._onDidChangeLanguage(c,u));return this._models[a]=l,l}createModel(e,t,n,r=!1){let o;return t?o=this._createModelData(e,t,n,r):o=this._createModelData(e,ps,n,r),this._onModelAdded.fire(o.model),o.model}getModels(){let e=[],t=Object.keys(this._models);for(let n=0,r=t.length;n0||c.future.length>0){for(let u of c.past)Wy(u)&&u.matchesResource(e.uri)&&(o=!0,s+=u.heapSize(e.uri),u.setModel(e.uri));for(let u of c.future)Wy(u)&&u.matchesResource(e.uri)&&(o=!0,s+=u.heapSize(e.uri),u.setModel(e.uri))}}let a=$O.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(o)if(!r&&(s>a||!l.canComputeSHA1(e))){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>Wy(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new oNe(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),r,s,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!r){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){let n=t.oldLanguage,r=e.getLanguageId(),o=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(r,e.uri,e.isForSimpleWidget);$O._setModelOptionsForModel(e,s,o),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new sNe}};Nne=$O=M0i([Lne(0,kt),Lne(1,yee),Lne(2,YF),Lne(3,Ne)],Nne);sNe=class i{static{this.MAX_MODEL_SIZE=10*1024*1024}canComputeSHA1(e){return e.getValueLength()<=i.MAX_MODEL_SIZE}computeSHA1(e){let t=new aZ,n=e.createSnapshot(),r;for(;r=n.read();)t.update(r);return t.digest()}}});var amt=D(()=>{});var Mne,Tg,aNe,mL=D(()=>{Qt();ae();sa();(function(i){i[i.PRESERVE=0]="PRESERVE",i[i.LAST=1]="LAST"})(Mne||(Mne={}));Tg={Quickaccess:"workbench.contributions.quickaccess"},aNe=class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,n)=>n.prefix.length-t.prefix.length),Ve(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return yl([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}};Gi.add(Tg.Quickaccess,new aNe)});var lmt,CE,om,kr,xV,lNe,Vgn,Na,rf=D(()=>{ht();lmt={ctrlCmd:!1,alt:!1};(function(i){i[i.Blur=1]="Blur",i[i.Gesture=2]="Gesture",i[i.Other=3]="Other"})(CE||(CE={}));(function(i){i[i.NONE=0]="NONE",i[i.FIRST=1]="FIRST",i[i.SECOND=2]="SECOND",i[i.LAST=3]="LAST"})(om||(om={}));(function(i){i[i.First=1]="First",i[i.Second=2]="Second",i[i.Last=3]="Last",i[i.Next=4]="Next",i[i.Previous=5]="Previous",i[i.NextPage=6]="NextPage",i[i.PreviousPage=7]="PreviousPage",i[i.NextSeparator=8]="NextSeparator",i[i.PreviousSeparator=9]="PreviousSeparator"})(kr||(kr={}));(function(i){i[i.Title=1]="Title",i[i.Inline=2]="Inline"})(xV||(xV={}));lNe=class{constructor(e){this.options=e}},Vgn=new lNe,Na=vt("quickInputService")});var F0i,cmt,Rne,umt=D(()=>{Jt();sn();et();ae();ht();mL();rf();sa();F0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},cmt=function(i,e){return function(t,n){e(t,n,i)}},Rne=class extends W{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Gi.as(Tg.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){let[r,o]=this.getOrInstantiateProvider(e,n?.enabledProviderPrefixes),s=this.visibleQuickAccess,a=s?.descriptor;if(s&&o&&a===o){e!==o.prefix&&!n?.preserveValue&&(s.picker.value=e),this.adjustValueSelection(s.picker,o,n);return}if(o&&!n?.preserveValue){let p;if(s&&a&&a!==o){let g=s.value.substr(a.prefix.length);g&&(p=`${o.prefix}${g}`)}if(!p){let g=r?.defaultFilterValue;g===Mne.LAST?p=this.lastAcceptedPickerValues.get(o):typeof g=="string"&&(p=`${o.prefix}${g}`)}typeof p=="string"&&(e=p)}let l=s?.picker?.valueSelection,c=s?.picker?.value,u=new te,d=u.add(this.quickInputService.createQuickPick({useSeparators:!0}));d.value=e,this.adjustValueSelection(d,o,n),d.placeholder=n?.placeholder??o?.placeholder,d.quickNavigate=n?.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!s,(typeof n?.itemActivation=="number"||n?.quickNavigateConfiguration)&&(d.itemActivation=n?.itemActivation??om.SECOND),d.contextKey=o?.contextKey,d.filterValue=p=>p.substring(o?o.prefix.length:0);let h;t&&(h=new Pp,u.add(Se.once(d.onWillAccept)(p=>{p.veto(),d.hide()}))),u.add(this.registerPickerListeners(d,r,o,e,n));let f=u.add(new Bi);if(r&&u.add(r.provide(d,f.token,n?.providerOptions)),Se.once(d.onDidHide)(()=>{d.selectedItems.length===0&&f.cancel(),u.dispose(),h?.complete(d.selectedItems.slice(0))}),d.show(),l&&c===e&&(d.valueSelection=l),t)return h?.p}adjustValueSelection(e,t,n){let r;n?.preserveValue?r=[e.value.length,e.value.length]:r=[t?.prefix.length??0,e.value.length],e.valueSelection=r}registerPickerListeners(e,t,n,r,o){let s=new te,a=this.visibleQuickAccess={picker:e,descriptor:n,value:r};return s.add(Ve(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(l=>{let[c]=this.getOrInstantiateProvider(l,o?.enabledProviderPrefixes);c!==t?this.show(l,{enabledProviderPrefixes:o?.enabledProviderPrefixes,preserveValue:!0,providerOptions:o?.providerOptions}):a.value=l})),n&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),s}getOrInstantiateProvider(e,t){let n=this.registry.getQuickAccessProvider(e);if(!n||t&&!t?.includes(n.prefix))return[void 0,void 0];let r=this.mapProviderToDescriptor.get(n);return r||(r=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,r)),[r,n]}};Rne=F0i([cmt(0,Na),cmt(1,Ne)],Rne)});var dmt=D(()=>{});var kg,eP=D(()=>{bg();Dr();et();dmt();Zl();_g();kg=class extends Ls{constructor(e){super(),this._onChange=this._register(new G),this.onChange=this._onChange.event,this._onKeyDown=this._register(new G),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ut.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register($l().setupManagedHover(e.hoverDelegate??ko("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}});var Fne=D(()=>{});function hmt(i){let e=[],t=0,n;for(;n=P0i.exec(i);){n.index-t>0&&e.push(i.substring(t,n.index));let[,r,o,,s]=n;s?e.push({label:r,href:o,title:s}):e.push({label:r,href:o}),t=n.index+n[0].length}return t{ZS();O0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},One=class{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}};O0i([ro],One.prototype,"toString",null);P0i=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi});function z0i(i){if(!i)return;let e,t=i.dark.toString();return cNe[t]?e=cNe[t]:(e=B0i.nextId(),tF(`.${e}, .hc-light .${e}`,`background-image: ${zp(i.light||i.dark)}`),tF(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${zp(i.dark)}`),cNe[t]=e),e}function gL(i,e,t){let n=i.iconClass||z0i(i.iconPath);return i.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:e,label:"",tooltip:i.tooltip||"",class:n,enabled:!0,run:t}}function pmt(i,e,t){So(e);let n=hmt(i),r=0;for(let o of n.nodes)if(typeof o=="string")e.append(...Xp(o));else{let s=o.title;!s&&o.href.startsWith("command:")?s=y("executeCommand","Click to execute command '{0}'",o.href.substring(8)):s||(s=o.href);let a=we("a",{href:o.href,title:s,tabIndex:r++},o.label);a.style.textDecoration="underline";let l=f=>{hst(f)&&Ai.stop(f,!0),t.callback(o.href)},c=t.disposables.add(new wi(a,De.CLICK)).event,u=t.disposables.add(new wi(a,De.KEY_DOWN)).event,d=Se.chain(u,f=>f.filter(p=>{let g=new Wi(p);return g.equals(10)||g.equals(3)}));t.disposables.add(Do.addTarget(a));let h=t.disposables.add(new wi(a,En.Tap)).event;Se.any(c,h,d)(l,null,t.disposables),e.appendChild(a)}}var cNe,B0i,uNe=D(()=>{Ye();jb();et();gc();Xf();mx();Az();fmt();Fne();Oe();cNe={},B0i=new QI("quick-input-button-icon-")});var V0i,mmt,gmt,bmt,vmt,dNe,Amt,ymt,wmt,xmt,Pne,Bne,CV,zne,Vne,Hne=D(()=>{Ye();gc();eP();Qt();Jt();er();et();ae();Si();fx();Dr();Fne();Oe();rf();uNe();nr();px();Wt();V0i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mmt=function(i,e){return function(t,n){e(t,n,i)}},gmt="inQuickInput",bmt=new Pe(gmt,!1,y("inQuickInput","Whether keyboard focus is inside the quick input control")),vmt=me.has(gmt),dNe="quickInputType",Amt=new Pe(dNe,void 0,y("quickInputType","The type of the currently visible quick input")),ymt="cursorAtEndOfQuickInputBox",wmt=new Pe(ymt,!1,y("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),xmt=me.has(ymt),Pne={iconClass:ut.asClassName(Ee.quickInputBack),tooltip:y("quickInput.back","Back"),handle:-1},Bne=class i extends W{static{this.noPromptMessage=y("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=i.noPromptMessage,this._severity=qr.Ignore,this.onDidTriggerButtonEmitter=this._register(new G),this.onDidHideEmitter=this._register(new G),this.onWillHideEmitter=this._register(new G),this.onDisposeEmitter=this._register(new G),this.visibleDisposables=this._register(new te),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){let t=this._ignoreFocusOut!==e&&!Tu;this._ignoreFocusOut=e&&!Tu,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter(t=>t===Pne),this._rightButtons=e.filter(t=>t!==Pne&&t.location!==xV.Inline),this._inlineButtons=e.filter(t=>t.location===xV.Inline),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=CE.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=CE.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;let e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");let t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?So(this.ui.widget,this._widget):So(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new oa,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();let r=this._leftButtons.map((a,l)=>gL(a,`id-${l}`,async()=>this.onDidTriggerButtonEmitter.fire(a)));this.ui.leftActionBar.push(r,{icon:!0,label:!1}),this.ui.rightActionBar.clear();let o=this._rightButtons.map((a,l)=>gL(a,`id-${l}`,async()=>this.onDidTriggerButtonEmitter.fire(a)));this.ui.rightActionBar.push(o,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();let s=this._inlineButtons.map((a,l)=>gL(a,`id-${l}`,async()=>this.onDidTriggerButtonEmitter.fire(a)));this.ui.inlineActionBar.push(s,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;let r=this.toggles?.filter(o=>o instanceof kg)??[];this.ui.inputBox.toggles=r}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);let n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,So(this.ui.message),pmt(n,this.ui.message,{callback:r=>{this.ui.linkOpenerDelegate(r)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?y("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==qr.Ignore){let t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}},CV=class i extends Bne{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new G),this.onWillAcceptEmitter=this._register(new G),this.onDidAcceptEmitter=this._register(new G),this.onDidCustomEmitter=this._register(new G),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=om.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new G),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new G),this.onDidTriggerItemButtonEmitter=this._register(new G),this.onDidTriggerSeparatorButtonEmitter=this._register(new G),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new ab,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=y("quickInputBox.ariaLabel","Type to narrow down results.")}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?lmt:this.ui.keyMods}get valueSelection(){let e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(kr.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,t)=>t)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Zi(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Zi(e,this._selectedItems,(n,r)=>n===r)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(iF(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&Zi(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return re(this.ui.container,De.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;let t=new Wi(e),n=t.keyCode;this._quickNavigate.keybindings.some(s=>{let a=s.getChords();return a.length>1?!1:a[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&n===6||a[0].ctrlKey&&n===5||a[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let r=this.ariaLabel;!r&&n.inputBox&&(r=this.placeholder||i.DEFAULT_ARIA_LABEL,this.title&&(r+=` - ${this.title}`)),this.ui.list.ariaLabel!==r&&(this.ui.list.ariaLabel=r??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case om.NONE:this._itemActivation=om.FIRST;break;case om.SECOND:this.ui.list.focus(kr.Second),this._itemActivation=om.FIRST;break;case om.LAST:this.ui.list.focus(kr.Last),this._itemActivation=om.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(kr.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}},zne=class extends Bne{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new G),this.onDidAcceptEmitter=this._register(new G),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");let e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},Vne=class extends vy{constructor(e,t){super("element",!1,n=>this.getOverrideOptions(n),e,t)}getOverrideOptions(e){let t=(Er(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(` -`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};Vne=V0i([mmt(0,kt),mmt(1,nh)],Vne)});var Cmt=D(()=>{});var i0n,Mx,Wne=D(()=>{Ye();JX();gc();xz();Xf();Zl();mx();Ho();et();Ad();ae();Dr();Cmt();_g();i0n={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:pe.white.toString(),buttonForeground:pe.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0},Mx=class extends W{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new G),this._onDidEscape=this._register(new G),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);let n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,r=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=r||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.title=="string"&&this.setTitle(t.title),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(Do.addTarget(this._element)),[De.CLICK,En.Tap].forEach(o=>{this._register(re(this._element,o,s=>{if(!this.enabled){Ai.stop(s);return}this._onDidClick.fire(s)}))}),this._register(re(this._element,De.KEY_DOWN,o=>{let s=new Wi(o),a=!1;this.enabled&&(s.equals(3)||s.equals(10))?(this._onDidClick.fire(o),a=!0):s.equals(9)&&(this._onDidEscape.fire(o),this._element.blur(),a=!0),a&&Ai.stop(s,!0)})),this._register(re(this._element,De.MOUSE_OVER,o=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(re(this._element,De.MOUSE_OUT,o=>{this.updateBackground(!1)})),this.focusTracker=this._register(Yc(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let n of Xp(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;let r=document.createElement("span");r.textContent=n,t.push(r)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e||Xh(this._label)&&Xh(e)&&Odt(this._label,e))return;this._element.classList.add("monaco-text-button");let t=this.options.supportShortLabel?this._labelElement:this._element;if(Xh(e)){let r=aE(e,{inline:!0});r.dispose();let o=r.element.querySelector("p")?.innerHTML;if(o){let s=qX(o,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});t.innerHTML=s}else So(t)}else this.options.supportIcons?So(t,...this.getContentElements(e)):t.textContent=e;let n="";typeof this.options.title=="string"?n=this.options.title:this.options.title&&(n=jdt(e)),this.setTitle(n),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",n),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...ut.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){!this._hover&&e!==""?this._hover=this._register($l().setupManagedHover(this.options.hoverDelegate??ko("mouse"),this._element,e)):this._hover&&this._hover.update(e)}}});var _mt=D(()=>{});var bL,hNe=D(()=>{Ye();Pt();_mt();bL=class{constructor(e,t,n){this.options=t,this.styles=n,this.count=0,this.element=be(e,we(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=ig(this.countFormat,this.count),this.element.title=ig(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}});var Smt=D(()=>{});var Emt,Dmt,fNe,pNe,Tmt,Une,kmt=D(()=>{Ye();Jt();ae();Smt();Emt="done",Dmt="active",fNe="infinite",pNe="infinite-long-running",Tmt="discrete",Une=class i extends W{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new On),this.workedVal=0,this.showDelayedScheduler=this._register(new di(()=>Ul(this.element),0)),this.longRunningScheduler=this._register(new di(()=>this.infiniteLongRunning(),i.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Dmt,fNe,pNe,Tmt),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Emt),this.element.classList.contains(fNe)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Tmt,Emt,pNe),this.element.classList.add(Dmt,fNe),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(pNe)}getContainer(){return this.element}}});var H0i,W0i,U0i,tP,iP,nP,mNe=D(()=>{Zl();eP();er();Oe();H0i=y("caseDescription","Match Case"),W0i=y("wordsDescription","Match Whole Word"),U0i=y("regexDescription","Use Regular Expression"),tP=class extends kg{constructor(e){super({icon:Ee.caseSensitive,title:H0i+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??ko("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},iP=class extends kg{constructor(e){super({icon:Ee.wholeWord,title:W0i+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??ko("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},nP=class extends kg{constructor(e){super({icon:Ee.regex,title:U0i+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??ko("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}});var jne,Imt=D(()=>{jne=class{constructor(e,t=0,n=e.length,r=t-1){this.items=e,this.start=t,this.end=n,this.index=r}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}});var Qne,Lmt=D(()=>{Imt();Qne=class{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();let e=this._elements;this._navigator=new jne(e,0,e.length,e.length)}_reduceToLimit(){let e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){let e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(let t of e)this._history.add(t)}get _elements(){let e=[];return this._history.forEach(t=>e.push(t)),e}}});var Nmt=D(()=>{});var _V,gNe,rP,Gne=D(()=>{Ye();jb();gke();Dg();Yl();_g();Zl();Ag();bg();et();Lmt();Xd();Nmt();Oe();_V=we,gNe=class extends Ls{constructor(e,t,n){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new G),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=be(e,_V(".monaco-inputbox.idle"));let r=this.options.flexibleHeight?"textarea":"input",o=be(this.element,_V(".ibwrapper"));if(this.input=be(o,_V(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=be(o,_V("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new tO(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),be(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));let s=this._register(new wi(e.ownerDocument,"selectionchange")),a=Se.filter(s.event,()=>e.ownerDocument.getSelection()?.anchorNode===o);this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Ns(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register($l().setupManagedHover(ko("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:og(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return Jk(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){let e=this.input.selectionStart;if(e===null)return null;let t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;let e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&wl(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));let n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${sg(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){let t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t=()=>e.style.width=bc(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:r=>{if(!this.message)return null;e=be(r,_V(".monaco-inputbox-container")),t();let o={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?odt(this.message.content,o):rdt(this.message.content,o);s.classList.add(this.classForType(this.message.type));let a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background??"",s.style.color=a.foreground??"",s.style.border=a.border?`1px solid ${a.border}`:"",be(e,s),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=y("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=y("alertWarningMessage","Warning: {0}",this.message.content):n=y("alertInfoMessage","Info: {0}",this.message.content),gs(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;let e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText="\xA0",this.layout()}applyStyles(){let e=this.options.inputBoxStyles,t=e.inputBackground??"",n=e.inputForeground??"",r=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=n,this.input.style.backgroundColor="inherit",this.input.style.color=n,this.element.style.border=`1px solid ${sg(r,"transparent")}`}layout(){if(!this.mirror)return;let e=this.cachedContentHeight;this.cachedContentHeight=og(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){let t=this.inputElement,n=t.selectionStart,r=t.selectionEnd,o=t.value;n!==null&&r!==null&&(this.value=o.substr(0,n)+e+o.substr(r),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}},rP=class extends gNe{constructor(e,t,n){let r=y({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," or {0} for history","\u21C5"),o=y({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," ({0} for history)","\u21C5");super(e,t,n),this._onDidFocus=this._register(new G),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new G),this.onDidBlur=this._onDidBlur.event,this.history=new Qne(n.history,100);let s=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(r)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){let a=this.placeholder.endsWith(")")?r:o,l=this.placeholder+a;n.showPlaceholderOnFocus&&!Jk(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||s()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>s()),this.onblur(this.input,()=>{let a=l=>{if(this.placeholder.endsWith(l)){let c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(o)||a(r)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",yd(this.value?this.value:y("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,yd(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}});var bNe=D(()=>{});var j0i,vL,qne=D(()=>{Ye();mNe();Gne();bg();et();bNe();Oe();ae();Zl();j0i=y("defaultLabel","input"),vL=class extends Ls{constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new On),this.additionalToggles=[],this._onDidOptionChange=this._register(new G),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new G),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new G),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new G),this._onKeyUp=this._register(new G),this._onCaseSensitiveKeyDown=this._register(new G),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new G),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||j0i,this.showCommonFindToggles=!!n.showCommonFindToggles;let r=n.appendCaseSensitiveLabel||"",o=n.appendWholeWordsLabel||"",s=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rP(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles}));let d=this._register(Yb());if(this.showCommonFindToggles){this.regex=this._register(new nP({appendTitle:s,isChecked:!1,hoverDelegate:d,...n.toggleStyles})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new iP({appendTitle:o,isChecked:!1,hoverDelegate:d,...n.toggleStyles})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new tP({appendTitle:r,isChecked:!1,hoverDelegate:d,...n.toggleStyles})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)}));let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){let p=h.indexOf(this.domNode.ownerDocument.activeElement);if(p>=0){let g=-1;f.equals(17)?g=(p+1)%h.length:f.equals(15)&&(p===0?g=h.length-1:g=p-1),f.equals(9)?(h[p].blur(),this.inputBox.focus()):g>=0&&h[g].focus(),Ai.stop(f,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(re(this.inputBox.inputElement,"compositionstart",h=>{this.imeSessionInProgress=!0})),this._register(re(this.inputBox.inputElement,"compositionend",h=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(let e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(let e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(let t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new te;for(let t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce((t,n)=>t+n.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}});var Q0i,Yne,Mmt=D(()=>{Ye();qne();ae();fx();Fne();Q0i=we,Yne=class extends W{constructor(e,t,n){super(),this.parent=e,this.onKeyDown=o=>cn(this.findInput.inputBox.inputElement,De.KEY_DOWN,o),this.onDidChange=o=>this.findInput.onDidChange(o),this.container=be(this.parent,Q0i(".quick-input-box")),this.findInput=this._register(new vL(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));let r=this.findInput.inputBox.inputElement;r.role="combobox",r.ariaHasPopup="menu",r.ariaAutoComplete="list",r.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===qr.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===qr.Info?1:e===qr.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===qr.Info?1:e===qr.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}});function G0i(i,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new ANe(i,e.accessibilityProvider)}}var vNe,ANe,Kne,Rmt=D(()=>{Qt();sn();et();ae();xIe();_x();vNe=class{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:W.None}}renderElement(e,t,n,r){if(n.disposable?.dispose(),!n.data)return;let o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,n.data,r);let s=new Bi,a=o.resolve(e,s.token);n.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,n.data),a.then(l=>this.renderer.renderElement(l,e,n.data,r))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}},ANe=class{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){let t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}};Kne=class{constructor(e,t,n,r,o={}){let s=()=>this.model,a=r.map(l=>new vNe(l,s));this.list=new il(e,t,n,a,G0i(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Se.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return Se.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return Se.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(r=>this._model.get(r)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Xc(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}});var Fmt=D(()=>{});var sP,q0i,SV,Y0i,K0i,J0i,X0i,EV,DV,oP,Omt,of,aP=D(()=>{Ye();jb();Xf();Jt();ZS();et();ae();Si();Fmt();sP=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},q0i=!1;(function(i){i.North="north",i.South="south",i.East="east",i.West="west"})(SV||(SV={}));Y0i=4,K0i=new G,J0i=300,X0i=new G,EV=class{constructor(e){this.el=e,this.disposables=new te}get onPointerMove(){return this.disposables.add(new wi(rt(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new wi(rt(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}};sP([ro],EV.prototype,"onPointerMove",null);sP([ro],EV.prototype,"onPointerUp",null);DV=class{get onPointerMove(){return this.disposables.add(new wi(this.el,En.Change)).event}get onPointerUp(){return this.disposables.add(new wi(this.el,En.End)).event}constructor(e){this.el=e,this.disposables=new te}dispose(){this.disposables.dispose()}};sP([ro],DV.prototype,"onPointerMove",null);sP([ro],DV.prototype,"onPointerUp",null);oP=class{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}};sP([ro],oP.prototype,"onPointerMove",null);sP([ro],oP.prototype,"onPointerUp",null);Omt="pointer-events-disabled",of=class i extends W{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=be(this.el,we(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Ve(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new wi(this._orthogonalStartDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new wi(this._orthogonalStartDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=be(this.el,we(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Ve(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new wi(this._orthogonalEndDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new wi(this._orthogonalEndDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=J0i,this.hoverDelayer=this._register(new ra(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new G),this._onDidStart=this._register(new G),this._onDidChange=this._register(new G),this._onDidReset=this._register(new G),this._onDidEnd=this._register(new G),this.orthogonalStartSashDisposables=this._register(new te),this.orthogonalStartDragHandleDisposables=this._register(new te),this.orthogonalEndSashDisposables=this._register(new te),this.orthogonalEndDragHandleDisposables=this._register(new te),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=be(e,we(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),qt&&this.el.classList.add("mac");let r=this._register(new wi(this.el,"mousedown")).event;this._register(r(d=>this.onPointerStart(d,new EV(e)),this));let o=this._register(new wi(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));let s=this._register(new wi(this.el,"mouseenter")).event;this._register(s(()=>i.onMouseEnter(this)));let a=this._register(new wi(this.el,"mouseleave")).event;this._register(a(()=>i.onMouseLeave(this))),this._register(Do.addTarget(this.el));let l=this._register(new wi(this.el,En.Start)).event;this._register(l(d=>this.onPointerStart(d,new DV(this.el)),this));let c=this._register(new wi(this.el,En.Tap)).event,u;this._register(c(d=>{if(u){clearTimeout(u),u=void 0,this.onPointerDoublePress(d);return}clearTimeout(u),u=setTimeout(()=>u=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=Y0i,this._register(K0i.event(d=>{this.size=d,this.layout()}))),this._register(X0i.event(d=>this.hoverDelay=d)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",q0i),this.layout()}onPointerStart(e,t){Ai.stop(e);let n=!1;if(!e.__orthogonalSashEvent){let p=this.getOrthogonalSash(e);p&&(n=!0,e.__orthogonalSashEvent=!0,p.onPointerStart(e,new oP(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new oP(t))),!this.state)return;let r=this.el.ownerDocument.getElementsByTagName("iframe");for(let p of r)p.classList.add(Omt);let o=e.pageX,s=e.pageY,a=e.altKey,l={startX:o,currentX:o,startY:s,currentY:s,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);let c=Xa(this.el),u=()=>{let p="";n?p="all-scroll":this.orientation===1?this.state===1?p="s-resize":this.state===2?p="n-resize":p=qt?"row-resize":"ns-resize":this.state===1?p="e-resize":this.state===2?p="w-resize":p=qt?"col-resize":"ew-resize",c.textContent=`* { cursor: ${p} !important; }`},d=new te;u(),n||this.onDidEnablementChange.event(u,null,d);let h=p=>{Ai.stop(p,!1);let g={startX:o,currentX:p.pageX,startY:s,currentY:p.pageY,altKey:a};this._onDidChange.fire(g)},f=p=>{Ai.stop(p,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(let g of r)g.classList.remove(Omt)};t.onPointerMove(h,null,d),t.onPointerUp(f,null,d),d.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&i.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&i.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){i.onMouseLeave(this)}layout(){if(this.orientation===0){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){let t=e.initialTarget??e.target;if(!(!t||!Er(t))&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}});var Pmt=D(()=>{});var Z0i,Jne,yNe,wNe,Rx,TV,lP,xNe=D(()=>{Ye();jb();aP();Ag();Qt();Ho();et();ae();PI();eO();gn();Pmt();Z0i={separatorBorder:pe.transparent},Jne=class{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){if(e!==this.visible){e?(this.size=El(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{this.view.setVisible?.(e)}catch(n){console.error("Splitview: Failed to set visible view"),console.error(n)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,r){this.container=e,this.view=t,this.disposable=r,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}},yNe=class extends Jne{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}},wNe=class extends Jne{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}};(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(Rx||(Rx={}));(function(i){i.Distribute={type:"distribute"};function e(r){return{type:"split",index:r}}i.Split=e;function t(r){return{type:"auto",index:r}}i.Auto=t;function n(r){return{type:"invisible",cachedVisibleSize:r}}i.Invisible=n})(TV||(TV={}));lP=class extends W{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(let t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(let t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Rx.Idle,this._onDidSashChange=this._register(new G),this._onDidSashReset=this._register(new G),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=be(this.el,we(".sash-container")),this.viewContainer=we(".split-view-container"),this.scrollable=this._register(new vg({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:r=>vl(rt(this.el),r)})),this.scrollableElement=this._register(new Ay(this.viewContainer,{vertical:this.orientation===0?t.scrollbarVisibility??1:2,horizontal:this.orientation===1?t.scrollbarVisibility??1:2},this.scrollable));let n=this._register(new wi(this.viewContainer,"scroll")).event;this._register(n(r=>{let o=this.scrollableElement.getScrollPosition(),s=Math.abs(this.viewContainer.scrollLeft-o.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,a=Math.abs(this.viewContainer.scrollTop-o.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(s!==void 0||a!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:s,scrollTop:a})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(r=>{r.scrollTopChanged&&(this.viewContainer.scrollTop=r.scrollTop),r.scrollLeftChanged&&(this.viewContainer.scrollLeft=r.scrollLeft)})),be(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||Z0i),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((r,o)=>{let s=Ga(r.visible)||r.visible?r.size:{type:"invisible",cachedVisibleSize:r.size},a=r.view;this.doAddView(a,s,o,!0)}),this._contentSize=this.viewItems.reduce((r,o)=>r+o.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,r){this.doAddView(e,t,n,r)}layout(e,t){let n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let r=0;for(let o=0;o0&&(s.size=El(Math.round(a*e/r),s.minimumSize,s.maximumSize))}}else{let r=Xc(this.viewItems.length),o=r.filter(a=>this.viewItems[a].priority===1),s=r.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,o,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(let a of this.viewItems)a.enabled=!1;let r=this.sashItems.findIndex(a=>a.sash===e),o=hc(re(this.el.ownerDocument.body,"keydown",a=>s(this.sashDragState.current,a.altKey)),re(this.el.ownerDocument.body,"keyup",()=>s(this.sashDragState.current,!1))),s=(a,l)=>{let c=this.viewItems.map(p=>p.size),u=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(r===this.sashItems.length-1){let g=this.viewItems[r];u=(g.minimumSize-g.size)/2,d=(g.maximumSize-g.size)/2}else{let g=this.viewItems[r+1];u=(g.size-g.maximumSize)/2,d=(g.size-g.minimumSize)/2}let h,f;if(!l){let p=Xc(r,-1),g=Xc(r+1,this.viewItems.length),v=p.reduce((L,M)=>L+(this.viewItems[M].minimumSize-c[M]),0),A=p.reduce((L,M)=>L+(this.viewItems[M].viewMaximumSize-c[M]),0),w=g.length===0?Number.POSITIVE_INFINITY:g.reduce((L,M)=>L+(c[M]-this.viewItems[M].minimumSize),0),C=g.length===0?Number.NEGATIVE_INFINITY:g.reduce((L,M)=>L+(c[M]-this.viewItems[M].viewMaximumSize),0),_=Math.max(v,C),E=Math.min(w,A),I=this.findFirstSnapIndex(p),T=this.findFirstSnapIndex(g);if(typeof I=="number"){let L=this.viewItems[I],M=Math.floor(L.viewMinimumSize/2);h={index:I,limitDelta:L.visible?_-M:_+M,size:L.size}}if(typeof T=="number"){let L=this.viewItems[T],M=Math.floor(L.viewMinimumSize/2);f={index:T,limitDelta:L.visible?E+M:E-M,size:L.size}}}this.sashDragState={start:a,current:a,index:r,sizes:c,minDelta:u,maxDelta:d,alt:l,snapBefore:h,snapAfter:f,disposable:o}};s(t,n)}onSashChange({current:e}){let{index:t,start:n,sizes:r,alt:o,minDelta:s,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;let u=e-n,d=this.resize(t,u,r,void 0,void 0,s,a,l,c);if(o){let h=t===this.sashItems.length-1,f=this.viewItems.map(C=>C.size),p=h?t:t+1,g=this.viewItems[p],v=g.size-g.maximumSize,A=g.size-g.minimumSize,w=h?t-1:t+1;this.resize(w,-d,f,void 0,void 0,v,A)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(let t of this.viewItems)t.enabled=!0}onViewChange(e,t){let n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=El(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==Rx.Idle)throw new Error("Cant modify splitview");this.state=Rx.Busy;try{let n=Xc(this.viewItems.length).filter(a=>a!==e),r=[...n.filter(a=>this.viewItems[a].priority===1),e],o=n.filter(a=>this.viewItems[a].priority===2),s=this.viewItems[e];t=Math.round(t),t=El(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(r,o)}finally{this.state=Rx.Idle}}}distributeViewSizes(){let e=[],t=0;for(let a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);let n=Math.floor(t/e.length);for(let a of e)a.size=El(n,a.minimumSize,a.maximumSize);let r=Xc(this.viewItems.length),o=r.filter(a=>this.viewItems[a].priority===1),s=r.filter(a=>this.viewItems[a].priority===2);this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,r){if(this.state!==Rx.Idle)throw new Error("Cant modify splitview");this.state=Rx.Busy;try{let o=we(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(n));let s=e.onDidChange(h=>this.onViewChange(u,h)),a=Ve(()=>o.remove()),l=hc(s,a),c;typeof t=="number"?c=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize);let u=this.orientation===0?new yNe(o,e,c,l):new wNe(o,e,c,l);if(this.viewItems.splice(n,0,u),this.viewItems.length>1){let h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new of(this.sashContainer,{getHorizontalSashTop:L=>this.getSashPosition(L),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new of(this.sashContainer,{getVerticalSashLeft:L=>this.getSashPosition(L),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),p=this.orientation===0?L=>({sash:f,start:L.startY,current:L.currentY,alt:L.altKey}):L=>({sash:f,start:L.startX,current:L.currentX,alt:L.altKey}),v=Se.map(f.onDidStart,p)(this.onSashStart,this),w=Se.map(f.onDidChange,p)(this.onSashChange,this),_=Se.map(f.onDidEnd,()=>this.sashItems.findIndex(L=>L.sash===f))(this.onSashEnd,this),E=f.onDidReset(()=>{let L=this.sashItems.findIndex(q=>q.sash===f),M=Xc(L,-1),z=Xc(L+1,this.viewItems.length),H=this.findFirstSnapIndex(M),B=this.findFirstSnapIndex(z);typeof H=="number"&&!this.viewItems[H].visible||typeof B=="number"&&!this.viewItems[B].visible||this._onDidSashReset.fire(L)}),I=hc(v,w,_,E,f),T={sash:f,disposable:I};this.sashItems.splice(n-1,0,T)}o.appendChild(e.element);let d;typeof t!="number"&&t.type==="split"&&(d=[t.index]),r||this.relayout([n],d),!r&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=Rx.Idle}}relayout(e,t){let n=this.viewItems.reduce((r,o)=>r+o.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(u=>u.size),r,o,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;let u=Xc(e,-1),d=Xc(e+1,this.viewItems.length);if(o)for(let T of o)i$(u,T),i$(d,T);if(r)for(let T of r)b7(u,T),b7(d,T);let h=u.map(T=>this.viewItems[T]),f=u.map(T=>n[T]),p=d.map(T=>this.viewItems[T]),g=d.map(T=>n[T]),v=u.reduce((T,L)=>T+(this.viewItems[L].minimumSize-n[L]),0),A=u.reduce((T,L)=>T+(this.viewItems[L].maximumSize-n[L]),0),w=d.length===0?Number.POSITIVE_INFINITY:d.reduce((T,L)=>T+(n[L]-this.viewItems[L].minimumSize),0),C=d.length===0?Number.NEGATIVE_INFINITY:d.reduce((T,L)=>T+(n[L]-this.viewItems[L].maximumSize),0),_=Math.max(v,C,s),E=Math.min(w,A,a),I=!1;if(l){let T=this.viewItems[l.index],L=t>=l.limitDelta;I=L!==T.visible,T.setVisible(L,l.size)}if(!I&&c){let T=this.viewItems[c.index],L=ta+l.size,0),n=this.size-t,r=Xc(this.viewItems.length-1,-1),o=r.filter(a=>this.viewItems[a].priority===1),s=r.filter(a=>this.viewItems[a].priority===2);for(let a of s)i$(r,a);for(let a of o)b7(r,a);typeof e=="number"&&b7(r,e);for(let a=0;n!==0&&at+n.size,0);let e=0;for(let t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1,t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;let n=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),r=[...this.viewItems].reverse();e=!1;let o=r.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;let s=r.map(l=>e=l.maximumSize-l.size>0||e).reverse(),a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:w&&t[l]&&(a0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(let n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),Vi(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[],super.dispose()}}});var Bmt=D(()=>{});function $0i(i){return{getHeight(e){return i.getHeight(e)},getTemplateId(){return Xne.TemplateId}}}var Xne,CNe,Zne,zmt=D(()=>{Ye();_g();Zl();_x();xNe();et();ae();Bmt();Xne=class i{static{this.TemplateId="row"}constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=i.TemplateId,this.renderedTemplates=new Set;let r=new Map(t.map(o=>[o.templateId,o]));this.renderers=[];for(let o of e){let s=r.get(o.templateId);if(!s)throw new Error(`Table cell renderer for template id ${o.templateId} not found.`);this.renderers.push(s)}}renderTemplate(e){let t=be(e,we(".monaco-table-tr")),n=[],r=[];for(let s=0;sthis.disposables.add(new CNe(u,d))),l={size:a.reduce((u,d)=>u+d.column.weight,0),views:a.map(u=>({size:u.column.weight,view:u}))};this.splitview=this.disposables.add(new lP(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;let c=new Xne(r,o,u=>this.splitview.getViewSize(u));this.list=this.disposables.add(new il(e,this.domNode,$0i(n),[c],s)),Se.any(...a.map(u=>u.onDidLayout))(([u,d])=>c.layoutColumn(u,d),null,this.disposables),this.splitview.onDidSashReset(u=>{let d=r.reduce((f,p)=>f+p.weight,0),h=r[u].weight/d*this.cachedWidth;this.splitview.resizeView(u,h)},null,this.disposables),this.styleElement=Xa(this.domNode),this.style(aft)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){let t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { +`}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){let o=typeof e=="string"?e:e.languageId,r=this._modelCreationOptionsByLanguageAndResource[o+t];if(!r){let s=this._configurationService.getValue("editor",{overrideIdentifier:o,resource:t}),a=this._getEOL(t,o);r=QP._readModelOptions({editor:s,eol:a},n),this._modelCreationOptionsByLanguageAndResource[o+t]=r}return r}_updateModelOptions(e){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let n=Object.keys(this._models);for(let o=0,r=n.length;oe){let t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,o)=>n.time-o.time);t.length>0&&this._disposedModelsHeapSize>e;){let n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,o){let r=this.getCreationOptions(t,n,o),s=this._instantiationService.createInstance(pp,e,t,r,n);if(n&&this._disposedModels.has(YL(n))){let c=this._removeDisposedModel(n),u=this._undoRedoService.getElements(n),d=this._getSHA1Computer(),h=d.canComputeSHA1(s)?d.computeSHA1(s)===c.sha1:!1;if(h||c.sharesUndoRedoStack){for(let f of u.past)s1(f)&&f.matchesResource(n)&&f.setModel(s);for(let f of u.future)s1(f)&&f.matchesResource(n)&&f.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,f=>s1(f)&&f.matchesResource(n)),h&&(s._overwriteVersionId(c.versionId),s._overwriteAlternativeVersionId(c.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}let a=YL(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");let l=new DNe(s,c=>this._onWillDispose(c),(c,u)=>this._onDidChangeLanguage(c,u));return this._models[a]=l,l}createModel(e,t,n,o=!1){let r;return t?r=this._createModelData(e,t,n,o):r=this._createModelData(e,fs,n,o),this._onModelAdded.fire(r.model),r.model}getModels(){let e=[],t=Object.keys(this._models);for(let n=0,o=t.length;n0||c.future.length>0){for(let u of c.past)s1(u)&&u.matchesResource(e.uri)&&(r=!0,s+=u.heapSize(e.uri),u.setModel(e.uri));for(let u of c.future)s1(u)&&u.matchesResource(e.uri)&&(r=!0,s+=u.heapSize(e.uri),u.setModel(e.uri))}}let a=QP.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(r)if(!o&&(s>a||!l.canComputeSHA1(e))){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>s1(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new TNe(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!o){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){let n=t.oldLanguage,o=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(o,e.uri,e.isForSimpleWidget);QP._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new kNe}};ere=QP=Dli([$oe(0,Et),$oe(1,Wte),$oe(2,VO),$oe(3,Re)],ere);kNe=class i{static{this.MAX_MODEL_SIZE=10*1024*1024}canComputeSHA1(e){return e.getValueLength()<=i.MAX_MODEL_SIZE}computeSHA1(e){let t=new k$,n=e.createSnapshot(),o;for(;o=n.read();)t.update(o);return t.digest()}}});var pft=D(()=>{});var tre,Wg,INe,KL=D(()=>{Wt();de();fa();(function(i){i[i.PRESERVE=0]="PRESERVE",i[i.LAST=1]="LAST"})(tre||(tre={}));Wg={Quickaccess:"workbench.contributions.quickaccess"},INe=class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,n)=>n.prefix.length-t.prefix.length),He(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Sl([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}};Qi.add(Wg.Quickaccess,new INe)});var mft,qE,xm,Lo,eW,LNe,SAn,Pa,gf=D(()=>{ht();mft={ctrlCmd:!1,alt:!1};(function(i){i[i.Blur=1]="Blur",i[i.Gesture=2]="Gesture",i[i.Other=3]="Other"})(qE||(qE={}));(function(i){i[i.NONE=0]="NONE",i[i.FIRST=1]="FIRST",i[i.SECOND=2]="SECOND",i[i.LAST=3]="LAST"})(xm||(xm={}));(function(i){i[i.First=1]="First",i[i.Second=2]="Second",i[i.Last=3]="Last",i[i.Next=4]="Next",i[i.Previous=5]="Previous",i[i.NextPage=6]="NextPage",i[i.PreviousPage=7]="PreviousPage",i[i.NextSeparator=8]="NextSeparator",i[i.PreviousSeparator=9]="PreviousSeparator"})(Lo||(Lo={}));(function(i){i[i.Title=1]="Title",i[i.Inline=2]="Inline"})(eW||(eW={}));LNe=class{constructor(e){this.options=e}},SAn=new LNe,Pa=At("quickInputService")});var kli,gft,ire,bft=D(()=>{Gt();sn();et();de();ht();KL();gf();fa();kli=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},gft=function(i,e){return function(t,n){e(t,n,i)}},ire=class extends H{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Qi.as(Wg.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){let[o,r]=this.getOrInstantiateProvider(e,n?.enabledProviderPrefixes),s=this.visibleQuickAccess,a=s?.descriptor;if(s&&r&&a===r){e!==r.prefix&&!n?.preserveValue&&(s.picker.value=e),this.adjustValueSelection(s.picker,r,n);return}if(r&&!n?.preserveValue){let p;if(s&&a&&a!==r){let g=s.value.substr(a.prefix.length);g&&(p=`${r.prefix}${g}`)}if(!p){let g=o?.defaultFilterValue;g===tre.LAST?p=this.lastAcceptedPickerValues.get(r):typeof g=="string"&&(p=`${r.prefix}${g}`)}typeof p=="string"&&(e=p)}let l=s?.picker?.valueSelection,c=s?.picker?.value,u=new se,d=u.add(this.quickInputService.createQuickPick({useSeparators:!0}));d.value=e,this.adjustValueSelection(d,r,n),d.placeholder=n?.placeholder??r?.placeholder,d.quickNavigate=n?.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!s,(typeof n?.itemActivation=="number"||n?.quickNavigateConfiguration)&&(d.itemActivation=n?.itemActivation??xm.SECOND),d.contextKey=r?.contextKey,d.filterValue=p=>p.substring(r?r.prefix.length:0);let h;t&&(h=new em,u.add(Ee.once(d.onWillAccept)(p=>{p.veto(),d.hide()}))),u.add(this.registerPickerListeners(d,o,r,e,n));let f=u.add(new Mi);if(o&&u.add(o.provide(d,f.token,n?.providerOptions)),Ee.once(d.onDidHide)(()=>{d.selectedItems.length===0&&f.cancel(),u.dispose(),h?.complete(d.selectedItems.slice(0))}),d.show(),l&&c===e&&(d.valueSelection=l),t)return h?.p}adjustValueSelection(e,t,n){let o;n?.preserveValue?o=[e.value.length,e.value.length]:o=[t?.prefix.length??0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,n,o,r){let s=new se,a=this.visibleQuickAccess={picker:e,descriptor:n,value:o};return s.add(He(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(l=>{let[c]=this.getOrInstantiateProvider(l,r?.enabledProviderPrefixes);c!==t?this.show(l,{enabledProviderPrefixes:r?.enabledProviderPrefixes,preserveValue:!0,providerOptions:r?.providerOptions}):a.value=l})),n&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),s}getOrInstantiateProvider(e,t){let n=this.registry.getQuickAccessProvider(e);if(!n||t&&!t?.includes(n.prefix))return[void 0,void 0];let o=this.mapProviderToDescriptor.get(n);return o||(o=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,o)),[o,n]}};ire=kli([gft(0,Pa),gft(1,Re)],ire)});var Aft=D(()=>{});var Ug,GP=D(()=>{Lg();ko();et();Aft();ic();Bg();Ug=class extends Os{constructor(e){super(),this._onChange=this._register(new q),this.onChange=this._onChange.event,this._onKeyDown=this._register(new q),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ut.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register(nc().setupManagedHover(e.hoverDelegate??Mr("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}});var nre=D(()=>{});function vft(i){let e=[],t=0,n;for(;n=Lli.exec(i);){n.index-t>0&&e.push(i.substring(t,n.index));let[,o,r,,s]=n;s?e.push({label:o,href:r,title:s}):e.push({label:o,href:r}),t=n.index+n[0].length}return t{xE();Ili=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ore=class{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}};Ili([ar],ore.prototype,"toString",null);Lli=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi});function Mli(i){if(!i)return;let e,t=i.dark.toString();return NNe[t]?e=NNe[t]:(e=Nli.nextId(),qF(`.${e}, .hc-light .${e}`,`background-image: ${im(i.light||i.dark)}`),qF(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${im(i.dark)}`),NNe[t]=e),e}function JL(i,e,t){let n=i.iconClass||Mli(i.iconPath);return i.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:e,label:"",tooltip:i.tooltip||"",class:n,enabled:!0,run:t}}function wft(i,e,t){kr(e);let n=vft(i),o=0;for(let r of n.nodes)if(typeof r=="string")e.append(...pm(r));else{let s=r.title;!s&&r.href.startsWith("command:")?s=y("executeCommand","Click to execute command '{0}'",r.href.substring(8)):s||(s=r.href);let a=xe("a",{href:r.href,title:s,tabIndex:o++},r.label);a.style.textDecoration="underline";let l=f=>{vot(f)&&mi.stop(f,!0),t.callback(r.href)},c=t.disposables.add(new bi(a,Te.CLICK)).event,u=t.disposables.add(new bi(a,Te.KEY_DOWN)).event,d=Ee.chain(u,f=>f.filter(p=>{let g=new Vi(p);return g.equals(10)||g.equals(3)}));t.disposables.add(Lr.addTarget(a));let h=t.disposables.add(new bi(a,Tn.Tap)).event;Ee.any(c,h,d)(l,null,t.disposables),e.appendChild(a)}}var NNe,Nli,MNe=D(()=>{Ye();n0();et();xc();cp();Vx();XV();yft();nre();Be();NNe={},Nli=new SL("quick-input-button-icon-")});var Rli,xft,Cft,_ft,Sft,RNe,Eft,Dft,Tft,kft,rre,sre,tW,are,lre,cre=D(()=>{Ye();xc();GP();Wt();Gt();oo();et();de();wi();Bx();ko();nre();Be();gf();MNe();ao();zx();Bt();Rli=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},xft=function(i,e){return function(t,n){e(t,n,i)}},Cft="inQuickInput",_ft=new ze(Cft,!1,y("inQuickInput","Whether keyboard focus is inside the quick input control")),Sft=ge.has(Cft),RNe="quickInputType",Eft=new ze(RNe,void 0,y("quickInputType","The type of the currently visible quick input")),Dft="cursorAtEndOfQuickInputBox",Tft=new ze(Dft,!1,y("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),kft=ge.has(Dft),rre={iconClass:ut.asClassName(De.quickInputBack),tooltip:y("quickInput.back","Back"),handle:-1},sre=class i extends H{static{this.noPromptMessage=y("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=i.noPromptMessage,this._severity=Jo.Ignore,this.onDidTriggerButtonEmitter=this._register(new q),this.onDidHideEmitter=this._register(new q),this.onWillHideEmitter=this._register(new q),this.onDisposeEmitter=this._register(new q),this.visibleDisposables=this._register(new se),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){let t=this._ignoreFocusOut!==e&&!Ou;this._ignoreFocusOut=e&&!Ou,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter(t=>t===rre),this._rightButtons=e.filter(t=>t!==rre&&t.location!==eW.Inline),this._inlineButtons=e.filter(t=>t.location===eW.Inline),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=qE.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=qE.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;let e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");let t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?kr(this.ui.widget,this._widget):kr(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new ha,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();let o=this._leftButtons.map((a,l)=>JL(a,`id-${l}`,async()=>this.onDidTriggerButtonEmitter.fire(a)));this.ui.leftActionBar.push(o,{icon:!0,label:!1}),this.ui.rightActionBar.clear();let r=this._rightButtons.map((a,l)=>JL(a,`id-${l}`,async()=>this.onDidTriggerButtonEmitter.fire(a)));this.ui.rightActionBar.push(r,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();let s=this._inlineButtons.map((a,l)=>JL(a,`id-${l}`,async()=>this.onDidTriggerButtonEmitter.fire(a)));this.ui.inlineActionBar.push(s,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;let o=this.toggles?.filter(r=>r instanceof Ug)??[];this.ui.inputBox.toggles=o}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);let n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,kr(this.ui.message),wft(n,this.ui.message,{callback:o=>{this.ui.linkOpenerDelegate(o)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?y("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Jo.Ignore){let t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}},tW=class i extends sre{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new q),this.onWillAcceptEmitter=this._register(new q),this.onDidAcceptEmitter=this._register(new q),this.onDidCustomEmitter=this._register(new q),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=xm.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new q),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new q),this.onDidTriggerItemButtonEmitter=this._register(new q),this.onDidTriggerSeparatorButtonEmitter=this._register(new q),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new wb,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=y("quickInputBox.ariaLabel","Type to narrow down results.")}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?mft:this.ui.keyMods}get valueSelection(){let e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(Lo.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,t)=>t)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Zi(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Zi(e,this._selectedItems,(n,o)=>n===o)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(YF(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&Zi(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return ce(this.ui.container,Te.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;let t=new Vi(e),n=t.keyCode;this._quickNavigate.keybindings.some(s=>{let a=s.getChords();return a.length>1?!1:a[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&n===6||a[0].ctrlKey&&n===5||a[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let o=this.ariaLabel;!o&&n.inputBox&&(o=this.placeholder||i.DEFAULT_ARIA_LABEL,this.title&&(o+=` - ${this.title}`)),this.ui.list.ariaLabel!==o&&(this.ui.list.ariaLabel=o??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case xm.NONE:this._itemActivation=xm.FIRST;break;case xm.SECOND:this.ui.list.focus(Lo.Second),this._itemActivation=xm.FIRST;break;case xm.LAST:this.ui.list.focus(Lo.Last),this._itemActivation=xm.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Lo.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}},are=class extends sre{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new q),this.onDidAcceptEmitter=this._register(new q),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");let e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},lre=class extends Oy{constructor(e,t){super("element",!1,n=>this.getOverrideOptions(n),e,t)}getOverrideOptions(e){let t=(To(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(` +`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};lre=Rli([xft(0,Et),xft(1,dh)],lre)});var Ift=D(()=>{});var Hvn,oC,ure=D(()=>{Ye();A$();xc();eH();cp();ic();Vx();Wr();et();Td();de();ko();Ift();Bg();Hvn={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:me.white.toString(),buttonForeground:me.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0},oC=class extends H{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new q),this._onDidEscape=this._register(new q),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);let n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.title=="string"&&this.setTitle(t.title),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(Lr.addTarget(this._element)),[Te.CLICK,Tn.Tap].forEach(r=>{this._register(ce(this._element,r,s=>{if(!this.enabled){mi.stop(s);return}this._onDidClick.fire(s)}))}),this._register(ce(this._element,Te.KEY_DOWN,r=>{let s=new Vi(r),a=!1;this.enabled&&(s.equals(3)||s.equals(10))?(this._onDidClick.fire(r),a=!0):s.equals(9)&&(this._onDidEscape.fire(r),this._element.blur(),a=!0),a&&mi.stop(s,!0)})),this._register(ce(this._element,Te.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(ce(this._element,Te.MOUSE_OUT,r=>{this.updateBackground(!1)})),this.focusTracker=this._register(iu(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let n of pm(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;let o=document.createElement("span");o.textContent=n,t.push(o)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e||uf(this._label)&&uf(e)&&Uct(this._label,e))return;this._element.classList.add("monaco-text-button");let t=this.options.supportShortLabel?this._labelElement:this._element;if(uf(e)){let o=LE(e,{inline:!0});o.dispose();let r=o.element.querySelector("p")?.innerHTML;if(r){let s=m$(r,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});t.innerHTML=s}else kr(t)}else this.options.supportIcons?kr(t,...this.getContentElements(e)):t.textContent=e;let n="";typeof this.options.title=="string"?n=this.options.title:this.options.title&&(n=Xct(e)),this.setTitle(n),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",n),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...ut.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){!this._hover&&e!==""?this._hover=this._register(nc().setupManagedHover(this.options.hoverDelegate??Mr("mouse"),this._element,e)):this._hover&&this._hover.update(e)}}});var Lft=D(()=>{});var XL,FNe=D(()=>{Ye();Rt();Lft();XL=class{constructor(e,t,n){this.options=t,this.styles=n,this.count=0,this.element=Ae(e,xe(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=gg(this.countFormat,this.count),this.element.title=gg(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}});var Nft=D(()=>{});var Mft,Rft,ONe,PNe,Fft,dre,Oft=D(()=>{Ye();Gt();de();Nft();Mft="done",Rft="active",ONe="infinite",PNe="infinite-long-running",Fft="discrete",dre=class i extends H{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new Vn),this.workedVal=0,this.showDelayedScheduler=this._register(new si(()=>ql(this.element),0)),this.longRunningScheduler=this._register(new si(()=>this.infiniteLongRunning(),i.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Rft,ONe,PNe,Fft),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Mft),this.element.classList.contains(ONe)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Fft,Mft,PNe),this.element.classList.add(Rft,ONe),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(PNe)}getContainer(){return this.element}}});var Fli,Oli,Pli,qP,YP,KP,BNe=D(()=>{ic();GP();oo();Be();Fli=y("caseDescription","Match Case"),Oli=y("wordsDescription","Match Whole Word"),Pli=y("regexDescription","Use Regular Expression"),qP=class extends Ug{constructor(e){super({icon:De.caseSensitive,title:Fli+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Mr("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},YP=class extends Ug{constructor(e){super({icon:De.wholeWord,title:Oli+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Mr("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},KP=class extends Ug{constructor(e){super({icon:De.regex,title:Pli+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Mr("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}});var hre,Pft=D(()=>{hre=class{constructor(e,t=0,n=e.length,o=t-1){this.items=e,this.start=t,this.end=n,this.index=o}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}});var fre,Bft=D(()=>{Pft();fre=class{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();let e=this._elements;this._navigator=new hre(e,0,e.length,e.length)}_reduceToLimit(){let e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){let e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(let t of e)this._history.add(t)}get _elements(){let e=[];return this._history.forEach(t=>e.push(t)),e}}});var zft=D(()=>{});var iW,zNe,JP,pre=D(()=>{Ye();n0();zke();Hg();Zl();Bg();ic();Mg();Lg();et();Bft();rh();zft();Be();iW=xe,zNe=class extends Os{constructor(e,t,n){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new q),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=Ae(e,iW(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",r=Ae(this.element,iW(".ibwrapper"));if(this.input=Ae(r,iW(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=Ae(r,iW("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new qO(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),Ae(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));let s=this._register(new bi(e.ownerDocument,"selectionchange")),a=Ee.filter(s.event,()=>e.ownerDocument.getSelection()?.anchorNode===r);this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Ps(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register(nc().setupManagedHover(Mr("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:vg(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return II(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){let e=this.input.selectionStart;if(e===null)return null;let t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;let e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&El(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));let n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${yg(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){let t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t=()=>e.style.width=Cc(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:o=>{if(!this.message)return null;e=Ae(o,iW(".monaco-inputbox-container")),t();let r={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?hct(this.message.content,r):dct(this.message.content,r);s.classList.add(this.classForType(this.message.type));let a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background??"",s.style.color=a.foreground??"",s.style.border=a.border?`1px solid ${a.border}`:"",Ae(e,s),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=y("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=y("alertWarningMessage","Warning: {0}",this.message.content):n=y("alertInfoMessage","Info: {0}",this.message.content),ms(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;let e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText="\xA0",this.layout()}applyStyles(){let e=this.options.inputBoxStyles,t=e.inputBackground??"",n=e.inputForeground??"",o=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=n,this.input.style.backgroundColor="inherit",this.input.style.color=n,this.element.style.border=`1px solid ${yg(o,"transparent")}`}layout(){if(!this.mirror)return;let e=this.cachedContentHeight;this.cachedContentHeight=vg(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){let t=this.inputElement,n=t.selectionStart,o=t.selectionEnd,r=t.value;n!==null&&o!==null&&(this.value=r.substr(0,n)+e+r.substr(o),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}},JP=class extends zNe{constructor(e,t,n){let o=y({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," or {0} for history","\u21C5"),r=y({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," ({0} for history)","\u21C5");super(e,t,n),this._onDidFocus=this._register(new q),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new q),this.onDidBlur=this._onDidBlur.event,this.history=new fre(n.history,100);let s=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){let a=this.placeholder.endsWith(")")?o:r,l=this.placeholder+a;n.showPlaceholderOnFocus&&!II(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||s()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>s()),this.onblur(this.input,()=>{let a=l=>{if(this.placeholder.endsWith(l)){let c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(r)||a(o)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",kd(this.value?this.value:y("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,kd(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}});var VNe=D(()=>{});var Bli,ZL,mre=D(()=>{Ye();BNe();pre();Lg();et();VNe();Be();de();ic();Bli=y("defaultLabel","input"),ZL=class extends Os{constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new Vn),this.additionalToggles=[],this._onDidOptionChange=this._register(new q),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new q),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new q),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new q),this._onKeyUp=this._register(new q),this._onCaseSensitiveKeyDown=this._register(new q),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new q),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||Bli,this.showCommonFindToggles=!!n.showCommonFindToggles;let o=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",s=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new JP(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles}));let d=this._register(a0());if(this.showCommonFindToggles){this.regex=this._register(new KP({appendTitle:s,isChecked:!1,hoverDelegate:d,...n.toggleStyles})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new YP({appendTitle:r,isChecked:!1,hoverDelegate:d,...n.toggleStyles})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new qP({appendTitle:o,isChecked:!1,hoverDelegate:d,...n.toggleStyles})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)}));let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){let p=h.indexOf(this.domNode.ownerDocument.activeElement);if(p>=0){let g=-1;f.equals(17)?g=(p+1)%h.length:f.equals(15)&&(p===0?g=h.length-1:g=p-1),f.equals(9)?(h[p].blur(),this.inputBox.focus()):g>=0&&h[g].focus(),mi.stop(f,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(ce(this.inputBox.inputElement,"compositionstart",h=>{this.imeSessionInProgress=!0})),this._register(ce(this.inputBox.inputElement,"compositionend",h=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(let e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(let e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(let t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new se;for(let t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce((t,n)=>t+n.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}});var zli,gre,Vft=D(()=>{Ye();mre();de();Bx();nre();zli=xe,gre=class extends H{constructor(e,t,n){super(),this.parent=e,this.onKeyDown=r=>un(this.findInput.inputBox.inputElement,Te.KEY_DOWN,r),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=Ae(this.parent,zli(".quick-input-box")),this.findInput=this._register(new ZL(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));let o=this.findInput.inputBox.inputElement;o.role="combobox",o.ariaHasPopup="menu",o.ariaAutoComplete="list",o.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===Jo.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===Jo.Info?1:e===Jo.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===Jo.Info?1:e===Jo.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}});function Vli(i,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new WNe(i,e.accessibilityProvider)}}var HNe,WNe,bre,Hft=D(()=>{Wt();sn();et();de();QIe();Kx();HNe=class{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:H.None}}renderElement(e,t,n,o){if(n.disposable?.dispose(),!n.data)return;let r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,n.data,o);let s=new Mi,a=r.resolve(e,s.token);n.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,n.data),a.then(l=>this.renderer.renderElement(l,e,n.data,o))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}},WNe=class{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){let t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}};bre=class{constructor(e,t,n,o,r={}){let s=()=>this.model,a=o.map(l=>new HNe(l,s));this.list=new rl(e,t,n,a,Vli(s,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Ee.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return Ee.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return Ee.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(o=>this._model.get(o)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,ru(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}});var Wft=D(()=>{});var ZP,Hli,nW,Wli,Uli,jli,Qli,oW,rW,XP,Uft,bf,$P=D(()=>{Ye();n0();cp();Gt();xE();et();de();wi();Wft();ZP=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Hli=!1;(function(i){i.North="north",i.South="south",i.East="east",i.West="west"})(nW||(nW={}));Wli=4,Uli=new q,jli=300,Qli=new q,oW=class{constructor(e){this.el=e,this.disposables=new se}get onPointerMove(){return this.disposables.add(new bi(rt(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new bi(rt(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}};ZP([ar],oW.prototype,"onPointerMove",null);ZP([ar],oW.prototype,"onPointerUp",null);rW=class{get onPointerMove(){return this.disposables.add(new bi(this.el,Tn.Change)).event}get onPointerUp(){return this.disposables.add(new bi(this.el,Tn.End)).event}constructor(e){this.el=e,this.disposables=new se}dispose(){this.disposables.dispose()}};ZP([ar],rW.prototype,"onPointerMove",null);ZP([ar],rW.prototype,"onPointerUp",null);XP=class{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}};ZP([ar],XP.prototype,"onPointerMove",null);ZP([ar],XP.prototype,"onPointerUp",null);Uft="pointer-events-disabled",bf=class i extends H{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=Ae(this.el,xe(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(He(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new bi(this._orthogonalStartDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new bi(this._orthogonalStartDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=Ae(this.el,xe(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(He(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new bi(this._orthogonalEndDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new bi(this._orthogonalEndDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=jli,this.hoverDelayer=this._register(new da(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new q),this._onDidStart=this._register(new q),this._onDidChange=this._register(new q),this._onDidReset=this._register(new q),this._onDidEnd=this._register(new q),this.orthogonalStartSashDisposables=this._register(new se),this.orthogonalStartDragHandleDisposables=this._register(new se),this.orthogonalEndSashDisposables=this._register(new se),this.orthogonalEndDragHandleDisposables=this._register(new se),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=Ae(e,xe(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),jt&&this.el.classList.add("mac");let o=this._register(new bi(this.el,"mousedown")).event;this._register(o(d=>this.onPointerStart(d,new oW(e)),this));let r=this._register(new bi(this.el,"dblclick")).event;this._register(r(this.onPointerDoublePress,this));let s=this._register(new bi(this.el,"mouseenter")).event;this._register(s(()=>i.onMouseEnter(this)));let a=this._register(new bi(this.el,"mouseleave")).event;this._register(a(()=>i.onMouseLeave(this))),this._register(Lr.addTarget(this.el));let l=this._register(new bi(this.el,Tn.Start)).event;this._register(l(d=>this.onPointerStart(d,new rW(this.el)),this));let c=this._register(new bi(this.el,Tn.Tap)).event,u;this._register(c(d=>{if(u){clearTimeout(u),u=void 0,this.onPointerDoublePress(d);return}clearTimeout(u),u=setTimeout(()=>u=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=Wli,this._register(Uli.event(d=>{this.size=d,this.layout()}))),this._register(Qli.event(d=>this.hoverDelay=d)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",Hli),this.layout()}onPointerStart(e,t){mi.stop(e);let n=!1;if(!e.__orthogonalSashEvent){let p=this.getOrthogonalSash(e);p&&(n=!0,e.__orthogonalSashEvent=!0,p.onPointerStart(e,new XP(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new XP(t))),!this.state)return;let o=this.el.ownerDocument.getElementsByTagName("iframe");for(let p of o)p.classList.add(Uft);let r=e.pageX,s=e.pageY,a=e.altKey,l={startX:r,currentX:r,startY:s,currentY:s,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);let c=el(this.el),u=()=>{let p="";n?p="all-scroll":this.orientation===1?this.state===1?p="s-resize":this.state===2?p="n-resize":p=jt?"row-resize":"ns-resize":this.state===1?p="e-resize":this.state===2?p="w-resize":p=jt?"col-resize":"ew-resize",c.textContent=`* { cursor: ${p} !important; }`},d=new se;u(),n||this.onDidEnablementChange.event(u,null,d);let h=p=>{mi.stop(p,!1);let g={startX:r,currentX:p.pageX,startY:s,currentY:p.pageY,altKey:a};this._onDidChange.fire(g)},f=p=>{mi.stop(p,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(let g of o)g.classList.remove(Uft)};t.onPointerMove(h,null,d),t.onPointerUp(f,null,d),d.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&i.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&i.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){i.onMouseLeave(this)}layout(){if(this.orientation===0){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){let t=e.initialTarget??e.target;if(!(!t||!To(t))&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}});var jft=D(()=>{});var Gli,Are,UNe,jNe,rC,sW,eB,QNe=D(()=>{Ye();n0();$P();Mg();Wt();Wr();et();de();bL();GO();gn();jft();Gli={separatorBorder:me.transparent},Are=class{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){if(e!==this.visible){e?(this.size=Ll(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{this.view.setVisible?.(e)}catch(n){console.error("Splitview: Failed to set visible view"),console.error(n)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,o){this.container=e,this.view=t,this.disposable=o,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}},UNe=class extends Are{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}},jNe=class extends Are{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}};(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(rC||(rC={}));(function(i){i.Distribute={type:"distribute"};function e(o){return{type:"split",index:o}}i.Split=e;function t(o){return{type:"auto",index:o}}i.Auto=t;function n(o){return{type:"invisible",cachedVisibleSize:o}}i.Invisible=n})(sW||(sW={}));eB=class extends H{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(let t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(let t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=rC.Idle,this._onDidSashChange=this._register(new q),this._onDidSashReset=this._register(new q),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=Ae(this.el,xe(".sash-container")),this.viewContainer=xe(".split-view-container"),this.scrollable=this._register(new Ng({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:o=>Cl(rt(this.el),o)})),this.scrollableElement=this._register(new Py(this.viewContainer,{vertical:this.orientation===0?t.scrollbarVisibility??1:2,horizontal:this.orientation===1?t.scrollbarVisibility??1:2},this.scrollable));let n=this._register(new bi(this.viewContainer,"scroll")).event;this._register(n(o=>{let r=this.scrollableElement.getScrollPosition(),s=Math.abs(this.viewContainer.scrollLeft-r.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,a=Math.abs(this.viewContainer.scrollTop-r.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(s!==void 0||a!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:s,scrollTop:a})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(o=>{o.scrollTopChanged&&(this.viewContainer.scrollTop=o.scrollTop),o.scrollLeftChanged&&(this.viewContainer.scrollLeft=o.scrollLeft)})),Ae(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||Gli),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((o,r)=>{let s=Xa(o.visible)||o.visible?o.size:{type:"invisible",cachedVisibleSize:o.size},a=o.view;this.doAddView(a,s,r,!0)}),this._contentSize=this.viewItems.reduce((o,r)=>o+r.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,o){this.doAddView(e,t,n,o)}layout(e,t){let n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let o=0;for(let r=0;r0&&(s.size=Ll(Math.round(a*e/o),s.minimumSize,s.maximumSize))}}else{let o=ru(this.viewItems.length),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(let a of this.viewItems)a.enabled=!1;let o=this.sashItems.findIndex(a=>a.sash===e),r=gc(ce(this.el.ownerDocument.body,"keydown",a=>s(this.sashDragState.current,a.altKey)),ce(this.el.ownerDocument.body,"keyup",()=>s(this.sashDragState.current,!1))),s=(a,l)=>{let c=this.viewItems.map(p=>p.size),u=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(o===this.sashItems.length-1){let g=this.viewItems[o];u=(g.minimumSize-g.size)/2,d=(g.maximumSize-g.size)/2}else{let g=this.viewItems[o+1];u=(g.size-g.maximumSize)/2,d=(g.size-g.minimumSize)/2}let h,f;if(!l){let p=ru(o,-1),g=ru(o+1,this.viewItems.length),A=p.reduce((N,L)=>N+(this.viewItems[L].minimumSize-c[L]),0),v=p.reduce((N,L)=>N+(this.viewItems[L].viewMaximumSize-c[L]),0),w=g.length===0?Number.POSITIVE_INFINITY:g.reduce((N,L)=>N+(c[L]-this.viewItems[L].minimumSize),0),C=g.length===0?Number.NEGATIVE_INFINITY:g.reduce((N,L)=>N+(c[L]-this.viewItems[L].viewMaximumSize),0),_=Math.max(A,C),E=Math.min(w,v),I=this.findFirstSnapIndex(p),T=this.findFirstSnapIndex(g);if(typeof I=="number"){let N=this.viewItems[I],L=Math.floor(N.viewMinimumSize/2);h={index:I,limitDelta:N.visible?_-L:_+L,size:N.size}}if(typeof T=="number"){let N=this.viewItems[T],L=Math.floor(N.viewMinimumSize/2);f={index:T,limitDelta:N.visible?E+L:E-L,size:N.size}}}this.sashDragState={start:a,current:a,index:o,sizes:c,minDelta:u,maxDelta:d,alt:l,snapBefore:h,snapAfter:f,disposable:r}};s(t,n)}onSashChange({current:e}){let{index:t,start:n,sizes:o,alt:r,minDelta:s,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;let u=e-n,d=this.resize(t,u,o,void 0,void 0,s,a,l,c);if(r){let h=t===this.sashItems.length-1,f=this.viewItems.map(C=>C.size),p=h?t:t+1,g=this.viewItems[p],A=g.size-g.maximumSize,v=g.size-g.minimumSize,w=h?t-1:t+1;this.resize(w,-d,f,void 0,void 0,A,v)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(let t of this.viewItems)t.enabled=!0}onViewChange(e,t){let n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Ll(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==rC.Idle)throw new Error("Cant modify splitview");this.state=rC.Busy;try{let n=ru(this.viewItems.length).filter(a=>a!==e),o=[...n.filter(a=>this.viewItems[a].priority===1),e],r=n.filter(a=>this.viewItems[a].priority===2),s=this.viewItems[e];t=Math.round(t),t=Ll(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(o,r)}finally{this.state=rC.Idle}}}distributeViewSizes(){let e=[],t=0;for(let a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);let n=Math.floor(t/e.length);for(let a of e)a.size=Ll(n,a.minimumSize,a.maximumSize);let o=ru(this.viewItems.length),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);this.relayout(r,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,o){if(this.state!==rC.Idle)throw new Error("Cant modify splitview");this.state=rC.Busy;try{let r=xe(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));let s=e.onDidChange(h=>this.onViewChange(u,h)),a=He(()=>r.remove()),l=gc(s,a),c;typeof t=="number"?c=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize);let u=this.orientation===0?new UNe(r,e,c,l):new jNe(r,e,c,l);if(this.viewItems.splice(n,0,u),this.viewItems.length>1){let h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new bf(this.sashContainer,{getHorizontalSashTop:N=>this.getSashPosition(N),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new bf(this.sashContainer,{getVerticalSashLeft:N=>this.getSashPosition(N),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),p=this.orientation===0?N=>({sash:f,start:N.startY,current:N.currentY,alt:N.altKey}):N=>({sash:f,start:N.startX,current:N.currentX,alt:N.altKey}),A=Ee.map(f.onDidStart,p)(this.onSashStart,this),w=Ee.map(f.onDidChange,p)(this.onSashChange,this),_=Ee.map(f.onDidEnd,()=>this.sashItems.findIndex(N=>N.sash===f))(this.onSashEnd,this),E=f.onDidReset(()=>{let N=this.sashItems.findIndex(Z=>Z.sash===f),L=ru(N,-1),B=ru(N+1,this.viewItems.length),z=this.findFirstSnapIndex(L),Q=this.findFirstSnapIndex(B);typeof z=="number"&&!this.viewItems[z].visible||typeof Q=="number"&&!this.viewItems[Q].visible||this._onDidSashReset.fire(N)}),I=gc(A,w,_,E,f),T={sash:f,disposable:I};this.sashItems.splice(n-1,0,T)}r.appendChild(e.element);let d;typeof t!="number"&&t.type==="split"&&(d=[t.index]),o||this.relayout([n],d),!o&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=rC.Idle}}relayout(e,t){let n=this.viewItems.reduce((o,r)=>o+r.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(u=>u.size),o,r,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;let u=ru(e,-1),d=ru(e+1,this.viewItems.length);if(r)for(let T of r)_ee(u,T),_ee(d,T);if(o)for(let T of o)Kz(u,T),Kz(d,T);let h=u.map(T=>this.viewItems[T]),f=u.map(T=>n[T]),p=d.map(T=>this.viewItems[T]),g=d.map(T=>n[T]),A=u.reduce((T,N)=>T+(this.viewItems[N].minimumSize-n[N]),0),v=u.reduce((T,N)=>T+(this.viewItems[N].maximumSize-n[N]),0),w=d.length===0?Number.POSITIVE_INFINITY:d.reduce((T,N)=>T+(n[N]-this.viewItems[N].minimumSize),0),C=d.length===0?Number.NEGATIVE_INFINITY:d.reduce((T,N)=>T+(n[N]-this.viewItems[N].maximumSize),0),_=Math.max(A,C,s),E=Math.min(w,v,a),I=!1;if(l){let T=this.viewItems[l.index],N=t>=l.limitDelta;I=N!==T.visible,T.setVisible(N,l.size)}if(!I&&c){let T=this.viewItems[c.index],N=ta+l.size,0),n=this.size-t,o=ru(this.viewItems.length-1,-1),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);for(let a of s)_ee(o,a);for(let a of r)Kz(o,a);typeof e=="number"&&Kz(o,e);for(let a=0;n!==0&&at+n.size,0);let e=0;for(let t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1,t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;let n=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),o=[...this.viewItems].reverse();e=!1;let r=o.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;let s=o.map(l=>e=l.maximumSize-l.size>0||e).reverse(),a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:w&&t[l]&&(a0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(let n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),Oi(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[],super.dispose()}}});var Qft=D(()=>{});function qli(i){return{getHeight(e){return i.getHeight(e)},getTemplateId(){return vre.TemplateId}}}var vre,GNe,yre,Gft=D(()=>{Ye();Bg();ic();Kx();QNe();et();de();Qft();vre=class i{static{this.TemplateId="row"}constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=i.TemplateId,this.renderedTemplates=new Set;let o=new Map(t.map(r=>[r.templateId,r]));this.renderers=[];for(let r of e){let s=o.get(r.templateId);if(!s)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(s)}}renderTemplate(e){let t=Ae(e,xe(".monaco-table-tr")),n=[],o=[];for(let s=0;sthis.disposables.add(new GNe(u,d))),l={size:a.reduce((u,d)=>u+d.column.weight,0),views:a.map(u=>({size:u.column.weight,view:u}))};this.splitview=this.disposables.add(new eB(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;let c=new vre(o,r,u=>this.splitview.getViewSize(u));this.list=this.disposables.add(new rl(e,this.domNode,qli(n),[c],s)),Ee.any(...a.map(u=>u.onDidLayout))(([u,d])=>c.layoutColumn(u,d),null,this.disposables),this.splitview.onDidSashReset(u=>{let d=o.reduce((f,p)=>f+p.weight,0),h=o[u].weight/d*this.cachedWidth;this.splitview.resizeView(u,h)},null,this.disposables),this.styleElement=el(this.domNode),this.style(pdt)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){let t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=t.join(` -`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}});var sf,_E,nu,AL,cP=D(()=>{(function(i){i[i.Expanded=0]="Expanded",i[i.Collapsed=1]="Collapsed",i[i.PreserveOrExpanded=2]="PreserveOrExpanded",i[i.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(sf||(sf={}));(function(i){i[i.Unknown=0]="Unknown",i[i.Twistie=1]="Twistie",i[i.Element=2]="Element",i[i.Filter=3]="Filter"})(_E||(_E={}));nu=class extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}},AL=class{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}});function kV(i){return typeof i=="object"&&"visibility"in i&&"data"in i}function yL(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}function _Ne(i){return typeof i.collapsible=="boolean"}var $ne,ere=D(()=>{cP();Qt();Jt();pSe();z7();et();td();$ne=class{constructor(e,t,n,r={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new ab,this._onDidChangeCollapseState=new G,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new G,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new G,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new ra(VX),this.collapseByDefault=typeof r.collapseByDefault>"u"?!1:r.collapseByDefault,this.allowNonCollapsibleParents=r.allowNonCollapsibleParents??!1,this.filter=r.filter,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=bi.empty(),r={}){if(e.length===0)throw new nu(this.user,"Invalid tree location");r.diffIdentityProvider?this.spliceSmart(r.diffIdentityProvider,e,t,n,r):this.spliceSimple(e,t,n,r)}spliceSmart(e,t,n,r=bi.empty(),o,s=o.diffDepth??0){let{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,n,r,o);let l=[...r],c=t[t.length-1],u=new sx({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+n)].map(g=>e.getId(g.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,n,l,o);let d=t.slice(0,-1),h=(g,v,A)=>{if(s>0)for(let w=0;wA.originalStart-v.originalStart))h(f,p,f-(g.originalStart+g.originalLength)),f=g.originalStart,p=g.modifiedStart-c,this.spliceSimple([...d,f],g.originalLength,bi.slice(l,p,p+g.modifiedLength),o);h(f,p,f)}spliceSimple(e,t,n=bi.empty(),{onDidCreateNode:r,onDidDeleteNode:o,diffIdentityProvider:s}){let{parentNode:a,listIndex:l,revealed:c,visible:u}=this.getParentNodeWithListIndex(e),d=[],h=bi.map(n,E=>this.createTreeNode(E,a,a.visible?1:0,c,d,r)),f=e[e.length-1],p=0;for(let E=f;E>=0&&Es.getId(E.element).toString())):a.lastDiffIds=a.children.map(E=>s.getId(E.element).toString()):a.lastDiffIds=void 0;let C=0;for(let E of w)E.visible&&C++;if(C!==0)for(let E=f+g.length;EI+(T.visible?T.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,A-E),this.list.splice(l,E,d)}if(w.length>0&&o){let E=I=>{o(I),I.children.forEach(E)};w.forEach(E)}this._onDidSplice.fire({insertedNodes:g,deletedNodes:w});let _=a;for(;_;){if(_.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}_=_.parent}}rerender(e){if(e.length===0)throw new nu(this.user,"Invalid tree location");let{node:t,listIndex:n,revealed:r}=this.getTreeNodeWithListIndex(e);t.visible&&r&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:n,revealed:r}=this.getTreeNodeWithListIndex(e);return n&&r?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);let r={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){let r=this.getTreeNode(e);typeof t>"u"&&(t=!r.collapsed);let o={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,t){let{node:n,listIndex:r,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(n,r,o,t);if(n!==this.root&&this.autoExpandSingleChildren&&s&&!_Ne(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return s}_setListNodeCollapseState(e,t,n,r){let o=this._setNodeCollapseState(e,r,!1);if(!n||!e.visible||!o)return o;let s=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=s-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),o}_setNodeCollapseState(e,t,n){let r;if(e===this.root?r=!1:(_Ne(t)?(r=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(r=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):r=!1,r&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!_Ne(t)&&t.recursive)for(let o of e.children)r=this._setNodeCollapseState(o,t,!0)||r;return r}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,n,r,o,s){let a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,n);a.visibility=l,r&&o.push(a);let c=e.children||bi.empty(),u=r&&l!==0&&!a.collapsed,d=0,h=1;for(let f of c){let p=this.createTreeNode(f,a,l,u,o,s);a.children.push(p),h+=p.renderNodeCount,p.visible&&(p.visibleChildIndex=d++)}return this.allowNonCollapsibleParents||(a.collapsible=a.collapsible||a.children.length>0),a.visibleChildrenCount=d,a.visible=l===2?d>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,r&&o.pop()),s?.(a),a}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,r=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),o===0)return e.visible=!1,e.renderNodeCount=0,!1;r&&n.push(e)}let s=n.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||o!==0){let l=0;for(let c of e.children)a=this._updateNodeAfterFilterChange(c,o,n,r&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=o===2?a:o===1,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=n.length-s):(e.renderNodeCount=0,r&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):kV(n)?(e.filterData=n.data,yL(n.visibility)):(e.filterData=void 0,yL(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;let[n,...r]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(r,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;let[n,...r]=e;if(n<0||n>t.children.length)throw new nu(this.user,"Invalid tree location");return this.getTreeNode(r,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:n,revealed:r,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new nu(this.user,"Invalid tree location");let a=t.children[s];return{node:a,listIndex:n,revealed:r,visible:o&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,r=!0,o=!0){let[s,...a]=e;if(s<0||s>t.children.length)throw new nu(this.user,"Invalid tree location");for(let l=0;l{});function SNe(i){return i instanceof wx?new ENe(i):i}function evi(i,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new DNe(i,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(t){let n=i(),r=n.getNodeLocation(t),o=n.getParentNodeLocation(r);return n.getNode(o).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}}}function tvi(i,e){return i.position===e.position&&Hmt(i,e)}function Hmt(i,e){return i.node.element===e.node.element&&i.startIndex===e.startIndex&&i.height===e.height&&i.endIndex===e.endIndex}function tre(i){let e=_E.Unknown;return pZ(i.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=_E.Twistie:pZ(i.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=_E.Element:pZ(i.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=_E.Filter),{browserEvent:i.browserEvent,element:i.element?i.element.element:null,target:e}}function ivi(i){let e=TO(i.browserEvent.target);return{element:i.element?i.element.element:null,browserEvent:i.browserEvent,anchor:i.anchor,isStickyScroll:e}}function ire(i,e){e(i),i.children.forEach(t=>ire(t,e))}var ENe,DNe,uP,wL,TNe,kNe,INe,Xy,SE,LNe,NNe,MNe,nre,RNe,FNe,IV,ONe,PNe,dP,hP=D(()=>{Ye();jb();gc();Dg();qne();Gne();lie();_x();eP();ere();cP();$a();Qt();Jt();er();Dr();ql();et();yg();ae();PI();gn();Vmt();Oe();Zl();Tn();Yl();ENe=class extends wx{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};DNe=class{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=W.None,this.disposables=new te}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(SNe(e),t)}onDragOver(e,t,n,r,o,s=!0){let a=this.dnd.onDragOver(SNe(e),t&&t.element,n,r,o),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=Bp(()=>{let f=this.modelProvider(),p=f.getNodeLocation(t);f.isCollapsed(p)&&f.setCollapsed(p,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!s){let f=typeof a=="boolean"?a:a.accept,p=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:p,feedback:[n]}}return a}if(a.bubble===1){let f=this.modelProvider(),p=f.getNodeLocation(t),g=f.getParentNodeLocation(p),v=f.getNode(g),A=g&&f.getListIndex(g);return this.onDragOver(e,v,A,r,o,!1)}let c=this.modelProvider(),u=c.getNodeLocation(t),d=c.getListIndex(u),h=c.getListRenderCount(u);return{...a,feedback:Xc(d,d+h)}}drop(e,t,n,r,o){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(SNe(e),t&&t.element,n,r,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}};uP=class{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}};(function(i){i.None="none",i.OnHover="onHover",i.Always="always"})(wL||(wL={}));TNe=class{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new te,this.onDidChange=Se.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}},kNe=class i{static{this.DefaultIndent=8}constructor(e,t,n,r,o,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=r,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=i.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=W.None,this.disposables=new te,this.templateId=e.templateId,this.updateOptions(s),Se.map(n,a=>a.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){let t=El(e.indent,0,40);if(t!==this.indent){this.indent=t;for(let[n,r]of this.renderedNodes)this.renderTreeElement(n,r)}}if(typeof e.renderIndentGuides<"u"){let t=e.renderIndentGuides!==wL.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(let[n,r]of this.renderedNodes)this._renderIndentGuides(n,r);if(this.indentGuidesDisposable.dispose(),t){let n=new te;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=be(e,we(".monaco-tl-row")),n=be(t,we(".monaco-tl-indent")),r=be(t,we(".monaco-tl-twistie")),o=be(t,we(".monaco-tl-contents")),s=this.renderer.renderTemplate(o);return{container:e,indent:n,twistie:r,indentGuidesDisposable:W.None,templateData:s}}renderElement(e,t,n,r){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,r)}disposeElement(e,t,n,r){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,n.templateData,r),typeof r=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){let n=i.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${n}px`,t.indent.style.width=`${n+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...ut.asClassNameArray(Ee.treeItemExpanded));let r=!1;this.renderer.renderTwistie&&(r=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(r||t.twistie.classList.add(...ut.asClassNameArray(Ee.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(_o(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let n=new te,r=this.modelProvider();for(;;){let o=r.getNodeLocation(e),s=r.getParentNodeLocation(o);if(!s)break;let a=r.getNode(s),l=we(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),n.add(Ve(()=>this.renderedIndentGuides.delete(a,l))),e=a}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set,n=this.modelProvider();e.forEach(r=>{let o=n.getNodeLocation(r);try{let s=n.getParentNodeLocation(o);r.collapsible&&r.children.length>0&&!r.collapsed?t.add(r):s&&t.add(n.getNode(s))}catch{}}),this.activeIndentNodes.forEach(r=>{t.has(r)||this.renderedIndentGuides.forEach(r,o=>o.classList.remove("active"))}),t.forEach(r=>{this.activeIndentNodes.has(r)||this.renderedIndentGuides.forEach(r,o=>o.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Vi(this.disposables)}},INe=class{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new te,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let n=1;if(this._filter){let s=this._filter.filter(e,t);if(typeof s=="boolean"?n=s?1:0:kV(s)?n=yL(s.visibility):n=s,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Jh.Default,visibility:n};let r=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(r)?r:[r];for(let s of o){let a=s&&s.toString();if(typeof a>"u")return{data:Jh.Default,visibility:n};let l;if(this.tree.findMatchType===SE.Contiguous){let c=a.toLowerCase().indexOf(this._lowercasePattern);if(c>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let u=this._lowercasePattern.length;u>0;u--)l.push(c+u-1)}}else l=Cy(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,o.length===1?{data:l,visibility:n}:{data:{label:a,score:l},visibility:n}}return this.tree.findMode===Xy.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:Jh.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Vi(this.disposables)}};(function(i){i[i.Highlight=0]="Highlight",i[i.Filter=1]="Filter"})(Xy||(Xy={}));(function(i){i[i.Fuzzy=0]="Fuzzy",i[i.Contiguous=1]="Contiguous"})(SE||(SE={}));LNe=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,r,o,s={}){this.tree=e,this.view=n,this.filter=r,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new G,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new G,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new G,this._onDidChangeOpenState=new G,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new te,this.disposables=new te,this._mode=e.options.defaultFindMode??Xy.Highlight,this._matchType=e.options.defaultFindMatchType??SE.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){let e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&e?(gs(y("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:y("not found","No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&gs(y("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Jh.isDefault(e.filterData)}layout(e){this.width=e,this.widget?.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};NNe=class{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Zi(this.stickyNodes,e.stickyNodes,tvi)}lastNodePartiallyVisible(){if(this.count===0)return!1;let e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!Zi(this.stickyNodes,e.stickyNodes,Hmt)||this.count===0)return!1;let t=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return t.position!==n.position}},MNe=class{constrainStickyScrollNodes(e,t,n){for(let r=0;rn||r>=t)return e.slice(0,r)}return e}},nre=class extends W{constructor(e,t,n,r,o,s={}){super(),this.tree=e,this.model=t,this.view=n,this.treeDelegate=o,this.maxWidgetViewRatio=.4;let a=this.validateStickySettings(s);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=s.stickyScrollDelegate??new MNe,this._widget=this._register(new RNe(n.getScrollableElement(),n,e,r,o,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(e===0?t=this.view.firstVisibleIndex:t=this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],n=e,r=0,o=this.getNextStickyNode(n,void 0,r);for(;o&&(t.push(o),r+=o.height,!(t.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(o),!n)));)o=this.getNextStickyNode(n,o.node,r);let s=this.constrainStickyNodes(t);return s.length?new NNe(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,n){let r=this.getAncestorUnderPrevious(e,t);if(r&&!(r===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(r,n)}nodeTopAlignsWithStickyNodesBottom(e,t){let n=this.getNodeIndex(e),r=this.view.getElementTop(n),o=t;return this.view.scrollTop===r-o}createStickyScrollNode(e,t){let n=this.treeDelegate.getHeight(e),{startIndex:r,endIndex:o}=this.getNodeRange(e),s=this.calculateStickyNodePosition(o,t,n);return{node:e,position:s,height:n,startIndex:r,endIndex:o}}getAncestorUnderPrevious(e,t=void 0){let n=e,r=this.getParentNode(n);for(;r;){if(r===t)return n;n=r,r=this.getParentNode(n)}if(t===void 0)return n}calculateStickyNodePosition(e,t,n){let r=this.view.getRelativeTop(e);if(r===null&&this.view.firstVisibleIndex===e&&e+1l&&t<=l?l-n:t}constrainStickyNodes(e){if(e.length===0)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=t)return e;let r=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!r.length)return[];let o=r[r.length-1];if(r.length>this.stickyScrollMaxItemCount||o.position+o.height>t)throw new Error("stickyScrollDelegate violates constraints");return r}getParentNode(e){let t=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(t);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),n=this.model.getListIndex(t);if(n<0)throw new Error("Node not found in tree");let r=this.model.getListRenderCount(t),o=n+r-1;return{startIndex:n,endIndex:o}}nodePositionTopBelowWidget(e){let t=[],n=this.getParentNode(e);for(;n;)t.push(n),n=this.getParentNode(n);let r=0;for(let o=0;o0,n=!!e&&e.count>0;if(!t&&!n||t&&n&&this._previousState.equal(e))return;if(t!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let r=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${r.position}px`;else{this._previousStateDisposables.clear();let o=Array(e.count);for(let s=e.count-1;s>=0;s--){let a=e.stickyNodes[s],{element:l,disposable:c}=this.createElement(a,s,e.count);o[s]=l,this._rootDomNode.appendChild(l),this._previousStateDisposables.add(c)}this.stickyScrollFocus.updateElements(o,e),this._previousElements=o}this._previousState=e,this._rootDomNode.style.height=`${r.position+r.height}px`}createElement(e,t,n){let r=e.startIndex,o=document.createElement("div");o.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(o.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(o.style.lineHeight=`${e.height}px`),o.classList.add("monaco-tree-sticky-row"),o.classList.add("monaco-list-row"),o.setAttribute("data-index",`${r}`),o.setAttribute("data-parity",r%2===0?"even":"odd"),o.setAttribute("id",this.view.getElementID(r));let s=this.setAccessibilityAttributes(o,e.node.element,t,n),a=this.treeDelegate.getTemplateId(e.node),l=this.treeRenderers.find(h=>h.templateId===a);if(!l)throw new Error(`No renderer found for template id ${a}`);let c=e.node;c===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(c=new Proxy(e.node,{}));let u=l.renderTemplate(o);l.renderElement(c,e.startIndex,u,e.height);let d=Ve(()=>{s.dispose(),l.disposeElement(c,e.startIndex,u,e.height),l.disposeTemplate(u),o.remove()});return{element:o,disposable:d}}setAccessibilityAttributes(e,t,n,r){if(!this.accessibilityProvider)return W.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,n,r))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");let o=this.accessibilityProvider.getAriaLabel(t),s=o&&typeof o!="string"?o:Xl(o),a=_t(c=>{let u=c.readObservable(s);u?e.setAttribute("aria-label",u):e.removeAttribute("aria-label")});typeof o=="string"||o&&e.setAttribute("aria-label",o.get());let l=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return typeof l=="number"&&e.setAttribute("aria-level",`${l}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}},FNe=class extends W{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new G,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new G,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(re(this.container,"focus",()=>this.onFocus())),this._register(re(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){let t=e.browserEvent.target;if(!TO(t)&&!DO(t)){this.focusedLast()&&this.view.domFocus();return}if(!Lb(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");let s=this.state.stickyNodes.findIndex(a=>a.node.element===e.element?.element);if(s===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(s);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let r=this.state.stickyNodes[this.focusedIndex].node.element,o=this.elements[this.focusedIndex];this._onContextMenu.fire({element:r,anchor:o,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){let t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;!TO(t)&&!DO(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");let n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let r=El(n,0,t.count-1);this.setFocus(r)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,o=this.view.getElementTop(e),s=r?r.position+r.height+n.height:n.height;this.view.scrollTop=o-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}};IV=class{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new G,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&Zi(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let r=this;this._onDidChange.fire({get elements(){return r.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let l=this.createNodeSet(),c=u=>l.delete(u);t.forEach(u=>ire(u,c)),this.set([...l.values()]);return}let n=new Set,r=l=>n.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>ire(l,r));let o=new Map,s=l=>o.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>ire(l,s));let a=[];for(let l of this.nodes){let c=this.identityProvider.getId(l.element).toString();if(!n.has(c))a.push(l);else{let d=o.get(c);d&&d.visible&&a.push(d)}}if(this.nodes.length>0&&a.length===0){let l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}},ONe=class extends Qz{constructor(e,t,n){super(e),this.tree=t,this.stickyScrollProvider=n}onViewPointer(e){if(RIe(e.browserEvent.target)||Cx(e.browserEvent.target)||_O(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let n=e.browserEvent.target,r=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=DO(e.browserEvent.target),s=!1;if(o?s=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,o)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!r&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!o||r)){let a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),r){e.browserEvent.isHandledByList=!0;return}}o||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(oft(e.browserEvent.target)||sft(e.browserEvent.target))return;let n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");let r=this.list.indexOf(t),o=this.list.getElementTop(r),s=n.nodePositionTopBelowWidget(t);this.tree.scrollTop=o-s,this.list.domFocus(),this.list.setFocus([r]),this.list.setSelection([r])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){let t=e.browserEvent.target;if(!TO(t)&&!DO(t)){super.onMouseDown(e);return}}onContextMenu(e){let t=e.browserEvent.target;if(!TO(t)&&!DO(t)){super.onContextMenu(e);return}}},PNe=class extends il{constructor(e,t,n,r,o,s,a,l){super(e,t,n,r,l),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=a}createMouseController(e){return new ONe(this,e.tree,e.stickyScrollProvider)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;let r=[],o=[],s;n.forEach((a,l)=>{this.focusTrait.has(a)&&r.push(e+l),this.selectionTrait.has(a)&&o.push(e+l),this.anchorTrait.has(a)&&(s=e+l)}),r.length>0&&super.setFocus(Uh([...super.getFocus(),...r])),o.length>0&&super.setSelection(Uh([...super.getSelection(),...o])),typeof s=="number"&&super.setAnchor(s)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(r=>this.element(r)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(r=>this.element(r)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}},dP=class{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Se.filter(Se.map(this.view.onMouseDblClick,tre),e=>e.target!==_E.Filter)}get onMouseOver(){return Se.map(this.view.onMouseOver,tre)}get onMouseOut(){return Se.map(this.view.onMouseOut,tre)}get onContextMenu(){return Se.any(Se.filter(Se.map(this.view.onContextMenu,ivi),e=>!e.isStickyScroll),this.stickyScrollController?.onContextMenu??Se.None)}get onPointer(){return Se.map(this.view.onPointer,tre)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Se.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??Xy.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){return this.findController?.matchType??SE.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,r,o={}){this._user=e,this._options=o,this.eventBufferer=new ab,this.onDidChangeFindOpenState=Se.None,this.onDidChangeStickyScrollFocused=Se.None,this.disposables=new te,this._onWillRefilter=new G,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new G,this.treeDelegate=new uP(n);let s=new F5,a=new F5,l=this.disposables.add(new TNe(a.event)),c=new HS;this.renderers=r.map(p=>new kNe(p,()=>this.model,s.event,l,c,o));for(let p of this.renderers)this.disposables.add(p);let u;o.keyboardNavigationLabelProvider&&(u=new INe(this,o.keyboardNavigationLabelProvider,o.filter),o={...o,filter:u},this.disposables.add(u)),this.focus=new IV(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new IV(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new IV(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new PNe(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...evi(()=>this.model,o),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,o),s.input=this.model.onDidChangeCollapseState;let d=Se.forEach(this.model.onDidSplice,p=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(p),this.selection.onDidModelSplice(p)})},this.disposables);d(()=>null,null,this.disposables);let h=this.disposables.add(new G),f=this.disposables.add(new ra(0));if(this.disposables.add(Se.any(d,this.focus.onDidChange,this.selection.onDidChange)(()=>{f.trigger(()=>{let p=new Set;for(let g of this.focus.getNodes())p.add(g);for(let g of this.selection.getNodes())p.add(g);h.fire([...p.values()])})})),a.input=h.event,o.keyboardSupport!==!1){let p=Se.chain(this.view.onKeyDown,g=>g.filter(v=>!Cx(v.target)).map(v=>new Wi(v)));Se.chain(p,g=>g.filter(v=>v.keyCode===15))(this.onLeftArrow,this,this.disposables),Se.chain(p,g=>g.filter(v=>v.keyCode===17))(this.onRightArrow,this,this.disposables),Se.chain(p,g=>g.filter(v=>v.keyCode===10))(this.onSpace,this,this.disposables)}if((o.findWidgetEnabled??!0)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){let p=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new LNe(this,this.model,this.view,u,o.contextViewProvider,p),this.focusNavigationFilter=g=>this.findController.shouldAllowFocus(g),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Se.None,this.onDidChangeFindMatchType=Se.None;o.enableStickyScroll&&(this.stickyScrollController=new nre(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=Xa(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===wL.Always)}updateOptions(e={}){this._options={...this._options,...e};for(let t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===wL.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new nre(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Se.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t),Tp(t)&&this.findController?.layout(t)}style(e){let t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));let r=e.treeStickyScrollBackground??e.listBackground;r&&(n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${r}; }`),n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${r}; }`)),e.treeStickyScrollBorder&&n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let o=sg(e.listFocusAndSelectionOutline,sg(e.listSelectionOutline,e.listFocusOutline??""));o&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=n.join(` -`),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(o=>this.model.getNode(o));this.selection.set(n,t);let r=e.map(o=>this.model.getListIndex(o)).filter(o=>o>-1);this.view.setSelection(r,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(o=>this.model.getNode(o));this.focus.set(n,t);let r=e.map(o=>this.model.getListIndex(o)).filter(o=>o>-1);this.view.setFocus(r,t,!0)})}focusNext(e=1,t=!1,n,r=Lb(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,n,r)}focusPrevious(e=1,t=!1,n,r=Lb(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,n,r)}focusNextPage(e,t=Lb(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=Lb(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=Lb(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=Lb(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,t);else{let r=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,t,r)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],r=this.model.getNodeLocation(n);if(!this.model.setCollapsed(r,!0)){let s=this.model.getParentNodeLocation(r);if(!s)return;let a=this.model.getListIndex(s);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],r=this.model.getNodeLocation(n);if(!this.model.setCollapsed(r,!1)){if(!n.children.some(l=>l.visible))return;let[s]=this.view.getFocus(),a=s+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],r=this.model.getNodeLocation(n),o=e.browserEvent.altKey;this.model.setCollapsed(r,void 0,o)}dispose(){Vi(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}});var EE,rre=D(()=>{ere();cP();td();EE=class{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new $ne(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(r,o){return n.sorter.compare(r.element,o.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=bi.empty(),n={}){let r=this.getElementLocation(e);this._setChildren(r,this.preserveCollapseState(t),n)}_setChildren(e,t=bi.empty(),n){let r=new Set,o=new Set,s=l=>{if(l.element===null)return;let c=l;if(r.add(c.element),this.nodes.set(c.element,c),this.identityProvider){let u=this.identityProvider.getId(c.element).toString();o.add(u),this.nodesByIdentity.set(u,c)}n.onDidCreateNode?.(c)},a=l=>{if(l.element===null)return;let c=l;if(r.has(c.element)||this.nodes.delete(c.element),this.identityProvider){let u=this.identityProvider.getId(c.element).toString();o.has(u)||this.nodesByIdentity.delete(u)}n.onDidDeleteNode?.(c)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...n,onDidCreateNode:s,onDidDeleteNode:a})}preserveCollapseState(e=bi.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),bi.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){let s=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(s)}if(!n){let s;return typeof t.collapsed>"u"?s=void 0:t.collapsed===sf.Collapsed||t.collapsed===sf.PreserveOrCollapsed?s=!0:t.collapsed===sf.Expanded||t.collapsed===sf.PreserveOrExpanded?s=!1:s=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:s}}let r=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible,o;return typeof t.collapsed>"u"||t.collapsed===sf.PreserveOrCollapsed||t.collapsed===sf.PreserveOrExpanded?o=n.collapsed:t.collapsed===sf.Collapsed?o=!0:t.collapsed===sf.Expanded?o=!1:o=!!t.collapsed,{...t,collapsible:r,collapsed:o,children:this.preserveCollapseState(t.children)}})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let r=this.getElementLocation(e);return this.model.setCollapsed(r,t,n)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new nu(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new nu(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new nu(this.user,`Tree element not found: ${e}`);let n=this.model.getNodeLocation(t),r=this.model.getParentNodeLocation(n);return this.model.getNode(r).element}getElementLocation(e){if(e===null)return[];let t=this.nodes.get(e);if(!t)throw new nu(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}});function ore(i){let e=[i.element],t=i.incompressible||!1;return{element:{elements:e,incompressible:t},children:bi.map(bi.from(i.children),ore),collapsible:i.collapsible,collapsed:i.collapsed}}function sre(i){let e=[i.element],t=i.incompressible||!1,n,r;for(;[r,n]=bi.consume(bi.from(i.children),2),!(r.length!==1||r[0].incompressible);)i=r[0],e.push(i.element);return{element:{elements:e,incompressible:t},children:bi.map(bi.concat(r,n),sre),collapsible:i.collapsible,collapsed:i.collapsed}}function BNe(i,e=0){let t;return eBNe(n,0)),e===0&&i.element.incompressible?{element:i.element.elements[e],children:t,incompressible:!0,collapsible:i.collapsible,collapsed:i.collapsed}:{element:i.element.elements[e],children:t,collapsible:i.collapsible,collapsed:i.collapsed}}function Wmt(i){return BNe(i,0)}function Umt(i,e,t){return i.element===e?{...i,children:t}:{...i,children:bi.map(bi.from(i.children),n=>Umt(n,e,t))}}function ovi(i,e){return{splice(t,n,r){e.splice(t,n,r.map(o=>i.map(o)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function svi(i,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(i(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){return e.filter.filter(i(t),n)}}}}var nvi,zNe,rvi,VNe,are,jmt=D(()=>{rre();cP();Qt();et();td();nvi=i=>({getId(e){return e.elements.map(t=>i.getId(t).toString()).join("\0")}}),zNe=class{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new EE(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,t=bi.empty(),n){let r=n.diffIdentityProvider&&nvi(n.diffIdentityProvider);if(e===null){let p=bi.map(t,this.enabled?sre:ore);this._setChildren(null,p,{diffIdentityProvider:r,diffDepth:1/0});return}let o=this.nodes.get(e);if(!o)throw new nu(this.user,"Unknown compressed tree node");let s=this.model.getNode(o),a=this.model.getParentNodeLocation(o),l=this.model.getNode(a),c=Wmt(s),u=Umt(c,e,t),d=(this.enabled?sre:ore)(u),h=n.diffIdentityProvider?((p,g)=>n.diffIdentityProvider.getId(p)===n.diffIdentityProvider.getId(g)):void 0;if(Zi(d.element.elements,s.element.elements,h)){this._setChildren(o,d.children||bi.empty(),{diffIdentityProvider:r,diffDepth:1});return}let f=l.children.map(p=>p===s?d:p);this._setChildren(l.element,f,{diffIdentityProvider:r,diffDepth:s.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let n=this.model.getNode().children,r=bi.map(n,Wmt),o=bi.map(r,e?sre:ore);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){let r=new Set,o=a=>{for(let l of a.element.elements)r.add(l),this.nodes.set(l,a.element)},s=a=>{for(let l of a.element.elements)r.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...n,onDidCreateNode:o,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let r=this.getCompressedNode(e);return this.model.setCollapsed(r,t,n)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;let t=this.nodes.get(e);if(!t)throw new nu(this.user,`Tree element not found: ${e}`);return t}},rvi=i=>i[i.length-1],VNe=class i{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new i(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}};are=class{get onDidSplice(){return Se.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Se.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Se.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||rvi;let r=o=>this.elementMapper(o.elements);this.nodeMapper=new AL(o=>new VNe(r,o)),this.model=new zNe(e,ovi(this.nodeMapper,t),svi(r,n))}setChildren(e,t=bi.empty(),n={}){this.model.setChildren(e,t,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}});function lvi(i,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=i().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}}}var avi,xL,lre,HNe,fP,WNe=D(()=>{hP();jmt();rre();ZS();td();avi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xL=class extends dP{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,r,o={}){super(e,t,n,r,o),this.user=e}setChildren(e,t=bi.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new EE(e,t,n)}},lre=class{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,r){let o=this.stickyScrollDelegate.getCompressedNode(e);o||(o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),o.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,r)):(n.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,n.data,r))}disposeElement(e,t,n,r){n.compressedTreeNode?this.renderer.disposeCompressedElements?.(n.compressedTreeNode,t,n.data,r):this.renderer.disposeElement?.(e,t,n.data,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}};avi([ro],lre.prototype,"compressedTreeNodeProvider",null);HNe=class{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let r=0;rn||r>=t-1&&tthis,a=new HNe(()=>this.model),l=r.map(c=>new lre(s,a,c));super(e,t,n,l,{...lvi(s,o),stickyScrollDelegate:a})}setChildren(e,t=bi.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new are(e,t,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}});function UNe(i){return{...i,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function QNe(i,e){return e.parent?e.parent===i?!0:QNe(i,e.parent):!1}function cvi(i,e){return i===e||QNe(i,e)||QNe(e,i)}function Qmt(i){return{browserEvent:i.browserEvent,elements:i.elements.map(e=>e.element)}}function Gmt(i){return{browserEvent:i.browserEvent,element:i.element&&i.element.element,target:i.target}}function jNe(i){return i instanceof wx?new YNe(i):i}function qmt(i){return i&&{...i,collapseByDefault:!0,identityProvider:i.identityProvider&&{getId(e){return i.identityProvider.getId(e.element)}},dnd:i.dnd&&new KNe(i.dnd),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:i.accessibilityProvider.isChecked?e=>!!i.accessibilityProvider?.isChecked(e.element):void 0,getAriaLabel(e){return i.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return i.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider.getAriaLevel&&(e=>i.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},filter:i.filter&&{filter(e,t){return i.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof i.expandOnlyOnTwistieClick>"u"?void 0:typeof i.expandOnlyOnTwistieClick!="function"?i.expandOnlyOnTwistieClick:(e=>i.expandOnlyOnTwistieClick(e.element)),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof i.defaultFindVisibility=="number"?i.defaultFindVisibility:typeof i.defaultFindVisibility>"u"?2:i.defaultFindVisibility(e.element)}}function JNe(i,e){e(i),i.children.forEach(t=>JNe(t,e))}function uvi(i){let e=i&&qmt(i);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}}}}function dvi(i){return typeof i=="boolean"?i?1:0:kV(i)?yL(i.visibility):yL(i)}var GNe,qNe,YNe,KNe,LV,XNe,ZNe,cre,Ymt=D(()=>{lie();hP();ere();WNe();cP();Jt();er();Dr();Lt();et();td();ae();gn();GNe=class i{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},qNe=class{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,r){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,r)}renderTwistie(e,t){return e.slow?(t.classList.add(...ut.asClassNameArray(Ee.treeItemLoading)),!0):(t.classList.remove(...ut.asClassNameArray(Ee.treeItemLoading)),!1)}disposeElement(e,t,n,r){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,n.templateData,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}};YNe=class extends wx{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};KNe=class{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(jNe(e),t)}onDragOver(e,t,n,r,o,s=!0){return this.dnd.onDragOver(jNe(e),t&&t.element,n,r,o)}drop(e,t,n,r,o){this.dnd.drop(jNe(e),t&&t.element,n,r,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}};LV=class{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Se.map(this.tree.onDidChangeFocus,Qmt)}get onDidChangeSelection(){return Se.map(this.tree.onDidChangeSelection,Qmt)}get onMouseDblClick(){return Se.map(this.tree.onMouseDblClick,Gmt)}get onPointer(){return Se.map(this.tree.onPointer,Gmt)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,r,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new G,this._onDidChangeNodeSlowState=new G,this.nodeMapper=new AL(a=>new GNe(a)),this.disposables=new te,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=a=>s.collapseByDefault?s.collapseByDefault(a)?sf.PreserveOrCollapsed:sf.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,n,r,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=UNe({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,n,r,o){let s=new uP(n),a=r.map(c=>new qNe(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=qmt(o)||{};return new xL(e,t,s,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(r=>r.cancel()),this.refreshPromises.clear(),this.root.element=e;let n=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,n=!1,r,o){if(typeof this.root.element>"u")throw new nu(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Se.toPromise(this._onDidRender.event));let s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,r,o),n)try{this.tree.rerender(s)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){let n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new nu(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Se.toPromise(this._onDidRender.event));let n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await this.root.refreshPromise,await Se.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;let r=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(await this.root.refreshPromise,await Se.toPromise(this._onDidRender.event)),r}setSelection(e,t){let n=e.map(r=>this.getDataNode(r));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){let n=e.map(r=>this.getDataNode(r));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new nu(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,n,r){await this.refreshNode(e,t,n),!this.disposables.isDisposed&&this.render(e,n,r)}async refreshNode(e,t,n){let r;if(this.subTreeRefreshPromises.forEach((o,s)=>{!r&&cvi(s,e)&&(r=o.then(()=>this.refreshNode(e,t,n)))}),r)return r;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],t,n);return}return this.doRefreshSubTree(e,t,n)}async doRefreshSubTree(e,t,n){let r;e.refreshPromise=new Promise(o=>r=o),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{let o=await this.doRefreshNode(e,t,n);e.stale=!1,await WX.settled(o.map(s=>this.doRefreshSubTree(s,t,n)))}finally{r()}}async doRefreshNode(e,t,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let r;if(!e.hasChildren)r=Promise.resolve(bi.empty());else{let o=this.doGetChildren(e);if(gye(o))r=Promise.resolve(o);else{let s=Jd(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),r=o.finally(()=>s.cancel())}}try{let o=await r;return this.setChildren(e,o,t,n)}catch(o){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),ja(o))return[];throw o}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let n=this.dataSource.getChildren(e.element);return gye(n)?this.processChildren(n):(t=hr(async()=>this.processChildren(await n)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(pt))}setChildren(e,t,n,r){let o=[...t];if(e.children.length===0&&o.length===0)return[];let s=new Map,a=new Map;for(let u of e.children)s.set(u.element,u),this.identityProvider&&a.set(u.id,{node:u,collapsed:this.tree.hasElement(u)&&this.tree.isCollapsed(u)});let l=[],c=o.map(u=>{let d=!!this.dataSource.hasChildren(u);if(!this.identityProvider){let g=UNe({element:u,parent:e,hasChildren:d,defaultCollapseState:this.getDefaultCollapseState(u)});return d&&g.defaultCollapseState===sf.PreserveOrExpanded&&l.push(g),g}let h=this.identityProvider.getId(u).toString(),f=a.get(h);if(f){let g=f.node;return s.delete(g.element),this.nodes.delete(g.element),this.nodes.set(u,g),g.element=u,g.hasChildren=d,n?f.collapsed?(g.children.forEach(v=>JNe(v,A=>this.nodes.delete(A.element))),g.children.splice(0,g.children.length),g.stale=!0):l.push(g):d&&!f.collapsed&&l.push(g),g}let p=UNe({element:u,parent:e,id:h,hasChildren:d,defaultCollapseState:this.getDefaultCollapseState(u)});return r&&r.viewState.focus&&r.viewState.focus.indexOf(h)>-1&&r.focus.push(p),r&&r.viewState.selection&&r.viewState.selection.indexOf(h)>-1&&r.selection.push(p),(r&&r.viewState.expanded&&r.viewState.expanded.indexOf(h)>-1||d&&p.defaultCollapseState===sf.PreserveOrExpanded)&&l.push(p),p});for(let u of s.values())JNe(u,d=>this.nodes.delete(d.element));for(let u of c)this.nodes.set(u.element,u);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,t,n){let r=e.children.map(s=>this.asTreeElement(s,t)),o=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(s){return n.diffIdentityProvider.getId(s.element)}}};this.tree.setChildren(e===this.root?null:e,r,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?bi.map(e.children,r=>this.asTreeElement(r,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}},XNe=class i{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},ZNe=class{constructor(e,t,n,r){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=r,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,r){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,r)}renderCompressedElements(e,t,n,r){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,r)}renderTwistie(e,t){return e.slow?(t.classList.add(...ut.asClassNameArray(Ee.treeItemLoading)),!0):(t.classList.remove(...ut.asClassNameArray(Ee.treeItemLoading)),!1)}disposeElement(e,t,n,r){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,n.templateData,r)}disposeCompressedElements(e,t,n,r){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,n.templateData,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Vi(this.disposables)}};cre=class extends LV{constructor(e,t,n,r,o,s,a={}){super(e,t,n,o,s,a),this.compressionDelegate=r,this.compressibleNodeMapper=new AL(l=>new XNe(l)),this.filter=a.filter}createTree(e,t,n,r,o){let s=new uP(n),a=r.map(c=>new ZNe(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=uvi(o)||{};return new fP(e,t,s,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,n){if(!this.identityProvider)return super.render(e,t);let r=f=>this.identityProvider.getId(f).toString(),o=f=>{let p=new Set;for(let g of f){let v=this.tree.getCompressedTreeNode(g===this.root?null:g);if(v.element)for(let A of v.element.elements)p.add(r(A.element))}return p},s=o(this.tree.getSelection()),a=o(this.tree.getFocus());super.render(e,t,n);let l=this.getSelection(),c=!1,u=this.getFocus(),d=!1,h=f=>{let p=f.element;if(p)for(let g=0;g{let n=this.filter.filter(t,1),r=dvi(n);if(r===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return r===1})),super.processChildren(e)}}});var ure,Kmt=D(()=>{hP();rre();ure=class extends dP{constructor(e,t,n,r,o,s={}){super(e,t,n,r,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,n){return new EE(e,t,n)}}});var hyn,fyn,NV,$Ne,pyn,myn,gyn,byn,vyn,e2e,dre,pP=D(()=>{Si();Oe();Wt();hyn=new Pe("isMac",qt,y("isMac","Whether the operating system is macOS")),fyn=new Pe("isLinux",vo,y("isLinux","Whether the operating system is Linux")),NV=new Pe("isWindows",Nr,y("isWindows","Whether the operating system is Windows")),$Ne=new Pe("isWeb",cb,y("isWeb","Whether the platform is a web browser")),pyn=new Pe("isMacNative",qt&&!cb,y("isMacNative","Whether the operating system is macOS on a non-browser platform")),myn=new Pe("isIOS",Tu,y("isIOS","Whether the operating system is iOS")),gyn=new Pe("isMobile",uY,y("isMobile","Whether the platform is a mobile web browser")),byn=new Pe("isDevelopment",!1,!0),vyn=new Pe("productQualityType","",y("productQualityType","Quality type of VS Code")),e2e="inputFocus",dre=new Pe(e2e,!1,y("inputFocus","Whether keyboard focus is inside an input box"))});function Ere(i,e){let t=i.createScoped(e.getHTMLElement());return igt.bindTo(t),t}function Dre(i,e){let t=MV.bindTo(i),n=()=>{let r=e.scrollTop===0,o=e.scrollHeight-e.renderHeight-e.scrollTop<1;r&&o?t.set("both"):r?t.set("top"):o?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}function e1(i){return i.getValue(_L)==="alt"}function Tre(i,e){let t=i.get(kt),n=i.get(ni),r=new te;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(s){return n.mightProducePrintableCharacter(s)}},smoothScrolling:!!t.getValue(Ev),mouseWheelScrollSensitivity:t.getValue(Zy),fastScrollSensitivity:t.getValue($y),multipleSelectionController:e.multipleSelectionController??r.add(new t2e(t)),keyboardNavigationEventFilter:gvi(n),scrollByPage:!!t.getValue(Sv)},r]}function gvi(i){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;let n=i.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}function sgt(i){let e=i.getValue(l2e);if(e==="highlight")return Xy.Highlight;if(e==="filter")return Xy.Filter;let t=i.getValue(pre);if(t==="simple"||t==="highlight")return Xy.Highlight;if(t==="filter")return Xy.Filter}function agt(i){let e=i.getValue(u2e);if(e==="fuzzy")return SE.Fuzzy;if(e==="contiguous")return SE.Contiguous}function OV(i,e){let t=i.get(kt),n=i.get(rh),r=i.get(Ze),o=i.get(Ne),s=()=>{let h=r.getContextKeyValue(rgt);if(h==="automatic")return Av.Automatic;if(h==="trigger")return Av.Trigger;if(r.getContextKeyValue(ogt)===!1)return Av.Trigger;let p=t.getValue(c2e);if(p==="automatic")return Av.Automatic;if(p==="trigger")return Av.Trigger},a=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!t.getValue(Ig),[l,c]=o.invokeFunction(Tre,e),u=e.paddingBottom,d=e.renderIndentGuides!==void 0?e.renderIndentGuides:t.getValue(mre);return{getTypeNavigationMode:s,disposable:c,options:{keyboardSupport:!1,...l,indent:typeof t.getValue(RV)=="number"?t.getValue(RV):void 0,renderIndentGuides:d,smoothScrolling:!!t.getValue(Ev),defaultFindMode:sgt(t),defaultFindMatchType:agt(t),horizontalScrolling:a,scrollByPage:!!t.getValue(Sv),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??t.getValue(gre)==="doubleClick",contextViewProvider:n,findWidgetStyles:xft,enableStickyScroll:!!t.getValue(bre),stickyScrollMaxItemCount:Number(t.getValue(vre))}}}var Fx,lo,np,fre,MV,Vyn,Hyn,igt,ngt,xre,r2e,o2e,s2e,a2e,Cre,hvi,_re,fvi,Sre,pvi,mvi,rgt,ogt,_L,hre,Ig,l2e,c2e,pre,Sv,u2e,RV,mre,Ev,Zy,$y,gre,bre,vre,t2e,Jmt,Xmt,Zmt,FV,Are,i2e,n2e,yre,$mt,egt,wre,tgt,CL,bvi,PV=D(()=>{Ye();Rmt();_x();zmt();hP();Ymt();Kmt();WNe();et();ae();Oe();nr();cy();Wt();pP();bd();ht();Yr();sa();By();Fx=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lo=function(i,e){return function(t,n){e(t,n,i)}},np=vt("listService"),fre=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new te,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new Gz(Xa(),"").style(Sx)),this.lists.some(r=>r.widget===e))throw new Error("Cannot register the same widget multiple times");let n={widget:e,extraContextKeys:t};return this.lists.push(n),Jk(e.getHTMLElement())&&this.setLastFocusedList(e),hc(e.onDidFocus(()=>this.setLastFocusedList(e)),Ve(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(r=>r!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}},MV=new Pe("listScrollAtBoundary","none"),Vyn=me.or(MV.isEqualTo("top"),MV.isEqualTo("both")),Hyn=me.or(MV.isEqualTo("bottom"),MV.isEqualTo("both")),igt=new Pe("listFocus",!0),ngt=new Pe("treestickyScrollFocused",!1),xre=new Pe("listSupportsMultiselect",!0),r2e=me.and(igt,me.not(e2e),ngt.negate()),o2e=new Pe("listHasSelectionOrFocus",!1),s2e=new Pe("listDoubleSelection",!1),a2e=new Pe("listMultiSelection",!1),Cre=new Pe("listSelectionNavigation",!1),hvi=new Pe("listSupportsFind",!0),_re=new Pe("treeElementCanCollapse",!1),fvi=new Pe("treeElementHasParent",!1),Sre=new Pe("treeElementCanExpand",!1),pvi=new Pe("treeElementHasChild",!1),mvi=new Pe("treeFindOpen",!1),rgt="listTypeNavigationMode",ogt="listAutomaticKeyboardNavigation";_L="workbench.list.multiSelectModifier",hre="workbench.list.openMode",Ig="workbench.list.horizontalScrolling",l2e="workbench.list.defaultFindMode",c2e="workbench.list.typeNavigationMode",pre="workbench.list.keyboardNavigation",Sv="workbench.list.scrollByPage",u2e="workbench.list.defaultFindMatchType",RV="workbench.tree.indent",mre="workbench.tree.renderIndentGuides",Ev="workbench.list.smoothScrolling",Zy="workbench.list.mouseWheelScrollSensitivity",$y="workbench.list.fastScrollSensitivity",gre="workbench.tree.expandMode",bre="workbench.tree.enableStickyScroll",vre="workbench.tree.stickyScrollMaxItemCount";t2e=class extends W{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=e1(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(_L)&&(this.useAltAsMultipleSelectionModifier=e1(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:FIe(e)}isSelectionRangeChangeEvent(e){return OIe(e)}};Jmt=class extends il{constructor(e,t,n,r,o,s,a,l,c){let u=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:!!l.getValue(Ig),[d,h]=c.invokeFunction(Tre,o);super(e,t,n,r,{keyboardSupport:!1,...d,horizontalScrolling:u}),this.disposables.add(h),this.contextKeyService=Ere(s,this),this.disposables.add(Dre(this.contextKeyService,this)),this.listSupportsMultiSelect=xre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),Cre.bindTo(this.contextKeyService).set(!!o.selectionNavigation),this.listHasSelectionOrFocus=o2e.bindTo(this.contextKeyService),this.listDoubleSelection=s2e.bindTo(this.contextKeyService),this.listMultiSelection=a2e.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=e1(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let p=this.getSelection(),g=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||g.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let p=this.getSelection(),g=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||g.length>0)})),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(_L)&&(this._useAltAsMultipleSelectionModifier=e1(l));let g={};if(p.affectsConfiguration(Ig)&&this.horizontalScrolling===void 0){let v=!!l.getValue(Ig);g={...g,horizontalScrolling:v}}if(p.affectsConfiguration(Sv)){let v=!!l.getValue(Sv);g={...g,scrollByPage:v}}if(p.affectsConfiguration(Ev)){let v=!!l.getValue(Ev);g={...g,smoothScrolling:v}}if(p.affectsConfiguration(Zy)){let v=l.getValue(Zy);g={...g,mouseWheelScrollSensitivity:v}}if(p.affectsConfiguration($y)){let v=l.getValue($y);g={...g,fastScrollSensitivity:v}}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new Are(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?wv(e):Sx)}};Jmt=Fx([lo(5,Ze),lo(6,np),lo(7,kt),lo(8,Ne)],Jmt);Xmt=class extends Kne{constructor(e,t,n,r,o,s,a,l,c){let u=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:!!l.getValue(Ig),[d,h]=c.invokeFunction(Tre,o);super(e,t,n,r,{keyboardSupport:!1,...d,horizontalScrolling:u}),this.disposables=new te,this.disposables.add(h),this.contextKeyService=Ere(s,this),this.disposables.add(Dre(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=xre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),Cre.bindTo(this.contextKeyService).set(!!o.selectionNavigation),this._useAltAsMultipleSelectionModifier=e1(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(_L)&&(this._useAltAsMultipleSelectionModifier=e1(l));let g={};if(p.affectsConfiguration(Ig)&&this.horizontalScrolling===void 0){let v=!!l.getValue(Ig);g={...g,horizontalScrolling:v}}if(p.affectsConfiguration(Sv)){let v=!!l.getValue(Sv);g={...g,scrollByPage:v}}if(p.affectsConfiguration(Ev)){let v=!!l.getValue(Ev);g={...g,smoothScrolling:v}}if(p.affectsConfiguration(Zy)){let v=l.getValue(Zy);g={...g,mouseWheelScrollSensitivity:v}}if(p.affectsConfiguration($y)){let v=l.getValue($y);g={...g,fastScrollSensitivity:v}}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new Are(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?wv(e):Sx)}dispose(){this.disposables.dispose(),super.dispose()}};Xmt=Fx([lo(5,Ze),lo(6,np),lo(7,kt),lo(8,Ne)],Xmt);Zmt=class extends Zne{constructor(e,t,n,r,o,s,a,l,c,u){let d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(Ig),[h,f]=u.invokeFunction(Tre,s);super(e,t,n,r,o,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables.add(f),this.contextKeyService=Ere(a,this),this.disposables.add(Dre(this.contextKeyService,this)),this.listSupportsMultiSelect=xre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),Cre.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=o2e.bindTo(this.contextKeyService),this.listDoubleSelection=s2e.bindTo(this.contextKeyService),this.listMultiSelection=a2e.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=e1(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let g=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(g.length>0||v.length>0),this.listMultiSelection.set(g.length>1),this.listDoubleSelection.set(g.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let g=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(g.length>0||v.length>0)})),this.disposables.add(c.onDidChangeConfiguration(g=>{g.affectsConfiguration(_L)&&(this._useAltAsMultipleSelectionModifier=e1(c));let v={};if(g.affectsConfiguration(Ig)&&this.horizontalScrolling===void 0){let A=!!c.getValue(Ig);v={...v,horizontalScrolling:A}}if(g.affectsConfiguration(Sv)){let A=!!c.getValue(Sv);v={...v,scrollByPage:A}}if(g.affectsConfiguration(Ev)){let A=!!c.getValue(Ev);v={...v,smoothScrolling:A}}if(g.affectsConfiguration(Zy)){let A=c.getValue(Zy);v={...v,mouseWheelScrollSensitivity:A}}if(g.affectsConfiguration($y)){let A=c.getValue($y);v={...v,fastScrollSensitivity:A}}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new i2e(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?wv(e):Sx)}dispose(){this.disposables.dispose(),super.dispose()}};Zmt=Fx([lo(6,Ze),lo(7,np),lo(8,kt),lo(9,Ne)],Zmt);FV=class extends W{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new G),this.onDidOpen=this._onDidOpen.event,this._register(Se.filter(this.widget.onDidChangeSelection,n=>Lb(n.browserEvent))(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof t?.openOnSingleClick!="boolean"&&t?.configurationService?(this.openOnSingleClick=t?.configurationService.getValue(hre)!=="doubleClick",this._register(t?.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(hre)&&(this.openOnSingleClick=t?.configurationService.getValue(hre)!=="doubleClick")}))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;let t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,r=typeof t.pinned=="boolean"?t.pinned:!n;this._open(this.getSelectedElement(),n,r,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;let r=t.button===1,o=!0,s=r,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,s,a,t)}onMouseDblClick(e,t){if(!t)return;let n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;let o=!1,s=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,s,a,t)}_open(e,t,n,r,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:r,element:e,browserEvent:o})}},Are=class extends FV{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}},i2e=class extends FV{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}},n2e=class extends FV{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}};yre=class extends xL{constructor(e,t,n,r,o,s,a,l,c){let{options:u,getTypeNavigationMode:d,disposable:h}=s.invokeFunction(OV,o);super(e,t,n,r,u),this.disposables.add(h),this.internals=new CL(this,o,d,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};yre=Fx([lo(5,Ne),lo(6,Ze),lo(7,np),lo(8,kt)],yre);$mt=class extends fP{constructor(e,t,n,r,o,s,a,l,c){let{options:u,getTypeNavigationMode:d,disposable:h}=s.invokeFunction(OV,o);super(e,t,n,r,u),this.disposables.add(h),this.internals=new CL(this,o,d,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};$mt=Fx([lo(5,Ne),lo(6,Ze),lo(7,np),lo(8,kt)],$mt);egt=class extends ure{constructor(e,t,n,r,o,s,a,l,c,u){let{options:d,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(OV,s);super(e,t,n,r,o,d),this.disposables.add(f),this.internals=new CL(this,s,h,s.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};egt=Fx([lo(6,Ne),lo(7,Ze),lo(8,np),lo(9,kt)],egt);wre=class extends LV{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,r,o,s,a,l,c,u){let{options:d,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(OV,s);super(e,t,n,r,o,d),this.disposables.add(f),this.internals=new CL(this,s,h,s.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};wre=Fx([lo(6,Ne),lo(7,Ze),lo(8,np),lo(9,kt)],wre);tgt=class extends cre{constructor(e,t,n,r,o,s,a,l,c,u,d){let{options:h,getTypeNavigationMode:f,disposable:p}=l.invokeFunction(OV,a);super(e,t,n,r,o,s,h),this.disposables.add(p),this.internals=new CL(this,a,f,a.overrideStyles,c,u,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};tgt=Fx([lo(7,Ne),lo(8,Ze),lo(9,np),lo(10,kt)],tgt);CL=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,r,o,s,a){this.tree=e,this.disposables=[],this.contextKeyService=Ere(o,e),this.disposables.push(Dre(this.contextKeyService,e)),this.listSupportsMultiSelect=xre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),Cre.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=hvi.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=o2e.bindTo(this.contextKeyService),this.hasDoubleSelection=s2e.bindTo(this.contextKeyService),this.hasMultiSelection=a2e.bindTo(this.contextKeyService),this.treeElementCanCollapse=_re.bindTo(this.contextKeyService),this.treeElementHasParent=fvi.bindTo(this.contextKeyService),this.treeElementCanExpand=Sre.bindTo(this.contextKeyService),this.treeElementHasChild=pvi.bindTo(this.contextKeyService),this.treeFindOpen=mvi.bindTo(this.contextKeyService),this.treeStickyScrollFocused=ngt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=e1(a),this.updateStyleOverrides(r);let c=()=>{let d=e.getFocus()[0];if(!d)return;let h=e.getNode(d);this.treeElementCanCollapse.set(h.collapsible&&!h.collapsed),this.treeElementHasParent.set(!!e.getParentElement(d)),this.treeElementCanExpand.set(h.collapsible&&h.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(d))},u=new Set;u.add(rgt),u.add(ogt),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection(()=>{let d=e.getSelection(),h=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(d.length>0||h.length>0),this.hasMultiSelection.set(d.length>1),this.hasDoubleSelection.set(d.length===2)})}),e.onDidChangeFocus(()=>{let d=e.getSelection(),h=e.getFocus();this.hasSelectionOrFocus.set(d.length>0||h.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(d=>this.treeFindOpen.set(d)),e.onDidChangeStickyScrollFocused(d=>this.treeStickyScrollFocused.set(d)),a.onDidChangeConfiguration(d=>{let h={};if(d.affectsConfiguration(_L)&&(this._useAltAsMultipleSelectionModifier=e1(a)),d.affectsConfiguration(RV)){let f=a.getValue(RV);h={...h,indent:f}}if(d.affectsConfiguration(mre)&&t.renderIndentGuides===void 0){let f=a.getValue(mre);h={...h,renderIndentGuides:f}}if(d.affectsConfiguration(Ev)){let f=!!a.getValue(Ev);h={...h,smoothScrolling:f}}if(d.affectsConfiguration(l2e)||d.affectsConfiguration(pre)){let f=sgt(a);h={...h,defaultFindMode:f}}if(d.affectsConfiguration(c2e)||d.affectsConfiguration(pre)){let f=n();h={...h,typeNavigationMode:f}}if(d.affectsConfiguration(u2e)){let f=agt(a);h={...h,defaultFindMatchType:f}}if(d.affectsConfiguration(Ig)&&t.horizontalScrolling===void 0){let f=!!a.getValue(Ig);h={...h,horizontalScrolling:f}}if(d.affectsConfiguration(Sv)){let f=!!a.getValue(Sv);h={...h,scrollByPage:f}}if(d.affectsConfiguration(gre)&&t.expandOnlyOnTwistieClick===void 0&&(h={...h,expandOnlyOnTwistieClick:a.getValue(gre)==="doubleClick"}),d.affectsConfiguration(bre)){let f=a.getValue(bre);h={...h,enableStickyScroll:f}}if(d.affectsConfiguration(vre)){let f=Math.max(1,a.getValue(vre));h={...h,stickyScrollMaxItemCount:f}}if(d.affectsConfiguration(Zy)){let f=a.getValue(Zy);h={...h,mouseWheelScrollSensitivity:f}}if(d.affectsConfiguration($y)){let f=a.getValue($y);h={...h,fastScrollSensitivity:f}}Object.keys(h).length>0&&e.updateOptions(h)}),this.contextKeyService.onDidChangeContext(d=>{d.affectsSome(u)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new n2e(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?wv(e):Sx)}dispose(){this.disposables=Vi(this.disposables)}};CL=Fx([lo(4,Ze),lo(5,np),lo(6,kt)],CL);bvi=Gi.as(xc.Configuration);bvi.registerConfiguration({id:"workbench",order:7,title:y("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[_L]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[y("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),y("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:y({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[hre]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:y({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Ig]:{type:"boolean",default:!1,description:y("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Sv]:{type:"boolean",default:!1,description:y("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[RV]:{type:"number",default:8,minimum:4,maximum:40,description:y("tree indent setting","Controls tree indentation in pixels.")},[mre]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:y("render tree indent guides","Controls whether the tree should render indent guides.")},[Ev]:{type:"boolean",default:!1,description:y("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Zy]:{type:"number",default:1,markdownDescription:y("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[$y]:{type:"number",default:5,markdownDescription:y("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[l2e]:{type:"string",enum:["highlight","filter"],enumDescriptions:[y("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),y("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:y("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[pre]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[y("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),y("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),y("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:y("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:y("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[u2e]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[y("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),y("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:y("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[gre]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:y("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[bre]:{type:"boolean",default:!0,description:y("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[vre]:{type:"number",minimum:1,default:7,markdownDescription:y("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[c2e]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:y("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})});var lgt=D(()=>{});var t1,d2e=D(()=>{Ye();_g();Zl();mx();ae();Xd();t1=class i extends W{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=t?.supportIcons??!1,this.domNode=be(e,we("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",r){e||(e=""),r&&(e=i.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&wl(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render())}render(){let e=[],t=0;for(let n of this.highlights){if(n.end===n.start)continue;if(t{r=o===`\r -`?-1:0,s+=n;for(let a of t)a.end<=s||(a.start>=s&&(a.start+=r),a.end>=s&&(a.end+=r));return n+=r,"\u23CE"})}}});function vvi(i,e,t){if(!t)return;let n=0;return i.map(r=>{let o={start:n,end:n+r.length},s=t.map(a=>Dl.intersect(o,a)).filter(a=>!Dl.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=o.end+e.length,s})}var SL,Ox,h2e,f2e,kre=D(()=>{lgt();Ye();d2e();ae();Xd();Ez();Zl();_g();gn();jI();SL=class{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||wl(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}},Ox=class extends W{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new SL(be(e,we(".monaco-icon-label")))),this.labelContainer=be(this.domNode.element,we(".monaco-icon-label-container")),this.nameContainer=be(this.labelContainer,we("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new f2e(this.nameContainer,!!t.supportIcons)):this.nameNode=new h2e(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??ko("mouse")}get element(){return this.domNode.element}setLabel(e,t,n){let r=["monaco-icon-label"],o=["monaco-icon-label-container"],s="";n&&(n.extraClasses&&r.push(...n.extraClasses),n.italic&&r.push("italic"),n.strikethrough&&r.push("strikethrough"),n.disabledCommand&&o.push("disabled"),n.title&&(typeof n.title=="string"?s+=n.title:s+=e));let a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(n?.iconPath){let l;!a||!Er(a)?(l=we(".monaco-icon-label-iconpath"),this.domNode.element.prepend(l)):l=a,l.style.backgroundImage=zp(n?.iconPath)}else a&&a.remove();if(this.domNode.classNames=r,this.domNode.element.setAttribute("aria-label",s),this.labelContainer.classList.value="",this.labelContainer.classList.add(...o),this.setupHover(n?.descriptionTitle?this.labelContainer:this.element,n?.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){let l=this.getOrCreateDescriptionNode();l instanceof t1?(l.set(t||"",n?n.descriptionMatches:void 0,void 0,n?.labelEscapeNewLines),this.setupHover(l.element,n?.descriptionTitle)):(l.textContent=t&&n?.labelEscapeNewLines?t1.escapeNewLines(t,[]):t||"",this.setupHover(l.element,n?.descriptionTitle||""),l.empty=!t)}if(n?.suffix||this.suffixNode){let l=this.getOrCreateSuffixNode();l.textContent=n?.suffix??""}}setupHover(e,t){let n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(this.hoverDelegate.showNativeHover)(function(o,s){Ea(s)?o.title=rO(s):s?.markdownNotSupportedFallback?o.title=s.markdownNotSupportedFallback:o.removeAttribute("title")})(e,t);else{let r=$l().setupManagedHover(this.hoverDelegate,e,t);r&&this.customHovers.set(e,r)}}dispose(){super.dispose();for(let e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){let e=this._register(new SL(mst(this.nameContainer,we("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new SL(be(e.element,we("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){let e=this._register(new SL(be(this.labelContainer,we("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new t1(be(e.element,we("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new SL(be(e.element,we("span.label-description"))))}return this.descriptionNode}},h2e=class{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&wl(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=be(this.container,we("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{});var Ire,Lre,i1,BV=D(()=>{Ye();_g();Zl();Lte();ae();Xd();cgt();Oe();Ire=we,Lre={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0},i1=class i extends W{constructor(e,t,n){super(),this.os=t,this.keyElements=new Set,this.options=n||Object.create(null);let r=this.options.keybindingLabelForeground;this.domNode=be(e,Ire(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register($l().setupManagedHover(ko("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&i.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let n=1;nr.length)return 1}return 0}var ugt,E1n,D1n,hgt=D(()=>{nv();ugt=new Ys(()=>{let i=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:i,collatorIsNumeric:i.resolvedOptions().numeric}}),E1n=new Ys(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),D1n=new Ys(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}))});function wvi(i,e){let{text:t,iconOffsets:n}=e;if(!n||n.length===0)return fgt(i,t);let r=Ww(t," "),o=t.length-r.length,s=fgt(i,r);if(s)for(let a of s){let l=n[a.start+o]+o;a.start+=l,a.end+=l}return s}function fgt(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t!==-1?[{start:t,end:t+i.length}]:null}function xvi(i,e,t){let n=i.labelHighlights||[],r=e.labelHighlights||[];return n.length&&!r.length?-1:!n.length&&r.length?1:n.length===0&&r.length===0?0:dgt(i.saneSortLabel,e.saneSortLabel,t)}var Ore,p2e,m2e,Dv,Nre,tc,n1,Px,g2e,b2e,Mre,Rre,Fre,mP,pgt=D(()=>{Ye();et();Oe();ht();PV();Zn();ae();rf();gc();Si();ZS();kre();BV();Dg();Pb();mn();uNe();nv();jI();hgt();Pt();hP();Jt();Lt();oh();Tn();Qt();Ore=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},p2e=function(i,e){return function(t,n){e(t,n,i)}},Dv=we,Nre=class{constructor(e,t,n){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new Ys(()=>{let r=n.label??"",o=oO(r).text.trim(),s=n.ariaLabel||[r,this.saneDescription,this.saneDetail].map(a=>Tdt(a)).filter(a=>!!a).join(", ");return{saneLabel:r,saneSortLabel:o,saneAriaLabel:s}}),this._saneDescription=n.description,this._saneTooltip=n.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}},tc=class extends Nre{constructor(e,t,n,r,o,s){super(e,t,o),this.fireButtonTriggered=n,this._onChecked=r,this.item=o,this._separator=s,this._checked=!1,this.onChecked=t?Se.map(Se.filter(this._onChecked.event,a=>a.element===this),a=>a.checked):Se.None,this._saneDetail=o.detail,this._labelHighlights=o.highlights?.label,this._descriptionHighlights=o.highlights?.description,this._detailHighlights=o.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}};(function(i){i[i.NONE=0]="NONE",i[i.MOUSE_HOVER=1]="MOUSE_HOVER",i[i.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(n1||(n1={}));Px=class extends Nre{constructor(e,t,n){super(e,!1,n),this.fireSeparatorButtonTriggered=t,this.separator=n,this.children=new Array,this.focusInsideSeparator=n1.NONE}},g2e=class{getHeight(e){return e instanceof Px?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof tc?Rre.ID:Fre.ID}},b2e=class{getWidgetAriaLabel(){return y("quickInput","Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof tc)))return{get value(){return e.checked},onDidChange:t=>e.onChecked(()=>t())}}},Mre=class{constructor(e){this.hoverDelegate=e}renderTemplate(e){let t=Object.create(null);t.toDisposeElement=new te,t.toDisposeTemplate=new te,t.entry=be(e,Dv(".quick-input-list-entry"));let n=be(t.entry,Dv("label.quick-input-list-label"));t.toDisposeTemplate.add(cn(n,De.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=be(n,Dv("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";let r=be(n,Dv(".quick-input-list-rows")),o=be(r,Dv(".quick-input-list-row")),s=be(r,Dv(".quick-input-list-row"));t.label=new Ox(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=nF(t.label.element,Dv(".quick-input-list-icon"));let a=be(o,Dv(".quick-input-list-entry-keybinding"));t.keybinding=new i1(a,Qa),t.toDisposeTemplate.add(t.keybinding);let l=be(s,Dv(".quick-input-list-label-meta"));return t.detail=new Ox(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=be(t.entry,Dv(".quick-input-list-separator")),t.actionBar=new Ns(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,n){n.toDisposeElement.clear(),n.actionBar.clear()}},Rre=class extends Mre{static{m2e=this}static{this.ID="quickpickitem"}constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return m2e.ID}renderTemplate(e){let t=super.renderTemplate(e);return t.toDisposeTemplate.add(cn(t.checkbox,De.CHANGE,n=>{t.element.checked=t.checkbox.checked})),t}renderElement(e,t,n){let r=e.element;n.element=r,r.element=n.entry??void 0;let o=r.item;n.checkbox.checked=r.checked,n.toDisposeElement.add(r.onChecked(h=>n.checkbox.checked=h)),n.checkbox.disabled=r.checkboxDisabled;let{labelHighlights:s,descriptionHighlights:a,detailHighlights:l}=r;if(o.iconPath){let h=ny(this.themeService.getColorTheme().type)?o.iconPath.dark:o.iconPath.light??o.iconPath.dark,f=Xe.revive(h);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=zp(f)}else n.icon.style.backgroundImage="",n.icon.className=o.iconClass?`quick-input-list-icon ${o.iconClass}`:"";let c;!r.saneTooltip&&r.saneDescription&&(c={markdown:{value:r.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDescription});let u={matches:s||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(u.extraClasses=o.iconClasses,u.italic=o.italic,u.strikethrough=o.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item"),n.label.setLabel(r.saneLabel,r.saneDescription,u),n.keybinding.set(o.keybinding),r.saneDetail){let h;r.saneTooltip||(h={markdown:{value:r.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(r.saneDetail,void 0,{matches:l,title:h,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";r.separator?.label?(n.separator.textContent=r.separator.label,n.separator.style.display="",this.addItemWithSeparator(r)):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!r.separator);let d=o.buttons;d&&d.length?(n.actionBar.push(d.map((h,f)=>gL(h,`id-${f}`,()=>r.fireButtonTriggered({button:h,item:r.item}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,n)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){let t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};Rre=m2e=Ore([p2e(1,Bn)],Rre);Fre=class i extends Mre{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}static{this.ID="quickpickseparator"}get templateId(){return i.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){let t=super.renderTemplate(e);return t.checkbox.style.display="none",t}renderElement(e,t,n){let r=e.element;n.element=r,r.element=n.entry??void 0,r.element.classList.toggle("focus-inside",!!r.focusInsideSeparator);let o=r.separator,{labelHighlights:s,descriptionHighlights:a,detailHighlights:l}=r;n.icon.style.backgroundImage="",n.icon.className="";let c;!r.saneTooltip&&r.saneDescription&&(c={markdown:{value:r.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDescription});let u={matches:s||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(r.saneLabel,r.saneDescription,u),r.saneDetail){let h;r.saneTooltip||(h={markdown:{value:r.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(r.saneDetail,void 0,{matches:l,title:h,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";n.separator.style.display="none",n.entry.classList.add("quick-input-list-separator-border");let d=o.buttons;d&&d.length?(n.actionBar.push(d.map((h,f)=>gL(h,`id-${f}`,()=>r.fireSeparatorButtonTriggered({button:h,separator:r.separator}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions"),this.addSeparator(r)}disposeElement(e,t,n){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,n)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){let t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}},mP=class extends W{constructor(e,t,n,r,o,s){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=n,this.accessibilityService=s,this._onKeyDown=new G,this._onLeave=new G,this.onLeave=this._onLeave.event,this._visibleCountObservable=Gt("VisibleCount",0),this.onChangedVisibleCount=Se.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=Gt("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=Se.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=Gt("CheckedCount",0),this.onChangedCheckedCount=Se.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=CO({equalsFn:Zi},new Array),this.onChangedCheckedElements=Se.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new G,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new G,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new G,this._elementCheckedEventBufferer=new ab,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new te),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=be(this.parent,Dv(".quick-input-list")),this._separatorRenderer=new Fre(t),this._itemRenderer=o.createInstance(Rre,t),this._tree=this._register(o.createInstance(yre,"QuickInput",this._container,new g2e,[this._itemRenderer,this._separatorRenderer],{filter:{filter(a){return a.hidden?0:a instanceof Px?2:1}},sorter:{compare:(a,l)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;let c=this._lastQueryString.toLowerCase();return xvi(a,l,c)}},accessibilityProvider:new b2e,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:wL.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=r,this._registerListeners()}get onDidChangeFocus(){return Se.map(this._tree.onDidChangeFocus,e=>e.elements.filter(t=>t instanceof tc).map(t=>t.item),this._store)}get onDidChangeSelection(){return Se.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(t=>t instanceof tc).map(t=>t.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown(e=>{let t=new Wi(e);t.keyCode===10&&this.toggleCheckbox(),this._onKeyDown.fire(t)}))}_registerOnContainerClick(){this._register(re(this._container,De.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(re(this._container,De.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{let e=this._itemElements.filter(t=>!t.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,t)=>t)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){let e=this._register(new GR(this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async t=>{if(VSe(t.browserEvent.target)){e.cancel();return}if(!(!VSe(t.browserEvent.relatedTarget)&&Co(t.browserEvent.relatedTarget,t.element?.element)))try{await e.trigger(async()=>{t.element instanceof tc&&this.showHover(t.element)})}catch(n){if(!ja(n))throw n}})),this._register(this._tree.onMouseOut(t=>{Co(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{let t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(let n of this._separatorRenderer.visibleSeparators){let r=n===t;!!(n.focusInsideSeparator&n1.ACTIVE_ITEM)!==r&&(r?n.focusInsideSeparator|=n1.ACTIVE_ITEM:n.focusInsideSeparator&=~n1.ACTIVE_ITEM,this._tree.rerender(n))}})),this._register(this._tree.onMouseOver(e=>{let t=e.element?this._tree.getParentElement(e.element):null;for(let n of this._separatorRenderer.visibleSeparators){if(n!==t)continue;n.focusInsideSeparator&n1.MOUSE_HOVER||(n.focusInsideSeparator|=n1.MOUSE_HOVER,this._tree.rerender(n))}})),this._register(this._tree.onMouseOut(e=>{let t=e.element?this._tree.getParentElement(e.element):null;for(let n of this._separatorRenderer.visibleSeparators){if(n!==t)continue;n.focusInsideSeparator&n1.MOUSE_HOVER&&(n.focusInsideSeparator&=~n1.MOUSE_HOVER,this._tree.rerender(n))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{let t=e.elements.filter(n=>n instanceof tc);t.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof Px&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(t=>{!t.hidden&&!t.checkboxDisabled&&(t.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let t;this._itemElements=new Array,this._elementTree=e.reduce((n,r,o)=>{let s;if(r.type==="separator"){if(!r.buttons)return n;t=new Px(o,a=>this._onSeparatorButtonTriggered.fire(a),r),s=t}else{let a=o>0?e[o-1]:void 0,l;a&&a.type==="separator"&&!a.buttons&&(t=void 0,l=a);let c=new tc(o,this._hasCheckboxes,u=>this._onButtonTriggered.fire(u),this._elementChecked,r,l);if(this._itemElements.push(c),t)return t.children.push(c),n;s=c}return n.push(s),n},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout(()=>{let n=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),r=n?.parentNode;if(n&&r){let o=n.nextSibling;n.remove(),r.insertBefore(n,o)}},0)}setFocusedElements(e){let t=e.map(n=>this._itemElements.find(r=>r.item===n)).filter(n=>!!n).filter(n=>!n.hidden);if(this._tree.setFocus(t),e.length>0){let n=this._tree.getFocus()[0];n&&this._tree.reveal(n)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){let t=e.map(n=>this._itemElements.find(r=>r.item===n)).filter(n=>!!n);this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{let t=new Set;for(let n of e)t.add(n);for(let n of this._itemElements)n.checked=t.has(n.item)})}focus(e){if(this._itemElements.length)switch(e===kr.Second&&this._itemElements.length<2&&(e=kr.First),e){case kr.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,t=>t.element instanceof tc);break;case kr.Second:{this._tree.scrollTop=0;let t=!1;this._tree.focusFirst(void 0,n=>n.element instanceof tc?t?!0:(t=!t,!1):!1);break}case kr.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,t=>t.element instanceof tc);break;case kr.Next:{let t=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,r=>r.element instanceof tc?(this._tree.reveal(r.element),!0):!1);let n=this._tree.getFocus();t.length&&t[0]===n[0]&&t[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case kr.Previous:{let t=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,r=>{if(!(r.element instanceof tc))return!1;let o=this._tree.getParentElement(r.element);return o===null||o.children[0]!==r.element?this._tree.reveal(r.element):this._tree.reveal(o),!0});let n=this._tree.getFocus();t.length&&t[0]===n[0]&&t[0]===this._itemElements[0]&&this._onLeave.fire();break}case kr.NextPage:this._tree.focusNextPage(void 0,t=>t.element instanceof tc?(this._tree.reveal(t.element),!0):!1);break;case kr.PreviousPage:this._tree.focusPreviousPage(void 0,t=>{if(!(t.element instanceof tc))return!1;let n=this._tree.getParentElement(t.element);return n===null||n.children[0]!==t.element?this._tree.reveal(t.element):this._tree.reveal(n),!0});break;case kr.NextSeparator:{let t=!1,n=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,o=>{if(t)return!0;if(o.element instanceof Px)t=!0,this._separatorRenderer.isSeparatorVisible(o.element)?this._tree.reveal(o.element.children[0]):this._tree.reveal(o.element,0);else if(o.element instanceof tc){if(o.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(o.element)?this._tree.reveal(o.element):this._tree.reveal(o.element,0),!0;if(o.element===this._elementTree[0])return this._tree.reveal(o.element,0),!0}return!1});let r=this._tree.getFocus()[0];n===r&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,o=>o.element instanceof tc));break}case kr.PreviousSeparator:{let t,n=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,r=>{if(r.element instanceof Px)n?t||(this._separatorRenderer.isSeparatorVisible(r.element)?this._tree.reveal(r.element):this._tree.reveal(r.element,0),t=r.element.children[0]):n=!0;else if(r.element instanceof tc&&!t){if(r.element.separator)this._itemRenderer.isItemWithSeparatorVisible(r.element)?this._tree.reveal(r.element):this._tree.reveal(r.element,0),t=r.element;else if(r.element===this._elementTree[0])return this._tree.reveal(r.element,0),!0}return!1}),t&&this._tree.setFocus([t]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;let t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;let r=n.index&&this._inputElements[n.index-1];n.item&&(n.separator=r&&r.type==="separator"&&!r.buttons?r:void 0)});else{let n;this._itemElements.forEach(r=>{let o;this.matchOnLabelMode==="fuzzy"?o=this.matchOnLabel?ute(e,oO(r.saneLabel))??void 0:void 0:o=this.matchOnLabel?wvi(t,oO(r.saneLabel))??void 0:void 0;let s=this.matchOnDescription?ute(e,oO(r.saneDescription||""))??void 0:void 0,a=this.matchOnDetail?ute(e,oO(r.saneDetail||""))??void 0:void 0;if(o||s||a?(r.labelHighlights=o,r.descriptionHighlights=s,r.detailHighlights=a,r.hidden=!1):(r.labelHighlights=void 0,r.descriptionHighlights=void 0,r.detailHighlights=void 0,r.hidden=r.item?!r.item.alwaysShow:!0),r.item?r.separator=void 0:r.separator&&(r.hidden=!0),!this.sortByLabel){let l=r.index&&this._inputElements[r.index-1]||void 0;l?.type==="separator"&&!l.buttons&&(n=l),n&&!r.hidden&&(r.separator=n,n=void 0)}})}return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{let e=this._tree.getFocus().filter(n=>n instanceof tc),t=this._allVisibleChecked(e);for(let n of e)n.checkboxDisabled||(n.checked=!t)})}style(e){this._tree.style(e)}toggleHover(){let e=this._tree.getFocus()[0];if(!e?.saneTooltip||!(e instanceof tc))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);let t=new te;t.add(this._tree.onDidChangeFocus(n=>{n.elements[0]instanceof tc&&this.showHover(n.elements[0])})),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){let t=new Array;for(let n of e)n instanceof Px?t.push({element:n,collapsible:!1,collapsed:!1,children:n.children.map(r=>({element:r,collapsible:!1,collapsed:!1}))}):t.push({element:n,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let n=0,r=e.length;n{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);let t=this._itemElements.filter(n=>n.checked).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)})}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:t=>{this.linkOpenerDelegate(t)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};Ore([ro],mP.prototype,"onDidChangeFocus",null);Ore([ro],mP.prototype,"onDidChangeSelection",null);mP=Ore([p2e(4,Ne),p2e(5,Cs)],mP)});function rp(i,e={}){La.registerCommandAndKeybindingRule({...bgt,...i,secondary:Cvi(i.primary,i.secondary??[],e)})}function Cvi(i,e,t={}){return t.withAltMod&&e.push(512+i),t.withCtrlMod&&(e.push(Pre+i),t.withAltMod&&e.push(512+Pre+i)),t.withCmdMod&&qt&&(e.push(2048+i),t.withCtrlMod&&e.push(2304+i),t.withAltMod&&(e.push(2560+i),t.withCtrlMod&&e.push(2816+i))),e}function sm(i,e){return t=>{let n=t.get(Na).currentQuickInput;if(n)return e&&n.quickNavigate?n.focus(e):n.focus(i)}}var bgt,Pre,mgt,ggt,vgt=D(()=>{Si();Oe();Wt();pP();nx();Hne();rf();bgt={weight:200,when:me.and(me.equals(dNe,"quickPick"),vmt),metadata:{description:y("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};Pre=qt?256:2048;rp({id:"quickInput.pageNext",primary:12,handler:sm(kr.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});rp({id:"quickInput.pagePrevious",primary:11,handler:sm(kr.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});rp({id:"quickInput.first",primary:Pre+14,handler:sm(kr.First)},{withAltMod:!0,withCmdMod:!0});rp({id:"quickInput.last",primary:Pre+13,handler:sm(kr.Last)},{withAltMod:!0,withCmdMod:!0});rp({id:"quickInput.next",primary:18,handler:sm(kr.Next)},{withCtrlMod:!0});rp({id:"quickInput.previous",primary:16,handler:sm(kr.Previous)},{withCtrlMod:!0});mgt=y("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),ggt=y("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");qt?(rp({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:sm(kr.NextSeparator,kr.Next),metadata:{description:mgt}}),rp({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:sm(kr.NextSeparator)},{withCtrlMod:!0}),rp({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:sm(kr.PreviousSeparator,kr.Previous),metadata:{description:ggt}}),rp({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:sm(kr.PreviousSeparator)},{withCtrlMod:!0})):(rp({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:sm(kr.NextSeparator,kr.Next),metadata:{description:mgt}}),rp({id:"quickInput.nextSeparator",primary:2578,handler:sm(kr.NextSeparator)}),rp({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:sm(kr.PreviousSeparator,kr.Previous),metadata:{description:ggt}}),rp({id:"quickInput.previousSeparator",primary:2576,handler:sm(kr.PreviousSeparator)}));rp({id:"quickInput.acceptInBackground",when:me.and(bgt.when,me.or(dre.negate(),xmt)),primary:17,weight:250,handler:i=>{i.get(Na).currentQuickInput?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0})});var _vi,v2e,A2e,op,Bre,Agt=D(()=>{Ye();Dg();Wne();hNe();kmt();sn();et();ae();fx();Oe();rf();Mmt();Hne();hx();ad();ht();pgt();Wt();vgt();_vi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},v2e=function(i,e){return function(t,n){e(t,n,i)}},op=we,Bre=class extends W{static{A2e=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,n,r){super(),this.options=e,this.layoutService=t,this.instantiationService=n,this.contextKeyService=r,this.enabled=!0,this.onDidAcceptEmitter=this._register(new G),this.onDidCustomEmitter=this._register(new G),this.onDidTriggerButtonEmitter=this._register(new G),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new G),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new G),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=bmt.bindTo(this.contextKeyService),this.quickInputTypeContext=Amt.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=wmt.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(Se.runAndSubscribe(qk,({window:o,disposables:s})=>this.registerKeyModsListeners(o,s),{window:Xi,disposables:this._store})),this._register(ist(o=>{this.ui&&rt(this.ui.container)===o&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))}))}registerKeyModsListeners(e,t){let n=r=>{this.keyMods.ctrlCmd=r.ctrlKey||r.metaKey,this.keyMods.alt=r.altKey};for(let r of[De.KEY_DOWN,De.KEY_UP,De.MOUSE_DOWN])t.add(re(e,r,n,!0))}getUI(e){if(this.ui)return e&&rt(this._container)!==rt(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;let t=be(this._container,op(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";let n=Xa(t),r=be(t,op(".quick-input-titlebar")),o=this._register(new Ns(r,{hoverDelegate:this.options.hoverDelegate}));o.domNode.classList.add("quick-input-left-action-bar");let s=be(r,op(".quick-input-title")),a=this._register(new Ns(r,{hoverDelegate:this.options.hoverDelegate}));a.domNode.classList.add("quick-input-right-action-bar");let l=be(t,op(".quick-input-header")),c=be(l,op("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",y("quickInput.checkAll","Toggle all checkboxes")),this._register(cn(c,De.CHANGE,U=>{let F=c.checked;B.setAllVisibleChecked(F)})),this._register(re(c,De.CLICK,U=>{(U.x||U.y)&&f.setFocus()}));let u=be(l,op(".quick-input-description")),d=be(l,op(".quick-input-and-message")),h=be(d,op(".quick-input-filter")),f=this._register(new Yne(h,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);let p=be(h,op(".quick-input-visible-count"));p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true");let g=new bL(p,{countFormat:y({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),v=be(h,op(".quick-input-count"));v.setAttribute("aria-live","polite");let A=new bL(v,{countFormat:y({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),w=this._register(new Ns(l,{hoverDelegate:this.options.hoverDelegate}));w.domNode.classList.add("quick-input-inline-action-bar");let C=be(l,op(".quick-input-action")),_=this._register(new Mx(C,this.styles.button));_.label=y("ok","OK"),this._register(_.onDidClick(U=>{this.onDidAcceptEmitter.fire()}));let E=be(l,op(".quick-input-action")),I=this._register(new Mx(E,{...this.styles.button,supportIcons:!0}));I.label=y("custom","Custom"),this._register(I.onDidClick(U=>{this.onDidCustomEmitter.fire()}));let T=be(d,op(`#${this.idPrefix}message.quick-input-message`)),L=this._register(new Une(t,this.styles.progressBar));L.getContainer().classList.add("quick-input-progress");let M=be(t,op(".quick-input-html-widget"));M.tabIndex=-1;let z=be(t,op(".quick-input-description")),H=this.idPrefix+"list",B=this._register(this.instantiationService.createInstance(mP,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,H));f.setAttribute("aria-controls",H),this._register(B.onDidChangeFocus(()=>{f.setAttribute("aria-activedescendant",B.getActiveDescendant()??"")})),this._register(B.onChangedAllVisibleChecked(U=>{c.checked=U})),this._register(B.onChangedVisibleCount(U=>{g.setCount(U)})),this._register(B.onChangedCheckedCount(U=>{A.setCount(U)})),this._register(B.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),this.controller instanceof CV&&this.controller.canSelectMany&&B.clearFocus())},0)}));let q=Yc(t);return this._register(q),this._register(re(t,De.FOCUS,U=>{let F=this.getUI();if(Co(U.relatedTarget,F.inputContainer)){let ne=F.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==ne&&this.endOfQuickInputBoxContext.set(ne)}Co(U.relatedTarget,F.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=Er(U.relatedTarget)?U.relatedTarget:void 0)},!0)),this._register(q.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(CE.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(f.onKeyDown(U=>{let F=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==F&&this.endOfQuickInputBoxContext.set(F)})),this._register(re(t,De.FOCUS,U=>{f.setFocus()})),this._register(cn(t,De.KEY_DOWN,U=>{if(!Co(U.target,M))switch(U.keyCode){case 3:Ai.stop(U,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:Ai.stop(U,!0),this.hide(CE.Gesture);break;case 2:if(!U.altKey&&!U.ctrlKey&&!U.metaKey){let F=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?F.push("input"):F.push("input[type=text]"),this.getUI().list.displayed&&F.push(".monaco-list"),this.getUI().message&&F.push(".quick-input-message a"),this.getUI().widget){if(Co(U.target,this.getUI().widget))break;F.push(".quick-input-html-widget")}let ne=t.querySelectorAll(F.join(", "));U.shiftKey&&U.target===ne[0]?(Ai.stop(U,!0),B.clearFocus()):!U.shiftKey&&Co(U.target,ne[ne.length-1])&&(Ai.stop(U,!0),ne[0].focus())}break;case 10:U.ctrlKey&&(Ai.stop(U,!0),this.getUI().list.toggleHover());break}})),this.ui={container:t,styleSheet:n,leftActionBar:o,titleBar:r,title:s,description1:z,description2:u,widget:M,rightActionBar:a,inlineActionBar:w,checkAll:c,inputContainer:d,filterContainer:h,inputBox:f,visibleCountContainer:p,visibleCount:g,countContainer:v,count:A,okContainer:C,ok:_,message:T,customButtonContainer:E,customButton:I,list:B,progressBar:L,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:U=>this.show(U),hide:()=>this.hide(),setVisibilities:U=>this.setVisibilities(U),setEnabled:U=>this.setEnabled(U),setContextKey:U=>this.options.setContextKey(U),linkOpenerDelegate:U=>this.options.linkOpenerDelegate(U)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,be(this._container,this.ui.container))}pick(e,t={},n=Ft.None){return new Promise((r,o)=>{let s=u=>{s=r,t.onKeyMods?.(a.keyMods),r(u)};if(n.isCancellationRequested){s(void 0);return}let a=this.createQuickPick({useSeparators:!0}),l,c=[a,a.onDidAccept(()=>{if(a.canSelectMany)s(a.selectedItems.slice()),a.hide();else{let u=a.activeItems[0];u&&(s(u),a.hide())}}),a.onDidChangeActive(u=>{let d=u[0];d&&t.onDidFocus&&t.onDidFocus(d)}),a.onDidChangeSelection(u=>{if(!a.canSelectMany){let d=u[0];d&&(s(d),a.hide())}}),a.onDidTriggerItemButton(u=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...u,removeItem:()=>{let d=a.items.indexOf(u.item);if(d!==-1){let h=a.items.slice(),f=h.splice(d,1),p=a.activeItems.filter(v=>v!==f[0]),g=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,p&&(a.activeItems=p),a.keepScrollPosition=g}}})),a.onDidTriggerSeparatorButton(u=>t.onDidTriggerSeparatorButton?.(u)),a.onDidChangeValue(u=>{l&&!u&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Vi(c),s(void 0)})];a.title=t.title,t.value&&(a.value=t.value),a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([u,d])=>{l=d,a.busy=!1,a.items=u,a.canSelectMany&&(a.selectedItems=u.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,u=>{o(u),a.hide()})})}createQuickPick(e={useSeparators:!1}){let t=this.getUI(!0);return new CV(t)}createInputBox(){let e=this.getUI(!0);return new zne(e)}show(e){let t=this.getUI(!0);this.onShowEmitter.fire();let n=this.controller;this.controller=e,n?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",So(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(qr.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),So(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;let r=this.options.backKeybindingLabel();Pne.tooltip=r?y("quickInput.backWithKeybinding","Back ({0})",r):y("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){let t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(let t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(let t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){let t=this.controller;if(!t)return;t.willHide(e);let n=this.ui?.container,r=n&&!mZ(n);if(this.controller=null,this.onHideEmitter.fire(),n&&(n.style.display="none"),!r){let o=this.previousFocusElement;for(;o&&!o.offsetParent;)o=o.parentElement??void 0;o?.offsetParent?(o.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;let e=this.ui.container.style,t=Math.min(this.dimension.width*.62,A2e.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){let{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:r,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=r?`1px solid ${r}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);let s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));let a=s.join(` -`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}};Bre=A2e=_vi([v2e(1,Kh),v2e(2,Ne),v2e(3,Ze)],Bre)});var Svi,zV,zre,ygt=D(()=>{sn();et();Wt();ht();hx();vd();umt();By();eo();Zn();Hne();Agt();nr();Ye();Svi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zV=function(i,e){return function(t,n){e(t,n,i)}},zre=class extends xee{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Rne))),this._quickAccess}constructor(e,t,n,r,o){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=r,this.configurationService=o,this._onShow=this._register(new G),this._onHide=this._register(new G),this.contexts=new Map}createController(e=this.layoutService,t){let n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:o=>this.setContextKey(o),linkOpenerDelegate:o=>{this.instantiationService.invokeFunction(s=>{s.get(jo).open(o,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(Vne))},r=this._register(this.instantiationService.createInstance(Bre,{...n,...t}));return r.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(o=>{rt(e.activeContainer)===rt(r.container)&&r.layout(o,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{r.isVisible()||r.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(r.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(r.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Pe(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t,n=Ft.None){return this.controller.pick(e,t,n)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:it(lEe),quickInputForeground:it(dlt),quickInputTitleBackground:it(hlt),widgetBorder:it(RZ),widgetShadow:it(ty)},inputBox:MO,toggle:NO,countBadge:bie,button:yft,progressBar:wft,keybindingLabel:Aft,list:wv({listBackground:lEe,listFocusBackground:Zw,listFocusForeground:Xw,listInactiveFocusForeground:Xw,listInactiveSelectionIconForeground:hF,listInactiveFocusBackground:Zw,listFocusOutline:Jn,listInactiveFocusOutline:Jn}),pickerGroup:{pickerGroupBorder:it(flt),pickerGroupForeground:it(HZ)}}}};zre=Svi([zV(0,Ne),zV(1,Ze),zV(2,Bn),zV(3,Kh),zV(4,kt)],zre)});var wgt,EL,y2e,Vre,VV,w2e,xgt=D(()=>{amt();et();ii();Zn();sn();ht();Wt();jTe();fs();ygt();b_();nr();wgt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EL=function(i,e){return function(t,n){e(t,n,i)}},y2e=class extends zre{constructor(e,t,n,r,o,s){super(t,n,r,new See(e.getContainerDomNode(),o),s),this.host=void 0;let a=VV.get(e);if(a){let l=a.widget;this.host={_serviceBrand:void 0,get mainContainer(){return l.getDomNode()},getContainer(){return l.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[l.getDomNode()]},get activeContainer(){return l.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Se.map(e.onDidLayoutChange,c=>({container:l.getDomNode(),dimension:c}))},get onDidChangeActiveContainer(){return Se.None},get onDidAddContainer(){return Se.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};y2e=wgt([EL(1,Ne),EL(2,Ze),EL(3,Bn),EL(4,ai),EL(5,kt)],y2e);Vre=class{get activeService(){let e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){let n=t=this.instantiationService.createInstance(y2e,e);this.mapEditorToService.set(e,t),Tf(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,n=Ft.None){return this.activeService.pick(e,t,n)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};Vre=wgt([EL(0,Ne),EL(1,ai)],Vre);VV=class i{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(i.ID)}constructor(e){this.editor=e,this.widget=new w2e(this.editor)}dispose(){this.widget.dispose()}},w2e=class i{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return i.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};Tt(VV.ID,VV,4)});function Evi(i){if(!i||!Array.isArray(i))return[];let e=[],t=0;for(let n=0,r=i.length;n{let h=Lvi(u.token,d.token);return h!==0?h:u.index-d.index});let t=0,n="000000",r="ffffff";for(;i.length>=1&&i[0].token==="";){let u=i.shift();u.fontStyle!==-1&&(t=u.fontStyle),u.foreground!==null&&(n=u.foreground),u.background!==null&&(r=u.background)}let o=new C2e;for(let u of e)o.getId(u);let s=o.getId(n),a=o.getId(r),l=new _2e(t,s,a),c=new S2e(l);for(let u=0,d=i.length;ue?1:0}function Cgt(i){let e=[];for(let t=1,n=i.length;t{Ho();x2e=class{constructor(e,t,n,r,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=r,this.background=o}};Tvi=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,C2e=class{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;let t=e.match(Tvi);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=pe.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}},HV=class{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(Evi(e),t)}static createFromParsedTokenTheme(e,t){return Dvi(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let n=this._cache.get(t);if(typeof n>"u"){let r=this._match(t),o=Ivi(t);n=(r.metadata|o<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}},kvi=/\b(comment|string|regex|regexp)\b/;_2e=class i{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}},S2e=class i{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),n,r;t===-1?(n=e,r=""):(n=e.substring(0,t),r=e.substring(t+1));let o=this._children.get(n);return typeof o<"u"?o.match(r):this._mainRule}insert(e,t,n,r){if(e===""){this._mainRule.acceptOverwrite(t,n,r);return}let o=e.indexOf("."),s,a;o===-1?(s=e,a=""):(s=e.substring(0,o),a=e.substring(o+1));let l=this._children.get(s);typeof l>"u"&&(l=new i(this._mainRule.clone()),this._children.set(s,l)),l.insert(a,t,n,r)}}});var Sgt,Egt,Dgt,Tgt,kgt=D(()=>{tm();eo();Sgt={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Vh]:"#FFFFFE",[Wp]:"#000000",[XSe]:"#E5EBF1",[sL]:"#D3D3D3",[aL]:"#939393",[r7]:"#ADD6FF4D"}},Egt={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Vh]:"#1E1E1E",[Wp]:"#D4D4D4",[XSe]:"#3A3D41",[sL]:"#404040",[aL]:"#707070",[r7]:"#ADD6FF26"}},Dgt={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Vh]:"#000000",[Wp]:"#FFFFFF",[sL]:"#FFFFFF",[aL]:"#FFFFFF"}},Tgt={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Vh]:"#FFFFFF",[Wp]:"#292929",[sL]:"#292929",[aL]:"#292929"}}});function kn(i,e,t,n){return DL.registerIcon(i,e,t,n)}function D2e(){return DL}function Mvi(){let i=yY();for(let e in i){let t="\\"+i[e].toString(16);DL.registerIcon(e,{fontCharacter:t})}}var Nvi,Igt,Lgt,E2e,DL,Mgt,Rgt,Ngt,Hre,xxn,Cxn,_xn,Sxn,sp=D(()=>{Jt();er();Q5();Dr();et();gn();mn();Oe();xZ();sa();Nvi={IconContribution:"base.contributions.icons"};(function(i){function e(t,n){let r=t.defaults;for(;ut.isThemeIcon(r);){let o=DL.getIcon(r.id);if(!o)return;r=o.defaults}return r}i.getDefinition=e})(Igt||(Igt={}));(function(i){function e(n){return{weight:n.weight,style:n.style,src:n.src.map(r=>({format:r.format,location:r.location.toString()}))}}i.toJSONObject=e;function t(n){let r=o=>Ea(o)?o:void 0;if(n&&Array.isArray(n.src)&&n.src.every(o=>Ea(o.format)&&Ea(o.location)))return{weight:r(n.weight),style:r(n.style),src:n.src.map(o=>({format:o.format,location:Xe.parse(o.location)}))}}i.fromJSONObject=t})(Lgt||(Lgt={}));E2e=class{constructor(){this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:y("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:y("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ut.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,r){let o=this.iconsById[e];if(o){if(n&&!o.description){o.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;let l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=n),this._onDidChange.fire()}return o}let s={id:e,description:n,defaults:t,deprecationMessage:r};this.iconsById[e]=s;let a={$ref:"#/definitions/icons"};return r&&(a.deprecationMessage=r),n&&(a.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(o,s)=>o.id.localeCompare(s.id),t=o=>{for(;ut.isThemeIcon(o.defaults);)o=this.iconsById[o.defaults.id];return`codicon codicon-${o?o.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let r=Object.keys(this.iconsById).map(o=>this.iconsById[o]);for(let o of r.filter(s=>!!s.description).sort(e))n.push(`||${o.id}|${ut.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(let o of r.filter(s=>!ut.isThemeIcon(s.defaults)).sort(e))n.push(`||${o.id}|`);return n.join(` -`)}},DL=new E2e;Gi.add(Nvi.IconContribution,DL);Mvi();Mgt="vscode://schemas/icons",Rgt=Gi.as($k.JSONContribution);Rgt.registerSchema(Mgt,DL.getIconSchema());Ngt=new di(()=>Rgt.notifySchemaChanged(Mgt),200);DL.onDidChange(()=>{Ngt.isScheduled()||Ngt.schedule()});Hre=kn("widget-close",Ee.close,y("widgetClose","Icon for the close action in widgets.")),xxn=kn("goto-previous-location",Ee.arrowUp,y("previousChangeIcon","Icon for goto previous editor location.")),Cxn=kn("goto-next-location",Ee.arrowDown,y("nextChangeIcon","Icon for goto next editor location.")),_xn=ut.modify(Ee.sync,"spin"),Sxn=ut.modify(Ee.loading,"spin")});function Fgt(i){let e=new te,t=e.add(new G),n=D2e();return e.add(n.onDidChange(()=>t.fire())),i&&e.add(i.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){let r=i?i.getProductIconTheme():new WV,o={},s=[],a=[];for(let l of n.getIcons()){let c=r.getIcon(l);if(!c)continue;let u=c.font,d=`--vscode-icon-${l.id}-font-family`,h=`--vscode-icon-${l.id}-content`;u?(o[u.id]=u.definition,a.push(`${d}: ${AZ(u.id)};`,`${h}: '${c.fontCharacter}';`),s.push(`.codicon-${l.id}:before { content: '${c.fontCharacter}'; font-family: ${AZ(u.id)}; }`)):(a.push(`${h}: '${c.fontCharacter}'; ${d}: 'codicon';`),s.push(`.codicon-${l.id}:before { content: '${c.fontCharacter}'; }`))}for(let l in o){let c=o[l],u=c.weight?`font-weight: ${c.weight};`:"",d=c.style?`font-style: ${c.style};`:"",h=c.src.map(f=>`${zp(f.location)} format('${f.format}')`).join(", ");s.push(`@font-face { src: ${h}; font-family: ${AZ(l)};${u}${d} font-display: block; }`)}return s.push(`:root { ${a.join(" ")} }`),s.join(` -`)}}}var WV,Ogt=D(()=>{Ye();et();ae();Dr();sp();WV=class{getIcon(e){let t=D2e(),n=e.defaults;for(;ut.isThemeIcon(n);){let r=t.getIcon(n.id);if(!r)return;n=r.defaults}return n}}});function Ure(i){return i===r1||i===TL||i===DE||i===TE}function T2e(i){switch(i){case r1:return Sgt;case TL:return Egt;case DE:return Dgt;case TE:return Tgt}}function Wre(i){let e=T2e(i);return new jre(i,e)}var r1,TL,DE,TE,Pgt,Rvi,jre,Qre,k2e=D(()=>{Ye();Ph();Ho();et();tr();BI();_gt();kgt();sa();eo();Zn();ae();Pb();Ogt();ad();r1="vs",TL="vs-dark",DE="hc-black",TE="hc-light",Pgt=Gi.as(GSe.ColorContribution),Rvi=Gi.as(WTe.ThemingContribution),jre=class{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let n=t.base;e.length>0?(Ure(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,pe.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=T2e(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,pe.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){let n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=Pgt.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case r1:return jf.LIGHT;case DE:return jf.HIGH_CONTRAST_DARK;case TE:return jf.HIGH_CONTRAST_LIGHT;default:return jf.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let o=T2e(this.themeData.base);e=o.rules,o.encodedTokensColors&&(t=o.encodedTokensColors)}let n=this.themeData.colors["editor.foreground"],r=this.themeData.colors["editor.background"];if(n||r){let o={token:""};n&&(o.foreground=n),r&&(o.background=r),e.push(o)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=HV.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){let o=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=Is.getForeground(o),a=Is.getFontStyle(o);return{foreground:s,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}};Qre=class extends W{constructor(){super(),this._onColorThemeChange=this._register(new G),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new G),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new WV,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(r1,Wre(r1)),this._knownThemes.set(TL,Wre(TL)),this._knownThemes.set(DE,Wre(DE)),this._knownThemes.set(TE,Wre(TE));let e=this._register(Fgt(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(r1),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),hSe(Xi,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Kk(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Xa(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),W.None}_registerShadowDomContainer(e){let t=Xa(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(r1),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=Xi.matchMedia("(forced-colors: active)").matches;if(e!==Bu(this._theme.type)){let t;ny(this._theme.type)?t=e?DE:TL:t=e?TE:r1,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},n={addRule:s=>{t[s]||(e.push(s),t[s]=!0)}};Rvi.getThemingParticipants().forEach(s=>s(this._theme,n,this._environment));let r=[];for(let s of Pgt.getColors()){let a=this._theme.getColor(s.id,!0);a&&r.push(`${CZ(s.id)}: ${a.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${r.join(` -`)} }`);let o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(Cgt(o)),this._themeCSS=e.join(` -`),this._updateCSS(),Wn.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}});var ru,kL=D(()=>{ht();ru=vt("themeService")});var Fvi,I2e,Gre,Bgt=D(()=>{Ye();ad();et();ae();oh();nr();Wt();hx();Fvi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},I2e=function(i,e){return function(t,n){e(t,n,i)}},Gre=class extends W{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new G,this._onDidChangeReducedMotion=new G,this._onDidChangeLinkUnderline=new G,this._accessibilityModeEnabledContext=GI.bindTo(this._contextKeyService);let r=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(r(),this._onDidChangeScreenReaderOptimized.fire()),s.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),r(),this._register(this.onDidChangeScreenReaderOptimized(()=>r()));let o=Xi.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(o),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(re(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));let t=()=>{let n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",n),this._layoutService.mainContainer.classList.toggle("enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(t=>{if(t.affectsConfiguration("accessibility.underlineLinks")){let n=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=n,this._onDidChangeLinkUnderline.fire()}}));let e=()=>{let t=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",t)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){let e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){let e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};Gre=Fvi([I2e(0,Ze),I2e(1,Kh),I2e(2,kt)],Gre)});function Ovi(i,e,t){let n=Jlt(e)?e.submenu.id:e.id,r=typeof e.title=="string"?e.title:e.title.value,o=oy({id:`hide/${i.id}/${n}`,label:y("hide.label","Hide '{0}'",r),run(){t.updateHidden(i,n,!0)}}),s=oy({id:`toggle/${i.id}/${n}`,label:r,get checked(){return!t.isHidden(i,n)},run(){t.updateHidden(i,n,!!this.checked)}});return{hide:o,toggle:s,get isHidden(){return!s.checked}}}function R2e(i,e,t,n=void 0,r=!0){return oy({id:`configureKeybinding/${t}`,label:y("configure keybinding","Configure Keybinding"),enabled:r,run(){let s=!!!e.lookupKeybinding(t)&&n?n.serialize():void 0;i.executeCommand("workbench.action.openGlobalKeybindings",`@command:${t}`+(s?` +when:${s}`:""))}})}var Kre,o1,gP,UV,qre,L2e,N2e,M2e,Yre,F2e=D(()=>{Jt();et();ae();fr();Xn();Wt();$a();yv();Qt();Oe();Yr();Kre=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},o1=function(i,e){return function(t,n){e(t,n,i)}},qre=class{constructor(e,t,n){this._commandService=e,this._keybindingService=t,this._hiddenStates=new L2e(n)}createMenu(e,t,n){return new Yre(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,t)}getMenuActions(e,t,n){let r=new Yre(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,t),o=r.getActions(n);return r.dispose(),o}resetHiddenStates(e){this._hiddenStates.reset(e)}};qre=Kre([o1(0,Oi),o1(1,ni),o1(2,ec)],qre);L2e=class{static{gP=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new te,this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(gP._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,gP._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(gP._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){let n=this._isHiddenByDefault(e,t),r=this._data[e.id]?.includes(t)??!1;return n?!r:r}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);let o=this._data[e.id];if(n)o?o.indexOf(t)<0&&o.push(t):this._data[e.id]=[t];else if(o){let s=o.indexOf(t);s>=0&&Slt(o,s),o.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(gP._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};L2e=gP=Kre([o1(0,ec)],L2e);N2e=class i{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();let e=this._sort(Zo.getMenuItems(this._id)),t;for(let n of e){let r=n.group||"";(!t||t[0]!==r)&&(t=[r,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeysAndSubmenuIds(n)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(i._fillInKbExprKeys(e.when,this._structureContextKeys),FS(e)){if(e.command.precondition&&i._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;i._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(Zo.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}},M2e=UV=class extends N2e{constructor(e,t,n,r,o,s){super(e,n),this._hiddenStates=t,this._commandService=r,this._keybindingService=o,this._contextKeyService=s,this.refresh()}createActionGroups(e){let t=[];for(let n of this._menuGroups){let[r,o]=n,s;for(let a of o)if(this._contextKeyService.contextMatchesRules(a.when)){let l=FS(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);let c=Ovi(this._id,l?a.command:a,this._hiddenStates);if(l){let u=R2e(this._commandService,this._keybindingService,a.command.id,a.when);(s??=[]).push(new Ql(a.command,a.alt,e,c,u,this._contextKeyService,this._commandService))}else{let u=new UV(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),d=go.join(...u.map(h=>h[1]));d.length>0&&(s??=[]).push(new Hb(a,c,d))}}s&&s.length>0&&t.push([r,s])}return t}_sort(e){return e.sort(UV._compareMenuItems)}static _compareMenuItems(e,t){let n=e.group,r=t.group;if(n!==r){if(n){if(!r)return-1}else return 1;if(n==="navigation")return-1;if(r==="navigation")return 1;let a=n.localeCompare(r);if(a!==0)return a}let o=e.order||0,s=t.order||0;return os?1:UV._compareTitles(FS(e)?e.command.title:e.title,FS(t)?t.command.title:t.title)}static _compareTitles(e,t){let n=typeof e=="string"?e:e.original,r=typeof t=="string"?t:t.original;return n.localeCompare(r)}};M2e=UV=Kre([o1(3,Oi),o1(4,ni),o1(5,Ze)],M2e);Yre=class{constructor(e,t,n,r,o,s){this._disposables=new te,this._menuInfo=new M2e(e,t,n.emitEventsForSubmenuChanges,r,o,s);let a=new di(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Zo.onDidChangeMenu(d=>{for(let h of this._menuInfo.allMenuIds)if(d.has(h)){a.schedule();break}}));let l=this._disposables.add(new te),c=d=>{let h=!1,f=!1,p=!1;for(let g of d)if(h=h||g.isStructuralChange,f=f||g.isEnablementChange,p=p||g.isToggleChange,h&&f&&p)break;return{menu:this,isStructuralChange:h,isEnablementChange:f,isToggleChange:p}},u=()=>{l.add(s.onDidChangeContext(d=>{let h=d.affectsSome(this._menuInfo.structureContextKeys),f=d.affectsSome(this._menuInfo.preconditionContextKeys),p=d.affectsSome(this._menuInfo.toggledContextKeys);(h||f||p)&&this._onDidChange.fire({menu:this,isStructuralChange:h,isEnablementChange:f,isToggleChange:p})})),l.add(t.onDidChange(d=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new FM({onWillAddFirstListener:u,onDidRemoveLastListener:l.clear.bind(l),delay:n.eventDebounceDelay,merge:c}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};Yre=Kre([o1(3,Oi),o1(4,ni),o1(5,Ze)],Yre)});var Pvi,zgt,O2e,Vgt,Jre,Hgt=D(()=>{Ph();Ye();ad();Jt();et();gS();ae();mn();hx();th();Pvi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zgt=function(i,e){return function(t,n){e(t,n,i)}},Vgt="application/vnd.code.resources",Jre=class extends W{static{O2e=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Vf||RX)&&this.installWebKitWriteTextWorkaround(),this._register(Se.runAndSubscribe(qk,({window:n,disposables:r})=>{r.add(re(n.document,"copy",()=>this.clearResourcesState()))},{window:Xi,disposables:this._store}))}installWebKitWriteTextWorkaround(){let e=()=>{let t=new Pp;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,Xk().navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)})};this._register(Se.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:n})=>{n.add(re(t,"click",e)),n.add(re(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.clearResourcesState(),t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await Xk().navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){let t=qw(),n=t.activeElement,r=t.body.appendChild(we("textarea",{"aria-hidden":!0}));r.style.height="1px",r.style.width="1px",r.style.position="absolute",r.value=e,r.focus(),r.select(),t.execCommand("copy"),Er(n)&&n.focus(),r.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await Xk().navigator.clipboard.readText()}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{let t=await Xk().navigator.clipboard.read();for(let n of t)if(n.types.includes(`web ${Vgt}`)){let r=await n.getType(`web ${Vgt}`);return JSON.parse(await r.text()).map(s=>Xe.from(s))}}catch{}let e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;let e=await this.readText();return mS(e.substring(0,O2e.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};Jre=O2e=Pvi([zgt(0,Kh),zgt(1,no)],Jre)});var uh,Bx=D(()=>{ht();uh=vt("clipboardService")});function Vvi(i,e){return i.allKeysContainedIn(new Set(Object.keys(e)))}function Hvi(i){for(;i;){if(i.hasAttribute(jV)){let e=i.getAttribute(jV);return e?parseInt(e,10):NaN}i=i.parentElement}return 0}function Wvi(i,e,t){i.get(Ze).createKey(String(e),Uvi(t))}function Uvi(i){return r$(i,e=>{if(typeof e=="object"&&e.$mid===1)return Xe.revive(e).toString();if(e instanceof Xe)return e.toString()})}var Bvi,zvi,jV,QV,bP,P2e,B2e,Xre,Zre,z2e,$re,eoe,V2e,Wgt=D(()=>{et();td();ae();Xd();Rte();mn();Oe();Xn();nr();Wt();Bvi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zvi=function(i,e){return function(t,n){e(t,n,i)}},jV="data-keybinding-context",QV=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){let t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},bP=class i extends QV{static{this.INSTANCE=new i}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}},P2e=class i extends QV{static{this._keyPrefix="config."}constructor(e,t,n){super(e,null),this._configurationService=t,this._values=ZI.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(r=>{if(r.source===7){let o=Array.from(this._values,([s])=>s);this._values.clear(),n.fire(new Zre(o))}else{let o=[];for(let s of r.affectedKeys){let a=`config.${s}`,l=this._values.findSuperstr(a);l!==void 0&&(o.push(...bi.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(o.push(a),this._values.delete(a))}n.fire(new Zre(o))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(i._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);let t=e.substr(i._keyPrefix.length),n=this._configurationService.getValue(t),r;switch(typeof n){case"number":case"boolean":case"string":r=n;break;default:Array.isArray(n)?r=JSON.stringify(n):r=n}return this._values.set(e,r),r}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}},B2e=class{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}},Xre=class{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}},Zre=class{constructor(e){this.keys=e}affectsSome(e){for(let t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}},z2e=class{constructor(e){this.events=e}affectsSome(e){for(let t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}};$re=class extends W{constructor(e){super(),this._onDidChangeContext=this._register(new Fm({merge:t=>new z2e(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new B2e(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new V2e(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");let t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;let n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new Xre(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Xre(e))}getContext(e){return this._isDisposed?bP.INSTANCE:this.getContextValuesContainer(Hvi(e))}dispose(){super.dispose(),this._isDisposed=!0}},eoe=class extends $re{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;let t=this._register(new P2e(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?bP.INSTANCE:this._contexts.get(e)||bP.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new QV(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};eoe=Bvi([zvi(0,kt)],eoe);V2e=class extends $re{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new On),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(jV)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(jV,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{let n=this._parent.getContextValuesContainer(this._myContextId).value;Vvi(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(jV),super.dispose())}getContextValuesContainer(e){return this._isDisposed?bP.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}};ci.registerCommand("_setContext",Wvi);ci.registerCommand({id:"getContextKeyInfo",handler(){return[...Pe.all()].sort((i,e)=>i.key.localeCompare(e.key))},metadata:{description:y("getContextKeyInfo","A command that returns information about context keys"),args:[]}});ci.registerCommand("_generateContextKeyInfo",function(){let i=[],e=new Set;for(let t of Pe.all())e.has(t.key)||(e.add(t.key),i.push(t));i.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(i,void 0,2))})});var H2e,GV,Ugt=D(()=>{H2e=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}},GV=class{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){let n=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(t);n.outgoing.set(r.key,r),r.incoming.set(n.key,n)}removeNode(e){let t=this._hashFn(e);this._nodes.delete(t);for(let n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){let t=this._hashFn(e),n=this._nodes.get(t);return n||(n=new H2e(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t} +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}});var Af,YE,du,$L,tB=D(()=>{(function(i){i[i.Expanded=0]="Expanded",i[i.Collapsed=1]="Collapsed",i[i.PreserveOrExpanded=2]="PreserveOrExpanded",i[i.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Af||(Af={}));(function(i){i[i.Unknown=0]="Unknown",i[i.Twistie=1]="Twistie",i[i.Element=2]="Element",i[i.Filter=3]="Filter"})(YE||(YE={}));du=class extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}},$L=class{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}});function aW(i){return typeof i=="object"&&"visibility"in i&&"data"in i}function eN(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}function qNe(i){return typeof i.collapsible=="boolean"}var wre,xre=D(()=>{tB();Wt();Gt();PSe();bV();et();ld();wre=class{constructor(e,t,n,o={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new wb,this._onDidChangeCollapseState=new q,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new q,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new q,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new da(l$),this.collapseByDefault=typeof o.collapseByDefault>"u"?!1:o.collapseByDefault,this.allowNonCollapsibleParents=o.allowNonCollapsibleParents??!1,this.filter=o.filter,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren>"u"?!1:o.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=hi.empty(),o={}){if(e.length===0)throw new du(this.user,"Invalid tree location");o.diffIdentityProvider?this.spliceSmart(o.diffIdentityProvider,e,t,n,o):this.spliceSimple(e,t,n,o)}spliceSmart(e,t,n,o=hi.empty(),r,s=r.diffDepth??0){let{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,n,o,r);let l=[...o],c=t[t.length-1],u=new Lx({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+n)].map(g=>e.getId(g.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,n,l,r);let d=t.slice(0,-1),h=(g,A,v)=>{if(s>0)for(let w=0;wv.originalStart-A.originalStart))h(f,p,f-(g.originalStart+g.originalLength)),f=g.originalStart,p=g.modifiedStart-c,this.spliceSimple([...d,f],g.originalLength,hi.slice(l,p,p+g.modifiedLength),r);h(f,p,f)}spliceSimple(e,t,n=hi.empty(),{onDidCreateNode:o,onDidDeleteNode:r,diffIdentityProvider:s}){let{parentNode:a,listIndex:l,revealed:c,visible:u}=this.getParentNodeWithListIndex(e),d=[],h=hi.map(n,E=>this.createTreeNode(E,a,a.visible?1:0,c,d,o)),f=e[e.length-1],p=0;for(let E=f;E>=0&&Es.getId(E.element).toString())):a.lastDiffIds=a.children.map(E=>s.getId(E.element).toString()):a.lastDiffIds=void 0;let C=0;for(let E of w)E.visible&&C++;if(C!==0)for(let E=f+g.length;EI+(T.visible?T.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,v-E),this.list.splice(l,E,d)}if(w.length>0&&r){let E=I=>{r(I),I.children.forEach(E)};w.forEach(E)}this._onDidSplice.fire({insertedNodes:g,deletedNodes:w});let _=a;for(;_;){if(_.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}_=_.parent}}rerender(e){if(e.length===0)throw new du(this.user,"Invalid tree location");let{node:t,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e);t.visible&&o&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:n,revealed:o}=this.getTreeNodeWithListIndex(e);return n&&o?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);let o={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){let o=this.getTreeNode(e);typeof t>"u"&&(t=!o.collapsed);let r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){let{node:n,listIndex:o,revealed:r}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(n,o,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&s&&!qNe(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return s}_setListNodeCollapseState(e,t,n,o){let r=this._setNodeCollapseState(e,o,!1);if(!n||!e.visible||!r)return r;let s=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=s-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),r}_setNodeCollapseState(e,t,n){let o;if(e===this.root?o=!1:(qNe(t)?(o=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(o=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):o=!1,o&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!qNe(t)&&t.recursive)for(let r of e.children)o=this._setNodeCollapseState(r,t,!0)||o;return o}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,n,o,r,s){let a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,n);a.visibility=l,o&&r.push(a);let c=e.children||hi.empty(),u=o&&l!==0&&!a.collapsed,d=0,h=1;for(let f of c){let p=this.createTreeNode(f,a,l,u,r,s);a.children.push(p),h+=p.renderNodeCount,p.visible&&(p.visibleChildIndex=d++)}return this.allowNonCollapsibleParents||(a.collapsible=a.collapsible||a.children.length>0),a.visibleChildrenCount=d,a.visible=l===2?d>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,o&&r.pop()),s?.(a),a}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,o=!0){let r;if(e!==this.root){if(r=this._filterNode(e,t),r===0)return e.visible=!1,e.renderNodeCount=0,!1;o&&n.push(e)}let s=n.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||r!==0){let l=0;for(let c of e.children)a=this._updateNodeAfterFilterChange(c,r,n,o&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=r===2?a:r===1,e.visibility=r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-s):(e.renderNodeCount=0,o&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):aW(n)?(e.filterData=n.data,eN(n.visibility)):(e.filterData=void 0,eN(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;let[n,...o]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(o,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;let[n,...o]=e;if(n<0||n>t.children.length)throw new du(this.user,"Invalid tree location");return this.getTreeNode(o,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:n,revealed:o,visible:r}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new du(this.user,"Invalid tree location");let a=t.children[s];return{node:a,listIndex:n,revealed:o,visible:r&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,o=!0,r=!0){let[s,...a]=e;if(s<0||s>t.children.length)throw new du(this.user,"Invalid tree location");for(let l=0;l{});function YNe(i){return i instanceof Gx?new KNe(i):i}function Yli(i,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new JNe(i,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(t){let n=i(),o=n.getNodeLocation(t),r=n.getParentNodeLocation(o);return n.getNode(r).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}}}function Kli(i,e){return i.position===e.position&&Yft(i,e)}function Yft(i,e){return i.node.element===e.node.element&&i.startIndex===e.startIndex&&i.height===e.height&&i.endIndex===e.endIndex}function Cre(i){let e=YE.Unknown;return O$(i.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=YE.Twistie:O$(i.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=YE.Element:O$(i.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=YE.Filter),{browserEvent:i.browserEvent,element:i.element?i.element.element:null,target:e}}function Jli(i){let e=yP(i.browserEvent.target);return{element:i.element?i.element.element:null,browserEvent:i.browserEvent,anchor:i.anchor,isStickyScroll:e}}function _re(i,e){e(i),i.children.forEach(t=>_re(t,e))}var KNe,JNe,iB,tN,XNe,ZNe,$Ne,m1,KE,e2e,t2e,i2e,Sre,n2e,o2e,lW,r2e,s2e,nB,oB=D(()=>{Ye();n0();xc();Hg();mre();pre();Ine();Kx();GP();xre();tB();il();Wt();Gt();oo();ko();Xl();et();Rg();de();bL();gn();qft();Be();ic();In();Zl();KNe=class extends Gx{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};JNe=class{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=H.None,this.disposables=new se}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(YNe(e),t)}onDragOver(e,t,n,o,r,s=!0){let a=this.dnd.onDragOver(YNe(e),t&&t.element,n,o,r),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=tm(()=>{let f=this.modelProvider(),p=f.getNodeLocation(t);f.isCollapsed(p)&&f.setCollapsed(p,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!s){let f=typeof a=="boolean"?a:a.accept,p=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:p,feedback:[n]}}return a}if(a.bubble===1){let f=this.modelProvider(),p=f.getNodeLocation(t),g=f.getParentNodeLocation(p),A=f.getNode(g),v=g&&f.getListIndex(g);return this.onDragOver(e,A,v,o,r,!1)}let c=this.modelProvider(),u=c.getNodeLocation(t),d=c.getListIndex(u),h=c.getListRenderCount(u);return{...a,feedback:ru(d,d+h)}}drop(e,t,n,o,r){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(YNe(e),t&&t.element,n,o,r)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}};iB=class{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}};(function(i){i.None="none",i.OnHover="onHover",i.Always="always"})(tN||(tN={}));XNe=class{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new se,this.onDidChange=Ee.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}},ZNe=class i{static{this.DefaultIndent=8}constructor(e,t,n,o,r,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=o,this.renderedIndentGuides=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=i.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=H.None,this.disposables=new se,this.templateId=e.templateId,this.updateOptions(s),Ee.map(n,a=>a.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){let t=Ll(e.indent,0,40);if(t!==this.indent){this.indent=t;for(let[n,o]of this.renderedNodes)this.renderTreeElement(n,o)}}if(typeof e.renderIndentGuides<"u"){let t=e.renderIndentGuides!==tN.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(let[n,o]of this.renderedNodes)this._renderIndentGuides(n,o);if(this.indentGuidesDisposable.dispose(),t){let n=new se;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=Ae(e,xe(".monaco-tl-row")),n=Ae(t,xe(".monaco-tl-indent")),o=Ae(t,xe(".monaco-tl-twistie")),r=Ae(t,xe(".monaco-tl-contents")),s=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:o,indentGuidesDisposable:H.None,templateData:s}}renderElement(e,t,n,o){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,o)}disposeElement(e,t,n,o){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,n.templateData,o),typeof o=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){let n=i.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${n}px`,t.indent.style.width=`${n+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...ut.asClassNameArray(De.treeItemExpanded));let o=!1;this.renderer.renderTwistie&&(o=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(o||t.twistie.classList.add(...ut.asClassNameArray(De.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(Tr(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let n=new se,o=this.modelProvider();for(;;){let r=o.getNodeLocation(e),s=o.getParentNodeLocation(r);if(!s)break;let a=o.getNode(s),l=xe(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),n.add(He(()=>this.renderedIndentGuides.delete(a,l))),e=a}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set,n=this.modelProvider();e.forEach(o=>{let r=n.getNodeLocation(o);try{let s=n.getParentNodeLocation(r);o.collapsible&&o.children.length>0&&!o.collapsed?t.add(o):s&&t.add(n.getNode(s))}catch{}}),this.activeIndentNodes.forEach(o=>{t.has(o)||this.renderedIndentGuides.forEach(o,r=>r.classList.remove("active"))}),t.forEach(o=>{this.activeIndentNodes.has(o)||this.renderedIndentGuides.forEach(o,r=>r.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Oi(this.disposables)}},$Ne=class{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new se,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let n=1;if(this._filter){let s=this._filter.filter(e,t);if(typeof s=="boolean"?n=s?1:0:aW(s)?n=eN(s.visibility):n=s,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:cf.Default,visibility:n};let o=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(o)?o:[o];for(let s of r){let a=s&&s.toString();if(typeof a>"u")return{data:cf.Default,visibility:n};let l;if(this.tree.findMatchType===KE.Contiguous){let c=a.toLowerCase().indexOf(this._lowercasePattern);if(c>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let u=this._lowercasePattern.length;u>0;u--)l.push(c+u-1)}}else l=Hy(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,r.length===1?{data:l,visibility:n}:{data:{label:a,score:l},visibility:n}}return this.tree.findMode===m1.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:cf.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Oi(this.disposables)}};(function(i){i[i.Highlight=0]="Highlight",i[i.Filter=1]="Filter"})(m1||(m1={}));(function(i){i[i.Fuzzy=0]="Fuzzy",i[i.Contiguous=1]="Contiguous"})(KE||(KE={}));e2e=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,o,r,s={}){this.tree=e,this.view=n,this.filter=o,this.contextViewProvider=r,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new q,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new q,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new q,this._onDidChangeOpenState=new q,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new se,this.disposables=new se,this._mode=e.options.defaultFindMode??m1.Highlight,this._matchType=e.options.defaultFindMatchType??KE.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){let e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&e?(ms(y("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:y("not found","No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&ms(y("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!cf.isDefault(e.filterData)}layout(e){this.width=e,this.widget?.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};t2e=class{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Zi(this.stickyNodes,e.stickyNodes,Kli)}lastNodePartiallyVisible(){if(this.count===0)return!1;let e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!Zi(this.stickyNodes,e.stickyNodes,Yft)||this.count===0)return!1;let t=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return t.position!==n.position}},i2e=class{constrainStickyScrollNodes(e,t,n){for(let o=0;on||o>=t)return e.slice(0,o)}return e}},Sre=class extends H{constructor(e,t,n,o,r,s={}){super(),this.tree=e,this.model=t,this.view=n,this.treeDelegate=r,this.maxWidgetViewRatio=.4;let a=this.validateStickySettings(s);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=s.stickyScrollDelegate??new i2e,this._widget=this._register(new n2e(n.getScrollableElement(),n,e,o,r,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(e===0?t=this.view.firstVisibleIndex:t=this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],n=e,o=0,r=this.getNextStickyNode(n,void 0,o);for(;r&&(t.push(r),o+=r.height,!(t.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(r),!n)));)r=this.getNextStickyNode(n,r.node,o);let s=this.constrainStickyNodes(t);return s.length?new t2e(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,n){let o=this.getAncestorUnderPrevious(e,t);if(o&&!(o===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(o,n)}nodeTopAlignsWithStickyNodesBottom(e,t){let n=this.getNodeIndex(e),o=this.view.getElementTop(n),r=t;return this.view.scrollTop===o-r}createStickyScrollNode(e,t){let n=this.treeDelegate.getHeight(e),{startIndex:o,endIndex:r}=this.getNodeRange(e),s=this.calculateStickyNodePosition(r,t,n);return{node:e,position:s,height:n,startIndex:o,endIndex:r}}getAncestorUnderPrevious(e,t=void 0){let n=e,o=this.getParentNode(n);for(;o;){if(o===t)return n;n=o,o=this.getParentNode(n)}if(t===void 0)return n}calculateStickyNodePosition(e,t,n){let o=this.view.getRelativeTop(e);if(o===null&&this.view.firstVisibleIndex===e&&e+1l&&t<=l?l-n:t}constrainStickyNodes(e){if(e.length===0)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=t)return e;let o=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!o.length)return[];let r=o[o.length-1];if(o.length>this.stickyScrollMaxItemCount||r.position+r.height>t)throw new Error("stickyScrollDelegate violates constraints");return o}getParentNode(e){let t=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(t);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),n=this.model.getListIndex(t);if(n<0)throw new Error("Node not found in tree");let o=this.model.getListRenderCount(t),r=n+o-1;return{startIndex:n,endIndex:r}}nodePositionTopBelowWidget(e){let t=[],n=this.getParentNode(e);for(;n;)t.push(n),n=this.getParentNode(n);let o=0;for(let r=0;r0,n=!!e&&e.count>0;if(!t&&!n||t&&n&&this._previousState.equal(e))return;if(t!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let o=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${o.position}px`;else{this._previousStateDisposables.clear();let r=Array(e.count);for(let s=e.count-1;s>=0;s--){let a=e.stickyNodes[s],{element:l,disposable:c}=this.createElement(a,s,e.count);r[s]=l,this._rootDomNode.appendChild(l),this._previousStateDisposables.add(c)}this.stickyScrollFocus.updateElements(r,e),this._previousElements=r}this._previousState=e,this._rootDomNode.style.height=`${o.position+o.height}px`}createElement(e,t,n){let o=e.startIndex,r=document.createElement("div");r.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(r.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(r.style.lineHeight=`${e.height}px`),r.classList.add("monaco-tree-sticky-row"),r.classList.add("monaco-list-row"),r.setAttribute("data-index",`${o}`),r.setAttribute("data-parity",o%2===0?"even":"odd"),r.setAttribute("id",this.view.getElementID(o));let s=this.setAccessibilityAttributes(r,e.node.element,t,n),a=this.treeDelegate.getTemplateId(e.node),l=this.treeRenderers.find(h=>h.templateId===a);if(!l)throw new Error(`No renderer found for template id ${a}`);let c=e.node;c===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(c=new Proxy(e.node,{}));let u=l.renderTemplate(r);l.renderElement(c,e.startIndex,u,e.height);let d=He(()=>{s.dispose(),l.disposeElement(c,e.startIndex,u,e.height),l.disposeTemplate(u),r.remove()});return{element:r,disposable:d}}setAccessibilityAttributes(e,t,n,o){if(!this.accessibilityProvider)return H.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,n,o))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");let r=this.accessibilityProvider.getAriaLabel(t),s=r&&typeof r!="string"?r:tc(r),a=Ct(c=>{let u=c.readObservable(s);u?e.setAttribute("aria-label",u):e.removeAttribute("aria-label")});typeof r=="string"||r&&e.setAttribute("aria-label",r.get());let l=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return typeof l=="number"&&e.setAttribute("aria-level",`${l}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}},o2e=class extends H{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new q,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new q,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(ce(this.container,"focus",()=>this.onFocus())),this._register(ce(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){let t=e.browserEvent.target;if(!yP(t)&&!vP(t)){this.focusedLast()&&this.view.domFocus();return}if(!jb(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");let s=this.state.stickyNodes.findIndex(a=>a.node.element===e.element?.element);if(s===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(s);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let o=this.state.stickyNodes[this.focusedIndex].node.element,r=this.elements[this.focusedIndex];this._onContextMenu.fire({element:o,anchor:r,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){let t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;!yP(t)&&!vP(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");let n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let o=Ll(n,0,t.count-1);this.setFocus(o)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,r=this.view.getElementTop(e),s=o?o.position+o.height+n.height:n.height;this.view.scrollTop=r-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}};lW=class{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new q,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&Zi(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let o=this;this._onDidChange.fire({get elements(){return o.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let l=this.createNodeSet(),c=u=>l.delete(u);t.forEach(u=>_re(u,c)),this.set([...l.values()]);return}let n=new Set,o=l=>n.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>_re(l,o));let r=new Map,s=l=>r.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>_re(l,s));let a=[];for(let l of this.nodes){let c=this.identityProvider.getId(l.element).toString();if(!n.has(c))a.push(l);else{let d=r.get(c);d&&d.visible&&a.push(d)}}if(this.nodes.length>0&&a.length===0){let l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}},r2e=class extends CH{constructor(e,t,n){super(e),this.tree=t,this.stickyScrollProvider=n}onViewPointer(e){if(nLe(e.browserEvent.target)||Yx(e.browserEvent.target)||gP(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let n=e.browserEvent.target,o=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,r=vP(e.browserEvent.target),s=!1;if(r?s=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,r)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!o&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!r||o)){let a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),o){e.browserEvent.isHandledByList=!0;return}}r||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(hdt(e.browserEvent.target)||fdt(e.browserEvent.target))return;let n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");let o=this.list.indexOf(t),r=this.list.getElementTop(o),s=n.nodePositionTopBelowWidget(t);this.tree.scrollTop=r-s,this.list.domFocus(),this.list.setFocus([o]),this.list.setSelection([o])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){let t=e.browserEvent.target;if(!yP(t)&&!vP(t)){super.onMouseDown(e);return}}onContextMenu(e){let t=e.browserEvent.target;if(!yP(t)&&!vP(t)){super.onContextMenu(e);return}}},s2e=class extends rl{constructor(e,t,n,o,r,s,a,l){super(e,t,n,o,l),this.focusTrait=r,this.selectionTrait=s,this.anchorTrait=a}createMouseController(e){return new r2e(this,e.tree,e.stickyScrollProvider)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;let o=[],r=[],s;n.forEach((a,l)=>{this.focusTrait.has(a)&&o.push(e+l),this.selectionTrait.has(a)&&r.push(e+l),this.anchorTrait.has(a)&&(s=e+l)}),o.length>0&&super.setFocus(tf([...super.getFocus(),...o])),r.length>0&&super.setSelection(tf([...super.getSelection(),...r])),typeof s=="number"&&super.setAnchor(s)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(o=>this.element(o)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(o=>this.element(o)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}},nB=class{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Ee.filter(Ee.map(this.view.onMouseDblClick,Cre),e=>e.target!==YE.Filter)}get onMouseOver(){return Ee.map(this.view.onMouseOver,Cre)}get onMouseOut(){return Ee.map(this.view.onMouseOut,Cre)}get onContextMenu(){return Ee.any(Ee.filter(Ee.map(this.view.onContextMenu,Jli),e=>!e.isStickyScroll),this.stickyScrollController?.onContextMenu??Ee.None)}get onPointer(){return Ee.map(this.view.onPointer,Cre)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Ee.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??m1.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){return this.findController?.matchType??KE.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,o,r={}){this._user=e,this._options=r,this.eventBufferer=new wb,this.onDidChangeFindOpenState=Ee.None,this.onDidChangeStickyScrollFocused=Ee.None,this.disposables=new se,this._onWillRefilter=new q,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new q,this.treeDelegate=new iB(n);let s=new S6,a=new S6,l=this.disposables.add(new XNe(a.event)),c=new dE;this.renderers=o.map(p=>new ZNe(p,()=>this.model,s.event,l,c,r));for(let p of this.renderers)this.disposables.add(p);let u;r.keyboardNavigationLabelProvider&&(u=new $Ne(this,r.keyboardNavigationLabelProvider,r.filter),r={...r,filter:u},this.disposables.add(u)),this.focus=new lW(()=>this.view.getFocusedElements()[0],r.identityProvider),this.selection=new lW(()=>this.view.getSelectedElements()[0],r.identityProvider),this.anchor=new lW(()=>this.view.getAnchorElement(),r.identityProvider),this.view=new s2e(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...Yli(()=>this.model,r),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,r),s.input=this.model.onDidChangeCollapseState;let d=Ee.forEach(this.model.onDidSplice,p=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(p),this.selection.onDidModelSplice(p)})},this.disposables);d(()=>null,null,this.disposables);let h=this.disposables.add(new q),f=this.disposables.add(new da(0));if(this.disposables.add(Ee.any(d,this.focus.onDidChange,this.selection.onDidChange)(()=>{f.trigger(()=>{let p=new Set;for(let g of this.focus.getNodes())p.add(g);for(let g of this.selection.getNodes())p.add(g);h.fire([...p.values()])})})),a.input=h.event,r.keyboardSupport!==!1){let p=Ee.chain(this.view.onKeyDown,g=>g.filter(A=>!Yx(A.target)).map(A=>new Vi(A)));Ee.chain(p,g=>g.filter(A=>A.keyCode===15))(this.onLeftArrow,this,this.disposables),Ee.chain(p,g=>g.filter(A=>A.keyCode===17))(this.onRightArrow,this,this.disposables),Ee.chain(p,g=>g.filter(A=>A.keyCode===10))(this.onSpace,this,this.disposables)}if((r.findWidgetEnabled??!0)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider){let p=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new e2e(this,this.model,this.view,u,r.contextViewProvider,p),this.focusNavigationFilter=g=>this.findController.shouldAllowFocus(g),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Ee.None,this.onDidChangeFindMatchType=Ee.None;r.enableStickyScroll&&(this.stickyScrollController=new Sre(this,this.model,this.view,this.renderers,this.treeDelegate,r),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=el(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===tN.Always)}updateOptions(e={}){this._options={...this._options,...e};for(let t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===tN.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new Sre(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Ee.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t),Vp(t)&&this.findController?.layout(t)}style(e){let t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));let o=e.treeStickyScrollBackground??e.listBackground;o&&(n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${o}; }`),n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${o}; }`)),e.treeStickyScrollBorder&&n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let r=yg(e.listFocusAndSelectionOutline,yg(e.listSelectionOutline,e.listFocusOutline??""));r&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=n.join(` +`),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(r=>this.model.getNode(r));this.selection.set(n,t);let o=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setSelection(o,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(r=>this.model.getNode(r));this.focus.set(n,t);let o=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setFocus(o,t,!0)})}focusNext(e=1,t=!1,n,o=jb(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,n,o)}focusPrevious(e=1,t=!1,n,o=jb(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,n,o)}focusNextPage(e,t=jb(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=jb(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=jb(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=jb(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,t);else{let o=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,t,o)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n);if(!this.model.setCollapsed(o,!0)){let s=this.model.getParentNodeLocation(o);if(!s)return;let a=this.model.getListIndex(s);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n);if(!this.model.setCollapsed(o,!1)){if(!n.children.some(l=>l.visible))return;let[s]=this.view.getFocus(),a=s+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(o,void 0,r)}dispose(){Oi(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}});var JE,Ere=D(()=>{xre();tB();ld();JE=class{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new wre(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(o,r){return n.sorter.compare(o.element,r.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=hi.empty(),n={}){let o=this.getElementLocation(e);this._setChildren(o,this.preserveCollapseState(t),n)}_setChildren(e,t=hi.empty(),n){let o=new Set,r=new Set,s=l=>{if(l.element===null)return;let c=l;if(o.add(c.element),this.nodes.set(c.element,c),this.identityProvider){let u=this.identityProvider.getId(c.element).toString();r.add(u),this.nodesByIdentity.set(u,c)}n.onDidCreateNode?.(c)},a=l=>{if(l.element===null)return;let c=l;if(o.has(c.element)||this.nodes.delete(c.element),this.identityProvider){let u=this.identityProvider.getId(c.element).toString();r.has(u)||this.nodesByIdentity.delete(u)}n.onDidDeleteNode?.(c)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...n,onDidCreateNode:s,onDidDeleteNode:a})}preserveCollapseState(e=hi.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),hi.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){let s=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(s)}if(!n){let s;return typeof t.collapsed>"u"?s=void 0:t.collapsed===Af.Collapsed||t.collapsed===Af.PreserveOrCollapsed?s=!0:t.collapsed===Af.Expanded||t.collapsed===Af.PreserveOrExpanded?s=!1:s=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:s}}let o=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible,r;return typeof t.collapsed>"u"||t.collapsed===Af.PreserveOrCollapsed||t.collapsed===Af.PreserveOrExpanded?r=n.collapsed:t.collapsed===Af.Collapsed?r=!0:t.collapsed===Af.Expanded?r=!1:r=!!t.collapsed,{...t,collapsible:o,collapsed:r,children:this.preserveCollapseState(t.children)}})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let o=this.getElementLocation(e);return this.model.setCollapsed(o,t,n)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new du(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new du(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new du(this.user,`Tree element not found: ${e}`);let n=this.model.getNodeLocation(t),o=this.model.getParentNodeLocation(n);return this.model.getNode(o).element}getElementLocation(e){if(e===null)return[];let t=this.nodes.get(e);if(!t)throw new du(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}});function Dre(i){let e=[i.element],t=i.incompressible||!1;return{element:{elements:e,incompressible:t},children:hi.map(hi.from(i.children),Dre),collapsible:i.collapsible,collapsed:i.collapsed}}function Tre(i){let e=[i.element],t=i.incompressible||!1,n,o;for(;[o,n]=hi.consume(hi.from(i.children),2),!(o.length!==1||o[0].incompressible);)i=o[0],e.push(i.element);return{element:{elements:e,incompressible:t},children:hi.map(hi.concat(o,n),Tre),collapsible:i.collapsible,collapsed:i.collapsed}}function a2e(i,e=0){let t;return ea2e(n,0)),e===0&&i.element.incompressible?{element:i.element.elements[e],children:t,incompressible:!0,collapsible:i.collapsible,collapsed:i.collapsed}:{element:i.element.elements[e],children:t,collapsible:i.collapsible,collapsed:i.collapsed}}function Kft(i){return a2e(i,0)}function Jft(i,e,t){return i.element===e?{...i,children:t}:{...i,children:hi.map(hi.from(i.children),n=>Jft(n,e,t))}}function $li(i,e){return{splice(t,n,o){e.splice(t,n,o.map(r=>i.map(r)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function eci(i,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(i(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){return e.filter.filter(i(t),n)}}}}var Xli,l2e,Zli,c2e,kre,Xft=D(()=>{Ere();tB();Wt();et();ld();Xli=i=>({getId(e){return e.elements.map(t=>i.getId(t).toString()).join("\0")}}),l2e=class{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new JE(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,t=hi.empty(),n){let o=n.diffIdentityProvider&&Xli(n.diffIdentityProvider);if(e===null){let p=hi.map(t,this.enabled?Tre:Dre);this._setChildren(null,p,{diffIdentityProvider:o,diffDepth:1/0});return}let r=this.nodes.get(e);if(!r)throw new du(this.user,"Unknown compressed tree node");let s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=Kft(s),u=Jft(c,e,t),d=(this.enabled?Tre:Dre)(u),h=n.diffIdentityProvider?((p,g)=>n.diffIdentityProvider.getId(p)===n.diffIdentityProvider.getId(g)):void 0;if(Zi(d.element.elements,s.element.elements,h)){this._setChildren(r,d.children||hi.empty(),{diffIdentityProvider:o,diffDepth:1});return}let f=l.children.map(p=>p===s?d:p);this._setChildren(l.element,f,{diffIdentityProvider:o,diffDepth:s.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let n=this.model.getNode().children,o=hi.map(n,Kft),r=hi.map(o,e?Tre:Dre);this._setChildren(null,r,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){let o=new Set,r=a=>{for(let l of a.element.elements)o.add(l),this.nodes.set(l,a.element)},s=a=>{for(let l of a.element.elements)o.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...n,onDidCreateNode:r,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let o=this.getCompressedNode(e);return this.model.setCollapsed(o,t,n)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;let t=this.nodes.get(e);if(!t)throw new du(this.user,`Tree element not found: ${e}`);return t}},Zli=i=>i[i.length-1],c2e=class i{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new i(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}};kre=class{get onDidSplice(){return Ee.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Ee.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Ee.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||Zli;let o=r=>this.elementMapper(r.elements);this.nodeMapper=new $L(r=>new c2e(o,r)),this.model=new l2e(e,$li(this.nodeMapper,t),eci(o,n))}setChildren(e,t=hi.empty(),n={}){this.model.setChildren(e,t,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}});function ici(i,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=i().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}}}var tci,iN,Ire,u2e,rB,d2e=D(()=>{oB();Xft();Ere();xE();ld();tci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},iN=class extends nB{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,o,r={}){super(e,t,n,o,r),this.user=e}setChildren(e,t=hi.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new JE(e,t,n)}},Ire=class{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){let r=this.stickyScrollDelegate.getCompressedNode(e);r||(r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),r.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,o)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,o))}disposeElement(e,t,n,o){n.compressedTreeNode?this.renderer.disposeCompressedElements?.(n.compressedTreeNode,t,n.data,o):this.renderer.disposeElement?.(e,t,n.data,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}};tci([ar],Ire.prototype,"compressedTreeNodeProvider",null);u2e=class{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let o=0;on||o>=t-1&&tthis,a=new u2e(()=>this.model),l=o.map(c=>new Ire(s,a,c));super(e,t,n,l,{...ici(s,r),stickyScrollDelegate:a})}setChildren(e,t=hi.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new kre(e,t,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}});function h2e(i){return{...i,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function p2e(i,e){return e.parent?e.parent===i?!0:p2e(i,e.parent):!1}function nci(i,e){return i===e||p2e(i,e)||p2e(e,i)}function Zft(i){return{browserEvent:i.browserEvent,elements:i.elements.map(e=>e.element)}}function $ft(i){return{browserEvent:i.browserEvent,element:i.element&&i.element.element,target:i.target}}function f2e(i){return i instanceof Gx?new b2e(i):i}function ept(i){return i&&{...i,collapseByDefault:!0,identityProvider:i.identityProvider&&{getId(e){return i.identityProvider.getId(e.element)}},dnd:i.dnd&&new A2e(i.dnd),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:i.accessibilityProvider.isChecked?e=>!!i.accessibilityProvider?.isChecked(e.element):void 0,getAriaLabel(e){return i.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return i.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider.getAriaLevel&&(e=>i.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},filter:i.filter&&{filter(e,t){return i.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof i.expandOnlyOnTwistieClick>"u"?void 0:typeof i.expandOnlyOnTwistieClick!="function"?i.expandOnlyOnTwistieClick:(e=>i.expandOnlyOnTwistieClick(e.element)),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof i.defaultFindVisibility=="number"?i.defaultFindVisibility:typeof i.defaultFindVisibility>"u"?2:i.defaultFindVisibility(e.element)}}function v2e(i,e){e(i),i.children.forEach(t=>v2e(t,e))}function oci(i){let e=i&&ept(i);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}}}}function rci(i){return typeof i=="boolean"?i?1:0:aW(i)?eN(i.visibility):eN(i)}var m2e,g2e,b2e,A2e,cW,y2e,w2e,Lre,tpt=D(()=>{Ine();oB();xre();d2e();tB();Gt();oo();ko();Tt();et();ld();de();gn();m2e=class i{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},g2e=class{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,o)}renderTwistie(e,t){return e.slow?(t.classList.add(...ut.asClassNameArray(De.treeItemLoading)),!0):(t.classList.remove(...ut.asClassNameArray(De.treeItemLoading)),!1)}disposeElement(e,t,n,o){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,n.templateData,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}};b2e=class extends Gx{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};A2e=class{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(f2e(e),t)}onDragOver(e,t,n,o,r,s=!0){return this.dnd.onDragOver(f2e(e),t&&t.element,n,o,r)}drop(e,t,n,o,r){this.dnd.drop(f2e(e),t&&t.element,n,o,r)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}};cW=class{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Ee.map(this.tree.onDidChangeFocus,Zft)}get onDidChangeSelection(){return Ee.map(this.tree.onDidChangeSelection,Zft)}get onMouseDblClick(){return Ee.map(this.tree.onMouseDblClick,$ft)}get onPointer(){return Ee.map(this.tree.onPointer,$ft)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,o,r,s={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new q,this._onDidChangeNodeSlowState=new q,this.nodeMapper=new $L(a=>new m2e(a)),this.disposables=new se,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=a=>s.collapseByDefault?s.collapseByDefault(a)?Af.PreserveOrCollapsed:Af.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,n,o,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=h2e({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,n,o,r){let s=new iB(n),a=o.map(c=>new g2e(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=ept(r)||{};return new iN(e,t,s,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(o=>o.cancel()),this.refreshPromises.clear(),this.root.element=e;let n=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,n=!1,o,r){if(typeof this.root.element>"u")throw new du(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Ee.toPromise(this._onDidRender.event));let s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,o,r),n)try{this.tree.rerender(s)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){let n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new du(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Ee.toPromise(this._onDidRender.event));let n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await this.root.refreshPromise,await Ee.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;let o=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(await this.root.refreshPromise,await Ee.toPromise(this._onDidRender.event)),o}setSelection(e,t){let n=e.map(o=>this.getDataNode(o));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){let n=e.map(o=>this.getDataNode(o));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new du(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,n,o){await this.refreshNode(e,t,n),!this.disposables.isDisposed&&this.render(e,n,o)}async refreshNode(e,t,n){let o;if(this.subTreeRefreshPromises.forEach((r,s)=>{!o&&nci(s,e)&&(o=r.then(()=>this.refreshNode(e,t,n)))}),o)return o;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],t,n);return}return this.doRefreshSubTree(e,t,n)}async doRefreshSubTree(e,t,n){let o;e.refreshPromise=new Promise(r=>o=r),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{let r=await this.doRefreshNode(e,t,n);e.stale=!1,await u$.settled(r.map(s=>this.doRefreshSubTree(s,t,n)))}finally{o()}}async doRefreshNode(e,t,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let o;if(!e.hasChildren)o=Promise.resolve(hi.empty());else{let r=this.doGetChildren(e);if(N1e(r))o=Promise.resolve(r);else{let s=oh(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),o=r.finally(()=>s.cancel())}}try{let r=await o;return this.setChildren(e,r,t,n)}catch(r){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Ka(r))return[];throw r}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let n=this.dataSource.getChildren(e.element);return N1e(n)?this.processChildren(n):(t=mo(async()=>this.processChildren(await n)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(ft))}setChildren(e,t,n,o){let r=[...t];if(e.children.length===0&&r.length===0)return[];let s=new Map,a=new Map;for(let u of e.children)s.set(u.element,u),this.identityProvider&&a.set(u.id,{node:u,collapsed:this.tree.hasElement(u)&&this.tree.isCollapsed(u)});let l=[],c=r.map(u=>{let d=!!this.dataSource.hasChildren(u);if(!this.identityProvider){let g=h2e({element:u,parent:e,hasChildren:d,defaultCollapseState:this.getDefaultCollapseState(u)});return d&&g.defaultCollapseState===Af.PreserveOrExpanded&&l.push(g),g}let h=this.identityProvider.getId(u).toString(),f=a.get(h);if(f){let g=f.node;return s.delete(g.element),this.nodes.delete(g.element),this.nodes.set(u,g),g.element=u,g.hasChildren=d,n?f.collapsed?(g.children.forEach(A=>v2e(A,v=>this.nodes.delete(v.element))),g.children.splice(0,g.children.length),g.stale=!0):l.push(g):d&&!f.collapsed&&l.push(g),g}let p=h2e({element:u,parent:e,id:h,hasChildren:d,defaultCollapseState:this.getDefaultCollapseState(u)});return o&&o.viewState.focus&&o.viewState.focus.indexOf(h)>-1&&o.focus.push(p),o&&o.viewState.selection&&o.viewState.selection.indexOf(h)>-1&&o.selection.push(p),(o&&o.viewState.expanded&&o.viewState.expanded.indexOf(h)>-1||d&&p.defaultCollapseState===Af.PreserveOrExpanded)&&l.push(p),p});for(let u of s.values())v2e(u,d=>this.nodes.delete(d.element));for(let u of c)this.nodes.set(u.element,u);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,t,n){let o=e.children.map(s=>this.asTreeElement(s,t)),r=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(s){return n.diffIdentityProvider.getId(s.element)}}};this.tree.setChildren(e===this.root?null:e,o,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?hi.map(e.children,o=>this.asTreeElement(o,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}},y2e=class i{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},w2e=class{constructor(e,t,n,o){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=o,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,o)}renderCompressedElements(e,t,n,o){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,o)}renderTwistie(e,t){return e.slow?(t.classList.add(...ut.asClassNameArray(De.treeItemLoading)),!0):(t.classList.remove(...ut.asClassNameArray(De.treeItemLoading)),!1)}disposeElement(e,t,n,o){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,n.templateData,o)}disposeCompressedElements(e,t,n,o){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,n.templateData,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Oi(this.disposables)}};Lre=class extends cW{constructor(e,t,n,o,r,s,a={}){super(e,t,n,r,s,a),this.compressionDelegate=o,this.compressibleNodeMapper=new $L(l=>new y2e(l)),this.filter=a.filter}createTree(e,t,n,o,r){let s=new iB(n),a=o.map(c=>new w2e(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=oci(r)||{};return new rB(e,t,s,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,n){if(!this.identityProvider)return super.render(e,t);let o=f=>this.identityProvider.getId(f).toString(),r=f=>{let p=new Set;for(let g of f){let A=this.tree.getCompressedTreeNode(g===this.root?null:g);if(A.element)for(let v of A.element.elements)p.add(o(v.element))}return p},s=r(this.tree.getSelection()),a=r(this.tree.getFocus());super.render(e,t,n);let l=this.getSelection(),c=!1,u=this.getFocus(),d=!1,h=f=>{let p=f.element;if(p)for(let g=0;g{let n=this.filter.filter(t,1),o=rci(n);if(o===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return o===1})),super.processChildren(e)}}});var Nre,ipt=D(()=>{oB();Ere();Nre=class extends nB{constructor(e,t,n,o,r,s={}){super(e,t,n,o,s),this.user=e,this.dataSource=r,this.identityProvider=s.identityProvider}createModel(e,t,n){return new JE(e,t,n)}}});var Xwn,Zwn,uW,x2e,$wn,exn,txn,ixn,nxn,C2e,Mre,sB=D(()=>{wi();Be();Bt();Xwn=new ze("isMac",jt,y("isMac","Whether the operating system is macOS")),Zwn=new ze("isLinux",Cr,y("isLinux","Whether the operating system is Linux")),uW=new ze("isWindows",Fo,y("isWindows","Whether the operating system is Windows")),x2e=new ze("isWeb",Cb,y("isWeb","Whether the platform is a web browser")),$wn=new ze("isMacNative",jt&&!Cb,y("isMacNative","Whether the operating system is macOS on a non-browser platform")),exn=new ze("isIOS",Ou,y("isIOS","Whether the operating system is iOS")),txn=new ze("isMobile",WK,y("isMobile","Whether the platform is a mobile web browser")),ixn=new ze("isDevelopment",!1,!0),nxn=new ze("productQualityType","",y("productQualityType","Quality type of VS Code")),C2e="inputFocus",Mre=new ze(C2e,!1,y("inputFocus","Whether keyboard focus is inside an input box"))});function Yre(i,e){let t=i.createScoped(e.getHTMLElement());return cpt.bindTo(t),t}function Kre(i,e){let t=dW.bindTo(i),n=()=>{let o=e.scrollTop===0,r=e.scrollHeight-e.renderHeight-e.scrollTop<1;o&&r?t.set("both"):o?t.set("top"):r?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}function A1(i){return i.getValue(oN)==="alt"}function Jre(i,e){let t=i.get(Et),n=i.get(Xt),o=new se;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(s){return n.mightProducePrintableCharacter(s)}},smoothScrolling:!!t.getValue(GA),mouseWheelScrollSensitivity:t.getValue(g1),fastScrollSensitivity:t.getValue(b1),multipleSelectionController:e.multipleSelectionController??o.add(new _2e(t)),keyboardNavigationEventFilter:uci(n),scrollByPage:!!t.getValue(QA)},o]}function uci(i){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;let n=i.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}function fpt(i){let e=i.getValue(L2e);if(e==="highlight")return m1.Highlight;if(e==="filter")return m1.Filter;let t=i.getValue(Ore);if(t==="simple"||t==="highlight")return m1.Highlight;if(t==="filter")return m1.Filter}function ppt(i){let e=i.getValue(M2e);if(e==="fuzzy")return KE.Fuzzy;if(e==="contiguous")return KE.Contiguous}function pW(i,e){let t=i.get(Et),n=i.get(hh),o=i.get(Ze),r=i.get(Re),s=()=>{let h=o.getContextKeyValue(dpt);if(h==="automatic")return zA.Automatic;if(h==="trigger")return zA.Trigger;if(o.getContextKeyValue(hpt)===!1)return zA.Trigger;let p=t.getValue(N2e);if(p==="automatic")return zA.Automatic;if(p==="trigger")return zA.Trigger},a=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!t.getValue(jg),[l,c]=r.invokeFunction(Jre,e),u=e.paddingBottom,d=e.renderIndentGuides!==void 0?e.renderIndentGuides:t.getValue(Pre);return{getTypeNavigationMode:s,disposable:c,options:{keyboardSupport:!1,...l,indent:typeof t.getValue(hW)=="number"?t.getValue(hW):void 0,renderIndentGuides:d,smoothScrolling:!!t.getValue(GA),defaultFindMode:fpt(t),defaultFindMatchType:ppt(t),horizontalScrolling:a,scrollByPage:!!t.getValue(QA),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??t.getValue(Bre)==="doubleClick",contextViewProvider:n,findWidgetStyles:kdt,enableStickyScroll:!!t.getValue(zre),stickyScrollMaxItemCount:Number(t.getValue(Vre))}}}var sC,dr,mp,Fre,dW,Sxn,Exn,cpt,upt,jre,D2e,T2e,k2e,I2e,Qre,sci,Gre,aci,qre,lci,cci,dpt,hpt,oN,Rre,jg,L2e,N2e,Ore,QA,M2e,hW,Pre,GA,g1,b1,Bre,zre,Vre,_2e,npt,opt,rpt,fW,Hre,S2e,E2e,Wre,spt,apt,Ure,lpt,nN,dci,mW=D(()=>{Ye();Hft();Kx();Gft();oB();tpt();ipt();d2e();et();de();Be();ao();Dy();Bt();sB();Ed();ht();Xo();fa();i1();sC=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dr=function(i,e){return function(t,n){e(t,n,i)}},mp=At("listService"),Fre=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new se,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new _H(el(),"").style(Jx)),this.lists.some(o=>o.widget===e))throw new Error("Cannot register the same widget multiple times");let n={widget:e,extraContextKeys:t};return this.lists.push(n),II(e.getHTMLElement())&&this.setLastFocusedList(e),gc(e.onDidFocus(()=>this.setLastFocusedList(e)),He(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(o=>o!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}},dW=new ze("listScrollAtBoundary","none"),Sxn=ge.or(dW.isEqualTo("top"),dW.isEqualTo("both")),Exn=ge.or(dW.isEqualTo("bottom"),dW.isEqualTo("both")),cpt=new ze("listFocus",!0),upt=new ze("treestickyScrollFocused",!1),jre=new ze("listSupportsMultiselect",!0),D2e=ge.and(cpt,ge.not(C2e),upt.negate()),T2e=new ze("listHasSelectionOrFocus",!1),k2e=new ze("listDoubleSelection",!1),I2e=new ze("listMultiSelection",!1),Qre=new ze("listSelectionNavigation",!1),sci=new ze("listSupportsFind",!0),Gre=new ze("treeElementCanCollapse",!1),aci=new ze("treeElementHasParent",!1),qre=new ze("treeElementCanExpand",!1),lci=new ze("treeElementHasChild",!1),cci=new ze("treeFindOpen",!1),dpt="listTypeNavigationMode",hpt="listAutomaticKeyboardNavigation";oN="workbench.list.multiSelectModifier",Rre="workbench.list.openMode",jg="workbench.list.horizontalScrolling",L2e="workbench.list.defaultFindMode",N2e="workbench.list.typeNavigationMode",Ore="workbench.list.keyboardNavigation",QA="workbench.list.scrollByPage",M2e="workbench.list.defaultFindMatchType",hW="workbench.tree.indent",Pre="workbench.tree.renderIndentGuides",GA="workbench.list.smoothScrolling",g1="workbench.list.mouseWheelScrollSensitivity",b1="workbench.list.fastScrollSensitivity",Bre="workbench.tree.expandMode",zre="workbench.tree.enableStickyScroll",Vre="workbench.tree.stickyScrollMaxItemCount";_2e=class extends H{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=A1(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(oN)&&(this.useAltAsMultipleSelectionModifier=A1(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:oLe(e)}isSelectionRangeChangeEvent(e){return rLe(e)}};npt=class extends rl{constructor(e,t,n,o,r,s,a,l,c){let u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(jg),[d,h]=c.invokeFunction(Jre,r);super(e,t,n,o,{keyboardSupport:!1,...d,horizontalScrolling:u}),this.disposables.add(h),this.contextKeyService=Yre(s,this),this.disposables.add(Kre(this.contextKeyService,this)),this.listSupportsMultiSelect=jre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),Qre.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=T2e.bindTo(this.contextKeyService),this.listDoubleSelection=k2e.bindTo(this.contextKeyService),this.listMultiSelection=I2e.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=A1(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let p=this.getSelection(),g=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||g.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let p=this.getSelection(),g=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||g.length>0)})),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(oN)&&(this._useAltAsMultipleSelectionModifier=A1(l));let g={};if(p.affectsConfiguration(jg)&&this.horizontalScrolling===void 0){let A=!!l.getValue(jg);g={...g,horizontalScrolling:A}}if(p.affectsConfiguration(QA)){let A=!!l.getValue(QA);g={...g,scrollByPage:A}}if(p.affectsConfiguration(GA)){let A=!!l.getValue(GA);g={...g,smoothScrolling:A}}if(p.affectsConfiguration(g1)){let A=l.getValue(g1);g={...g,mouseWheelScrollSensitivity:A}}if(p.affectsConfiguration(b1)){let A=l.getValue(b1);g={...g,fastScrollSensitivity:A}}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new Hre(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?HA(e):Jx)}};npt=sC([dr(5,Ze),dr(6,mp),dr(7,Et),dr(8,Re)],npt);opt=class extends bre{constructor(e,t,n,o,r,s,a,l,c){let u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(jg),[d,h]=c.invokeFunction(Jre,r);super(e,t,n,o,{keyboardSupport:!1,...d,horizontalScrolling:u}),this.disposables=new se,this.disposables.add(h),this.contextKeyService=Yre(s,this),this.disposables.add(Kre(this.contextKeyService,this.widget)),this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=jre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),Qre.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=A1(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(oN)&&(this._useAltAsMultipleSelectionModifier=A1(l));let g={};if(p.affectsConfiguration(jg)&&this.horizontalScrolling===void 0){let A=!!l.getValue(jg);g={...g,horizontalScrolling:A}}if(p.affectsConfiguration(QA)){let A=!!l.getValue(QA);g={...g,scrollByPage:A}}if(p.affectsConfiguration(GA)){let A=!!l.getValue(GA);g={...g,smoothScrolling:A}}if(p.affectsConfiguration(g1)){let A=l.getValue(g1);g={...g,mouseWheelScrollSensitivity:A}}if(p.affectsConfiguration(b1)){let A=l.getValue(b1);g={...g,fastScrollSensitivity:A}}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new Hre(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?HA(e):Jx)}dispose(){this.disposables.dispose(),super.dispose()}};opt=sC([dr(5,Ze),dr(6,mp),dr(7,Et),dr(8,Re)],opt);rpt=class extends yre{constructor(e,t,n,o,r,s,a,l,c,u){let d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(jg),[h,f]=u.invokeFunction(Jre,s);super(e,t,n,o,r,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables.add(f),this.contextKeyService=Yre(a,this),this.disposables.add(Kre(this.contextKeyService,this)),this.listSupportsMultiSelect=jre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),Qre.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=T2e.bindTo(this.contextKeyService),this.listDoubleSelection=k2e.bindTo(this.contextKeyService),this.listMultiSelection=I2e.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=A1(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let g=this.getSelection(),A=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(g.length>0||A.length>0),this.listMultiSelection.set(g.length>1),this.listDoubleSelection.set(g.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let g=this.getSelection(),A=this.getFocus();this.listHasSelectionOrFocus.set(g.length>0||A.length>0)})),this.disposables.add(c.onDidChangeConfiguration(g=>{g.affectsConfiguration(oN)&&(this._useAltAsMultipleSelectionModifier=A1(c));let A={};if(g.affectsConfiguration(jg)&&this.horizontalScrolling===void 0){let v=!!c.getValue(jg);A={...A,horizontalScrolling:v}}if(g.affectsConfiguration(QA)){let v=!!c.getValue(QA);A={...A,scrollByPage:v}}if(g.affectsConfiguration(GA)){let v=!!c.getValue(GA);A={...A,smoothScrolling:v}}if(g.affectsConfiguration(g1)){let v=c.getValue(g1);A={...A,mouseWheelScrollSensitivity:v}}if(g.affectsConfiguration(b1)){let v=c.getValue(b1);A={...A,fastScrollSensitivity:v}}Object.keys(A).length>0&&this.updateOptions(A)})),this.navigator=new S2e(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?HA(e):Jx)}dispose(){this.disposables.dispose(),super.dispose()}};rpt=sC([dr(6,Ze),dr(7,mp),dr(8,Et),dr(9,Re)],rpt);fW=class extends H{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new q),this.onDidOpen=this._onDidOpen.event,this._register(Ee.filter(this.widget.onDidChangeSelection,n=>jb(n.browserEvent))(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof t?.openOnSingleClick!="boolean"&&t?.configurationService?(this.openOnSingleClick=t?.configurationService.getValue(Rre)!=="doubleClick",this._register(t?.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(Rre)&&(this.openOnSingleClick=t?.configurationService.getValue(Rre)!=="doubleClick")}))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;let t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,o=typeof t.pinned=="boolean"?t.pinned:!n;this._open(this.getSelectedElement(),n,o,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;let o=t.button===1,r=!0,s=o,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,s,a,t)}onMouseDblClick(e,t){if(!t)return;let n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;let r=!1,s=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,s,a,t)}_open(e,t,n,o,r){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:o,element:e,browserEvent:r})}},Hre=class extends fW{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}},S2e=class extends fW{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}},E2e=class extends fW{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}};Wre=class extends iN{constructor(e,t,n,o,r,s,a,l,c){let{options:u,getTypeNavigationMode:d,disposable:h}=s.invokeFunction(pW,r);super(e,t,n,o,u),this.disposables.add(h),this.internals=new nN(this,r,d,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Wre=sC([dr(5,Re),dr(6,Ze),dr(7,mp),dr(8,Et)],Wre);spt=class extends rB{constructor(e,t,n,o,r,s,a,l,c){let{options:u,getTypeNavigationMode:d,disposable:h}=s.invokeFunction(pW,r);super(e,t,n,o,u),this.disposables.add(h),this.internals=new nN(this,r,d,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};spt=sC([dr(5,Re),dr(6,Ze),dr(7,mp),dr(8,Et)],spt);apt=class extends Nre{constructor(e,t,n,o,r,s,a,l,c,u){let{options:d,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(pW,s);super(e,t,n,o,r,d),this.disposables.add(f),this.internals=new nN(this,s,h,s.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};apt=sC([dr(6,Re),dr(7,Ze),dr(8,mp),dr(9,Et)],apt);Ure=class extends cW{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,o,r,s,a,l,c,u){let{options:d,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(pW,s);super(e,t,n,o,r,d),this.disposables.add(f),this.internals=new nN(this,s,h,s.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ure=sC([dr(6,Re),dr(7,Ze),dr(8,mp),dr(9,Et)],Ure);lpt=class extends Lre{constructor(e,t,n,o,r,s,a,l,c,u,d){let{options:h,getTypeNavigationMode:f,disposable:p}=l.invokeFunction(pW,a);super(e,t,n,o,r,s,h),this.disposables.add(p),this.internals=new nN(this,a,f,a.overrideStyles,c,u,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};lpt=sC([dr(7,Re),dr(8,Ze),dr(9,mp),dr(10,Et)],lpt);nN=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,o,r,s,a){this.tree=e,this.disposables=[],this.contextKeyService=Yre(r,e),this.disposables.push(Kre(this.contextKeyService,e)),this.listSupportsMultiSelect=jre.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),Qre.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=sci.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=T2e.bindTo(this.contextKeyService),this.hasDoubleSelection=k2e.bindTo(this.contextKeyService),this.hasMultiSelection=I2e.bindTo(this.contextKeyService),this.treeElementCanCollapse=Gre.bindTo(this.contextKeyService),this.treeElementHasParent=aci.bindTo(this.contextKeyService),this.treeElementCanExpand=qre.bindTo(this.contextKeyService),this.treeElementHasChild=lci.bindTo(this.contextKeyService),this.treeFindOpen=cci.bindTo(this.contextKeyService),this.treeStickyScrollFocused=upt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=A1(a),this.updateStyleOverrides(o);let c=()=>{let d=e.getFocus()[0];if(!d)return;let h=e.getNode(d);this.treeElementCanCollapse.set(h.collapsible&&!h.collapsed),this.treeElementHasParent.set(!!e.getParentElement(d)),this.treeElementCanExpand.set(h.collapsible&&h.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(d))},u=new Set;u.add(dpt),u.add(hpt),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection(()=>{let d=e.getSelection(),h=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(d.length>0||h.length>0),this.hasMultiSelection.set(d.length>1),this.hasDoubleSelection.set(d.length===2)})}),e.onDidChangeFocus(()=>{let d=e.getSelection(),h=e.getFocus();this.hasSelectionOrFocus.set(d.length>0||h.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(d=>this.treeFindOpen.set(d)),e.onDidChangeStickyScrollFocused(d=>this.treeStickyScrollFocused.set(d)),a.onDidChangeConfiguration(d=>{let h={};if(d.affectsConfiguration(oN)&&(this._useAltAsMultipleSelectionModifier=A1(a)),d.affectsConfiguration(hW)){let f=a.getValue(hW);h={...h,indent:f}}if(d.affectsConfiguration(Pre)&&t.renderIndentGuides===void 0){let f=a.getValue(Pre);h={...h,renderIndentGuides:f}}if(d.affectsConfiguration(GA)){let f=!!a.getValue(GA);h={...h,smoothScrolling:f}}if(d.affectsConfiguration(L2e)||d.affectsConfiguration(Ore)){let f=fpt(a);h={...h,defaultFindMode:f}}if(d.affectsConfiguration(N2e)||d.affectsConfiguration(Ore)){let f=n();h={...h,typeNavigationMode:f}}if(d.affectsConfiguration(M2e)){let f=ppt(a);h={...h,defaultFindMatchType:f}}if(d.affectsConfiguration(jg)&&t.horizontalScrolling===void 0){let f=!!a.getValue(jg);h={...h,horizontalScrolling:f}}if(d.affectsConfiguration(QA)){let f=!!a.getValue(QA);h={...h,scrollByPage:f}}if(d.affectsConfiguration(Bre)&&t.expandOnlyOnTwistieClick===void 0&&(h={...h,expandOnlyOnTwistieClick:a.getValue(Bre)==="doubleClick"}),d.affectsConfiguration(zre)){let f=a.getValue(zre);h={...h,enableStickyScroll:f}}if(d.affectsConfiguration(Vre)){let f=Math.max(1,a.getValue(Vre));h={...h,stickyScrollMaxItemCount:f}}if(d.affectsConfiguration(g1)){let f=a.getValue(g1);h={...h,mouseWheelScrollSensitivity:f}}if(d.affectsConfiguration(b1)){let f=a.getValue(b1);h={...h,fastScrollSensitivity:f}}Object.keys(h).length>0&&e.updateOptions(h)}),this.contextKeyService.onDidChangeContext(d=>{d.affectsSome(u)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new E2e(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?HA(e):Jx)}dispose(){this.disposables=Oi(this.disposables)}};nN=sC([dr(4,Ze),dr(5,mp),dr(6,Et)],nN);dci=Qi.as(Tc.Configuration);dci.registerConfiguration({id:"workbench",order:7,title:y("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[oN]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[y("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),y("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:y({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Rre]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:y({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[jg]:{type:"boolean",default:!1,description:y("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[QA]:{type:"boolean",default:!1,description:y("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[hW]:{type:"number",default:8,minimum:4,maximum:40,description:y("tree indent setting","Controls tree indentation in pixels.")},[Pre]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:y("render tree indent guides","Controls whether the tree should render indent guides.")},[GA]:{type:"boolean",default:!1,description:y("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[g1]:{type:"number",default:1,markdownDescription:y("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[b1]:{type:"number",default:5,markdownDescription:y("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[L2e]:{type:"string",enum:["highlight","filter"],enumDescriptions:[y("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),y("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:y("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[Ore]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[y("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),y("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),y("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:y("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:y("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[M2e]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[y("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),y("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:y("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Bre]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:y("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[zre]:{type:"boolean",default:!0,description:y("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[Vre]:{type:"number",minimum:1,default:7,markdownDescription:y("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[N2e]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:y("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})});var mpt=D(()=>{});var v1,R2e=D(()=>{Ye();Bg();ic();Vx();de();rh();v1=class i extends H{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=t?.supportIcons??!1,this.domNode=Ae(e,xe("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",o){e||(e=""),o&&(e=i.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&El(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render())}render(){let e=[],t=0;for(let n of this.highlights){if(n.end===n.start)continue;if(t{o=r===`\r +`?-1:0,s+=n;for(let a of t)a.end<=s||(a.start>=s&&(a.start+=o),a.end>=s&&(a.end+=o));return n+=o,"\u23CE"})}}});function hci(i,e,t){if(!t)return;let n=0;return i.map(o=>{let r={start:n,end:n+o.length},s=t.map(a=>Nl.intersect(r,a)).filter(a=>!Nl.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=r.end+e.length,s})}var rN,aC,F2e,O2e,Xre=D(()=>{mpt();Ye();R2e();de();rh();oH();ic();Bg();gn();_L();rN=class{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||El(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}},aC=class extends H{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new rN(Ae(e,xe(".monaco-icon-label")))),this.labelContainer=Ae(this.domNode.element,xe(".monaco-icon-label-container")),this.nameContainer=Ae(this.labelContainer,xe("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new O2e(this.nameContainer,!!t.supportIcons)):this.nameNode=new F2e(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??Mr("mouse")}get element(){return this.domNode.element}setLabel(e,t,n){let o=["monaco-icon-label"],r=["monaco-icon-label-container"],s="";n&&(n.extraClasses&&o.push(...n.extraClasses),n.italic&&o.push("italic"),n.strikethrough&&o.push("strikethrough"),n.disabledCommand&&r.push("disabled"),n.title&&(typeof n.title=="string"?s+=n.title:s+=e));let a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(n?.iconPath){let l;!a||!To(a)?(l=xe(".monaco-icon-label-iconpath"),this.domNode.element.prepend(l)):l=a,l.style.backgroundImage=im(n?.iconPath)}else a&&a.remove();if(this.domNode.classNames=o,this.domNode.element.setAttribute("aria-label",s),this.labelContainer.classList.value="",this.labelContainer.classList.add(...r),this.setupHover(n?.descriptionTitle?this.labelContainer:this.element,n?.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){let l=this.getOrCreateDescriptionNode();l instanceof v1?(l.set(t||"",n?n.descriptionMatches:void 0,void 0,n?.labelEscapeNewLines),this.setupHover(l.element,n?.descriptionTitle)):(l.textContent=t&&n?.labelEscapeNewLines?v1.escapeNewLines(t,[]):t||"",this.setupHover(l.element,n?.descriptionTitle||""),l.empty=!t)}if(n?.suffix||this.suffixNode){let l=this.getOrCreateSuffixNode();l.textContent=n?.suffix??""}}setupHover(e,t){let n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(this.hoverDelegate.showNativeHover)(function(r,s){Na(s)?r.title=JO(s):s?.markdownNotSupportedFallback?r.title=s.markdownNotSupportedFallback:r.removeAttribute("title")})(e,t);else{let o=nc().setupManagedHover(this.hoverDelegate,e,t);o&&this.customHovers.set(e,o)}}dispose(){super.dispose();for(let e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){let e=this._register(new rN(xot(this.nameContainer,xe("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new rN(Ae(e.element,xe("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){let e=this._register(new rN(Ae(this.labelContainer,xe("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new v1(Ae(e.element,xe("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new rN(Ae(e.element,xe("span.label-description"))))}return this.descriptionNode}},F2e=class{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&El(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=Ae(this.container,xe("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{});var Zre,$re,y1,gW=D(()=>{Ye();Bg();ic();$ie();de();rh();gpt();Be();Zre=xe,$re={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0},y1=class i extends H{constructor(e,t,n){super(),this.os=t,this.keyElements=new Set,this.options=n||Object.create(null);let o=this.options.keybindingLabelForeground;this.domNode=Ae(e,Zre(".monaco-keybinding")),o&&(this.domNode.style.color=o),this.hover=this._register(nc().setupManagedHover(Mr("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&i.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let n=1;no.length)return 1}return 0}var bpt,dCn,hCn,vpt=D(()=>{CA();bpt=new $s(()=>{let i=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:i,collatorIsNumeric:i.resolvedOptions().numeric}}),dCn=new $s(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),hCn=new $s(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}))});function mci(i,e){let{text:t,iconOffsets:n}=e;if(!n||n.length===0)return ypt(i,t);let o=fx(t," "),r=t.length-o.length,s=ypt(i,o);if(s)for(let a of s){let l=n[a.start+r]+r;a.start+=l,a.end+=l}return s}function ypt(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t!==-1?[{start:t,end:t+i.length}]:null}function gci(i,e,t){let n=i.labelHighlights||[],o=e.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:n.length===0&&o.length===0?0:Apt(i.saneSortLabel,e.saneSortLabel,t)}var ose,P2e,B2e,qA,ese,rc,w1,lC,z2e,V2e,tse,ise,nse,aB,wpt=D(()=>{Ye();et();Be();ht();mW();io();de();gf();xc();wi();xE();Xre();gW();Hg();Jb();mn();MNe();CA();_L();vpt();Rt();oB();Gt();Tt();fh();In();Wt();ose=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},P2e=function(i,e){return function(t,n){e(t,n,i)}},qA=xe,ese=class{constructor(e,t,n){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new $s(()=>{let o=n.label??"",r=XO(o).text.trim(),s=n.ariaLabel||[o,this.saneDescription,this.saneDetail].map(a=>Fct(a)).filter(a=>!!a).join(", ");return{saneLabel:o,saneSortLabel:r,saneAriaLabel:s}}),this._saneDescription=n.description,this._saneTooltip=n.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}},rc=class extends ese{constructor(e,t,n,o,r,s){super(e,t,r),this.fireButtonTriggered=n,this._onChecked=o,this.item=r,this._separator=s,this._checked=!1,this.onChecked=t?Ee.map(Ee.filter(this._onChecked.event,a=>a.element===this),a=>a.checked):Ee.None,this._saneDetail=r.detail,this._labelHighlights=r.highlights?.label,this._descriptionHighlights=r.highlights?.description,this._detailHighlights=r.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}};(function(i){i[i.NONE=0]="NONE",i[i.MOUSE_HOVER=1]="MOUSE_HOVER",i[i.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(w1||(w1={}));lC=class extends ese{constructor(e,t,n){super(e,!1,n),this.fireSeparatorButtonTriggered=t,this.separator=n,this.children=new Array,this.focusInsideSeparator=w1.NONE}},z2e=class{getHeight(e){return e instanceof lC?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof rc?ise.ID:nse.ID}},V2e=class{getWidgetAriaLabel(){return y("quickInput","Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof rc)))return{get value(){return e.checked},onDidChange:t=>e.onChecked(()=>t())}}},tse=class{constructor(e){this.hoverDelegate=e}renderTemplate(e){let t=Object.create(null);t.toDisposeElement=new se,t.toDisposeTemplate=new se,t.entry=Ae(e,qA(".quick-input-list-entry"));let n=Ae(t.entry,qA("label.quick-input-list-label"));t.toDisposeTemplate.add(un(n,Te.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=Ae(n,qA("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";let o=Ae(n,qA(".quick-input-list-rows")),r=Ae(o,qA(".quick-input-list-row")),s=Ae(o,qA(".quick-input-list-row"));t.label=new aC(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=KF(t.label.element,qA(".quick-input-list-icon"));let a=Ae(r,qA(".quick-input-list-entry-keybinding"));t.keybinding=new y1(a,Ja),t.toDisposeTemplate.add(t.keybinding);let l=Ae(s,qA(".quick-input-list-label-meta"));return t.detail=new aC(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=Ae(t.entry,qA(".quick-input-list-separator")),t.actionBar=new Ps(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,n){n.toDisposeElement.clear(),n.actionBar.clear()}},ise=class extends tse{static{B2e=this}static{this.ID="quickpickitem"}constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return B2e.ID}renderTemplate(e){let t=super.renderTemplate(e);return t.toDisposeTemplate.add(un(t.checkbox,Te.CHANGE,n=>{t.element.checked=t.checkbox.checked})),t}renderElement(e,t,n){let o=e.element;n.element=o,o.element=n.entry??void 0;let r=o.item;n.checkbox.checked=o.checked,n.toDisposeElement.add(o.onChecked(h=>n.checkbox.checked=h)),n.checkbox.disabled=o.checkboxDisabled;let{labelHighlights:s,descriptionHighlights:a,detailHighlights:l}=o;if(r.iconPath){let h=wy(this.themeService.getColorTheme().type)?r.iconPath.dark:r.iconPath.light??r.iconPath.dark,f=Je.revive(h);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=im(f)}else n.icon.style.backgroundImage="",n.icon.className=r.iconClass?`quick-input-list-icon ${r.iconClass}`:"";let c;!o.saneTooltip&&o.saneDescription&&(c={markdown:{value:o.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:o.saneDescription});let u={matches:s||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(u.extraClasses=r.iconClasses,u.italic=r.italic,u.strikethrough=r.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item"),n.label.setLabel(o.saneLabel,o.saneDescription,u),n.keybinding.set(r.keybinding),o.saneDetail){let h;o.saneTooltip||(h={markdown:{value:o.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:o.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(o.saneDetail,void 0,{matches:l,title:h,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";o.separator?.label?(n.separator.textContent=o.separator.label,n.separator.style.display="",this.addItemWithSeparator(o)):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!o.separator);let d=r.buttons;d&&d.length?(n.actionBar.push(d.map((h,f)=>JL(h,`id-${f}`,()=>o.fireButtonTriggered({button:h,item:o.item}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,n)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){let t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};ise=B2e=ose([P2e(1,Wn)],ise);nse=class i extends tse{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}static{this.ID="quickpickseparator"}get templateId(){return i.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){let t=super.renderTemplate(e);return t.checkbox.style.display="none",t}renderElement(e,t,n){let o=e.element;n.element=o,o.element=n.entry??void 0,o.element.classList.toggle("focus-inside",!!o.focusInsideSeparator);let r=o.separator,{labelHighlights:s,descriptionHighlights:a,detailHighlights:l}=o;n.icon.style.backgroundImage="",n.icon.className="";let c;!o.saneTooltip&&o.saneDescription&&(c={markdown:{value:o.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:o.saneDescription});let u={matches:s||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(o.saneLabel,o.saneDescription,u),o.saneDetail){let h;o.saneTooltip||(h={markdown:{value:o.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:o.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(o.saneDetail,void 0,{matches:l,title:h,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";n.separator.style.display="none",n.entry.classList.add("quick-input-list-separator-border");let d=r.buttons;d&&d.length?(n.actionBar.push(d.map((h,f)=>JL(h,`id-${f}`,()=>o.fireSeparatorButtonTriggered({button:h,separator:o.separator}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions"),this.addSeparator(o)}disposeElement(e,t,n){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,n)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){let t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}},aB=class extends H{constructor(e,t,n,o,r,s){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=n,this.accessibilityService=s,this._onKeyDown=new q,this._onLeave=new q,this.onLeave=this._onLeave.event,this._visibleCountObservable=Ut("VisibleCount",0),this.onChangedVisibleCount=Ee.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=Ut("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=Ee.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=Ut("CheckedCount",0),this.onChangedCheckedCount=Ee.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=mP({equalsFn:Zi},new Array),this.onChangedCheckedElements=Ee.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new q,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new q,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new q,this._elementCheckedEventBufferer=new wb,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new se),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=Ae(this.parent,qA(".quick-input-list")),this._separatorRenderer=new nse(t),this._itemRenderer=r.createInstance(ise,t),this._tree=this._register(r.createInstance(Wre,"QuickInput",this._container,new z2e,[this._itemRenderer,this._separatorRenderer],{filter:{filter(a){return a.hidden?0:a instanceof lC?2:1}},sorter:{compare:(a,l)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;let c=this._lastQueryString.toLowerCase();return gci(a,l,c)}},accessibilityProvider:new V2e,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:tN.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=o,this._registerListeners()}get onDidChangeFocus(){return Ee.map(this._tree.onDidChangeFocus,e=>e.elements.filter(t=>t instanceof rc).map(t=>t.item),this._store)}get onDidChangeSelection(){return Ee.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(t=>t instanceof rc).map(t=>t.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown(e=>{let t=new Vi(e);t.keyCode===10&&this.toggleCheckbox(),this._onKeyDown.fire(t)}))}_registerOnContainerClick(){this._register(ce(this._container,Te.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(ce(this._container,Te.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{let e=this._itemElements.filter(t=>!t.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,t)=>t)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){let e=this._register(new BF(this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async t=>{if(cEe(t.browserEvent.target)){e.cancel();return}if(!(!cEe(t.browserEvent.relatedTarget)&&Dr(t.browserEvent.relatedTarget,t.element?.element)))try{await e.trigger(async()=>{t.element instanceof rc&&this.showHover(t.element)})}catch(n){if(!Ka(n))throw n}})),this._register(this._tree.onMouseOut(t=>{Dr(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{let t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(let n of this._separatorRenderer.visibleSeparators){let o=n===t;!!(n.focusInsideSeparator&w1.ACTIVE_ITEM)!==o&&(o?n.focusInsideSeparator|=w1.ACTIVE_ITEM:n.focusInsideSeparator&=~w1.ACTIVE_ITEM,this._tree.rerender(n))}})),this._register(this._tree.onMouseOver(e=>{let t=e.element?this._tree.getParentElement(e.element):null;for(let n of this._separatorRenderer.visibleSeparators){if(n!==t)continue;n.focusInsideSeparator&w1.MOUSE_HOVER||(n.focusInsideSeparator|=w1.MOUSE_HOVER,this._tree.rerender(n))}})),this._register(this._tree.onMouseOut(e=>{let t=e.element?this._tree.getParentElement(e.element):null;for(let n of this._separatorRenderer.visibleSeparators){if(n!==t)continue;n.focusInsideSeparator&w1.MOUSE_HOVER&&(n.focusInsideSeparator&=~w1.MOUSE_HOVER,this._tree.rerender(n))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{let t=e.elements.filter(n=>n instanceof rc);t.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof lC&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(t=>{!t.hidden&&!t.checkboxDisabled&&(t.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let t;this._itemElements=new Array,this._elementTree=e.reduce((n,o,r)=>{let s;if(o.type==="separator"){if(!o.buttons)return n;t=new lC(r,a=>this._onSeparatorButtonTriggered.fire(a),o),s=t}else{let a=r>0?e[r-1]:void 0,l;a&&a.type==="separator"&&!a.buttons&&(t=void 0,l=a);let c=new rc(r,this._hasCheckboxes,u=>this._onButtonTriggered.fire(u),this._elementChecked,o,l);if(this._itemElements.push(c),t)return t.children.push(c),n;s=c}return n.push(s),n},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout(()=>{let n=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),o=n?.parentNode;if(n&&o){let r=n.nextSibling;n.remove(),o.insertBefore(n,r)}},0)}setFocusedElements(e){let t=e.map(n=>this._itemElements.find(o=>o.item===n)).filter(n=>!!n).filter(n=>!n.hidden);if(this._tree.setFocus(t),e.length>0){let n=this._tree.getFocus()[0];n&&this._tree.reveal(n)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){let t=e.map(n=>this._itemElements.find(o=>o.item===n)).filter(n=>!!n);this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{let t=new Set;for(let n of e)t.add(n);for(let n of this._itemElements)n.checked=t.has(n.item)})}focus(e){if(this._itemElements.length)switch(e===Lo.Second&&this._itemElements.length<2&&(e=Lo.First),e){case Lo.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,t=>t.element instanceof rc);break;case Lo.Second:{this._tree.scrollTop=0;let t=!1;this._tree.focusFirst(void 0,n=>n.element instanceof rc?t?!0:(t=!t,!1):!1);break}case Lo.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,t=>t.element instanceof rc);break;case Lo.Next:{let t=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,o=>o.element instanceof rc?(this._tree.reveal(o.element),!0):!1);let n=this._tree.getFocus();t.length&&t[0]===n[0]&&t[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case Lo.Previous:{let t=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,o=>{if(!(o.element instanceof rc))return!1;let r=this._tree.getParentElement(o.element);return r===null||r.children[0]!==o.element?this._tree.reveal(o.element):this._tree.reveal(r),!0});let n=this._tree.getFocus();t.length&&t[0]===n[0]&&t[0]===this._itemElements[0]&&this._onLeave.fire();break}case Lo.NextPage:this._tree.focusNextPage(void 0,t=>t.element instanceof rc?(this._tree.reveal(t.element),!0):!1);break;case Lo.PreviousPage:this._tree.focusPreviousPage(void 0,t=>{if(!(t.element instanceof rc))return!1;let n=this._tree.getParentElement(t.element);return n===null||n.children[0]!==t.element?this._tree.reveal(t.element):this._tree.reveal(n),!0});break;case Lo.NextSeparator:{let t=!1,n=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,r=>{if(t)return!0;if(r.element instanceof lC)t=!0,this._separatorRenderer.isSeparatorVisible(r.element)?this._tree.reveal(r.element.children[0]):this._tree.reveal(r.element,0);else if(r.element instanceof rc){if(r.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(r.element)?this._tree.reveal(r.element):this._tree.reveal(r.element,0),!0;if(r.element===this._elementTree[0])return this._tree.reveal(r.element,0),!0}return!1});let o=this._tree.getFocus()[0];n===o&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,r=>r.element instanceof rc));break}case Lo.PreviousSeparator:{let t,n=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,o=>{if(o.element instanceof lC)n?t||(this._separatorRenderer.isSeparatorVisible(o.element)?this._tree.reveal(o.element):this._tree.reveal(o.element,0),t=o.element.children[0]):n=!0;else if(o.element instanceof rc&&!t){if(o.element.separator)this._itemRenderer.isItemWithSeparatorVisible(o.element)?this._tree.reveal(o.element):this._tree.reveal(o.element,0),t=o.element;else if(o.element===this._elementTree[0])return this._tree.reveal(o.element,0),!0}return!1}),t&&this._tree.setFocus([t]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;let t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;let o=n.index&&this._inputElements[n.index-1];n.item&&(n.separator=o&&o.type==="separator"&&!o.buttons?o:void 0)});else{let n;this._itemElements.forEach(o=>{let r;this.matchOnLabelMode==="fuzzy"?r=this.matchOnLabel?Nie(e,XO(o.saneLabel))??void 0:void 0:r=this.matchOnLabel?mci(t,XO(o.saneLabel))??void 0:void 0;let s=this.matchOnDescription?Nie(e,XO(o.saneDescription||""))??void 0:void 0,a=this.matchOnDetail?Nie(e,XO(o.saneDetail||""))??void 0:void 0;if(r||s||a?(o.labelHighlights=r,o.descriptionHighlights=s,o.detailHighlights=a,o.hidden=!1):(o.labelHighlights=void 0,o.descriptionHighlights=void 0,o.detailHighlights=void 0,o.hidden=o.item?!o.item.alwaysShow:!0),o.item?o.separator=void 0:o.separator&&(o.hidden=!0),!this.sortByLabel){let l=o.index&&this._inputElements[o.index-1]||void 0;l?.type==="separator"&&!l.buttons&&(n=l),n&&!o.hidden&&(o.separator=n,n=void 0)}})}return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{let e=this._tree.getFocus().filter(n=>n instanceof rc),t=this._allVisibleChecked(e);for(let n of e)n.checkboxDisabled||(n.checked=!t)})}style(e){this._tree.style(e)}toggleHover(){let e=this._tree.getFocus()[0];if(!e?.saneTooltip||!(e instanceof rc))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);let t=new se;t.add(this._tree.onDidChangeFocus(n=>{n.elements[0]instanceof rc&&this.showHover(n.elements[0])})),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){let t=new Array;for(let n of e)n instanceof lC?t.push({element:n,collapsible:!1,collapsed:!1,children:n.children.map(o=>({element:o,collapsible:!1,collapsed:!1}))}):t.push({element:n,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let n=0,o=e.length;n{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);let t=this._itemElements.filter(n=>n.checked).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)})}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:t=>{this.linkOpenerDelegate(t)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};ose([ar],aB.prototype,"onDidChangeFocus",null);ose([ar],aB.prototype,"onDidChangeSelection",null);aB=ose([P2e(4,Re),P2e(5,Es)],aB)});function gp(i,e={}){Oa.registerCommandAndKeybindingRule({..._pt,...i,secondary:bci(i.primary,i.secondary??[],e)})}function bci(i,e,t={}){return t.withAltMod&&e.push(512+i),t.withCtrlMod&&(e.push(rse+i),t.withAltMod&&e.push(512+rse+i)),t.withCmdMod&&jt&&(e.push(2048+i),t.withCtrlMod&&e.push(2304+i),t.withAltMod&&(e.push(2560+i),t.withCtrlMod&&e.push(2816+i))),e}function Cm(i,e){return t=>{let n=t.get(Pa).currentQuickInput;if(n)return e&&n.quickNavigate?n.focus(e):n.focus(i)}}var _pt,rse,xpt,Cpt,Spt=D(()=>{wi();Be();Bt();sB();Tx();cre();gf();_pt={weight:200,when:ge.and(ge.equals(RNe,"quickPick"),Sft),metadata:{description:y("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};rse=jt?256:2048;gp({id:"quickInput.pageNext",primary:12,handler:Cm(Lo.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});gp({id:"quickInput.pagePrevious",primary:11,handler:Cm(Lo.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});gp({id:"quickInput.first",primary:rse+14,handler:Cm(Lo.First)},{withAltMod:!0,withCmdMod:!0});gp({id:"quickInput.last",primary:rse+13,handler:Cm(Lo.Last)},{withAltMod:!0,withCmdMod:!0});gp({id:"quickInput.next",primary:18,handler:Cm(Lo.Next)},{withCtrlMod:!0});gp({id:"quickInput.previous",primary:16,handler:Cm(Lo.Previous)},{withCtrlMod:!0});xpt=y("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),Cpt=y("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");jt?(gp({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:Cm(Lo.NextSeparator,Lo.Next),metadata:{description:xpt}}),gp({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:Cm(Lo.NextSeparator)},{withCtrlMod:!0}),gp({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:Cm(Lo.PreviousSeparator,Lo.Previous),metadata:{description:Cpt}}),gp({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:Cm(Lo.PreviousSeparator)},{withCtrlMod:!0})):(gp({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:Cm(Lo.NextSeparator,Lo.Next),metadata:{description:xpt}}),gp({id:"quickInput.nextSeparator",primary:2578,handler:Cm(Lo.NextSeparator)}),gp({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:Cm(Lo.PreviousSeparator,Lo.Previous),metadata:{description:Cpt}}),gp({id:"quickInput.previousSeparator",primary:2576,handler:Cm(Lo.PreviousSeparator)}));gp({id:"quickInput.acceptInBackground",when:ge.and(_pt.when,ge.or(Mre.negate(),kft)),primary:17,weight:250,handler:i=>{i.get(Pa).currentQuickInput?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0})});var Aci,H2e,W2e,bp,sse,Ept=D(()=>{Ye();Hg();ure();FNe();Oft();sn();et();de();Bx();Be();gf();Vft();cre();Px();gd();ht();wpt();Bt();Spt();Aci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},H2e=function(i,e){return function(t,n){e(t,n,i)}},bp=xe,sse=class extends H{static{W2e=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,n,o){super(),this.options=e,this.layoutService=t,this.instantiationService=n,this.contextKeyService=o,this.enabled=!0,this.onDidAcceptEmitter=this._register(new q),this.onDidCustomEmitter=this._register(new q),this.onDidTriggerButtonEmitter=this._register(new q),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new q),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new q),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=_ft.bindTo(this.contextKeyService),this.quickInputTypeContext=Eft.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=Tft.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(Ee.runAndSubscribe(DI,({window:r,disposables:s})=>this.registerKeyModsListeners(r,s),{window:Xi,disposables:this._store})),this._register(cot(r=>{this.ui&&rt(this.ui.container)===r&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))}))}registerKeyModsListeners(e,t){let n=o=>{this.keyMods.ctrlCmd=o.ctrlKey||o.metaKey,this.keyMods.alt=o.altKey};for(let o of[Te.KEY_DOWN,Te.KEY_UP,Te.MOUSE_DOWN])t.add(ce(e,o,n,!0))}getUI(e){if(this.ui)return e&&rt(this._container)!==rt(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;let t=Ae(this._container,bp(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";let n=el(t),o=Ae(t,bp(".quick-input-titlebar")),r=this._register(new Ps(o,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-left-action-bar");let s=Ae(o,bp(".quick-input-title")),a=this._register(new Ps(o,{hoverDelegate:this.options.hoverDelegate}));a.domNode.classList.add("quick-input-right-action-bar");let l=Ae(t,bp(".quick-input-header")),c=Ae(l,bp("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",y("quickInput.checkAll","Toggle all checkboxes")),this._register(un(c,Te.CHANGE,U=>{let M=c.checked;Q.setAllVisibleChecked(M)})),this._register(ce(c,Te.CLICK,U=>{(U.x||U.y)&&f.setFocus()}));let u=Ae(l,bp(".quick-input-description")),d=Ae(l,bp(".quick-input-and-message")),h=Ae(d,bp(".quick-input-filter")),f=this._register(new gre(h,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);let p=Ae(h,bp(".quick-input-visible-count"));p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true");let g=new XL(p,{countFormat:y({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),A=Ae(h,bp(".quick-input-count"));A.setAttribute("aria-live","polite");let v=new XL(A,{countFormat:y({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),w=this._register(new Ps(l,{hoverDelegate:this.options.hoverDelegate}));w.domNode.classList.add("quick-input-inline-action-bar");let C=Ae(l,bp(".quick-input-action")),_=this._register(new oC(C,this.styles.button));_.label=y("ok","OK"),this._register(_.onDidClick(U=>{this.onDidAcceptEmitter.fire()}));let E=Ae(l,bp(".quick-input-action")),I=this._register(new oC(E,{...this.styles.button,supportIcons:!0}));I.label=y("custom","Custom"),this._register(I.onDidClick(U=>{this.onDidCustomEmitter.fire()}));let T=Ae(d,bp(`#${this.idPrefix}message.quick-input-message`)),N=this._register(new dre(t,this.styles.progressBar));N.getContainer().classList.add("quick-input-progress");let L=Ae(t,bp(".quick-input-html-widget"));L.tabIndex=-1;let B=Ae(t,bp(".quick-input-description")),z=this.idPrefix+"list",Q=this._register(this.instantiationService.createInstance(aB,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,z));f.setAttribute("aria-controls",z),this._register(Q.onDidChangeFocus(()=>{f.setAttribute("aria-activedescendant",Q.getActiveDescendant()??"")})),this._register(Q.onChangedAllVisibleChecked(U=>{c.checked=U})),this._register(Q.onChangedVisibleCount(U=>{g.setCount(U)})),this._register(Q.onChangedCheckedCount(U=>{v.setCount(U)})),this._register(Q.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),this.controller instanceof tW&&this.controller.canSelectMany&&Q.clearFocus())},0)}));let Z=iu(t);return this._register(Z),this._register(ce(t,Te.FOCUS,U=>{let M=this.getUI();if(Dr(U.relatedTarget,M.inputContainer)){let ee=M.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==ee&&this.endOfQuickInputBoxContext.set(ee)}Dr(U.relatedTarget,M.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=To(U.relatedTarget)?U.relatedTarget:void 0)},!0)),this._register(Z.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(qE.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(f.onKeyDown(U=>{let M=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==M&&this.endOfQuickInputBoxContext.set(M)})),this._register(ce(t,Te.FOCUS,U=>{f.setFocus()})),this._register(un(t,Te.KEY_DOWN,U=>{if(!Dr(U.target,L))switch(U.keyCode){case 3:mi.stop(U,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:mi.stop(U,!0),this.hide(qE.Gesture);break;case 2:if(!U.altKey&&!U.ctrlKey&&!U.metaKey){let M=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?M.push("input"):M.push("input[type=text]"),this.getUI().list.displayed&&M.push(".monaco-list"),this.getUI().message&&M.push(".quick-input-message a"),this.getUI().widget){if(Dr(U.target,this.getUI().widget))break;M.push(".quick-input-html-widget")}let ee=t.querySelectorAll(M.join(", "));U.shiftKey&&U.target===ee[0]?(mi.stop(U,!0),Q.clearFocus()):!U.shiftKey&&Dr(U.target,ee[ee.length-1])&&(mi.stop(U,!0),ee[0].focus())}break;case 10:U.ctrlKey&&(mi.stop(U,!0),this.getUI().list.toggleHover());break}})),this.ui={container:t,styleSheet:n,leftActionBar:r,titleBar:o,title:s,description1:B,description2:u,widget:L,rightActionBar:a,inlineActionBar:w,checkAll:c,inputContainer:d,filterContainer:h,inputBox:f,visibleCountContainer:p,visibleCount:g,countContainer:A,count:v,okContainer:C,ok:_,message:T,customButtonContainer:E,customButton:I,list:Q,progressBar:N,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:U=>this.show(U),hide:()=>this.hide(),setVisibilities:U=>this.setVisibilities(U),setEnabled:U=>this.setEnabled(U),setContextKey:U=>this.options.setContextKey(U),linkOpenerDelegate:U=>this.options.linkOpenerDelegate(U)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,Ae(this._container,this.ui.container))}pick(e,t={},n=Nt.None){return new Promise((o,r)=>{let s=u=>{s=o,t.onKeyMods?.(a.keyMods),o(u)};if(n.isCancellationRequested){s(void 0);return}let a=this.createQuickPick({useSeparators:!0}),l,c=[a,a.onDidAccept(()=>{if(a.canSelectMany)s(a.selectedItems.slice()),a.hide();else{let u=a.activeItems[0];u&&(s(u),a.hide())}}),a.onDidChangeActive(u=>{let d=u[0];d&&t.onDidFocus&&t.onDidFocus(d)}),a.onDidChangeSelection(u=>{if(!a.canSelectMany){let d=u[0];d&&(s(d),a.hide())}}),a.onDidTriggerItemButton(u=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...u,removeItem:()=>{let d=a.items.indexOf(u.item);if(d!==-1){let h=a.items.slice(),f=h.splice(d,1),p=a.activeItems.filter(A=>A!==f[0]),g=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,p&&(a.activeItems=p),a.keepScrollPosition=g}}})),a.onDidTriggerSeparatorButton(u=>t.onDidTriggerSeparatorButton?.(u)),a.onDidChangeValue(u=>{l&&!u&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Oi(c),s(void 0)})];a.title=t.title,t.value&&(a.value=t.value),a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([u,d])=>{l=d,a.busy=!1,a.items=u,a.canSelectMany&&(a.selectedItems=u.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,u=>{r(u),a.hide()})})}createQuickPick(e={useSeparators:!1}){let t=this.getUI(!0);return new tW(t)}createInputBox(){let e=this.getUI(!0);return new are(e)}show(e){let t=this.getUI(!0);this.onShowEmitter.fire();let n=this.controller;this.controller=e,n?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",kr(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Jo.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),kr(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;let o=this.options.backKeybindingLabel();rre.tooltip=o?y("quickInput.backWithKeybinding","Back ({0})",o):y("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){let t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(let t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(let t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){let t=this.controller;if(!t)return;t.willHide(e);let n=this.ui?.container,o=n&&!P$(n);if(this.controller=null,this.onHideEmitter.fire(),n&&(n.style.display="none"),!o){let r=this.previousFocusElement;for(;r&&!r.offsetParent;)r=r.parentElement??void 0;r?.offsetParent?(r.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;let e=this.ui.container.style,t=Math.min(this.dimension.width*.62,W2e.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){let{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:o,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=o?`1px solid ${o}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",this.ui.list.style(this.styles.list);let s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));let a=s.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}};sse=W2e=Aci([H2e(1,lf),H2e(2,Re),H2e(3,Ze)],sse)});var vci,bW,ase,Dpt=D(()=>{sn();et();Bt();ht();Px();Dd();bft();i1();nr();io();cre();Ept();ao();Ye();vci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bW=function(i,e){return function(t,n){e(t,n,i)}},ase=class extends jte{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(ire))),this._quickAccess}constructor(e,t,n,o,r){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=o,this.configurationService=r,this._onShow=this._register(new q),this._onHide=this._register(new q),this.contexts=new Map}createController(e=this.layoutService,t){let n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(s=>{s.get(Qr).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(lre))},o=this._register(this.instantiationService.createInstance(sse,{...n,...t}));return o.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(r=>{rt(e.activeContainer)===rt(o.container)&&o.layout(r,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{o.isVisible()||o.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(o.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(o.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new ze(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t,n=Nt.None){return this.controller.pick(e,t,n)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:it(LEe),quickInputForeground:it(Ast),quickInputTitleBackground:it(vst),widgetBorder:it(iee),widgetShadow:it(vy)},inputBox:SP,toggle:_P,countBadge:zne,button:Ddt,progressBar:Tdt,keybindingLabel:Edt,list:HA({listBackground:LEe,listFocusBackground:Cx,listFocusForeground:xx,listInactiveFocusForeground:xx,listInactiveSelectionIconForeground:oO,listInactiveFocusBackground:Cx,listFocusOutline:eo,listInactiveFocusOutline:eo}),pickerGroup:{pickerGroupBorder:it(yst),pickerGroupForeground:it(cee)}}}};ase=vci([bW(0,Re),bW(1,Ze),bW(2,Wn),bW(3,lf),bW(4,Et)],ase)});var Tpt,sN,U2e,lse,AW,j2e,kpt=D(()=>{pft();et();Jt();io();sn();ht();Bt();fke();hs();Dpt();H_();ao();Tpt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},sN=function(i,e){return function(t,n){e(t,n,i)}},U2e=class extends ase{constructor(e,t,n,o,r,s){super(t,n,o,new qte(e.getContainerDomNode(),r),s),this.host=void 0;let a=AW.get(e);if(a){let l=a.widget;this.host={_serviceBrand:void 0,get mainContainer(){return l.getDomNode()},getContainer(){return l.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[l.getDomNode()]},get activeContainer(){return l.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Ee.map(e.onDidLayoutChange,c=>({container:l.getDomNode(),dimension:c}))},get onDidChangeActiveContainer(){return Ee.None},get onDidAddContainer(){return Ee.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};U2e=Tpt([sN(1,Re),sN(2,Ze),sN(3,Wn),sN(4,ei),sN(5,Et)],U2e);lse=class{get activeService(){let e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){let n=t=this.instantiationService.createInstance(U2e,e);this.mapEditorToService.set(e,t),zf(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,n=Nt.None){return this.activeService.pick(e,t,n)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};lse=Tpt([sN(0,Re),sN(1,ei)],lse);AW=class i{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(i.ID)}constructor(e){this.editor=e,this.widget=new j2e(this.editor)}dispose(){this.widget.dispose()}},j2e=class i{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return i.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};St(AW.ID,AW,4)});function yci(i){if(!i||!Array.isArray(i))return[];let e=[],t=0;for(let n=0,o=i.length;n{let h=Sci(u.token,d.token);return h!==0?h:u.index-d.index});let t=0,n="000000",o="ffffff";for(;i.length>=1&&i[0].token==="";){let u=i.shift();u.fontStyle!==-1&&(t=u.fontStyle),u.foreground!==null&&(n=u.foreground),u.background!==null&&(o=u.background)}let r=new G2e;for(let u of e)r.getId(u);let s=r.getId(n),a=r.getId(o),l=new q2e(t,s,a),c=new Y2e(l);for(let u=0,d=i.length;ue?1:0}function Ipt(i){let e=[];for(let t=1,n=i.length;t{Wr();Q2e=class{constructor(e,t,n,o,r){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=o,this.background=r}};xci=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,G2e=class{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;let t=e.match(xci);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=me.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}},vW=class{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(yci(e),t)}static createFromParsedTokenTheme(e,t){return wci(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let n=this._cache.get(t);if(typeof n>"u"){let o=this._match(t),r=_ci(t);n=(o.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}},Cci=/\b(comment|string|regex|regexp)\b/;q2e=class i{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}},Y2e=class i{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),n,o;t===-1?(n=e,o=""):(n=e.substring(0,t),o=e.substring(t+1));let r=this._children.get(n);return typeof r<"u"?r.match(o):this._mainRule}insert(e,t,n,o){if(e===""){this._mainRule.acceptOverwrite(t,n,o);return}let r=e.indexOf("."),s,a;r===-1?(s=e,a=""):(s=e.substring(0,r),a=e.substring(r+1));let l=this._children.get(s);typeof l>"u"&&(l=new i(this._mainRule.clone()),this._children.set(s,l)),l.insert(a,t,n,o)}}});var Npt,Mpt,Rpt,Fpt,Opt=D(()=>{Am();nr();Npt={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Zh]:"#FFFFFE",[rm]:"#000000",[yEe]:"#E5EBF1",[VL]:"#D3D3D3",[HL]:"#939393",[Oz]:"#ADD6FF4D"}},Mpt={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Zh]:"#1E1E1E",[rm]:"#D4D4D4",[yEe]:"#3A3D41",[VL]:"#404040",[HL]:"#707070",[Oz]:"#ADD6FF26"}},Rpt={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Zh]:"#000000",[rm]:"#FFFFFF",[VL]:"#FFFFFF",[HL]:"#FFFFFF"}},Fpt={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Zh]:"#FFFFFF",[rm]:"#292929",[VL]:"#292929",[HL]:"#292929"}}});function Ln(i,e,t,n){return aN.registerIcon(i,e,t,n)}function J2e(){return aN}function Dci(){let i=ZK();for(let e in i){let t="\\"+i[e].toString(16);aN.registerIcon(e,{fontCharacter:t})}}var Eci,Ppt,Bpt,K2e,aN,Vpt,Hpt,zpt,cse,aSn,lSn,cSn,uSn,Ap=D(()=>{Gt();oo();F6();ko();et();gn();mn();Be();j$();fa();Eci={IconContribution:"base.contributions.icons"};(function(i){function e(t,n){let o=t.defaults;for(;ut.isThemeIcon(o);){let r=aN.getIcon(o.id);if(!r)return;o=r.defaults}return o}i.getDefinition=e})(Ppt||(Ppt={}));(function(i){function e(n){return{weight:n.weight,style:n.style,src:n.src.map(o=>({format:o.format,location:o.location.toString()}))}}i.toJSONObject=e;function t(n){let o=r=>Na(r)?r:void 0;if(n&&Array.isArray(n.src)&&n.src.every(r=>Na(r.format)&&Na(r.location)))return{weight:o(n.weight),style:o(n.style),src:n.src.map(r=>({format:r.format,location:Je.parse(r.location)}))}}i.fromJSONObject=t})(Bpt||(Bpt={}));K2e=class{constructor(){this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:y("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:y("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ut.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,o){let r=this.iconsById[e];if(r){if(n&&!r.description){r.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;let l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=n),this._onDidChange.fire()}return r}let s={id:e,description:n,defaults:t,deprecationMessage:o};this.iconsById[e]=s;let a={$ref:"#/definitions/icons"};return o&&(a.deprecationMessage=o),n&&(a.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(r,s)=>r.id.localeCompare(s.id),t=r=>{for(;ut.isThemeIcon(r.defaults);)r=this.iconsById[r.defaults.id];return`codicon codicon-${r?r.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let o=Object.keys(this.iconsById).map(r=>this.iconsById[r]);for(let r of o.filter(s=>!!s.description).sort(e))n.push(`||${r.id}|${ut.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(let r of o.filter(s=>!ut.isThemeIcon(s.defaults)).sort(e))n.push(`||${r.id}|`);return n.join(` +`)}},aN=new K2e;Qi.add(Eci.IconContribution,aN);Dci();Vpt="vscode://schemas/icons",Hpt=Qi.as(MI.JSONContribution);Hpt.registerSchema(Vpt,aN.getIconSchema());zpt=new si(()=>Hpt.notifySchemaChanged(Vpt),200);aN.onDidChange(()=>{zpt.isScheduled()||zpt.schedule()});cse=Ln("widget-close",De.close,y("widgetClose","Icon for the close action in widgets.")),aSn=Ln("goto-previous-location",De.arrowUp,y("previousChangeIcon","Icon for goto previous editor location.")),lSn=Ln("goto-next-location",De.arrowDown,y("nextChangeIcon","Icon for goto next editor location.")),cSn=ut.modify(De.sync,"spin"),uSn=ut.modify(De.loading,"spin")});function Wpt(i){let e=new se,t=e.add(new q),n=J2e();return e.add(n.onDidChange(()=>t.fire())),i&&e.add(i.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){let o=i?i.getProductIconTheme():new yW,r={},s=[],a=[];for(let l of n.getIcons()){let c=o.getIcon(l);if(!c)continue;let u=c.font,d=`--vscode-icon-${l.id}-font-family`,h=`--vscode-icon-${l.id}-content`;u?(r[u.id]=u.definition,a.push(`${d}: ${H$(u.id)};`,`${h}: '${c.fontCharacter}';`),s.push(`.codicon-${l.id}:before { content: '${c.fontCharacter}'; font-family: ${H$(u.id)}; }`)):(a.push(`${h}: '${c.fontCharacter}'; ${d}: 'codicon';`),s.push(`.codicon-${l.id}:before { content: '${c.fontCharacter}'; }`))}for(let l in r){let c=r[l],u=c.weight?`font-weight: ${c.weight};`:"",d=c.style?`font-style: ${c.style};`:"",h=c.src.map(f=>`${im(f.location)} format('${f.format}')`).join(", ");s.push(`@font-face { src: ${h}; font-family: ${H$(l)};${u}${d} font-display: block; }`)}return s.push(`:root { ${a.join(" ")} }`),s.join(` +`)}}}var yW,Upt=D(()=>{Ye();et();de();ko();Ap();yW=class{getIcon(e){let t=J2e(),n=e.defaults;for(;ut.isThemeIcon(n);){let o=t.getIcon(n.id);if(!o)return;n=o.defaults}return n}}});function dse(i){return i===x1||i===lN||i===XE||i===ZE}function X2e(i){switch(i){case x1:return Npt;case lN:return Mpt;case XE:return Rpt;case ZE:return Fpt}}function use(i){let e=X2e(i);return new hse(i,e)}var x1,lN,XE,ZE,jpt,Tci,hse,fse,Z2e=D(()=>{Ye();Kh();Wr();et();ro();AL();Lpt();Opt();fa();nr();io();de();Jb();Upt();gd();x1="vs",lN="vs-dark",XE="hc-black",ZE="hc-light",jpt=Qi.as(mEe.ColorContribution),Tci=Qi.as(dke.ThemingContribution),hse=class{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let n=t.base;e.length>0?(dse(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,me.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=X2e(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,me.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){let n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=jpt.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case x1:return ip.LIGHT;case XE:return ip.HIGH_CONTRAST_DARK;case ZE:return ip.HIGH_CONTRAST_LIGHT;default:return ip.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let r=X2e(this.themeData.base);e=r.rules,r.encodedTokensColors&&(t=r.encodedTokensColors)}let n=this.themeData.colors["editor.foreground"],o=this.themeData.colors["editor.background"];if(n||o){let r={token:""};n&&(r.foreground=n),o&&(r.background=o),e.push(r)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=vW.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){let r=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=Fs.getForeground(r),a=Fs.getFontStyle(r);return{foreground:s,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}};fse=class extends H{constructor(){super(),this._onColorThemeChange=this._register(new q),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new q),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new yW,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(x1,use(x1)),this._knownThemes.set(lN,use(lN)),this._knownThemes.set(XE,use(XE)),this._knownThemes.set(ZE,use(ZE));let e=this._register(Wpt(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(x1),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),FSe(Xi,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return kI(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=el(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),H.None}_registerShadowDomContainer(e){let t=el(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(x1),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=Xi.matchMedia("(forced-colors: active)").matches;if(e!==ju(this._theme.type)){let t;wy(this._theme.type)?t=e?XE:lN:t=e?ZE:x1,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},n={addRule:s=>{t[s]||(e.push(s),t[s]=!0)}};Tci.getThemingParticipants().forEach(s=>s(this._theme,n,this._environment));let o=[];for(let s of jpt.getColors()){let a=this._theme.getColor(s.id,!0);a&&o.push(`${Q$(s.id)}: ${a.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${o.join(` +`)} }`);let r=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(Ipt(r)),this._themeCSS=e.join(` +`),this._updateCSS(),Gn.setColorMap(r),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}});var hu,cN=D(()=>{ht();hu=At("themeService")});var kci,$2e,pse,Qpt=D(()=>{Ye();gd();et();de();fh();ao();Bt();Px();kci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},$2e=function(i,e){return function(t,n){e(t,n,i)}},pse=class extends H{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new q,this._onDidChangeReducedMotion=new q,this._onDidChangeLinkUnderline=new q,this._accessibilityModeEnabledContext=EL.bindTo(this._contextKeyService);let o=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(o(),this._onDidChangeScreenReaderOptimized.fire()),s.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),o(),this._register(this.onDidChangeScreenReaderOptimized(()=>o()));let r=Xi.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(r),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(ce(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));let t=()=>{let n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",n),this._layoutService.mainContainer.classList.toggle("enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(t=>{if(t.affectsConfiguration("accessibility.underlineLinks")){let n=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=n,this._onDidChangeLinkUnderline.fire()}}));let e=()=>{let t=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",t)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){let e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){let e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};pse=kci([$2e(0,Ze),$2e(1,lf),$2e(2,Et)],pse)});function Ici(i,e,t){let n=nat(e)?e.submenu.id:e.id,o=typeof e.title=="string"?e.title:e.title.value,r=Cy({id:`hide/${i.id}/${n}`,label:y("hide.label","Hide '{0}'",o),run(){t.updateHidden(i,n,!0)}}),s=Cy({id:`toggle/${i.id}/${n}`,label:o,get checked(){return!t.isHidden(i,n)},run(){t.updateHidden(i,n,!!this.checked)}});return{hide:r,toggle:s,get isHidden(){return!s.checked}}}function nMe(i,e,t,n=void 0,o=!0){return Cy({id:`configureKeybinding/${t}`,label:y("configure keybinding","Configure Keybinding"),enabled:o,run(){let s=!!!e.lookupKeybinding(t)&&n?n.serialize():void 0;i.executeCommand("workbench.action.openGlobalKeybindings",`@command:${t}`+(s?` +when:${s}`:""))}})}var bse,C1,lB,wW,mse,eMe,tMe,iMe,gse,oMe=D(()=>{Gt();et();de();go();to();Bt();il();VA();Wt();Be();Xo();bse=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},C1=function(i,e){return function(t,n){e(t,n,i)}},mse=class{constructor(e,t,n){this._commandService=e,this._keybindingService=t,this._hiddenStates=new eMe(n)}createMenu(e,t,n){return new gse(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,t)}getMenuActions(e,t,n){let o=new gse(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,t),r=o.getActions(n);return o.dispose(),r}resetHiddenStates(e){this._hiddenStates.reset(e)}};mse=bse([C1(0,Ii),C1(1,Xt),C1(2,oc)],mse);eMe=class{static{lB=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new se,this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(lB._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,lB._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(lB._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){let n=this._isHiddenByDefault(e,t),o=this._data[e.id]?.includes(t)??!1;return n?!o:o}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);let r=this._data[e.id];if(n)r?r.indexOf(t)<0&&r.push(t):this._data[e.id]=[t];else if(r){let s=r.indexOf(t);s>=0&&Nst(r,s),r.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(lB._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};eMe=lB=bse([C1(0,oc)],eMe);tMe=class i{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();let e=this._sort(Xr.getMenuItems(this._id)),t;for(let n of e){let o=n.group||"";(!t||t[0]!==o)&&(t=[o,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeysAndSubmenuIds(n)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(i._fillInKbExprKeys(e.when,this._structureContextKeys),rE(e)){if(e.command.precondition&&i._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;i._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(Xr.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}},iMe=wW=class extends tMe{constructor(e,t,n,o,r,s){super(e,n),this._hiddenStates=t,this._commandService=o,this._keybindingService=r,this._contextKeyService=s,this.refresh()}createActionGroups(e){let t=[];for(let n of this._menuGroups){let[o,r]=n,s;for(let a of r)if(this._contextKeyService.contextMatchesRules(a.when)){let l=rE(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);let c=Ici(this._id,l?a.command:a,this._hiddenStates);if(l){let u=nMe(this._commandService,this._keybindingService,a.command.id,a.when);(s??=[]).push(new Kl(a.command,a.alt,e,c,u,this._contextKeyService,this._commandService))}else{let u=new wW(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),d=yr.join(...u.map(h=>h[1]));d.length>0&&(s??=[]).push(new e0(a,c,d))}}s&&s.length>0&&t.push([o,s])}return t}_sort(e){return e.sort(wW._compareMenuItems)}static _compareMenuItems(e,t){let n=e.group,o=t.group;if(n!==o){if(n){if(!o)return-1}else return 1;if(n==="navigation")return-1;if(o==="navigation")return 1;let a=n.localeCompare(o);if(a!==0)return a}let r=e.order||0,s=t.order||0;return rs?1:wW._compareTitles(rE(e)?e.command.title:e.title,rE(t)?t.command.title:t.title)}static _compareTitles(e,t){let n=typeof e=="string"?e:e.original,o=typeof t=="string"?t:t.original;return n.localeCompare(o)}};iMe=wW=bse([C1(3,Ii),C1(4,Xt),C1(5,Ze)],iMe);gse=class{constructor(e,t,n,o,r,s){this._disposables=new se,this._menuInfo=new iMe(e,t,n.emitEventsForSubmenuChanges,o,r,s);let a=new si(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Xr.onDidChangeMenu(d=>{for(let h of this._menuInfo.allMenuIds)if(d.has(h)){a.schedule();break}}));let l=this._disposables.add(new se),c=d=>{let h=!1,f=!1,p=!1;for(let g of d)if(h=h||g.isStructuralChange,f=f||g.isEnablementChange,p=p||g.isToggleChange,h&&f&&p)break;return{menu:this,isStructuralChange:h,isEnablementChange:f,isToggleChange:p}},u=()=>{l.add(s.onDidChangeContext(d=>{let h=d.affectsSome(this._menuInfo.structureContextKeys),f=d.affectsSome(this._menuInfo.preconditionContextKeys),p=d.affectsSome(this._menuInfo.toggledContextKeys);(h||f||p)&&this._onDidChange.fire({menu:this,isStructuralChange:h,isEnablementChange:f,isToggleChange:p})})),l.add(t.onDidChange(d=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new mR({onWillAddFirstListener:u,onDidRemoveLastListener:l.clear.bind(l),delay:n.eventDebounceDelay,merge:c}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};gse=bse([C1(3,Ii),C1(4,Xt),C1(5,Ze)],gse)});var Lci,Gpt,rMe,qpt,Ase,Ypt=D(()=>{Kh();Ye();gd();Gt();et();VS();de();mn();Px();ch();Lci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Gpt=function(i,e){return function(t,n){e(t,n,i)}},qpt="application/vnd.code.resources",Ase=class extends H{static{rMe=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Zf||i$)&&this.installWebKitWriteTextWorkaround(),this._register(Ee.runAndSubscribe(DI,({window:n,disposables:o})=>{o.add(ce(n.document,"copy",()=>this.clearResourcesState()))},{window:Xi,disposables:this._store}))}installWebKitWriteTextWorkaround(){let e=()=>{let t=new em;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,LI().navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)})};this._register(Ee.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:n})=>{n.add(ce(t,"click",e)),n.add(ce(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.clearResourcesState(),t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await LI().navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){let t=Ax(),n=t.activeElement,o=t.body.appendChild(xe("textarea",{"aria-hidden":!0}));o.style.height="1px",o.style.width="1px",o.style.position="absolute",o.value=e,o.focus(),o.select(),t.execCommand("copy"),To(n)&&n.focus(),o.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await LI().navigator.clipboard.readText()}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{let t=await LI().navigator.clipboard.read();for(let n of t)if(n.types.includes(`web ${qpt}`)){let o=await n.getType(`web ${qpt}`);return JSON.parse(await o.text()).map(s=>Je.from(s))}}catch{}let e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;let e=await this.readText();return zS(e.substring(0,rMe.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};Ase=rMe=Lci([Gpt(0,lf),Gpt(1,sr)],Ase)});var Ah,cC=D(()=>{ht();Ah=At("clipboardService")});function Rci(i,e){return i.allKeysContainedIn(new Set(Object.keys(e)))}function Fci(i){for(;i;){if(i.hasAttribute(xW)){let e=i.getAttribute(xW);return e?parseInt(e,10):NaN}i=i.parentElement}return 0}function Oci(i,e,t){i.get(Ze).createKey(String(e),Pci(t))}function Pci(i){return Eee(i,e=>{if(typeof e=="object"&&e.$mid===1)return Je.revive(e).toString();if(e instanceof Je)return e.toString()})}var Nci,Mci,xW,CW,cB,sMe,aMe,vse,yse,lMe,wse,xse,cMe,Kpt=D(()=>{et();ld();de();rh();ine();mn();Be();to();ao();Bt();Nci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Mci=function(i,e){return function(t,n){e(t,n,i)}},xW="data-keybinding-context",CW=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){let t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},cB=class i extends CW{static{this.INSTANCE=new i}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}},sMe=class i extends CW{static{this._keyPrefix="config."}constructor(e,t,n){super(e,null),this._configurationService=t,this._values=NL.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(o=>{if(o.source===7){let r=Array.from(this._values,([s])=>s);this._values.clear(),n.fire(new yse(r))}else{let r=[];for(let s of o.affectedKeys){let a=`config.${s}`,l=this._values.findSuperstr(a);l!==void 0&&(r.push(...hi.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(r.push(a),this._values.delete(a))}n.fire(new yse(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(i._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);let t=e.substr(i._keyPrefix.length),n=this._configurationService.getValue(t),o;switch(typeof n){case"number":case"boolean":case"string":o=n;break;default:Array.isArray(n)?o=JSON.stringify(n):o=n}return this._values.set(e,o),o}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}},aMe=class{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}},vse=class{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}},yse=class{constructor(e){this.keys=e}affectsSome(e){for(let t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}},lMe=class{constructor(e){this.events=e}affectsSome(e){for(let t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}};wse=class extends H{constructor(e){super(),this._onDidChangeContext=this._register(new Jm({merge:t=>new lMe(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new aMe(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new cMe(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");let t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;let n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new vse(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new vse(e))}getContext(e){return this._isDisposed?cB.INSTANCE:this.getContextValuesContainer(Fci(e))}dispose(){super.dispose(),this._isDisposed=!0}},xse=class extends wse{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;let t=this._register(new sMe(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?cB.INSTANCE:this._contexts.get(e)||cB.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new CW(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};xse=Nci([Mci(0,Et)],xse);cMe=class extends wse{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new Vn),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(xW)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(xW,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{let n=this._parent.getContextValuesContainer(this._myContextId).value;Rci(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(xW),super.dispose())}getContextValuesContainer(e){return this._isDisposed?cB.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}};ii.registerCommand("_setContext",Oci);ii.registerCommand({id:"getContextKeyInfo",handler(){return[...ze.all()].sort((i,e)=>i.key.localeCompare(e.key))},metadata:{description:y("getContextKeyInfo","A command that returns information about context keys"),args:[]}});ii.registerCommand("_generateContextKeyInfo",function(){let i=[],e=new Set;for(let t of ze.all())e.has(t.key)||(e.add(t.key),i.push(t));i.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(i,void 0,2))})});var uMe,_W,Jpt=D(()=>{uMe=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}},_W=class{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){let n=this.lookupOrInsertNode(e),o=this.lookupOrInsertNode(t);n.outgoing.set(o.key,o),o.incoming.set(n.key,n)}removeNode(e){let t=this._hashFn(e);this._nodes.delete(t);for(let n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){let t=this._hashFn(e),n=this._nodes.get(t);return n||(n=new uMe(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t} (-> incoming)[${[...n.incoming.keys()].join(", ")}] (outgoing ->)[${[...n.outgoing.keys()].join(",")}] `);return e.join(` -`)}findCycleSlow(){for(let[e,t]of this._nodes){let n=new Set([e]),r=this._findCycle(t,n);if(r)return r}}_findCycle(e,t){for(let[n,r]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);let o=this._findCycle(r,t);if(o)return o;t.delete(n)}}}});var am,IL=D(()=>{am=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}get(e){return this._entries.get(e)}}});var jvi,toe,ioe,qV,jgt=D(()=>{Jt();Lt();ae();H$();Ugt();ht();IL();Sp();jvi=!1,toe=class extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: -${e.toString()}`}},ioe=class i{constructor(e=new am,t=!1,n,r=jvi){this._services=e,this._strict=t,this._parent=n,this._enableTracing=r,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(Ne,this),this._globalGraph=r?n?._globalGraph??new GV(o=>o):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,Vi(this._children),this._children.clear();for(let e of this._servicesToMaybeDispose)y_(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();let n=this,r=new class extends i{dispose(){n._children.delete(r),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(r),t?.add(r),r}invokeFunction(e,...t){this._throwIfDisposed();let n=qV.traceInvocation(this._enableTracing,e),r=!1;try{return e({get:s=>{if(r)throw MM("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(s,n);if(!a)throw new Error(`[invokeFunction] unknown service '${s}'`);return a}},...t)}finally{r=!0,n.stop()}}createInstance(e,...t){this._throwIfDisposed();let n,r;return e instanceof qf?(n=qV.traceCreation(this._enableTracing,e.ctor),r=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=qV.traceCreation(this._enableTracing,e),r=this._createInstance(e,t,n)),n.stop(),r}_createInstance(e,t=[],n){let r=Vb.getServiceDependencies(e).sort((a,l)=>a.index-l.index),o=[];for(let a of r){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),o.push(l)}let s=r.length>0?r[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);let a=s-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof qf)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let n=this._getServiceInstanceOrDescriptor(e);return n instanceof qf?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){let r=new GV(l=>l.id.toString()),o=0,s=[{id:e,desc:t,_trace:n}],a=new Set;for(;s.length;){let l=s.pop();if(!a.has(String(l.id))){if(a.add(String(l.id)),r.lookupOrInsertNode(l),o++>1e3)throw new toe(r);for(let c of Vb.getServiceDependencies(l.desc.ctor)){let u=this._getServiceInstanceOrDescriptor(c.id);if(u||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(l.id),String(c.id)),u instanceof qf){let d={id:c.id,desc:u,_trace:l._trace.branch(c.id,!0)};r.insertEdge(l,d),s.push(d)}}}}for(;;){let l=r.roots();if(l.length===0){if(!r.isEmpty())throw new toe(r);break}for(let{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof qf){let d=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setCreatedServiceInstance(c.id,d)}r.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],r,o){if(this._services.get(e)instanceof qf)return this._createServiceInstance(e,t,n,r,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,r,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,n=[],r,o,s){if(r){let a=new i(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);let l=new Map,c=new HX(()=>{let u=a._createInstance(t,n,o);for(let[d,h]of l){let f=u[d];if(typeof f=="function")for(let p of h)p.disposable=f.apply(u,p.listener)}return l.clear(),s.add(u),u});return new Proxy(Object.create(null),{get(u,d){if(!c.isInitialized&&typeof d=="string"&&(d.startsWith("onDid")||d.startsWith("onWill"))){let p=l.get(d);return p||(p=new Ro,l.set(d,p)),(v,A,w)=>{if(c.isInitialized)return c.value[d](v,A,w);{let C={listener:[v,A,w],disposable:void 0},_=p.push(C);return Ve(()=>{_(),C.disposable?.dispose()})}}}if(d in u)return u[d];let h=c.value,f=h[d];return typeof f!="function"||(f=f.bind(h),u[d]=f),f},set(u,d,h){return c.value[d]=h,!0},getPrototypeOf(u){return t.prototype}})}else{let a=this._createInstance(t,n,o);return s.add(a),a}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}},qV=class i{static{this.all=new Set}static{this._None=new class extends i{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new i(2,t.name||new Error().stack.split(` +`)}findCycleSlow(){for(let[e,t]of this._nodes){let n=new Set([e]),o=this._findCycle(t,n);if(o)return o}}_findCycle(e,t){for(let[n,o]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);let r=this._findCycle(o,t);if(r)return r;t.delete(n)}}}});var _m,uN=D(()=>{_m=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}get(e){return this._entries.get(e)}}});var Bci,Cse,_se,SW,Xpt=D(()=>{Gt();Tt();de();cte();Jpt();ht();uN();Pp();Bci=!1,Cse=class extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: +${e.toString()}`}},_se=class i{constructor(e=new _m,t=!1,n,o=Bci){this._services=e,this._strict=t,this._parent=n,this._enableTracing=o,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(Re,this),this._globalGraph=o?n?._globalGraph??new _W(r=>r):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,Oi(this._children),this._children.clear();for(let e of this._servicesToMaybeDispose)j_(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();let n=this,o=new class extends i{dispose(){n._children.delete(o),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(o),t?.add(o),o}invokeFunction(e,...t){this._throwIfDisposed();let n=SW.traceInvocation(this._enableTracing,e),o=!1;try{return e({get:s=>{if(o)throw fR("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(s,n);if(!a)throw new Error(`[invokeFunction] unknown service '${s}'`);return a}},...t)}finally{o=!0,n.stop()}}createInstance(e,...t){this._throwIfDisposed();let n,o;return e instanceof rp?(n=SW.traceCreation(this._enableTracing,e.ctor),o=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=SW.traceCreation(this._enableTracing,e),o=this._createInstance(e,t,n)),n.stop(),o}_createInstance(e,t=[],n){let o=$b.getServiceDependencies(e).sort((a,l)=>a.index-l.index),r=[];for(let a of o){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),r.push(l)}let s=o.length>0?o[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);let a=s-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,s)}return Reflect.construct(e,t.concat(r))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof rp)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let n=this._getServiceInstanceOrDescriptor(e);return n instanceof rp?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){let o=new _W(l=>l.id.toString()),r=0,s=[{id:e,desc:t,_trace:n}],a=new Set;for(;s.length;){let l=s.pop();if(!a.has(String(l.id))){if(a.add(String(l.id)),o.lookupOrInsertNode(l),r++>1e3)throw new Cse(o);for(let c of $b.getServiceDependencies(l.desc.ctor)){let u=this._getServiceInstanceOrDescriptor(c.id);if(u||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(l.id),String(c.id)),u instanceof rp){let d={id:c.id,desc:u,_trace:l._trace.branch(c.id,!0)};o.insertEdge(l,d),s.push(d)}}}}for(;;){let l=o.roots();if(l.length===0){if(!o.isEmpty())throw new Cse(o);break}for(let{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof rp){let d=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setCreatedServiceInstance(c.id,d)}o.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],o,r){if(this._services.get(e)instanceof rp)return this._createServiceInstance(e,t,n,o,r,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,o,r);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,n=[],o,r,s){if(o){let a=new i(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);let l=new Map,c=new c$(()=>{let u=a._createInstance(t,n,r);for(let[d,h]of l){let f=u[d];if(typeof f=="function")for(let p of h)p.disposable=f.apply(u,p.listener)}return l.clear(),s.add(u),u});return new Proxy(Object.create(null),{get(u,d){if(!c.isInitialized&&typeof d=="string"&&(d.startsWith("onDid")||d.startsWith("onWill"))){let p=l.get(d);return p||(p=new Br,l.set(d,p)),(A,v,w)=>{if(c.isInitialized)return c.value[d](A,v,w);{let C={listener:[A,v,w],disposable:void 0},_=p.push(C);return He(()=>{_(),C.disposable?.dispose()})}}}if(d in u)return u[d];let h=c.value,f=h[d];return typeof f!="function"||(f=f.bind(h),u[d]=f),f},set(u,d,h){return c.value[d]=h,!0},getPrototypeOf(u){return t.prototype}})}else{let a=this._createInstance(t,n,r);return s.add(a),a}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}},SW=class i{static{this.all=new Set}static{this._None=new class extends i{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new i(2,t.name||new Error().stack.split(` `).slice(3,4).join(` -`)):i._None}static traceCreation(e,t){return e?new i(1,t.name):i._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){let n=new i(3,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;i._totals+=e;let t=!1;function n(o,s){let a=[],l=new Array(o+1).join(" ");for(let[c,u,d]of s._dep)if(u&&d){t=!0,a.push(`${l}CREATES -> ${c}`);let h=n(o+1,d);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(` -`)}let r=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(e>2||t)&&i.all.add(r.join(` -`))}}});var Qvi,W2e,U2e,noe,Qgt=D(()=>{Qt();et();td();ql();bl();mn();Vy();Qvi=new Set([jt.inMemory,jt.vscodeSourceControl,jt.walkThrough,jt.walkThroughSnippet,jt.vscodeChatCodeBlock]),W2e=class{constructor(){this._byResource=new ms,this._byOwner=new Map}set(e,t,n){let r=this._byResource.get(e);r||(r=new Map,this._byResource.set(e,r)),r.set(t,n);let o=this._byOwner.get(t);o||(o=new ms,this._byOwner.set(t,o)),o.set(e,n)}get(e,t){return this._byResource.get(e)?.get(t)}delete(e,t){let n=!1,r=!1,o=this._byResource.get(e);o&&(n=o.delete(t));let s=this._byOwner.get(t);if(s&&(r=s.delete(e)),n!==r)throw new Error("illegal state");return n&&r}values(e){return typeof e=="string"?this._byOwner.get(e)?.values()??bi.empty():Xe.isUri(e)?this._byResource.get(e)?.values()??bi.empty():bi.map(bi.concat(...this._byOwner.values()),t=>t[1])}},U2e=class{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new ms,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(let t of e){let n=this._data.get(t);n&&this._substract(n);let r=this._resourceStats(t);this._add(r),this._data.set(t,r)}}_resourceStats(e){let t={errors:0,warnings:0,infos:0,unknowns:0};if(Qvi.has(e.scheme))return t;for(let{severity:n}of this._service.read({resource:e}))n===so.Error?t.errors+=1:n===so.Warning?t.warnings+=1:n===so.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}},noe=class i{constructor(){this._onMarkerChanged=new FM({delay:0,merge:i._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new W2e,this._stats=new U2e(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(let n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(t$(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{let r=[];for(let o of n){let s=i._toMarker(e,t,o);s&&r.push(s)}this._data.set(t,e,r),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:r,severity:o,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}=n;if(s)return l=l>0?l:1,c=c>0?c:1,u=u>=l?u:l,d=d>0?d:c,{resource:t,owner:e,code:r,severity:o,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}}changeAll(e,t){let n=[],r=this._data.values(e);if(r)for(let o of r){let s=bi.first(o);s&&(n.push(s.resource),this._data.delete(s.resource,e))}if(Jo(t)){let o=new ms;for(let{resource:s,marker:a}of t){let l=i._toMarker(e,s,a);if(!l)continue;let c=o.get(s);c?c.push(l):(o.set(s,[l]),n.push(s))}for(let[s,a]of o)this._data.set(s,e,a)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:t,resource:n,severities:r,take:o}=e;if((!o||o<0)&&(o=-1),t&&n){let s=this._data.get(n,t);if(s){let a=[];for(let l of s)if(i._accept(l,r)){let c=a.push(l);if(o>0&&c===o)break}return a}else return[]}else if(!t&&!n){let s=[];for(let a of this._data.values())for(let l of a)if(i._accept(l,r)){let c=s.push(l);if(o>0&&c===o)return s}return s}else{let s=this._data.values(n??t),a=[];for(let l of s)for(let c of l)if(i._accept(c,r)){let u=a.push(c);if(o>0&&u===o)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){let t=new ms;for(let n of e)for(let r of n)t.set(r,!0);return Array.from(t.keys())}}});var roe,Ggt=D(()=>{ae();tIe();cy();sa();roe=class extends W{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=wd.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=wd.createEmptyModel(this.logService);let e=Gi.as(xc.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){let n=this.getConfigurationDefaultOverrides();for(let r of e){let o=n[r],s=t[r];o!==void 0?this._configurationModel.setValue(r,o):s?this._configurationModel.setValue(r,s.default):this._configurationModel.removeValue(r)}}}});var ap,Io,j2e,Qu,kE=D(()=>{Oe();ht();ap=vt("accessibilitySignalService"),Io=class i{static register(e){return new i(e.fileName)}static{this.error=i.register({fileName:"error.mp3"})}static{this.warning=i.register({fileName:"warning.mp3"})}static{this.success=i.register({fileName:"success.mp3"})}static{this.foldedArea=i.register({fileName:"foldedAreas.mp3"})}static{this.break=i.register({fileName:"break.mp3"})}static{this.quickFixes=i.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=i.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=i.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=i.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=i.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=i.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=i.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=i.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponseReceived1=i.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=i.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=i.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=i.register({fileName:"chatResponseReceived4.mp3"})}static{this.clear=i.register({fileName:"clear.mp3"})}static{this.save=i.register({fileName:"save.mp3"})}static{this.format=i.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=i.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=i.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=i.register({fileName:"progress.mp3"})}constructor(e){this.fileName=e}},j2e=class{constructor(e){this.randomOneOf=e}},Qu=class i{constructor(e,t,n,r,o,s){this.sound=e,this.name=t,this.legacySoundSettingsKey=n,this.settingsKey=r,this.legacyAnnouncementSettingsKey=o,this.announcementMessage=s}static{this._signals=new Set}static register(e){let t=new j2e("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new i(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return i._signals.add(n),n}static{this.errorAtPosition=i.register({name:y("accessibilitySignals.positionHasError.name","Error at Position"),sound:Io.error,announcementMessage:y("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=i.register({name:y("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:Io.warning,announcementMessage:y("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=i.register({name:y("accessibilitySignals.lineHasError.name","Error on Line"),sound:Io.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:y("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=i.register({name:y("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:Io.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:y("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=i.register({name:y("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:Io.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:y("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=i.register({name:y("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:Io.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:y("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=i.register({name:y("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:Io.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.terminalQuickFix=i.register({name:y("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:Io.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:y("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=i.register({name:y("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:Io.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:y("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=i.register({name:y("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:Io.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:y("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=i.register({name:y("accessibilitySignals.taskCompleted","Task Completed"),sound:Io.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:y("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=i.register({name:y("accessibilitySignals.taskFailed","Task Failed"),sound:Io.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:y("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=i.register({name:y("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:Io.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:y("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=i.register({name:y("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:Io.success,announcementMessage:y("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=i.register({name:y("accessibilitySignals.terminalBell","Terminal Bell"),sound:Io.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:y("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=i.register({name:y("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:Io.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:y("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=i.register({name:y("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:Io.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:y("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=i.register({name:y("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:Io.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=i.register({name:y("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:Io.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=i.register({name:y("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:Io.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatRequestSent=i.register({name:y("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:Io.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:y("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=i.register({name:y("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[Io.chatResponseReceived1,Io.chatResponseReceived2,Io.chatResponseReceived3,Io.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.progress=i.register({name:y("accessibilitySignals.progress","Progress"),sound:Io.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:y("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=i.register({name:y("accessibilitySignals.clear","Clear"),sound:Io.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:y("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=i.register({name:y("accessibilitySignals.save","Save"),sound:Io.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:y("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"})}static{this.format=i.register({name:y("accessibilitySignals.format","Format"),sound:Io.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:y("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=i.register({name:y("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:Io.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=i.register({name:y("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:Io.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}}});var ooe,qgt=D(()=>{ae();th();ooe=class extends W{constructor(e,t=[]){super(),this.logger=new T$([e,...t]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}});function Xb(i){Ygt.push(i)}function Kgt(){return Ygt.slice(0)}var Ygt,IE=D(()=>{Ygt=[]});var soe,Jgt=D(()=>{soe=class{getParseResult(e){}}});function Xgt(i){return i&&typeof i=="object"&&(!i.overrideIdentifier||typeof i.overrideIdentifier=="string")&&(!i.resource||i.resource instanceof Xe)}function YV(i,e,t){if(!e||!(i instanceof aoe))return;let n=[];Object.keys(e).forEach(r=>{uht(r)&&n.push([`editor.${r}`,e[r]]),t&&dht(r)&&n.push([`diffEditor.${r}`,e[r]])}),n.length>0&&i.updateValues(n)}var s1,Zs,Q2e,G2e,q2e,Y2e,K2e,J2e,X2e,Z2e,LE,$2e,aoe,eMe,tMe,iMe,nMe,rMe,oMe,sMe,aMe,lMe,cMe,uMe,loe,dMe,hMe,ri,KV=D(()=>{UTe();jTe();Tut();Kp();Lut();qut();lht();Pt();Ye();gc();et();Wk();ae();Si();fx();mn();KI();Ste();$p();Nt();We();Zc();Yp();ez();Xn();nr();tIe();Wt();qF();ht();pht();Yr();rIe();nx();oIe();Aht();hO();_c();Qb();eh();pO();hx();Ty();Ec();fs();th();dIe();bd();Kke();Yht();Ift();wc();Nft();xv();VTe();Sl();gpt();Hie();smt();xgt();k2e();kL();Bgt();oh();fr();F2e();Hgt();Bx();Wgt();H$();jgt();IL();PV();Vy();Qgt();vd();rf();yv();Ggt();kE();Ui();ks();qgt();IE();Lt();Ree();ad();ql();KLe();Jgt();s1=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Zs=function(i,e){return function(t,n){e(t,n,i)}},Q2e=class{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new G}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}},G2e=class{constructor(e){this.modelService=e}createModelReference(e){let t=this.modelService.getModel(e);return t?Promise.resolve(new eY(new Q2e(t))):Promise.reject(new Error("Model not found"))}};G2e=s1([Zs(0,an)],G2e);q2e=class i{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return i.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}},Y2e=class{withProgress(e,t,n){return t({report:()=>{}})}},K2e=class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},J2e=class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let n=e;return t&&(n=n+` +`)):i._None}static traceCreation(e,t){return e?new i(1,t.name):i._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){let n=new i(3,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;i._totals+=e;let t=!1;function n(r,s){let a=[],l=new Array(r+1).join(" ");for(let[c,u,d]of s._dep)if(u&&d){t=!0,a.push(`${l}CREATES -> ${c}`);let h=n(r+1,d);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(` +`)}let o=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(e>2||t)&&i.all.add(o.join(` +`))}}});var zci,dMe,hMe,Sse,Zpt=D(()=>{Wt();et();ld();Xl();xl();mn();o1();zci=new Set([Vt.inMemory,Vt.vscodeSourceControl,Vt.walkThrough,Vt.walkThroughSnippet,Vt.vscodeChatCodeBlock]),dMe=class{constructor(){this._byResource=new ps,this._byOwner=new Map}set(e,t,n){let o=this._byResource.get(e);o||(o=new Map,this._byResource.set(e,o)),o.set(t,n);let r=this._byOwner.get(t);r||(r=new ps,this._byOwner.set(t,r)),r.set(e,n)}get(e,t){return this._byResource.get(e)?.get(t)}delete(e,t){let n=!1,o=!1,r=this._byResource.get(e);r&&(n=r.delete(t));let s=this._byOwner.get(t);if(s&&(o=s.delete(e)),n!==o)throw new Error("illegal state");return n&&o}values(e){return typeof e=="string"?this._byOwner.get(e)?.values()??hi.empty():Je.isUri(e)?this._byResource.get(e)?.values()??hi.empty():hi.map(hi.concat(...this._byOwner.values()),t=>t[1])}},hMe=class{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new ps,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(let t of e){let n=this._data.get(t);n&&this._substract(n);let o=this._resourceStats(t);this._add(o),this._data.set(t,o)}}_resourceStats(e){let t={errors:0,warnings:0,infos:0,unknowns:0};if(zci.has(e.scheme))return t;for(let{severity:n}of this._service.read({resource:e}))n===cr.Error?t.errors+=1:n===cr.Warning?t.warnings+=1:n===cr.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}},Sse=class i{constructor(){this._onMarkerChanged=new mR({delay:0,merge:i._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new dMe,this._stats=new hMe(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(let n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(Cee(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{let o=[];for(let r of n){let s=i._toMarker(e,t,r);s&&o.push(s)}this._data.set(t,e,o),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:o,severity:r,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}=n;if(s)return l=l>0?l:1,c=c>0?c:1,u=u>=l?u:l,d=d>0?d:c,{resource:t,owner:e,code:o,severity:r,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}}changeAll(e,t){let n=[],o=this._data.values(e);if(o)for(let r of o){let s=hi.first(r);s&&(n.push(s.resource),this._data.delete(s.resource,e))}if(Kr(t)){let r=new ps;for(let{resource:s,marker:a}of t){let l=i._toMarker(e,s,a);if(!l)continue;let c=r.get(s);c?c.push(l):(r.set(s,[l]),n.push(s))}for(let[s,a]of r)this._data.set(s,e,a)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:t,resource:n,severities:o,take:r}=e;if((!r||r<0)&&(r=-1),t&&n){let s=this._data.get(n,t);if(s){let a=[];for(let l of s)if(i._accept(l,o)){let c=a.push(l);if(r>0&&c===r)break}return a}else return[]}else if(!t&&!n){let s=[];for(let a of this._data.values())for(let l of a)if(i._accept(l,o)){let c=s.push(l);if(r>0&&c===r)return s}return s}else{let s=this._data.values(n??t),a=[];for(let l of s)for(let c of l)if(i._accept(c,o)){let u=a.push(c);if(r>0&&u===r)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){let t=new ps;for(let n of e)for(let o of n)t.set(o,!0);return Array.from(t.keys())}}});var Ese,$pt=D(()=>{de();_Ie();Dy();fa();Ese=class extends H{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Id.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Id.createEmptyModel(this.logService);let e=Qi.as(Tc.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){let n=this.getConfigurationDefaultOverrides();for(let o of e){let r=n[o],s=t[o];r!==void 0?this._configurationModel.setValue(o,r):s?this._configurationModel.setValue(o,s.default):this._configurationModel.removeValue(o)}}}});var vp,Rr,fMe,Xu,$E=D(()=>{Be();ht();vp=At("accessibilitySignalService"),Rr=class i{static register(e){return new i(e.fileName)}static{this.error=i.register({fileName:"error.mp3"})}static{this.warning=i.register({fileName:"warning.mp3"})}static{this.success=i.register({fileName:"success.mp3"})}static{this.foldedArea=i.register({fileName:"foldedAreas.mp3"})}static{this.break=i.register({fileName:"break.mp3"})}static{this.quickFixes=i.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=i.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=i.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=i.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=i.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=i.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=i.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=i.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponseReceived1=i.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=i.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=i.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=i.register({fileName:"chatResponseReceived4.mp3"})}static{this.clear=i.register({fileName:"clear.mp3"})}static{this.save=i.register({fileName:"save.mp3"})}static{this.format=i.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=i.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=i.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=i.register({fileName:"progress.mp3"})}constructor(e){this.fileName=e}},fMe=class{constructor(e){this.randomOneOf=e}},Xu=class i{constructor(e,t,n,o,r,s){this.sound=e,this.name=t,this.legacySoundSettingsKey=n,this.settingsKey=o,this.legacyAnnouncementSettingsKey=r,this.announcementMessage=s}static{this._signals=new Set}static register(e){let t=new fMe("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new i(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return i._signals.add(n),n}static{this.errorAtPosition=i.register({name:y("accessibilitySignals.positionHasError.name","Error at Position"),sound:Rr.error,announcementMessage:y("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=i.register({name:y("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:Rr.warning,announcementMessage:y("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=i.register({name:y("accessibilitySignals.lineHasError.name","Error on Line"),sound:Rr.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:y("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=i.register({name:y("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:Rr.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:y("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=i.register({name:y("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:Rr.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:y("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=i.register({name:y("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:Rr.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:y("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=i.register({name:y("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:Rr.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.terminalQuickFix=i.register({name:y("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:Rr.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:y("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=i.register({name:y("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:Rr.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:y("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=i.register({name:y("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:Rr.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:y("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=i.register({name:y("accessibilitySignals.taskCompleted","Task Completed"),sound:Rr.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:y("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=i.register({name:y("accessibilitySignals.taskFailed","Task Failed"),sound:Rr.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:y("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=i.register({name:y("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:Rr.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:y("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=i.register({name:y("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:Rr.success,announcementMessage:y("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=i.register({name:y("accessibilitySignals.terminalBell","Terminal Bell"),sound:Rr.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:y("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=i.register({name:y("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:Rr.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:y("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=i.register({name:y("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:Rr.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:y("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=i.register({name:y("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:Rr.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=i.register({name:y("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:Rr.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=i.register({name:y("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:Rr.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatRequestSent=i.register({name:y("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:Rr.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:y("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=i.register({name:y("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[Rr.chatResponseReceived1,Rr.chatResponseReceived2,Rr.chatResponseReceived3,Rr.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.progress=i.register({name:y("accessibilitySignals.progress","Progress"),sound:Rr.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:y("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=i.register({name:y("accessibilitySignals.clear","Clear"),sound:Rr.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:y("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=i.register({name:y("accessibilitySignals.save","Save"),sound:Rr.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:y("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"})}static{this.format=i.register({name:y("accessibilitySignals.format","Format"),sound:Rr.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:y("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=i.register({name:y("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:Rr.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=i.register({name:y("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:Rr.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}}});var Dse,emt=D(()=>{de();ch();Dse=class extends H{constructor(e,t=[]){super(),this.logger=new Jee([e,...t]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}});function u0(i){tmt.push(i)}function imt(){return tmt.slice(0)}var tmt,eD=D(()=>{tmt=[]});var Tse,nmt=D(()=>{Tse=class{getParseResult(e){}}});function omt(i){return i&&typeof i=="object"&&(!i.overrideIdentifier||typeof i.overrideIdentifier=="string")&&(!i.resource||i.resource instanceof Je)}function EW(i,e,t){if(!e||!(i instanceof kse))return;let n=[];Object.keys(e).forEach(o=>{but(o)&&n.push([`editor.${o}`,e[o]]),t&&Aut(o)&&n.push([`diffEditor.${o}`,e[o]])}),n.length>0&&i.updateValues(n)}var _1,na,pMe,mMe,gMe,bMe,AMe,vMe,yMe,wMe,tD,xMe,kse,CMe,_Me,SMe,EMe,DMe,TMe,kMe,IMe,LMe,NMe,MMe,Ise,RMe,FMe,Zt,DW=D(()=>{hke();fke();Flt();hm();Blt();ect();mut();Rt();Ye();xc();et();xI();de();wi();Bx();mn();kL();qie();gm();kt();Ue();su();dm();NV();to();ao();_Ie();Bt();zO();ht();wut();Xo();DIe();Tx();TIe();Eut();oP();Ic();o0();lh();sP();Px();Gy();Nc();hs();ch();RIe();Ed();AIe();tdt();Pdt();Dc();zdt();WA();cke();Il();Cht();coe();fft();kpt();Z2e();cN();Qpt();fh();go();oMe();Ypt();cC();Kpt();cte();Xpt();uN();mW();o1();Zpt();Dd();gf();VA();$pt();$E();Hi();Rs();emt();eD();Tt();iie();gd();Xl();ANe();nmt();_1=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},na=function(i,e){return function(t,n){e(t,n,i)}},pMe=class{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new q}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}},mMe=class{constructor(e){this.modelService=e}createModelReference(e){let t=this.modelService.getModel(e);return t?Promise.resolve(new NK(new pMe(t))):Promise.reject(new Error("Model not found"))}};mMe=_1([na(0,an)],mMe);gMe=class i{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return i.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}},bMe=class{withProgress(e,t,n){return t({report:()=>{}})}},AMe=class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},vMe=class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let n=e;return t&&(n=n+` -`+t),Xi.confirm(n)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){let r=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&r.push(e.cancelButton),t=await r[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:qr.Error,message:e,detail:t})}},X2e=class i{static{this.NO_OP=new Eee}info(e){return this.notify({severity:qr.Info,message:e})}warn(e){return this.notify({severity:qr.Warning,message:e})}error(e){return this.notify({severity:qr.Error,message:e})}notify(e){switch(e.severity){case qr.Error:console.error(e.message);break;case qr.Warning:console.warn(e.message);break;default:console.log(e.message);break}return i.NO_OP}prompt(e,t,n,r){return i.NO_OP}status(e,t){return W.None}},Z2e=class{constructor(e){this._onWillExecuteCommand=new G,this._onDidExecuteCommand=new G,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){let n=ci.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let r=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(r)}catch(r){return Promise.reject(r)}}};Z2e=s1([Zs(0,Ne)],Z2e);LE=class extends kte{constructor(e,t,n,r,o,s){super(e,t,n,r,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];let a=f=>{let p=new te;p.add(re(f,De.KEY_DOWN,g=>{let v=new Wi(g);this._dispatch(v,v.target)&&(v.preventDefault(),v.stopPropagation())})),p.add(re(f,De.KEY_UP,g=>{let v=new Wi(g);this._singleModifierDispatch(v,v.target)&&v.preventDefault()})),this._domNodeListeners.push(new $2e(f,p))},l=f=>{for(let p=0;p{f.getOption(61)||a(f.getContainerDomNode())},u=f=>{f.getOption(61)||l(f.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(u)),s.listCodeEditors().forEach(c);let d=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(s.onDiffEditorAdd(d)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,n,r){return hc(ci.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:r}]))}addDynamicKeybindings(e){let t=e.map(n=>({keybinding:F9(n.keybinding,Qa),command:n.command??null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),Ve(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return Xi.document.hasFocus()}_toNormalizedKeybindingItems(e,t){let n=[],r=0;for(let o of e){let s=o.when||void 0,a=o.keybinding;if(!a)n[r++]=new Lz(void 0,o.command,o.commandArgs,s,t,null,!1);else{let l=Nz.resolveKeybinding(a,Qa);for(let c of l)n[r++]=new Lz(c,o.command,o.commandArgs,s,t,null,!1)}}return n}resolveKeyboardEvent(e){let t=new $m(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Nz([t],Qa)}};LE=s1([Zs(0,Ze),Zs(1,Oi),Zs(2,io),Zs(3,Cn),Zs(4,no),Zs(5,ai)],LE);$2e=class extends W{constructor(e,t){super(),this.domNode=e,this._register(t)}};aoe=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new G,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;let t=new roe(e);this._configuration=new kz(t.reload(),wd.createEmptyModel(e),wd.createEmptyModel(e),wd.createEmptyModel(e),wd.createEmptyModel(e),wd.createEmptyModel(e),new ms,wd.createEmptyModel(e),new ms,e),t.dispose()}getValue(e,t){let n=typeof e=="string"?e:void 0,r=Xgt(e)?e:Xgt(t)?t:{};return this._configuration.getValue(n,r,void 0)}updateValues(e){let t={data:this._configuration.toData()},n=[];for(let r of e){let[o,s]=r;this.getValue(o)!==s&&(this._configuration.updateValue(o,s),n.push(o))}if(n.length>0){let r=new Dte({keys:n,overrides:[]},t,this._configuration,void 0,this.logService);r.source=8,this._onDidChangeConfiguration.fire(r)}return Promise.resolve()}updateValue(e,t,n,r){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};aoe=s1([Zs(0,no)],aoe);eMe=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new G,this.configurationService.onDidChangeConfiguration(r=>{this._onDidChangeConfiguration.fire({affectedKeys:r.affectedKeys,affectsConfiguration:(o,s)=>r.affectsConfiguration(s)})})}getValue(e,t,n){let r=K.isIPosition(t)?t:null,o=r?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,s=e?this.getLanguage(e,r):void 0;return typeof o>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){let n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};eMe=s1([Zs(0,kt),Zs(1,an),Zs(2,rn)],eMe);tMe=class{constructor(e){this.configurationService=e}getEOL(e,t){let n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:vo||qt?` +`+t),Xi.confirm(n)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){let o=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&o.push(e.cancelButton),t=await o[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:Jo.Error,message:e,detail:t})}},yMe=class i{static{this.NO_OP=new Yte}info(e){return this.notify({severity:Jo.Info,message:e})}warn(e){return this.notify({severity:Jo.Warning,message:e})}error(e){return this.notify({severity:Jo.Error,message:e})}notify(e){switch(e.severity){case Jo.Error:console.error(e.message);break;case Jo.Warning:console.warn(e.message);break;default:console.log(e.message);break}return i.NO_OP}prompt(e,t,n,o){return i.NO_OP}status(e,t){return H.None}},wMe=class{constructor(e){this._onWillExecuteCommand=new q,this._onDidExecuteCommand=new q,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){let n=ii.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let o=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(o)}catch(o){return Promise.reject(o)}}};wMe=_1([na(0,Re)],wMe);tD=class extends Xie{constructor(e,t,n,o,r,s){super(e,t,n,o,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];let a=f=>{let p=new se;p.add(ce(f,Te.KEY_DOWN,g=>{let A=new Vi(g);this._dispatch(A,A.target)&&(A.preventDefault(),A.stopPropagation())})),p.add(ce(f,Te.KEY_UP,g=>{let A=new Vi(g);this._singleModifierDispatch(A,A.target)&&A.preventDefault()})),this._domNodeListeners.push(new xMe(f,p))},l=f=>{for(let p=0;p{f.getOption(61)||a(f.getContainerDomNode())},u=f=>{f.getOption(61)||l(f.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(u)),s.listCodeEditors().forEach(c);let d=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(s.onDiffEditorAdd(d)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,n,o){return gc(ii.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:o}]))}addDynamicKeybindings(e){let t=e.map(n=>({keybinding:fz(n.keybinding,Ja),command:n.command??null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),He(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return Xi.document.hasFocus()}_toNormalizedKeybindingItems(e,t){let n=[],o=0;for(let r of e){let s=r.when||void 0,a=r.keybinding;if(!a)n[o++]=new cH(void 0,r.command,r.commandArgs,s,t,null,!1);else{let l=uH.resolveKeybinding(a,Ja);for(let c of l)n[o++]=new cH(c,r.command,r.commandArgs,s,t,null,!1)}}return n}resolveKeyboardEvent(e){let t=new fg(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new uH([t],Ja)}};tD=_1([na(0,Ze),na(1,Ii),na(2,rr),na(3,_n),na(4,sr),na(5,ei)],tD);xMe=class extends H{constructor(e,t){super(),this.domNode=e,this._register(t)}};kse=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new q,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;let t=new Ese(e);this._configuration=new aH(t.reload(),Id.createEmptyModel(e),Id.createEmptyModel(e),Id.createEmptyModel(e),Id.createEmptyModel(e),Id.createEmptyModel(e),new ps,Id.createEmptyModel(e),new ps,e),t.dispose()}getValue(e,t){let n=typeof e=="string"?e:void 0,o=omt(e)?e:omt(t)?t:{};return this._configuration.getValue(n,o,void 0)}updateValues(e){let t={data:this._configuration.toData()},n=[];for(let o of e){let[r,s]=o;this.getValue(r)!==s&&(this._configuration.updateValue(r,s),n.push(r))}if(n.length>0){let o=new Kie({keys:n,overrides:[]},t,this._configuration,void 0,this.logService);o.source=8,this._onDidChangeConfiguration.fire(o)}return Promise.resolve()}updateValue(e,t,n,o){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};kse=_1([na(0,sr)],kse);CMe=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new q,this.configurationService.onDidChangeConfiguration(o=>{this._onDidChangeConfiguration.fire({affectedKeys:o.affectedKeys,affectsConfiguration:(r,s)=>o.affectsConfiguration(s)})})}getValue(e,t,n){let o=J.isIPosition(t)?t:null,r=o?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,s=e?this.getLanguage(e,o):void 0;return typeof r>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(r,{resource:e,overrideIdentifier:s})}getLanguage(e,t){let n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};CMe=_1([na(0,Et),na(1,an),na(2,on)],CMe);_Me=class{constructor(e){this.configurationService=e}getEOL(e,t){let n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Cr||jt?` `:`\r -`}};tMe=s1([Zs(0,kt)],tMe);iMe=class{publicLog2(){}},nMe=class i{static{this.SCHEME="inmemory"}constructor(){let e=Xe.from({scheme:i.SCHEME,authority:"model",path:"/"});this.workspace={id:uIe,folders:[new Fte({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===i.SCHEME?this.workspace.folders[0]:null}};rMe=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){let n=Array.isArray(e)?e:lO.convert(e),r=new Map;for(let a of n){if(!(a instanceof dE))throw new Error("bad edit - only text edits are supported");let l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=r.get(l);c||(c=[],r.set(l,c)),c.push(Dn.replaceMove(N.lift(a.textEdit.range),a.textEdit.text))}let o=0,s=0;for(let[a,l]of r)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),s+=1,o+=l.length;return{ariaSummary:ig(Wte.bulkEditServiceSummary,o,s),isApplied:o>0}}};rMe=s1([Zs(0,an)],rMe);oMe=class{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Sc(e)}},sMe=class extends yte{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){let r=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();r&&(t=r.getContainerDomNode())}return super.showContextView(e,t,n)}};sMe=s1([Zs(0,Kh),Zs(1,ai)],sMe);aMe=class{constructor(){this._neverEmitter=new G,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},lMe=class extends eie{constructor(){super()}},cMe=class extends ooe{constructor(){super(new D$)}},uMe=class extends Eie{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s),this.configure({blockMouse:!1})}};uMe=s1([Zs(0,io),Zs(1,Cn),Zs(2,rh),Zs(3,ni),Zs(4,el),Zs(5,Ze)],uMe);loe={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"},dMe=class extends wee{constructor(e,t,n,r,o){super(loe,e,t,n,r,o)}};dMe=s1([Zs(0,an),Zs(1,RI),Zs(2,no),Zs(3,qi),Zs(4,Le)],dMe);hMe=class{async playSignal(e,t){}};ui(no,cMe,0);ui(kt,aoe,0);ui(RI,eMe,0);ui(yee,tMe,0);ui(gv,nMe,0);ui(mv,oMe,0);ui(io,iMe,0);ui(gy,J2e,0);ui(ZF,K2e,0);ui(Cn,X2e,0);ui(tf,noe,0);ui(rn,lMe,0);ui(ru,Qre,0);ui(an,Nne,0);ui(OO,Vie,0);ui(Ze,eoe,0);ui(Mte,Y2e,0);ui($f,q2e,0);ui(ec,gie,0);ui(pa,dMe,0);ui(Dy,rMe,0);ui(Ute,aMe,0);ui(xs,G2e,0);ui(Cs,Gre,0);ui(np,fre,0);ui(Oi,Z2e,0);ui(ni,LE,0);ui(Na,Vre,0);ui(rh,sMe,0);ui(jo,Tie,0);ui(uh,Jre,0);ui(Xs,uMe,0);ui(el,qre,0);ui(ap,hMe,0);ui(bne,soe,0);(function(i){let e=new am;for(let[l,c]of YDe())e.set(l,c);let t=new ioe(e,!0);e.set(Ne,t);function n(l){r||s({});let c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof qf?t.invokeFunction(u=>u.get(l)):c}i.get=n;let r=!1,o=new G;function s(l){if(r)return t;r=!0;for(let[u,d]of YDe())e.get(u)||e.set(u,d);for(let u in l)if(l.hasOwnProperty(u)){let d=vt(u);e.get(d)instanceof qf&&e.set(d,l[u])}let c=Kgt();for(let u of c)try{t.createInstance(u)}catch(d){pt(d)}return o.fire(),t}i.initialize=s;function a(l){if(r)return l();let c=new te,u=c.add(o.event(()=>{u.dispose(),c.add(l())}));return c}i.withServices=a})(ri||(ri={}))});function Zgt(i,e){return new fMe(i,e)}var fMe,$gt=D(()=>{Xd();VTe();KV();fMe=class extends tz{constructor(e,t){let n={amdModuleId:loe.amdModuleId,esmModuleLocation:loe.esmModuleLocation,label:t.label};super(n,t.keepIdleModels||!1,e),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{let t=this._foreignModuleHost?A7(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;let r=(a,l)=>e.$fmr(a,l),o=(a,l)=>function(){let c=Array.prototype.slice.call(arguments,0);return l(a,c)},s={};for(let a of n)s[a]=o(a,r);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then(t=>this.getProxy())}}});var zx,JV=D(()=>{zx={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}});var XV,coe,LL,dh,Vx,uoe,vP,NL,Zb=D(()=>{Qt();Pt();We();XV=class{constructor(e,t,n,r){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=r|0}},coe=class{constructor(e,t){this.tabSize=e,this.data=t}},LL=class{constructor(e,t,n,r,o,s,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=r,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=a}},dh=class i{constructor(e,t,n,r,o,s,a,l,c,u){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=r,this.isBasicASCII=i.isBasicASCII(n,s),this.containsRTL=i.containsRTL(n,this.isBasicASCII,o),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=u}static isBasicASCII(e,t){return t?ZA(e):!0}static containsRTL(e,t,n){return!t&&n?rv(e):!1}},Vx=class{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}},uoe=class{constructor(e,t,n,r){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=r}toInlineDecoration(e){return new Vx(new N(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}},vP=class{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}},NL=class i{constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Zi(e.data,t.data)}static equalsArr(e,t){return Zi(e,t,i.equals)}}});function Gvi(i){return Array.isArray(i)}function tbt(i){return!Gvi(i)}function pMe(i){return typeof i=="string"}function mMe(i){return!pMe(i)}function NE(i){return!i}function Tv(i,e){return i.ignoreCase&&e?e.toLowerCase():e}function gMe(i){return i.replace(/[&<>'"_]/g,"-")}function ibt(i,e){console.log(`${i.languageId}: ${e}`)}function Kr(i,e){return new Error(`${i.languageId}: ${e}`)}function a1(i,e,t,n,r){let o=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,s=null;return e.replace(o,function(a,l,c,u,d,h,f,p,g){return NE(c)?NE(u)?!NE(d)&&d0;){let n=i.tokenizer[t];if(n)return n;let r=t.lastIndexOf(".");r<0?t=null:t=t.substr(0,r)}return null}function rbt(i,e){let t=e;for(;t&&t.length>0;){if(i.stateNames[t])return!0;let r=t.lastIndexOf(".");r<0?t=null:t=t.substr(0,r)}return!1}var bMe=D(()=>{});function Kvi(i,e){if(!e)return null;e=Tv(i,e);let t=i.brackets;for(let n of t){if(n.open===e)return{token:n.token,bracketType:1};if(n.close===e)return{token:n.token,bracketType:-1}}return null}var qvi,Yvi,vMe,sbt,eH,yP,AP,ME,$V,AMe,yMe,ML,wMe=D(()=>{ae();tr();aO();bMe();nr();qvi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Yvi=function(i,e){return function(t,n){e(t,n,i)}},sbt=5,eH=class i{static{this._INSTANCE=new i(sbt)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new yP(e,t);let n=yP.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let r=this._entries[n];return r||(r=new yP(e,t),this._entries[n]=r,r)}},yP=class i{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return i._equals(this,e)}push(e){return eH.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return eH.create(this.parent,e)}},AP=class i{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new i(this.languageId,this.state)}},ME=class i{static{this._INSTANCE=new i(sbt)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new $V(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new $V(e,t);let n=yP.getStackElementId(e),r=this._entries[n];return r||(r=new $V(e,null),this._entries[n]=r,r)}},$V=class i{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:ME.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof i)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}},AMe=class{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new U0(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,r){let o=n.languageId,s=n.state,a=Wn.get(o);if(!a)return this.enterLanguage(o),this.emit(r,""),s;let l=a.tokenize(e,t,s);if(r!==0)for(let c of l.tokens)this._tokens.push(new U0(c.offset+r,c.type,c.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new E_(this._tokens,e)}},yMe=class i{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){let n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let r=e!==null?e.length:0,o=t.length,s=n!==null?n.length:0;if(r===0&&o===0&&s===0)return new Uint32Array(0);if(r===0&&o===0)return n;if(o===0&&s===0)return e;let a=new Uint32Array(r+o+s);e!==null&&a.set(e);for(let l=0;l{if(s)return;let l=!1;for(let c=0,u=a.changedLanguages.length;c{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){let e=[];for(let t in this._embeddedLanguages){let n=Wn.get(t);if(n){if(n instanceof vMe){let r=n.getLoadStatus();r.loaded===!1&&e.push(r.promise)}continue}Wn.isResolved(t)||e.push(Wn.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){let e=eH.create(null,this._lexer.start);return ME.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return sO(this._languageId,n);let r=new AMe,o=this._tokenize(e,t,n,r);return r.finalize(o)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return cE(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);let r=new yMe(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,n,r);return r.finalize(o)}_tokenize(e,t,n,r){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,r):this._myTokenize(e,t,n,0,r)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=ZV(this._lexer,t.stack.state),!n))throw Kr(this._lexer,"tokenizer state is not defined: "+t.stack.state);let r=-1,o=!1;for(let s of n){if(!mMe(s.action)||s.action.nextEmbedded!=="@pop")continue;o=!0;let a=s.resolveRegex(t.stack.state),l=a.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){let u=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),u)}let c=e.search(a);c===-1||c!==0&&s.matchOnlyAtLineStart||(r===-1||c0&&o.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,r);let l=e.substring(s);return this._myTokenize(l,t,n,r+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,r,o){o.enterLanguage(this._languageId);let s=e.length,a=t&&this._lexer.includeLF?e+` -`:e,l=a.length,c=n.embeddedLanguageData,u=n.stack,d=0,h=null,f=!0;for(;f||d=l)break;f=!1;let M=this._lexer.tokenizer[A];if(!M&&(M=ZV(this._lexer,A),!M))throw Kr(this._lexer,"tokenizer state is not defined: "+A);let z=a.substr(d);for(let H of M)if((d===0||!H.matchOnlyAtLineStart)&&(w=z.match(H.resolveRegex(A)),w)){C=w[0],_=H.action;break}}if(w||(w=[""],C=""),_||(d=this._lexer.maxStack)throw Kr(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]");u=u.push(A)}else if(_.next==="@pop"){if(u.depth<=1)throw Kr(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(E));u=u.pop()}else if(_.next==="@popall")u=u.popall();else{let M=a1(this._lexer,_.next,C,w,A);if(M[0]==="@"&&(M=M.substr(1)),ZV(this._lexer,M))u=u.push(M);else throw Kr(this._lexer,"trying to set a next state '"+M+"' that is undefined in rule: "+this._safeRuleName(E))}}_.log&&typeof _.log=="string"&&ibt(this._lexer,this._lexer.languageId+": "+a1(this._lexer,_.log,C,w,A))}if(T===null)throw Kr(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(E));let L=M=>{let z=this._languageService.getLanguageIdByLanguageName(M)||this._languageService.getLanguageIdByMimeType(M)||M,H=this._getNestedEmbeddedLanguageData(z);if(d0)throw Kr(this._lexer,"groups cannot be nested: "+this._safeRuleName(E));if(w.length!==T.length+1)throw Kr(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(E));let M=0;for(let z=1;z{let s=()=>{let a=Zvi(i,e,t,n);if(t instanceof ML){let l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(s,o);return}}r(a)};s()})}function abt(i,e,t){let n=[],o=new Uint32Array(2);o[0]=0,o[1]=33587200;for(let s=0,a=i.length;s")}return n.join("")}function Zvi(i,e,t,n){let r=[],o=t.getInitialState();for(let s=0,a=i.length;s"),o=c.endState}return r.join("")}var Jvi,wP,lbt=D(()=>{ay();Pt();tr();wg();ES();Zb();wMe();Jvi=fd("standaloneColorizer",{createHTML:i=>i}),wP=class{static colorizeElement(e,t,n,r){r=r||{};let o=r.theme||"vs",s=r.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();let a=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);let l=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+o;let c=u=>{let d=Jvi?.createHTML(u)??u;n.innerHTML=d};return this.colorize(t,l||"",a,r).then(c,u=>console.error(u))}static async colorize(e,t,n,r){let o=e.languageIdCodec,s=4;r&&typeof r.tabSize=="number"&&(s=r.tabSize),XR(t)&&(t=t.substr(1));let a=Pu(t);if(!e.isRegisteredLanguageId(n))return abt(a,s,o);let l=await Wn.getOrCreate(n);return l?Xvi(a,s,l,o):abt(a,s,o)}static colorizeLine(e,t,n,r,o=4){let s=dh.isBasicASCII(e,t),a=dh.containsRTL(e,s,n);return wF(new Wh(!1,!0,e,!1,s,a,0,r,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){let r=e.getLineContent(t);e.tokenization.forceTokenization(t);let s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(r,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,n)}}});var $vi,eAi,doe,cbt=D(()=>{Hie();ii();$vi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eAi=function(i,e){return function(t,n){e(t,n,i)}},doe=class{static{this.ID="editor.contrib.markerDecorations"}constructor(e,t){}dispose(){}};doe=$vi([eAi(1,OO)],doe);Tt(doe.ID,doe,0)});var ubt=D(()=>{});var xP,xMe=D(()=>{ae();et();Ye();xP=class extends W{constructor(e,t){super(),this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null,t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()},n=!1,r=!1,o=()=>{if(n&&!r)try{n=!1,r=!0,t()}finally{vl(rt(this._referenceDomElement),()=>{r=!1,o()})}};this._resizeObserver=new ResizeObserver(s=>{s&&s[0]&&s[0].contentRect?e={width:s[0].contentRect.width,height:s[0].contentRect.height}:e=null,n=!0,o()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,r=0;t?(n=t.width,r=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,r=this._referenceDomElement.clientHeight),n=Math.max(5,n),r=Math.max(5,r),(this._width!==n||this._height!==r)&&(this._width=n,this._height=r,e&&this._onDidChange.fire())}}});function kv(i,e){tH.items.push(new tH(i,e))}function lp(i,e){kv(i,(t,n,r)=>{if(typeof t<"u"){for(let[o,s]of e)if(t===o){r(i,s);return}}})}function dbt(i){tH.items.forEach(e=>e.apply(i))}var tH,tAi,hbt=D(()=>{tH=class i{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){let t=i._read(e,this.key),n=o=>i._read(e,o),r=(o,s)=>i._write(e,o,s);this.migrate(t,n,r)}static _read(e,t){if(typeof e>"u")return;let n=t.indexOf(".");if(n>=0){let r=t.substring(0,n);return this._read(e[r],t.substring(n+1))}return e[t]}static _write(e,t,n){let r=t.indexOf(".");if(r>=0){let o=t.substring(0,r);e[o]=e[o]||{},this._write(e[o],t.substring(r+1),n);return}e[t]=n}};lp("wordWrap",[[!0,"on"],[!1,"off"]]);lp("lineNumbers",[[!0,"on"],[!1,"off"]]);lp("cursorBlinking",[["visible","solid"]]);lp("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);lp("renderLineHighlight",[[!0,"line"],[!1,"none"]]);lp("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);lp("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);lp("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);lp("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);lp("autoIndent",[[!1,"advanced"],[!0,"full"]]);lp("matchBrackets",[[!0,"always"],[!1,"never"]]);lp("renderFinalNewline",[[!0,"on"],[!1,"off"]]);lp("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);lp("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);lp("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);kv("autoClosingBrackets",(i,e,t)=>{i===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});kv("renderIndentGuides",(i,e,t)=>{typeof i<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!i))});kv("highlightActiveIndentGuide",(i,e,t)=>{typeof i<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!i))});tAi={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};kv("suggest.filteredTypes",(i,e,t)=>{if(i&&typeof i=="object"){for(let n of Object.entries(tAi))i[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&t(`suggest.${n[1]}`,!1);t("suggest.filteredTypes",void 0)}});kv("quickSuggestions",(i,e,t)=>{if(typeof i=="boolean"){let n=i?"on":"off";t("quickSuggestions",{comments:n,strings:n,other:n})}});kv("experimental.stickyScroll.enabled",(i,e,t)=>{typeof i=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",i))});kv("experimental.stickyScroll.maxLineCount",(i,e,t)=>{typeof i=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",i))});kv("codeActionsOnSave",(i,e,t)=>{if(i&&typeof i=="object"){let n=!1,r={};for(let o of Object.entries(i))typeof o[1]=="boolean"?(n=!0,r[o[0]]=o[1]?"explicit":"never"):r[o[0]]=o[1];n&&t("codeActionsOnSave",r)}});kv("codeActionWidget.includeNearbyQuickfixes",(i,e,t)=>{typeof i=="boolean"&&(t("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&t("codeActionWidget.includeNearbyQuickFixes",i))});kv("lightbulb.enabled",(i,e,t)=>{typeof i=="boolean"&&t("lightbulb.enabled",i?void 0:"off")})});var CMe,Hx,hoe=D(()=>{et();CMe=class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new G,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}},Hx=new CMe});function rAi(i){let e=0;for(;i;)i=Math.floor(i/10),e++;return e||1}function oAi(){let i="";return!Vf&&!RX&&(i+="no-user-select "),Vf&&(i+="no-minimap-shadow ",i+="enable-user-select "),qt&&(i+="mac "),i}function fbt(i){let e=Bb(i);return dbt(e),e}var iAi,nAi,foe,_Me,SMe,RL,pbt=D(()=>{Ph();Qt();et();ae();Xd();Si();xMe();SDe();hbt();hoe();Ks();NF();f$();oh();Ye();d$();iAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nAi=function(i,e){return function(t,n){e(t,n,i)}},foe=class extends W{constructor(e,t,n,r,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new G),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new G),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new C7,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new xP(r,n.dimension)),this._targetWindowId=rt(r).vscodeWindowId,this._rawOptions=fbt(n),this._validatedOptions=RL.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(hd.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(Hx.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(D7.onDidChange(()=>this._recomputeOptions())),this._register(MS.getInstance(rt(r)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){let e=this._computeOptions(),t=RL.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){let e=this._readEnvConfiguration(),t=bI.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),r={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:Hx.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return RL.computeOptions(this._validatedOptions,r)}_readEnvConfiguration(){return{extraEditorClassName:oAi(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:tv||ml,pixelRatio:MS.getInstance(BSe(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return D7.readFontInfo(BSe(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){let t=fbt(e);RL.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=RL.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){let t=rAi(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};foe=iAi([nAi(4,Cs)],foe);_Me=class{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}},SMe=class{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}},RL=class i{static validateOptions(e){let t=new _Me;for(let n of NS){let r=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(r))}return t}static computeOptions(e,t){let n=new SMe;for(let r of NS)n._write(r.id,r.compute(t,n,e._read(r.id)));return n}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?Zi(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!i._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){let n=[],r=!1;for(let o of NS){let s=!i._deepEquals(e._read(o.id),t._read(o.id));n[o.id]=s,s&&(r=!0)}return r?new TF(n):null}static applyUpdate(e,t){let n=!1;for(let r of NS)if(t.hasOwnProperty(r.name)){let o=r.applyUpdate(e[r.name],t[r.name]);e[r.name]=o.newValue,n=n||o.didChange}return n}}});var l1,EMe=D(()=>{(function(i){let e={total:0,min:Number.MAX_VALUE,max:0},t={...e},n={...e},r={...e},o=0,s={keydown:0,input:0,render:0};function a(){A(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),s.keydown=1,queueMicrotask(l)}i.onKeyDown=a;function l(){s.keydown===1&&(performance.mark("keydown/end"),s.keydown=2)}function c(){performance.mark("input/start"),s.input=1,v()}i.onBeforeInput=c;function u(){s.input===0&&c(),queueMicrotask(d)}i.onInput=u;function d(){s.input===1&&(performance.mark("input/end"),s.input=2)}function h(){A()}i.onKeyUp=h;function f(){A()}i.onSelectionChange=f;function p(){s.keydown===2&&s.input===2&&s.render===0&&(performance.mark("render/start"),s.render=1,queueMicrotask(g),v())}i.onRenderStart=p;function g(){s.render===1&&(performance.mark("render/end"),s.render=2)}function v(){setTimeout(A)}function A(){s.keydown===2&&s.input===2&&s.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),w("keydown",e),w("input",t),w("render",n),w("inputlatency",r),o++,C())}function w(T,L){let M=performance.getEntriesByName(T)[0].duration;L.total+=M,L.min=Math.min(L.min,M),L.max=Math.max(L.max,M)}function C(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),s.keydown=0,s.input=0,s.render=0}function _(){if(o===0)return;let T={keydown:E(e),input:E(t),render:E(n),total:E(r),sampleCount:o};return I(e),I(t),I(n),I(r),o=0,T}i.getAndClearMeasurements=_;function E(T){return{average:T.total/o,max:T.max,min:T.min}}function I(T){T.total=0,T.min=Number.MAX_VALUE,T.max=0}})(l1||(l1={}))});var CP,DMe,TMe,kMe,IMe,mbt=D(()=>{Ye();Op();ae();Si();u$();pF();NF();Nt();Hn();mF();Ag();CP=class extends Ob{constructor(e,t,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new gI(this._context,n),this._mouseDownOperation=this._register(new DMe(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(s,a)=>this._createMouseTarget(s,a),s=>this._getMouseColumn(s))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;let r=new WZ(this.viewHelper.viewDomNode);this._register(r.onContextMenu(this.viewHelper.viewDomNode,s=>this._onContextMenu(s,!0))),this._register(r.onMouseMove(this.viewHelper.viewDomNode,s=>{this._onMouseMove(s),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=re(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new Fb(a,!1,this.viewHelper.viewDomNode))}))})),this._register(r.onMouseUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(r.onMouseLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s)));let o=0;this._register(r.onPointerDown(this.viewHelper.viewDomNode,(s,a)=>{o=a})),this._register(re(this.viewHelper.viewDomNode,De.POINTER_UP,s=>{this._mouseDownOperation.onPointerUp()})),this._register(r.onMouseDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s,o))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=dz.INSTANCE,t=0,n=hd.getZoomLevel(),r=!1,o=0,s=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(76))return;let c=new eg(l);if(e.acceptStandardWheelEvent(c),e.isPhysicalMouseWheel()){if(a(l)){let u=hd.getZoomLevel(),d=c.deltaY>0?1:-1;hd.setZoomLevel(u+d),c.preventDefault(),c.stopPropagation()}}else Date.now()-t>50&&(n=hd.getZoomLevel(),r=a(l),o=0),t=Date.now(),o+=c.deltaY,r&&(hd.setZoomLevel(n+o/5),c.preventDefault(),c.stopPropagation())};this._register(re(this.viewHelper.viewDomNode,De.MOUSE_WHEEL,s,{capture:!0,passive:!1}));function a(l){return qt?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){let t=this._context.configuration.options.get(146).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let r=new u7(e,t).toPageCoordinates(rt(this.viewHelper.viewDomNode)),o=QZ(this.viewHelper.viewDomNode);if(r.yo.y+o.height||r.xo.x+o.width)return null;let s=GZ(this.viewHelper.viewDomNode,o,r);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,r,s,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){let r=ov(this.viewHelper.viewDomNode);r&&(n=r.elementsFromPoint(e.posx,e.posy).find(o=>this.viewHelper.viewDomNode.contains(o)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(u&&(r||s&&a))d(),this._mouseDownOperation.start(n.type,e,t);else if(o)e.preventDefault();else if(l){let h=n.detail;u&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(d(),this._mouseDownOperation.start(n.type,e,t),e.preventDefault())}else c&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}},DMe=class extends W{constructor(e,t,n,r,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._mouseTargetFactory=r,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new jZ(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new TMe(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._mouseState=new IMe,this._currentSelection=new qe(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,n){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let r=this._findMousePosition(t,!0);if(!r||!r.position)return;this._mouseState.trySetCount(t.detail,r.position),t.detail=this._mouseState.count;let o=this._context.configuration.options;if(!o.get(92)&&o.get(35)&&!o.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&r.type===6&&r.position&&this._currentSelection.containsPosition(r.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),s=>{let a=this._findMousePosition(this._lastMouseEvent,!1);Lb(s)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(r,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,n=this._context.viewModel,r=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){let a=e.posy-t.y-t.height,l=r.getCurrentScrollTop()+e.relativePos.y,c=mI.getZoneAtCoord(this._context,l);if(c){let d=this._helpPositionJumpOverViewZone(c);if(d)return jl.createOutsideEditor(o,d,"below",a)}let u=r.getLineNumberAtVerticalOffset(l);return jl.createOutsideEditor(o,new K(u,n.getLineMaxColumn(u)),"below",a)}let s=r.getLineNumberAtVerticalOffset(r.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){let a=e.posx-t.x-t.width;return jl.createOutsideEditor(o,new K(s,n.getLineMaxColumn(s)),"right",a)}return null}_findMousePosition(e,t){let n=this._getPositionOutsideEditor(e);if(n)return n;let r=this._createMouseTarget(e,t);if(!r.position)return null;if(r.type===8||r.type===5){let s=this._helpPositionJumpOverViewZone(r.detail);if(s)return jl.createViewZone(r.type,r.element,r.mouseColumn,s,r.detail)}return r}_helpPositionJumpOverViewZone(e){let t=new K(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,r=e.positionAfter;return n&&r?n.isBefore(t)?n:r:null}_dispatchMouse(e,t,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}},TMe=class extends W{constructor(e,t,n,r){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=r,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new kMe(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}},kMe=class extends W{constructor(e,t,n,r,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=r,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=vl(rt(s.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){let e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(146).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,t*(1+n)):n<=3?Math.max(60,t*(2+n)):Math.max(200,t*(7+n))}_execute(){let e=this._context.configuration.options.get(67),t=this._getScrollSpeed(),n=this._tick(),r=t*(n/1e3)*e,o=this._position.outsidePosition==="above"?-r:r;this._context.viewModel.viewLayout.deltaScrollNow(0,o),this._viewHelper.renderNow();let s=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?s.startLineNumber:s.endLineNumber,l;{let c=QZ(this._viewHelper.viewDomNode),u=this._context.configuration.options.get(146).horizontalScrollbarHeight,d=new SS(this._mouseEvent.pos.x,c.y+c.height-u-.1),h=GZ(this._viewHelper.viewDomNode,c,d);l=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),c,d,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=jl.createOutsideEditor(this._position.mouseColumn,new K(a,1),"above",this._position.outsideDistance):l=jl.createOutsideEditor(this._position.mouseColumn,new K(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=vl(rt(l.element),()=>this._execute())}},IMe=class i{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let n=new Date().getTime();n-this._lastSetMouseDownCountTime>i.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}});var cp,ou,poe,LMe=D(()=>{Pt();We();cp=!1,ou=class i{static{this.EMPTY=new i("",0,0,null,void 0)}constructor(e,t,n,r,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selection=r,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let n=e.getValue(),r=e.getSelectionStart(),o=e.getSelectionEnd(),s;if(t){let a=n.substring(0,r),l=t.value.substring(0,t.selectionStart);a===l&&(s=t.newlineCountBeforeSelection)}return new i(n,r,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new i(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,n){cp&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){let r=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,r,-1)}if(e>=this.selectionEnd){let r=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,r,1)}let t=this.value.substring(this.selectionStart,e);if(t.indexOf("\u2026")===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);let n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,n,-1)}_finishDeduceEditorPosition(e,t,n){let r=0,o=-1;for(;(o=t.indexOf(` -`,o+1))!==-1;)r++;return[e,n*t.length,r]}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};cp&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));let r=Math.min(Uf(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(Qk(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),s=e.value.substring(r,e.value.length-o),a=t.value.substring(r,t.value.length-o),l=e.selectionStart-r,c=e.selectionEnd-r,u=t.selectionStart-r,d=t.selectionEnd-r;if(cp&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${s}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${u}, selectionEnd: ${d}`)),u===d){let f=e.selectionStart-r;return cp&&console.log(`REMOVE PREVIOUS: ${f} chars`),{text:a,replacePrevCharCnt:f,replaceNextCharCnt:0,positionDelta:0}}let h=c-l;return{text:a,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(cp&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let n=Math.min(Uf(e.value,t.value),e.selectionEnd),r=Math.min(Qk(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(n,e.value.length-r),s=t.value.substring(n,t.value.length-r),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,u=t.selectionEnd-n;return cp&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${o}>, selectionStart: ${a}, selectionEnd: ${l}`),console.log(`AFTER DIFFING CURRENT STATE: <${s}>, selectionStart: ${c}, selectionEnd: ${u}`)),{text:s,replacePrevCharCnt:l,replaceNextCharCnt:o.length-l,positionDelta:u-s.length}}},poe=class i{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){let n=e*t,r=n+1,o=n+t;return new N(r,1,o+1,1)}static fromEditorSelection(e,t,n,r){let s=i._getPageOfLine(t.startLineNumber,n),a=i._getRangeForPage(s,n),l=i._getPageOfLine(t.endLineNumber,n),c=i._getRangeForPage(l,n),u=a.intersectRanges(new N(1,1,t.startLineNumber,t.startColumn));if(r&&e.getValueLengthInRange(u,1)>500){let A=e.modifyPosition(u.getEndPosition(),-500);u=N.fromPositions(A,u.getEndPosition())}let d=e.getValueInRange(u,1),h=e.getLineCount(),f=e.getLineMaxColumn(h),p=c.intersectRanges(new N(t.endLineNumber,t.endColumn,h,f));if(r&&e.getValueLengthInRange(p,1)>500){let A=e.modifyPosition(p.getStartPosition(),500);p=N.fromPositions(p.getStartPosition(),A)}let g=e.getValueInRange(p,1),v;if(s===l||s+1===l)v=e.getValueInRange(t,1);else{let A=a.intersectRanges(t),w=c.intersectRanges(t);v=e.getValueInRange(A,1)+"\u2026"+e.getValueInRange(w,1)}return r&&v.length>2*500&&(v=v.substring(0,500)+"\u2026"+v.substring(v.length-500,v.length)),new ou(d+v+g,d.length,d.length+v.length,t,u.endLineNumber-u.startLineNumber)}}});var sAi,gbt,iH,nH,_P,NMe,moe,goe,boe,rH=D(()=>{Ph();Ye();jb();gc();EMe();Jt();et();ae();PS();Pt();LMe();Hn();oh();th();sAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gbt=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Tap="-monaco-textarea-synthetic-tap"})(iH||(iH={}));nH={forceCopyWithSyntaxHighlighting:!1},_P=class i{static{this.INSTANCE=new i}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}},NMe=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";let t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}},moe=class extends W{get textAreaState(){return this._textAreaState}constructor(e,t,n,r,o,s){super(),this._host=e,this._textArea=t,this._OS=n,this._browser=r,this._accessibilityService=o,this._logService=s,this._onFocus=this._register(new G),this.onFocus=this._onFocus.event,this._onBlur=this._register(new G),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new G),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new G),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new G),this.onCut=this._onCut.event,this._onPaste=this._register(new G),this.onPaste=this._onPaste.event,this._onType=this._register(new G),this.onType=this._onType.event,this._onCompositionStart=this._register(new G),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new G),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new G),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new G),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new On),this._asyncTriggerCut=this._register(new di(()=>this._onCut.fire(),0)),this._textAreaState=ou.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Se.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new di(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{let c=new Wi(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{let c=new Wi(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{cp&&console.log("[compositionstart]",l);let c=new NMe;if(this._currentComposition){this._currentComposition=c;return}if(this._currentComposition=c,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){cp&&console.log("[compositionstart] Handling long press case on macOS + arrow key",l),c.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{cp&&console.log("[compositionupdate]",l);let c=this._currentComposition;if(!c)return;if(this._browser.isAndroid){let d=ou.readFromTextArea(this._textArea,this._textAreaState),h=ou.deduceAndroidCompositionInput(this._textAreaState,d);this._textAreaState=d,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}let u=c.handleCompositionUpdate(l.data);this._textAreaState=ou.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(u),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{cp&&console.log("[compositionend]",l);let c=this._currentComposition;if(!c)return;if(this._currentComposition=null,this._browser.isAndroid){let d=ou.readFromTextArea(this._textArea,this._textAreaState),h=ou.deduceAndroidCompositionInput(this._textAreaState,d);this._textAreaState=d,this._onType.fire(h),this._onCompositionEnd.fire();return}let u=c.handleCompositionUpdate(l.data);this._textAreaState=ou.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(u),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(cp&&console.log("[input]",l),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let c=ou.readFromTextArea(this._textArea,this._textAreaState),u=ou.deduceInput(this._textAreaState,c,this._OS===2);u.replacePrevCharCnt===0&&u.text.length===1&&(xo(u.text.charCodeAt(0))||u.text.charCodeAt(0)===127)||(this._textAreaState=c,(u.text!==""||u.replacePrevCharCnt!==0||u.replaceNextCharCnt!==0||u.positionDelta!==0)&&this._onType.fire(u))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[c,u]=goe.getTextData(l.clipboardData);c&&(u=u||_P.INSTANCE.get(c),this._onPaste.fire({text:c,metadata:u}))})),this._register(this._textArea.onFocus(()=>{let l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new di(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return re(this._textArea.ownerDocument,"selectionchange",t=>{if(l1.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let n=Date.now(),r=n-e;if(e=n,r<5)return;let o=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100||!this._textAreaState.selection)return;let s=this._textArea.getValue();if(this._textAreaState.value!==s)return;let a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;let c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),d=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(d[0],d[1],d[2]),f=new qe(u.lineNumber,u.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){let t=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};_P.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` -`):t.text,n),e.preventDefault(),e.clipboardData&&goe.setTextData(e.clipboardData,t.text,t.html,n)}};moe=sAi([gbt(4,Cs),gbt(5,no)],moe);goe={getTextData(i){let e=i.getData(Gr.text),t=null,n=i.getData("vscode-editor-data");if(typeof n=="string")try{t=JSON.parse(n),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&i.files.length>0?[Array.prototype.slice.call(i.files,0).map(o=>o.name).join(` -`),null]:[e,t]},setTextData(i,e,t,n){i.setData(Gr.text,e),typeof t=="string"&&i.setData("text/html",t),i.setData("vscode-editor-data",JSON.stringify(n))}},boe=class extends W{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new wi(this._actual,"keydown")).event,this.onKeyUp=this._register(new wi(this._actual,"keyup")).event,this.onCompositionStart=this._register(new wi(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new wi(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new wi(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new wi(this._actual,"beforeinput")).event,this.onInput=this._register(new wi(this._actual,"input")).event,this.onCut=this._register(new wi(this._actual,"cut")).event,this.onCopy=this._register(new wi(this._actual,"copy")).event,this.onPaste=this._register(new wi(this._actual,"paste")).event,this.onFocus=this._register(new wi(this._actual,"focus")).event,this.onBlur=this._register(new wi(this._actual,"blur")).event,this._onSyntheticTap=this._register(new G),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>l1.onKeyDown())),this._register(this.onBeforeInput(()=>l1.onBeforeInput())),this._register(this.onInput(()=>l1.onInput())),this._register(this.onKeyUp(()=>l1.onKeyUp())),this._register(re(this._actual,iH.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=ov(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?hs()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let n=this._actual;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,n){let r=this._actual,o=null,s=ov(r);s?o=s.activeElement:o=hs();let a=rt(o),l=o===r,c=r.selectionStart,u=r.selectionEnd;if(l&&c===t&&u===n){ml&&a.parent!==a&&r.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),r.setSelectionRange(t,n),ml&&a.parent!==a&&r.focus();return}try{let d=fst(r);this.setIgnoreSelectionChangeTime("setSelectionRange"),r.focus(),r.setSelectionRange(t,n),pst(r,d)}catch{}}}});var MMe,RMe,voe,bbt=D(()=>{FX();Ye();Xf();ad();ae();Si();mbt();rH();pF();MMe=class extends CP{constructor(e,t,n){super(e,t,n),this._register(Do.addTarget(this.viewHelper.linesContentDomNode)),this._register(re(this.viewHelper.linesContentDomNode,En.Tap,o=>this.onTap(o))),this._register(re(this.viewHelper.linesContentDomNode,En.Change,o=>this.onChange(o))),this._register(re(this.viewHelper.linesContentDomNode,En.Contextmenu,o=>this._onContextMenu(new Fb(o,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(re(this.viewHelper.linesContentDomNode,"pointerdown",o=>{let s=o.pointerType;if(s==="mouse"){this._lastPointerType="mouse";return}else s==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));let r=new UZ(this.viewHelper.viewDomNode);this._register(r.onPointerMove(this.viewHelper.viewDomNode,o=>this._onMouseMove(o))),this._register(r.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(r.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(r.onPointerDown(this.viewHelper.viewDomNode,(o,s)=>this._onMouseDown(o,s)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let n=this._createMouseTarget(new Fb(e,!1,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:n.type===6&&n.detail.injectedText!==null})}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}},RMe=class extends CP{constructor(e,t,n){super(e,t,n),this._register(Do.addTarget(this.viewHelper.linesContentDomNode)),this._register(re(this.viewHelper.linesContentDomNode,En.Tap,r=>this.onTap(r))),this._register(re(this.viewHelper.linesContentDomNode,En.Change,r=>this.onChange(r))),this._register(re(this.viewHelper.linesContentDomNode,En.Contextmenu,r=>this._onContextMenu(new Fb(r,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new Fb(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let n=document.createEvent("CustomEvent");n.initEvent(iH.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}},voe=class extends W{constructor(e,t,n){super(),(Tu||Bqe&&uY)&&jR.pointerEvents?this.handler=this._register(new MMe(e,t,n)):Xi.TouchEvent?this.handler=this._register(new RMe(e,t,n)):this.handler=this._register(new CP(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}});var vbt=D(()=>{});var Abt=D(()=>{});var af,RE=D(()=>{mF();af=class extends Ob{}});var SP,FMe=D(()=>{Abt();Si();RE();Nt();We();Zn();tm();SP=class i extends af{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new K(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(67);let t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(96);let n=e.get(146);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new K(e,1));if(t.column!==1)return"";let n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){let r=Math.abs(this._lastCursorModelPosition.lineNumber-n);return r===0?''+n+"":String(r)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===n||n%10===0)return String(n);let r=this._context.viewModel.getLineCount();return n===r?String(n):""}return String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}let t=vo?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,o=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);o.sort((c,u)=>N.compareRangesUsingEnds(c.range,u.range));let s=0,a=this._context.viewModel.getLineCount(),l=[];for(let c=n;c<=r;c++){let u=c-n,d=this._getLineRenderLineNumber(c),h="";for(;s${d}`}this._renderResult=l}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ua((i,e)=>{let t=i.getColor(Fft),n=i.getColor(Gft);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)})});var ybt=D(()=>{});var EP,OMe=D(()=>{ybt();Za();ld();EP=class i extends Wo{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);let t=this._context.configuration.options,n=t.get(146);this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=xi(document.createElement("div")),this._domNode.setClassName(i.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=xi(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(i.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(146);return this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}});var wbt=D(()=>{});var Wx,Aoe=D(()=>{wbt();Wx="monaco-mouse-cursor-text"});function lAi(i,e,t,n){if(e.length===0)return 0;let r=i.createElement("div");r.style.position="absolute",r.style.top="-50000px",r.style.width="50000px";let o=i.createElement("span");mo(o,t),o.style.whiteSpace="pre",o.style.tabSize=`${n*t.spaceWidth}px`,o.append(e),r.appendChild(o),i.body.appendChild(r);let s=o.offsetWidth;return r.remove(),s}var aAi,xbt,BMe,PMe,yoe,Cbt=D(()=>{vbt();Oe();Ph();Za();Si();Pt();qp();rH();LMe();ld();FMe();OMe();Ks();BF();Nt();We();Hn();Aoe();tr();Ho();nIe();Yr();ht();aAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xbt=function(i,e){return function(t,n){e(t,n,i)}},BMe=class{constructor(e,t,n,r,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=r,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){let t=new K(this.modelLineNumber,this.distanceToModelLineStart+1),n=new K(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}},PMe=ml,yoe=class extends Wo{constructor(e,t,n,r,o){super(e),this._keybindingService=r,this._instantiationService=o,this._primaryCursorPosition=new K(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;let s=this._context.configuration.options,a=s.get(146);this._setAccessibilityOptions(s),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new qe(1,1,1,1)],this._modelSelections=[new qe(1,1,1,1)],this._lastRenderPosition=null,this.textArea=xi(document.createElement("textarea")),vc.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Wx}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",y("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=xi(document.createElement("div")),this.textAreaCover.setPosition("absolute");let c={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,f)=>this._context.viewModel.getValueInRange(h,f),getValueLengthInRange:(h,f)=>this._context.viewModel.getValueLengthInRange(h,f),modifyPosition:(h,f)=>this._context.viewModel.modifyPosition(h,f)},u={getDataToCopy:()=>{let h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Nr),f=this._context.viewModel.model.getEOL(),p=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),g=Array.isArray(h)?h:null,v=Array.isArray(h)?h.join(f):h,A,w=null;if(nH.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&v.length<65536){let C=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);C&&(A=C.html,w=C.mode)}return{isFromEmptySelection:p,multicursorText:g,text:v,html:A,mode:w}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){let h=this._selections[0];if(qt&&h.isEmpty()){let p=h.getStartPosition(),g=this._getWordBeforePosition(p);if(g.length===0&&(g=this._getCharacterBeforePosition(p)),g.length>0)return new ou(g,g.length,g.length,N.fromPositions(p),0)}if(qt&&!h.isEmpty()&&c.getValueLengthInRange(h,0)<500){let p=c.getValueInRange(h,0);return new ou(p,0,p.length,h,0)}if(Vf&&!h.isEmpty()){let p="vscode-placeholder";return new ou(p,0,p.length,null,void 0)}return ou.EMPTY}if(fSe){let h=this._selections[0];if(h.isEmpty()){let f=h.getStartPosition(),[p,g]=this._getAndroidWordAtPosition(f);if(p.length>0)return new ou(p,g,g,N.fromPositions(f),0)}return ou.EMPTY}return poe.fromEditorSelection(c,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,f,p)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,f,p)},d=this._register(new boe(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(moe,u,d,Qa,{isAndroid:fSe,isChrome:dS,isFirefox:ml,isSafari:Vf})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let f=!1,p=null,g=null;h.metadata&&(f=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,p=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,g=h.metadata.mode),this._viewController.paste(h.text,f,p,g)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?(cp&&console.log(` => compositionType: <<${h.text}>>, ${h.replacePrevCharCnt}, ${h.replaceNextCharCnt}, ${h.positionDelta}`),this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta)):(cp&&console.log(` => type: <<${h.text}>>`),this._viewController.type(h.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{let f=this.textArea.domNode,p=this._modelSelections[0],{distanceToModelLineStart:g,widthOfHiddenTextBefore:v}=(()=>{let w=f.value.substring(0,Math.min(f.selectionStart,f.selectionEnd)),C=w.lastIndexOf(` -`),_=w.substring(C+1),E=_.lastIndexOf(" "),I=_.length-E-1,T=p.getStartPosition(),L=Math.min(T.column-1,I),M=T.column-1-L,z=_.substring(0,_.length-L),{tabSize:H}=this._context.viewModel.model.getOptions(),B=lAi(this.textArea.domNode.ownerDocument,z,this._fontInfo,H);return{distanceToModelLineStart:M,widthOfHiddenTextBefore:B}})(),{distanceToModelLineEnd:A}=(()=>{let w=f.value.substring(Math.max(f.selectionStart,f.selectionEnd)),C=w.indexOf(` -`),_=C===-1?w:w.substring(0,C),E=_.indexOf(" "),I=E===-1?_.length:_.length-E-1,T=p.getEndPosition(),L=Math.min(this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column,I);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column-L}})();this._context.viewModel.revealRange("keyboard",!0,N.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new BMe(this._context,p.startLineNumber,g,v,A),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Wx} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(h=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Wx}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(XI.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){let t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),r=pd(t,[]),o=!0,s=e.column,a=!0,l=e.column,c=0;for(;c<50&&(o||a);){if(o&&s<=1&&(o=!1),o){let u=n.charCodeAt(s-2);r.get(u)!==0?o=!1:s--}if(a&&l>n.length&&(a=!1),a){let u=n.charCodeAt(l-1);r.get(u)!==0?a=!1:l++}c++}return[n.substring(s-1,l-1),e.column-s]}_getWordBeforePosition(e){let t=this._context.viewModel.getLineContent(e.lineNumber),n=pd(this._context.configuration.options.get(132),[]),r=e.column,o=0;for(;r>1;){let s=t.charCodeAt(r-2);if(n.get(s)!==0||o>50)return t.substring(r-1,e.column-1);o++,r--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){let n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!xo(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){if(e.get(2)===1){let n=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),r=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),o=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),s=y("accessibilityModeOff","The editor is not accessible at this time.");return n?y("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",s,n):r?y("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",s,r):o?y("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",s,o):s}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);let t=e.get(3);this._accessibilitySupport===2&&t===Qh.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;let r=e.get(146).wrappingColumn;if(r!==-1&&this._accessibilitySupport!==1){let o=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(r*o.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=PMe?0:1}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(146);this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:r}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${r*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){let e=this._context.configuration.options;!XI.enabled||e.get(34)&&e.get(92)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new K(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){let n=this._visibleTextArea.visibleTextareaStart,r=this._visibleTextArea.visibleTextareaEnd,o=this._visibleTextArea.startPosition,s=this._visibleTextArea.endPosition;if(o&&s&&n&&r&&r.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){let a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart)),c=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+n.left-this._scrollLeft,d=r.left-n.left+1;if(uthis._contentWidth&&(d=this._contentWidth);let h=this._context.viewModel.getViewLineData(o.lineNumber),f=h.tokens.findTokenIndexAtOffset(o.column-1),p=h.tokens.findTokenIndexAtOffset(s.column-1),g=f===p,v=this._visibleTextArea.definePresentation(g?h.tokens.getPresentation(f):null);this.textArea.domNode.scrollTop=l*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:a,left:u,width:d,height:this._lineHeight,useCover:!1,color:(Wn.getColorMap()||[])[v.foreground],italic:v.italic,bold:v.bold,underline:v.underline,strikethrough:v.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}let e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}let t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(qt||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;let n=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:PMe?0:1,useCover:!1})}_newlinecount(e){let t=0,n=-1;do{if(n=e.indexOf(` -`,n+1),n===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:PMe?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;let t=this.textArea,n=this.textAreaCover;mo(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?pe.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);let r=this._context.configuration.options;r.get(57)?n.setClassName("monaco-editor-background textAreaCover "+EP.OUTER_CLASS_NAME):r.get(68).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+SP.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};yoe=aAi([xbt(3,ni),xbt(4,Ne)],yoe)});function Iv(i){return i==="'"||i==='"'||i==="`"}var cAi,uAi,dAi,Ux,Qi,zMe,VMe,nl,ic,lm=D(()=>{Nt();We();Hn();FF();zb();Wie();cAi=()=>!0,uAi=()=>!1,dAi=i=>i===" "||i===" ",Ux=class{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,t,n,r){this.languageConfigurationService=r,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let o=n.options,s=o.get(146),a=o.get(50);this.readOnly=o.get(92),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(117),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(129),this.wordSeparators=o.get(132),this.emptySelectionClipboard=o.get(37),this.copyWithSyntaxHighlighting=o.get(25),this.multiCursorMergeOverlapping=o.get(77),this.multiCursorPaste=o.get(79),this.multiCursorLimit=o.get(80),this.autoClosingBrackets=o.get(6),this.autoClosingComments=o.get(7),this.autoClosingQuotes=o.get(11),this.autoClosingDelete=o.get(9),this.autoClosingOvertype=o.get(10),this.autoSurround=o.get(14),this.autoIndent=o.get(12),this.wordSegmenterLocales=o.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(let u of l)this.surroundingPairs[u.open]=u.close;let c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=c?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};let e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(let t of e)this._electricChars[t]=!0}return this._electricChars}onElectricCharacter(e,t,n){let r=ly(t,n-1),o=this.languageConfigurationService.getLanguageConfiguration(r.languageId).electricCharacter;return o?o.onElectricCharacter(e,r,n-r.firstCharOffset):null}normalizeIndentation(e){return PO(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,n){switch(t){case"beforeWhitespace":return dAi;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return cAi;case"never":return uAi}}_getLanguageDefinedShouldAutoClose(e,t){let n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return r=>n.indexOf(r)!==-1}visibleColumnFromColumn(e,t){return to.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){let r=to.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),o=e.getLineMinColumn(t);if(rs?s:r}},Qi=class i{static fromModelState(e){return new zMe(e)}static fromViewState(e){return new VMe(e)}static fromModelSelection(e){let t=qe.liftSelection(e),n=new nl(N.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return i.fromModelState(n)}static fromModelSelections(e){let t=[];for(let n=0,r=e.length;n{lm();Nt();We();FE=class i{static columnSelect(e,t,n,r,o,s){let a=Math.abs(o-n)+1,l=n>o,c=r>s,u=rs||Ar||v0&&r--,i.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,r)}static columnSelectRight(e,t,n){let r=0,o=Math.min(n.fromViewLineNumber,n.toViewLineNumber),s=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let l=o;l<=s;l++){let c=t.getLineMaxColumn(l),u=e.visibleColumnFromColumn(t,new K(l,c));r=Math.max(r,u)}let a=n.toViewVisualColumn;return a{Hn();Ms=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return qe.fromPositions(r.getEndPosition())}},woe=class{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return qe.fromRange(r,0)}},FL=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return qe.fromPositions(r.getStartPosition())}},OL=class{constructor(e,t,n,r,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=r,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return qe.fromPositions(r.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}},OE=class{constructor(e,t,n,r=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=r,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var oH,Qo,xoe=D(()=>{Pt();zb();Nt();We();fDe();lm();oH=class{constructor(e,t,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}},Qo=class i{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-TSe(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){let n=t.lineNumber-1;return new K(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let r=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),s=fI.atomicPosition(o,t.column-1,n,0);if(s!==-1&&s+1>=r)return new K(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,n){let r=e.stickyTabStops?i.leftPositionAtomicSoftTabs(t,n,e.tabSize):i.leftPosition(t,n);return new oH(r.lineNumber,r.column,0)}static moveLeft(e,t,n,r,o){let s,a;if(n.hasSelection()&&!r)s=n.selection.startLineNumber,a=n.selection.startColumn;else{let l=n.position.delta(void 0,-(o-1)),c=t.normalizePosition(i.clipPositionColumn(l,t),0),u=i.left(e,t,c);s=u.lineNumber,a=u.column}return n.move(r,s,a,0)}static clipPositionColumn(e,t){return new K(e.lineNumber,i.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nu?(n=u,a?r=t.getLineMaxColumn(n):r=Math.min(t.getLineMaxColumn(n),r)):r=e.columnFromVisibleColumn(t,n,c),f?o=0:o=c-to.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),l!==void 0){let p=new K(n,r),g=t.normalizePosition(p,l);o=o+(r-g.column),n=g.lineNumber,r=g.column}return new oH(n,r,o)}static down(e,t,n,r,o,s,a){return this.vertical(e,t,n,r,o,n+s,a,4)}static moveDown(e,t,n,r,o){let s,a;n.hasSelection()&&!r?(s=n.selection.endLineNumber,a=n.selection.endColumn):(s=n.position.lineNumber,a=n.position.column);let l=0,c;do if(c=i.down(e,t,s+l,a,n.leftoverVisibleColumns,o,!0),t.normalizePosition(new K(c.lineNumber,c.column),2).lineNumber>s)break;while(l++<10&&s+l1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return n.move(r,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,n,r){let o=t.getLineCount(),s=n.position.lineNumber;for(;s{Pt();PL();lm();zb();xoe();We();Nt();jx=class i{static deleteRight(e,t,n,r){let o=[],s=e!==3;for(let a=0,l=r.length;a=h.length+1)return!1;let f=h.charAt(d.column-2),p=r.get(f);if(!p)return!1;if(Iv(f)){if(n==="never")return!1}else if(t==="never")return!1;let g=h.charAt(d.column-1),v=!1;for(let A of p)A.open===f&&A.close===g&&(v=!0);if(!v)return!1;if(e==="auto"){let A=!1;for(let w=0,C=a.length;w1){let o=t.getLineContent(r.lineNumber),s=Vo(o),a=s===-1?o.length+1:s+1;if(r.column<=a){let l=n.visibleColumnFromColumn(t,r),c=to.prevIndentTabStop(l,n.indentSize),u=n.columnFromVisibleColumn(t,r.lineNumber,c);return new N(r.lineNumber,u,r.lineNumber,r.column)}}return N.fromPositions(i.getPositionAfterDeleteLeft(r,t),r)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let n=$ot(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){let n=e.lineNumber-1;return new K(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){let r=[],o=null;n.sort((s,a)=>K.compare(s.getStartPosition(),a.getEndPosition()));for(let s=0,a=n.length;s1&&o?.endLineNumber!==c.lineNumber?(u=c.lineNumber-1,d=t.getLineMaxColumn(c.lineNumber-1),h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(u=c.lineNumber,d=1,h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));let p=new N(u,d,h,f);o=p,p.isEmpty()?r[s]=null:r[s]=new Ms(p,"")}else r[s]=null;else r[s]=new Ms(l,"")}return new ic(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}});function _oe(i){return i.filter(e=>!!e)}var Ma,BL,sH=D(()=>{Pt();lm();Coe();BF();Nt();We();Ma=class i{static _createWord(e,t,n,r,o){return{start:r,end:o,wordType:t,nextCharClass:n}}static _createIntlWord(e,t){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:t}}static _findPreviousWordOnLine(e,t,n){let r=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(r,e,n)}static _doFindPreviousWordOnLine(e,t,n){let r=0,o=t.findPrevIntlWordBeforeOrAtOffset(e,n.column-2);for(let s=n.column-2;s>=0;s--){let a=e.charCodeAt(s),l=t.get(a);if(o&&s===o.index)return this._createIntlWord(o,l);if(l===0){if(r===2)return this._createWord(e,r,l,s+1,this._findEndOfWord(e,t,r,s+1));r=1}else if(l===2){if(r===1)return this._createWord(e,r,l,s+1,this._findEndOfWord(e,t,r,s+1));r=2}else if(l===1&&r!==0)return this._createWord(e,r,l,s+1,this._findEndOfWord(e,t,r,s+1))}return r!==0?this._createWord(e,r,1,0,this._findEndOfWord(e,t,r,0)):null}static _findEndOfWord(e,t,n,r){let o=t.findNextIntlWordAtOrAfterOffset(e,r),s=e.length;for(let a=r;a=0;s--){let a=e.charCodeAt(s),l=t.get(a);if(o&&s===o.index)return s;if(l===1||n===1&&l===2||n===2&&l===0)return s+1}return 0}static moveWordLeft(e,t,n,r,o){let s=n.lineNumber,a=n.column;a===1&&s>1&&(s=s-1,a=t.getLineMaxColumn(s));let l=i._findPreviousWordOnLine(e,t,new K(s,a));if(r===0)return new K(s,l?l.start+1:1);if(r===1)return!o&&l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=i._findPreviousWordOnLine(e,t,new K(s,l.start+1))),new K(s,l?l.start+1:1);if(r===3){for(;l&&l.wordType===2;)l=i._findPreviousWordOnLine(e,t,new K(s,l.start+1));return new K(s,l?l.start+1:1)}return l&&a<=l.end+1&&(l=i._findPreviousWordOnLine(e,t,new K(s,l.start+1))),new K(s,l?l.end+1:1)}static _moveWordPartLeft(e,t){let n=t.lineNumber,r=e.getLineMaxColumn(n);if(t.column===1)return n>1?new K(n-1,e.getLineMaxColumn(n-1)):t;let o=e.getLineContent(n);for(let s=t.column-1;s>1;s--){let a=o.charCodeAt(s-2),l=o.charCodeAt(s-1);if(a===95&&l!==95)return new K(n,s);if(a===45&&l!==45)return new K(n,s);if((JA(a)||G9(a))&&ng(l))return new K(n,s);if(ng(a)&&ng(l)&&s+1=l.start+1&&(l=i._findNextWordOnLine(e,t,new K(o,l.end+1))),l?s=l.start+1:s=t.getLineMaxColumn(o);return new K(o,s)}static _moveWordPartRight(e,t){let n=t.lineNumber,r=e.getLineMaxColumn(n);if(t.column===r)return n1?c=1:(l--,c=r.getLineMaxColumn(l)):(u&&c<=u.end+1&&(u=i._findPreviousWordOnLine(n,r,new K(l,u.start+1))),u?c=u.end+1:c>1?c=1:(l--,c=r.getLineMaxColumn(l))),new N(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;let r=new K(n.positionLineNumber,n.positionColumn),o=this._deleteInsideWordWhitespace(t,r);return o||this._deleteInsideWordDetermineDeleteRange(e,t,r)}static _charAtIsWhitespace(e,t){let n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){let n=e.getLineContent(t.lineNumber),r=n.length;if(r===0)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,o))return null;let s=Math.min(t.column-1,r-1);if(!this._charAtIsWhitespace(n,s))return null;for(;o>0&&this._charAtIsWhitespace(n,o-1);)o--;for(;s+11?new N(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberd.start+1<=n.column&&n.column<=d.end+1,a=(d,h)=>(d=Math.min(d,n.column),h=Math.max(h,n.column),new N(n.lineNumber,d,n.lineNumber,h)),l=d=>{let h=d.start+1,f=d.end+1,p=!1;for(;f-11&&this._charAtIsWhitespace(r,h-2);)h--;return a(h,f)},c=i._findPreviousWordOnLine(e,t,n);if(c&&s(c))return l(c);let u=i._findNextWordOnLine(e,t,n);return u&&s(u)?l(u):c&&u?a(c.end+1,u.start+1):c?a(c.start+1,c.end+1):u?a(u.start+1,u.end+1):a(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let n=t.getPosition(),r=i._moveWordPartLeft(e,n);return new N(n.lineNumber,n.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let r=t;r=h.start+1&&(h=i._findNextWordOnLine(n,r,new K(l,h.end+1))),h?c=h.start+1:c{gn();lm();xoe();sH();Nt();We();ma=class{static addCursorDown(e,t,n){let r=[],o=0;for(let s=0,a=t.length;sc&&(u=c,d=e.model.getLineMaxColumn(u)),Qi.fromModelState(new nl(new N(s.lineNumber,1,u,d),2,0,new K(u,d),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberl){let c=e.getLineCount(),u=a.lineNumber+1,d=1;return u>c&&(u=c,d=e.getLineMaxColumn(u)),Qi.fromViewState(t.viewState.move(!0,u,d,0))}else{let c=t.modelState.selectionStart.getEndPosition();return Qi.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(e,t,n,r){let o=e.model.validatePosition(r);return Qi.fromModelState(Ma.word(e.cursorConfig,e.model,t.modelState,n,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Qi(t.modelState,t.viewState);let n=t.viewState.position.lineNumber,r=t.viewState.position.column;return Qi.fromViewState(new nl(new N(n,r,n,r),0,0,new K(n,r),0))}static moveTo(e,t,n,r,o){if(n){if(t.modelState.selectionStartKind===1)return this.word(e,t,n,r);if(t.modelState.selectionStartKind===2)return this.line(e,t,n,r,o)}let s=e.model.validatePosition(r),a=o?e.coordinatesConverter.validateViewPosition(new K(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return Qi.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,r,o,s){switch(n){case 0:return s===4?this._moveHalfLineLeft(e,t,r):this._moveLeft(e,t,r,o);case 1:return s===4?this._moveHalfLineRight(e,t,r):this._moveRight(e,t,r,o);case 2:return s===2?this._moveUpByViewLines(e,t,r,o):this._moveUpByModelLines(e,t,r,o);case 3:return s===2?this._moveDownByViewLines(e,t,r,o):this._moveDownByModelLines(e,t,r,o);case 4:return s===2?t.map(a=>Qi.fromViewState(Qo.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,r))):t.map(a=>Qi.fromModelState(Qo.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,r)));case 5:return s===2?t.map(a=>Qi.fromViewState(Qo.moveToNextBlankLine(e.cursorConfig,e,a.viewState,r))):t.map(a=>Qi.fromModelState(Qo.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,r)));case 6:return this._moveToViewMinColumn(e,t,r);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,r);case 8:return this._moveToViewCenterColumn(e,t,r);case 9:return this._moveToViewMaxColumn(e,t,r);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,r);default:return null}}static viewportMove(e,t,n,r,o){let s=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(n){case 11:{let l=this._firstLineNumberInRange(e.model,a,o),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],r,l,c)]}case 13:{let l=this._lastLineNumberInRange(e.model,a,o),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],r,l,c)]}case 12:{let l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],r,l,c)]}case 14:{let l=[];for(let c=0,u=t.length;cn.endLineNumber-1?s=n.endLineNumber-1:oQi.fromViewState(Qo.moveLeft(e.cursorConfig,e,o.viewState,n,r)))}static _moveHalfLineLeft(e,t,n){let r=[];for(let o=0,s=t.length;oQi.fromViewState(Qo.moveRight(e.cursorConfig,e,o.viewState,n,r)))}static _moveHalfLineRight(e,t,n){let r=[];for(let o=0,s=t.length;o[]),a.pushStackElement(),s+=1,r+=l.length;return{ariaSummary:gg(une.bulkEditServiceSummary,r,s),isApplied:r>0}}};DMe=_1([na(0,an)],DMe);TMe=class{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Lc(e)}},kMe=class extends Wie{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){let o=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();o&&(t=o.getContainerDomNode())}return super.showContextView(e,t,n)}};kMe=_1([na(0,lf),na(1,ei)],kMe);IMe=class{constructor(){this._neverEmitter=new q,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},LMe=class extends xne{constructor(){super()}},NMe=class extends Dse{constructor(){super(new Kee)}},MMe=class extends Yne{constructor(e,t,n,o,r,s){super(e,t,n,o,r,s),this.configure({blockMouse:!1})}};MMe=_1([na(0,rr),na(1,_n),na(2,hh),na(3,Xt),na(4,nl),na(5,Ze)],MMe);Ise={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"},RMe=class extends Ute{constructor(e,t,n,o,r){super(Ise,e,t,n,o,r)}};RMe=_1([na(0,an),na(1,pL),na(2,sr),na(3,Gi),na(4,Me)],RMe);FMe=class{async playSignal(e,t){}};oi(sr,NMe,0);oi(Et,kse,0);oi(pL,CMe,0);oi(Wte,_Me,0);oi(OA,EMe,0);oi(FA,TMe,0);oi(rr,SMe,0);oi(Ry,vMe,0);oi(jO,AMe,0);oi(_n,yMe,0);oi(pf,Sse,0);oi(on,LMe,0);oi(hu,fse,0);oi(an,ere,0);oi(TP,loe,0);oi(Ze,xse,0);oi(tne,bMe,0);oi(dp,gMe,0);oi(oc,Bne,0);oi(wa,RMe,0);oi(Qy,DMe,0);oi(dne,IMe,0);oi(Ss,mMe,0);oi(Es,pse,0);oi(mp,Fre,0);oi(Ii,wMe,0);oi(Xt,tD,0);oi(Pa,lse,0);oi(hh,kMe,0);oi(Qr,Jne,0);oi(Ah,Ase,0);oi(ia,MMe,0);oi(nl,mse,0);oi(vp,FMe,0);oi(zoe,Tse,0);(function(i){let e=new _m;for(let[l,c]of bTe())e.set(l,c);let t=new _se(e,!0);e.set(Re,t);function n(l){o||s({});let c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof rp?t.invokeFunction(u=>u.get(l)):c}i.get=n;let o=!1,r=new q;function s(l){if(o)return t;o=!0;for(let[u,d]of bTe())e.get(u)||e.set(u,d);for(let u in l)if(l.hasOwnProperty(u)){let d=At(u);e.get(d)instanceof rp&&e.set(d,l[u])}let c=imt();for(let u of c)try{t.createInstance(u)}catch(d){ft(d)}return r.fire(),t}i.initialize=s;function a(l){if(o)return l();let c=new se,u=c.add(r.event(()=>{u.dispose(),c.add(l())}));return c}i.withServices=a})(Zt||(Zt={}))});function rmt(i,e){return new OMe(i,e)}var OMe,smt=D(()=>{rh();cke();DW();OMe=class extends MV{constructor(e,t){let n={amdModuleId:Ise.amdModuleId,esmModuleLocation:Ise.esmModuleLocation,label:t.label};super(n,t.keepIdleModels||!1,e),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{let t=this._foreignModuleHost?Xz(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;let o=(a,l)=>e.$fmr(a,l),r=(a,l)=>function(){let c=Array.prototype.slice.call(arguments,0);return l(a,c)},s={};for(let a of n)s[a]=r(a,o);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then(t=>this.getProxy())}}});var uC,TW=D(()=>{uC={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}});var kW,Lse,dN,vh,dC,Nse,uB,hN,d0=D(()=>{Wt();Rt();Ue();kW=class{constructor(e,t,n,o){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=o|0}},Lse=class{constructor(e,t){this.tabSize=e,this.data=t}},dN=class{constructor(e,t,n,o,r,s,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=o,this.startVisibleColumn=r,this.tokens=s,this.inlineDecorations=a}},vh=class i{constructor(e,t,n,o,r,s,a,l,c,u){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=o,this.isBasicASCII=i.isBasicASCII(n,s),this.containsRTL=i.containsRTL(n,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=u}static isBasicASCII(e,t){return t?gy(e):!0}static containsRTL(e,t,n){return!t&&n?_A(e):!1}},dC=class{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}},Nse=class{constructor(e,t,n,o){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=o}toInlineDecoration(e){return new dC(new R(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}},uB=class{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}},hN=class i{constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Zi(e.data,t.data)}static equalsArr(e,t){return Zi(e,t,i.equals)}}});function Vci(i){return Array.isArray(i)}function lmt(i){return!Vci(i)}function PMe(i){return typeof i=="string"}function BMe(i){return!PMe(i)}function iD(i){return!i}function YA(i,e){return i.ignoreCase&&e?e.toLowerCase():e}function zMe(i){return i.replace(/[&<>'"_]/g,"-")}function cmt(i,e){console.log(`${i.languageId}: ${e}`)}function Zo(i,e){return new Error(`${i.languageId}: ${e}`)}function S1(i,e,t,n,o){let r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,s=null;return e.replace(r,function(a,l,c,u,d,h,f,p,g){return iD(c)?iD(u)?!iD(d)&&d0;){let n=i.tokenizer[t];if(n)return n;let o=t.lastIndexOf(".");o<0?t=null:t=t.substr(0,o)}return null}function dmt(i,e){let t=e;for(;t&&t.length>0;){if(i.stateNames[t])return!0;let o=t.lastIndexOf(".");o<0?t=null:t=t.substr(0,o)}return!1}var VMe=D(()=>{});function Uci(i,e){if(!e)return null;e=YA(i,e);let t=i.brackets;for(let n of t){if(n.open===e)return{token:n.token,bracketType:1};if(n.close===e)return{token:n.token,bracketType:-1}}return null}var Hci,Wci,HMe,fmt,NW,hB,dB,nD,LW,WMe,UMe,fN,jMe=D(()=>{de();ro();$O();VMe();ao();Hci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Wci=function(i,e){return function(t,n){e(t,n,i)}},fmt=5,NW=class i{static{this._INSTANCE=new i(fmt)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new hB(e,t);let n=hB.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let o=this._entries[n];return o||(o=new hB(e,t),this._entries[n]=o,o)}},hB=class i{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return i._equals(this,e)}push(e){return NW.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return NW.create(this.parent,e)}},dB=class i{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new i(this.languageId,this.state)}},nD=class i{static{this._INSTANCE=new i(fmt)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new LW(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new LW(e,t);let n=hB.getStackElementId(e),o=this._entries[n];return o||(o=new LW(e,null),this._entries[n]=o,o)}},LW=class i{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:nD.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof i)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}},WMe=class{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new iA(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,o){let r=n.languageId,s=n.state,a=Gn.get(r);if(!a)return this.enterLanguage(r),this.emit(o,""),s;let l=a.tokenize(e,t,s);if(o!==0)for(let c of l.tokens)this._tokens.push(new iA(c.offset+o,c.type,c.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new J_(this._tokens,e)}},UMe=class i{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){let n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let o=e!==null?e.length:0,r=t.length,s=n!==null?n.length:0;if(o===0&&r===0&&s===0)return new Uint32Array(0);if(o===0&&r===0)return n;if(r===0&&s===0)return e;let a=new Uint32Array(o+r+s);e!==null&&a.set(e);for(let l=0;l{if(s)return;let l=!1;for(let c=0,u=a.changedLanguages.length;c{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){let e=[];for(let t in this._embeddedLanguages){let n=Gn.get(t);if(n){if(n instanceof HMe){let o=n.getLoadStatus();o.loaded===!1&&e.push(o.promise)}continue}Gn.isResolved(t)||e.push(Gn.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){let e=NW.create(null,this._lexer.start);return nD.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return ZO(this._languageId,n);let o=new WMe,r=this._tokenize(e,t,n,o);return o.finalize(r)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return ME(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);let o=new UMe(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,o);return o.finalize(r)}_tokenize(e,t,n,o){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,o):this._myTokenize(e,t,n,0,o)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=IW(this._lexer,t.stack.state),!n))throw Zo(this._lexer,"tokenizer state is not defined: "+t.stack.state);let o=-1,r=!1;for(let s of n){if(!BMe(s.action)||s.action.nextEmbedded!=="@pop")continue;r=!0;let a=s.resolveRegex(t.stack.state),l=a.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){let u=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),u)}let c=e.search(a);c===-1||c!==0&&s.matchOnlyAtLineStart||(o===-1||c0&&r.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,o);let l=e.substring(s);return this._myTokenize(l,t,n,o+s,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,o,r){r.enterLanguage(this._languageId);let s=e.length,a=t&&this._lexer.includeLF?e+` +`:e,l=a.length,c=n.embeddedLanguageData,u=n.stack,d=0,h=null,f=!0;for(;f||d=l)break;f=!1;let L=this._lexer.tokenizer[v];if(!L&&(L=IW(this._lexer,v),!L))throw Zo(this._lexer,"tokenizer state is not defined: "+v);let B=a.substr(d);for(let z of L)if((d===0||!z.matchOnlyAtLineStart)&&(w=B.match(z.resolveRegex(v)),w)){C=w[0],_=z.action;break}}if(w||(w=[""],C=""),_||(d=this._lexer.maxStack)throw Zo(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]");u=u.push(v)}else if(_.next==="@pop"){if(u.depth<=1)throw Zo(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(E));u=u.pop()}else if(_.next==="@popall")u=u.popall();else{let L=S1(this._lexer,_.next,C,w,v);if(L[0]==="@"&&(L=L.substr(1)),IW(this._lexer,L))u=u.push(L);else throw Zo(this._lexer,"trying to set a next state '"+L+"' that is undefined in rule: "+this._safeRuleName(E))}}_.log&&typeof _.log=="string"&&cmt(this._lexer,this._lexer.languageId+": "+S1(this._lexer,_.log,C,w,v))}if(T===null)throw Zo(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(E));let N=L=>{let B=this._languageService.getLanguageIdByLanguageName(L)||this._languageService.getLanguageIdByMimeType(L)||L,z=this._getNestedEmbeddedLanguageData(B);if(d0)throw Zo(this._lexer,"groups cannot be nested: "+this._safeRuleName(E));if(w.length!==T.length+1)throw Zo(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(E));let L=0;for(let B=1;B{let s=()=>{let a=Gci(i,e,t,n);if(t instanceof fN){let l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(s,r);return}}o(a)};s()})}function pmt(i,e,t){let n=[],r=new Uint32Array(2);r[0]=0,r[1]=33587200;for(let s=0,a=i.length;s")}return n.join("")}function Gci(i,e,t,n){let o=[],r=t.getInitialState();for(let s=0,a=i.length;s"),r=c.endState}return o.join("")}var jci,fB,mmt=D(()=>{Sy();Rt();ro();Fg();JS();d0();jMe();jci=xd("standaloneColorizer",{createHTML:i=>i}),fB=class{static colorizeElement(e,t,n,o){o=o||{};let r=o.theme||"vs",s=o.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();let a=t.getLanguageIdByMimeType(s)||s;e.setTheme(r);let l=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+r;let c=u=>{let d=jci?.createHTML(u)??u;n.innerHTML=d};return this.colorize(t,l||"",a,o).then(c,u=>console.error(u))}static async colorize(e,t,n,o){let r=e.languageIdCodec,s=4;o&&typeof o.tabSize=="number"&&(s=o.tabSize),UF(t)&&(t=t.substr(1));let a=Uu(t);if(!e.isRegisteredLanguageId(n))return pmt(a,s,r);let l=await Gn.getOrCreate(n);return l?Qci(a,s,l,r):pmt(a,s,r)}static colorizeLine(e,t,n,o,r=4){let s=vh.isBasicASCII(e,t),a=vh.containsRTL(e,s,n);return fO(new ef(!1,!0,e,!1,s,a,0,o,[],r,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){let o=e.getLineContent(t);e.tokenization.forceTokenization(t);let s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(o,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,n)}}});var qci,Yci,Mse,gmt=D(()=>{coe();Jt();qci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Yci=function(i,e){return function(t,n){e(t,n,i)}},Mse=class{static{this.ID="editor.contrib.markerDecorations"}constructor(e,t){}dispose(){}};Mse=qci([Yci(1,TP)],Mse);St(Mse.ID,Mse,0)});var bmt=D(()=>{});var pB,QMe=D(()=>{de();et();Ye();pB=class extends H{constructor(e,t){super(),this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null,t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()},n=!1,o=!1,r=()=>{if(n&&!o)try{n=!1,o=!0,t()}finally{Cl(rt(this._referenceDomElement),()=>{o=!1,r()})}};this._resizeObserver=new ResizeObserver(s=>{s&&s[0]&&s[0].contentRect?e={width:s[0].contentRect.width,height:s[0].contentRect.height}:e=null,n=!0,r()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,o=0;t?(n=t.width,o=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,o=this._referenceDomElement.clientHeight),n=Math.max(5,n),o=Math.max(5,o),(this._width!==n||this._height!==o)&&(this._width=n,this._height=o,e&&this._onDidChange.fire())}}});function KA(i,e){MW.items.push(new MW(i,e))}function yp(i,e){KA(i,(t,n,o)=>{if(typeof t<"u"){for(let[r,s]of e)if(t===r){o(i,s);return}}})}function Amt(i){MW.items.forEach(e=>e.apply(i))}var MW,Kci,vmt=D(()=>{MW=class i{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){let t=i._read(e,this.key),n=r=>i._read(e,r),o=(r,s)=>i._write(e,r,s);this.migrate(t,n,o)}static _read(e,t){if(typeof e>"u")return;let n=t.indexOf(".");if(n>=0){let o=t.substring(0,n);return this._read(e[o],t.substring(n+1))}return e[t]}static _write(e,t,n){let o=t.indexOf(".");if(o>=0){let r=t.substring(0,o);e[r]=e[r]||{},this._write(e[r],t.substring(o+1),n);return}e[t]=n}};yp("wordWrap",[[!0,"on"],[!1,"off"]]);yp("lineNumbers",[[!0,"on"],[!1,"off"]]);yp("cursorBlinking",[["visible","solid"]]);yp("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);yp("renderLineHighlight",[[!0,"line"],[!1,"none"]]);yp("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);yp("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);yp("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);yp("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);yp("autoIndent",[[!1,"advanced"],[!0,"full"]]);yp("matchBrackets",[[!0,"always"],[!1,"never"]]);yp("renderFinalNewline",[[!0,"on"],[!1,"off"]]);yp("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);yp("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);yp("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);KA("autoClosingBrackets",(i,e,t)=>{i===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});KA("renderIndentGuides",(i,e,t)=>{typeof i<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!i))});KA("highlightActiveIndentGuide",(i,e,t)=>{typeof i<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!i))});Kci={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};KA("suggest.filteredTypes",(i,e,t)=>{if(i&&typeof i=="object"){for(let n of Object.entries(Kci))i[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&t(`suggest.${n[1]}`,!1);t("suggest.filteredTypes",void 0)}});KA("quickSuggestions",(i,e,t)=>{if(typeof i=="boolean"){let n=i?"on":"off";t("quickSuggestions",{comments:n,strings:n,other:n})}});KA("experimental.stickyScroll.enabled",(i,e,t)=>{typeof i=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",i))});KA("experimental.stickyScroll.maxLineCount",(i,e,t)=>{typeof i=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",i))});KA("codeActionsOnSave",(i,e,t)=>{if(i&&typeof i=="object"){let n=!1,o={};for(let r of Object.entries(i))typeof r[1]=="boolean"?(n=!0,o[r[0]]=r[1]?"explicit":"never"):o[r[0]]=r[1];n&&t("codeActionsOnSave",o)}});KA("codeActionWidget.includeNearbyQuickfixes",(i,e,t)=>{typeof i=="boolean"&&(t("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&t("codeActionWidget.includeNearbyQuickFixes",i))});KA("lightbulb.enabled",(i,e,t)=>{typeof i=="boolean"&&t("lightbulb.enabled",i?void 0:"off")})});var GMe,hC,Rse=D(()=>{et();GMe=class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new q,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}},hC=new GMe});function Zci(i){let e=0;for(;i;)i=Math.floor(i/10),e++;return e||1}function $ci(){let i="";return!Zf&&!i$&&(i+="no-user-select "),Zf&&(i+="no-minimap-shadow ",i+="enable-user-select "),jt&&(i+="mac "),i}function ymt(i){let e=Xb(i);return Amt(e),e}var Jci,Xci,Fse,qMe,YMe,pN,wmt=D(()=>{Kh();Wt();et();de();rh();wi();QMe();YDe();vmt();Rse();ea();_O();Fee();fh();Ye();Mee();Jci=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Xci=function(i,e){return function(t,n){e(t,n,i)}},Fse=class extends H{constructor(e,t,n,o,r){super(),this._accessibilityService=r,this._onDidChange=this._register(new q),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new q),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new tV,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new pB(o,n.dimension)),this._targetWindowId=rt(o).vscodeWindowId,this._rawOptions=ymt(n),this._validatedOptions=pN.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(wd.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(hC.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(rV.onDidChange(()=>this._recomputeOptions())),this._register(nE.getInstance(rt(o)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){let e=this._computeOptions(),t=pN.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){let e=this._readEnvConfiguration(),t=XI.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),o={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:hC.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return pN.computeOptions(this._validatedOptions,o)}_readEnvConfiguration(){return{extraEditorClassName:$ci(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:wA||yl,pixelRatio:nE.getInstance(aEe(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return rV.readFontInfo(aEe(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){let t=ymt(e);pN.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=pN.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){let t=Zci(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};Fse=Jci([Xci(4,Es)],Fse);qMe=class{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}},YMe=class{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}},pN=class i{static validateOptions(e){let t=new qMe;for(let n of iE){let o=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(o))}return t}static computeOptions(e,t){let n=new YMe;for(let o of iE)n._write(o.id,o.compute(t,n,e._read(o.id)));return n}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?Zi(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!i._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){let n=[],o=!1;for(let r of iE){let s=!i._deepEquals(e._read(r.id),t._read(r.id));n[r.id]=s,s&&(o=!0)}return o?new yO(n):null}static applyUpdate(e,t){let n=!1;for(let o of iE)if(t.hasOwnProperty(o.name)){let r=o.applyUpdate(e[o.name],t[o.name]);e[o.name]=r.newValue,n=n||r.didChange}return n}}});var E1,KMe=D(()=>{(function(i){let e={total:0,min:Number.MAX_VALUE,max:0},t={...e},n={...e},o={...e},r=0,s={keydown:0,input:0,render:0};function a(){v(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),s.keydown=1,queueMicrotask(l)}i.onKeyDown=a;function l(){s.keydown===1&&(performance.mark("keydown/end"),s.keydown=2)}function c(){performance.mark("input/start"),s.input=1,A()}i.onBeforeInput=c;function u(){s.input===0&&c(),queueMicrotask(d)}i.onInput=u;function d(){s.input===1&&(performance.mark("input/end"),s.input=2)}function h(){v()}i.onKeyUp=h;function f(){v()}i.onSelectionChange=f;function p(){s.keydown===2&&s.input===2&&s.render===0&&(performance.mark("render/start"),s.render=1,queueMicrotask(g),A())}i.onRenderStart=p;function g(){s.render===1&&(performance.mark("render/end"),s.render=2)}function A(){setTimeout(v)}function v(){s.keydown===2&&s.input===2&&s.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),w("keydown",e),w("input",t),w("render",n),w("inputlatency",o),r++,C())}function w(T,N){let L=performance.getEntriesByName(T)[0].duration;N.total+=L,N.min=Math.min(N.min,L),N.max=Math.max(N.max,L)}function C(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),s.keydown=0,s.input=0,s.render=0}function _(){if(r===0)return;let T={keydown:E(e),input:E(t),render:E(n),total:E(o),sampleCount:r};return I(e),I(t),I(n),I(o),r=0,T}i.getAndClearMeasurements=_;function E(T){return{average:T.total/r,max:T.max,min:T.min}}function I(T){T.total=0,T.min=Number.MAX_VALUE,T.max=0}})(E1||(E1={}))});var mB,JMe,XMe,ZMe,$Me,xmt=D(()=>{Ye();$p();de();wi();Nee();sO();_O();kt();Qn();aO();Mg();mB=class extends Kb{constructor(e,t,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new JI(this._context,n),this._mouseDownOperation=this._register(new JMe(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(s,a)=>this._createMouseTarget(s,a),s=>this._getMouseColumn(s))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;let o=new uee(this.viewHelper.viewDomNode);this._register(o.onContextMenu(this.viewHelper.viewDomNode,s=>this._onContextMenu(s,!0))),this._register(o.onMouseMove(this.viewHelper.viewDomNode,s=>{this._onMouseMove(s),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=ce(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new Yb(a,!1,this.viewHelper.viewDomNode))}))})),this._register(o.onMouseUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(o.onMouseLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s)));let r=0;this._register(o.onPointerDown(this.viewHelper.viewDomNode,(s,a)=>{r=a})),this._register(ce(this.viewHelper.viewDomNode,Te.POINTER_UP,s=>{this._mouseDownOperation.onPointerUp()})),this._register(o.onMouseDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s,r))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=UV.INSTANCE,t=0,n=wd.getZoomLevel(),o=!1,r=0,s=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(76))return;let c=new pg(l);if(e.acceptStandardWheelEvent(c),e.isPhysicalMouseWheel()){if(a(l)){let u=wd.getZoomLevel(),d=c.deltaY>0?1:-1;wd.setZoomLevel(u+d),c.preventDefault(),c.stopPropagation()}}else Date.now()-t>50&&(n=wd.getZoomLevel(),o=a(l),r=0),t=Date.now(),r+=c.deltaY,o&&(wd.setZoomLevel(n+r/5),c.preventDefault(),c.stopPropagation())};this._register(ce(this.viewHelper.viewDomNode,Te.MOUSE_WHEEL,s,{capture:!0,passive:!1}));function a(l){return jt?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){let t=this._context.configuration.options.get(146).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let o=new Wz(e,t).toPageCoordinates(rt(this.viewHelper.viewDomNode)),r=fee(this.viewHelper.viewDomNode);if(o.yr.y+r.height||o.xr.x+r.width)return null;let s=pee(this.viewHelper.viewDomNode,r,o);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,o,s,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){let o=SA(this.viewHelper.viewDomNode);o&&(n=o.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(u&&(o||s&&a))d(),this._mouseDownOperation.start(n.type,e,t);else if(r)e.preventDefault();else if(l){let h=n.detail;u&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(d(),this._mouseDownOperation.start(n.type,e,t),e.preventDefault())}else c&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}},JMe=class extends H{constructor(e,t,n,o,r,s){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._mouseTargetFactory=o,this._createMouseTarget=r,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new hee(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new XMe(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._mouseState=new $Me,this._currentSelection=new qe(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,n){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let o=this._findMousePosition(t,!0);if(!o||!o.position)return;this._mouseState.trySetCount(t.detail,o.position),t.detail=this._mouseState.count;let r=this._context.configuration.options;if(!r.get(92)&&r.get(35)&&!r.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&o.type===6&&o.position&&this._currentSelection.containsPosition(o.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),s=>{let a=this._findMousePosition(this._lastMouseEvent,!1);jb(s)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(o,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,n=this._context.viewModel,o=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){let a=e.posy-t.y-t.height,l=o.getCurrentScrollTop()+e.relativePos.y,c=KI.getZoneAtCoord(this._context,l);if(c){let d=this._helpPositionJumpOverViewZone(c);if(d)return Yl.createOutsideEditor(r,d,"below",a)}let u=o.getLineNumberAtVerticalOffset(l);return Yl.createOutsideEditor(r,new J(u,n.getLineMaxColumn(u)),"below",a)}let s=o.getLineNumberAtVerticalOffset(o.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){let a=e.posx-t.x-t.width;return Yl.createOutsideEditor(r,new J(s,n.getLineMaxColumn(s)),"right",a)}return null}_findMousePosition(e,t){let n=this._getPositionOutsideEditor(e);if(n)return n;let o=this._createMouseTarget(e,t);if(!o.position)return null;if(o.type===8||o.type===5){let s=this._helpPositionJumpOverViewZone(o.detail);if(s)return Yl.createViewZone(o.type,o.element,o.mouseColumn,s,o.detail)}return o}_helpPositionJumpOverViewZone(e){let t=new J(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,o=e.positionAfter;return n&&o?n.isBefore(t)?n:o:null}_dispatchMouse(e,t,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}},XMe=class extends H{constructor(e,t,n,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=o,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new ZMe(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}},ZMe=class extends H{constructor(e,t,n,o,r,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=o,this._position=r,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=Cl(rt(s.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){let e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(146).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,t*(1+n)):n<=3?Math.max(60,t*(2+n)):Math.max(200,t*(7+n))}_execute(){let e=this._context.configuration.options.get(67),t=this._getScrollSpeed(),n=this._tick(),o=t*(n/1e3)*e,r=this._position.outsidePosition==="above"?-o:o;this._context.viewModel.viewLayout.deltaScrollNow(0,r),this._viewHelper.renderNow();let s=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?s.startLineNumber:s.endLineNumber,l;{let c=fee(this._viewHelper.viewDomNode),u=this._context.configuration.options.get(146).horizontalScrollbarHeight,d=new KS(this._mouseEvent.pos.x,c.y+c.height-u-.1),h=pee(this._viewHelper.viewDomNode,c,d);l=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),c,d,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=Yl.createOutsideEditor(this._position.mouseColumn,new J(a,1),"above",this._position.outsideDistance):l=Yl.createOutsideEditor(this._position.mouseColumn,new J(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=Cl(rt(l.element),()=>this._execute())}},$Me=class i{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let n=new Date().getTime();n-this._lastSetMouseDownCountTime>i.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}});var wp,fu,Ose,eRe=D(()=>{Rt();Ue();wp=!1,fu=class i{static{this.EMPTY=new i("",0,0,null,void 0)}constructor(e,t,n,o,r){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selection=o,this.newlineCountBeforeSelection=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let n=e.getValue(),o=e.getSelectionStart(),r=e.getSelectionEnd(),s;if(t){let a=n.substring(0,o),l=t.value.substring(0,t.selectionStart);a===l&&(s=t.newlineCountBeforeSelection)}return new i(n,o,r,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new i(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,n){wp&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){let o=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,o,-1)}if(e>=this.selectionEnd){let o=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,o,1)}let t=this.value.substring(this.selectionStart,e);if(t.indexOf("\u2026")===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);let n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,n,-1)}_finishDeduceEditorPosition(e,t,n){let o=0,r=-1;for(;(r=t.indexOf(` +`,r+1))!==-1;)o++;return[e,n*t.length,o]}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};wp&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));let o=Math.min(tp(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(SI(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),s=e.value.substring(o,e.value.length-r),a=t.value.substring(o,t.value.length-r),l=e.selectionStart-o,c=e.selectionEnd-o,u=t.selectionStart-o,d=t.selectionEnd-o;if(wp&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${s}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${u}, selectionEnd: ${d}`)),u===d){let f=e.selectionStart-o;return wp&&console.log(`REMOVE PREVIOUS: ${f} chars`),{text:a,replacePrevCharCnt:f,replaceNextCharCnt:0,positionDelta:0}}let h=c-l;return{text:a,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(wp&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let n=Math.min(tp(e.value,t.value),e.selectionEnd),o=Math.min(SI(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(n,e.value.length-o),s=t.value.substring(n,t.value.length-o),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,u=t.selectionEnd-n;return wp&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${a}, selectionEnd: ${l}`),console.log(`AFTER DIFFING CURRENT STATE: <${s}>, selectionStart: ${c}, selectionEnd: ${u}`)),{text:s,replacePrevCharCnt:l,replaceNextCharCnt:r.length-l,positionDelta:u-s.length}}},Ose=class i{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){let n=e*t,o=n+1,r=n+t;return new R(o,1,r+1,1)}static fromEditorSelection(e,t,n,o){let s=i._getPageOfLine(t.startLineNumber,n),a=i._getRangeForPage(s,n),l=i._getPageOfLine(t.endLineNumber,n),c=i._getRangeForPage(l,n),u=a.intersectRanges(new R(1,1,t.startLineNumber,t.startColumn));if(o&&e.getValueLengthInRange(u,1)>500){let v=e.modifyPosition(u.getEndPosition(),-500);u=R.fromPositions(v,u.getEndPosition())}let d=e.getValueInRange(u,1),h=e.getLineCount(),f=e.getLineMaxColumn(h),p=c.intersectRanges(new R(t.endLineNumber,t.endColumn,h,f));if(o&&e.getValueLengthInRange(p,1)>500){let v=e.modifyPosition(p.getStartPosition(),500);p=R.fromPositions(p.getStartPosition(),v)}let g=e.getValueInRange(p,1),A;if(s===l||s+1===l)A=e.getValueInRange(t,1);else{let v=a.intersectRanges(t),w=c.intersectRanges(t);A=e.getValueInRange(v,1)+"\u2026"+e.getValueInRange(w,1)}return o&&A.length>2*500&&(A=A.substring(0,500)+"\u2026"+A.substring(A.length-500,A.length)),new fu(d+A+g,d.length,d.length+A.length,t,u.endLineNumber-u.startLineNumber)}}});var eui,Cmt,RW,FW,gB,tRe,Pse,Bse,zse,OW=D(()=>{Kh();Ye();n0();xc();KMe();Gt();et();de();aE();Rt();eRe();Qn();fh();ch();eui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Cmt=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Tap="-monaco-textarea-synthetic-tap"})(RW||(RW={}));FW={forceCopyWithSyntaxHighlighting:!1},gB=class i{static{this.INSTANCE=new i}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}},tRe=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";let t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}},Pse=class extends H{get textAreaState(){return this._textAreaState}constructor(e,t,n,o,r,s){super(),this._host=e,this._textArea=t,this._OS=n,this._browser=o,this._accessibilityService=r,this._logService=s,this._onFocus=this._register(new q),this.onFocus=this._onFocus.event,this._onBlur=this._register(new q),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new q),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new q),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new q),this.onCut=this._onCut.event,this._onPaste=this._register(new q),this.onPaste=this._onPaste.event,this._onType=this._register(new q),this.onType=this._onType.event,this._onCompositionStart=this._register(new q),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new q),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new q),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new q),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new Vn),this._asyncTriggerCut=this._register(new si(()=>this._onCut.fire(),0)),this._textAreaState=fu.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Ee.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new si(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{let c=new Vi(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{let c=new Vi(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{wp&&console.log("[compositionstart]",l);let c=new tRe;if(this._currentComposition){this._currentComposition=c;return}if(this._currentComposition=c,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){wp&&console.log("[compositionstart] Handling long press case on macOS + arrow key",l),c.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{wp&&console.log("[compositionupdate]",l);let c=this._currentComposition;if(!c)return;if(this._browser.isAndroid){let d=fu.readFromTextArea(this._textArea,this._textAreaState),h=fu.deduceAndroidCompositionInput(this._textAreaState,d);this._textAreaState=d,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}let u=c.handleCompositionUpdate(l.data);this._textAreaState=fu.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(u),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{wp&&console.log("[compositionend]",l);let c=this._currentComposition;if(!c)return;if(this._currentComposition=null,this._browser.isAndroid){let d=fu.readFromTextArea(this._textArea,this._textAreaState),h=fu.deduceAndroidCompositionInput(this._textAreaState,d);this._textAreaState=d,this._onType.fire(h),this._onCompositionEnd.fire();return}let u=c.handleCompositionUpdate(l.data);this._textAreaState=fu.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(u),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(wp&&console.log("[input]",l),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let c=fu.readFromTextArea(this._textArea,this._textAreaState),u=fu.deduceInput(this._textAreaState,c,this._OS===2);u.replacePrevCharCnt===0&&u.text.length===1&&(Er(u.text.charCodeAt(0))||u.text.charCodeAt(0)===127)||(this._textAreaState=c,(u.text!==""||u.replacePrevCharCnt!==0||u.replaceNextCharCnt!==0||u.positionDelta!==0)&&this._onType.fire(u))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[c,u]=Bse.getTextData(l.clipboardData);c&&(u=u||gB.INSTANCE.get(c),this._onPaste.fire({text:c,metadata:u}))})),this._register(this._textArea.onFocus(()=>{let l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new si(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return ce(this._textArea.ownerDocument,"selectionchange",t=>{if(E1.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let n=Date.now(),o=n-e;if(e=n,o<5)return;let r=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100||!this._textAreaState.selection)return;let s=this._textArea.getValue();if(this._textAreaState.value!==s)return;let a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;let c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),d=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(d[0],d[1],d[2]),f=new qe(u.lineNumber,u.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){let t=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};gB.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` +`):t.text,n),e.preventDefault(),e.clipboardData&&Bse.setTextData(e.clipboardData,t.text,t.html,n)}};Pse=eui([Cmt(4,Es),Cmt(5,sr)],Pse);Bse={getTextData(i){let e=i.getData(Ko.text),t=null,n=i.getData("vscode-editor-data");if(typeof n=="string")try{t=JSON.parse(n),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&i.files.length>0?[Array.prototype.slice.call(i.files,0).map(r=>r.name).join(` +`),null]:[e,t]},setTextData(i,e,t,n){i.setData(Ko.text,e),typeof t=="string"&&i.setData("text/html",t),i.setData("vscode-editor-data",JSON.stringify(n))}},zse=class extends H{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new bi(this._actual,"keydown")).event,this.onKeyUp=this._register(new bi(this._actual,"keyup")).event,this.onCompositionStart=this._register(new bi(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new bi(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new bi(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new bi(this._actual,"beforeinput")).event,this.onInput=this._register(new bi(this._actual,"input")).event,this.onCut=this._register(new bi(this._actual,"cut")).event,this.onCopy=this._register(new bi(this._actual,"copy")).event,this.onPaste=this._register(new bi(this._actual,"paste")).event,this.onFocus=this._register(new bi(this._actual,"focus")).event,this.onBlur=this._register(new bi(this._actual,"blur")).event,this._onSyntheticTap=this._register(new q),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>E1.onKeyDown())),this._register(this.onBeforeInput(()=>E1.onBeforeInput())),this._register(this.onInput(()=>E1.onInput())),this._register(this.onKeyUp(()=>E1.onKeyUp())),this._register(ce(this._actual,RW.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=SA(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?ds()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let n=this._actual;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,n){let o=this._actual,r=null,s=SA(o);s?r=s.activeElement:r=ds();let a=rt(r),l=r===o,c=o.selectionStart,u=o.selectionEnd;if(l&&c===t&&u===n){yl&&a.parent!==a&&o.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),o.setSelectionRange(t,n),yl&&a.parent!==a&&o.focus();return}try{let d=yot(o);this.setIgnoreSelectionChangeTime("setSelectionRange"),o.focus(),o.setSelectionRange(t,n),wot(o,d)}catch{}}}});var iRe,nRe,Vse,_mt=D(()=>{n$();Ye();cp();gd();de();wi();xmt();OW();sO();iRe=class extends mB{constructor(e,t,n){super(e,t,n),this._register(Lr.addTarget(this.viewHelper.linesContentDomNode)),this._register(ce(this.viewHelper.linesContentDomNode,Tn.Tap,r=>this.onTap(r))),this._register(ce(this.viewHelper.linesContentDomNode,Tn.Change,r=>this.onChange(r))),this._register(ce(this.viewHelper.linesContentDomNode,Tn.Contextmenu,r=>this._onContextMenu(new Yb(r,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(ce(this.viewHelper.linesContentDomNode,"pointerdown",r=>{let s=r.pointerType;if(s==="mouse"){this._lastPointerType="mouse";return}else s==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));let o=new dee(this.viewHelper.viewDomNode);this._register(o.onPointerMove(this.viewHelper.viewDomNode,r=>this._onMouseMove(r))),this._register(o.onPointerUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(o.onPointerLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r))),this._register(o.onPointerDown(this.viewHelper.viewDomNode,(r,s)=>this._onMouseDown(r,s)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let n=this._createMouseTarget(new Yb(e,!1,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:n.type===6&&n.detail.injectedText!==null})}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}},nRe=class extends mB{constructor(e,t,n){super(e,t,n),this._register(Lr.addTarget(this.viewHelper.linesContentDomNode)),this._register(ce(this.viewHelper.linesContentDomNode,Tn.Tap,o=>this.onTap(o))),this._register(ce(this.viewHelper.linesContentDomNode,Tn.Change,o=>this.onChange(o))),this._register(ce(this.viewHelper.linesContentDomNode,Tn.Contextmenu,o=>this._onContextMenu(new Yb(o,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new Yb(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let n=document.createEvent("CustomEvent");n.initEvent(RW.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}},Vse=class extends H{constructor(e,t,n){super(),(Ou||lYe&&WK)&&OF.pointerEvents?this.handler=this._register(new iRe(e,t,n)):Xi.TouchEvent?this.handler=this._register(new nRe(e,t,n)):this.handler=this._register(new mB(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}});var Smt=D(()=>{});var Emt=D(()=>{});var vf,oD=D(()=>{aO();vf=class extends Kb{}});var bB,oRe=D(()=>{Emt();wi();oD();kt();Ue();io();Am();bB=class i extends vf{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new J(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(67);let t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(96);let n=e.get(146);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new J(e,1));if(t.column!==1)return"";let n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){let o=Math.abs(this._lastCursorModelPosition.lineNumber-n);return o===0?''+n+"":String(o)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===n||n%10===0)return String(n);let o=this._context.viewModel.getLineCount();return n===o?String(n):""}return String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}let t=Cr?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);r.sort((c,u)=>R.compareRangesUsingEnds(c.range,u.range));let s=0,a=this._context.viewModel.getLineCount(),l=[];for(let c=n;c<=o;c++){let u=c-n,d=this._getLineRenderLineNumber(c),h="";for(;s${d}`}this._renderResult=l}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ba((i,e)=>{let t=i.getColor(Wdt),n=i.getColor($dt);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)})});var Dmt=D(()=>{});var AB,rRe=D(()=>{Dmt();tl();bd();AB=class i extends Ur{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);let t=this._context.configuration.options,n=t.get(146);this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=Ai(document.createElement("div")),this._domNode.setClassName(i.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Ai(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(i.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(146);return this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}});var Tmt=D(()=>{});var fC,Hse=D(()=>{Tmt();fC="monaco-mouse-cursor-text"});function iui(i,e,t,n){if(e.length===0)return 0;let o=i.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";let r=i.createElement("span");vr(r,t),r.style.whiteSpace="pre",r.style.tabSize=`${n*t.spaceWidth}px`,r.append(e),o.appendChild(r),i.body.appendChild(o);let s=r.offsetWidth;return o.remove(),s}var tui,kmt,aRe,sRe,Wse,Imt=D(()=>{Smt();Be();Kh();tl();wi();Rt();um();OW();eRe();bd();oRe();rRe();ea();IO();kt();Ue();Qn();Hse();ro();Wr();EIe();Xo();ht();tui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},kmt=function(i,e){return function(t,n){e(t,n,i)}},aRe=class{constructor(e,t,n,o,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=o,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){let t=new J(this.modelLineNumber,this.distanceToModelLineStart+1),n=new J(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}},sRe=yl,Wse=class extends Ur{constructor(e,t,n,o,r){super(e),this._keybindingService=o,this._instantiationService=r,this._primaryCursorPosition=new J(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;let s=this._context.configuration.options,a=s.get(146);this._setAccessibilityOptions(s),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new qe(1,1,1,1)],this._modelSelections=[new qe(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Ai(document.createElement("textarea")),_c.write(this.textArea,7),this.textArea.setClassName(`inputarea ${fC}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",y("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=Ai(document.createElement("div")),this.textAreaCover.setPosition("absolute");let c={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,f)=>this._context.viewModel.getValueInRange(h,f),getValueLengthInRange:(h,f)=>this._context.viewModel.getValueLengthInRange(h,f),modifyPosition:(h,f)=>this._context.viewModel.modifyPosition(h,f)},u={getDataToCopy:()=>{let h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Fo),f=this._context.viewModel.model.getEOL(),p=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),g=Array.isArray(h)?h:null,A=Array.isArray(h)?h.join(f):h,v,w=null;if(FW.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&A.length<65536){let C=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);C&&(v=C.html,w=C.mode)}return{isFromEmptySelection:p,multicursorText:g,text:A,html:v,mode:w}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){let h=this._selections[0];if(jt&&h.isEmpty()){let p=h.getStartPosition(),g=this._getWordBeforePosition(p);if(g.length===0&&(g=this._getCharacterBeforePosition(p)),g.length>0)return new fu(g,g.length,g.length,R.fromPositions(p),0)}if(jt&&!h.isEmpty()&&c.getValueLengthInRange(h,0)<500){let p=c.getValueInRange(h,0);return new fu(p,0,p.length,h,0)}if(Zf&&!h.isEmpty()){let p="vscode-placeholder";return new fu(p,0,p.length,null,void 0)}return fu.EMPTY}if(OSe){let h=this._selections[0];if(h.isEmpty()){let f=h.getStartPosition(),[p,g]=this._getAndroidWordAtPosition(f);if(p.length>0)return new fu(p,g,g,R.fromPositions(f),0)}return fu.EMPTY}return Ose.fromEditorSelection(c,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,f,p)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,f,p)},d=this._register(new zse(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(Pse,u,d,Ja,{isAndroid:OSe,isChrome:FS,isFirefox:yl,isSafari:Zf})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let f=!1,p=null,g=null;h.metadata&&(f=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,p=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,g=h.metadata.mode),this._viewController.paste(h.text,f,p,g)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?(wp&&console.log(` => compositionType: <<${h.text}>>, ${h.replacePrevCharCnt}, ${h.replaceNextCharCnt}, ${h.positionDelta}`),this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta)):(wp&&console.log(` => type: <<${h.text}>>`),this._viewController.type(h.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{let f=this.textArea.domNode,p=this._modelSelections[0],{distanceToModelLineStart:g,widthOfHiddenTextBefore:A}=(()=>{let w=f.value.substring(0,Math.min(f.selectionStart,f.selectionEnd)),C=w.lastIndexOf(` +`),_=w.substring(C+1),E=_.lastIndexOf(" "),I=_.length-E-1,T=p.getStartPosition(),N=Math.min(T.column-1,I),L=T.column-1-N,B=_.substring(0,_.length-N),{tabSize:z}=this._context.viewModel.model.getOptions(),Q=iui(this.textArea.domNode.ownerDocument,B,this._fontInfo,z);return{distanceToModelLineStart:L,widthOfHiddenTextBefore:Q}})(),{distanceToModelLineEnd:v}=(()=>{let w=f.value.substring(Math.max(f.selectionStart,f.selectionEnd)),C=w.indexOf(` +`),_=C===-1?w:w.substring(0,C),E=_.indexOf(" "),I=E===-1?_.length:_.length-E-1,T=p.getEndPosition(),N=Math.min(this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column,I);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column-N}})();this._context.viewModel.revealRange("keyboard",!0,R.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new aRe(this._context,p.startLineNumber,g,A,v),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${fC} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(h=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${fC}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(LL.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){let t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),o=Cd(t,[]),r=!0,s=e.column,a=!0,l=e.column,c=0;for(;c<50&&(r||a);){if(r&&s<=1&&(r=!1),r){let u=n.charCodeAt(s-2);o.get(u)!==0?r=!1:s--}if(a&&l>n.length&&(a=!1),a){let u=n.charCodeAt(l-1);o.get(u)!==0?a=!1:l++}c++}return[n.substring(s-1,l-1),e.column-s]}_getWordBeforePosition(e){let t=this._context.viewModel.getLineContent(e.lineNumber),n=Cd(this._context.configuration.options.get(132),[]),o=e.column,r=0;for(;o>1;){let s=t.charCodeAt(o-2);if(n.get(s)!==0||r>50)return t.substring(o-1,e.column-1);r++,o--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){let n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Er(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){if(e.get(2)===1){let n=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),o=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),r=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),s=y("accessibilityModeOff","The editor is not accessible at this time.");return n?y("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",s,n):o?y("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",s,o):r?y("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",s,r):s}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);let t=e.get(3);this._accessibilitySupport===2&&t===of.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;let o=e.get(146).wrappingColumn;if(o!==-1&&this._accessibilitySupport!==1){let r=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(o*r.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=sRe?0:1}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(146);this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:o}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${o*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){let e=this._context.configuration.options;!LL.enabled||e.get(34)&&e.get(92)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new J(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){let n=this._visibleTextArea.visibleTextareaStart,o=this._visibleTextArea.visibleTextareaEnd,r=this._visibleTextArea.startPosition,s=this._visibleTextArea.endPosition;if(r&&s&&n&&o&&o.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){let a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart)),c=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+n.left-this._scrollLeft,d=o.left-n.left+1;if(uthis._contentWidth&&(d=this._contentWidth);let h=this._context.viewModel.getViewLineData(r.lineNumber),f=h.tokens.findTokenIndexAtOffset(r.column-1),p=h.tokens.findTokenIndexAtOffset(s.column-1),g=f===p,A=this._visibleTextArea.definePresentation(g?h.tokens.getPresentation(f):null);this.textArea.domNode.scrollTop=l*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:a,left:u,width:d,height:this._lineHeight,useCover:!1,color:(Gn.getColorMap()||[])[A.foreground],italic:A.italic,bold:A.bold,underline:A.underline,strikethrough:A.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}let e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}let t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(jt||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;let n=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:sRe?0:1,useCover:!1})}_newlinecount(e){let t=0,n=-1;do{if(n=e.indexOf(` +`,n+1),n===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:sRe?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;let t=this.textArea,n=this.textAreaCover;vr(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?me.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);let o=this._context.configuration.options;o.get(57)?n.setClassName("monaco-editor-background textAreaCover "+AB.OUTER_CLASS_NAME):o.get(68).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+bB.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};Wse=tui([kmt(3,Xt),kmt(4,Re)],Wse)});function JA(i){return i==="'"||i==='"'||i==="`"}var nui,oui,rui,pC,ji,lRe,cRe,sl,sc,Sm=D(()=>{kt();Ue();Qn();DO();Zb();uoe();nui=()=>!0,oui=()=>!1,rui=i=>i===" "||i===" ",pC=class{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,t,n,o){this.languageConfigurationService=o,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let r=n.options,s=r.get(146),a=r.get(50);this.readOnly=r.get(92),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=r.get(117),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=r.get(129),this.wordSeparators=r.get(132),this.emptySelectionClipboard=r.get(37),this.copyWithSyntaxHighlighting=r.get(25),this.multiCursorMergeOverlapping=r.get(77),this.multiCursorPaste=r.get(79),this.multiCursorLimit=r.get(80),this.autoClosingBrackets=r.get(6),this.autoClosingComments=r.get(7),this.autoClosingQuotes=r.get(11),this.autoClosingDelete=r.get(9),this.autoClosingOvertype=r.get(10),this.autoSurround=r.get(14),this.autoIndent=r.get(12),this.wordSegmenterLocales=r.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(let u of l)this.surroundingPairs[u.open]=u.close;let c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=c?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};let e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(let t of e)this._electricChars[t]=!0}return this._electricChars}onElectricCharacter(e,t,n){let o=Ey(t,n-1),r=this.languageConfigurationService.getLanguageConfiguration(o.languageId).electricCharacter;return r?r.onElectricCharacter(e,o,n-o.firstCharOffset):null}normalizeIndentation(e){return kP(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,n){switch(t){case"beforeWhitespace":return rui;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return nui;case"never":return oui}}_getLanguageDefinedShouldAutoClose(e,t){let n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return o=>n.indexOf(o)!==-1}visibleColumnFromColumn(e,t){return or.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){let o=or.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),r=e.getLineMinColumn(t);if(os?s:o}},ji=class i{static fromModelState(e){return new lRe(e)}static fromViewState(e){return new cRe(e)}static fromModelSelection(e){let t=qe.liftSelection(e),n=new sl(R.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return i.fromModelState(n)}static fromModelSelections(e){let t=[];for(let n=0,o=e.length;n{Sm();kt();Ue();rD=class i{static columnSelect(e,t,n,o,r,s){let a=Math.abs(r-n)+1,l=n>r,c=o>s,u=os||vo||A0&&o--,i.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,o)}static columnSelectRight(e,t,n){let o=0,r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),s=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let l=r;l<=s;l++){let c=t.getLineMaxColumn(l),u=e.visibleColumnFromColumn(t,new J(l,c));o=Math.max(o,u)}let a=n.toViewVisualColumn;return a{Qn();Bs=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return qe.fromPositions(o.getEndPosition())}},Use=class{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return qe.fromRange(o,0)}},mN=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return qe.fromPositions(o.getStartPosition())}},gN=class{constructor(e,t,n,o,r=!1){this._range=e,this._text=t,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=r}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return qe.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}},sD=class{constructor(e,t,n,o=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=o,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var PW,Gr,jse=D(()=>{Rt();Zb();kt();Ue();ODe();Sm();PW=class{constructor(e,t,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}},Gr=class i{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-XSe(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){let n=t.lineNumber-1;return new J(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let o=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=qI.atomicPosition(r,t.column-1,n,0);if(s!==-1&&s+1>=o)return new J(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,n){let o=e.stickyTabStops?i.leftPositionAtomicSoftTabs(t,n,e.tabSize):i.leftPosition(t,n);return new PW(o.lineNumber,o.column,0)}static moveLeft(e,t,n,o,r){let s,a;if(n.hasSelection()&&!o)s=n.selection.startLineNumber,a=n.selection.startColumn;else{let l=n.position.delta(void 0,-(r-1)),c=t.normalizePosition(i.clipPositionColumn(l,t),0),u=i.left(e,t,c);s=u.lineNumber,a=u.column}return n.move(o,s,a,0)}static clipPositionColumn(e,t){return new J(e.lineNumber,i.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nu?(n=u,a?o=t.getLineMaxColumn(n):o=Math.min(t.getLineMaxColumn(n),o)):o=e.columnFromVisibleColumn(t,n,c),f?r=0:r=c-or.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),l!==void 0){let p=new J(n,o),g=t.normalizePosition(p,l);r=r+(o-g.column),n=g.lineNumber,o=g.column}return new PW(n,o,r)}static down(e,t,n,o,r,s,a){return this.vertical(e,t,n,o,r,n+s,a,4)}static moveDown(e,t,n,o,r){let s,a;n.hasSelection()&&!o?(s=n.selection.endLineNumber,a=n.selection.endColumn):(s=n.position.lineNumber,a=n.position.column);let l=0,c;do if(c=i.down(e,t,s+l,a,n.leftoverVisibleColumns,r,!0),t.normalizePosition(new J(c.lineNumber,c.column),2).lineNumber>s)break;while(l++<10&&s+l1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return n.move(o,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(e,t,n,o){let r=t.getLineCount(),s=n.position.lineNumber;for(;s{Rt();bN();Sm();Zb();jse();Ue();kt();mC=class i{static deleteRight(e,t,n,o){let r=[],s=e!==3;for(let a=0,l=o.length;a=h.length+1)return!1;let f=h.charAt(d.column-2),p=o.get(f);if(!p)return!1;if(JA(f)){if(n==="never")return!1}else if(t==="never")return!1;let g=h.charAt(d.column-1),A=!1;for(let v of p)v.open===f&&v.close===g&&(A=!0);if(!A)return!1;if(e==="auto"){let v=!1;for(let w=0,C=a.length;w1){let r=t.getLineContent(o.lineNumber),s=Hr(r),a=s===-1?r.length+1:s+1;if(o.column<=a){let l=n.visibleColumnFromColumn(t,o),c=or.prevIndentTabStop(l,n.indentSize),u=n.columnFromVisibleColumn(t,o.lineNumber,c);return new R(o.lineNumber,u,o.lineNumber,o.column)}}return R.fromPositions(i.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let n=sot(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){let n=e.lineNumber-1;return new J(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){let o=[],r=null;n.sort((s,a)=>J.compare(s.getStartPosition(),a.getEndPosition()));for(let s=0,a=n.length;s1&&r?.endLineNumber!==c.lineNumber?(u=c.lineNumber-1,d=t.getLineMaxColumn(c.lineNumber-1),h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(u=c.lineNumber,d=1,h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));let p=new R(u,d,h,f);r=p,p.isEmpty()?o[s]=null:o[s]=new Bs(p,"")}else o[s]=null;else o[s]=new Bs(l,"")}return new sc(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}});function Gse(i){return i.filter(e=>!!e)}var Ba,AN,BW=D(()=>{Rt();Sm();Qse();IO();kt();Ue();Ba=class i{static _createWord(e,t,n,o,r){return{start:o,end:r,wordType:t,nextCharClass:n}}static _createIntlWord(e,t){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:t}}static _findPreviousWordOnLine(e,t,n){let o=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(o,e,n)}static _doFindPreviousWordOnLine(e,t,n){let o=0,r=t.findPrevIntlWordBeforeOrAtOffset(e,n.column-2);for(let s=n.column-2;s>=0;s--){let a=e.charCodeAt(s),l=t.get(a);if(r&&s===r.index)return this._createIntlWord(r,l);if(l===0){if(o===2)return this._createWord(e,o,l,s+1,this._findEndOfWord(e,t,o,s+1));o=1}else if(l===2){if(o===1)return this._createWord(e,o,l,s+1,this._findEndOfWord(e,t,o,s+1));o=2}else if(l===1&&o!==0)return this._createWord(e,o,l,s+1,this._findEndOfWord(e,t,o,s+1))}return o!==0?this._createWord(e,o,1,0,this._findEndOfWord(e,t,o,0)):null}static _findEndOfWord(e,t,n,o){let r=t.findNextIntlWordAtOrAfterOffset(e,o),s=e.length;for(let a=o;a=0;s--){let a=e.charCodeAt(s),l=t.get(a);if(r&&s===r.index)return s;if(l===1||n===1&&l===2||n===2&&l===0)return s+1}return 0}static moveWordLeft(e,t,n,o,r){let s=n.lineNumber,a=n.column;a===1&&s>1&&(s=s-1,a=t.getLineMaxColumn(s));let l=i._findPreviousWordOnLine(e,t,new J(s,a));if(o===0)return new J(s,l?l.start+1:1);if(o===1)return!r&&l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=i._findPreviousWordOnLine(e,t,new J(s,l.start+1))),new J(s,l?l.start+1:1);if(o===3){for(;l&&l.wordType===2;)l=i._findPreviousWordOnLine(e,t,new J(s,l.start+1));return new J(s,l?l.start+1:1)}return l&&a<=l.end+1&&(l=i._findPreviousWordOnLine(e,t,new J(s,l.start+1))),new J(s,l?l.end+1:1)}static _moveWordPartLeft(e,t){let n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===1)return n>1?new J(n-1,e.getLineMaxColumn(n-1)):t;let r=e.getLineContent(n);for(let s=t.column-1;s>1;s--){let a=r.charCodeAt(s-2),l=r.charCodeAt(s-1);if(a===95&&l!==95)return new J(n,s);if(a===45&&l!==45)return new J(n,s);if((py(a)||_z(a))&&bg(l))return new J(n,s);if(bg(a)&&bg(l)&&s+1=l.start+1&&(l=i._findNextWordOnLine(e,t,new J(r,l.end+1))),l?s=l.start+1:s=t.getLineMaxColumn(r);return new J(r,s)}static _moveWordPartRight(e,t){let n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===o)return n1?c=1:(l--,c=o.getLineMaxColumn(l)):(u&&c<=u.end+1&&(u=i._findPreviousWordOnLine(n,o,new J(l,u.start+1))),u?c=u.end+1:c>1?c=1:(l--,c=o.getLineMaxColumn(l))),new R(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;let o=new J(n.positionLineNumber,n.positionColumn),r=this._deleteInsideWordWhitespace(t,o);return r||this._deleteInsideWordDetermineDeleteRange(e,t,o)}static _charAtIsWhitespace(e,t){let n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){let n=e.getLineContent(t.lineNumber),o=n.length;if(o===0)return null;let r=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,r))return null;let s=Math.min(t.column-1,o-1);if(!this._charAtIsWhitespace(n,s))return null;for(;r>0&&this._charAtIsWhitespace(n,r-1);)r--;for(;s+11?new R(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberd.start+1<=n.column&&n.column<=d.end+1,a=(d,h)=>(d=Math.min(d,n.column),h=Math.max(h,n.column),new R(n.lineNumber,d,n.lineNumber,h)),l=d=>{let h=d.start+1,f=d.end+1,p=!1;for(;f-11&&this._charAtIsWhitespace(o,h-2);)h--;return a(h,f)},c=i._findPreviousWordOnLine(e,t,n);if(c&&s(c))return l(c);let u=i._findNextWordOnLine(e,t,n);return u&&s(u)?l(u):c&&u?a(c.end+1,u.start+1):c?a(c.start+1,c.end+1):u?a(u.start+1,u.end+1):a(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let n=t.getPosition(),o=i._moveWordPartLeft(e,n);return new R(n.lineNumber,n.column,o.lineNumber,o.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let o=t;o=h.start+1&&(h=i._findNextWordOnLine(n,o,new J(l,h.end+1))),h?c=h.start+1:c{gn();Sm();jse();BW();kt();Ue();xa=class{static addCursorDown(e,t,n){let o=[],r=0;for(let s=0,a=t.length;sc&&(u=c,d=e.model.getLineMaxColumn(u)),ji.fromModelState(new sl(new R(s.lineNumber,1,u,d),2,0,new J(u,d),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberl){let c=e.getLineCount(),u=a.lineNumber+1,d=1;return u>c&&(u=c,d=e.getLineMaxColumn(u)),ji.fromViewState(t.viewState.move(!0,u,d,0))}else{let c=t.modelState.selectionStart.getEndPosition();return ji.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(e,t,n,o){let r=e.model.validatePosition(o);return ji.fromModelState(Ba.word(e.cursorConfig,e.model,t.modelState,n,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new ji(t.modelState,t.viewState);let n=t.viewState.position.lineNumber,o=t.viewState.position.column;return ji.fromViewState(new sl(new R(n,o,n,o),0,0,new J(n,o),0))}static moveTo(e,t,n,o,r){if(n){if(t.modelState.selectionStartKind===1)return this.word(e,t,n,o);if(t.modelState.selectionStartKind===2)return this.line(e,t,n,o,r)}let s=e.model.validatePosition(o),a=r?e.coordinatesConverter.validateViewPosition(new J(r.lineNumber,r.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return ji.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,o,r,s){switch(n){case 0:return s===4?this._moveHalfLineLeft(e,t,o):this._moveLeft(e,t,o,r);case 1:return s===4?this._moveHalfLineRight(e,t,o):this._moveRight(e,t,o,r);case 2:return s===2?this._moveUpByViewLines(e,t,o,r):this._moveUpByModelLines(e,t,o,r);case 3:return s===2?this._moveDownByViewLines(e,t,o,r):this._moveDownByModelLines(e,t,o,r);case 4:return s===2?t.map(a=>ji.fromViewState(Gr.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,o))):t.map(a=>ji.fromModelState(Gr.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,o)));case 5:return s===2?t.map(a=>ji.fromViewState(Gr.moveToNextBlankLine(e.cursorConfig,e,a.viewState,o))):t.map(a=>ji.fromModelState(Gr.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,o)));case 6:return this._moveToViewMinColumn(e,t,o);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,o);case 8:return this._moveToViewCenterColumn(e,t,o);case 9:return this._moveToViewMaxColumn(e,t,o);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,o);default:return null}}static viewportMove(e,t,n,o,r){let s=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(n){case 11:{let l=this._firstLineNumberInRange(e.model,a,r),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 13:{let l=this._lastLineNumberInRange(e.model,a,r),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 12:{let l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 14:{let l=[];for(let c=0,u=t.length;cn.endLineNumber-1?s=n.endLineNumber-1:rji.fromViewState(Gr.moveLeft(e.cursorConfig,e,r.viewState,n,o)))}static _moveHalfLineLeft(e,t,n){let o=[];for(let r=0,s=t.length;rji.fromViewState(Gr.moveRight(e.cursorConfig,e,r.viewState,n,o)))}static _moveHalfLineRight(e,t,n){let o=[];for(let r=0,s=t.length;r{Pt();FF();wg();zL=class{constructor(e,t,n){this._indentRulesSupport=t,this._indentationLineProcessor=new Eoe(e,n)}shouldIncrease(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(n)}shouldDecrease(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(n)}shouldIgnore(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(n)}shouldIndentNextLine(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(n)}},VL=class{constructor(e,t){this.model=e,this.indentationLineProcessor=new Eoe(e,t)}getProcessedTokenContextAroundRange(e){let t=this._getProcessedTokensBeforeRange(e),n=this._getProcessedTokensAfterRange(e),r=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:n,previousLineProcessedTokens:r}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);let t=this.model.tokenization.getLineTokens(e.startLineNumber),n=ly(t,e.startColumn-1),r;if(Doe(this.model,e.getStartPosition())){let s=e.startColumn-1-n.firstCharOffset,a=n.firstCharOffset,l=a+s;r=t.sliceAndInflate(a,l,0)}else{let s=e.startColumn-1;r=t.sliceAndInflate(0,s,0)}return this.indentationLineProcessor.getProcessedTokens(r)}_getProcessedTokensAfterRange(e){let t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);let n=this.model.tokenization.getLineTokens(t.lineNumber),r=ly(n,t.column-1),o=t.column-1-r.firstCharOffset,s=r.firstCharOffset+o,a=r.firstCharOffset+r.getLineLength(),l=n.sliceAndInflate(s,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){let t=f=>{this.model.tokenization.forceTokenization(f);let p=this.model.tokenization.getLineTokens(f),g=this.model.getLineMaxColumn(f)-1;return ly(p,g)};this.model.tokenization.forceTokenization(e.startLineNumber);let n=this.model.tokenization.getLineTokens(e.startLineNumber),r=ly(n,e.startColumn-1),o=To.createEmpty("",r.languageIdCodec),s=e.startLineNumber-1;if(s===0||!(r.firstCharOffset===0))return o;let c=t(s);if(!(r.languageId===c.languageId))return o;let d=c.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(d)}},Eoe=class{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){let n=(s,a)=>{let l=wn(s);return a+s.substring(l.length)};this.model.tokenization.forceTokenization?.(e);let r=this.model.tokenization.getLineTokens(e),o=this.getProcessedTokens(r).getLineContent();return t!==void 0&&(o=n(o,t)),o}getProcessedTokens(e){let t=l=>l===2||l===3||l===1,n=e.getLanguageId(0),o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew.getBracketRegExp({global:!0}),s=[];return e.forEach(l=>{let c=e.getStandardTokenType(l),u=e.getTokenText(l);t(c)&&(u=u.replace(o,""));let d=e.getMetadata(l);s.push({text:u,metadata:d})}),To.createFromTextAndMetadata(s,e.languageIdCodec)}}});function Qx(i,e,t,n){e.tokenization.forceTokenization(t.startLineNumber);let r=e.getLanguageIdAtPosition(t.startLineNumber,t.startColumn),o=n.getLanguageConfiguration(r);if(!o)return null;let a=new VL(e,n).getProcessedTokenContextAroundRange(t),l=a.previousLineProcessedTokens.getLineContent(),c=a.beforeRangeProcessedTokens.getLineContent(),u=a.afterRangeProcessedTokens.getLineContent(),d=o.onEnter(i,l,c,u);if(!d)return null;let h=d.indentAction,f=d.appendText,p=d.removeText||0;f?h===$o.Indent&&(f=" "+f):h===$o.Indent||h===$o.IndentOutdent?f=" ":f="";let g=Y$(e,t.startLineNumber,t.startColumn);return p&&(g=g.substring(0,g.length-p)),{indentAction:h,appendText:f,removeText:p,indentation:g}}var koe=D(()=>{OS();ks();Toe()});function HL(i,e){if(e<=0)return"";HMe[i]||(HMe[i]=["",i]);let t=HMe[i];for(let n=t.length;n<=e;n++)t[n]=t[n-1]+i;return t[e]}var hAi,fAi,Ioe,HMe,Cd,DP=D(()=>{Pt();zb();We();Hn();koe();ks();hAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fAi=function(i,e){return function(t,n){e(t,n,i)}},HMe=Object.create(null);Cd=Ioe=class{static unshiftIndent(e,t,n,r,o){let s=to.visibleColumnFromColumn(e,t,n);if(o){let a=HL(" ",r),c=to.prevIndentTabStop(s,r)/r;return HL(a,c)}else{let c=to.prevRenderTabStop(s,n)/n;return HL(" ",c)}}static shiftIndent(e,t,n,r,o){let s=to.visibleColumnFromColumn(e,t,n);if(o){let a=HL(" ",r),c=to.nextIndentTabStop(s,r)/r;return HL(a,c)}else{let c=to.nextRenderTabStop(s,n)/n;return HL(" ",c)}}constructor(e,t,n){this._languageConfigurationService=n,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.endLineNumber;this._selection.endColumn===1&&n!==r&&(r=r-1);let{tabSize:o,indentSize:s,insertSpaces:a}=this._opts,l=n===r;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,u=0;for(let d=n;d<=r;d++,c=u){u=0;let h=e.getLineContent(d),f=Vo(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),d>1&&to.visibleColumnFromColumn(h,f+1,o)%s!==0&&e.tokenization.isCheapToTokenize(d-1)){let v=Qx(this._opts.autoIndent,e,new N(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(v){if(u=c,v.appendText)for(let A=0,w=v.appendText.length;A{We();Hn();Loe=class{constructor(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}getEditOperations(e,t){t.addTrackedEditOperation(new N(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new N(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let n=t.getInverseEditOperations(),r=n[0].range,o=n[1].range;return new qe(r.endLineNumber,r.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}},Noe=class{constructor(e,t,n){this._position=e,this._text=t,this._charAfter=n}getEditOperations(e,t){t.addTrackedEditOperation(new N(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return new qe(r.endLineNumber,r.startColumn,r.endLineNumber,r.endColumn-this._charAfter.length)}}});function pAi(i,e,t){let n=i.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let r,o=-1;for(r=e-1;r>=1;r--){if(i.tokenization.getLanguageIdAtPosition(r,0)!==n)return o;let s=i.getLineContent(r);if(t.shouldIgnore(r)||/^\s+$/.test(s)||s===""){o=r;continue}return r}}return-1}function TP(i,e,t,n=!0,r){if(i<4)return null;let o=r.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!o)return null;let s=new zL(e,o,r);if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};let a=pAi(e,t,s);if(a<0)return null;if(a<1)return{indentation:"",action:null};if(s.shouldIncrease(a)||s.shouldIndentNextLine(a)){let l=e.getLineContent(a);return{indentation:wn(l),action:$o.Indent,line:a}}else if(s.shouldDecrease(a)){let l=e.getLineContent(a);return{indentation:wn(l),action:null,line:a}}else{if(a===1)return{indentation:wn(e.getLineContent(a)),action:null,line:a};let l=a-1,c=o.getIndentMetadata(e.getLineContent(l));if(!(c&3)&&c&4){let u=0;for(let d=l-1;d>0;d--)if(!s.shouldIndentNextLine(d)){u=d;break}return{indentation:wn(e.getLineContent(u+1)),action:null,line:u+1}}if(n)return{indentation:wn(e.getLineContent(a)),action:null,line:a};for(let u=a;u>0;u--){if(s.shouldIncrease(u))return{indentation:wn(e.getLineContent(u)),action:$o.Indent,line:u};if(s.shouldIndentNextLine(u)){let d=0;for(let h=u-1;h>0;h--)if(!s.shouldIndentNextLine(u)){d=h;break}return{indentation:wn(e.getLineContent(d+1)),action:null,line:d+1}}else if(s.shouldDecrease(u))return{indentation:wn(e.getLineContent(u)),action:null,line:u}}return{indentation:wn(e.getLineContent(1)),action:null,line:1}}}function WL(i,e,t,n,r,o){if(i<4)return null;let s=o.getLanguageConfiguration(t);if(!s)return null;let a=o.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;let l=new zL(e,a,o),c=TP(i,e,n,void 0,o);if(c){let u=c.line;if(u!==void 0){let d=!0;for(let h=u;h0){let A=e.getLineContent(v);if(c.shouldIndentNextLine(A)&&c.shouldIncrease(g)){let C=TP(s,e,t.startLineNumber,!1,o)?.indentation;if(C!==void 0){let _=e.getLineContent(t.startLineNumber),E=wn(_),T=r.shiftIndent(C)===E,L=/^\s*$/.test(p),M=i.autoClosingPairs.autoClosingPairsOpenByEnd.get(n),H=M&&M.length>0&&L;if(T&&H)return C}}}return null}function Moe(i,e,t){let n=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!n||e<1||e>i.getLineCount()?null:n.getIndentMetadata(i.getLineContent(e))}function mAi(i,e,t){return{tokenization:{getLineTokens:r=>r===e?t:i.tokenization.getLineTokens(r),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(r,o)=>i.getLanguageIdAtPosition(r,o)},getLineContent:r=>r===e?t.getLineContent():i.getLineContent(r)}}var Roe=D(()=>{Pt();OS();Toe()});function QMe(i,e){return i===" "?e===5||e===6?6:5:4}function Goe(i,e){return Tbt(i)&&!Tbt(e)?!0:i===5?!1:Dbt(i)!==Dbt(e)}function Dbt(i){return i===6||i===5?"space":i}function Tbt(i){return i===4||i===5||i===6}function kbt(i,e,t,n,r){if(i.autoClosingOvertype==="never"||!i.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let o=0,s=t.length;o2?c.charCodeAt(l.column-2):0)===92&&d)return!1;if(i.autoClosingOvertype==="auto"){let f=!1;for(let p=0,g=n.length;p{Lt();Pt();PL();DP();WMe();lm();BF();We();Nt();OS();ks();FF();Roe();koe();Foe=class{static getEdits(e,t,n,r,o){if(!o&&this._isAutoIndentType(e,t,n)){let s=[];for(let l of n){let c=this._findActualIndentationForSelection(e,t,l,r);if(c===null)return;s.push({selection:l,indentation:c})}let a=kP.getAutoClosingPairClose(e,t,n,r,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,s,r,a)}}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let r=0,o=n.length;rGMe(e,a),unshiftIndent:a=>Qoe(e,a)},e.languageConfigurationService);if(o===null)return null;let s=Y$(t,n.startLineNumber,n.startColumn);return o===e.normalizeIndentation(s)?null:o}static _getIndentationAndAutoClosingPairEdits(e,t,n,r,o){let s=n.map(({selection:l,indentation:c})=>{if(o!==null){let u=this._getEditFromIndentationAndSelection(e,t,c,l,r,!1);return new jMe(u,l,r,o)}else{let u=this._getEditFromIndentationAndSelection(e,t,c,l,r,!0);return UL(u.range,u.text,!1)}}),a={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new ic(4,s,a)}static _getEditFromIndentationAndSelection(e,t,n,r,o,s=!0){let a=r.startLineNumber,l=t.getLineFirstNonWhitespaceColumn(a),c=e.normalizeIndentation(n);if(l!==0){let d=t.getLineContent(a);c+=d.substring(l-1,r.startColumn-1)}return c+=s?o:"",{range:new N(a,1,r.endLineNumber,r.endColumn),text:c}}},Ooe=class{static getEdits(e,t,n,r,o,s){if(kbt(t,n,r,o,s))return this._runAutoClosingOvertype(e,r,s)}static _runAutoClosingOvertype(e,t,n){let r=[];for(let o=0,s=t.length;onew Ms(new N(a.positionLineNumber,a.positionColumn,a.positionLineNumber,a.positionColumn+1),"",!1));return new ic(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}},kP=class{static getEdits(e,t,n,r,o,s){if(!s){let a=this.getAutoClosingPairClose(e,t,n,r,o);if(a!==null)return this._runAutoClosingOpenCharType(n,r,o,a)}}static _runAutoClosingOpenCharType(e,t,n,r){let o=[];for(let s=0,a=e.length;s{let g=p.getPosition();return o?{lineNumber:g.lineNumber,beforeColumn:g.column-r.length,afterColumn:g.column}:{lineNumber:g.lineNumber,beforeColumn:g.column,afterColumn:g.column}}),a=this._findAutoClosingPairOpen(e,t,s.map(p=>new K(p.lineNumber,p.beforeColumn)),r);if(!a)return null;let l,c;if(Iv(r)?(l=e.autoClosingQuotes,c=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,c=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,c=e.shouldAutoCloseBefore.bracket),l==="never")return null;let d=this._findContainedAutoClosingPair(e,a),h=d?d.close:"",f=!0;for(let p of s){let{lineNumber:g,beforeColumn:v,afterColumn:A}=p,w=t.getLineContent(g),C=w.substring(0,v-1),_=w.substring(A-1);if(_.startsWith(h)||(f=!1),_.length>0){let L=_.charAt(0);if(!this._isBeforeClosingBrace(e,_)&&!c(L))return null}if(a.open.length===1&&(r==="'"||r==='"')&&l!=="always"){let L=pd(e.wordSeparators,[]);if(C.length>0){let M=C.charCodeAt(C.length-1);if(L.get(M)===0)return null}}if(!t.tokenization.isCheapToTokenize(g))return null;t.tokenization.forceTokenization(g);let E=t.tokenization.getLineTokens(g),I=ly(E,v-1);if(!a.shouldAutoClose(I,v-I.firstCharOffset))return null;let T=a.findNeutralCharacter();if(T){let L=t.tokenization.getTokenTypeIfInsertingCharacter(g,v,T);if(!a.isOK(L))return null}}return f?a.close.substring(0,a.close.length-h.length):a.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let n=t.close.charAt(t.close.length-1),r=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[],o=null;for(let s of r)s.open!==t.open&&t.open.includes(s.open)&&t.close.endsWith(s.close)&&(!o||s.open.length>o.open.length)&&(o=s);return o}static _findAutoClosingPairOpen(e,t,n,r){let o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(r);if(!o)return null;let s=null;for(let a of o)if(s===null||a.open.length>s.open.length){let l=!0;for(let c of n)if(t.getValueInRange(new N(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+r!==a.open){l=!1;break}l&&(s=a)}return s}static _isBeforeClosingBrace(e,t){let n=t.charAt(0),r=e.autoClosingPairs.autoClosingPairsOpenByStart.get(n)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(n)||[],s=r.some(l=>t.startsWith(l.open)),a=o.some(l=>t.startsWith(l.close));return!s&&a}},Boe=class{static getEdits(e,t,n,r,o){if(!o&&this._isSurroundSelectionType(e,t,n,r))return this._runSurroundSelectionType(e,n,r)}static _runSurroundSelectionType(e,t,n){let r=[];for(let o=0,s=t.length;o{Rt();DO();Fg();vN=class{constructor(e,t,n){this._indentRulesSupport=t,this._indentationLineProcessor=new Yse(e,n)}shouldIncrease(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(n)}shouldDecrease(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(n)}shouldIgnore(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(n)}shouldIndentNextLine(e,t){let n=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(n)}},yN=class{constructor(e,t){this.model=e,this.indentationLineProcessor=new Yse(e,t)}getProcessedTokenContextAroundRange(e){let t=this._getProcessedTokensBeforeRange(e),n=this._getProcessedTokensAfterRange(e),o=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:n,previousLineProcessedTokens:o}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);let t=this.model.tokenization.getLineTokens(e.startLineNumber),n=Ey(t,e.startColumn-1),o;if(Kse(this.model,e.getStartPosition())){let s=e.startColumn-1-n.firstCharOffset,a=n.firstCharOffset,l=a+s;o=t.sliceAndInflate(a,l,0)}else{let s=e.startColumn-1;o=t.sliceAndInflate(0,s,0)}return this.indentationLineProcessor.getProcessedTokens(o)}_getProcessedTokensAfterRange(e){let t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);let n=this.model.tokenization.getLineTokens(t.lineNumber),o=Ey(n,t.column-1),r=t.column-1-o.firstCharOffset,s=o.firstCharOffset+r,a=o.firstCharOffset+o.getLineLength(),l=n.sliceAndInflate(s,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){let t=f=>{this.model.tokenization.forceTokenization(f);let p=this.model.tokenization.getLineTokens(f),g=this.model.getLineMaxColumn(f)-1;return Ey(p,g)};this.model.tokenization.forceTokenization(e.startLineNumber);let n=this.model.tokenization.getLineTokens(e.startLineNumber),o=Ey(n,e.startColumn-1),r=Nr.createEmpty("",o.languageIdCodec),s=e.startLineNumber-1;if(s===0||!(o.firstCharOffset===0))return r;let c=t(s);if(!(o.languageId===c.languageId))return r;let d=c.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(d)}},Yse=class{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){let n=(s,a)=>{let l=wn(s);return a+s.substring(l.length)};this.model.tokenization.forceTokenization?.(e);let o=this.model.tokenization.getLineTokens(e),r=this.getProcessedTokens(o).getLineContent();return t!==void 0&&(r=n(r,t)),r}getProcessedTokens(e){let t=l=>l===2||l===3||l===1,n=e.getLanguageId(0),r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew.getBracketRegExp({global:!0}),s=[];return e.forEach(l=>{let c=e.getStandardTokenType(l),u=e.getTokenText(l);t(c)&&(u=u.replace(r,""));let d=e.getMetadata(l);s.push({text:u,metadata:d})}),Nr.createFromTextAndMetadata(s,e.languageIdCodec)}}});function gC(i,e,t,n){e.tokenization.forceTokenization(t.startLineNumber);let o=e.getLanguageIdAtPosition(t.startLineNumber,t.startColumn),r=n.getLanguageConfiguration(o);if(!r)return null;let a=new yN(e,n).getProcessedTokenContextAroundRange(t),l=a.previousLineProcessedTokens.getLineContent(),c=a.beforeRangeProcessedTokens.getLineContent(),u=a.afterRangeProcessedTokens.getLineContent(),d=r.onEnter(i,l,c,u);if(!d)return null;let h=d.indentAction,f=d.appendText,p=d.removeText||0;f?h===Zr.Indent&&(f=" "+f):h===Zr.Indent||h===Zr.IndentOutdent?f=" ":f="";let g=gte(e,t.startLineNumber,t.startColumn);return p&&(g=g.substring(0,g.length-p)),{indentAction:h,appendText:f,removeText:p,indentation:g}}var Xse=D(()=>{sE();Rs();Jse()});function wN(i,e){if(e<=0)return"";uRe[i]||(uRe[i]=["",i]);let t=uRe[i];for(let n=t.length;n<=e;n++)t[n]=t[n-1]+i;return t[e]}var sui,aui,Zse,uRe,Nd,vB=D(()=>{Rt();Zb();Ue();Qn();Xse();Rs();sui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},aui=function(i,e){return function(t,n){e(t,n,i)}},uRe=Object.create(null);Nd=Zse=class{static unshiftIndent(e,t,n,o,r){let s=or.visibleColumnFromColumn(e,t,n);if(r){let a=wN(" ",o),c=or.prevIndentTabStop(s,o)/o;return wN(a,c)}else{let c=or.prevRenderTabStop(s,n)/n;return wN(" ",c)}}static shiftIndent(e,t,n,o,r){let s=or.visibleColumnFromColumn(e,t,n);if(r){let a=wN(" ",o),c=or.nextIndentTabStop(s,o)/o;return wN(a,c)}else{let c=or.nextRenderTabStop(s,n)/n;return wN(" ",c)}}constructor(e,t,n){this._languageConfigurationService=n,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){let n=this._selection.startLineNumber,o=this._selection.endLineNumber;this._selection.endColumn===1&&n!==o&&(o=o-1);let{tabSize:r,indentSize:s,insertSpaces:a}=this._opts,l=n===o;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,u=0;for(let d=n;d<=o;d++,c=u){u=0;let h=e.getLineContent(d),f=Hr(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),d>1&&or.visibleColumnFromColumn(h,f+1,r)%s!==0&&e.tokenization.isCheapToTokenize(d-1)){let A=gC(this._opts.autoIndent,e,new R(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(A){if(u=c,A.appendText)for(let v=0,w=A.appendText.length;v{Ue();Qn();$se=class{constructor(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}getEditOperations(e,t){t.addTrackedEditOperation(new R(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new R(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let n=t.getInverseEditOperations(),o=n[0].range,r=n[1].range;return new qe(o.endLineNumber,o.endColumn,r.endLineNumber,r.endColumn-this._charAfterSelection.length)}},eae=class{constructor(e,t,n){this._position=e,this._text=t,this._charAfter=n}getEditOperations(e,t){t.addTrackedEditOperation(new R(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return new qe(o.endLineNumber,o.startColumn,o.endLineNumber,o.endColumn-this._charAfter.length)}}});function lui(i,e,t){let n=i.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let o,r=-1;for(o=e-1;o>=1;o--){if(i.tokenization.getLanguageIdAtPosition(o,0)!==n)return r;let s=i.getLineContent(o);if(t.shouldIgnore(o)||/^\s+$/.test(s)||s===""){r=o;continue}return o}}return-1}function yB(i,e,t,n=!0,o){if(i<4)return null;let r=o.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!r)return null;let s=new vN(e,r,o);if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};let a=lui(e,t,s);if(a<0)return null;if(a<1)return{indentation:"",action:null};if(s.shouldIncrease(a)||s.shouldIndentNextLine(a)){let l=e.getLineContent(a);return{indentation:wn(l),action:Zr.Indent,line:a}}else if(s.shouldDecrease(a)){let l=e.getLineContent(a);return{indentation:wn(l),action:null,line:a}}else{if(a===1)return{indentation:wn(e.getLineContent(a)),action:null,line:a};let l=a-1,c=r.getIndentMetadata(e.getLineContent(l));if(!(c&3)&&c&4){let u=0;for(let d=l-1;d>0;d--)if(!s.shouldIndentNextLine(d)){u=d;break}return{indentation:wn(e.getLineContent(u+1)),action:null,line:u+1}}if(n)return{indentation:wn(e.getLineContent(a)),action:null,line:a};for(let u=a;u>0;u--){if(s.shouldIncrease(u))return{indentation:wn(e.getLineContent(u)),action:Zr.Indent,line:u};if(s.shouldIndentNextLine(u)){let d=0;for(let h=u-1;h>0;h--)if(!s.shouldIndentNextLine(u)){d=h;break}return{indentation:wn(e.getLineContent(d+1)),action:null,line:d+1}}else if(s.shouldDecrease(u))return{indentation:wn(e.getLineContent(u)),action:null,line:u}}return{indentation:wn(e.getLineContent(1)),action:null,line:1}}}function xN(i,e,t,n,o,r){if(i<4)return null;let s=r.getLanguageConfiguration(t);if(!s)return null;let a=r.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;let l=new vN(e,a,r),c=yB(i,e,n,void 0,r);if(c){let u=c.line;if(u!==void 0){let d=!0;for(let h=u;h0){let v=e.getLineContent(A);if(c.shouldIndentNextLine(v)&&c.shouldIncrease(g)){let C=yB(s,e,t.startLineNumber,!1,r)?.indentation;if(C!==void 0){let _=e.getLineContent(t.startLineNumber),E=wn(_),T=o.shiftIndent(C)===E,N=/^\s*$/.test(p),L=i.autoClosingPairs.autoClosingPairsOpenByEnd.get(n),z=L&&L.length>0&&N;if(T&&z)return C}}}return null}function tae(i,e,t){let n=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!n||e<1||e>i.getLineCount()?null:n.getIndentMetadata(i.getLineContent(e))}function cui(i,e,t){return{tokenization:{getLineTokens:o=>o===e?t:i.tokenization.getLineTokens(o),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(o,r)=>i.getLanguageIdAtPosition(o,r)},getLineContent:o=>o===e?t.getLineContent():i.getLineContent(o)}}var iae=D(()=>{Rt();sE();Jse()});function pRe(i,e){return i===" "?e===5||e===6?6:5:4}function pae(i,e){return Fmt(i)&&!Fmt(e)?!0:i===5?!1:Rmt(i)!==Rmt(e)}function Rmt(i){return i===6||i===5?"space":i}function Fmt(i){return i===4||i===5||i===6}function Omt(i,e,t,n,o){if(i.autoClosingOvertype==="never"||!i.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=t.length;r2?c.charCodeAt(l.column-2):0)===92&&d)return!1;if(i.autoClosingOvertype==="auto"){let f=!1;for(let p=0,g=n.length;p{Tt();Rt();bN();vB();dRe();Sm();IO();Ue();kt();sE();Rs();DO();iae();Xse();nae=class{static getEdits(e,t,n,o,r){if(!r&&this._isAutoIndentType(e,t,n)){let s=[];for(let l of n){let c=this._findActualIndentationForSelection(e,t,l,o);if(c===null)return;s.push({selection:l,indentation:c})}let a=wB.getAutoClosingPairClose(e,t,n,o,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,s,o,a)}}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let o=0,r=n.length;omRe(e,a),unshiftIndent:a=>fae(e,a)},e.languageConfigurationService);if(r===null)return null;let s=gte(t,n.startLineNumber,n.startColumn);return r===e.normalizeIndentation(s)?null:r}static _getIndentationAndAutoClosingPairEdits(e,t,n,o,r){let s=n.map(({selection:l,indentation:c})=>{if(r!==null){let u=this._getEditFromIndentationAndSelection(e,t,c,l,o,!1);return new fRe(u,l,o,r)}else{let u=this._getEditFromIndentationAndSelection(e,t,c,l,o,!0);return CN(u.range,u.text,!1)}}),a={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new sc(4,s,a)}static _getEditFromIndentationAndSelection(e,t,n,o,r,s=!0){let a=o.startLineNumber,l=t.getLineFirstNonWhitespaceColumn(a),c=e.normalizeIndentation(n);if(l!==0){let d=t.getLineContent(a);c+=d.substring(l-1,o.startColumn-1)}return c+=s?r:"",{range:new R(a,1,o.endLineNumber,o.endColumn),text:c}}},oae=class{static getEdits(e,t,n,o,r,s){if(Omt(t,n,o,r,s))return this._runAutoClosingOvertype(e,o,s)}static _runAutoClosingOvertype(e,t,n){let o=[];for(let r=0,s=t.length;rnew Bs(new R(a.positionLineNumber,a.positionColumn,a.positionLineNumber,a.positionColumn+1),"",!1));return new sc(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}},wB=class{static getEdits(e,t,n,o,r,s){if(!s){let a=this.getAutoClosingPairClose(e,t,n,o,r);if(a!==null)return this._runAutoClosingOpenCharType(n,o,r,a)}}static _runAutoClosingOpenCharType(e,t,n,o){let r=[];for(let s=0,a=e.length;s{let g=p.getPosition();return r?{lineNumber:g.lineNumber,beforeColumn:g.column-o.length,afterColumn:g.column}:{lineNumber:g.lineNumber,beforeColumn:g.column,afterColumn:g.column}}),a=this._findAutoClosingPairOpen(e,t,s.map(p=>new J(p.lineNumber,p.beforeColumn)),o);if(!a)return null;let l,c;if(JA(o)?(l=e.autoClosingQuotes,c=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,c=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,c=e.shouldAutoCloseBefore.bracket),l==="never")return null;let d=this._findContainedAutoClosingPair(e,a),h=d?d.close:"",f=!0;for(let p of s){let{lineNumber:g,beforeColumn:A,afterColumn:v}=p,w=t.getLineContent(g),C=w.substring(0,A-1),_=w.substring(v-1);if(_.startsWith(h)||(f=!1),_.length>0){let N=_.charAt(0);if(!this._isBeforeClosingBrace(e,_)&&!c(N))return null}if(a.open.length===1&&(o==="'"||o==='"')&&l!=="always"){let N=Cd(e.wordSeparators,[]);if(C.length>0){let L=C.charCodeAt(C.length-1);if(N.get(L)===0)return null}}if(!t.tokenization.isCheapToTokenize(g))return null;t.tokenization.forceTokenization(g);let E=t.tokenization.getLineTokens(g),I=Ey(E,A-1);if(!a.shouldAutoClose(I,A-I.firstCharOffset))return null;let T=a.findNeutralCharacter();if(T){let N=t.tokenization.getTokenTypeIfInsertingCharacter(g,A,T);if(!a.isOK(N))return null}}return f?a.close.substring(0,a.close.length-h.length):a.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let n=t.close.charAt(t.close.length-1),o=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[],r=null;for(let s of o)s.open!==t.open&&t.open.includes(s.open)&&t.close.endsWith(s.close)&&(!r||s.open.length>r.open.length)&&(r=s);return r}static _findAutoClosingPairOpen(e,t,n,o){let r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(o);if(!r)return null;let s=null;for(let a of r)if(s===null||a.open.length>s.open.length){let l=!0;for(let c of n)if(t.getValueInRange(new R(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+o!==a.open){l=!1;break}l&&(s=a)}return s}static _isBeforeClosingBrace(e,t){let n=t.charAt(0),o=e.autoClosingPairs.autoClosingPairsOpenByStart.get(n)||[],r=e.autoClosingPairs.autoClosingPairsCloseByStart.get(n)||[],s=o.some(l=>t.startsWith(l.open)),a=r.some(l=>t.startsWith(l.close));return!s&&a}},sae=class{static getEdits(e,t,n,o,r){if(!r&&this._isSurroundSelectionType(e,t,n,o))return this._runSurroundSelectionType(e,n,o)}static _runSurroundSelectionType(e,t,n){let o=[];for(let r=0,s=t.length;r=4){let l=Sbt(e.autoIndent,t,r,{unshiftIndent:c=>Qoe(e,c),shiftIndent:c=>GMe(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,r.getEndPosition()),u=r.endColumn,d=t.getLineContent(r.endLineNumber),h=Vo(d);if(h>=0?r=r.setEndPosition(r.endLineNumber,Math.max(r.endColumn,h+1)):r=r.setEndPosition(r.endLineNumber,t.getLineMaxColumn(r.endLineNumber)),n)return new FL(r,` -`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return u<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new OL(r,` -`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return UL(r,` -`+e.normalizeIndentation(a),n)}static lineInsertBefore(e,t,n){if(t===null||n===null)return[];let r=[];for(let o=0,s=n.length;othis._compositionType(n,u,o,s,a,l));return new ic(4,c,{shouldPushStackElementBefore:Goe(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,r,o,s){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-r),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+o),u=new N(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(u)===n&&s===0?null:new OL(u,n,0,s)}},Uoe=class{static getEdits(e,t,n){let r=[];for(let s=0,a=t.length;s1){let a;for(a=n-1;a>=1;a--){let u=t.getLineContent(a);if(qc(u)>=0)break}if(a<1)return null;let l=t.getLineMaxColumn(a),c=Qx(e.autoIndent,t,new N(a,l,a,l),e.languageConfigurationService);c&&(o=c.indentation+c.appendText)}return r&&(r===$o.Indent&&(o=GMe(e,o)),r===$o.Outdent&&(o=Qoe(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,n,r){let o="",s=n.getStartPosition();if(e.insertSpaces){let a=e.visibleColumnFromColumn(t,s),l=e.indentSize,c=l-a%l;for(let u=0;u{DP();WMe();lm();lH();Lg=class{static indent(e,t,n){if(t===null||n===null)return[];let r=[];for(let o=0,s=n.length;o{Oe();Wt();(function(i){i.editorSimpleInput=new Pe("editorSimpleInput",!1,!0),i.editorTextFocus=new Pe("editorTextFocus",!1,y("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),i.focus=new Pe("editorFocus",!1,y("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),i.textInputFocus=new Pe("textInputFocus",!1,y("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),i.readOnly=new Pe("editorReadonly",!1,y("editorReadonly","Whether the editor is read-only")),i.inDiffEditor=new Pe("inDiffEditor",!1,y("inDiffEditor","Whether the context is a diff editor")),i.isEmbeddedDiffEditor=new Pe("isEmbeddedDiffEditor",!1,y("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),i.inMultiDiffEditor=new Pe("inMultiDiffEditor",!1,y("inMultiDiffEditor","Whether the context is a multi diff editor")),i.multiDiffEditorAllCollapsed=new Pe("multiDiffEditorAllCollapsed",void 0,y("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),i.hasChanges=new Pe("diffEditorHasChanges",!1,y("diffEditorHasChanges","Whether the diff editor has changes")),i.comparingMovedCode=new Pe("comparingMovedCode",!1,y("comparingMovedCode","Whether a moved code block is selected for comparison")),i.accessibleDiffViewerVisible=new Pe("accessibleDiffViewerVisible",!1,y("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),i.diffEditorRenderSideBySideInlineBreakpointReached=new Pe("diffEditorRenderSideBySideInlineBreakpointReached",!1,y("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),i.diffEditorInlineMode=new Pe("diffEditorInlineMode",!1,y("diffEditorInlineMode","Whether inline mode is active")),i.diffEditorOriginalWritable=new Pe("diffEditorOriginalWritable",!1,y("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),i.diffEditorModifiedWritable=new Pe("diffEditorModifiedWritable",!1,y("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),i.diffEditorOriginalUri=new Pe("diffEditorOriginalUri","",y("diffEditorOriginalUri","The uri of the original document")),i.diffEditorModifiedUri=new Pe("diffEditorModifiedUri","",y("diffEditorModifiedUri","The uri of the modified document")),i.columnSelection=new Pe("editorColumnSelection",!1,y("editorColumnSelection","Whether `editor.columnSelection` is enabled")),i.writable=i.readOnly.toNegated(),i.hasNonEmptySelection=new Pe("editorHasSelection",!1,y("editorHasSelection","Whether the editor has text selected")),i.hasOnlyEmptySelection=i.hasNonEmptySelection.toNegated(),i.hasMultipleSelections=new Pe("editorHasMultipleSelections",!1,y("editorHasMultipleSelections","Whether the editor has multiple selections")),i.hasSingleSelection=i.hasMultipleSelections.toNegated(),i.tabMovesFocus=new Pe("editorTabMovesFocus",!1,y("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),i.tabDoesNotMoveFocus=i.tabMovesFocus.toNegated(),i.isInEmbeddedEditor=new Pe("isInEmbeddedEditor",!1,!0),i.canUndo=new Pe("canUndo",!1,!0),i.canRedo=new Pe("canRedo",!1,!0),i.hoverVisible=new Pe("editorHoverVisible",!1,y("editorHoverVisible","Whether the editor hover is visible")),i.hoverFocused=new Pe("editorHoverFocused",!1,y("editorHoverFocused","Whether the editor hover is focused")),i.stickyScrollFocused=new Pe("stickyScrollFocused",!1,y("stickyScrollFocused","Whether the sticky scroll is focused")),i.stickyScrollVisible=new Pe("stickyScrollVisible",!1,y("stickyScrollVisible","Whether the sticky scroll is visible")),i.standaloneColorPickerVisible=new Pe("standaloneColorPickerVisible",!1,y("standaloneColorPickerVisible","Whether the standalone color picker is visible")),i.standaloneColorPickerFocused=new Pe("standaloneColorPickerFocused",!1,y("standaloneColorPickerFocused","Whether the standalone color picker is focused")),i.inCompositeEditor=new Pe("inCompositeEditor",void 0,y("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),i.notInCompositeEditor=i.inCompositeEditor.toNegated(),i.languageId=new Pe("editorLangId","",y("editorLangId","The language identifier of the editor")),i.hasCompletionItemProvider=new Pe("editorHasCompletionItemProvider",!1,y("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),i.hasCodeActionsProvider=new Pe("editorHasCodeActionsProvider",!1,y("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),i.hasCodeLensProvider=new Pe("editorHasCodeLensProvider",!1,y("editorHasCodeLensProvider","Whether the editor has a code lens provider")),i.hasDefinitionProvider=new Pe("editorHasDefinitionProvider",!1,y("editorHasDefinitionProvider","Whether the editor has a definition provider")),i.hasDeclarationProvider=new Pe("editorHasDeclarationProvider",!1,y("editorHasDeclarationProvider","Whether the editor has a declaration provider")),i.hasImplementationProvider=new Pe("editorHasImplementationProvider",!1,y("editorHasImplementationProvider","Whether the editor has an implementation provider")),i.hasTypeDefinitionProvider=new Pe("editorHasTypeDefinitionProvider",!1,y("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),i.hasHoverProvider=new Pe("editorHasHoverProvider",!1,y("editorHasHoverProvider","Whether the editor has a hover provider")),i.hasDocumentHighlightProvider=new Pe("editorHasDocumentHighlightProvider",!1,y("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),i.hasDocumentSymbolProvider=new Pe("editorHasDocumentSymbolProvider",!1,y("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),i.hasReferenceProvider=new Pe("editorHasReferenceProvider",!1,y("editorHasReferenceProvider","Whether the editor has a reference provider")),i.hasRenameProvider=new Pe("editorHasRenameProvider",!1,y("editorHasRenameProvider","Whether the editor has a rename provider")),i.hasSignatureHelpProvider=new Pe("editorHasSignatureHelpProvider",!1,y("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),i.hasInlayHintsProvider=new Pe("editorHasInlayHintsProvider",!1,y("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),i.hasDocumentFormattingProvider=new Pe("editorHasDocumentFormattingProvider",!1,y("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),i.hasDocumentSelectionFormattingProvider=new Pe("editorHasDocumentSelectionFormattingProvider",!1,y("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),i.hasMultipleDocumentFormattingProvider=new Pe("editorHasMultipleDocumentFormattingProvider",!1,y("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),i.hasMultipleDocumentSelectionFormattingProvider=new Pe("editorHasMultipleDocumentSelectionFormattingProvider",!1,y("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(V||(V={}))});function NP(i,e){La.registerKeybindingRule({id:i,primary:e,when:gAi,weight:Mn+1})}function Ibt(i){return i.register(),i}function jL(i,e){Ibt(new Koe("default:"+i,i)),Ibt(new Koe(i,i,e))}var Mn,ns,su,LP,cH,kl,gAi,PE,Koe,uH=D(()=>{Oe();Ph();gn();Yl();ii();fs();_bt();lm();Coe();Soe();Yoe();Nt();We();vn();Wt();nx();Ye();lH();Mn=0,ns=class extends Sr{runEditorCommand(e,t,n){let r=t._getViewModel();r&&this.runCoreEditorCommand(r,n||{})}};(function(i){let e=function(n){if(!Fo(n))return!1;let r=n;return!(!Ea(r.to)||!Ga(r.by)&&!Ea(r.by)||!Ga(r.value)&&!Tp(r.value)||!Ga(r.revealCursor)&&!AY(r.revealCursor))};i.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},i.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},i.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function t(n){let r;switch(n.to){case i.RawDirection.Up:r=1;break;case i.RawDirection.Right:r=2;break;case i.RawDirection.Down:r=3;break;case i.RawDirection.Left:r=4;break;default:return null}let o;switch(n.by){case i.RawUnit.Line:o=1;break;case i.RawUnit.WrappedLine:o=2;break;case i.RawUnit.Page:o=3;break;case i.RawUnit.HalfPage:o=4;break;case i.RawUnit.Editor:o=5;break;case i.RawUnit.Column:o=6;break;default:o=2}let s=Math.floor(n.value||1),a=!!n.revealCursor;return{direction:r,unit:o,value:s,revealCursor:a,select:!!n.select}}i.parse=t})(su||(su={}));(function(i){let e=function(t){if(!Fo(t))return!1;let n=t;return!(!Tp(n.lineNumber)&&!Ea(n.lineNumber)||!Ga(n.at)&&!Ea(n.at))};i.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},i.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(LP||(LP={}));cH=class{constructor(e){e.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(ai).getFocusedCodeEditor();return r&&r.hasTextFocus()?this._runEditorCommand(t,r,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{let r=hs();return r&&["input","textarea"].indexOf(r.tagName.toLowerCase())>=0?(this.runDOMCommand(r),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{let r=t.get(ai).getActiveCodeEditor();return r?(r.focus(),this._runEditorCommand(t,r,n)):!1})}_runEditorCommand(e,t,n){let r=this.runEditorCommand(e,t,n);return r||!0}};(function(i){class e extends ns{constructor(w){super(w),this._inSelectionMode=w.inSelectionMode}runCoreEditorCommand(w,C){if(!C.position)return;w.model.pushStackElement(),w.setCursorStates(C.source,3,[ma.moveTo(w,w.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)])&&C.revealType!==2&&w.revealAllCursors(C.source,!0,!0)}}i.MoveTo=Qe(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),i.MoveToSelect=Qe(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends ns{runCoreEditorCommand(w,C){w.model.pushStackElement();let _=this._getColumnSelectResult(w,w.getPrimaryCursorState(),w.getCursorColumnSelectData(),C);_!==null&&(w.setCursorStates(C.source,3,_.viewStates.map(E=>Qi.fromViewState(E))),w.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:_.fromLineNumber,fromViewVisualColumn:_.fromVisualColumn,toViewLineNumber:_.toLineNumber,toViewVisualColumn:_.toVisualColumn}),_.reversed?w.revealTopMostCursor(C.source):w.revealBottomMostCursor(C.source))}}i.ColumnSelect=Qe(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(A,w,C,_){if(typeof _.position>"u"||typeof _.viewPosition>"u"||typeof _.mouseColumn>"u")return null;let E=A.model.validatePosition(_.position),I=A.coordinatesConverter.validateViewPosition(new K(_.viewPosition.lineNumber,_.viewPosition.column),E),T=_.doColumnSelect?C.fromViewLineNumber:I.lineNumber,L=_.doColumnSelect?C.fromViewVisualColumn:_.mouseColumn-1;return FE.columnSelect(A.cursorConfig,A,T,L,I.lineNumber,_.mouseColumn-1)}}),i.CursorColumnSelectLeft=Qe(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(A,w,C,_){return FE.columnSelectLeft(A.cursorConfig,A,C)}}),i.CursorColumnSelectRight=Qe(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(A,w,C,_){return FE.columnSelectRight(A.cursorConfig,A,C)}});class n extends t{constructor(w){super(w),this._isPaged=w.isPaged}_getColumnSelectResult(w,C,_,E){return FE.columnSelectUp(w.cursorConfig,w,_,this._isPaged)}}i.CursorColumnSelectUp=Qe(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:3600,linux:{primary:0}}})),i.CursorColumnSelectPageUp=Qe(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:3595,linux:{primary:0}}}));class r extends t{constructor(w){super(w),this._isPaged=w.isPaged}_getColumnSelectResult(w,C,_,E){return FE.columnSelectDown(w.cursorConfig,w,_,this._isPaged)}}i.CursorColumnSelectDown=Qe(new r({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:3602,linux:{primary:0}}})),i.CursorColumnSelectPageDown=Qe(new r({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:3596,linux:{primary:0}}}));class o extends ns{constructor(){super({id:"cursorMove",precondition:void 0,metadata:aH.metadata})}runCoreEditorCommand(w,C){let _=aH.parse(C);_&&this._runCursorMove(w,C.source,_)}_runCursorMove(w,C,_){w.model.pushStackElement(),w.setCursorStates(C,3,o._move(w,w.getCursorStates(),_)),w.revealAllCursors(C,!0)}static _move(w,C,_){let E=_.select,I=_.value;switch(_.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return ma.simpleMove(w,C,_.direction,E,I,_.unit);case 11:case 13:case 12:case 14:return ma.viewportMove(w,C,_.direction,E,I);default:return null}}}i.CursorMoveImpl=o,i.CursorMove=Qe(new o);class s extends ns{constructor(w){super(w),this._staticArgs=w.args}runCoreEditorCommand(w,C){let _=this._staticArgs;this._staticArgs.value===-1&&(_={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:C.pageSize||w.cursorConfig.pageSize}),w.model.pushStackElement(),w.setCursorStates(C.source,3,ma.simpleMove(w,w.getCursorStates(),_.direction,_.select,_.value,_.unit)),w.revealAllCursors(C.source,!0)}}i.CursorLeft=Qe(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),i.CursorLeftSelect=Qe(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1039}})),i.CursorRight=Qe(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),i.CursorRightSelect=Qe(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1041}})),i.CursorUp=Qe(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),i.CursorUpSelect=Qe(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),i.CursorPageUp=Qe(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:11}})),i.CursorPageUpSelect=Qe(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1035}})),i.CursorDown=Qe(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),i.CursorDownSelect=Qe(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),i.CursorPageDown=Qe(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:12}})),i.CursorPageDownSelect=Qe(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1036}})),i.CreateCursor=Qe(new class extends ns{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(A,w){if(!w.position)return;let C;w.wholeLine?C=ma.line(A,A.getPrimaryCursorState(),!1,w.position,w.viewPosition):C=ma.moveTo(A,A.getPrimaryCursorState(),!1,w.position,w.viewPosition);let _=A.getCursorStates();if(_.length>1){let E=C.modelState?C.modelState.position:null,I=C.viewState?C.viewState.position:null;for(let T=0,L=_.length;TI&&(E=I);let T=new N(E,1,E,A.model.getLineMaxColumn(E)),L=0;if(C.at)switch(C.at){case LP.RawAtArgument.Top:L=3;break;case LP.RawAtArgument.Center:L=1;break;case LP.RawAtArgument.Bottom:L=4;break;default:break}let M=A.coordinatesConverter.convertModelRangeToViewRange(T);A.revealRange(w.source,!1,M,L,0)}}),i.SelectAll=new class extends cH{constructor(){super($lt)}runDOMCommand(A){ml&&(A.focus(),A.select()),A.ownerDocument.execCommand("selectAll")}runEditorCommand(A,w,C){let _=w._getViewModel();_&&this.runCoreEditorCommand(_,C)}runCoreEditorCommand(A,w){A.model.pushStackElement(),A.setCursorStates("keyboard",3,[ma.selectAll(A,A.getPrimaryCursorState())])}},i.SetSelection=Qe(new class extends ns{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(A,w){w.selection&&(A.model.pushStackElement(),A.setCursorStates(w.source,3,[Qi.fromModelSelection(w.selection)]))}})})(kl||(kl={}));gAi=me.and(V.textInputFocus,V.columnSelection);NP(kl.CursorColumnSelectLeft.id,1039);NP(kl.CursorColumnSelectRight.id,1041);NP(kl.CursorColumnSelectUp.id,1040);NP(kl.CursorColumnSelectPageUp.id,1035);NP(kl.CursorColumnSelectDown.id,1042);NP(kl.CursorColumnSelectPageDown.id,1036);(function(i){class e extends Sr{runEditorCommand(n,r,o){let s=r._getViewModel();s&&this.runCoreEditingCommand(r,s,o||{})}}i.CoreEditingCommand=e,i.LineBreakInsert=Qe(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:V.writable,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,r){t.pushUndoStop(),t.executeCommands(this.id,Gx.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection)))}}),i.Outdent=Qe(new class extends e{constructor(){super({id:"outdent",precondition:V.writable,kbOpts:{weight:Mn,kbExpr:me.and(V.editorTextFocus,V.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,r){t.pushUndoStop(),t.executeCommands(this.id,Lg.outdent(n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection))),t.pushUndoStop()}}),i.Tab=Qe(new class extends e{constructor(){super({id:"tab",precondition:V.writable,kbOpts:{weight:Mn,kbExpr:me.and(V.editorTextFocus,V.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,r){t.pushUndoStop(),t.executeCommands(this.id,Lg.tab(n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection))),t.pushUndoStop()}}),i.DeleteLeft=Qe(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,r){let[o,s]=jx.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection),n.getCursorAutoClosedCharacters());o&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(2)}}),i.DeleteRight=Qe(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Mn,kbExpr:V.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,r){let[o,s]=jx.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection));o&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(3)}}),i.Undo=new class extends cH{constructor(){super(NDe)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,n,r){if(!(!n.hasModel()||n.getOption(92)===!0))return n.getModel().undo()}},i.Redo=new class extends cH{constructor(){super(MDe)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,n,r){if(!(!n.hasModel()||n.getOption(92)===!0))return n.getModel().redo()}}})(PE||(PE={}));Koe=class extends _I{constructor(e,t,n){super({id:e,precondition:void 0,metadata:n}),this._handlerId=t}runCommand(e,t){let n=e.get(ai).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}};jL("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});jL("replacePreviousChar");jL("compositionType");jL("compositionStart");jL("compositionEnd");jL("paste");jL("cut")});var Joe,Lbt=D(()=>{uH();Nt();Si();Joe=class{constructor(e,t,n,r){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=r}paste(e,t,n,r){this.commandDelegate.paste(e,t,n,r)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,r){this.commandDelegate.compositionType(e,t,n,r)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){kl.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):r?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){kl.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){kl.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,n){e=this._validateViewColumn(e),kl.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),kl.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){kl.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){kl.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){kl.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){kl.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){kl.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){kl.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){kl.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){kl.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){kl.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}});var dH,MP,YMe,Xoe=D(()=>{Za();ay();Lt();$w();dH=class{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new vi("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;let n=this.getStartLineNumber(),r=this.getEndLineNumber();if(tr)return null;let o=0,s=0;for(let l=n;l<=r;l++){let c=l-this._rendLineNumberStart;e<=l&&l<=t&&(s===0?(o=c,s=1):s++)}if(e=r&&a<=o&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)return null;let n=t-e+1,r=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=r)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);let s=[];for(let d=0;dn)continue;let l=Math.max(t,a.fromLineNumber),c=Math.min(n,a.toLineNumber);for(let u=l;u<=c;u++){let d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),r=!0}}return r}},MP=class{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new dH(this._lineFactory)}_createDomNode(){let e=xi(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,r=t.length;ne})}constructor(e,t,n){this._domNode=e,this._lineFactory=t,this._viewportData=n}render(e,t,n,r){let o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1t){let s=t,a=Math.min(n,o.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(o,s,a,r,t),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,s),o.linesLength-=s)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){let s=Math.max(0,n-o.rendLineNumberStart+1),l=o.linesLength-1-s+1;l>0&&(this._removeLinesAfter(o,l),o.linesLength-=l)}return this._finishRendering(o,!1,r),o}_renderUntouchedLines(e,t,n,r,o){let s=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=n;l++){let c=s+l;a[l].layoutLine(c,r[c-o],this._viewportData.lineHeight)}}_insertLinesBefore(e,t,n,r,o){let s=[],a=0;for(let l=t;l<=n;l++)s[a++]=this._lineFactory.createLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;a--){let l=e.lines[a];r[a]&&(l.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,n){let r=document.createElement("div");i._ttPolicy&&(t=i._ttPolicy.createHTML(t)),r.innerHTML=t;for(let o=0;o{Za();qp();Xoe();ld();Zoe=class extends Wo{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new MP({createLine:()=>new KMe(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;let n=this._context.configuration.options.get(50);mo(this.domNode,n),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;en.shouldRender());for(let n=0,r=t.length;n'),o.appendString(s),o.appendString(""),!0)}layoutLine(e,t,n){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(n))}},$oe=class extends Zoe{constructor(e){super(e);let n=this._context.configuration.options.get(146);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let n=this._context.configuration.options.get(146);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}},ese=class extends Zoe{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(146);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),mo(this.domNode,t.get(50))}onConfigurationChanged(e){let t=this._context.configuration.options;mo(this.domNode,t.get(50));let n=t.get(146);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}});var RP,JMe=D(()=>{Nt();RP=class i{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return i.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let n={...e};return n.position&&(n.position=t.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=t.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,t)),n}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new K(e.afterLineNumber,1)).lineNumber}}}});var Mbt=D(()=>{});var tse,Rbt=D(()=>{Za();Mbt();ld();tse=class extends Wo{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=xi(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,n=this._context.configuration.options.get(146),r=n.contentWidth-n.verticalScrollbarWidth;this.contentWidth!==r&&(this.contentWidth=r,e=!0);let o=n.contentLeft;return this.contentLeft!==o&&(this.contentLeft=o,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0,n=e.getDecorationsInViewport();for(let r of n){if(!r.options.blockClassName)continue;let o=this.blocks[t];o||(o=this.blocks[t]=xi(document.createElement("div")),this.domNode.appendChild(o));let s,a;r.options.blockIsAfterEnd?(s=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!1),a=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0)):(s=e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!0),a=r.range.isEmpty()&&!r.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0));let[l,c,u,d]=r.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+r.options.blockClassName),o.setLeft(this.contentLeft-d),o.setWidth(this.contentWidth+d+c),o.setTop(s-e.scrollTop-l),o.setHeight(a-s+l+u),t++}for(let r=t;r{Ye();Za();ld();ise=class extends Wo{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=xi(document.createElement("div")),vc.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=xi(document.createElement("div")),vc.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){let e=Object.keys(this._widgets);for(let t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){let t=new ZMe(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n,r,o){this._widgets[e.getId()].setPosition(t,n,r,o),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let n=this._widgets[t];delete this._widgets[t];let r=n.domNode.domNode;r.remove(),r.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].prepareRender(e)}render(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].render(e)}},ZMe=class{constructor(e,t,n){this._primaryAnchor=new QL(null,null),this._secondaryAnchor=new QL(null,null),this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=xi(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;let r=this._context.configuration.options,o=r.get(146);this._fixedOverflowWidgets=r.get(42),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=r.get(67),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(this._lineHeight=t.get(67),e.hasChanged(146)){let n=t.get(146);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,n){this._affinity=e,this._primaryAnchor=r(t,this._context.viewModel,this._affinity),this._secondaryAnchor=r(n,this._context.viewModel,this._affinity);function r(o,s,a){if(!o)return new QL(null,null);let l=s.model.validatePosition(o);if(s.coordinatesConverter.modelPositionIsVisible(l)){let c=s.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new QL(o,c)}return new QL(o,null)}}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,n,r){this._setPosition(r,e,t),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,r){let o=e.top,s=o,a=e.top+e.height,l=r.viewportHeight-a,c=o-n,u=s>=n,d=a,h=l>=n,f=e.left;return f+t>r.scrollLeft+r.viewportWidth&&(f=r.scrollLeft+r.viewportWidth-t),fl){let h=d-(l-r);d-=h,n-=h}if(d=g,w=d+n<=h.height-v;return this._fixedOverflowWidgets?{fitsAbove:A,aboveTop:Math.max(u,g),fitsBelow:w,belowTop:d,left:p}:{fitsAbove:A,aboveTop:o,fitsBelow:w,belowTop:s,left:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new GL(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){let t=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),n=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,r=o(n,this._affinity,this._lineHeight);return{primary:t,secondary:r};function o(s,a,l){if(!s)return null;let c=e.visibleRangeForPosition(s);if(!c)return null;let u=s.column===1&&a===3?0:c.left,d=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.scrollTop;return new nse(d,u,l)}}_reduceAnchorCoordinates(e,t,n){if(!t)return e;let r=this._context.configuration.options.get(50),o=t.left;return oe.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&XMe(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&XMe(this._actual.afterRender,this._actual,this._renderData.position)}},QL=class{constructor(e,t){this.modelPosition=e,this.viewPosition=t}},GL=class{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}},nse=class{constructor(e,t,n){this.top=e,this.left=t,this.height=n,this._anchorCoordinateBrand=void 0}}});var Obt=D(()=>{});var rse,ose,sse,Pbt=D(()=>{Obt();RE();tm();Qt();Zn();Hn();Pb();Nt();rse=class extends af{constructor(e){super(),this._context=e;let t=this._context.configuration.options,n=t.get(146);this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new qe(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let o of this._selections)t.add(o.positionLineNumber);let n=Array.from(t);n.sort((o,s)=>o-s),Zi(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);let r=this._selections.every(o=>o.isEmpty());return this._selectionIsEmpty!==r&&(this._selectionIsEmpty=r,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(146);return this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,r=[];for(let s=t;s<=n;s++){let a=s-t;r[a]=""}if(this._wordWrap){let s=this._renderOne(e,!1);for(let a of this._cursorLineNumbers){let l=this._context.viewModel.coordinatesConverter,c=l.convertViewPositionToModelPosition(new K(a,1)).lineNumber,u=l.convertModelPositionToViewPosition(new K(c,1)).lineNumber,d=l.convertModelPositionToViewPosition(new K(c,this._context.viewModel.model.getLineMaxColumn(c))).lineNumber,h=Math.max(u,t),f=Math.min(d,n);for(let p=h;p<=f;p++){let g=p-t;r[g]=s}}}let o=this._renderOne(e,!0);for(let s of this._cursorLineNumbers){if(sn)continue;let a=s-t;r[a]=o}this._renderData=r}render(e,t){if(!this._renderData)return"";let n=t-e;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},ose=class extends rse{_renderOne(e,t){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}},sse=class extends rse{_renderOne(e,t){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}};ua((i,e)=>{let t=i.getColor(eLe);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||i.defines(tLe)){let n=i.getColor(tLe);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),Bu(i.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}})});var Bbt=D(()=>{});var ase,zbt=D(()=>{Bbt();RE();bF();We();ase=class extends af{constructor(e){super(),this._context=e;let t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),n=[],r=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;let u=l.options.className,d=c.options.className;return ud?1:N.compareRangesUsingStarts(l.range,c.range)});let o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=[];for(let l=o;l<=s;l++){let c=l-o;a[c]=""}this._renderWholeLineDecorations(e,n,a),this._renderNormalDecorations(e,n,a),this._renderResult=a}_renderWholeLineDecorations(e,t,n){let r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let s=0,a=t.length;s',u=Math.max(l.range.startLineNumber,r),d=Math.min(l.range.endLineNumber,o);for(let h=u;h<=d;h++){let f=h-r;n[f]+=c}}}_renderNormalDecorations(e,t,n){let r=e.visibleRange.startLineNumber,o=null,s=!1,a=null,l=!1;for(let c=0,u=t.length;c';a[h]+=A}}}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}});var lse,Vbt=D(()=>{Ye();Za();Ag();ld();Zn();lse=class extends Wo{constructor(e,t,n,r){super(e);let o=this._context.configuration.options,s=o.get(104),a=o.get(75),l=o.get(40),c=o.get(107),u={listenOnDomNode:n.domNode,className:"editor-scrollable "+iz(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new Ay(t.domNode,u,this._context.viewLayout.getScrollable())),vc.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=xi(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();let d=(h,f,p)=>{let g={};if(f){let v=h.scrollTop;v&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+v,h.scrollTop=0)}if(p){let v=h.scrollLeft;v&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+v,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(re(n.domNode,"scroll",h=>d(n.domNode,!0,!0))),this._register(re(t.domNode,"scroll",h=>d(t.domNode,!0,!1))),this._register(re(r.domNode,"scroll",h=>d(r.domNode,!0,!1))),this._register(re(this.scrollbarDomNode.domNode,"scroll",h=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(146);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(73).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){let t=this._context.configuration.options,n=t.get(104),r=t.get(75),o=t.get(40),s=t.get(107),a={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:r,fastScrollSensitivity:o,scrollPredominantAxis:s};this.scrollbar.updateOptions(a)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+iz(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}});var Hbt=D(()=>{});var qL,$Me,eRe,FP,cse,tRe,iRe,nRe,use=D(()=>{Za();Qt();Hbt();RE();ld();Nt();We();tl();qL=class{constructor(e,t,n,r,o){this.startLineNumber=e,this.endLineNumber=t,this.className=n,this.tooltip=r,this._decorationToRenderBrand=void 0,this.zIndex=o??0}},$Me=class{constructor(e,t,n){this.className=e,this.zIndex=t,this.tooltip=n}},eRe=class{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}},FP=class extends af{_render(e,t,n){let r=[];for(let a=e;a<=t;a++){let l=a-e;r[l]=new eRe}if(n.length===0)return r;n.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNamer)continue;let c=Math.max(a,n),u=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new K(c,0)),d=this._context.viewModel.glyphLanes.getLanesAtLine(u.lineNumber).indexOf(o.preference.lane);t.push(new iRe(c,d,o.preference.zIndex,o))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,r)=>n.lineNumber===r.lineNumber?n.laneIndex===r.laneIndex?n.zIndex===r.zIndex?r.type===n.type?n.type===0&&r.type===0?n.className0;){let r=t.peek();if(!r)break;let o=t.takeWhile(a=>a.lineNumber===r.lineNumber&&a.laneIndex===r.laneIndex);if(!o||o.length===0)break;let s=o[0];if(s.type===0){let a=[];for(let l of o){if(l.zIndex!==s.zIndex||l.type!==s.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}n.push(s.accept(a.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(let n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;)this._managedDomNodes.pop()?.domNode.remove();return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{let r=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(r),n.domNode.setLeft(o),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;)this._managedDomNodes.pop()?.domNode.remove()}},tRe=class{constructor(e,t,n,r){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.className=r,this.type=0}accept(e){return new nRe(this.lineNumber,this.laneIndex,e)}},iRe=class{constructor(e,t,n,r){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.widget=r,this.type=1}},nRe=class{constructor(e,t,n){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=n}}});var Wbt=D(()=>{});function OP(i){if(!(i&&i.isTransparent()))return i}var dse,Ubt=D(()=>{Wbt();RE();tm();Zn();Nt();Qt();gn();kLe();sne();dse=class extends af{constructor(e){super(),this._context=e,this._primaryPosition=null;let t=this._context.configuration.options,n=t.get(147),r=t.get(50);this._spaceWidth=r.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*r.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(147),r=t.get(50);return this._spaceWidth=r.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*r.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){let n=e.selections[0].getPosition();return this._primaryPosition?.equals(n)?!1:(this._primaryPosition=n,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,r=e.scrollWidth,o=this._primaryPosition,s=this.getGuidesByLine(t,Math.min(n+1,this._context.viewModel.getLineCount()),o),a=[];for(let l=t;l<=n;l++){let c=l-t,u=s[c],d="",h=e.visibleRangeForPosition(new K(l,1))?.left??0;for(let f of u){let p=f.column===-1?h+(f.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new K(l,f.column)).left;if(p>r||this._maxIndentLeft>0&&p>this._maxIndentLeft)break;let g=f.horizontalLine?f.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",v=f.horizontalLine?(e.visibleRangeForPosition(new K(l,f.horizontalLine.endColumn))?.left??p+this._spaceWidth)-p:this._spaceWidth;d+=`
    `}a[c]=d}this._renderResult=a}getGuidesByLine(e,t,n){let r=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?kx.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?kx.EnabledForActive:kx.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,s=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){let d=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);s=d.startLineNumber,a=d.endLineNumber,l=d.indent}let{indentSize:c}=this._context.viewModel.model.getOptions(),u=[];for(let d=e;d<=t;d++){let h=new Array;u.push(h);let f=r?r[d-e]:[],p=new cd(f),g=o?o[d-e]:0;for(let v=1;v<=g;v++){let A=(v-1)*c+1,w=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&s<=d&&d<=a&&v===l;h.push(...p.takeWhile(_=>_.visibleColumn!0)||[])}return u}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ua((i,e)=>{let t=[{bracketColor:Rie,guideColor:tpt,guideColorActive:apt},{bracketColor:Fie,guideColor:ipt,guideColorActive:lpt},{bracketColor:Oie,guideColor:npt,guideColorActive:cpt},{bracketColor:Pie,guideColor:rpt,guideColorActive:upt},{bracketColor:Bie,guideColor:opt,guideColorActive:dpt},{bracketColor:zie,guideColor:spt,guideColorActive:hpt}],n=new lV,r=[{indentColor:sL,indentColorActive:aL},{indentColor:Oft,indentColorActive:Hft},{indentColor:Pft,indentColorActive:Wft},{indentColor:Bft,indentColorActive:Uft},{indentColor:zft,indentColorActive:jft},{indentColor:Vft,indentColorActive:Qft}],o=t.map(a=>{let l=i.getColor(a.bracketColor),c=i.getColor(a.guideColor),u=i.getColor(a.guideColorActive),d=OP(OP(c)??l?.transparent(.3)),h=OP(OP(u)??l);if(!(!d||!h))return{guideColor:d,guideColorActive:h}}).filter(If),s=r.map(a=>{let l=i.getColor(a.indentColor),c=i.getColor(a.indentColorActive),u=OP(l),d=OP(c);if(!(!u||!d))return{indentColor:u,indentColorActive:d}}).filter(If);if(o.length>0){for(let a=0;a<30;a++){let l=o[a%o.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(s.length>0){for(let a=0;a<30;a++){let l=s[a%s.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})});var jbt=D(()=>{});var PP,Qbt=D(()=>{PP=class{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}});var rRe,oRe,sRe,hse,Gbt=D(()=>{Aoe();Jt();Si();jbt();qp();bF();Xoe();ld();Qbt();l$();Nt();We();rRe=class{constructor(){this._currentVisibleRange=new N(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}},oRe=class{constructor(e,t,n,r,o,s,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=r,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}},sRe=class{constructor(e,t,n,r,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=r,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;lnew dv(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,vc.write(this.domNode,8),this.domNode.setClassName(`view-lines ${Wx}`),mo(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new di(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new di(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new rRe,this._horizontalRevealRequest=null,this._stickyScrollEnabled=r.get(116).enabled,this._maxNumberStickyLines=r.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);let t=this._context.configuration.options,n=t.get(50),r=t.get(147);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=t.get(101),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(116).enabled,this._maxNumberStickyLines=t.get(116).maxLineCount,mo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=this._context.configuration,t=new S7(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;let n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=n;o<=r;o++)this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),r=!1;for(let o=t;o<=n;o++)r=this._visibleLines.getVisibleLine(o).onSelectionChanged()||r;return r}onDecorationsChanged(e){{let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let r=t;r<=n;r++)this._visibleLines.getVisibleLine(r).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new oRe(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new sRe(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let o=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,o),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let n=this._getViewLineDomNode(e);if(n===null)return null;let r=this._getLineNumberFor(n);if(r===-1||r<1||r>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(r)===1)return new K(r,1);let o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(rs)return null;let a=this._visibleLines.getVisibleLine(r).getColumnOfNodeOffset(e,t),l=this._context.viewModel.getLineMinColumn(r);return an)return-1;let r=new PP(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(r);return this._updateLineWidthsSlowIfDomDidLayout(r),o}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let n=e.endLineNumber,r=N.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!r)return null;let o=[],s=0,a=new PP(this.domNode.domNode,this._textRangeRestingSpot),l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new K(r.startLineNumber,1)).lineNumber);let c=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let d=r.startLineNumber;d<=r.endLineNumber;d++){if(du)continue;let h=d===r.startLineNumber?r.startColumn:1,f=d!==r.endLineNumber,p=f?this._context.viewModel.getLineMaxColumn(d):r.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,h,p,a);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;let r=new PP(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,r);return this._updateLineWidthsSlowIfDomDidLayout(r),o}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new KZ(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),r=1,o=!0;for(let s=t;s<=n;s++){let a=this._visibleLines.getVisibleLine(s);if(e&&!a.getWidthIsFast()){o=!1;continue}r=Math.max(r,a.getWidth(null))}return o&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(r),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1,n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=n;o<=r;o++){let s=this._visibleLines.getVisibleLine(o);if(s.needsMonospaceFontCheck()){let a=s.getWidth(null);a>t&&(t=a,e=o)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let o=n;o<=r;o++)this._visibleLines.getVisibleLine(o).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let r=this._computeScrollLeftToReveal(n);r&&(this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:r.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),vo&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=n;o<=r;o++)if(this._visibleLines.getVisibleLine(o).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth0){let A=o[0].startLineNumber,w=o[0].endLineNumber;for(let C=1,_=o.length;C<_;C++){let E=o[C];A=Math.min(A,E.startLineNumber),w=Math.max(w,E.endLineNumber)}u=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(A),h=this._context.viewLayout.getVerticalOffsetForLineNumber(w)+this._lineHeight}else if(r)u=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(r.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(r.endLineNumber)+this._lineHeight;else return-1;let f=(t==="mouse"||n)&&this._cursorSurroundingLinesStyle==="default",p=0,g=0;if(f)n||(p=this._lineHeight);else{let A=l/this._lineHeight,w=Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0),C=Math.min(A/2,w);p=C*this._lineHeight,g=Math.max(0,C-1)*this._lineHeight}n||(s===0||s===4)&&(g+=this._lineHeight),d-=p,h+=g;let v;if(h-d>l){if(!u)return-1;v=d}else if(s===5||s===6)if(s===6&&a<=d&&h<=c)v=a;else{let A=Math.max(5*this._lineHeight,l*.2),w=d-A,C=h-l;v=Math.max(C,w)}else if(s===1||s===2)if(s===2&&a<=d&&h<=c)v=a;else{let A=(d+h)/2;v=Math.max(0,A-l/2)}else v=this._computeMinimumScrolling(a,c,d,h,s===3,s===4);return v}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(146),r=t.left,o=r+t.width-n.verticalScrollbarWidth,s=1073741824,a=0;if(e.type==="range"){let c=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!c)return null;for(let u of c.ranges)s=Math.min(s,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}else for(let c of e.selections){if(c.startLineNumber!==c.endLineNumber)return null;let u=this._visibleRangesForLineRange(c.startLineNumber,c.startColumn,c.endColumn);if(!u)return null;for(let d of u.ranges)s=Math.min(s,Math.round(d.left)),a=Math.max(a,Math.round(d.left+d.width))}return e.minimalReveal||(s=Math.max(0,s-i.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(r,o,s,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,t,n,r,o,s){e=e|0,t=t|0,n=n|0,r=r|0,o=!!o,s=!!s;let a=t-e;if(r-nt)return Math.max(0,r-a)}else return n;return e}}});var qbt=D(()=>{});var fse,Ybt=D(()=>{qbt();use();fse=class extends FP{constructor(e){super(),this._context=e;let n=this._context.configuration.options.get(146);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let n=this._context.configuration.options.get(146);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),n=[],r=0;for(let o=0,s=t.length;o',l=[];for(let c=t;c<=n;c++){let u=c-t,d=r[u].getDecorations(),h="";for(let f of d){let p='
    {});var pse,Jbt=D(()=>{Kbt();use();pse=class extends FP{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),n=[],r=0;for(let o=0,s=t.length;o
    ';o[a]=c}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}});var Xbt=D(()=>{});var Lv,aRe=D(()=>{Lv=class i{static{this.Empty=new i(0,0,0,0)}constructor(e,t,n,r){this._rgba8Brand=void 0,this.r=i._clamp(e),this.g=i._clamp(t),this.b=i._clamp(n),this.a=i._clamp(r)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}});var BP,lRe=D(()=>{et();ae();aRe();tr();BP=class i extends W{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=A_(new i)),this._INSTANCE}constructor(){super(),this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Wn.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=Wn.getColorMap();if(!e){this._colors=[Lv.Empty],this._backgroundIsLight=!0;return}this._colors=[Lv.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}});var Zbt,$bt,cRe=D(()=>{Zbt=(()=>{let i=[];for(let e=32;e<=126;e++)i.push(e);return i.push(65533),i})(),$bt=(i,e)=>(i-=32,i<0||i>96?e<=2?(i+96)%96:95:i)});var hH,e0t=D(()=>{cRe();V7();hH=class i{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=i.soften(e,12/15),this.charDataLight=i.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let r=0,o=e.length;re.width||n+p>e.height){console.warn("bad render request outside image data");return}let g=u?this.charDataLight:this.charDataNormal,v=$bt(r,c),A=e.width*4,w=a.r,C=a.g,_=a.b,E=o.r-w,I=o.g-C,T=o.b-_,L=Math.max(s,l),M=e.data,z=v*h*f,H=n*A+t*4;for(let B=0;Be.width||n+d>e.height){console.warn("bad render request outside image data");return}let h=e.width*4,f=.5*(o/255),p=s.r,g=s.g,v=s.b,A=r.r-p,w=r.g-g,C=r.b-v,_=p+A*f,E=g+w*f,I=v+C*f,T=Math.max(o,a),L=e.data,M=n*h+t*4;for(let z=0;z{b_();t0t={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},i0t=i=>{let e=new Uint8ClampedArray(i.length/2);for(let t=0;t>1]=t0t[i[t]]<<4|t0t[i[t+1]]&15;return e},uRe={1:Tf(()=>i0t("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Tf(()=>i0t("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}});var mse,r0t=D(()=>{e0t();cRe();n0t();V7();mse=class i{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return uRe[e]?n=new hH(uRe[e](),e):n=i.createFromSampleData(i.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){let t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let r=0;for(let o of Zbt)n.fillText(String.fromCharCode(o),r,16/2),r+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");let r=i._downsample(e,t);return new hH(r,t)}static _downsampleChar(e,t,n,r,o){let s=1*o,a=2*o,l=r,c=0;for(let u=0;u0){let c=255/l;for(let u=0;u{Si();gse=Nr?'"Segoe WPC", "Segoe UI", sans-serif':qt?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'});var bAi,vAi,bse,hRe,vse,Ase,fRe,yse,wse,pRe,xse,o0t=D(()=>{Xbt();Ye();Za();rF();ae();Si();Pt();Xoe();ld();Ks();We();aRe();lRe();Zb();eo();Hn();Xf();r0t();b_();ql();dRe();bAi=140,vAi=2,bse=class i{constructor(e,t,n){let r=e.options,o=r.get(144),s=r.get(146),a=s.minimap,l=r.get(50),c=r.get(73);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=r.get(106),this.paddingTop=r.get(84).top,this.paddingBottom=r.get(84).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=r.get(67),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=s.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=gse,this.sectionHeaderFontSize=c.sectionHeaderFontSize*o,this.sectionHeaderLetterSpacing=c.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=i._getSectionHeaderColor(t,n.getColor(1)),this.charRenderer=Tf(()=>mse.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=i._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=i._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let n=e.getColor(sat);return n?new Lv(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(aat);return t?Lv._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){let n=e.getColor(Wp);return n?new Lv(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}},hRe=class i{constructor(e,t,n,r,o,s,a,l,c){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=r,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,r,o,s,a,l,c,u,d){let h=e.pixelRatio,f=e.minimapLineHeight,p=Math.floor(e.canvasInnerHeight/f),g=e.lineHeight;if(e.minimapHeightIsEditorHeight){let I=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(I+=Math.max(0,o-e.lineHeight-e.paddingBottom));let T=Math.max(1,Math.floor(o*o/I)),L=Math.max(0,e.minimapHeight-T),M=L/(u-o),z=c*M,H=L>0,B=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),q=Math.floor(e.paddingTop/e.lineHeight);return new i(c,u,H,M,z,T,q,1,Math.min(a,B))}let v;if(s&&n!==a){let I=n-t+1;v=Math.floor(I*f/h)}else{let I=o/g;v=Math.floor(I*f/h)}let A=Math.floor(e.paddingTop/g),w=Math.floor(e.paddingBottom/g);if(e.scrollBeyondLastLine){let I=o/g;w=Math.max(w,I-1)}let C;if(w>0){let I=o/g;C=(A+a+w-I-1)*f/h}else C=Math.max(0,(A+a)*f/h-v);C=Math.min(e.minimapHeight-v,C);let _=C/(u-o),E=c*_;if(p>=A+a+w){let I=C>0;return new i(c,u,I,_,E,v,A,1,a)}else{let I;t>1?I=t+A:I=Math.max(1,c/g);let T,L=Math.max(1,Math.floor(I-E*h/f));Lc&&(L=Math.min(L,d.startLineNumber),T=Math.max(T,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?H=(t-L+T+z)*f/h:H=c/e.paddingTop*(T+z)*f/h,new i(c,u,!0,_,H,v,T,L,M)}}},vse=class i{static{this.INVALID=new i(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}},Ase=class{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new dH({createLine:()=>vse.INVALID}),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;let n=this._renderedLines._get().lines;for(let r=0,o=n.length;r1){for(let A=0,w=r-1;A0&&this.minimapLines[n-1]>=e;)n--;let r=this.modelLineToMinimapLine(t)-1;for(;r+1t)return null}return[n+1,r+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),r=this.modelLineToMinimapLine(t);return e!==t&&r===n&&(r===this.minimapLines.length?n>1&&n--:r++),[n,r]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,n=this.minimapLines.length,r=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(r)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,n]=yse.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let r of n)switch(r.type){case"deleted":this._actual.onLinesDeleted(r.deleteFromLineNumber,r.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(r.insertFromLineNumber,r.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let r=[];for(let o=0,s=t-e+1;o!r.options.minimap?.sectionHeaderStyle);if(this._samplingState){let r=[];for(let o of n){if(!o.options.minimap)continue;let s=o.range,a=this._samplingState.modelLineToMinimapLine(s.startLineNumber),l=this._samplingState.modelLineToMinimapLine(s.endLineNumber);r.push(new vP(new N(a,s.startColumn,l,s.endColumn),o.options))}return r}return n}getSectionHeaderDecorationsInViewport(e,t){let n=this.options.minimapLineHeight,o=this.options.sectionHeaderFontSize/n;return e=Math.floor(Math.max(1,e-o)),this._getMinimapDecorationsInViewport(e,t).filter(s=>!!s.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let n;if(this._samplingState){let r=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];n=new N(r,1,o,this._context.viewModel.getLineMaxColumn(o))}else n=new N(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(n)}getSectionHeaderText(e,t){let n=e.options.minimap?.sectionHeaderText;if(!n)return null;let r=this._sectionHeaderCache.get(n);if(r)return r;let o=t(n);return this._sectionHeaderCache.set(n,o),o}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new N(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}},pRe=class i extends W{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(tEe),this._domNode=xi(document.createElement("div")),vc.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=xi(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=xi(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=xi(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=xi(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=xi(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=cn(this._domNode.domNode,De.POINTER_DOWN,n=>{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){let c=bn(this._slider.domNode),u=c.top+c.height/2;this._startSliderDragging(n,u,this._lastRenderData.renderedLayout)}return}let o=this._model.options.minimapLineHeight,s=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY,l=Math.floor(s/o)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new ag,this._sliderPointerDownListener=cn(this._slider.domNode,De.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Do.addTarget(this._domNode.domNode),this._sliderTouchStartListener=re(this._domNode.domNode,En.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=re(this._domNode.domNode,En.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=cn(this._domNode.domNode,En.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;let r=e.pageX;this._slider.toggleClassName("active",!0);let o=(s,a)=>{let l=bn(this._domNode.domNode),c=Math.min(Math.abs(a-r),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(Nr&&c>bAi){this._model.setScrollTop(n.scrollTop);return}let u=s-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(u))};e.pageY!==t&&o(e.pageY,r),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>o(s.pageY,s.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new fRe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(tEe),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let n=hRe.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(N.compareRangesUsingStarts);let n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));let{canvasInnerWidth:r,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,r,o);let u=new xse(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,u,e,s),this._renderDecorationsLineHighlights(c,n,u,e,s);let d=new xse(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,d,e,s,l,a,r),this._renderDecorationsHighlights(c,n,d,e,s,l,a,r),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,n,r,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,a=0;for(let l of t){let c=r.intersectWithViewport(l);if(!c)continue;let[u,d]=c;for(let p=u;p<=d;p++)n.set(p,!0);let h=r.getYForLineNumber(u,o),f=r.getYForLineNumber(d,o);a>=h||(a>s&&e.fillRect(uv,s,e.canvas.width,a-s),s=h),a=f}a>s&&e.fillRect(uv,s,e.canvas.width,a-s)}_renderDecorationsLineHighlights(e,t,n,r,o){let s=new Map;for(let a=t.length-1;a>=0;a--){let l=t[a],c=l.options.minimap;if(!c||c.position!==1)continue;let u=r.intersectWithViewport(l.range);if(!u)continue;let[d,h]=u,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let p=s.get(f.toString());p||(p=f.transparent(.5).toString(),s.set(f.toString(),p)),e.fillStyle=p;for(let g=d;g<=h;g++){if(n.has(g))continue;n.set(g,!0);let v=r.getYForLineNumber(d,o);e.fillRect(uv,v,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,n,r,o,s,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let c of t){let u=r.intersectWithViewport(c);if(!u)continue;let[d,h]=u;for(let f=d;f<=h;f++)this.renderDecorationOnLine(e,n,c,this._selectionColor,r,f,o,o,s,a,l)}}_renderDecorationsHighlights(e,t,n,r,o,s,a,l){for(let c of t){let u=c.options.minimap;if(!u)continue;let d=r.intersectWithViewport(c.range);if(!d)continue;let[h,f]=d,p=u.getColor(this._theme.value);if(!(!p||p.isTransparent()))for(let g=h;g<=f;g++)switch(u.position){case 1:this.renderDecorationOnLine(e,n,c.range,p,r,g,o,o,s,a,l);continue;case 2:{let v=r.getYForLineNumber(g,o);this.renderDecoration(e,p,2,v,vAi,o);continue}}}}renderDecorationOnLine(e,t,n,r,o,s,a,l,c,u,d){let h=o.getYForLineNumber(s,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;let{startLineNumber:f,endLineNumber:p}=n,g=f===s?n.startColumn:1,v=p===s?n.endColumn:this._model.getLineMaxColumn(s),A=this.getXOffsetForPosition(t,s,g,c,u,d),w=this.getXOffsetForPosition(t,s,v,c,u,d);this.renderDecoration(e,r,A,h,w-A,a)}getXOffsetForPosition(e,t,n,r,o,s){if(n===1)return uv;if((n-1)*o>=s)return s;let l=e.get(t);if(!l){let c=this._model.getLineContent(t);l=[uv];let u=uv;for(let d=1;d=s){l[d]=s;break}l[d]=p,u=p}e.set(t,l)}return n-1g.range.startLineNumber-v.range.startLineNumber);let p=i._fitSectionHeader.bind(null,h,s-uv);for(let g of f){let v=e.getYForLineNumber(g.range.startLineNumber,t)+n,A=v-n,w=A+2,C=this._model.getSectionHeaderText(g,p);i._renderSectionLabel(h,C,g.options.minimap?.sectionHeaderStyle===2,l,u,s,A,o,v,w)}}static _fitSectionHeader(e,t,n){if(!n)return n;let r="\u2026",o=e.measureText(n).width,s=e.measureText(r).width;if(o<=t||o<=s)return n;let a=n.length,l=o/n.length,c=Math.floor((t-s)/l)-1,u=Math.ceil(c/2);for(;u>0&&/\s/.test(n[u-1]);)--u;return n.substring(0,u)+r+n.substring(a-(c-u))}static _renderSectionLabel(e,t,n,r,o,s,a,l,c,u){t&&(e.fillStyle=r,e.fillRect(0,a,s,l),e.fillStyle=o,e.fillText(t,uv,c)),n&&(e.beginPath(),e.moveTo(0,u),e.lineTo(s,u),e.closePath(),e.stroke())}renderLines(e){let t=e.startLineNumber,n=e.endLineNumber,r=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){let F=this._lastRenderData._get();return new Ase(e,F.imageData,F.lines)}let o=this._getBuffer();if(!o)return null;let[s,a,l]=i._renderUntouchedLines(o,e.topPaddingLineCount,t,n,r,this._lastRenderData),c=this._model.getMinimapLinesRenderingData(t,n,l),u=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,p=this._model.tokensColorTracker,g=p.backgroundIsLight(),v=this._model.options.renderMinimap,A=this._model.options.charRenderer(),w=this._model.options.fontScale,C=this._model.options.minimapCharWidth,E=(v===1?2:3)*w,I=r>E?Math.floor((r-E)/2):0,T=h.a/255,L=new Lv(Math.round((h.r-d.r)*T+d.r),Math.round((h.g-d.g)*T+d.g),Math.round((h.b-d.b)*T+d.b),255),M=e.topPaddingLineCount*r,z=[];for(let F=0,ne=n-t+1;F=0&&Hw)return;let B=v.charCodeAt(E);if(B===9){let q=h-(E+I)%h;I+=q-1,_+=q*s}else if(B===32)_+=s;else{let q=rg(B)?2:1;for(let U=0;Uw)return}}}}},xse=class{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let r=0,o=this._endLineNumber-this._startLineNumber+1;rthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}});var s0t=D(()=>{});var Cse,a0t=D(()=>{s0t();Za();ld();Ye();Cse=class extends Wo{constructor(e,t){super(e),this._viewDomNode=t;let r=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=r.verticalScrollbarWidth,this._minimapWidth=r.minimap.minimapWidth,this._horizontalScrollbarHeight=r.horizontalScrollbarHeight,this._editorHeight=r.height,this._editorWidth=r.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=xi(document.createElement("div")),vc.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=xi(document.createElement("div")),vc.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let n=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){let t=xi(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let n=this._widgets[e.getId()],r=t?t.preference:null,o=t?.stackOridinal;return n.preference===r&&n.stack===o?(this._updateMaxMinWidth(),!1):(n.preference=r,n.stack=o,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let r=this._widgets[t].domNode.domNode;delete this._widgets[t],r.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0,t=Object.keys(this._widgets);for(let n=0,r=t.length;n0);t.sort((r,o)=>(this._widgets[r].stack||0)-(this._widgets[o].stack||0));for(let r=0,o=t.length;r{Za();Ho();ld();Nt();tr();tm();Zb();Qt();mRe=class{constructor(e,t){let n=e.options;this.lineHeight=n.get(67),this.pixelRatio=n.get(144),this.overviewRulerLanes=n.get(83),this.renderBorder=n.get(82);let r=t.getColor(qft);this.borderColor=r?r.toString():null,this.hideCursor=n.get(59);let o=t.getColor(FO);this.cursorColorSingle=o?o.transparent(.7).toString():null;let s=t.getColor(Iie);this.cursorColorPrimary=s?s.transparent(.7).toString():null;let a=t.getColor(Lie);this.cursorColorSecondary=a?a.transparent(.7).toString():null,this.themeType=t.type;let l=n.get(73),c=l.enabled,u=l.side,d=t.getColor(Yft),h=Wn.getDefaultBackground();d?this.backgroundColor=d:c&&u==="right"?this.backgroundColor=h:this.backgroundColor=null;let p=n.get(146).overviewRuler;this.top=p.top,this.right=p.right,this.domWidth=p.width,this.domHeight=p.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);let[g,v]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=g,this.w=v}_initLanes(e,t,n){let r=t-e;if(n>=3){let o=Math.floor(r/3),s=Math.floor(r/3),a=r-o-s,l=e,c=l+o,u=l+o+a;return[[0,l,c,l,u,l,c,l],[0,o,a,o+a,s,o+a+s,a+s,o+a+s]]}else if(n===2){let o=Math.floor(r/2),s=r-o,a=e,l=a+o;return[[0,a,a,a,l,a,a,a],[0,o,o,o,s,o+s,o+s,o+s]]}else{let o=e,s=r;return[[0,o,o,o,o,o,o,o],[0,s,s,s,s,s,s,s]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&pe.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}},_se=class extends Wo{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=xi(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Wn.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new K(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new mRe(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;t1&&(r=t===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:r})}return this._cursorPositions.sort((t,n)=>K.compare(t.position,n.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){let e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?pe.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}let t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(NL.compareByRenderingProps),this._actualShouldRender===1&&!NL.equalsArr(this._renderedDecorations,t)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!Zi(this._renderedCursorPositions,this._cursorPositions,(p,g)=>p.position.lineNumber===g.position.lineNumber&&p.color===g.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let n=this._settings.canvasWidth,r=this._settings.canvasHeight,o=this._settings.lineHeight,s=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=r/a,c=6*this._settings.pixelRatio|0,u=c/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=pe.Format.CSS.formatHexA(e),d.fillRect(0,0,n,r)):(d.clearRect(0,0,n,r),d.fillStyle=pe.Format.CSS.formatHexA(e),d.fillRect(0,0,n,r)):d.clearRect(0,0,n,r);let h=this._settings.x,f=this._settings.w;for(let p of t){let g=p.color,v=p.data;d.fillStyle=g;let A=0,w=0,C=0;for(let _=0,E=v.length/3;_r&&(B=r-u),M=B-u,z=B+u}M>C+1||I!==A?(_!==0&&d.fillRect(h[A],w,f[A],C-w),A=I,w=M,C=z):z>C&&(C=z)}d.fillRect(h[A],w,f[A],C-w)}if(!this._settings.hideCursor){let p=2*this._settings.pixelRatio|0,g=p/2|0,v=this._settings.x[7],A=this._settings.w[7],w=-100,C=-100,_=null;for(let E=0,I=this._cursorPositions.length;Er&&(M=r-g);let z=M-g,H=z+p;z>C+1||T!==_?(E!==0&&_&&d.fillRect(v,w,A,C-w),w=z,C=H):H>C&&(C=H),_=T,d.fillStyle=T}_&&d.fillRect(v,w,A,C-w)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,r),d.moveTo(1,0),d.lineTo(n,0),d.stroke())}}});var Sse,fH,Ese,gRe=D(()=>{Sse=class{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}},fH=class{constructor(e,t,n,r){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=r,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(g=n-v);let A=u.color,w=this._color2Id[A];w||(w=++this._lastAssignedId,this._color2Id[A]=w,this._id2Color[w]=A);let C=new Sse(g-v,g+v,w);u.setColorZone(C),a.push(C)}return this._colorZonesInvalid=!1,a.sort(Sse.compare),a}}});var Dse,c0t=D(()=>{Za();gRe();mF();Dse=class extends Ob{constructor(e,t){super(),this._context=e;let n=this._context.configuration.options;this._domNode=xi(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Ese(r=>this._context.viewLayout.getVerticalOffsetForLineNumber(r)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(67)),this._zoneManager.setPixelRatio(n.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(t.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),r=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,r,e),!0}_renderOneLane(e,t,n,r){let o=0,s=0,a=0;for(let l of t){let c=l.colorId,u=l.from,d=l.to;c!==o?(e.fillRect(0,s,r,a-s),o=c,e.fillStyle=n[o],s=u,a=d):a>=u?a=Math.max(a,d):(e.fillRect(0,s,r,a-s),s=u,a=d)}e.fillRect(0,s,r,a-s)}}});var u0t=D(()=>{});var Tse,d0t=D(()=>{u0t();Za();ld();Tse=class extends Wo{constructor(e){super(e),this.domNode=xi(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];let t=this._context.configuration.options;this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){let a=xi(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(o),this.domNode.appendChild(a),this._renderedRulers.push(a),s--}return}let n=e-t;for(;n>0;){let r=this._renderedRulers.pop();this.domNode.removeChild(r),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{});var kse,f0t=D(()=>{h0t();Za();ld();kse=class extends Wo{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;let n=this._context.configuration.options.get(104);this._useShadows=n.useShadows,this._domNode=xi(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){let t=this._context.configuration.options.get(146);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){let n=this._context.configuration.options.get(104);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}});var p0t=D(()=>{});function AAi(i){return new bRe(i)}function yAi(i){return new vRe(i.lineNumber,i.ranges.map(AAi))}function Ise(i){return i<0?-i:i}var bRe,vRe,Lse,m0t=D(()=>{p0t();RE();eo();Zn();bRe=class{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}},vRe=class{constructor(e,t){this.lineNumber=e,this.ranges=t}};Lse=class i extends af{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;let t=this._context.configuration.options;this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){let r=this._typicalHalfwidthCharacterWidth/4,o=null,s=null;if(n&&n.length>0&&t.length>0){let a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!o&&c=0;c--)n[c].lineNumber===l&&(s=n[c].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let a=0,l=t.length;a0){let p=t[a-1].ranges[0].left,g=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Ise(u-p)p&&(h.top=1),Ise(d-g)'}_actualRenderOneSelection(e,t,n,r){if(r.length===0)return;let o=!!r[0].ranges[0].startStyle,s=r[0].lineNumber,a=r[r.length-1].lineNumber;for(let l=0,c=r.length;l1,c)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map(([s,a])=>s+a)}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ua((i,e)=>{let t=i.getColor(Bst);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)})});var g0t=D(()=>{});var Nse,c1,pH,b0t=D(()=>{Ye();Za();Pt();qp();Ks();Nt();We();Aoe();Nse=class{constructor(e,t,n,r,o,s,a){this.top=e,this.left=t,this.paddingLeft=n,this.width=r,this.height=o,this.textContent=s,this.textContentClassName=a}};(function(i){i[i.Single=0]="Single",i[i.MultiPrimary=1]="MultiPrimary",i[i.MultiSecondary=2]="MultiSecondary"})(c1||(c1={}));pH=class{constructor(e,t){this._context=e;let n=this._context.configuration.options,r=n.get(50);this._cursorStyle=n.get(28),this._lineHeight=n.get(67),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=xi(document.createElement("div")),this._domNode.setClassName(`cursor ${Wx}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),mo(this._domNode,r),this._domNode.setDisplay("none"),this._position=new K(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case c1.Single:this._pluralityClass="";break;case c1.MultiPrimary:this._pluralityClass="cursor-primary";break;case c1.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),mo(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[r,o]=Jot(n,t-1);return[new K(e,r+1),n.substring(r,o)]}_prepareRender(e){let t="",n="",[r,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===Cl.Line||this._cursorStyle===Cl.LineThin){let h=e.visibleRangeForPosition(r);if(!h||h.outsideRenderedLine)return null;let f=rt(this._domNode.domNode),p;this._cursorStyle===Cl.Line?(p=HSe(f,this._lineCursorWidth>0?this._lineCursorWidth:2),p>2&&(t=o,n=this._getTokenClassName(r))):p=HSe(f,1);let g=h.left,v=0;p>=2&&g>=1&&(v=1,g-=v);let A=e.getVerticalOffsetForLineNumber(r.lineNumber)-e.bigNumbersDelta;return new Nse(A,g,v,p,this._lineHeight,t,n)}let s=e.linesVisibleRangesForRange(new N(r.lineNumber,r.column,r.lineNumber,r.column+o.length),!1);if(!s||s.length===0)return null;let a=s[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;let l=a.ranges[0],c=o===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Cl.Block&&(t=o,n=this._getTokenClassName(r));let u=e.getVerticalOffsetForLineNumber(r.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return(this._cursorStyle===Cl.Underline||this._cursorStyle===Cl.UnderlineThin)&&(u+=this._lineHeight-2,d=2),new Nse(u,l.left,0,c,d,t,n)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${Wx} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}});var Mse,v0t=D(()=>{g0t();Za();Jt();ld();b0t();Ks();tm();Zn();Pb();Ye();Mse=class i extends Wo{static{this.BLINK_INTERVAL=500}constructor(e){super(e);let t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new pH(this._context,c1.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=xi(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new oa,this._cursorFlatBlinkInterval=new bS,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,r=this._secondaryCursors.length;nt.length){let o=this._secondaryCursors.length-t.length;for(let s=0;s{for(let r=0,o=e.ranges.length;r{this._isVisible?this._hide():this._show()},i.BLINK_INTERVAL,rt(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},i.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Cl.Line:e+=" cursor-line-style";break;case Cl.Block:e+=" cursor-block-style";break;case Cl.Underline:e+=" cursor-underline-style";break;case Cl.LineThin:e+=" cursor-line-thin-style";break;case Cl.BlockOutline:e+=" cursor-block-outline-style";break;case Cl.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{let t=[{class:".cursor",foreground:FO,background:kie},{class:".cursor-primary",foreground:Iie,background:Mft},{class:".cursor-secondary",foreground:Lie,background:Rft}];for(let n of t){let r=i.getColor(n.foreground);if(r){let o=i.getColor(n.background);o||(o=r.opposite()),e.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${r}; border-color: ${r}; color: ${o}; }`),Bu(i.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${o}; border-right: 1px solid ${o}; }`)}}})});function wAi(i,e){try{return i(e)}catch(t){pt(t)}}var ARe,Rse,A0t=D(()=>{Za();Lt();ld();Nt();ARe=()=>{throw new Error("Invalid change accessor")},Rse=class extends Wo{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(146);this._lineHeight=t.get(67),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=xi(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=xi(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let r of e)t.set(r.id,r);let n=!1;return this._context.viewModel.changeWhitespace(r=>{let o=Object.keys(this._zones);for(let s=0,a=o.length;s{let r={addZone:o=>(t=!0,this._addZone(n,o)),removeZone:o=>{o&&(t=this._removeZone(n,o)||t)},layoutZone:o=>{o&&(t=this._layoutZone(n,o)||t)}};wAi(e,r),r.addZone=ARe,r.removeZone=ARe,r.layoutZone=ARe}),t}_addZone(e,t){let n=this._computeWhitespaceProps(t),o={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:xi(t.domNode),marginDomNode:t.marginDomNode?xi(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,n.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.remove(),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t],r=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=r.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,r.afterViewLineNumber,r.heightInPx),this._safeCallOnComputedHeight(n.delegate,r.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){pt(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){pt(n)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,n={},r=!1;for(let s of t)this._zones[s.id].isInHiddenArea||(n[s.id]=s,r=!0);let o=Object.keys(this._zones);for(let s=0,a=o.length;s{});var Fse,Ose,w0t=D(()=>{y0t();RE();Pt();ES();Nt();tm();Fse=class extends af{constructor(e){super(),this._context=e,this._options=new Ose(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new Ose(this._context.configuration);return this._options.equals(t)?e.hasChanged(146):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber-t+1,o=new Array(r);for(let a=0;aa)continue;let f=h.startLineNumber===a?h.startColumn:c.minColumn,p=h.endLineNumber===a?h.endColumn:c.maxColumn;f=z.endOffset&&(M++,z=n&&n[M]),q!==9&&q!==32||h&&!I&&B<=L)continue;if(d&&B>=T&&B<=L&&q===32){let F=B-1>=0?a.charCodeAt(B-1):0,ne=B+1=0?a.charCodeAt(B-1):0;if(q===32&&F!==32&&F!==9)continue}if(n&&(!z||z.startOffset>B||z.endOffset<=B))continue;let U=e.visibleRangeForPosition(new K(t,B+1));U&&(s?(H=Math.max(H,U.left),q===9?E+=this._renderArrow(f,v,U.left):E+=``):q===9?E+=`
    ${_?"\uFFEB":"\u2192"}
    `:E+=`
    ${String.fromCharCode(C)}
    `)}return s?(H=Math.round(H+v),``+E+""):E}_renderArrow(e,t,n){let r=t/7,o=t,s=e/2,a=n,l={x:0,y:r/2},c={x:100/125*o,y:l.y},u={x:c.x-.2*c.x,y:c.y+.2*c.x},d={x:u.x+.1*c.x,y:u.y+.1*c.x},h={x:d.x+.35*c.x,y:d.y-.35*c.x},f={x:h.x,y:-h.y},p={x:d.x,y:-d.y},g={x:u.x,y:-u.y},v={x:c.x,y:-c.y},A={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}},Ose=class{constructor(e){let t=e.options,n=t.get(50),r=t.get(38);r==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):r==="svg"?(this.renderWhitespace=t.get(100),this.renderWithSVG=!0):(this.renderWhitespace=t.get(100),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}});var Pse,x0t=D(()=>{We();Pse=class{constructor(e,t,n,r){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.lineHeight=t.lineHeight|0,this.whitespaceViewportData=n,this._model=r,this.visibleRange=new N(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}});var Bse,C0t=D(()=>{Bse=class{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}});var zse,_0t=D(()=>{C0t();zse=class{constructor(e,t,n){this.configuration=e,this.theme=new Bse(t),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}});function BE(i){try{return i()}catch(e){return pt(e),null}}var xAi,CAi,Vse,yRe,S0t=D(()=>{Ye();Za();EMe();Lt();u$();bbt();Cbt();bF();Lbt();Nbt();ld();JMe();Rbt();Fbt();Pbt();zbt();Vbt();use();Ubt();FMe();Gbt();Ybt();OMe();Jbt();o0t();a0t();l0t();c0t();d0t();f0t();m0t();v0t();A0t();w0t();Nt();We();Hn();tl();mF();x0t();_0t();ht();Zn();xAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},CAi=function(i,e){return function(t,n){e(t,n,i)}},Vse=class extends Ob{constructor(e,t,n,r,o,s,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new qe(1,1,1,1)],this._renderAnimationFrame=null;let l=new Joe(t,r,o,e);this._context=new zse(t,n,r),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(yoe,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=xi(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=xi(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=xi(document.createElement("div")),vc.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new lse(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new hse(this._context,this._linesContent),this._viewZones=new Rse(this._context),this._viewParts.push(this._viewZones);let c=new _se(this._context);this._viewParts.push(c);let u=new kse(this._context);this._viewParts.push(u);let d=new $oe(this._context);this._viewParts.push(d),d.addDynamicOverlay(new ose(this._context)),d.addDynamicOverlay(new Lse(this._context)),d.addDynamicOverlay(new dse(this._context)),d.addDynamicOverlay(new ase(this._context)),d.addDynamicOverlay(new Fse(this._context));let h=new ese(this._context);this._viewParts.push(h),h.addDynamicOverlay(new sse(this._context)),h.addDynamicOverlay(new pse(this._context)),h.addDynamicOverlay(new fse(this._context)),h.addDynamicOverlay(new SP(this._context)),this._glyphMarginWidgets=new cse(this._context),this._viewParts.push(this._glyphMarginWidgets);let f=new EP(this._context);f.getDomNode().appendChild(this._viewZones.marginDomNode),f.getDomNode().appendChild(h.getDomNode()),f.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(f),this._contentWidgets=new ise(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Mse(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Cse(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);let p=new Tse(this._context);this._viewParts.push(p);let g=new tse(this._context);this._viewParts.push(g);let v=new wse(this._context);if(this._viewParts.push(v),c){let A=this._scrollbar.getOverviewRulerLayoutInfo();A.parent.insertBefore(c.getDomNode(),A.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(p.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(v.getDomNode()),this._overflowGuardContainer.appendChild(g.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new voe(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){let e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes,n=[],r=0;n=n.concat(e.getAllMarginDecorations().map(o=>{let s=o.options.glyphMargin?.position??Hu.Center;return r=Math.max(r,o.range.endLineNumber),{range:o.range,lane:s,persist:o.options.glyphMargin?.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(o=>{let s=e.validateRange(o.preference.range);return r=Math.max(r,s.endLineNumber),{range:s,lane:o.preference.lane}})),n.sort((o,s)=>N.compareRangesUsingStarts(o.range,s.range)),t.reset(r);for(let o of n)t.push(o.lane,o.range,o.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{let e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new E7(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new K(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){let t=this._context.configuration.options.get(146);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){let e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+iz(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new vi;if(this._renderAnimationFrame===null){let e=this._createCoordinatedRendering();this._renderAnimationFrame=yRe.INSTANCE.scheduleCoordinatedRendering({window:rt(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new vi;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new vi;return e.renderText()},prepareRender:(t,n)=>{if(this._store.isDisposed)throw new vi;return e.prepareRender(t,n)},render:(t,n)=>{if(this._store.isDisposed)throw new vi;return e.render(t,n)}})}}_flushAccumulatedAndRenderNow(){let e=this._createCoordinatedRendering();BE(()=>e.prepareRenderText());let t=BE(()=>e.renderText());if(t){let[n,r]=t;BE(()=>e.prepareRender(n,r)),BE(()=>e.render(n,r))}}_getViewPartsToRender(){let e=[],t=0;for(let n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;let e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}l1.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;let t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);let n=new Pse(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new qZ(this._context.viewLayout,n,this._viewLines)]},prepareRender:(e,t)=>{for(let n of e)n.prepareRender(t)},render:(e,t)=>{for(let n of e)n.render(t),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){let n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),r=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();let o=this._viewLines.visibleRangeForPosition(new K(r.lineNumber,r.column));return o?o.left:-1}getTargetAtClientPoint(e,t){let n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?RP.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Dse(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(let n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){let t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};Vse=xAi([CAi(6,Ne)],Vse);yRe=class i{static{this.INSTANCE=new i}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{let t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(let[n,r]of this._animationFrameRunners)r.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){let t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,eF(e,t,100))}}_onRenderScheduled(){let e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(let n of e)BE(()=>n.prepareRenderText());let t=[];for(let n=0,r=e.length;no.renderText())}for(let n=0,r=e.length;no.prepareRender(a,l))}for(let n=0,r=e.length;no.render(a,l))}}}});function E0t(i){return i==null?!0:i===Yh.Right||i===Yh.Both}function D0t(i){return i==null?!0:i===Yh.Left||i===Yh.Both}var qx,zP,wRe=D(()=>{Mb();Nt();tl();qx=class{constructor(e,t,n,r,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=n,this.breakOffsetsVisibleColumn=r,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){let t=e>0?this.breakOffsets[e-1]:0,r=this.breakOffsets[e]-t;return e>0&&(r+=this.wrappedTextIndentLength),r}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let r=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let o=0;othis.injectionOffsets[o];o++)r0?this.breakOffsets[o-1]:0,t===0)if(e<=s)r=o-1;else if(e>l)n=o+1;else break;else if(e=l)n=o+1;else break}let a=e-s;return o>0&&(a+=this.wrappedTextIndentLength),new zP(o,a)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){let r=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(r,n);if(o!==r)return this.offsetInInputWithInjectionsToOutputPosition(o,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new zP(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){let r=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){let n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&E0t(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let r=n.offsetInInputWithInjections;if(D0t(this.injectionOptions[n.injectedTextIndex].cursorStops))return r;let o=n.injectedTextIndex-1;for(;o>=0&&this.injectionOffsets[o]===this.injectionOffsets[n.injectedTextIndex]&&!(E0t(this.injectionOptions[o].cursorStops)||(r-=this.injectionOptions[o].content.length,D0t(this.injectionOptions[o].cursorStops)));)o--;return r}}else if(t===1||t===4){let r=n.offsetInInputWithInjections+n.length,o=n.injectedTextIndex;for(;o+1=0&&this.injectionOffsets[o-1]===this.injectionOffsets[o];)r-=this.injectionOptions[o-1].content.length,o--;return r}vS(t)}getInjectedText(e,t){let n=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.getInjectedTextAtOffset(n);return r?{options:this.injectionOptions[r.injectedTextIndex]}:null}getInjectedTextAtOffset(e){let t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let r=0;for(let o=0;oe)break;if(e<=l)return{injectedTextIndex:o,offsetInInputWithInjections:a,length:s};r+=s}}}};zP=class{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new K(e+this.outputLineIndex,this.outputOffset+1)}}});function SAi(i,e,t,n,r,o,s,a){function l(M){let z=a[M];if(z){let H=tp.applyInjectedText(e[M],z),B=z.map(U=>U.options),q=z.map(U=>U.column-1);return new qx(q,B,[H.length],[],0)}else return null}if(r===-1){let M=[];for(let z=0,H=e.length;zc?(H=0,B=0):q=c-ne}let U=z.substr(H),F=EAi(U,B,n,q,p,h);g[M]=H,v[M]=B,A[M]=U,w[M]=F[0],C[M]=F[1]}let _=p.build(),E=_Ai?.createHTML(_)??_;f.innerHTML=E,f.style.position="absolute",f.style.top="10000",s==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),i.document.body.appendChild(f);let I=document.createRange(),T=Array.prototype.slice.call(f.children,0),L=[];for(let M=0;Mle.options),ce=se.map(le=>le.column-1)):(ne=null,ce=null),L[M]=new qx(ce,ne,H,F,q)}return f.remove(),L}function EAi(i,e,t,n,r,o){if(o!==0){let h=String(o);r.appendString('
    ');let s=i.length,a=e,l=0,c=[],u=[],d=0");for(let h=0;h"),c[h]=l,u[h]=a;let f=d;d=h+1"),c[i.length]=l,u[i.length]=a,r.appendString("
    "),[c,u]}function DAi(i,e,t,n){if(t.length<=1)return null;let r=Array.prototype.slice.call(e.children,0),o=[];try{CRe(i,r,n,0,null,t.length-1,null,o)}catch(s){return console.log(s),null}return o.length===0?null:(o.push(t.length),o)}function CRe(i,e,t,n,r,o,s,a){if(n===o||(r=r||xRe(i,e,t[n],t[n+1]),s=s||xRe(i,e,t[o],t[o+1]),Math.abs(r[0].top-s[0].top)<=.1))return;if(n+1===o){a.push(o);return}let l=n+(o-n)/2|0,c=xRe(i,e,t[l],t[l+1]);CRe(i,e,t,n,r,l,c,a),CRe(i,e,t,l,c,o,s,a)}function xRe(i,e,t,n){return i.setStart(e[t/16384|0].firstChild,t%16384),i.setEnd(e[n/16384|0].firstChild,n%16384),i.getClientRects()}var _Ai,Hse,T0t=D(()=>{ay();Pt();gn();qp();$w();wRe();xE();_Ai=fd("domLineBreaksComputer",{createHTML:i=>i}),Hse=class i{static create(e){return new i(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,n,r,o){let s=[],a=[];return{addRequest:(l,c,u)=>{s.push(l),a.push(c)},finalize:()=>SAi(db(this.targetWindow.deref()),s,e,t,n,r,o,a)}}}});var Wse,k0t=D(()=>{Ye();Lt();ae();Wse=class extends W{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new v_),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(let r of t){if(this._pending.has(r.id)){pt(new Error(`Cannot have two contributions with the same id ${r.id}`));continue}this._pending.set(r.id,r)}this._instantiateSome(0),this._register(Yk(rt(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(Yk(rt(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(Yk(rt(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){let e={};for(let[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(let[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return Yk(rt(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;let t=this._findPendingContributionsByInstantiation(e);for(let n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){let t=[];for(let[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){let t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{let n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){pt(n)}}}}});var VP,_Re=D(()=>{VP=class{constructor(e,t,n,r,o,s,a){this.id=e,this.label=t,this.alias=n,this.metadata=r,this._precondition=o,this._run=s,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}});function TAi(i,e,t,n,r,o,s,a){if(r===-1)return null;let l=t.length;if(l<=1)return null;let c=a==="keepAll",u=e.breakOffsets,d=e.breakOffsetsVisibleColumn,h=L0t(t,n,r,o,s),f=r-h,p=ERe,g=DRe,v=0,A=0,w=0,C=r,_=u.length,E=0;if(E>=0){let I=Math.abs(d[E]-C);for(;E+1<_;){let T=Math.abs(d[E+1]-C);if(T>=I)break;I=T,E++}}for(;E<_;){let I=E<0?0:u[E],T=E<0?0:d[E];A>I&&(I=A,T=w);let L=0,M=0,z=0,H=0;if(T<=C){let q=T,U=I===0?0:t.charCodeAt(I-1),F=I===0?0:i.get(U),ne=!0;for(let ce=I;ceA&&TRe(U,F,le,oe,c)&&(L=se,M=q),q+=fe,q>C){se>A?(z=se,H=q-fe):(z=ce+1,H=q),q-M>f&&(L=0),ne=!1;break}U=le,F=oe}if(ne){v>0&&(p[v]=u[u.length-1],g[v]=d[u.length-1],v++);break}}if(L===0){let q=T,U=t.charCodeAt(I),F=i.get(U),ne=!1;for(let ce=I-1;ce>=A;ce--){let se=ce+1,le=t.charCodeAt(ce);if(le===9){ne=!0;break}let oe,fe;if(XA(le)?(ce--,oe=0,fe=2):(oe=i.get(le),fe=rg(le)?o:1),q<=C){if(z===0&&(z=se,H=q),q<=C-f)break;if(TRe(le,oe,U,F,c)){L=se,M=q;break}}q-=fe,U=le,F=oe}if(L!==0){let ce=f-(H-M);if(ce<=n){let se=t.charCodeAt(z),le;xo(se)?le=2:le=mH(se,H,n,o),ce-le<0&&(L=0)}}if(ne){E--;continue}}if(L===0&&(L=z,M=H),L<=A){let q=t.charCodeAt(A);xo(q)?(L=A+2,M=w+2):(L=A+1,M=w+mH(q,w,n,o))}for(A=L,p[v]=L,w=M,g[v]=M,v++,C=M+f;E<0||E<_&&d[E]=B)break;B=q,E++}}return v===0?null:(p.length=v,g.length=v,ERe=e.breakOffsets,DRe=e.breakOffsetsVisibleColumn,e.breakOffsets=p,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=h,e)}function kAi(i,e,t,n,r,o,s,a){let l=tp.applyInjectedText(e,t),c,u;if(t&&t.length>0?(c=t.map(M=>M.options),u=t.map(M=>M.column-1)):(c=null,u=null),r===-1)return c?new qx(u,c,[l.length],[],0):null;let d=l.length;if(d<=1)return c?new qx(u,c,[l.length],[],0):null;let h=a==="keepAll",f=L0t(l,n,r,o,s),p=r-f,g=[],v=[],A=0,w=0,C=0,_=r,E=l.charCodeAt(0),I=i.get(E),T=mH(E,0,n,o),L=1;xo(E)&&(T+=1,E=l.charCodeAt(1),I=i.get(E),L++);for(let M=L;M_&&((w===0||T-C>p)&&(w=z,C=T-q),g[A]=w,v[A]=C,A++,_=C+p,w=0),E=H,I=B}return A===0&&(!t||t.length===0)?null:(g[A]=d,v[A]=T,new qx(u,c,g,v,f))}function mH(i,e,t,n){return i===9?t-e%t:rg(i)||i<32?n:1}function I0t(i,e){return e-i%e}function TRe(i,e,t,n,r){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!r&&e===3&&n!==2||!r&&n===3&&e!==1)}function L0t(i,e,t,n,r){let o=0;if(r!==0){let s=Vo(i);if(s!==-1){for(let l=0;lt&&(o=0)}}return o}var Use,SRe,ERe,DRe,N0t=D(()=>{Pt();kI();xE();wRe();Use=class i{static create(e){return new i(e.get(135),e.get(134))}constructor(e,t){this.classifier=new SRe(e,t)}createLineBreaksComputer(e,t,n,r,o){let s=[],a=[],l=[];return{addRequest:(c,u,d)=>{s.push(c),a.push(u),l.push(d)},finalize:()=>{let c=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[];for(let d=0,h=s.length;d=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}},ERe=[],DRe=[]});var gH,M0t=D(()=>{lm();Nt();We();Hn();gH=class i{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new nl(new N(1,1,1,1),0,0,new K(1,1),0),new nl(new N(1,1,1,1),0,0,new K(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Qi(this.modelState,this.viewState)}readSelectionFromMarkers(e){let t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?qe.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):qe.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,r){return t.equals(n)?r:e.normalizePosition(t,2)}static _validateViewState(e,t){let n=t.position,r=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,r,n,s),l=this._validatePositionWithCache(e,o,r,a);return n.equals(s)&&r.equals(a)&&o.equals(l)?t:new nl(N.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+r.column-a.column,s,t.leftoverVisibleColumns+n.column-s.column)}_setState(e,t,n){if(n&&(n=i._validateViewState(e.viewModel,n)),t){let r=e.model.validateRange(t.selectionStart),o=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),a=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new nl(r,t.selectionStartKind,o,s,a)}else{if(!n)return;let r=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new nl(r,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,o,n.leftoverVisibleColumns)}if(n){let r=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new nl(r,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{let r=e.coordinatesConverter.convertModelPositionToViewPosition(new K(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new K(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new N(r.lineNumber,r.column,o.lineNumber,o.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new nl(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}});var bH,R0t=D(()=>{Qt();Jf();lm();M0t();Nt();We();Hn();bH=class{constructor(e){this.context=e,this.cursors=[new gH(e)],this.lastAddedCursorIndex=0}dispose(){for(let e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(let e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(let e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(let e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return Oct(this.cursors,aa(e=>e.viewState.position,K.compare)).viewState.position}getBottomMostViewPosition(){return Fct(this.cursors,aa(e=>e.viewState.position,K.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Qi.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){let t=this.cursors.length-1,n=e.length;if(tn){let r=t-n;for(let o=0;o=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;let e=this.cursors.slice(0),t=[];for(let n=0,r=e.length;nn.selection,N.compareRangesUsingStarts));for(let n=0;nd&&g.index--;e.splice(d,1),t.splice(u,1),this._removeSecondaryCursor(d-1),n--}}}}});var vH,F0t=D(()=>{vH=class{constructor(e,t,n,r){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=r}}});var jse,Qse,Gse,qse,u1,YL,Yse,Kse,KL,AH,HP,WP,Yx,Jse,Xse,Zse,$se,eae,tae=D(()=>{jse=class{constructor(){this.type=0}},Qse=class{constructor(){this.type=1}},Gse=class{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}},qse=class{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}},u1=class{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}},YL=class{constructor(){this.type=5}},Yse=class{constructor(e){this.type=6,this.isFocused=e}},Kse=class{constructor(){this.type=7}},KL=class{constructor(){this.type=8}},AH=class{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}},HP=class{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}},WP=class{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}},Yx=class{constructor(e,t,n,r,o,s,a){this.source=e,this.minimalReveal=t,this.range=n,this.selections=r,this.verticalType=o,this.revealHorizontal=s,this.scrollType=a,this.type=12}},Jse=class{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}},Xse=class{constructor(e){this.theme=e,this.type=14}},Zse=class{constructor(e){this.type=15,this.ranges=e}},$se=class{constructor(){this.type=16}},eae=class{constructor(){this.type=17}}});var iae,kRe,nae,rae,oae,sae,aae,lae,cae,uae,dae,hae,fae,pae,mae,gae=D(()=>{et();ae();iae=class extends W{constructor(){super(),this._onEvent=this._register(new G),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;let e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){let e=this._viewEventQueue;this._viewEventQueue=null;let t=this._eventHandlers.slice(0);for(let n of t)n.handleEvents(e)}}},kRe=class{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}},nae=class i{constructor(e,t,n,r){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=r,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}},rae=class i{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new i(this.oldHasFocus,e.hasFocus)}},oae=class i{constructor(e,t,n,r,o,s,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=r,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}},sae=class{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},aae=class{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},lae=class i{constructor(e,t,n,r,o,s,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=r,this.source=o,this.reason=s,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let n=e.length,r=t.length;if(n!==r)return!1;for(let o=0;o{Lt();Pt();R0t();lm();F0t();Coe();Yoe();lH();We();Hn();xE();tae();ae();gae();bae=class extends W{constructor(e,t,n,r){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new vH(this._model,this._viewModel,this._coordinatesConverter,r),this._cursors=new bH(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Vi(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new vH(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;ts&&(r=r.slice(0,s),o=!0);let a=yH.from(this._model,this);return this._cursors.setStates(r),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,a,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,n,r,o,s){let a=this._cursors.getViewPositions(),l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=N.fromPositions(a[0],a[0]),e.emitViewEvent(new Yx(t,n,l,c,r,o,s))}revealPrimary(e,t,n,r,o,s){let l=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new Yx(t,n,null,l,r,o,s))}saveState(){let e=[],t=this._cursors.getSelections();for(let n=0,r=t.length;n0){let o=Qi.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,o)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{let o=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Qi.fromModelSelections(o))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;let e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,r){this.setStates(e,t,r,Qi.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],r=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(n,r),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,r,o){let s=yH.from(this._model,this);if(s.equals(r))return!1;let a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new qse(l,a,n)),!r||r.cursorState.length!==s.cursorState.length||s.cursorState.some((c,u)=>!c.modelState.equals(r.cursorState[u].modelState))){let c=r?r.cursorState.map(d=>d.modelState.selection):null,u=r?r.modelVersionId:0;e.emitOutgoingEvent(new lae(c,a,u,s.modelVersionId,t||"keyboard",n,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,r=e.length;n=0)return null;let s=o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;let a=s[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;let c=l[0].open,u=o.text.length-s[2].length-1,d=o.text.lastIndexOf(c,u-1);if(d===-1)return null;t.push([d,u])}return t}executeEdits(e,t,n,r){let o=null;t==="snippet"&&(o=this._findAutoClosingPairs(n)),o&&(n[0]._isTracked=!0);let s=[],a=[],l=this._model.pushEditOperations(this.getSelections(),n,c=>{if(o)for(let d=0,h=o.length;d0&&this._pushAutoClosedAction(s,a)}_executeEdit(e,t,n,r=0){if(this.context.cursorConfig.readOnly)return;let o=yH.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){pt(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,r,o,!1)&&this.revealAll(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return vae.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new NRe(this._model,this.getSelections())}endComposition(e,t){let n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Lg.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){let r=t.length,o=0;for(;o{let c=l.getPosition();return new qe(c.lineNumber,c.column+o,c.lineNumber,c.column+o)});this.setSelections(e,s,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Lg.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,r,o))},e,s)}paste(e,t,n,r,o){this._executeEdit(()=>{this._executeEditOperation(Lg.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,r||[]))},e,o,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(jx.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new ic(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new ic(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}},yH=class i{static from(e,t){return new i(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}},IRe=class{static executeCommands(e,t,n){let r={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(r,n);for(let s=0,a=r.trackedRanges.length;s0&&(s[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,s,c=>{let u=[];for(let f=0;ff.identifier.minor-p.identifier.minor,h=[];for(let f=0;f0?(u[f].sort(d),h[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>u[f],getTrackedSelection:p=>{let g=parseInt(p,10),v=e.model._getTrackedRange(e.trackedRanges[g]);return e.trackedRangesDirection[g]===0?new qe(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn):new qe(v.endLineNumber,v.endColumn,v.startLineNumber,v.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);let l=[];for(let c in o)o.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,u)=>u-c);for(let c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{N.isEmpty(d)&&h===""||r.push({identifier:{major:t,minor:o++},range:d,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},a=!1,u={addEditOperation:s,addTrackedEditOperation:(d,h,f)=>{a=!0,s(d,h,f)},trackSelection:(d,h)=>{let f=qe.liftSelection(d),p;if(f.isEmpty())if(typeof h=="boolean")h?p=2:p=3;else{let A=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===A?p=2:p=3}else p=1;let g=e.trackedRanges.length,v=e.model._setTrackedRange(null,f,p);return e.trackedRanges[g]=v,e.trackedRangesDirection[g]=f.getDirection(),g.toString()}};try{n.getEditOperations(e.model,u)}catch(d){return pt(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:r,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,r)=>-N.compareRangesUsingEnds(n.range,r.range));let t={};for(let n=1;no.identifier.major?s=r.identifier.major:s=o.identifier.major,t[s.toString()]=!0;for(let a=0;a0&&n--}}return t}},LRe=class{constructor(e,t,n){this.text=e,this.startSelection=t,this.endSelection=n}},NRe=class i{static _capture(e,t){let n=[];for(let r of t){if(r.startLineNumber!==r.endLineNumber)return null;n.push(new LRe(e.getLineContent(r.startLineNumber),r.startColumn-1,r.endColumn-1))}return n}constructor(e,t){this._original=i._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;let n=i._capture(e,t);if(!n||this._original.length!==n.length)return null;let r=[];for(let o=0,s=this._original.length;o{Pt();MRe=class{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;let t=this._inserts,n=this._changes,r=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,r)}},RRe=class{constructor(e,t,n,r,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=r,this.minWidth=o,this.prefixSum=0}},Aae=class i{static{this.INSTANCE_COUNT=0}constructor(e,t,n,r){this._instanceId=rZ(++i.INSTANCE_COUNT),this._pendingChanges=new MRe,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=r}static findInsertionIndex(e,t,n){let r=0,o=e.length;for(;r>>1;t===e[s].afterLineNumber?n{t=!0,r=r|0,o=o|0,s=s|0,a=a|0;let l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new RRe(l,r,o,s,a)),l},changeOneWhitespace:(r,o,s)=>{t=!0,o=o|0,s=s|0,this._pendingChanges.change({id:r,newAfterLineNumber:o,newHeight:s})},removeWhitespace:r=>{t=!0,this._pendingChanges.remove({id:r})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(let l of e)this._insertWhitespace(l);for(let l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(let l of n){let c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}let r=new Set;for(let l of n)r.add(l.id);let o=new Map;for(let l of t)o.set(l.id,l);let s=l=>{let c=[];for(let u of l)if(!r.has(u.id)){if(o.has(u.id)){let d=o.get(u.id);u.afterLineNumber=d.newAfterLineNumber,u.height=d.newHeight}c.push(u)}return c},a=s(this._arr).concat(s(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){let t=i.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){let t=this._arr;for(let n=0,r=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,r=this._arr.length;n=t.length||t[a+1].afterLineNumber>=e)return a;n=a+1|0}else r=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;let n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;let r=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+r+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;let n=this._lineHeight*e,r=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+r+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;let t=this._lineCount|0,n=this._lineHeight,r=1,o=t;for(;r=a+n)r=s+1;else{if(e>=a)return s;o=s}}return r>t?t:r}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this._lineHeight,r=this.getLineNumberAtOrAfterVerticalOffset(e)|0,o=this.getVerticalOffsetForLineNumber(r)|0,s=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(r)|0,l=this.getWhitespacesCount()|0,c,u;a===-1?(a=l,u=s+1,c=0):(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let d=o,h=d,f=5e5,p=0;o>=f&&(p=Math.floor(o/f)*f,p=Math.floor(p/n)*n,h-=p);let g=[],v=e+(t-e)/2,A=-1;for(let E=r;E<=s;E++){if(A===-1){let I=d,T=d+n;(I<=v&&vv)&&(A=E)}for(d+=n,g[E-r]=h,h+=n;u===E;)h+=c,d+=c,a++,a>=l?u=s+1:(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(d>=t){s=E;break}}A===-1&&(A=s);let w=this.getVerticalOffsetForLineNumber(s)|0,C=r,_=s;return C<_&&ot&&_--,{bigNumbersDelta:p,startLineNumber:r,endLineNumber:s,relativeVerticalOffset:g,centeredLineNumber:A,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:_,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;let t=this.getAfterLineNumberForWhitespaceIndex(e),n;t>=1?n=this._lineHeight*t:n=0;let r;return e>0?r=this.getWhitespacesAccumulatedHeight(e-1):r=0,n+r+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;let r=this.getVerticalOffsetForWhitespaceIndex(n),o=this.getHeightForWhitespaceIndex(n);if(e>=r+o)return-1;for(;t=a+l)t=s+1;else{if(e>=a)return s;n=s}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;let t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;let n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;let r=this.getHeightForWhitespaceIndex(t),o=this.getIdForWhitespaceIndex(t),s=this.getAfterLineNumberForWhitespaceIndex(t);return{id:o,afterLineNumber:s,verticalOffset:n,height:r}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),r=this.getWhitespacesCount()-1;if(n<0)return[];let o=[];for(let s=n;s<=r;s++){let a=this.getVerticalOffsetForWhitespaceIndex(s),l=this.getHeightForWhitespaceIndex(s);if(a>=t)break;o.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:a,height:l})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}}});var IAi,JL,FRe,yae,z0t=D(()=>{et();ae();eO();B0t();Zb();gae();IAi=125,JL=class{constructor(e,t,n,r){e=e|0,t=t|0,n=n|0,r=r|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),r<0&&(r=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=r,this.scrollHeight=Math.max(n,r)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}},FRe=class extends W{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new G),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new JL(0,0,0,0),this._scrollable=this._register(new vg({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;let t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);let n=t.contentWidth!==e.contentWidth,r=t.contentHeight!==e.contentHeight;(n||r)&&this._onDidContentSizeChange.fire(new nae(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}},yae=class extends W{constructor(e,t,n){super(),this._configuration=e;let r=this._configuration.options,o=r.get(146),s=r.get(84);this._linesLayout=new Aae(t,r.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new FRe(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new JL(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?IAi:0)}onConfigurationChanged(e){let t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){let n=t.get(84);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(146)){let n=t.get(146),r=n.contentWidth,o=n.height,s=this._scrollable.getScrollDimensions(),a=s.contentWidth;this._scrollable.setScrollDimensions(new JL(r,s.contentWidth,o,this._getContentHeight(r,o,a)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){let r=this._configuration.options.get(104);return r.horizontal===2||e>=t?0:r.horizontalScrollbarSize}_getContentHeight(e,t,n){let r=this._configuration.options,o=this._linesLayout.getLinesTotalHeight();return r.get(106)?o+=Math.max(0,t-r.get(67)-r.get(84).bottom):r.get(104).ignoreHorizontalScrollbarInContentHeight||(o+=this._getHorizontalScrollbarHeight(e,n)),o}_updateHeight(){let e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,r=e.contentWidth;this._scrollable.setScrollDimensions(new JL(t,e.contentWidth,n,this._getContentHeight(t,n,r)))}getCurrentViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new XV(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new XV(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){let e=this._configuration.options,t=this._maxLineWidth,n=e.get(147),r=e.get(50),o=e.get(146);if(n.isViewportWrapping){let s=e.get(73);return t>o.contentWidth+r.typicalHalfwidthCharacterWidth&&s.enabled&&s.side==="right"?t+o.verticalScrollbarWidth:t}else{let s=e.get(105)*r.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+s+o.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){let e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new JL(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){let e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),r=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-r,scrollLeft:e.scrollLeft}}changeWhitespace(e){let t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){let t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){let n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}});function xae(i,e){return!(e.options.hideInCommentTokens&&Cae(i,e)||e.options.hideInStringTokens&&_ae(i,e))}function Cae(i,e){return V0t(i,e.range,t=>t===1)}function _ae(i,e){return V0t(i,e.range,t=>t===2)}function V0t(i,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let r=i.tokenization.getLineTokens(n),o=n===e.startLineNumber,s=n===e.endLineNumber,a=o?r.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(r.getStandardTokenType(a)))return!1;a++}}return!0}var wae,ORe=D(()=>{Nt();We();Zb();Ks();wae=class{constructor(e,t,n,r,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=r,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,n=this._decorationsCache[t];if(!n){let r=e.range,o=e.options,s;if(o.isWholeLine){let a=this._coordinatesConverter.convertModelPositionToViewPosition(new K(r.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new K(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);s=new N(a.lineNumber,a.column,l.lineNumber,l.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(r,1);n=new vP(s,o),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,n=!1){let r=new N(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(r,t,n).inlineDecorations[0]}_getDecorationsInRange(e,t,n){let r=this._linesCollection.getDecorationsInRange(e,this.editorId,hI(this.configuration.options),t,n),o=e.startLineNumber,s=e.endLineNumber,a=[],l=0,c=[];for(let u=o;u<=s;u++)c[u-o]=[];for(let u=0,d=r.length;u=PRe.length)for(let e=1;e<=i;e++)PRe[e]=LAi(e);return PRe[i]}function LAi(i){return new Array(i+1).join(" ")}var BRe,Sae,Eae,PRe,W0t=D(()=>{wg();Nt();xE();Zb();BRe=class{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,n){this._assertVisible();let r=n>0?this._projectionData.breakOffsets[n-1]:0,o=this._projectionData.breakOffsets[n],s;if(this._projectionData.injectionOffsets!==null){let a=this._projectionData.injectionOffsets.map((c,u)=>new tp(0,0,c+1,this._projectionData.injectionOptions[u],0));s=tp.applyInjectedText(e.getLineContent(t),a).substring(r,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:o+1});return n>0&&(s=H0t(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){let r=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],r),r[0]}getViewLinesData(e,t,n,r,o,s,a){this._assertVisible();let l=this._projectionData,c=l.injectionOffsets,u=l.injectionOptions,d=null;if(c){d=[];let f=0,p=0;for(let g=0;g0?l.breakOffsets[g-1]:0,w=l.breakOffsets[g];for(;pw)break;if(A0?l.wrappedTextIndentLength:0,L=T+Math.max(_-A,0),M=T+Math.min(E-A,w-A);L!==M&&v.push(new uoe(L,M,I.inlineClassName,I.inlineClassNameAffectsLetterSpacing))}}if(E<=w)f+=C,p++;else break}}}let h;c?h=e.tokenization.getLineTokens(t).withInserted(c.map((f,p)=>({offset:f,text:u[p].content,tokenMetadata:To.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let f=n;f0?r.wrappedTextIndentLength:0,s=n>0?r.breakOffsets[n-1]:0,a=r.breakOffsets[n],l=e.sliceAndInflate(s,a,o),c=l.getLineContent();n>0&&(c=H0t(r.wrappedTextIndentLength)+c);let u=this._projectionData.getMinOutputOffset(n)+1,d=c.length+1,h=n+1r+1?(t.push(new N(n,1,r,1)),n=a.startLineNumber,r=a.endLineNumber):a.endLineNumber>r&&(r=a.endLineNumber)}return t.push(new N(n,1,r,1)),t}var Tae,kae,Iae,zRe,Lae,VRe,U0t=D(()=>{Qt();Nt();We();sne();vs();xE();tae();W0t();NTe();Zb();Tae=class{constructor(e,t,n,r,o,s,a,l,c,u){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=r,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=u,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new zRe(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));let n=this.model.getLinesContent(),r=this.model.getInjectedTextDecorations(this._editorId),o=n.length,s=this.createLineBreaksComputer(),a=new cd(tp.fromDecorations(r));for(let g=0;gA.lineNumber===g+1);s.addRequest(n[g],v,t?t[g]:null)}let l=s.finalize(),c=[],u=this.hiddenAreasDecorationIds.map(g=>this.model.getDecorationRange(g)).sort(N.compareRangesUsingStarts),d=1,h=0,f=-1,p=f+1=d&&v<=h,w=Dae(l[g],!A);c[g]=w.getViewLineCount(),this.modelLineProjections[g]=w}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new mee(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){let t=e.map(h=>this.model.validateRange(h)),n=NAi(t),r=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(N.compareRangesUsingStarts);if(n.length===r.length){let h=!1;for(let f=0;f({range:h,options:zt.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,o);let s=n,a=1,l=0,c=-1,u=c+1=a&&f<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),p=!0):(d=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),p=!0)),p){let g=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,g)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,r,o){let s=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===n,c=this.wrappingIndent===r,u=this.wordBreak===o;if(s&&a&&l&&c&&u)return!1;let d=s&&a&&!l&&c&&u;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=r,this.wordBreak=o;let h=null;if(d){h=[];for(let f=0,p=this.modelLineProjections.length;f2&&!this.modelLineProjections[t-2].isVisible(),s=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,a=0,l=[],c=[];for(let u=0,d=r.length;ul?(u=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=u+l-1,p=d+1,g=p+(o-l)-1,c=!0):ot?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);let r=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.guides.getActiveIndentGuide(r.lineNumber,o.lineNumber,s.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,r=t.remainder;return new kae(n+1,r)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),r=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new K(e.modelLineNumber,r)}getModelEndPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),r=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new K(e.modelLineNumber,r)}getViewLineInfosGroupedByModelRanges(e,t){let n=this.getViewLineInfo(e),r=this.getViewLineInfo(t),o=new Array,s=this.getModelStartPositionOfViewLine(n),a=new Array;for(let l=n.modelLineNumber;l<=r.modelLineNumber;l++){let c=this.modelLineProjections[l-1];if(c.isVisible()){let u=l===n.modelLineNumber?n.modelLineWrappedLineIdx:0,d=l===r.modelLineNumber?r.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=u;h{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=u.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumberu.modelLineWrappedLineIdx)return}let g=this.convertModelPositionToViewPosition(u.modelLineNumber,f.horizontalLine.endColumn),v=this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return v.lineNumber===u.modelLineWrappedLineIdx?new Jb(f.visibleColumn,p,f.className,new Ix(f.horizontalLine.top,g.column),-1,-1):v.lineNumber!!f))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],s=[],a=[],l=n.lineNumber-1,c=r.lineNumber-1,u=null;for(let p=l;p<=c;p++){let g=this.modelLineProjections[p];if(g.isVisible()){let v=g.getViewLineNumberOfModelPosition(0,p===l?n.column:1),A=g.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(p+1)),w=A-v+1,C=0;w>1&&g.getViewLineMinColumn(this.model,p+1,A)===1&&(C=v===0?1:2),s.push(w),a.push(C),u===null&&(u=new K(p+1,0))}else u!==null&&(o=o.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,p)),u=null)}u!==null&&(o=o.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,r.lineNumber)),u=null);let d=t-e+1,h=new Array(d),f=0;for(let p=0,g=o.length;pt&&(p=!0,f=t-o+1),d.getViewLinesData(this.model,c+1,h,f,o-e,n,l),o+=f,p)break}return l}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let r=this.projectedModelLineLineCounts.getIndexOf(e-1),o=r.index,s=r.remainder,a=this.modelLineProjections[o],l=a.getViewLineMinColumn(this.model,o+1,s),c=a.getViewLineMaxColumn(this.model,o+1,s);tc&&(t=c);let u=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new K(o+1,u)).equals(n)?new K(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){let n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),r=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new N(n.lineNumber,n.column,r.lineNumber,r.column)}convertViewPositionToModelPosition(e,t){let n=this.getViewLineInfo(e),r=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new K(n.modelLineNumber,r))}convertViewRangeToModelRange(e){let t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new N(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,r=!1,o=!1){let s=this.model.validatePosition(new K(e,t)),a=s.lineNumber,l=s.column,c=a-1,u=!1;if(o)for(;c0&&!this.modelLineProjections[c].isVisible();)c--,u=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new K(r?0:1,1);let d=1+this.projectedModelLineLineCounts.getPrefixSum(c),h;return u?o?h=this.modelLineProjections[c].getViewPositionOfModelPosition(d,1,n):h=this.modelLineProjections[c].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(c+1),n):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(d,l,n),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return N.fromPositions(n)}else{let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),r=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new N(n.lineNumber,n.column,r.lineNumber,r.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){let o=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(o,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;let r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,r,o){let s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new N(s.lineNumber,1,a.lineNumber,a.column),t,n,r,o);let l=[],c=s.lineNumber-1,u=a.lineNumber-1,d=null;for(let g=c;g<=u;g++)if(this.modelLineProjections[g].isVisible())d===null&&(d=new K(g+1,g===c?s.column:1));else if(d!==null){let A=this.model.getLineMaxColumn(g);l=l.concat(this.model.getDecorationsInRange(new N(d.lineNumber,d.column,g,A),t,n,r)),d=null}d!==null&&(l=l.concat(this.model.getDecorationsInRange(new N(d.lineNumber,d.column,a.lineNumber,a.column),t,n,r)),d=null),l.sort((g,v)=>{let A=N.compareRangesUsingStarts(g.range,v.range);return A===0?g.idv.id?1:0:A});let h=[],f=0,p=null;for(let g of l){let v=g.id;p!==v&&(p=v,h[f++]=g)}return h}getInjectedTextAt(e){let t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){let n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){let t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}};kae=class{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}},Iae=class{constructor(e,t){this.modelRange=e,this.viewLines=t}},zRe=class{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,r){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,r)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}},Lae=class{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new VRe(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,r){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n,r)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new HP(t,n)}onModelLinesInserted(e,t,n,r){return new WP(t,n)}onModelLineChanged(e,t,n){return[!1,new AH(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){let n=t-e+1,r=new Array(n);for(let o=0;ot)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}});var XL,Nae,j0t=D(()=>{tl();XL=Hu.Right,Nae=class{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*XL/8))}reset(e){let t=Math.ceil((e+1)*XL/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<{Qt();Jt();Ho();ae();Si();Pt();Ks();P0t();lm();Nt();We();xE();tr();Yf();Uke();tae();z0t();lRe();Zb();ORe();gae();U0t();j0t();MAi=!0,Mae=class extends W{constructor(e,t,n,r,o,s,a,l,c,u){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=c,this._transactionalTarget=u,this.hiddenAreasModel=new URe,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new iae,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Ux(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new di(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=HRe.create(this.model),this.glyphLanes=new Nae(0),MAi&&this.model.isTooLargeForTokenization())this._lines=new Lae(this.model);else{let d=this._configuration.options,h=d.get(50),f=d.get(140),p=d.get(147),g=d.get(139),v=d.get(130);this._lines=new Tae(this._editorId,this.model,r,o,h,this.model.getOptions().tabSize,f,p.wrappingColumn,g,v)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new bae(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new yae(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll(d=>{d.scrollTopChanged&&this._handleVisibleLinesChanged(),d.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Jse(d)),this._eventDispatcher.emitOutgoingEvent(new oae(d.oldScrollWidth,d.oldScrollLeft,d.oldScrollHeight,d.oldScrollTop,d.scrollWidth,d.scrollLeft,d.scrollHeight,d.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(d=>{this._eventDispatcher.emitOutgoingEvent(d)})),this._decorations=new wae(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(d=>{try{let h=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(h,d)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(BP.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new $se)})),this._register(this._themeService.onDidColorThemeChange(d=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Xse(d))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){let e=this.viewLayout.getLinesViewportData(),t=new N(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Yse(e)),this._eventDispatcher.emitOutgoingEvent(new rae(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new jse)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Qse)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){let e=new K(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new Rae(t,this._viewportStart.startLineDelta)}return new Rae(null,0)}_onConfigurationChanged(e,t){let n=this._captureStableViewport(),r=this._configuration.options,o=r.get(50),s=r.get(140),a=r.get(147),l=r.get(139),c=r.get(130);this._lines.setWrappingSettings(o,s,a.wrappingColumn,l,c)&&(e.emitViewEvent(new YL),e.emitViewEvent(new KL),e.emitViewEvent(new u1(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new u1(null))),t.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new u1(null))),e.emitViewEvent(new Gse(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Ux.shouldRecreate(t)&&(this.cursorConfig=new Ux(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{let n=this._eventDispatcher.beginEmitViewEvents(),r=!1,o=!1,s=e instanceof wE?e.rawContentChangedEvent.changes:e.changes,a=e instanceof wE?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(let d of s)switch(d.changeType){case 4:{for(let h=0;h!g.ownerId||g.ownerId===this._editorId)),l.addRequest(f,p,null)}break}case 2:{let h=null;d.injectedText&&(h=d.injectedText.filter(f=>!f.ownerId||f.ownerId===this._editorId)),l.addRequest(d.detail,h,null);break}}let c=l.finalize(),u=new cd(c);for(let d of s)switch(d.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new YL),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),r=!0;break}case 3:{let h=this._lines.onModelLinesDeleted(a,d.fromLineNumber,d.toLineNumber);h!==null&&(n.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),r=!0;break}case 4:{let h=u.takeCount(d.detail.length),f=this._lines.onModelLinesInserted(a,d.fromLineNumber,d.toLineNumber,h);f!==null&&(n.emitViewEvent(f),this.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),r=!0;break}case 2:{let h=u.dequeue(),[f,p,g,v]=this._lines.onModelLineChanged(a,d.lineNumber,h);o=f,p&&n.emitViewEvent(p),g&&(n.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),v&&(n.emitViewEvent(v),this.viewLayout.onLinesDeleted(v.fromLineNumber,v.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!r&&o&&(n.emitViewEvent(new KL),n.emitViewEvent(new u1(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}let t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){let n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){let r=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),o=this.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber);this.viewLayout.setScrollPosition({scrollTop:o+this._viewportStart.startLineDelta},1)}}try{let n=this._eventDispatcher.beginEmitViewEvents();e instanceof wE&&n.emitOutgoingEvent(new fae(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let n=0,r=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new Kse),this.cursorConfig=new Ux(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new hae(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Ux(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new dae(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{let t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new YL),t.emitViewEvent(new KL),t.emitViewEvent(new u1(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Ux(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new pae(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new u1(e)),this._eventDispatcher.emitOutgoingEvent(new uae(e))}))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);let n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;let r=this._captureStableViewport(),o=!1;try{let s=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(n),o&&(s.emitViewEvent(new YL),s.emitViewEvent(new KL),s.emitViewEvent(new u1(null)),this._cursor.onLineMappingChanged(s),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());let a=r.viewportStartModelPosition?.lineNumber;a&&n.some(c=>c.startLineNumber<=a&&a<=c.endLineNumber)||r.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new aae)}getVisibleRangesPlusViewportAboveBelow(){let e=this._configuration.options.get(146),t=this._configuration.options.get(67),n=Math.max(20,Math.round(e.height/t)),r=this.viewLayout.getLinesViewportData(),o=Math.max(1,r.completelyVisibleStartLineNumber-n),s=Math.min(this.getLineCount(),r.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new N(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){let e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){let t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];let r=[],o=0,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let u=0,d=n.length;ul||(s"u")return this._reduceRestoreStateCompatibility(e);let t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),r=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:r}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,r){return this._lines.getViewLinesBracketGuides(e,t,n,r)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){let t=Vo(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){let t=qc(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){let r=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,r)}getViewLineRenderingData(e){let t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){let n=this.model.mightContainRTL(),r=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(t=[...t,...s.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new dh(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,n,r,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){let r=this._lines.getViewLinesData(e,t,n);return new coe(this.getTabSize(),r)}getAllOverviewRulerDecorations(e){let t=this.model.getOverviewRulerDecorations(this._editorId,hI(this._configuration.options)),n=new WRe;for(let r of t){let o=r.options,s=o.overviewRuler;if(!s)continue;let a=s.position;if(a===0)continue;let l=s.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(r.range.startLineNumber,r.range.startColumn),u=this.coordinatesConverter.getViewLineNumberOfModelPosition(r.range.endLineNumber,r.range.endColumn);n.accept(l,o.zIndex,c,u,a)}return n.asArray}_invalidateDecorationsColorCache(){let e=this.model.getOverviewRulerDecorations();for(let t of e)t.options.overviewRuler?.invalidateCachedColor(),t.options.minimap?.invalidateCachedColor()}getValueInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){let n=this.coordinatesConverter.convertViewPositionToModelPosition(e),r=this.model.modifyPosition(n,t);return this.coordinatesConverter.convertModelPositionToViewPosition(r)}deduceModelPositionRelativeToViewPosition(e,t,n){let r=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);let s=this.model.getOffsetAt(r)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,n){let r=n?`\r -`:this.model.getEOL();e=e.slice(0),e.sort(N.compareRangesUsingStarts);let o=!1,s=!1;for(let l of e)l.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";let l=e.map(u=>u.startLineNumber),c="";for(let u=0;u0&&l[u-1]===l[u]||(c+=this.model.getLineContent(l[u])+r);return c}if(o&&t){let l=[],c=0;for(let u of e){let d=u.startLineNumber;u.isEmpty()?d!==c&&l.push(this.model.getLineContent(d)):l.push(this.model.getValueInRange(u,n?2:0)),c=d}return l.length===1?l[0]:l}let a=[];for(let l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,n?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){let n=this.model.getLanguageId();if(n===ps||e.length!==1)return null;let r=e[0];if(r.isEmpty()){if(!t)return null;let u=r.startLineNumber;r=new N(u,this.model.getLineMinColumn(u),u,this.model.getLineMaxColumn(u))}let o=this._configuration.options.get(50),s=this._getColorMap(),l=/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===_l.fontFamily,c;return l?c=_l.fontFamily:(c=o.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${_l.fontFamily}`),{mode:n,html:`
    `+this._getHTMLToCopy(r,s)+"
    "}}_getHTMLToCopy(e,t){let n=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=this.getTabSize(),l="";for(let c=n;c<=o;c++){let u=this.model.tokenization.getLineTokens(c),d=u.getLineContent(),h=c===n?r-1:0,f=c===o?s-1:d.length;d===""?l+="
    ":l+=Zdt(d,u.inflate(),t,h,f,a,Nr)}return l}_getColorMap(){let e=Wn.getColorMap(),t=["#000000"];if(e)for(let n=1,r=e.length;nthis._cursor.setStates(r,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(r=>this._cursor.setSelections(r,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new cae);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(r=>this._cursor.executeEdits(r,e,t,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,r,o){this._executeCursorEdit(s=>this._cursor.compositionType(s,e,t,n,r,o))}paste(e,t,n,r){this._executeCursorEdit(o=>this._cursor.paste(o,e,t,n,r))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealAllCursors(e,t,n=!1){this._withViewEventsCollector(r=>this._cursor.revealAll(r,e,n,0,t,0))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(r=>this._cursor.revealPrimary(r,e,n,0,t,0))}revealTopMostCursor(e){let t=this._cursor.getTopMostViewPosition(),n=new N(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(r=>r.emitViewEvent(new Yx(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){let t=this._cursor.getBottomMostViewPosition(),n=new N(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(r=>r.emitViewEvent(new Yx(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,r,o){this._withViewEventsCollector(s=>s.emitViewEvent(new Yx(e,!1,n,null,r,t,o)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new eae),this._eventDispatcher.emitOutgoingEvent(new sae))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{let t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}},HRe=class i{static create(e){let t=e._setTrackedRange(null,new N(1,1,1,1),1);return new i(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,r,o){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=r,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){let n=e.coordinatesConverter.convertViewPositionToModelPosition(new K(t,e.getLineMinColumn(t))),r=e.model._setTrackedRange(this._modelTrackedRange,new N(n.lineNumber,n.column,n.lineNumber,n.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=r,this._startLineDelta=s-o}invalidate(){this._isValid=!1}},WRe=class{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,r,o){let s=this._asMap[e];if(s){let a=s.data,l=a[a.length-3],c=a[a.length-1];if(l===o&&c+1>=n){r>c&&(a[a.length-1]=r);return}a.push(o,n,r)}else{let a=new NL(e,t,[o,n,r]);this._asMap[e]=a,this.asArray.push(a)}}},URe=class{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){let n=this.hiddenAreas.get(e);n&&Q0t(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;let e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>RAi(t,n),[]);return Q0t(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}};Rae=class{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;let n=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),r=t.getVerticalOffsetForLineNumber(n.lineNumber);t.setScrollPosition({scrollTop:r+this.startLineDelta},1)}}});function jRe(i){return PAi+encodeURIComponent(i.toString())+BAi}function HAi(i){return zAi+encodeURIComponent(i.toString())+VAi}var FAi,Kx,ZL,zE,OAi,QRe,Fae,au,GRe,qRe,YRe,KRe,PAi,BAi,zAi,VAi,wH=D(()=>{cbt();Ye();Lt();et();ae();bl();ubt();qp();pbt();hoe();ii();fs();S0t();T0t();JMe();k0t();Ks();zb();tm();Nt();We();Hn();sH();_Re();JV();vn();ks();vs();Ui();N0t();G0t();Oe();oh();Xn();Wt();ht();IL();_c();eo();Zn();fr();FAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Kx=function(i,e){return function(t,n){e(t,n,i)}},zE=class extends W{static{ZL=this}static{this.dropIntoEditorDecorationOptions=zt.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,t,n,r,o,s,a,l,c,u,d,h){super(),this.languageConfigurationService=d,this._deliveryQueue=_qe(),this._contributions=this._register(new Wse),this._onDidDispose=this._register(new G),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new au(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Fae({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Fae({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new au(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new au(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new au(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new au(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new au(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new au(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new au(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new au(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new au(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new au(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new G({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new G),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new G),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),o.willCreateCodeEditor();let f={...t};this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++OAi,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,n.contextMenuId??(n.isSimpleWidget?tt.SimpleEditorContext:tt.EditorContext),f,u)),this._register(this._configuration.onDidChange(v=>{this._onDidChangeConfiguration.fire(v);let A=this._configuration.options;if(v.hasChanged(146)){let w=A.get(146);this._onDidLayoutChange.fire(w)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=o,this._commandService=s,this._themeService=l,this._register(new GRe(this,this._contextKeyService)),this._register(new qRe(this,this._contextKeyService,h)),this._instantiationService=this._register(r.createChild(new am([Ze,this._contextKeyService]))),this._modelData=null,this._focusTracker=new YRe(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let p;Array.isArray(n.contributions)?p=n.contributions:p=sy.getEditorContributions(),this._contributions.initialize(this,p,this._instantiationService);for(let v of sy.getEditorActions()){if(this._actions.has(v.id)){pt(new Error(`Cannot have two actions with the same id ${v.id}`));continue}let A=new VP(v.id,v.label,v.alias,v.metadata,v.precondition??void 0,w=>this._instantiationService.invokeFunction(C=>Promise.resolve(v.runEditorCommand(C,this,w))),this._contextKeyService);this._actions.set(A.id,A)}let g=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new cZ(this._domElement,{onDragOver:v=>{if(!g())return;let A=this.getTargetAtClientPoint(v.clientX,v.clientY);A?.position&&this.showDropIndicatorAt(A.position)},onDrop:async v=>{if(!g()||(this.removeDropIndicator(),!v.dataTransfer))return;let A=this.getTargetAtClientPoint(v.clientX,v.clientY);A?.position&&this._onDropIntoEditor.fire({position:A.position,event:v})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n,r){return new foe(e,t,n,this._domElement,r)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return zx.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Ma.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";let t=!!(e&&e.preserveBOM),n=0;return e&&e.lineEnding&&e.lineEnding===` +`+l;return n?new mN(o,u,!0):new gN(o,u,-1,c.length-l.length,!0)}else if(r.indentAction===Zr.Outdent){let l=fae(e,r.indentation);return CN(o,` +`+e.normalizeIndentation(l+r.appendText),n)}}let s=t.getLineContent(o.startLineNumber),a=wn(s).substring(0,o.startColumn-1);if(e.autoIndent>=4){let l=Nmt(e.autoIndent,t,o,{unshiftIndent:c=>fae(e,c),shiftIndent:c=>mRe(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,o.getEndPosition()),u=o.endColumn,d=t.getLineContent(o.endLineNumber),h=Hr(d);if(h>=0?o=o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,h+1)):o=o.setEndPosition(o.endLineNumber,t.getLineMaxColumn(o.endLineNumber)),n)return new mN(o,` +`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return u<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new gN(o,` +`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return CN(o,` +`+e.normalizeIndentation(a),n)}static lineInsertBefore(e,t,n){if(t===null||n===null)return[];let o=[];for(let r=0,s=n.length;rthis._compositionType(n,u,r,s,a,l));return new sc(4,c,{shouldPushStackElementBefore:pae(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,o,r,s){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-o),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+r),u=new R(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(u)===n&&s===0?null:new gN(u,n,0,s)}},dae=class{static getEdits(e,t,n){let o=[];for(let s=0,a=t.length;s1){let a;for(a=n-1;a>=1;a--){let u=t.getLineContent(a);if(tu(u)>=0)break}if(a<1)return null;let l=t.getLineMaxColumn(a),c=gC(e.autoIndent,t,new R(a,l,a,l),e.languageConfigurationService);c&&(r=c.indentation+c.appendText)}return o&&(o===Zr.Indent&&(r=mRe(e,r)),o===Zr.Outdent&&(r=fae(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,n,o){let r="",s=n.getStartPosition();if(e.insertSpaces){let a=e.visibleColumnFromColumn(t,s),l=e.indentSize,c=l-a%l;for(let u=0;u{vB();dRe();Sm();VW();Qg=class{static indent(e,t,n){if(t===null||n===null)return[];let o=[];for(let r=0,s=n.length;r{Be();Bt();(function(i){i.editorSimpleInput=new ze("editorSimpleInput",!1,!0),i.editorTextFocus=new ze("editorTextFocus",!1,y("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),i.focus=new ze("editorFocus",!1,y("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),i.textInputFocus=new ze("textInputFocus",!1,y("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),i.readOnly=new ze("editorReadonly",!1,y("editorReadonly","Whether the editor is read-only")),i.inDiffEditor=new ze("inDiffEditor",!1,y("inDiffEditor","Whether the context is a diff editor")),i.isEmbeddedDiffEditor=new ze("isEmbeddedDiffEditor",!1,y("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),i.inMultiDiffEditor=new ze("inMultiDiffEditor",!1,y("inMultiDiffEditor","Whether the context is a multi diff editor")),i.multiDiffEditorAllCollapsed=new ze("multiDiffEditorAllCollapsed",void 0,y("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),i.hasChanges=new ze("diffEditorHasChanges",!1,y("diffEditorHasChanges","Whether the diff editor has changes")),i.comparingMovedCode=new ze("comparingMovedCode",!1,y("comparingMovedCode","Whether a moved code block is selected for comparison")),i.accessibleDiffViewerVisible=new ze("accessibleDiffViewerVisible",!1,y("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),i.diffEditorRenderSideBySideInlineBreakpointReached=new ze("diffEditorRenderSideBySideInlineBreakpointReached",!1,y("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),i.diffEditorInlineMode=new ze("diffEditorInlineMode",!1,y("diffEditorInlineMode","Whether inline mode is active")),i.diffEditorOriginalWritable=new ze("diffEditorOriginalWritable",!1,y("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),i.diffEditorModifiedWritable=new ze("diffEditorModifiedWritable",!1,y("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),i.diffEditorOriginalUri=new ze("diffEditorOriginalUri","",y("diffEditorOriginalUri","The uri of the original document")),i.diffEditorModifiedUri=new ze("diffEditorModifiedUri","",y("diffEditorModifiedUri","The uri of the modified document")),i.columnSelection=new ze("editorColumnSelection",!1,y("editorColumnSelection","Whether `editor.columnSelection` is enabled")),i.writable=i.readOnly.toNegated(),i.hasNonEmptySelection=new ze("editorHasSelection",!1,y("editorHasSelection","Whether the editor has text selected")),i.hasOnlyEmptySelection=i.hasNonEmptySelection.toNegated(),i.hasMultipleSelections=new ze("editorHasMultipleSelections",!1,y("editorHasMultipleSelections","Whether the editor has multiple selections")),i.hasSingleSelection=i.hasMultipleSelections.toNegated(),i.tabMovesFocus=new ze("editorTabMovesFocus",!1,y("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),i.tabDoesNotMoveFocus=i.tabMovesFocus.toNegated(),i.isInEmbeddedEditor=new ze("isInEmbeddedEditor",!1,!0),i.canUndo=new ze("canUndo",!1,!0),i.canRedo=new ze("canRedo",!1,!0),i.hoverVisible=new ze("editorHoverVisible",!1,y("editorHoverVisible","Whether the editor hover is visible")),i.hoverFocused=new ze("editorHoverFocused",!1,y("editorHoverFocused","Whether the editor hover is focused")),i.stickyScrollFocused=new ze("stickyScrollFocused",!1,y("stickyScrollFocused","Whether the sticky scroll is focused")),i.stickyScrollVisible=new ze("stickyScrollVisible",!1,y("stickyScrollVisible","Whether the sticky scroll is visible")),i.standaloneColorPickerVisible=new ze("standaloneColorPickerVisible",!1,y("standaloneColorPickerVisible","Whether the standalone color picker is visible")),i.standaloneColorPickerFocused=new ze("standaloneColorPickerFocused",!1,y("standaloneColorPickerFocused","Whether the standalone color picker is focused")),i.inCompositeEditor=new ze("inCompositeEditor",void 0,y("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),i.notInCompositeEditor=i.inCompositeEditor.toNegated(),i.languageId=new ze("editorLangId","",y("editorLangId","The language identifier of the editor")),i.hasCompletionItemProvider=new ze("editorHasCompletionItemProvider",!1,y("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),i.hasCodeActionsProvider=new ze("editorHasCodeActionsProvider",!1,y("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),i.hasCodeLensProvider=new ze("editorHasCodeLensProvider",!1,y("editorHasCodeLensProvider","Whether the editor has a code lens provider")),i.hasDefinitionProvider=new ze("editorHasDefinitionProvider",!1,y("editorHasDefinitionProvider","Whether the editor has a definition provider")),i.hasDeclarationProvider=new ze("editorHasDeclarationProvider",!1,y("editorHasDeclarationProvider","Whether the editor has a declaration provider")),i.hasImplementationProvider=new ze("editorHasImplementationProvider",!1,y("editorHasImplementationProvider","Whether the editor has an implementation provider")),i.hasTypeDefinitionProvider=new ze("editorHasTypeDefinitionProvider",!1,y("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),i.hasHoverProvider=new ze("editorHasHoverProvider",!1,y("editorHasHoverProvider","Whether the editor has a hover provider")),i.hasDocumentHighlightProvider=new ze("editorHasDocumentHighlightProvider",!1,y("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),i.hasDocumentSymbolProvider=new ze("editorHasDocumentSymbolProvider",!1,y("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),i.hasReferenceProvider=new ze("editorHasReferenceProvider",!1,y("editorHasReferenceProvider","Whether the editor has a reference provider")),i.hasRenameProvider=new ze("editorHasRenameProvider",!1,y("editorHasRenameProvider","Whether the editor has a rename provider")),i.hasSignatureHelpProvider=new ze("editorHasSignatureHelpProvider",!1,y("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),i.hasInlayHintsProvider=new ze("editorHasInlayHintsProvider",!1,y("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),i.hasDocumentFormattingProvider=new ze("editorHasDocumentFormattingProvider",!1,y("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),i.hasDocumentSelectionFormattingProvider=new ze("editorHasDocumentSelectionFormattingProvider",!1,y("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),i.hasMultipleDocumentFormattingProvider=new ze("editorHasMultipleDocumentFormattingProvider",!1,y("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),i.hasMultipleDocumentSelectionFormattingProvider=new ze("editorHasMultipleDocumentSelectionFormattingProvider",!1,y("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(V||(V={}))});function _B(i,e){Oa.registerKeybindingRule({id:i,primary:e,when:uui,weight:Fn+1})}function Pmt(i){return i.register(),i}function _N(i,e){Pmt(new bae("default:"+i,i)),Pmt(new bae(i,i,e))}var Fn,is,pu,CB,HW,Rl,uui,aD,bae,WW=D(()=>{Be();Kh();gn();Zl();Jt();hs();Lmt();Sm();Qse();qse();gae();kt();Ue();An();Bt();Tx();Ye();VW();Fn=0,is=class extends Eo{runEditorCommand(e,t,n){let o=t._getViewModel();o&&this.runCoreEditorCommand(o,n||{})}};(function(i){let e=function(n){if(!zr(n))return!1;let o=n;return!(!Na(o.to)||!Xa(o.by)&&!Na(o.by)||!Xa(o.value)&&!Vp(o.value)||!Xa(o.revealCursor)&&!XK(o.revealCursor))};i.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},i.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},i.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function t(n){let o;switch(n.to){case i.RawDirection.Up:o=1;break;case i.RawDirection.Right:o=2;break;case i.RawDirection.Down:o=3;break;case i.RawDirection.Left:o=4;break;default:return null}let r;switch(n.by){case i.RawUnit.Line:r=1;break;case i.RawUnit.WrappedLine:r=2;break;case i.RawUnit.Page:r=3;break;case i.RawUnit.HalfPage:r=4;break;case i.RawUnit.Editor:r=5;break;case i.RawUnit.Column:r=6;break;default:r=2}let s=Math.floor(n.value||1),a=!!n.revealCursor;return{direction:o,unit:r,value:s,revealCursor:a,select:!!n.select}}i.parse=t})(pu||(pu={}));(function(i){let e=function(t){if(!zr(t))return!1;let n=t;return!(!Vp(n.lineNumber)&&!Na(n.lineNumber)||!Xa(n.at)&&!Na(n.at))};i.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},i.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(CB||(CB={}));HW=class{constructor(e){e.addImplementation(1e4,"code-editor",(t,n)=>{let o=t.get(ei).getFocusedCodeEditor();return o&&o.hasTextFocus()?this._runEditorCommand(t,o,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{let o=ds();return o&&["input","textarea"].indexOf(o.tagName.toLowerCase())>=0?(this.runDOMCommand(o),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{let o=t.get(ei).getActiveCodeEditor();return o?(o.focus(),this._runEditorCommand(t,o,n)):!1})}_runEditorCommand(e,t,n){let o=this.runEditorCommand(e,t,n);return o||!0}};(function(i){class e extends is{constructor(w){super(w),this._inSelectionMode=w.inSelectionMode}runCoreEditorCommand(w,C){if(!C.position)return;w.model.pushStackElement(),w.setCursorStates(C.source,3,[xa.moveTo(w,w.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)])&&C.revealType!==2&&w.revealAllCursors(C.source,!0,!0)}}i.MoveTo=Qe(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),i.MoveToSelect=Qe(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends is{runCoreEditorCommand(w,C){w.model.pushStackElement();let _=this._getColumnSelectResult(w,w.getPrimaryCursorState(),w.getCursorColumnSelectData(),C);_!==null&&(w.setCursorStates(C.source,3,_.viewStates.map(E=>ji.fromViewState(E))),w.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:_.fromLineNumber,fromViewVisualColumn:_.fromVisualColumn,toViewLineNumber:_.toLineNumber,toViewVisualColumn:_.toVisualColumn}),_.reversed?w.revealTopMostCursor(C.source):w.revealBottomMostCursor(C.source))}}i.ColumnSelect=Qe(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(v,w,C,_){if(typeof _.position>"u"||typeof _.viewPosition>"u"||typeof _.mouseColumn>"u")return null;let E=v.model.validatePosition(_.position),I=v.coordinatesConverter.validateViewPosition(new J(_.viewPosition.lineNumber,_.viewPosition.column),E),T=_.doColumnSelect?C.fromViewLineNumber:I.lineNumber,N=_.doColumnSelect?C.fromViewVisualColumn:_.mouseColumn-1;return rD.columnSelect(v.cursorConfig,v,T,N,I.lineNumber,_.mouseColumn-1)}}),i.CursorColumnSelectLeft=Qe(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(v,w,C,_){return rD.columnSelectLeft(v.cursorConfig,v,C)}}),i.CursorColumnSelectRight=Qe(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(v,w,C,_){return rD.columnSelectRight(v.cursorConfig,v,C)}});class n extends t{constructor(w){super(w),this._isPaged=w.isPaged}_getColumnSelectResult(w,C,_,E){return rD.columnSelectUp(w.cursorConfig,w,_,this._isPaged)}}i.CursorColumnSelectUp=Qe(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:3600,linux:{primary:0}}})),i.CursorColumnSelectPageUp=Qe(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends t{constructor(w){super(w),this._isPaged=w.isPaged}_getColumnSelectResult(w,C,_,E){return rD.columnSelectDown(w.cursorConfig,w,_,this._isPaged)}}i.CursorColumnSelectDown=Qe(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:3602,linux:{primary:0}}})),i.CursorColumnSelectPageDown=Qe(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends is{constructor(){super({id:"cursorMove",precondition:void 0,metadata:zW.metadata})}runCoreEditorCommand(w,C){let _=zW.parse(C);_&&this._runCursorMove(w,C.source,_)}_runCursorMove(w,C,_){w.model.pushStackElement(),w.setCursorStates(C,3,r._move(w,w.getCursorStates(),_)),w.revealAllCursors(C,!0)}static _move(w,C,_){let E=_.select,I=_.value;switch(_.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return xa.simpleMove(w,C,_.direction,E,I,_.unit);case 11:case 13:case 12:case 14:return xa.viewportMove(w,C,_.direction,E,I);default:return null}}}i.CursorMoveImpl=r,i.CursorMove=Qe(new r);class s extends is{constructor(w){super(w),this._staticArgs=w.args}runCoreEditorCommand(w,C){let _=this._staticArgs;this._staticArgs.value===-1&&(_={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:C.pageSize||w.cursorConfig.pageSize}),w.model.pushStackElement(),w.setCursorStates(C.source,3,xa.simpleMove(w,w.getCursorStates(),_.direction,_.select,_.value,_.unit)),w.revealAllCursors(C.source,!0)}}i.CursorLeft=Qe(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),i.CursorLeftSelect=Qe(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1039}})),i.CursorRight=Qe(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),i.CursorRightSelect=Qe(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1041}})),i.CursorUp=Qe(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),i.CursorUpSelect=Qe(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),i.CursorPageUp=Qe(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:11}})),i.CursorPageUpSelect=Qe(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1035}})),i.CursorDown=Qe(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),i.CursorDownSelect=Qe(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),i.CursorPageDown=Qe(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:12}})),i.CursorPageDownSelect=Qe(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1036}})),i.CreateCursor=Qe(new class extends is{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(v,w){if(!w.position)return;let C;w.wholeLine?C=xa.line(v,v.getPrimaryCursorState(),!1,w.position,w.viewPosition):C=xa.moveTo(v,v.getPrimaryCursorState(),!1,w.position,w.viewPosition);let _=v.getCursorStates();if(_.length>1){let E=C.modelState?C.modelState.position:null,I=C.viewState?C.viewState.position:null;for(let T=0,N=_.length;TI&&(E=I);let T=new R(E,1,E,v.model.getLineMaxColumn(E)),N=0;if(C.at)switch(C.at){case CB.RawAtArgument.Top:N=3;break;case CB.RawAtArgument.Center:N=1;break;case CB.RawAtArgument.Bottom:N=4;break;default:break}let L=v.coordinatesConverter.convertModelRangeToViewRange(T);v.revealRange(w.source,!1,L,N,0)}}),i.SelectAll=new class extends HW{constructor(){super(sat)}runDOMCommand(v){yl&&(v.focus(),v.select()),v.ownerDocument.execCommand("selectAll")}runEditorCommand(v,w,C){let _=w._getViewModel();_&&this.runCoreEditorCommand(_,C)}runCoreEditorCommand(v,w){v.model.pushStackElement(),v.setCursorStates("keyboard",3,[xa.selectAll(v,v.getPrimaryCursorState())])}},i.SetSelection=Qe(new class extends is{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(v,w){w.selection&&(v.model.pushStackElement(),v.setCursorStates(w.source,3,[ji.fromModelSelection(w.selection)]))}})})(Rl||(Rl={}));uui=ge.and(V.textInputFocus,V.columnSelection);_B(Rl.CursorColumnSelectLeft.id,1039);_B(Rl.CursorColumnSelectRight.id,1041);_B(Rl.CursorColumnSelectUp.id,1040);_B(Rl.CursorColumnSelectPageUp.id,1035);_B(Rl.CursorColumnSelectDown.id,1042);_B(Rl.CursorColumnSelectPageDown.id,1036);(function(i){class e extends Eo{runEditorCommand(n,o,r){let s=o._getViewModel();s&&this.runCoreEditingCommand(o,s,r||{})}}i.CoreEditingCommand=e,i.LineBreakInsert=Qe(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:V.writable,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,bC.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection)))}}),i.Outdent=Qe(new class extends e{constructor(){super({id:"outdent",precondition:V.writable,kbOpts:{weight:Fn,kbExpr:ge.and(V.editorTextFocus,V.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,Qg.outdent(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),i.Tab=Qe(new class extends e{constructor(){super({id:"tab",precondition:V.writable,kbOpts:{weight:Fn,kbExpr:ge.and(V.editorTextFocus,V.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,Qg.tab(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),i.DeleteLeft=Qe(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,o){let[r,s]=mC.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection),n.getCursorAutoClosedCharacters());r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(2)}}),i.DeleteRight=Qe(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Fn,kbExpr:V.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,o){let[r,s]=mC.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection));r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(3)}}),i.Undo=new class extends HW{constructor(){super(tTe)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,n,o){if(!(!n.hasModel()||n.getOption(92)===!0))return n.getModel().undo()}},i.Redo=new class extends HW{constructor(){super(iTe)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,n,o){if(!(!n.hasModel()||n.getOption(92)===!0))return n.getModel().redo()}}})(aD||(aD={}));bae=class extends oL{constructor(e,t,n){super({id:e,precondition:void 0,metadata:n}),this._handlerId=t}runCommand(e,t){let n=e.get(ei).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}};_N("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});_N("replacePreviousChar");_N("compositionType");_N("compositionStart");_N("compositionEnd");_N("paste");_N("cut")});var Aae,Bmt=D(()=>{WW();kt();wi();Aae=class{constructor(e,t,n,o){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=o}paste(e,t,n,o){this.commandDelegate.paste(e,t,n,o)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,o){this.commandDelegate.compositionType(e,t,n,o)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Rl.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):o?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Rl.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Rl.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,n){e=this._validateViewColumn(e),Rl.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),Rl.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Rl.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Rl.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Rl.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Rl.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Rl.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Rl.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Rl.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Rl.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Rl.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}});var UW,SB,bRe,vae=D(()=>{tl();Sy();Tt();_x();UW=class{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new fi("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;let n=this.getStartLineNumber(),o=this.getEndLineNumber();if(to)return null;let r=0,s=0;for(let l=n;l<=o;l++){let c=l-this._rendLineNumberStart;e<=l&&l<=t&&(s===0?(r=c,s=1):s++)}if(e=o&&a<=r&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)return null;let n=t-e+1,o=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=o)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r)return this._lines.splice(e-this._rendLineNumberStart,r-e+1);let s=[];for(let d=0;dn)continue;let l=Math.max(t,a.fromLineNumber),c=Math.min(n,a.toLineNumber);for(let u=l;u<=c;u++){let d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),o=!0}}return o}},SB=class{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new UW(this._lineFactory)}_createDomNode(){let e=Ai(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,o=t.length;ne})}constructor(e,t,n){this._domNode=e,this._lineFactory=t,this._viewportData=n}render(e,t,n,o){let r={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(r.rendLineNumberStart+r.linesLength-1t){let s=t,a=Math.min(n,r.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(r,s,a,o,t),r.linesLength+=a-s+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,s),r.linesLength-=s)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1n){let s=Math.max(0,n-r.rendLineNumberStart+1),l=r.linesLength-1-s+1;l>0&&(this._removeLinesAfter(r,l),r.linesLength-=l)}return this._finishRendering(r,!1,o),r}_renderUntouchedLines(e,t,n,o,r){let s=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=n;l++){let c=s+l;a[l].layoutLine(c,o[c-r],this._viewportData.lineHeight)}}_insertLinesBefore(e,t,n,o,r){let s=[],a=0;for(let l=t;l<=n;l++)s[a++]=this._lineFactory.createLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;a--){let l=e.lines[a];o[a]&&(l.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,n){let o=document.createElement("div");i._ttPolicy&&(t=i._ttPolicy.createHTML(t)),o.innerHTML=t;for(let r=0;r{tl();um();vae();bd();yae=class extends Ur{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new SB({createLine:()=>new ARe(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;let n=this._context.configuration.options.get(50);vr(this.domNode,n),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;en.shouldRender());for(let n=0,o=t.length;n'),r.appendString(s),r.appendString(""),!0)}layoutLine(e,t,n){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(n))}},wae=class extends yae{constructor(e){super(e);let n=this._context.configuration.options.get(146);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let n=this._context.configuration.options.get(146);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}},xae=class extends yae{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(146);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),vr(this.domNode,t.get(50))}onConfigurationChanged(e){let t=this._context.configuration.options;vr(this.domNode,t.get(50));let n=t.get(146);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}});var EB,vRe=D(()=>{kt();EB=class i{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return i.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let n={...e};return n.position&&(n.position=t.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=t.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,t)),n}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new J(e.afterLineNumber,1)).lineNumber}}}});var Vmt=D(()=>{});var Cae,Hmt=D(()=>{tl();Vmt();bd();Cae=class extends Ur{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=Ai(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,n=this._context.configuration.options.get(146),o=n.contentWidth-n.verticalScrollbarWidth;this.contentWidth!==o&&(this.contentWidth=o,e=!0);let r=n.contentLeft;return this.contentLeft!==r&&(this.contentLeft=r,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0,n=e.getDecorationsInViewport();for(let o of n){if(!o.options.blockClassName)continue;let r=this.blocks[t];r||(r=this.blocks[t]=Ai(document.createElement("div")),this.domNode.appendChild(r));let s,a;o.options.blockIsAfterEnd?(s=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!1),a=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0)):(s=e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!0),a=o.range.isEmpty()&&!o.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0));let[l,c,u,d]=o.options.blockPadding??[0,0,0,0];r.setClassName("blockDecorations-block "+o.options.blockClassName),r.setLeft(this.contentLeft-d),r.setWidth(this.contentWidth+d+c),r.setTop(s-e.scrollTop-l),r.setHeight(a-s+l+u),t++}for(let o=t;o{Ye();tl();bd();_ae=class extends Ur{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Ai(document.createElement("div")),_c.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Ai(document.createElement("div")),_c.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){let e=Object.keys(this._widgets);for(let t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){let t=new wRe(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n,o,r){this._widgets[e.getId()].setPosition(t,n,o,r),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let n=this._widgets[t];delete this._widgets[t];let o=n.domNode.domNode;o.remove(),o.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].prepareRender(e)}render(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].render(e)}},wRe=class{constructor(e,t,n){this._primaryAnchor=new SN(null,null),this._secondaryAnchor=new SN(null,null),this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=Ai(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;let o=this._context.configuration.options,r=o.get(146);this._fixedOverflowWidgets=o.get(42),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=o.get(67),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(this._lineHeight=t.get(67),e.hasChanged(146)){let n=t.get(146);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,n){this._affinity=e,this._primaryAnchor=o(t,this._context.viewModel,this._affinity),this._secondaryAnchor=o(n,this._context.viewModel,this._affinity);function o(r,s,a){if(!r)return new SN(null,null);let l=s.model.validatePosition(r);if(s.coordinatesConverter.modelPositionIsVisible(l)){let c=s.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new SN(r,c)}return new SN(r,null)}}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,n,o){this._setPosition(o,e,t),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,o){let r=e.top,s=r,a=e.top+e.height,l=o.viewportHeight-a,c=r-n,u=s>=n,d=a,h=l>=n,f=e.left;return f+t>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-t),fl){let h=d-(l-o);d-=h,n-=h}if(d=g,w=d+n<=h.height-A;return this._fixedOverflowWidgets?{fitsAbove:v,aboveTop:Math.max(u,g),fitsBelow:w,belowTop:d,left:p}:{fitsAbove:v,aboveTop:r,fitsBelow:w,belowTop:s,left:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new EN(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){let t=r(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),n=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,o=r(n,this._affinity,this._lineHeight);return{primary:t,secondary:o};function r(s,a,l){if(!s)return null;let c=e.visibleRangeForPosition(s);if(!c)return null;let u=s.column===1&&a===3?0:c.left,d=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.scrollTop;return new Sae(d,u,l)}}_reduceAnchorCoordinates(e,t,n){if(!t)return e;let o=this._context.configuration.options.get(50),r=t.left;return re.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&yRe(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&yRe(this._actual.afterRender,this._actual,this._renderData.position)}},SN=class{constructor(e,t){this.modelPosition=e,this.viewPosition=t}},EN=class{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}},Sae=class{constructor(e,t,n){this.top=e,this.left=t,this.height=n,this._anchorCoordinateBrand=void 0}}});var Umt=D(()=>{});var Eae,Dae,Tae,jmt=D(()=>{Umt();oD();Am();Wt();io();Qn();Jb();kt();Eae=class extends vf{constructor(e){super(),this._context=e;let t=this._context.configuration.options,n=t.get(146);this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new qe(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let r of this._selections)t.add(r.positionLineNumber);let n=Array.from(t);n.sort((r,s)=>r-s),Zi(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);let o=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==o&&(this._selectionIsEmpty=o,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(146);return this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=[];for(let s=t;s<=n;s++){let a=s-t;o[a]=""}if(this._wordWrap){let s=this._renderOne(e,!1);for(let a of this._cursorLineNumbers){let l=this._context.viewModel.coordinatesConverter,c=l.convertViewPositionToModelPosition(new J(a,1)).lineNumber,u=l.convertModelPositionToViewPosition(new J(c,1)).lineNumber,d=l.convertModelPositionToViewPosition(new J(c,this._context.viewModel.model.getLineMaxColumn(c))).lineNumber,h=Math.max(u,t),f=Math.min(d,n);for(let p=h;p<=f;p++){let g=p-t;o[g]=s}}}let r=this._renderOne(e,!0);for(let s of this._cursorLineNumbers){if(sn)continue;let a=s-t;o[a]=r}this._renderData=o}render(e,t){if(!this._renderData)return"";let n=t-e;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},Dae=class extends Eae{_renderOne(e,t){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}},Tae=class extends Eae{_renderOne(e,t){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}};ba((i,e)=>{let t=i.getColor(CLe);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||i.defines(_Le)){let n=i.getColor(_Le);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),ju(i.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}})});var Qmt=D(()=>{});var kae,Gmt=D(()=>{Qmt();oD();cO();Ue();kae=class extends vf{constructor(e){super(),this._context=e;let t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;let u=l.options.className,d=c.options.className;return ud?1:R.compareRangesUsingStarts(l.range,c.range)});let r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=[];for(let l=r;l<=s;l++){let c=l-r;a[c]=""}this._renderWholeLineDecorations(e,n,a),this._renderNormalDecorations(e,n,a),this._renderResult=a}_renderWholeLineDecorations(e,t,n){let o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let s=0,a=t.length;s',u=Math.max(l.range.startLineNumber,o),d=Math.min(l.range.endLineNumber,r);for(let h=u;h<=d;h++){let f=h-o;n[f]+=c}}}_renderNormalDecorations(e,t,n){let o=e.visibleRange.startLineNumber,r=null,s=!1,a=null,l=!1;for(let c=0,u=t.length;c';a[h]+=v}}}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}});var Iae,qmt=D(()=>{Ye();tl();Mg();bd();io();Iae=class extends Ur{constructor(e,t,n,o){super(e);let r=this._context.configuration.options,s=r.get(104),a=r.get(75),l=r.get(40),c=r.get(107),u={listenOnDomNode:n.domNode,className:"editor-scrollable "+RV(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new Py(t.domNode,u,this._context.viewLayout.getScrollable())),_c.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=Ai(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();let d=(h,f,p)=>{let g={};if(f){let A=h.scrollTop;A&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+A,h.scrollTop=0)}if(p){let A=h.scrollLeft;A&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+A,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(ce(n.domNode,"scroll",h=>d(n.domNode,!0,!0))),this._register(ce(t.domNode,"scroll",h=>d(t.domNode,!0,!1))),this._register(ce(o.domNode,"scroll",h=>d(o.domNode,!0,!1))),this._register(ce(this.scrollbarDomNode.domNode,"scroll",h=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(146);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(73).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){let t=this._context.configuration.options,n=t.get(104),o=t.get(75),r=t.get(40),s=t.get(107),a={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:o,fastScrollSensitivity:r,scrollPredominantAxis:s};this.scrollbar.updateOptions(a)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+RV(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}});var Ymt=D(()=>{});var DN,xRe,CRe,DB,Lae,_Re,SRe,ERe,Nae=D(()=>{tl();Wt();Ymt();oD();bd();kt();Ue();ol();DN=class{constructor(e,t,n,o,r){this.startLineNumber=e,this.endLineNumber=t,this.className=n,this.tooltip=o,this._decorationToRenderBrand=void 0,this.zIndex=r??0}},xRe=class{constructor(e,t,n){this.className=e,this.zIndex=t,this.tooltip=n}},CRe=class{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}},DB=class extends vf{_render(e,t,n){let o=[];for(let a=e;a<=t;a++){let l=a-e;o[l]=new CRe}if(n.length===0)return o;n.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNameo)continue;let c=Math.max(a,n),u=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new J(c,0)),d=this._context.viewModel.glyphLanes.getLanesAtLine(u.lineNumber).indexOf(r.preference.lane);t.push(new SRe(c,d,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,o)=>n.lineNumber===o.lineNumber?n.laneIndex===o.laneIndex?n.zIndex===o.zIndex?o.type===n.type?n.type===0&&o.type===0?n.className0;){let o=t.peek();if(!o)break;let r=t.takeWhile(a=>a.lineNumber===o.lineNumber&&a.laneIndex===o.laneIndex);if(!r||r.length===0)break;let s=r[0];if(s.type===0){let a=[];for(let l of r){if(l.zIndex!==s.zIndex||l.type!==s.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}n.push(s.accept(a.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(let n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;)this._managedDomNodes.pop()?.domNode.remove();return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{let o=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],r=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(o),n.domNode.setLeft(r),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;)this._managedDomNodes.pop()?.domNode.remove()}},_Re=class{constructor(e,t,n,o){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.className=o,this.type=0}accept(e){return new ERe(this.lineNumber,this.laneIndex,e)}},SRe=class{constructor(e,t,n,o){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.widget=o,this.type=1}},ERe=class{constructor(e,t,n){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=n}}});var Kmt=D(()=>{});function TB(i){if(!(i&&i.isTransparent()))return i}var Mae,Jmt=D(()=>{Kmt();oD();Am();io();kt();Wt();gn();ZLe();Toe();Mae=class extends vf{constructor(e){super(),this._context=e,this._primaryPosition=null;let t=this._context.configuration.options,n=t.get(147),o=t.get(50);this._spaceWidth=o.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(147),o=t.get(50);return this._spaceWidth=o.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){let n=e.selections[0].getPosition();return this._primaryPosition?.equals(n)?!1:(this._primaryPosition=n,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=e.scrollWidth,r=this._primaryPosition,s=this.getGuidesByLine(t,Math.min(n+1,this._context.viewModel.getLineCount()),r),a=[];for(let l=t;l<=n;l++){let c=l-t,u=s[c],d="",h=e.visibleRangeForPosition(new J(l,1))?.left??0;for(let f of u){let p=f.column===-1?h+(f.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new J(l,f.column)).left;if(p>o||this._maxIndentLeft>0&&p>this._maxIndentLeft)break;let g=f.horizontalLine?f.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",A=f.horizontalLine?(e.visibleRangeForPosition(new J(l,f.horizontalLine.endColumn))?.left??p+this._spaceWidth)-p:this._spaceWidth;d+=`
    `}a[c]=d}this._renderResult=a}getGuidesByLine(e,t,n){let o=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?eC.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?eC.EnabledForActive:eC.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,s=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){let d=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);s=d.startLineNumber,a=d.endLineNumber,l=d.indent}let{indentSize:c}=this._context.viewModel.model.getOptions(),u=[];for(let d=e;d<=t;d++){let h=new Array;u.push(h);let f=o?o[d-e]:[],p=new Ad(f),g=r?r[d-e]:0;for(let A=1;A<=g;A++){let v=(A-1)*c+1,w=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&s<=d&&d<=a&&A===l;h.push(...p.takeWhile(_=>_.visibleColumn!0)||[])}return u}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ba((i,e)=>{let t=[{bracketColor:ioe,guideColor:lht,guideColorActive:pht},{bracketColor:noe,guideColor:cht,guideColorActive:mht},{bracketColor:ooe,guideColor:uht,guideColorActive:ght},{bracketColor:roe,guideColor:dht,guideColorActive:bht},{bracketColor:soe,guideColor:hht,guideColorActive:Aht},{bracketColor:aoe,guideColor:fht,guideColorActive:vht}],n=new VH,o=[{indentColor:VL,indentColorActive:HL},{indentColor:Udt,indentColorActive:Ydt},{indentColor:jdt,indentColorActive:Kdt},{indentColor:Qdt,indentColorActive:Jdt},{indentColor:Gdt,indentColorActive:Xdt},{indentColor:qdt,indentColorActive:Zdt}],r=t.map(a=>{let l=i.getColor(a.bracketColor),c=i.getColor(a.guideColor),u=i.getColor(a.guideColorActive),d=TB(TB(c)??l?.transparent(.3)),h=TB(TB(u)??l);if(!(!d||!h))return{guideColor:d,guideColorActive:h}}).filter(Hf),s=o.map(a=>{let l=i.getColor(a.indentColor),c=i.getColor(a.indentColorActive),u=TB(l),d=TB(c);if(!(!u||!d))return{indentColor:u,indentColorActive:d}}).filter(Hf);if(r.length>0){for(let a=0;a<30;a++){let l=r[a%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(s.length>0){for(let a=0;a<30;a++){let l=s[a%s.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})});var Xmt=D(()=>{});var kB,Zmt=D(()=>{kB=class{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}});var DRe,TRe,kRe,Rae,$mt=D(()=>{Hse();Gt();wi();Xmt();um();cO();vae();bd();Zmt();Iee();kt();Ue();DRe=class{constructor(){this._currentVisibleRange=new R(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}},TRe=class{constructor(e,t,n,o,r,s,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=o,this.startScrollTop=r,this.stopScrollTop=s,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}},kRe=class{constructor(e,t,n,o,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=r,this.type="selections";let s=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;lnew LA(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,_c.write(this.domNode,8),this.domNode.setClassName(`view-lines ${fC}`),vr(this.domNode,r),this._maxLineWidth=0,this._asyncUpdateLineWidths=new si(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new si(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new DRe,this._horizontalRevealRequest=null,this._stickyScrollEnabled=o.get(116).enabled,this._maxNumberStickyLines=o.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);let t=this._context.configuration.options,n=t.get(50),o=t.get(147);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=t.get(101),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(116).enabled,this._maxNumberStickyLines=t.get(116).maxLineCount,vr(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=this._context.configuration,t=new nV(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;let n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),o=!1;for(let r=t;r<=n;r++)o=this._visibleLines.getVisibleLine(r).onSelectionChanged()||o;return o}onDecorationsChanged(e){{let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=t;o<=n;o++)this._visibleLines.getVisibleLine(o).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new TRe(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new kRe(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,r),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let n=this._getViewLineDomNode(e);if(n===null)return null;let o=this._getLineNumberFor(n);if(o===-1||o<1||o>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(o)===1)return new J(o,1);let r=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(os)return null;let a=this._visibleLines.getVisibleLine(o).getColumnOfNodeOffset(e,t),l=this._context.viewModel.getLineMinColumn(o);return an)return-1;let o=new kB(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getWidth(o);return this._updateLineWidthsSlowIfDomDidLayout(o),r}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let n=e.endLineNumber,o=R.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!o)return null;let r=[],s=0,a=new kB(this.domNode.domNode,this._textRangeRestingSpot),l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new J(o.startLineNumber,1)).lineNumber);let c=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let d=o.startLineNumber;d<=o.endLineNumber;d++){if(du)continue;let h=d===o.startLineNumber?o.startColumn:1,f=d!==o.endLineNumber,p=f?this._context.viewModel.getLineMaxColumn(d):o.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,h,p,a);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;let o=new kB(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,o);return this._updateLineWidthsSlowIfDomDidLayout(o),r}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new bee(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),o=1,r=!0;for(let s=t;s<=n;s++){let a=this._visibleLines.getVisibleLine(s);if(e&&!a.getWidthIsFast()){r=!1;continue}o=Math.max(o,a.getWidth(null))}return r&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(o),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1,n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++){let s=this._visibleLines.getVisibleLine(r);if(s.needsMonospaceFontCheck()){let a=s.getWidth(null);a>t&&(t=a,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=o;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let o=this._computeScrollLeftToReveal(n);o&&(this._isViewportWrapping||this._ensureMaxLineWidth(o.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:o.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Cr&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth0){let v=r[0].startLineNumber,w=r[0].endLineNumber;for(let C=1,_=r.length;C<_;C++){let E=r[C];v=Math.min(v,E.startLineNumber),w=Math.max(w,E.endLineNumber)}u=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(v),h=this._context.viewLayout.getVerticalOffsetForLineNumber(w)+this._lineHeight}else if(o)u=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(o.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(o.endLineNumber)+this._lineHeight;else return-1;let f=(t==="mouse"||n)&&this._cursorSurroundingLinesStyle==="default",p=0,g=0;if(f)n||(p=this._lineHeight);else{let v=l/this._lineHeight,w=Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0),C=Math.min(v/2,w);p=C*this._lineHeight,g=Math.max(0,C-1)*this._lineHeight}n||(s===0||s===4)&&(g+=this._lineHeight),d-=p,h+=g;let A;if(h-d>l){if(!u)return-1;A=d}else if(s===5||s===6)if(s===6&&a<=d&&h<=c)A=a;else{let v=Math.max(5*this._lineHeight,l*.2),w=d-v,C=h-l;A=Math.max(C,w)}else if(s===1||s===2)if(s===2&&a<=d&&h<=c)A=a;else{let v=(d+h)/2;A=Math.max(0,v-l/2)}else A=this._computeMinimumScrolling(a,c,d,h,s===3,s===4);return A}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(146),o=t.left,r=o+t.width-n.verticalScrollbarWidth,s=1073741824,a=0;if(e.type==="range"){let c=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!c)return null;for(let u of c.ranges)s=Math.min(s,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}else for(let c of e.selections){if(c.startLineNumber!==c.endLineNumber)return null;let u=this._visibleRangesForLineRange(c.startLineNumber,c.startColumn,c.endColumn);if(!u)return null;for(let d of u.ranges)s=Math.min(s,Math.round(d.left)),a=Math.max(a,Math.round(d.left+d.width))}return e.minimalReveal||(s=Math.max(0,s-i.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(o,r,s,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,t,n,o,r,s){e=e|0,t=t|0,n=n|0,o=o|0,r=!!r,s=!!s;let a=t-e;if(o-nt)return Math.max(0,o-a)}else return n;return e}}});var egt=D(()=>{});var Fae,tgt=D(()=>{egt();Nae();Fae=class extends DB{constructor(e){super(),this._context=e;let n=this._context.configuration.options.get(146);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let n=this._context.configuration.options.get(146);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let r=0,s=t.length;r',l=[];for(let c=t;c<=n;c++){let u=c-t,d=o[u].getDecorations(),h="";for(let f of d){let p='
    {});var Oae,ngt=D(()=>{igt();Nae();Oae=class extends DB{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let r=0,s=t.length;r
    ';r[a]=c}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}});var ogt=D(()=>{});var XA,IRe=D(()=>{XA=class i{static{this.Empty=new i(0,0,0,0)}constructor(e,t,n,o){this._rgba8Brand=void 0,this.r=i._clamp(e),this.g=i._clamp(t),this.b=i._clamp(n),this.a=i._clamp(o)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}});var IB,LRe=D(()=>{et();de();IRe();ro();IB=class i extends H{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=U_(new i)),this._INSTANCE}constructor(){super(),this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Gn.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=Gn.getColorMap();if(!e){this._colors=[XA.Empty],this._backgroundIsLight=!0;return}this._colors=[XA.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}});var rgt,sgt,NRe=D(()=>{rgt=(()=>{let i=[];for(let e=32;e<=126;e++)i.push(e);return i.push(65533),i})(),sgt=(i,e)=>(i-=32,i<0||i>96?e<=2?(i+96)%96:95:i)});var jW,agt=D(()=>{NRe();AV();jW=class i{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=i.soften(e,12/15),this.charDataLight=i.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let o=0,r=e.length;oe.width||n+p>e.height){console.warn("bad render request outside image data");return}let g=u?this.charDataLight:this.charDataNormal,A=sgt(o,c),v=e.width*4,w=a.r,C=a.g,_=a.b,E=r.r-w,I=r.g-C,T=r.b-_,N=Math.max(s,l),L=e.data,B=A*h*f,z=n*v+t*4;for(let Q=0;Qe.width||n+d>e.height){console.warn("bad render request outside image data");return}let h=e.width*4,f=.5*(r/255),p=s.r,g=s.g,A=s.b,v=o.r-p,w=o.g-g,C=o.b-A,_=p+v*f,E=g+w*f,I=A+C*f,T=Math.max(r,a),N=e.data,L=n*h+t*4;for(let B=0;B{H_();lgt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},cgt=i=>{let e=new Uint8ClampedArray(i.length/2);for(let t=0;t>1]=lgt[i[t]]<<4|lgt[i[t+1]]&15;return e},MRe={1:zf(()=>cgt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:zf(()=>cgt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}});var Pae,dgt=D(()=>{agt();NRe();ugt();AV();Pae=class i{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return MRe[e]?n=new jW(MRe[e](),e):n=i.createFromSampleData(i.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){let t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let o=0;for(let r of rgt)n.fillText(String.fromCharCode(r),o,16/2),o+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");let o=i._downsample(e,t);return new jW(o,t)}static _downsampleChar(e,t,n,o,r){let s=1*r,a=2*r,l=o,c=0;for(let u=0;u0){let c=255/l;for(let u=0;u{wi();Bae=Fo?'"Segoe WPC", "Segoe UI", sans-serif':jt?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'});var dui,hui,zae,FRe,Vae,Hae,ORe,Wae,Uae,PRe,jae,hgt=D(()=>{ogt();Ye();tl();JF();de();wi();Rt();vae();bd();ea();Ue();IRe();LRe();d0();nr();Qn();cp();dgt();H_();Xl();RRe();dui=140,hui=2,zae=class i{constructor(e,t,n){let o=e.options,r=o.get(144),s=o.get(146),a=s.minimap,l=o.get(50),c=o.get(73);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=o.get(106),this.paddingTop=o.get(84).top,this.paddingBottom=o.get(84).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=r,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=o.get(67),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=s.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=Bae,this.sectionHeaderFontSize=c.sectionHeaderFontSize*r,this.sectionHeaderLetterSpacing=c.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=i._getSectionHeaderColor(t,n.getColor(1)),this.charRenderer=zf(()=>Pae.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=i._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=i._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let n=e.getColor(frt);return n?new XA(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(prt);return t?XA._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){let n=e.getColor(rm);return n?new XA(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}},FRe=class i{constructor(e,t,n,o,r,s,a,l,c){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=o,this.sliderTop=r,this.sliderHeight=s,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,o,r,s,a,l,c,u,d){let h=e.pixelRatio,f=e.minimapLineHeight,p=Math.floor(e.canvasInnerHeight/f),g=e.lineHeight;if(e.minimapHeightIsEditorHeight){let I=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(I+=Math.max(0,r-e.lineHeight-e.paddingBottom));let T=Math.max(1,Math.floor(r*r/I)),N=Math.max(0,e.minimapHeight-T),L=N/(u-r),B=c*L,z=N>0,Q=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),Z=Math.floor(e.paddingTop/e.lineHeight);return new i(c,u,z,L,B,T,Z,1,Math.min(a,Q))}let A;if(s&&n!==a){let I=n-t+1;A=Math.floor(I*f/h)}else{let I=r/g;A=Math.floor(I*f/h)}let v=Math.floor(e.paddingTop/g),w=Math.floor(e.paddingBottom/g);if(e.scrollBeyondLastLine){let I=r/g;w=Math.max(w,I-1)}let C;if(w>0){let I=r/g;C=(v+a+w-I-1)*f/h}else C=Math.max(0,(v+a)*f/h-A);C=Math.min(e.minimapHeight-A,C);let _=C/(u-r),E=c*_;if(p>=v+a+w){let I=C>0;return new i(c,u,I,_,E,A,v,1,a)}else{let I;t>1?I=t+v:I=Math.max(1,c/g);let T,N=Math.max(1,Math.floor(I-E*h/f));Nc&&(N=Math.min(N,d.startLineNumber),T=Math.max(T,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?z=(t-N+T+B)*f/h:z=c/e.paddingTop*(T+B)*f/h,new i(c,u,!0,_,z,A,T,N,L)}}},Vae=class i{static{this.INVALID=new i(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}},Hae=class{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new UW({createLine:()=>Vae.INVALID}),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;let n=this._renderedLines._get().lines;for(let o=0,r=n.length;o1){for(let v=0,w=o-1;v0&&this.minimapLines[n-1]>=e;)n--;let o=this.modelLineToMinimapLine(t)-1;for(;o+1t)return null}return[n+1,o+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),o=this.modelLineToMinimapLine(t);return e!==t&&o===n&&(o===this.minimapLines.length?n>1&&n--:o++),[n,o]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,n=this.minimapLines.length,o=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(o)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,n]=Wae.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let o of n)switch(o.type){case"deleted":this._actual.onLinesDeleted(o.deleteFromLineNumber,o.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(o.insertFromLineNumber,o.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let o=[];for(let r=0,s=t-e+1;r!o.options.minimap?.sectionHeaderStyle);if(this._samplingState){let o=[];for(let r of n){if(!r.options.minimap)continue;let s=r.range,a=this._samplingState.modelLineToMinimapLine(s.startLineNumber),l=this._samplingState.modelLineToMinimapLine(s.endLineNumber);o.push(new uB(new R(a,s.startColumn,l,s.endColumn),r.options))}return o}return n}getSectionHeaderDecorationsInViewport(e,t){let n=this.options.minimapLineHeight,r=this.options.sectionHeaderFontSize/n;return e=Math.floor(Math.max(1,e-r)),this._getMinimapDecorationsInViewport(e,t).filter(s=>!!s.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let n;if(this._samplingState){let o=this._samplingState.minimapLines[e-1],r=this._samplingState.minimapLines[t-1];n=new R(o,1,r,this._context.viewModel.getLineMaxColumn(r))}else n=new R(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(n)}getSectionHeaderText(e,t){let n=e.options.minimap?.sectionHeaderText;if(!n)return null;let o=this._sectionHeaderCache.get(n);if(o)return o;let r=t(n);return this._sectionHeaderCache.set(n,r),r}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new R(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}},PRe=class i extends H{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(_Ee),this._domNode=Ai(document.createElement("div")),_c.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=Ai(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=Ai(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=Ai(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=Ai(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=Ai(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=un(this._domNode.domNode,Te.POINTER_DOWN,n=>{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){let c=bn(this._slider.domNode),u=c.top+c.height/2;this._startSliderDragging(n,u,this._lastRenderData.renderedLayout)}return}let r=this._model.options.minimapLineHeight,s=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY,l=Math.floor(s/r)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new wg,this._sliderPointerDownListener=un(this._slider.domNode,Te.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Lr.addTarget(this._domNode.domNode),this._sliderTouchStartListener=ce(this._domNode.domNode,Tn.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=ce(this._domNode.domNode,Tn.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=un(this._domNode.domNode,Tn.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;let o=e.pageX;this._slider.toggleClassName("active",!0);let r=(s,a)=>{let l=bn(this._domNode.domNode),c=Math.min(Math.abs(a-o),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(Fo&&c>dui){this._model.setScrollTop(n.scrollTop);return}let u=s-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(u))};e.pageY!==t&&r(e.pageY,o),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>r(s.pageY,s.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new ORe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(_Ee),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let n=FRe.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(R.compareRangesUsingStarts);let n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));let{canvasInnerWidth:o,canvasInnerHeight:r}=this._model.options,s=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,o,r);let u=new jae(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,u,e,s),this._renderDecorationsLineHighlights(c,n,u,e,s);let d=new jae(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,d,e,s,l,a,o),this._renderDecorationsHighlights(c,n,d,e,s,l,a,o),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,n,o,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,a=0;for(let l of t){let c=o.intersectWithViewport(l);if(!c)continue;let[u,d]=c;for(let p=u;p<=d;p++)n.set(p,!0);let h=o.getYForLineNumber(u,r),f=o.getYForLineNumber(d,r);a>=h||(a>s&&e.fillRect(IA,s,e.canvas.width,a-s),s=h),a=f}a>s&&e.fillRect(IA,s,e.canvas.width,a-s)}_renderDecorationsLineHighlights(e,t,n,o,r){let s=new Map;for(let a=t.length-1;a>=0;a--){let l=t[a],c=l.options.minimap;if(!c||c.position!==1)continue;let u=o.intersectWithViewport(l.range);if(!u)continue;let[d,h]=u,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let p=s.get(f.toString());p||(p=f.transparent(.5).toString(),s.set(f.toString(),p)),e.fillStyle=p;for(let g=d;g<=h;g++){if(n.has(g))continue;n.set(g,!0);let A=o.getYForLineNumber(d,r);e.fillRect(IA,A,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,n,o,r,s,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let c of t){let u=o.intersectWithViewport(c);if(!u)continue;let[d,h]=u;for(let f=d;f<=h;f++)this.renderDecorationOnLine(e,n,c,this._selectionColor,o,f,r,r,s,a,l)}}_renderDecorationsHighlights(e,t,n,o,r,s,a,l){for(let c of t){let u=c.options.minimap;if(!u)continue;let d=o.intersectWithViewport(c.range);if(!d)continue;let[h,f]=d,p=u.getColor(this._theme.value);if(!(!p||p.isTransparent()))for(let g=h;g<=f;g++)switch(u.position){case 1:this.renderDecorationOnLine(e,n,c.range,p,o,g,r,r,s,a,l);continue;case 2:{let A=o.getYForLineNumber(g,r);this.renderDecoration(e,p,2,A,hui,r);continue}}}}renderDecorationOnLine(e,t,n,o,r,s,a,l,c,u,d){let h=r.getYForLineNumber(s,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;let{startLineNumber:f,endLineNumber:p}=n,g=f===s?n.startColumn:1,A=p===s?n.endColumn:this._model.getLineMaxColumn(s),v=this.getXOffsetForPosition(t,s,g,c,u,d),w=this.getXOffsetForPosition(t,s,A,c,u,d);this.renderDecoration(e,o,v,h,w-v,a)}getXOffsetForPosition(e,t,n,o,r,s){if(n===1)return IA;if((n-1)*r>=s)return s;let l=e.get(t);if(!l){let c=this._model.getLineContent(t);l=[IA];let u=IA;for(let d=1;d=s){l[d]=s;break}l[d]=p,u=p}e.set(t,l)}return n-1g.range.startLineNumber-A.range.startLineNumber);let p=i._fitSectionHeader.bind(null,h,s-IA);for(let g of f){let A=e.getYForLineNumber(g.range.startLineNumber,t)+n,v=A-n,w=v+2,C=this._model.getSectionHeaderText(g,p);i._renderSectionLabel(h,C,g.options.minimap?.sectionHeaderStyle===2,l,u,s,v,r,A,w)}}static _fitSectionHeader(e,t,n){if(!n)return n;let o="\u2026",r=e.measureText(n).width,s=e.measureText(o).width;if(r<=t||r<=s)return n;let a=n.length,l=r/n.length,c=Math.floor((t-s)/l)-1,u=Math.ceil(c/2);for(;u>0&&/\s/.test(n[u-1]);)--u;return n.substring(0,u)+o+n.substring(a-(c-u))}static _renderSectionLabel(e,t,n,o,r,s,a,l,c,u){t&&(e.fillStyle=o,e.fillRect(0,a,s,l),e.fillStyle=r,e.fillText(t,IA,c)),n&&(e.beginPath(),e.moveTo(0,u),e.lineTo(s,u),e.closePath(),e.stroke())}renderLines(e){let t=e.startLineNumber,n=e.endLineNumber,o=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){let M=this._lastRenderData._get();return new Hae(e,M.imageData,M.lines)}let r=this._getBuffer();if(!r)return null;let[s,a,l]=i._renderUntouchedLines(r,e.topPaddingLineCount,t,n,o,this._lastRenderData),c=this._model.getMinimapLinesRenderingData(t,n,l),u=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,p=this._model.tokensColorTracker,g=p.backgroundIsLight(),A=this._model.options.renderMinimap,v=this._model.options.charRenderer(),w=this._model.options.fontScale,C=this._model.options.minimapCharWidth,E=(A===1?2:3)*w,I=o>E?Math.floor((o-E)/2):0,T=h.a/255,N=new XA(Math.round((h.r-d.r)*T+d.r),Math.round((h.g-d.g)*T+d.g),Math.round((h.b-d.b)*T+d.b),255),L=e.topPaddingLineCount*o,B=[];for(let M=0,ee=n-t+1;M=0&&zw)return;let Q=A.charCodeAt(E);if(Q===9){let Z=h-(E+I)%h;I+=Z-1,_+=Z*s}else if(Q===32)_+=s;else{let Z=Ag(Q)?2:1;for(let U=0;Uw)return}}}}},jae=class{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let o=0,r=this._endLineNumber-this._startLineNumber+1;othis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}});var fgt=D(()=>{});var Qae,pgt=D(()=>{fgt();tl();bd();Ye();Qae=class extends Ur{constructor(e,t){super(e),this._viewDomNode=t;let o=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=o.verticalScrollbarWidth,this._minimapWidth=o.minimap.minimapWidth,this._horizontalScrollbarHeight=o.horizontalScrollbarHeight,this._editorHeight=o.height,this._editorWidth=o.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=Ai(document.createElement("div")),_c.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=Ai(document.createElement("div")),_c.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let n=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){let t=Ai(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let n=this._widgets[e.getId()],o=t?t.preference:null,r=t?.stackOridinal;return n.preference===o&&n.stack===r?(this._updateMaxMinWidth(),!1):(n.preference=o,n.stack=r,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let o=this._widgets[t].domNode.domNode;delete this._widgets[t],o.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0,t=Object.keys(this._widgets);for(let n=0,o=t.length;n0);t.sort((o,r)=>(this._widgets[o].stack||0)-(this._widgets[r].stack||0));for(let o=0,r=t.length;o{tl();Wr();bd();kt();ro();Am();d0();Wt();BRe=class{constructor(e,t){let n=e.options;this.lineHeight=n.get(67),this.pixelRatio=n.get(144),this.overviewRulerLanes=n.get(83),this.renderBorder=n.get(82);let o=t.getColor(eht);this.borderColor=o?o.toString():null,this.hideCursor=n.get(59);let r=t.getColor(DP);this.cursorColorSingle=r?r.transparent(.7).toString():null;let s=t.getColor(Zne);this.cursorColorPrimary=s?s.transparent(.7).toString():null;let a=t.getColor($ne);this.cursorColorSecondary=a?a.transparent(.7).toString():null,this.themeType=t.type;let l=n.get(73),c=l.enabled,u=l.side,d=t.getColor(tht),h=Gn.getDefaultBackground();d?this.backgroundColor=d:c&&u==="right"?this.backgroundColor=h:this.backgroundColor=null;let p=n.get(146).overviewRuler;this.top=p.top,this.right=p.right,this.domWidth=p.width,this.domHeight=p.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);let[g,A]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=g,this.w=A}_initLanes(e,t,n){let o=t-e;if(n>=3){let r=Math.floor(o/3),s=Math.floor(o/3),a=o-r-s,l=e,c=l+r,u=l+r+a;return[[0,l,c,l,u,l,c,l],[0,r,a,r+a,s,r+a+s,a+s,r+a+s]]}else if(n===2){let r=Math.floor(o/2),s=o-r,a=e,l=a+r;return[[0,a,a,a,l,a,a,a],[0,r,r,r,s,r+s,r+s,r+s]]}else{let r=e,s=o;return[[0,r,r,r,r,r,r,r],[0,s,s,s,s,s,s,s]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&me.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}},Gae=class extends Ur{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=Ai(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Gn.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new J(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new BRe(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;t1&&(o=t===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:o})}return this._cursorPositions.sort((t,n)=>J.compare(t.position,n.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){let e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?me.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}let t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(hN.compareByRenderingProps),this._actualShouldRender===1&&!hN.equalsArr(this._renderedDecorations,t)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!Zi(this._renderedCursorPositions,this._cursorPositions,(p,g)=>p.position.lineNumber===g.position.lineNumber&&p.color===g.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let n=this._settings.canvasWidth,o=this._settings.canvasHeight,r=this._settings.lineHeight,s=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=o/a,c=6*this._settings.pixelRatio|0,u=c/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=me.Format.CSS.formatHexA(e),d.fillRect(0,0,n,o)):(d.clearRect(0,0,n,o),d.fillStyle=me.Format.CSS.formatHexA(e),d.fillRect(0,0,n,o)):d.clearRect(0,0,n,o);let h=this._settings.x,f=this._settings.w;for(let p of t){let g=p.color,A=p.data;d.fillStyle=g;let v=0,w=0,C=0;for(let _=0,E=A.length/3;_o&&(Q=o-u),L=Q-u,B=Q+u}L>C+1||I!==v?(_!==0&&d.fillRect(h[v],w,f[v],C-w),v=I,w=L,C=B):B>C&&(C=B)}d.fillRect(h[v],w,f[v],C-w)}if(!this._settings.hideCursor){let p=2*this._settings.pixelRatio|0,g=p/2|0,A=this._settings.x[7],v=this._settings.w[7],w=-100,C=-100,_=null;for(let E=0,I=this._cursorPositions.length;Eo&&(L=o-g);let B=L-g,z=B+p;B>C+1||T!==_?(E!==0&&_&&d.fillRect(A,w,v,C-w),w=B,C=z):z>C&&(C=z),_=T,d.fillStyle=T}_&&d.fillRect(A,w,v,C-w)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,o),d.moveTo(1,0),d.lineTo(n,0),d.stroke())}}});var qae,QW,Yae,zRe=D(()=>{qae=class{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}},QW=class{constructor(e,t,n,o){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=o,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(g=n-A);let v=u.color,w=this._color2Id[v];w||(w=++this._lastAssignedId,this._color2Id[v]=w,this._id2Color[w]=v);let C=new qae(g-A,g+A,w);u.setColorZone(C),a.push(C)}return this._colorZonesInvalid=!1,a.sort(qae.compare),a}}});var Kae,ggt=D(()=>{tl();zRe();aO();Kae=class extends Kb{constructor(e,t){super(),this._context=e;let n=this._context.configuration.options;this._domNode=Ai(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Yae(o=>this._context.viewLayout.getVerticalOffsetForLineNumber(o)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(67)),this._zoneManager.setPixelRatio(n.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(t.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),o=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,o,e),!0}_renderOneLane(e,t,n,o){let r=0,s=0,a=0;for(let l of t){let c=l.colorId,u=l.from,d=l.to;c!==r?(e.fillRect(0,s,o,a-s),r=c,e.fillStyle=n[r],s=u,a=d):a>=u?a=Math.max(a,d):(e.fillRect(0,s,o,a-s),s=u,a=d)}e.fillRect(0,s,o,a-s)}}});var bgt=D(()=>{});var Jae,Agt=D(()=>{bgt();tl();bd();Jae=class extends Ur{constructor(e){super(e),this.domNode=Ai(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];let t=this._context.configuration.options;this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){let a=Ai(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(r),this.domNode.appendChild(a),this._renderedRulers.push(a),s--}return}let n=e-t;for(;n>0;){let o=this._renderedRulers.pop();this.domNode.removeChild(o),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{});var Xae,ygt=D(()=>{vgt();tl();bd();Xae=class extends Ur{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;let n=this._context.configuration.options.get(104);this._useShadows=n.useShadows,this._domNode=Ai(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){let t=this._context.configuration.options.get(146);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){let n=this._context.configuration.options.get(104);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}});var wgt=D(()=>{});function fui(i){return new VRe(i)}function pui(i){return new HRe(i.lineNumber,i.ranges.map(fui))}function Zae(i){return i<0?-i:i}var VRe,HRe,$ae,xgt=D(()=>{wgt();oD();nr();io();VRe=class{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}},HRe=class{constructor(e,t){this.lineNumber=e,this.ranges=t}};$ae=class i extends vf{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;let t=this._context.configuration.options;this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){let o=this._typicalHalfwidthCharacterWidth/4,r=null,s=null;if(n&&n.length>0&&t.length>0){let a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!r&&c=0;c--)n[c].lineNumber===l&&(s=n[c].ranges[0]);r&&!r.startStyle&&(r=null),s&&!s.startStyle&&(s=null)}for(let a=0,l=t.length;a0){let p=t[a-1].ranges[0].left,g=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Zae(u-p)p&&(h.top=1),Zae(d-g)'}_actualRenderOneSelection(e,t,n,o){if(o.length===0)return;let r=!!o[0].ranges[0].startStyle,s=o[0].lineNumber,a=o[o.length-1].lineNumber;for(let l=0,c=o.length;l1,c)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([s,a])=>s+a)}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ba((i,e)=>{let t=i.getColor(Qot);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)})});var Cgt=D(()=>{});var ele,D1,GW,_gt=D(()=>{Ye();tl();Rt();um();ea();kt();Ue();Hse();ele=class{constructor(e,t,n,o,r,s,a){this.top=e,this.left=t,this.paddingLeft=n,this.width=o,this.height=r,this.textContent=s,this.textContentClassName=a}};(function(i){i[i.Single=0]="Single",i[i.MultiPrimary=1]="MultiPrimary",i[i.MultiSecondary=2]="MultiSecondary"})(D1||(D1={}));GW=class{constructor(e,t){this._context=e;let n=this._context.configuration.options,o=n.get(50);this._cursorStyle=n.get(28),this._lineHeight=n.get(67),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Ai(document.createElement("div")),this._domNode.setClassName(`cursor ${fC}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),vr(this._domNode,o),this._domNode.setDisplay("none"),this._position=new J(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case D1.Single:this._pluralityClass="";break;case D1.MultiPrimary:this._pluralityClass="cursor-primary";break;case D1.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),vr(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[o,r]=not(n,t-1);return[new J(e,o+1),n.substring(o,r)]}_prepareRender(e){let t="",n="",[o,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===Tl.Line||this._cursorStyle===Tl.LineThin){let h=e.visibleRangeForPosition(o);if(!h||h.outsideRenderedLine)return null;let f=rt(this._domNode.domNode),p;this._cursorStyle===Tl.Line?(p=uEe(f,this._lineCursorWidth>0?this._lineCursorWidth:2),p>2&&(t=r,n=this._getTokenClassName(o))):p=uEe(f,1);let g=h.left,A=0;p>=2&&g>=1&&(A=1,g-=A);let v=e.getVerticalOffsetForLineNumber(o.lineNumber)-e.bigNumbersDelta;return new ele(v,g,A,p,this._lineHeight,t,n)}let s=e.linesVisibleRangesForRange(new R(o.lineNumber,o.column,o.lineNumber,o.column+r.length),!1);if(!s||s.length===0)return null;let a=s[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;let l=a.ranges[0],c=r===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Tl.Block&&(t=r,n=this._getTokenClassName(o));let u=e.getVerticalOffsetForLineNumber(o.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return(this._cursorStyle===Tl.Underline||this._cursorStyle===Tl.UnderlineThin)&&(u+=this._lineHeight-2,d=2),new ele(u,l.left,0,c,d,t,n)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${fC} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}});var tle,Sgt=D(()=>{Cgt();tl();Gt();bd();_gt();ea();Am();io();Jb();Ye();tle=class i extends Ur{static{this.BLINK_INTERVAL=500}constructor(e){super(e);let t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new GW(this._context,D1.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=Ai(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new ha,this._cursorFlatBlinkInterval=new HS,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,o=this._secondaryCursors.length;nt.length){let r=this._secondaryCursors.length-t.length;for(let s=0;s{for(let o=0,r=e.ranges.length;o{this._isVisible?this._hide():this._show()},i.BLINK_INTERVAL,rt(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},i.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Tl.Line:e+=" cursor-line-style";break;case Tl.Block:e+=" cursor-block-style";break;case Tl.Underline:e+=" cursor-underline-style";break;case Tl.LineThin:e+=" cursor-line-thin-style";break;case Tl.BlockOutline:e+=" cursor-block-outline-style";break;case Tl.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{let t=[{class:".cursor",foreground:DP,background:Xne},{class:".cursor-primary",foreground:Zne,background:Vdt},{class:".cursor-secondary",foreground:$ne,background:Hdt}];for(let n of t){let o=i.getColor(n.foreground);if(o){let r=i.getColor(n.background);r||(r=o.opposite()),e.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${o}; border-color: ${o}; color: ${r}; }`),ju(i.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${r}; border-right: 1px solid ${r}; }`)}}})});function mui(i,e){try{return i(e)}catch(t){ft(t)}}var WRe,ile,Egt=D(()=>{tl();Tt();bd();kt();WRe=()=>{throw new Error("Invalid change accessor")},ile=class extends Ur{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(146);this._lineHeight=t.get(67),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=Ai(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Ai(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let o of e)t.set(o.id,o);let n=!1;return this._context.viewModel.changeWhitespace(o=>{let r=Object.keys(this._zones);for(let s=0,a=r.length;s{let o={addZone:r=>(t=!0,this._addZone(n,r)),removeZone:r=>{r&&(t=this._removeZone(n,r)||t)},layoutZone:r=>{r&&(t=this._layoutZone(n,r)||t)}};mui(e,o),o.addZone=WRe,o.removeZone=WRe,o.layoutZone=WRe}),t}_addZone(e,t){let n=this._computeWhitespaceProps(t),r={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:Ai(t.domNode),marginDomNode:t.marginDomNode?Ai(t.marginDomNode):null};return this._safeCallOnComputedHeight(r.delegate,n.heightInPx),r.domNode.setPosition("absolute"),r.domNode.domNode.style.width="100%",r.domNode.setDisplay("none"),r.domNode.setAttribute("monaco-view-zone",r.whitespaceId),this.domNode.appendChild(r.domNode),r.marginDomNode&&(r.marginDomNode.setPosition("absolute"),r.marginDomNode.domNode.style.width="100%",r.marginDomNode.setDisplay("none"),r.marginDomNode.setAttribute("monaco-view-zone",r.whitespaceId),this.marginDomNode.appendChild(r.marginDomNode)),this._zones[r.whitespaceId]=r,this.setShouldRender(),r.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.remove(),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t],o=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=o.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,o.afterViewLineNumber,o.heightInPx),this._safeCallOnComputedHeight(n.delegate,o.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){ft(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){ft(n)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,n={},o=!1;for(let s of t)this._zones[s.id].isInHiddenArea||(n[s.id]=s,o=!0);let r=Object.keys(this._zones);for(let s=0,a=r.length;s{});var nle,ole,Tgt=D(()=>{Dgt();oD();Rt();JS();kt();Am();nle=class extends vf{constructor(e){super(),this._context=e,this._options=new ole(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new ole(this._context.configuration);return this._options.equals(t)?e.hasChanged(146):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber-t+1,r=new Array(o);for(let a=0;aa)continue;let f=h.startLineNumber===a?h.startColumn:c.minColumn,p=h.endLineNumber===a?h.endColumn:c.maxColumn;f=B.endOffset&&(L++,B=n&&n[L]),Z!==9&&Z!==32||h&&!I&&Q<=N)continue;if(d&&Q>=T&&Q<=N&&Z===32){let M=Q-1>=0?a.charCodeAt(Q-1):0,ee=Q+1=0?a.charCodeAt(Q-1):0;if(Z===32&&M!==32&&M!==9)continue}if(n&&(!B||B.startOffset>Q||B.endOffset<=Q))continue;let U=e.visibleRangeForPosition(new J(t,Q+1));U&&(s?(z=Math.max(z,U.left),Z===9?E+=this._renderArrow(f,A,U.left):E+=``):Z===9?E+=`
    ${_?"\uFFEB":"\u2192"}
    `:E+=`
    ${String.fromCharCode(C)}
    `)}return s?(z=Math.round(z+A),``+E+""):E}_renderArrow(e,t,n){let o=t/7,r=t,s=e/2,a=n,l={x:0,y:o/2},c={x:100/125*r,y:l.y},u={x:c.x-.2*c.x,y:c.y+.2*c.x},d={x:u.x+.1*c.x,y:u.y+.1*c.x},h={x:d.x+.35*c.x,y:d.y-.35*c.x},f={x:h.x,y:-h.y},p={x:d.x,y:-d.y},g={x:u.x,y:-u.y},A={x:c.x,y:-c.y},v={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}},ole=class{constructor(e){let t=e.options,n=t.get(50),o=t.get(38);o==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):o==="svg"?(this.renderWhitespace=t.get(100),this.renderWithSVG=!0):(this.renderWhitespace=t.get(100),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}});var rle,kgt=D(()=>{Ue();rle=class{constructor(e,t,n,o){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.lineHeight=t.lineHeight|0,this.whitespaceViewportData=n,this._model=o,this.visibleRange=new R(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}});var sle,Igt=D(()=>{sle=class{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}});var ale,Lgt=D(()=>{Igt();ale=class{constructor(e,t,n){this.configuration=e,this.theme=new sle(t),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}});function lD(i){try{return i()}catch(e){return ft(e),null}}var gui,bui,lle,URe,Ngt=D(()=>{Ye();tl();KMe();Tt();Nee();_mt();Imt();cO();Bmt();zmt();bd();vRe();Hmt();Wmt();jmt();Gmt();qmt();Nae();Jmt();oRe();$mt();tgt();rRe();ngt();hgt();pgt();mgt();ggt();Agt();ygt();xgt();Sgt();Egt();Tgt();kt();Ue();Qn();ol();aO();kgt();Lgt();ht();io();gui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bui=function(i,e){return function(t,n){e(t,n,i)}},lle=class extends Kb{constructor(e,t,n,o,r,s,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new qe(1,1,1,1)],this._renderAnimationFrame=null;let l=new Aae(t,o,r,e);this._context=new ale(t,n,o),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(Wse,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Ai(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Ai(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Ai(document.createElement("div")),_c.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Iae(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Rae(this._context,this._linesContent),this._viewZones=new ile(this._context),this._viewParts.push(this._viewZones);let c=new Gae(this._context);this._viewParts.push(c);let u=new Xae(this._context);this._viewParts.push(u);let d=new wae(this._context);this._viewParts.push(d),d.addDynamicOverlay(new Dae(this._context)),d.addDynamicOverlay(new $ae(this._context)),d.addDynamicOverlay(new Mae(this._context)),d.addDynamicOverlay(new kae(this._context)),d.addDynamicOverlay(new nle(this._context));let h=new xae(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Tae(this._context)),h.addDynamicOverlay(new Oae(this._context)),h.addDynamicOverlay(new Fae(this._context)),h.addDynamicOverlay(new bB(this._context)),this._glyphMarginWidgets=new Lae(this._context),this._viewParts.push(this._glyphMarginWidgets);let f=new AB(this._context);f.getDomNode().appendChild(this._viewZones.marginDomNode),f.getDomNode().appendChild(h.getDomNode()),f.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(f),this._contentWidgets=new _ae(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new tle(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Qae(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);let p=new Jae(this._context);this._viewParts.push(p);let g=new Cae(this._context);this._viewParts.push(g);let A=new Uae(this._context);if(this._viewParts.push(A),c){let v=this._scrollbar.getOverviewRulerLayoutInfo();v.parent.insertBefore(c.getDomNode(),v.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(p.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(A.getDomNode()),this._overflowGuardContainer.appendChild(g.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Vse(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){let e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes,n=[],o=0;n=n.concat(e.getAllMarginDecorations().map(r=>{let s=r.options.glyphMargin?.position??qu.Center;return o=Math.max(o,r.range.endLineNumber),{range:r.range,lane:s,persist:r.options.glyphMargin?.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(r=>{let s=e.validateRange(r.preference.range);return o=Math.max(o,s.endLineNumber),{range:s,lane:r.preference.lane}})),n.sort((r,s)=>R.compareRangesUsingStarts(r.range,s.range)),t.reset(o);for(let r of n)t.push(r.lane,r.range,r.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{let e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new oV(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new J(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){let t=this._context.configuration.options.get(146);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){let e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+RV(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new fi;if(this._renderAnimationFrame===null){let e=this._createCoordinatedRendering();this._renderAnimationFrame=URe.INSTANCE.scheduleCoordinatedRendering({window:rt(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new fi;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new fi;return e.renderText()},prepareRender:(t,n)=>{if(this._store.isDisposed)throw new fi;return e.prepareRender(t,n)},render:(t,n)=>{if(this._store.isDisposed)throw new fi;return e.render(t,n)}})}}_flushAccumulatedAndRenderNow(){let e=this._createCoordinatedRendering();lD(()=>e.prepareRenderText());let t=lD(()=>e.renderText());if(t){let[n,o]=t;lD(()=>e.prepareRender(n,o)),lD(()=>e.render(n,o))}}_getViewPartsToRender(){let e=[],t=0;for(let n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;let e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}E1.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;let t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);let n=new rle(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new mee(this._context.viewLayout,n,this._viewLines)]},prepareRender:(e,t)=>{for(let n of e)n.prepareRender(t)},render:(e,t)=>{for(let n of e)n.render(t),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){let n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),o=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();let r=this._viewLines.visibleRangeForPosition(new J(o.lineNumber,o.column));return r?r.left:-1}getTargetAtClientPoint(e,t){let n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?EB.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Kae(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(let n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){let t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};lle=gui([bui(6,Re)],lle);URe=class i{static{this.INSTANCE=new i}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{let t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(let[n,o]of this._animationFrameRunners)o.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){let t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,GF(e,t,100))}}_onRenderScheduled(){let e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(let n of e)lD(()=>n.prepareRenderText());let t=[];for(let n=0,o=e.length;nr.renderText())}for(let n=0,o=e.length;nr.prepareRender(a,l))}for(let n=0,o=e.length;nr.render(a,l))}}}});function Mgt(i){return i==null?!0:i===af.Right||i===af.Both}function Rgt(i){return i==null?!0:i===af.Left||i===af.Both}var AC,LB,jRe=D(()=>{Gb();kt();ol();AC=class{constructor(e,t,n,o,r){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=n,this.breakOffsetsVisibleColumn=o,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){let t=e>0?this.breakOffsets[e-1]:0,o=this.breakOffsets[e]-t;return e>0&&(o+=this.wrappedTextIndentLength),o}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let o=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)o0?this.breakOffsets[r-1]:0,t===0)if(e<=s)o=r-1;else if(e>l)n=r+1;else break;else if(e=l)n=r+1;else break}let a=e-s;return r>0&&(a+=this.wrappedTextIndentLength),new LB(r,a)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){let o=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(o,n);if(r!==o)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new LB(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){let o=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){let n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&Mgt(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let o=n.offsetInInputWithInjections;if(Rgt(this.injectionOptions[n.injectedTextIndex].cursorStops))return o;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(Mgt(this.injectionOptions[r].cursorStops)||(o-=this.injectionOptions[r].content.length,Rgt(this.injectionOptions[r].cursorStops)));)r--;return o}}else if(t===1||t===4){let o=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)o-=this.injectionOptions[r-1].content.length,r--;return o}WS(t)}getInjectedText(e,t){let n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.getInjectedTextAtOffset(n);return o?{options:this.injectionOptions[o.injectedTextIndex]}:null}getInjectedTextAtOffset(e){let t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let o=0;for(let r=0;re)break;if(e<=l)return{injectedTextIndex:r,offsetInInputWithInjections:a,length:s};o+=s}}}};LB=class{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new J(e+this.outputLineIndex,this.outputOffset+1)}}});function vui(i,e,t,n,o,r,s,a){function l(L){let B=a[L];if(B){let z=fp.applyInjectedText(e[L],B),Q=B.map(U=>U.options),Z=B.map(U=>U.column-1);return new AC(Z,Q,[z.length],[],0)}else return null}if(o===-1){let L=[];for(let B=0,z=e.length;Bc?(z=0,Q=0):Z=c-ee}let U=B.substr(z),M=yui(U,Q,n,Z,p,h);g[L]=z,A[L]=Q,v[L]=U,w[L]=M[0],C[L]=M[1]}let _=p.build(),E=Aui?.createHTML(_)??_;f.innerHTML=E,f.style.position="absolute",f.style.top="10000",s==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),i.document.body.appendChild(f);let I=document.createRange(),T=Array.prototype.slice.call(f.children,0),N=[];for(let L=0;L$.options),X=Y.map($=>$.column-1)):(ee=null,X=null),N[L]=new AC(X,ee,z,M,Z)}return f.remove(),N}function yui(i,e,t,n,o,r){if(r!==0){let h=String(r);o.appendString('
    ');let s=i.length,a=e,l=0,c=[],u=[],d=0");for(let h=0;h"),c[h]=l,u[h]=a;let f=d;d=h+1"),c[i.length]=l,u[i.length]=a,o.appendString("
    "),[c,u]}function wui(i,e,t,n){if(t.length<=1)return null;let o=Array.prototype.slice.call(e.children,0),r=[];try{GRe(i,o,n,0,null,t.length-1,null,r)}catch(s){return console.log(s),null}return r.length===0?null:(r.push(t.length),r)}function GRe(i,e,t,n,o,r,s,a){if(n===r||(o=o||QRe(i,e,t[n],t[n+1]),s=s||QRe(i,e,t[r],t[r+1]),Math.abs(o[0].top-s[0].top)<=.1))return;if(n+1===r){a.push(r);return}let l=n+(r-n)/2|0,c=QRe(i,e,t[l],t[l+1]);GRe(i,e,t,n,o,l,c,a),GRe(i,e,t,l,c,r,s,a)}function QRe(i,e,t,n){return i.setStart(e[t/16384|0].firstChild,t%16384),i.setEnd(e[n/16384|0].firstChild,n%16384),i.getClientRects()}var Aui,cle,Fgt=D(()=>{Sy();Rt();gn();um();_x();jRe();GE();Aui=xd("domLineBreaksComputer",{createHTML:i=>i}),cle=class i{static create(e){return new i(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,n,o,r){let s=[],a=[];return{addRequest:(l,c,u)=>{s.push(l),a.push(c)},finalize:()=>vui(Sb(this.targetWindow.deref()),s,e,t,n,o,r,a)}}}});var ule,Ogt=D(()=>{Ye();Tt();de();ule=class extends H{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new W_),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(let o of t){if(this._pending.has(o.id)){ft(new Error(`Cannot have two contributions with the same id ${o.id}`));continue}this._pending.set(o.id,o)}this._instantiateSome(0),this._register(TI(rt(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(TI(rt(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(TI(rt(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){let e={};for(let[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(let[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return TI(rt(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;let t=this._findPendingContributionsByInstantiation(e);for(let n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){let t=[];for(let[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){let t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{let n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){ft(n)}}}}});var NB,qRe=D(()=>{NB=class{constructor(e,t,n,o,r,s,a){this.id=e,this.label=t,this.alias=n,this.metadata=o,this._precondition=r,this._run=s,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}});function xui(i,e,t,n,o,r,s,a){if(o===-1)return null;let l=t.length;if(l<=1)return null;let c=a==="keepAll",u=e.breakOffsets,d=e.breakOffsetsVisibleColumn,h=Bgt(t,n,o,r,s),f=o-h,p=KRe,g=JRe,A=0,v=0,w=0,C=o,_=u.length,E=0;if(E>=0){let I=Math.abs(d[E]-C);for(;E+1<_;){let T=Math.abs(d[E+1]-C);if(T>=I)break;I=T,E++}}for(;E<_;){let I=E<0?0:u[E],T=E<0?0:d[E];v>I&&(I=v,T=w);let N=0,L=0,B=0,z=0;if(T<=C){let Z=T,U=I===0?0:t.charCodeAt(I-1),M=I===0?0:i.get(U),ee=!0;for(let X=I;Xv&&XRe(U,M,$,re,c)&&(N=Y,L=Z),Z+=ue,Z>C){Y>v?(B=Y,z=Z-ue):(B=X+1,z=Z),Z-L>f&&(N=0),ee=!1;break}U=$,M=re}if(ee){A>0&&(p[A]=u[u.length-1],g[A]=d[u.length-1],A++);break}}if(N===0){let Z=T,U=t.charCodeAt(I),M=i.get(U),ee=!1;for(let X=I-1;X>=v;X--){let Y=X+1,$=t.charCodeAt(X);if($===9){ee=!0;break}let re,ue;if(my($)?(X--,re=0,ue=2):(re=i.get($),ue=Ag($)?r:1),Z<=C){if(B===0&&(B=Y,z=Z),Z<=C-f)break;if(XRe($,re,U,M,c)){N=Y,L=Z;break}}Z-=ue,U=$,M=re}if(N!==0){let X=f-(z-L);if(X<=n){let Y=t.charCodeAt(B),$;Er(Y)?$=2:$=qW(Y,z,n,r),X-$<0&&(N=0)}}if(ee){E--;continue}}if(N===0&&(N=B,L=z),N<=v){let Z=t.charCodeAt(v);Er(Z)?(N=v+2,L=w+2):(N=v+1,L=w+qW(Z,w,n,r))}for(v=N,p[A]=N,w=L,g[A]=L,A++,C=L+f;E<0||E<_&&d[E]=Q)break;Q=Z,E++}}return A===0?null:(p.length=A,g.length=A,KRe=e.breakOffsets,JRe=e.breakOffsetsVisibleColumn,e.breakOffsets=p,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=h,e)}function Cui(i,e,t,n,o,r,s,a){let l=fp.applyInjectedText(e,t),c,u;if(t&&t.length>0?(c=t.map(L=>L.options),u=t.map(L=>L.column-1)):(c=null,u=null),o===-1)return c?new AC(u,c,[l.length],[],0):null;let d=l.length;if(d<=1)return c?new AC(u,c,[l.length],[],0):null;let h=a==="keepAll",f=Bgt(l,n,o,r,s),p=o-f,g=[],A=[],v=0,w=0,C=0,_=o,E=l.charCodeAt(0),I=i.get(E),T=qW(E,0,n,r),N=1;Er(E)&&(T+=1,E=l.charCodeAt(1),I=i.get(E),N++);for(let L=N;L_&&((w===0||T-C>p)&&(w=B,C=T-Z),g[v]=w,A[v]=C,v++,_=C+p,w=0),E=z,I=Q}return v===0&&(!t||t.length===0)?null:(g[v]=d,A[v]=T,new AC(u,c,g,A,f))}function qW(i,e,t,n){return i===9?t-e%t:Ag(i)||i<32?n:1}function Pgt(i,e){return e-i%e}function XRe(i,e,t,n,o){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!o&&e===3&&n!==2||!o&&n===3&&e!==1)}function Bgt(i,e,t,n,o){let r=0;if(o!==0){let s=Hr(i);if(s!==-1){for(let l=0;lt&&(r=0)}}return r}var dle,YRe,KRe,JRe,zgt=D(()=>{Rt();cL();GE();jRe();dle=class i{static create(e){return new i(e.get(135),e.get(134))}constructor(e,t){this.classifier=new YRe(e,t)}createLineBreaksComputer(e,t,n,o,r){let s=[],a=[],l=[];return{addRequest:(c,u,d)=>{s.push(c),a.push(u),l.push(d)},finalize:()=>{let c=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[];for(let d=0,h=s.length;d=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}},KRe=[],JRe=[]});var YW,Vgt=D(()=>{Sm();kt();Ue();Qn();YW=class i{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new sl(new R(1,1,1,1),0,0,new J(1,1),0),new sl(new R(1,1,1,1),0,0,new J(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new ji(this.modelState,this.viewState)}readSelectionFromMarkers(e){let t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?qe.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):qe.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,o){return t.equals(n)?o:e.normalizePosition(t,2)}static _validateViewState(e,t){let n=t.position,o=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),s=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,o,n,s),l=this._validatePositionWithCache(e,r,o,a);return n.equals(s)&&o.equals(a)&&r.equals(l)?t:new sl(R.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+o.column-a.column,s,t.leftoverVisibleColumns+n.column-s.column)}_setState(e,t,n){if(n&&(n=i._validateViewState(e.viewModel,n)),t){let o=e.model.validateRange(t.selectionStart),r=t.selectionStart.equalsRange(o)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),a=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new sl(o,t.selectionStartKind,r,s,a)}else{if(!n)return;let o=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new sl(o,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){let o=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new sl(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{let o=e.coordinatesConverter.convertModelPositionToViewPosition(new J(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new J(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new R(o.lineNumber,o.column,r.lineNumber,r.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new sl(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}});var KW,Hgt=D(()=>{Wt();lp();Sm();Vgt();kt();Ue();Qn();KW=class{constructor(e){this.context=e,this.cursors=[new YW(e)],this.lastAddedCursorIndex=0}dispose(){for(let e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(let e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(let e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(let e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return Uat(this.cursors,pa(e=>e.viewState.position,J.compare)).viewState.position}getBottomMostViewPosition(){return Wat(this.cursors,pa(e=>e.viewState.position,J.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(ji.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){let t=this.cursors.length-1,n=e.length;if(tn){let o=t-n;for(let r=0;r=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;let e=this.cursors.slice(0),t=[];for(let n=0,o=e.length;nn.selection,R.compareRangesUsingStarts));for(let n=0;nd&&g.index--;e.splice(d,1),t.splice(u,1),this._removeSecondaryCursor(d-1),n--}}}}});var JW,Wgt=D(()=>{JW=class{constructor(e,t,n,o){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=o}}});var hle,fle,ple,mle,T1,TN,gle,ble,kN,XW,MB,RB,vC,Ale,vle,yle,wle,xle,Cle=D(()=>{hle=class{constructor(){this.type=0}},fle=class{constructor(){this.type=1}},ple=class{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}},mle=class{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}},T1=class{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}},TN=class{constructor(){this.type=5}},gle=class{constructor(e){this.type=6,this.isFocused=e}},ble=class{constructor(){this.type=7}},kN=class{constructor(){this.type=8}},XW=class{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}},MB=class{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}},RB=class{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}},vC=class{constructor(e,t,n,o,r,s,a){this.source=e,this.minimalReveal=t,this.range=n,this.selections=o,this.verticalType=r,this.revealHorizontal=s,this.scrollType=a,this.type=12}},Ale=class{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}},vle=class{constructor(e){this.theme=e,this.type=14}},yle=class{constructor(e){this.type=15,this.ranges=e}},wle=class{constructor(){this.type=16}},xle=class{constructor(){this.type=17}}});var _le,ZRe,Sle,Ele,Dle,Tle,kle,Ile,Lle,Nle,Mle,Rle,Fle,Ole,Ple,Ble=D(()=>{et();de();_le=class extends H{constructor(){super(),this._onEvent=this._register(new q),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;let e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){let e=this._viewEventQueue;this._viewEventQueue=null;let t=this._eventHandlers.slice(0);for(let n of t)n.handleEvents(e)}}},ZRe=class{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}},Sle=class i{constructor(e,t,n,o){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=o,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}},Ele=class i{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new i(this.oldHasFocus,e.hasFocus)}},Dle=class i{constructor(e,t,n,o,r,s,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=o,this.scrollWidth=r,this.scrollLeft=s,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}},Tle=class{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},kle=class{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},Ile=class i{constructor(e,t,n,o,r,s,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=o,this.source=r,this.reason=s,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let n=e.length,o=t.length;if(n!==o)return!1;for(let r=0;r{Tt();Rt();Hgt();Sm();Wgt();Qse();gae();VW();Ue();Qn();GE();Cle();de();Ble();zle=class extends H{constructor(e,t,n,o){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new JW(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors=new KW(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Oi(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new JW(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;ts&&(o=o.slice(0,s),r=!0);let a=ZW.from(this._model,this);return this._cursors.setStates(o),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,a,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,n,o,r,s){let a=this._cursors.getViewPositions(),l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=R.fromPositions(a[0],a[0]),e.emitViewEvent(new vC(t,n,l,c,o,r,s))}revealPrimary(e,t,n,o,r,s){let l=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new vC(t,n,null,l,o,r,s))}saveState(){let e=[],t=this._cursors.getSelections();for(let n=0,o=t.length;n0){let r=ji.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,r)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{let r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,ji.fromModelSelections(r))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;let e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,o){this.setStates(e,t,o,ji.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],o=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(n,o),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,o,r){let s=ZW.from(this._model,this);if(s.equals(o))return!1;let a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new mle(l,a,n)),!o||o.cursorState.length!==s.cursorState.length||s.cursorState.some((c,u)=>!c.modelState.equals(o.cursorState[u].modelState))){let c=o?o.cursorState.map(d=>d.modelState.selection):null,u=o?o.modelVersionId:0;e.emitOutgoingEvent(new Ile(c,a,u,s.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,o=e.length;n=0)return null;let s=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;let a=s[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;let c=l[0].open,u=r.text.length-s[2].length-1,d=r.text.lastIndexOf(c,u-1);if(d===-1)return null;t.push([d,u])}return t}executeEdits(e,t,n,o){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);let s=[],a=[],l=this._model.pushEditOperations(this.getSelections(),n,c=>{if(r)for(let d=0,h=r.length;d0&&this._pushAutoClosedAction(s,a)}_executeEdit(e,t,n,o=0){if(this.context.cursorConfig.readOnly)return;let r=ZW.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){ft(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,o,r,!1)&&this.revealAll(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return Vle.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new tFe(this._model,this.getSelections())}endComposition(e,t){let n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Qg.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){let o=t.length,r=0;for(;r{let c=l.getPosition();return new qe(c.lineNumber,c.column+r,c.lineNumber,c.column+r)});this.setSelections(e,s,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Qg.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,o,r))},e,s)}paste(e,t,n,o,r){this._executeEdit(()=>{this._executeEditOperation(Qg.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,o||[]))},e,r,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(mC.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new sc(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new sc(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}},ZW=class i{static from(e,t){return new i(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}},$Re=class{static executeCommands(e,t,n){let o={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(o,n);for(let s=0,a=o.trackedRanges.length;s0&&(s[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,s,c=>{let u=[];for(let f=0;ff.identifier.minor-p.identifier.minor,h=[];for(let f=0;f0?(u[f].sort(d),h[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>u[f],getTrackedSelection:p=>{let g=parseInt(p,10),A=e.model._getTrackedRange(e.trackedRanges[g]);return e.trackedRangesDirection[g]===0?new qe(A.startLineNumber,A.startColumn,A.endLineNumber,A.endColumn):new qe(A.endLineNumber,A.endColumn,A.startLineNumber,A.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);let l=[];for(let c in r)r.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,u)=>u-c);for(let c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{R.isEmpty(d)&&h===""||o.push({identifier:{major:t,minor:r++},range:d,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},a=!1,u={addEditOperation:s,addTrackedEditOperation:(d,h,f)=>{a=!0,s(d,h,f)},trackSelection:(d,h)=>{let f=qe.liftSelection(d),p;if(f.isEmpty())if(typeof h=="boolean")h?p=2:p=3;else{let v=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===v?p=2:p=3}else p=1;let g=e.trackedRanges.length,A=e.model._setTrackedRange(null,f,p);return e.trackedRanges[g]=A,e.trackedRangesDirection[g]=f.getDirection(),g.toString()}};try{n.getEditOperations(e.model,u)}catch(d){return ft(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:o,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,o)=>-R.compareRangesUsingEnds(n.range,o.range));let t={};for(let n=1;nr.identifier.major?s=o.identifier.major:s=r.identifier.major,t[s.toString()]=!0;for(let a=0;a0&&n--}}return t}},eFe=class{constructor(e,t,n){this.text=e,this.startSelection=t,this.endSelection=n}},tFe=class i{static _capture(e,t){let n=[];for(let o of t){if(o.startLineNumber!==o.endLineNumber)return null;n.push(new eFe(e.getLineContent(o.startLineNumber),o.startColumn-1,o.endColumn-1))}return n}constructor(e,t){this._original=i._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;let n=i._capture(e,t);if(!n||this._original.length!==n.length)return null;let o=[];for(let r=0,s=this._original.length;r{Rt();iFe=class{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;let t=this._inserts,n=this._changes,o=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,o)}},nFe=class{constructor(e,t,n,o,r){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=o,this.minWidth=r,this.prefixSum=0}},Hle=class i{static{this.INSTANCE_COUNT=0}constructor(e,t,n,o){this._instanceId=E$(++i.INSTANCE_COUNT),this._pendingChanges=new iFe,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=o}static findInsertionIndex(e,t,n){let o=0,r=e.length;for(;o>>1;t===e[s].afterLineNumber?n{t=!0,o=o|0,r=r|0,s=s|0,a=a|0;let l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new nFe(l,o,r,s,a)),l},changeOneWhitespace:(o,r,s)=>{t=!0,r=r|0,s=s|0,this._pendingChanges.change({id:o,newAfterLineNumber:r,newHeight:s})},removeWhitespace:o=>{t=!0,this._pendingChanges.remove({id:o})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(let l of e)this._insertWhitespace(l);for(let l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(let l of n){let c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}let o=new Set;for(let l of n)o.add(l.id);let r=new Map;for(let l of t)r.set(l.id,l);let s=l=>{let c=[];for(let u of l)if(!o.has(u.id)){if(r.has(u.id)){let d=r.get(u.id);u.afterLineNumber=d.newAfterLineNumber,u.height=d.newHeight}c.push(u)}return c},a=s(this._arr).concat(s(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){let t=i.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){let t=this._arr;for(let n=0,o=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,o=this._arr.length;n=t.length||t[a+1].afterLineNumber>=e)return a;n=a+1|0}else o=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;let n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;let o=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+o+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;let n=this._lineHeight*e,o=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+o+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;let t=this._lineCount|0,n=this._lineHeight,o=1,r=t;for(;o=a+n)o=s+1;else{if(e>=a)return s;r=s}}return o>t?t:o}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this._lineHeight,o=this.getLineNumberAtOrAfterVerticalOffset(e)|0,r=this.getVerticalOffsetForLineNumber(o)|0,s=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(o)|0,l=this.getWhitespacesCount()|0,c,u;a===-1?(a=l,u=s+1,c=0):(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let d=r,h=d,f=5e5,p=0;r>=f&&(p=Math.floor(r/f)*f,p=Math.floor(p/n)*n,h-=p);let g=[],A=e+(t-e)/2,v=-1;for(let E=o;E<=s;E++){if(v===-1){let I=d,T=d+n;(I<=A&&AA)&&(v=E)}for(d+=n,g[E-o]=h,h+=n;u===E;)h+=c,d+=c,a++,a>=l?u=s+1:(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(d>=t){s=E;break}}v===-1&&(v=s);let w=this.getVerticalOffsetForLineNumber(s)|0,C=o,_=s;return C<_&&rt&&_--,{bigNumbersDelta:p,startLineNumber:o,endLineNumber:s,relativeVerticalOffset:g,centeredLineNumber:v,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:_,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;let t=this.getAfterLineNumberForWhitespaceIndex(e),n;t>=1?n=this._lineHeight*t:n=0;let o;return e>0?o=this.getWhitespacesAccumulatedHeight(e-1):o=0,n+o+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;let o=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=o+r)return-1;for(;t=a+l)t=s+1;else{if(e>=a)return s;n=s}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;let t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;let n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;let o=this.getHeightForWhitespaceIndex(t),r=this.getIdForWhitespaceIndex(t),s=this.getAfterLineNumberForWhitespaceIndex(t);return{id:r,afterLineNumber:s,verticalOffset:n,height:o}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),o=this.getWhitespacesCount()-1;if(n<0)return[];let r=[];for(let s=n;s<=o;s++){let a=this.getVerticalOffsetForWhitespaceIndex(s),l=this.getHeightForWhitespaceIndex(s);if(a>=t)break;r.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:a,height:l})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}}});var _ui,IN,oFe,Wle,Ggt=D(()=>{et();de();GO();Qgt();d0();Ble();_ui=125,IN=class{constructor(e,t,n,o){e=e|0,t=t|0,n=n|0,o=o|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),o<0&&(o=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=o,this.scrollHeight=Math.max(n,o)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}},oFe=class extends H{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new q),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new IN(0,0,0,0),this._scrollable=this._register(new Ng({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;let t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);let n=t.contentWidth!==e.contentWidth,o=t.contentHeight!==e.contentHeight;(n||o)&&this._onDidContentSizeChange.fire(new Sle(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}},Wle=class extends H{constructor(e,t,n){super(),this._configuration=e;let o=this._configuration.options,r=o.get(146),s=o.get(84);this._linesLayout=new Hle(t,o.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new oFe(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new IN(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?_ui:0)}onConfigurationChanged(e){let t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){let n=t.get(84);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(146)){let n=t.get(146),o=n.contentWidth,r=n.height,s=this._scrollable.getScrollDimensions(),a=s.contentWidth;this._scrollable.setScrollDimensions(new IN(o,s.contentWidth,r,this._getContentHeight(o,r,a)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){let o=this._configuration.options.get(104);return o.horizontal===2||e>=t?0:o.horizontalScrollbarSize}_getContentHeight(e,t,n){let o=this._configuration.options,r=this._linesLayout.getLinesTotalHeight();return o.get(106)?r+=Math.max(0,t-o.get(67)-o.get(84).bottom):o.get(104).ignoreHorizontalScrollbarInContentHeight||(r+=this._getHorizontalScrollbarHeight(e,n)),r}_updateHeight(){let e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,o=e.contentWidth;this._scrollable.setScrollDimensions(new IN(t,e.contentWidth,n,this._getContentHeight(t,n,o)))}getCurrentViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new kW(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new kW(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){let e=this._configuration.options,t=this._maxLineWidth,n=e.get(147),o=e.get(50),r=e.get(146);if(n.isViewportWrapping){let s=e.get(73);return t>r.contentWidth+o.typicalHalfwidthCharacterWidth&&s.enabled&&s.side==="right"?t+r.verticalScrollbarWidth:t}else{let s=e.get(105)*o.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+s+r.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){let e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new IN(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){let e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),o=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-o,scrollLeft:e.scrollLeft}}changeWhitespace(e){let t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){let t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){let n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}});function jle(i,e){return!(e.options.hideInCommentTokens&&Qle(i,e)||e.options.hideInStringTokens&&Gle(i,e))}function Qle(i,e){return qgt(i,e.range,t=>t===1)}function Gle(i,e){return qgt(i,e.range,t=>t===2)}function qgt(i,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let o=i.tokenization.getLineTokens(n),r=n===e.startLineNumber,s=n===e.endLineNumber,a=r?o.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(o.getStandardTokenType(a)))return!1;a++}}return!0}var Ule,rFe=D(()=>{kt();Ue();d0();ea();Ule=class{constructor(e,t,n,o,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=o,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,n=this._decorationsCache[t];if(!n){let o=e.range,r=e.options,s;if(r.isWholeLine){let a=this._coordinatesConverter.convertModelPositionToViewPosition(new J(o.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new J(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber)),1);s=new R(a.lineNumber,a.column,l.lineNumber,l.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(o,1);n=new uB(s,r),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,n=!1){let o=new R(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(o,t,n).inlineDecorations[0]}_getDecorationsInRange(e,t,n){let o=this._linesCollection.getDecorationsInRange(e,this.editorId,GI(this.configuration.options),t,n),r=e.startLineNumber,s=e.endLineNumber,a=[],l=0,c=[];for(let u=r;u<=s;u++)c[u-r]=[];for(let u=0,d=o.length;u=sFe.length)for(let e=1;e<=i;e++)sFe[e]=Sui(e);return sFe[i]}function Sui(i){return new Array(i+1).join(" ")}var aFe,qle,Yle,sFe,Kgt=D(()=>{Fg();kt();GE();d0();aFe=class{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,n){this._assertVisible();let o=n>0?this._projectionData.breakOffsets[n-1]:0,r=this._projectionData.breakOffsets[n],s;if(this._projectionData.injectionOffsets!==null){let a=this._projectionData.injectionOffsets.map((c,u)=>new fp(0,0,c+1,this._projectionData.injectionOptions[u],0));s=fp.applyInjectedText(e.getLineContent(t),a).substring(o,r)}else s=e.getValueInRange({startLineNumber:t,startColumn:o+1,endLineNumber:t,endColumn:r+1});return n>0&&(s=Ygt(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){let o=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],o),o[0]}getViewLinesData(e,t,n,o,r,s,a){this._assertVisible();let l=this._projectionData,c=l.injectionOffsets,u=l.injectionOptions,d=null;if(c){d=[];let f=0,p=0;for(let g=0;g0?l.breakOffsets[g-1]:0,w=l.breakOffsets[g];for(;pw)break;if(v0?l.wrappedTextIndentLength:0,N=T+Math.max(_-v,0),L=T+Math.min(E-v,w-v);N!==L&&A.push(new Nse(N,L,I.inlineClassName,I.inlineClassNameAffectsLetterSpacing))}}if(E<=w)f+=C,p++;else break}}}let h;c?h=e.tokenization.getLineTokens(t).withInserted(c.map((f,p)=>({offset:f,text:u[p].content,tokenMetadata:Nr.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let f=n;f0?o.wrappedTextIndentLength:0,s=n>0?o.breakOffsets[n-1]:0,a=o.breakOffsets[n],l=e.sliceAndInflate(s,a,r),c=l.getLineContent();n>0&&(c=Ygt(o.wrappedTextIndentLength)+c);let u=this._projectionData.getMinOutputOffset(n)+1,d=c.length+1,h=n+1o+1?(t.push(new R(n,1,o,1)),n=a.startLineNumber,o=a.endLineNumber):a.endLineNumber>o&&(o=a.endLineNumber)}return t.push(new R(n,1,o,1)),t}var Jle,Xle,Zle,lFe,$le,cFe,Jgt=D(()=>{Wt();kt();Ue();Toe();bs();GE();Cle();Kgt();tke();d0();Jle=class{constructor(e,t,n,o,r,s,a,l,c,u){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=o,this.fontInfo=r,this.tabSize=s,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=u,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new lFe(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));let n=this.model.getLinesContent(),o=this.model.getInjectedTextDecorations(this._editorId),r=n.length,s=this.createLineBreaksComputer(),a=new Ad(fp.fromDecorations(o));for(let g=0;gv.lineNumber===g+1);s.addRequest(n[g],A,t?t[g]:null)}let l=s.finalize(),c=[],u=this.hiddenAreasDecorationIds.map(g=>this.model.getDecorationRange(g)).sort(R.compareRangesUsingStarts),d=1,h=0,f=-1,p=f+1=d&&A<=h,w=Kle(l[g],!v);c[g]=w.getViewLineCount(),this.modelLineProjections[g]=w}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Pte(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){let t=e.map(h=>this.model.validateRange(h)),n=Eui(t),o=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(R.compareRangesUsingStarts);if(n.length===o.length){let h=!1;for(let f=0;f({range:h,options:Ot.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,r);let s=n,a=1,l=0,c=-1,u=c+1=a&&f<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),p=!0):(d=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),p=!0)),p){let g=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,g)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,o,r){let s=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===n,c=this.wrappingIndent===o,u=this.wordBreak===r;if(s&&a&&l&&c&&u)return!1;let d=s&&a&&!l&&c&&u;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=o,this.wordBreak=r;let h=null;if(d){h=[];for(let f=0,p=this.modelLineProjections.length;f2&&!this.modelLineProjections[t-2].isVisible(),s=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,a=0,l=[],c=[];for(let u=0,d=o.length;ul?(u=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=u+l-1,p=d+1,g=p+(r-l)-1,c=!0):rt?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);let o=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.guides.getActiveIndentGuide(o.lineNumber,r.lineNumber,s.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,o=t.remainder;return new Xle(n+1,o)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),o=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new J(e.modelLineNumber,o)}getModelEndPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),o=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new J(e.modelLineNumber,o)}getViewLineInfosGroupedByModelRanges(e,t){let n=this.getViewLineInfo(e),o=this.getViewLineInfo(t),r=new Array,s=this.getModelStartPositionOfViewLine(n),a=new Array;for(let l=n.modelLineNumber;l<=o.modelLineNumber;l++){let c=this.modelLineProjections[l-1];if(c.isVisible()){let u=l===n.modelLineNumber?n.modelLineWrappedLineIdx:0,d=l===o.modelLineNumber?o.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=u;h{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=u.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumberu.modelLineWrappedLineIdx)return}let g=this.convertModelPositionToViewPosition(u.modelLineNumber,f.horizontalLine.endColumn),A=this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return A.lineNumber===u.modelLineWrappedLineIdx?new c0(f.visibleColumn,p,f.className,new tC(f.horizontalLine.top,g.column),-1,-1):A.lineNumber!!f))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),r=[],s=[],a=[],l=n.lineNumber-1,c=o.lineNumber-1,u=null;for(let p=l;p<=c;p++){let g=this.modelLineProjections[p];if(g.isVisible()){let A=g.getViewLineNumberOfModelPosition(0,p===l?n.column:1),v=g.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(p+1)),w=v-A+1,C=0;w>1&&g.getViewLineMinColumn(this.model,p+1,v)===1&&(C=A===0?1:2),s.push(w),a.push(C),u===null&&(u=new J(p+1,0))}else u!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,p)),u=null)}u!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,o.lineNumber)),u=null);let d=t-e+1,h=new Array(d),f=0;for(let p=0,g=r.length;pt&&(p=!0,f=t-r+1),d.getViewLinesData(this.model,c+1,h,f,r-e,n,l),r+=f,p)break}return l}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let o=this.projectedModelLineLineCounts.getIndexOf(e-1),r=o.index,s=o.remainder,a=this.modelLineProjections[r],l=a.getViewLineMinColumn(this.model,r+1,s),c=a.getViewLineMaxColumn(this.model,r+1,s);tc&&(t=c);let u=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new J(r+1,u)).equals(n)?new J(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){let n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),o=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new R(n.lineNumber,n.column,o.lineNumber,o.column)}convertViewPositionToModelPosition(e,t){let n=this.getViewLineInfo(e),o=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new J(n.modelLineNumber,o))}convertViewRangeToModelRange(e){let t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new R(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,o=!1,r=!1){let s=this.model.validatePosition(new J(e,t)),a=s.lineNumber,l=s.column,c=a-1,u=!1;if(r)for(;c0&&!this.modelLineProjections[c].isVisible();)c--,u=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new J(o?0:1,1);let d=1+this.projectedModelLineLineCounts.getPrefixSum(c),h;return u?r?h=this.modelLineProjections[c].getViewPositionOfModelPosition(d,1,n):h=this.modelLineProjections[c].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(c+1),n):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(d,l,n),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return R.fromPositions(n)}else{let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),o=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new R(n.lineNumber,n.column,o.lineNumber,o.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){let r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;let o=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,o,r){let s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new R(s.lineNumber,1,a.lineNumber,a.column),t,n,o,r);let l=[],c=s.lineNumber-1,u=a.lineNumber-1,d=null;for(let g=c;g<=u;g++)if(this.modelLineProjections[g].isVisible())d===null&&(d=new J(g+1,g===c?s.column:1));else if(d!==null){let v=this.model.getLineMaxColumn(g);l=l.concat(this.model.getDecorationsInRange(new R(d.lineNumber,d.column,g,v),t,n,o)),d=null}d!==null&&(l=l.concat(this.model.getDecorationsInRange(new R(d.lineNumber,d.column,a.lineNumber,a.column),t,n,o)),d=null),l.sort((g,A)=>{let v=R.compareRangesUsingStarts(g.range,A.range);return v===0?g.idA.id?1:0:v});let h=[],f=0,p=null;for(let g of l){let A=g.id;p!==A&&(p=A,h[f++]=g)}return h}getInjectedTextAt(e){let t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){let n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){let t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}};Xle=class{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}},Zle=class{constructor(e,t){this.modelRange=e,this.viewLines=t}},lFe=class{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,o){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,o)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}},$le=class{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new cFe(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,o){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n,o)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new MB(t,n)}onModelLinesInserted(e,t,n,o){return new RB(t,n)}onModelLineChanged(e,t,n){return[!1,new XW(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){let n=t-e+1,o=new Array(n);for(let r=0;rt)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}});var LN,ece,Xgt=D(()=>{ol();LN=qu.Right,ece=class{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*LN/8))}reset(e){let t=Math.ceil((e+1)*LN/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<{Wt();Gt();Wr();de();wi();Rt();ea();jgt();Sm();kt();Ue();GE();ro();sp();hIe();Cle();Ggt();LRe();d0();rFe();Ble();Jgt();Xgt();Dui=!0,tce=class extends H{constructor(e,t,n,o,r,s,a,l,c,u){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=c,this._transactionalTarget=u,this.hiddenAreasModel=new hFe,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new _le,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new pC(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new si(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=uFe.create(this.model),this.glyphLanes=new ece(0),Dui&&this.model.isTooLargeForTokenization())this._lines=new $le(this.model);else{let d=this._configuration.options,h=d.get(50),f=d.get(140),p=d.get(147),g=d.get(139),A=d.get(130);this._lines=new Jle(this._editorId,this.model,o,r,h,this.model.getOptions().tabSize,f,p.wrappingColumn,g,A)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new zle(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Wle(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll(d=>{d.scrollTopChanged&&this._handleVisibleLinesChanged(),d.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Ale(d)),this._eventDispatcher.emitOutgoingEvent(new Dle(d.oldScrollWidth,d.oldScrollLeft,d.oldScrollHeight,d.oldScrollTop,d.scrollWidth,d.scrollLeft,d.scrollHeight,d.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(d=>{this._eventDispatcher.emitOutgoingEvent(d)})),this._decorations=new Ule(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(d=>{try{let h=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(h,d)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(IB.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new wle)})),this._register(this._themeService.onDidColorThemeChange(d=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new vle(d))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){let e=this.viewLayout.getLinesViewportData(),t=new R(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new gle(e)),this._eventDispatcher.emitOutgoingEvent(new Ele(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new hle)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new fle)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){let e=new J(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new ice(t,this._viewportStart.startLineDelta)}return new ice(null,0)}_onConfigurationChanged(e,t){let n=this._captureStableViewport(),o=this._configuration.options,r=o.get(50),s=o.get(140),a=o.get(147),l=o.get(139),c=o.get(130);this._lines.setWrappingSettings(r,s,a.wrappingColumn,l,c)&&(e.emitViewEvent(new TN),e.emitViewEvent(new kN),e.emitViewEvent(new T1(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new T1(null))),t.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new T1(null))),e.emitViewEvent(new ple(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),pC.shouldRecreate(t)&&(this.cursorConfig=new pC(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{let n=this._eventDispatcher.beginEmitViewEvents(),o=!1,r=!1,s=e instanceof QE?e.rawContentChangedEvent.changes:e.changes,a=e instanceof QE?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(let d of s)switch(d.changeType){case 4:{for(let h=0;h!g.ownerId||g.ownerId===this._editorId)),l.addRequest(f,p,null)}break}case 2:{let h=null;d.injectedText&&(h=d.injectedText.filter(f=>!f.ownerId||f.ownerId===this._editorId)),l.addRequest(d.detail,h,null);break}}let c=l.finalize(),u=new Ad(c);for(let d of s)switch(d.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new TN),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),o=!0;break}case 3:{let h=this._lines.onModelLinesDeleted(a,d.fromLineNumber,d.toLineNumber);h!==null&&(n.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),o=!0;break}case 4:{let h=u.takeCount(d.detail.length),f=this._lines.onModelLinesInserted(a,d.fromLineNumber,d.toLineNumber,h);f!==null&&(n.emitViewEvent(f),this.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),o=!0;break}case 2:{let h=u.dequeue(),[f,p,g,A]=this._lines.onModelLineChanged(a,d.lineNumber,h);r=f,p&&n.emitViewEvent(p),g&&(n.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),A&&(n.emitViewEvent(A),this.viewLayout.onLinesDeleted(A.fromLineNumber,A.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!o&&r&&(n.emitViewEvent(new kN),n.emitViewEvent(new T1(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}let t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){let n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){let o=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),r=this.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber);this.viewLayout.setScrollPosition({scrollTop:r+this._viewportStart.startLineDelta},1)}}try{let n=this._eventDispatcher.beginEmitViewEvents();e instanceof QE&&n.emitOutgoingEvent(new Fle(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let n=0,o=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new ble),this.cursorConfig=new pC(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Rle(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new pC(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Mle(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{let t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new TN),t.emitViewEvent(new kN),t.emitViewEvent(new T1(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new pC(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Ole(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new T1(e)),this._eventDispatcher.emitOutgoingEvent(new Nle(e))}))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);let n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;let o=this._captureStableViewport(),r=!1;try{let s=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(s.emitViewEvent(new TN),s.emitViewEvent(new kN),s.emitViewEvent(new T1(null)),this._cursor.onLineMappingChanged(s),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());let a=o.viewportStartModelPosition?.lineNumber;a&&n.some(c=>c.startLineNumber<=a&&a<=c.endLineNumber)||o.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new kle)}getVisibleRangesPlusViewportAboveBelow(){let e=this._configuration.options.get(146),t=this._configuration.options.get(67),n=Math.max(20,Math.round(e.height/t)),o=this.viewLayout.getLinesViewportData(),r=Math.max(1,o.completelyVisibleStartLineNumber-n),s=Math.min(this.getLineCount(),o.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new R(r,this.getLineMinColumn(r),s,this.getLineMaxColumn(s)))}getVisibleRanges(){let e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){let t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];let o=[],r=0,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let u=0,d=n.length;ul||(s"u")return this._reduceRestoreStateCompatibility(e);let t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),o=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:o}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,o){return this._lines.getViewLinesBracketGuides(e,t,n,o)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){let t=Hr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){let t=tu(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){let o=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,o)}getViewLineRenderingData(e){let t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){let n=this.model.mightContainRTL(),o=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(t=[...t,...s.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new vh(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,n,o,s.tokens,t,r,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){let o=this._lines.getViewLinesData(e,t,n);return new Lse(this.getTabSize(),o)}getAllOverviewRulerDecorations(e){let t=this.model.getOverviewRulerDecorations(this._editorId,GI(this._configuration.options)),n=new dFe;for(let o of t){let r=o.options,s=r.overviewRuler;if(!s)continue;let a=s.position;if(a===0)continue;let l=s.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(o.range.startLineNumber,o.range.startColumn),u=this.coordinatesConverter.getViewLineNumberOfModelPosition(o.range.endLineNumber,o.range.endColumn);n.accept(l,r.zIndex,c,u,a)}return n.asArray}_invalidateDecorationsColorCache(){let e=this.model.getOverviewRulerDecorations();for(let t of e)t.options.overviewRuler?.invalidateCachedColor(),t.options.minimap?.invalidateCachedColor()}getValueInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){let n=this.coordinatesConverter.convertViewPositionToModelPosition(e),o=this.model.modifyPosition(n,t);return this.coordinatesConverter.convertModelPositionToViewPosition(o)}deduceModelPositionRelativeToViewPosition(e,t,n){let o=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);let s=this.model.getOffsetAt(o)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,n){let o=n?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(R.compareRangesUsingStarts);let r=!1,s=!1;for(let l of e)l.isEmpty()?r=!0:s=!0;if(!s){if(!t)return"";let l=e.map(u=>u.startLineNumber),c="";for(let u=0;u0&&l[u-1]===l[u]||(c+=this.model.getLineContent(l[u])+o);return c}if(r&&t){let l=[],c=0;for(let u of e){let d=u.startLineNumber;u.isEmpty()?d!==c&&l.push(this.model.getLineContent(d)):l.push(this.model.getValueInRange(u,n?2:0)),c=d}return l.length===1?l[0]:l}let a=[];for(let l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,n?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){let n=this.model.getLanguageId();if(n===fs||e.length!==1)return null;let o=e[0];if(o.isEmpty()){if(!t)return null;let u=o.startLineNumber;o=new R(u,this.model.getLineMinColumn(u),u,this.model.getLineMaxColumn(u))}let r=this._configuration.options.get(50),s=this._getColorMap(),l=/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===kl.fontFamily,c;return l?c=kl.fontFamily:(c=r.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${kl.fontFamily}`),{mode:n,html:`
    `+this._getHTMLToCopy(o,s)+"
    "}}_getHTMLToCopy(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=this.getTabSize(),l="";for(let c=n;c<=r;c++){let u=this.model.tokenization.getLineTokens(c),d=u.getLineContent(),h=c===n?o-1:0,f=c===r?s-1:d.length;d===""?l+="
    ":l+=rut(d,u.inflate(),t,h,f,a,Fo)}return l}_getColorMap(){let e=Gn.getColorMap(),t=["#000000"];if(e)for(let n=1,o=e.length;nthis._cursor.setStates(o,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(o=>this._cursor.setSelections(o,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Lle);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(o=>this._cursor.executeEdits(o,e,t,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,o,r){this._executeCursorEdit(s=>this._cursor.compositionType(s,e,t,n,o,r))}paste(e,t,n,o){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,o))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealAllCursors(e,t,n=!1){this._withViewEventsCollector(o=>this._cursor.revealAll(o,e,n,0,t,0))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(o=>this._cursor.revealPrimary(o,e,n,0,t,0))}revealTopMostCursor(e){let t=this._cursor.getTopMostViewPosition(),n=new R(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(o=>o.emitViewEvent(new vC(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){let t=this._cursor.getBottomMostViewPosition(),n=new R(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(o=>o.emitViewEvent(new vC(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,o,r){this._withViewEventsCollector(s=>s.emitViewEvent(new vC(e,!1,n,null,o,t,r)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new xle),this._eventDispatcher.emitOutgoingEvent(new Tle))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{let t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}},uFe=class i{static create(e){let t=e._setTrackedRange(null,new R(1,1,1,1),1);return new i(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,o,r){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=o,this._startLineDelta=r}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){let n=e.coordinatesConverter.convertViewPositionToModelPosition(new J(t,e.getLineMinColumn(t))),o=e.model._setTrackedRange(this._modelTrackedRange,new R(n.lineNumber,n.column,n.lineNumber,n.column),1),r=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=o,this._startLineDelta=s-r}invalidate(){this._isValid=!1}},dFe=class{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,o,r){let s=this._asMap[e];if(s){let a=s.data,l=a[a.length-3],c=a[a.length-1];if(l===r&&c+1>=n){o>c&&(a[a.length-1]=o);return}a.push(r,n,o)}else{let a=new hN(e,t,[r,n,o]);this._asMap[e]=a,this.asArray.push(a)}}},hFe=class{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){let n=this.hiddenAreas.get(e);n&&Zgt(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;let e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>Tui(t,n),[]);return Zgt(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}};ice=class{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;let n=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),o=t.getVerticalOffsetForLineNumber(n.lineNumber);t.setScrollPosition({scrollTop:o+this.startLineDelta},1)}}});function fFe(i){return Lui+encodeURIComponent(i.toString())+Nui}function Fui(i){return Mui+encodeURIComponent(i.toString())+Rui}var kui,yC,NN,cD,Iui,pFe,nce,mu,mFe,gFe,bFe,AFe,Lui,Nui,Mui,Rui,$W=D(()=>{gmt();Ye();Tt();et();de();xl();bmt();um();wmt();Rse();Jt();hs();Ngt();Fgt();vRe();Ogt();ea();Zb();Am();kt();Ue();Qn();BW();qRe();TW();An();Rs();bs();Hi();zgt();$gt();Be();fh();to();Bt();ht();uN();Ic();nr();io();go();kui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},yC=function(i,e){return function(t,n){e(t,n,i)}},cD=class extends H{static{NN=this}static{this.dropIntoEditorDecorationOptions=Ot.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,t,n,o,r,s,a,l,c,u,d,h){super(),this.languageConfigurationService=d,this._deliveryQueue=Yqe(),this._contributions=this._register(new ule),this._onDidDispose=this._register(new q),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new mu(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new nce({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new nce({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new mu(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new mu(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new mu(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new mu(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new mu(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new mu(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new mu(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new mu(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new mu(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new mu(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new q),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new q),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),r.willCreateCodeEditor();let f={...t};this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++Iui,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,n.contextMenuId??(n.isSimpleWidget?tt.SimpleEditorContext:tt.EditorContext),f,u)),this._register(this._configuration.onDidChange(A=>{this._onDidChangeConfiguration.fire(A);let v=this._configuration.options;if(A.hasChanged(146)){let w=v.get(146);this._onDidLayoutChange.fire(w)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=r,this._commandService=s,this._themeService=l,this._register(new mFe(this,this._contextKeyService)),this._register(new gFe(this,this._contextKeyService,h)),this._instantiationService=this._register(o.createChild(new _m([Ze,this._contextKeyService]))),this._modelData=null,this._focusTracker=new bFe(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let p;Array.isArray(n.contributions)?p=n.contributions:p=_y.getEditorContributions(),this._contributions.initialize(this,p,this._instantiationService);for(let A of _y.getEditorActions()){if(this._actions.has(A.id)){ft(new Error(`Cannot have two actions with the same id ${A.id}`));continue}let v=new NB(A.id,A.label,A.alias,A.metadata,A.precondition??void 0,w=>this._instantiationService.invokeFunction(C=>Promise.resolve(A.runEditorCommand(C,this,w))),this._contextKeyService);this._actions.set(v.id,v)}let g=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new L$(this._domElement,{onDragOver:A=>{if(!g())return;let v=this.getTargetAtClientPoint(A.clientX,A.clientY);v?.position&&this.showDropIndicatorAt(v.position)},onDrop:async A=>{if(!g()||(this.removeDropIndicator(),!A.dataTransfer))return;let v=this.getTargetAtClientPoint(A.clientX,A.clientY);v?.position&&this._onDropIntoEditor.fire({position:v.position,event:A})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n,o){return new Fse(e,t,n,this._domElement,o)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return uC.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Ba.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";let t=!!(e&&e.preserveBOM),n=0;return e&&e.lineEnding&&e.lineEnding===` `?n=1:e&&e.lineEnding&&e.lineEnding===`\r -`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();let t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;let n={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(n);let r=this.hasTextFocus(),o=this._detachModel();this._attachModel(t),r&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(n),this._postDetachModelCleanup(o),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){let t=this._decorationTypeSubtypes[e];for(let n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,r){let o=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,r)}getTopForLineNumber(e,t=!1){return this._modelData?ZL._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?ZL._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,r=!1){let o=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,r)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;let n=this._modelData.model.getLineMaxColumn(e);return ZL._getVerticalOffsetAfterPosition(this._modelData,e,n,t)}setHiddenAreas(e,t){this._modelData?.viewModel.setHiddenAreas(e.map(n=>N.lift(n)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;let t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return to.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!K.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,r){if(!this._modelData)return;if(!N.isIRange(e))throw new Error("Invalid arguments");let o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",n,s,t,r)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new N(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,r){if(!K.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new N(e.lineNumber,e.column,e.lineNumber,e.column),t,n,r)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){let n=qe.isISelection(e),r=N.isIRange(e);if(!n&&!r)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(r){let o={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(o,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;let n=new qe(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,r){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new N(e,1,t,1),n,!1,r)}revealRange(e,t=0,n=!1,r=!0){this._revealRange(e,n?1:0,r,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,r){if(!N.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(N.lift(e),t,n,r)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let r=0,o=e.length;r0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});let r=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(r)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){n=n||{};try{switch(this._beginUpdate(),t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{let o=n;this._type(e,o.text||"");return}case"replacePreviousChar":{let o=n;this._compositionType(e,o.text||"",o.replaceCharCnt||0,0,0);return}case"compositionType":{let o=n;this._compositionType(e,o.text||"",o.replacePrevCharCnt||0,o.replaceNextCharCnt||0,o.positionDelta||0);return}case"paste":{let o=n;this._paste(e,o.text||"",o.pasteOnNewLine||!1,o.multicursorText||null,o.mode||null,o.clipboardEvent);return}case"cut":this._cut(e);return}let r=this.getAction(t);if(r){Promise.resolve(r.run(n)).then(void 0,pt);return}if(!this._modelData||this._triggerEditorCommand(e,t,n))return;this._triggerCommand(t,n)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,r,o){this._modelData&&this._modelData.viewModel.compositionType(t,n,r,o,e)}_paste(e,t,n,r,o,s){if(!this._modelData)return;let a=this._modelData.viewModel,l=a.getSelection().getStartPosition();a.paste(t,n,r,e);let c=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:s,range:new N(l.lineNumber,l.column,c.lineNumber,c.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){let r=sy.getEditorCommand(t);return r?(n=n||{},n.source=e,this._instantiationService.invokeFunction(o=>{Promise.resolve(r.runEditorCommand(o,this,n)).then(void 0,pt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(92))return!1;let r;return n?Array.isArray(n)?r=()=>n:r=n:r=()=>null,this._modelData.viewModel.executeEdits(e,t,r),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new KRe(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,hI(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,hI(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){let t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations(n=>n.deltaDecorations(t,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){let t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){let t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){let t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;let t=this._modelData.model.validatePosition(e),n=this._configuration.options,r=n.get(146),o=ZL._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+r.glyphMarginWidth+r.lineNumbersWidth+r.decorationsWidth-this.getScrollLeft();return{top:o,left:s,height:n.get(67)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){mo(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}let t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());let n=e.onBeforeAttached(),r=new Mae(this._id,this._configuration,e,Hse.create(rt(this._domElement)),Use.create(this._configuration.options),a=>vl(rt(this._domElement),a),this.languageConfigurationService,this._themeService,n,{batchChanges:a=>{try{return this._beginUpdate(),a()}finally{this._endUpdate()}}});t.push(e.onWillDispose(()=>this.setModel(null))),t.push(r.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){let d=this.getOption(80),h=y("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",d);this._notificationService.prompt(KS.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:y("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}let l=[];for(let d=0,h=a.selections.length;d{this._paste("keyboard",o,s,a,l)},type:o=>{this._type("keyboard",o)},compositionType:(o,s,a,l)=>{this._compositionType("keyboard",o,s,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(o,s,a,l)=>{let c={text:o,pasteOnNewLine:s,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:o=>{let s={text:o};this._commandService.executeCommand("type",s)},compositionType:(o,s,a,l)=>{if(a||l){let c={text:o,replacePrevCharCnt:s,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{let c={text:o,replaceCharCnt:s};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};let n=new RP(e.coordinatesConverter);return n.onKeyDown=o=>this._onKeyDown.fire(o),n.onKeyUp=o=>this._onKeyUp.fire(o),n.onContextMenu=o=>this._onContextMenu.fire(o),n.onMouseMove=o=>this._onMouseMove.fire(o),n.onMouseLeave=o=>this._onMouseLeave.fire(o),n.onMouseDown=o=>this._onMouseDown.fire(o),n.onMouseUp=o=>this._onMouseUp.fire(o),n.onMouseDrag=o=>this._onMouseDrag.fire(o),n.onMouseDrop=o=>this._onMouseDrop.fire(o),n.onMouseDropCanceled=o=>this._onMouseDropCanceled.fire(o),n.onMouseWheel=o=>this._onMouseWheel.fire(o),[new Vse(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;let e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){let t=[{range:new N(e.lineNumber,e.column,e.lineNumber,e.column),options:ZL.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}};zE=ZL=FAi([Kx(3,Ne),Kx(4,ai),Kx(5,Oi),Kx(6,Ze),Kx(7,Bn),Kx(8,Cn),Kx(9,Cs),Kx(10,qi),Kx(11,Le)],zE);OAi=0,QRe=class{constructor(e,t,n,r,o,s){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=r,this.listenersToRemove=o,this.attachedView=s}dispose(){Vi(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},Fae=class extends W{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new G(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new G(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){let t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}},au=class extends G{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}},GRe=class extends W{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=V.editorSimpleInput.bindTo(t),this._editorFocus=V.focus.bindTo(t),this._textInputFocus=V.textInputFocus.bindTo(t),this._editorTextFocus=V.editorTextFocus.bindTo(t),this._tabMovesFocus=V.tabMovesFocus.bindTo(t),this._editorReadonly=V.readOnly.bindTo(t),this._inDiffEditor=V.inDiffEditor.bindTo(t),this._editorColumnSelection=V.columnSelection.bindTo(t),this._hasMultipleSelections=V.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=V.hasNonEmptySelection.bindTo(t),this._canUndo=V.canUndo.bindTo(t),this._canRedo=V.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(Hx.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){let e=this._editor.getOptions();this._tabMovesFocus.set(Hx.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){let e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){let e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}},qRe=class extends W{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=V.languageId.bindTo(t),this._hasCompletionItemProvider=V.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=V.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=V.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=V.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=V.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=V.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=V.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=V.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=V.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=V.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=V.hasReferenceProvider.bindTo(t),this._hasRenameProvider=V.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=V.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=V.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=V.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=V.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=V.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=V.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=V.isInEmbeddedEditor.bindTo(t);let r=()=>this._update();this._register(e.onDidChangeModel(r)),this._register(e.onDidChangeModelLanguage(r)),this._register(n.completionProvider.onDidChange(r)),this._register(n.codeActionProvider.onDidChange(r)),this._register(n.codeLensProvider.onDidChange(r)),this._register(n.definitionProvider.onDidChange(r)),this._register(n.declarationProvider.onDidChange(r)),this._register(n.implementationProvider.onDidChange(r)),this._register(n.typeDefinitionProvider.onDidChange(r)),this._register(n.hoverProvider.onDidChange(r)),this._register(n.documentHighlightProvider.onDidChange(r)),this._register(n.documentSymbolProvider.onDidChange(r)),this._register(n.referenceProvider.onDidChange(r)),this._register(n.renameProvider.onDidChange(r)),this._register(n.documentFormattingEditProvider.onDidChange(r)),this._register(n.documentRangeFormattingEditProvider.onDidChange(r)),this._register(n.signatureHelpProvider.onDidChange(r)),this._register(n.inlayHintsProvider.onDidChange(r)),r()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){let e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===jt.walkThroughSnippet||e.uri.scheme===jt.vscodeChatCodeBlock)})}},YRe=class extends W{constructor(e,t){super(),this._onChange=this._register(new G),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(Yc(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(Yc(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){let e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}},KRe=class{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(r=>{this._isChangingDecorations||e.call(t,r)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];let e=this._editor.getModel(),t=[];for(let n of this._decorationIds){let r=e.getDecorationRange(n);r&&t.push(r)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{t=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}},PAi=encodeURIComponent("");zAi=encodeURIComponent('');ua((i,e)=>{let t=i.getColor(nI);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${jRe(t)}") repeat-x bottom left; }`);let n=i.getColor(Up);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${jRe(n)}") repeat-x bottom left; }`);let r=i.getColor(Hh);r&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${jRe(r)}") repeat-x bottom left; }`);let o=i.getColor(Ost);o&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${HAi(o)}") no-repeat bottom left; }`);let s=i.getColor(Kft);s&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${s.rgba.a}; }`)})});var q0t=D(()=>{});var lf,$L=D(()=>{lf=class i{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new i(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0,r=e.getVisibleRanges();if(r.length>0){t=r[0].getStartPosition();let o=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-o}return new i(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,r,o){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=r,this._cursorPosition=o}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n,1)}}});function Y0t(i,e,t,n){if(i.length===0)return e;if(e.length===0)return i;let r=[],o=0,s=0;for(;ou?(r.push(l),s++):(r.push(n(a,l)),o++,s++)}for(;o`Apply decorations from ${e.debugName}`},r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function Jx(i,e){return i.appendChild(e),Ve(()=>{e.remove()})}function K0t(i,e){return i.prepend(e),Ve(()=>{e.remove()})}function ZRe(i,e,t){let n=e.get(),r=n,o=n,s=Gt("animatedValue",n),a=-1,l=300,c;t.add(yx({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(d,h)=>(d.didChange(e)&&(h.animate=h.animate||d.change),!0)},(d,h)=>{c!==void 0&&(i.cancelAnimationFrame(c),c=void 0),r=o,n=e.read(d),a=Date.now()-(h.animate?0:l),u()}));function u(){let d=Date.now()-a;o=Math.floor(WAi(d,r,n-r,l)),d{for(let[n,r]of Object.entries(e))r&&typeof r=="object"&&"read"in r&&(r=r.read(t)),typeof r=="number"&&(r=`${r}px`),n=n.replace(/[A-Z]/g,o=>"-"+o.toLowerCase()),i.style[n]=r})}function QP(i,e,t,n){let r=new te,o=[];return r.add(ts((s,a)=>{let l=e.read(s),c=new Map,u=new Map;t&&t(!0),i.changeViewZones(d=>{for(let h of o)d.removeZone(h),n?.delete(h);o.length=0;for(let h of l){let f=d.addZone(h);h.setZoneId&&h.setZoneId(f),o.push(f),n?.add(f),c.set(h,f)}}),t&&t(!1),a.add(yx({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(d,h){let f=u.get(d.changedObservable);return f!==void 0&&h.zoneIds.push(f),!0}},(d,h)=>{for(let f of l)f.onChange&&(u.set(f.onChange,c.get(f)),f.onChange.read(d));t&&t(!0),i.changeViewZones(f=>{for(let p of h.zoneIds)f.layoutZone(p)}),t&&t(!1)}))})),r.add({dispose(){t&&t(!0),i.changeViewZones(s=>{for(let a of o)s.removeZone(a)}),n?.clear(),t&&t(!1)}}),r}function $Re(i,e){let t=cx(e,r=>r.original.startLineNumber<=i.lineNumber);if(!t)return N.fromPositions(i);if(t.original.endLineNumberExclusive<=i.lineNumber){let r=i.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return N.fromPositions(new K(r,i.column))}if(!t.innerChanges)return N.fromPositions(new K(t.modified.startLineNumber,1));let n=cx(t.innerChanges,r=>r.originalRange.getStartPosition().isBeforeOrEqual(i));if(!n){let r=i.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return N.fromPositions(new K(r,i.column))}if(n.originalRange.containsPosition(i))return n.modifiedRange;{let r=UAi(n.originalRange.getEndPosition(),i);return N.fromPositions(r.addToPosition(n.modifiedRange.getEndPosition()))}}function UAi(i,e){return i.lineNumber===e.lineNumber?new $c(0,e.column-i.column):new $c(e.lineNumber-i.lineNumber,e.column-1)}function J0t(i,e){let t;return i.filter(n=>{let r=e(n,t);return t=n,r})}var UP,eN,d1,JRe,Oae,tN,Pae,XRe,Ng=D(()=>{Jf();sn();ae();Tn();xMe();Nt();We();dx();UP=class extends W{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new xP(e,t)),this._width=Gt(this,this.elementSizeObserver.getWidth()),this._height=Gt(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>fn(r=>{this._width.set(this.elementSizeObserver.getWidth(),r),this._height.set(this.elementSizeObserver.getHeight(),r)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}};eN=class extends W{constructor(e,t,n){super(),this._register(new JRe(e,n)),this._register(up(n,{height:t.actualHeight,top:t.actualTop}))}},d1=class{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=Gt(this,void 0),this._actualHeight=Gt(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=n=>{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}},JRe=class i{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${i._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};Oae=class extends Bi{dispose(){super.dispose(!0)}};tN=class{static create(e,t=void 0){return new Pae(e,e,t)}static createWithDisposable(e,t,n=void 0){let r=new te;return r.add(t),r.add(e),new Pae(e,r,n)}},Pae=class extends tN{constructor(e,t,n){super(),this.object=e,this._disposable=t,this._debugOwner=n,this._refCount=1,this._isDisposed=!1,this._owners=[],n&&this._addOwner(n)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new XRe(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){let t=this._owners.indexOf(e);t!==-1&&this._owners.splice(t,1)}}},XRe=class extends tN{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}});var X0t=D(()=>{});function qAi(i,e,t){let n=[];for(let r of xF(i,(o,s)=>s.modified.startLineNumber-o.modified.endLineNumberExclusive<2*xH)){let o=[];o.push(new iFe);let s=new Yt(Math.max(1,r[0].original.startLineNumber-xH),Math.min(r[r.length-1].original.endLineNumberExclusive+xH,e+1)),a=new Yt(Math.max(1,r[0].modified.startLineNumber-xH),Math.min(r[r.length-1].modified.endLineNumberExclusive+xH,t+1));e$(r,(u,d)=>{let h=new Yt(u?u.original.endLineNumberExclusive:s.startLineNumber,d?d.original.startLineNumber:s.endLineNumberExclusive),f=new Yt(u?u.modified.endLineNumberExclusive:a.startLineNumber,d?d.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(p=>{o.push(new oFe(p,f.startLineNumber+(p-h.startLineNumber)))}),d&&(d.original.forEach(p=>{o.push(new nFe(d,p))}),d.modified.forEach(p=>{o.push(new rFe(d,p))}))});let l=r[0].modified.join(r[r.length-1].modified),c=r[0].original.join(r[r.length-1].original);n.push(new tFe(new tu(l,c),o))}return n}var aFe,lFe,jAi,QAi,GAi,VE,eFe,xH,hh,tFe,iFe,nFe,rFe,oFe,sFe,Bae,Z0t=D(()=>{Ye();ay();Dg();Ag();$a();Qt();er();ae();Tn();Dr();qp();Ng();Ks();md();Kf();Nt();We();fy();Sl();wg();ES();Zb();Oe();kE();ht();sp();X0t();aFe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lFe=function(i,e){return function(t,n){e(t,n,i)}},jAi=kn("diff-review-insert",Ee.add,y("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),QAi=kn("diff-review-remove",Ee.remove,y("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),GAi=kn("diff-review-close",Ee.close,y("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer.")),VE=class extends W{static{this._ttPolicy=fd("diffReview",{createHTML:e=>e})}constructor(e,t,n,r,o,s,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=r,this._width=o,this._height=s,this._diffs=a,this._models=l,this._instantiationService=c,this._state=sh(this,(u,d)=>{let h=this._visible.read(u);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;let f=d.add(this._instantiationService.createInstance(eFe,this._diffs,this._models,this._setVisible,this._canClose)),p=d.add(this._instantiationService.createInstance(sFe,this._parentNode,f,this._width,this._height,this._models));return{model:f,view:p}}).recomputeInitiallyAndOnChange(this._store)}next(){fn(e=>{let t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){fn(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){fn(e=>{this._setVisible(!1,e)})}};VE=aFe([lFe(8,Ne)],VE);eFe=class extends W{constructor(e,t,n,r,o){super(),this._diffs=e,this._models=t,this._setVisible=n,this.canClose=r,this._accessibilitySignalService=o,this._groups=Gt(this,[]),this._currentGroupIdx=Gt(this,0),this._currentElementIdx=Gt(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((s,a)=>this._groups.read(a)[s]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((s,a)=>this.currentGroup.read(a)?.lines[s]),this._register(_t(s=>{let a=this._diffs.read(s);if(!a){this._groups.set([],void 0);return}let l=qAi(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());fn(c=>{let u=this._models.getModifiedPosition();if(u){let d=l.findIndex(h=>u?.lineNumber{let a=this.currentElement.read(s);a?.type===hh.Deleted?this._accessibilitySignalService.playSignal(Qu.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===hh.Added&&this._accessibilitySignalService.playSignal(Qu.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(_t(s=>{let a=this.currentElement.read(s);if(a&&a.type!==hh.Header){let l=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(N.fromPositions(new K(l,1)))}}))}_goToGroupDelta(e,t){let n=this.groups.get();!n||n.length<=1||xg(t,r=>{this._currentGroupIdx.set(Di.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),r),this._currentElementIdx.set(0,r)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){let t=this.currentGroup.get();!t||t.lines.length<=1||fn(n=>{this._currentElementIdx.set(Di.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){let t=this.currentGroup.get();if(!t)return;let n=t.lines.indexOf(e);n!==-1&&fn(r=>{this._currentElementIdx.set(n,r)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);let e=this.currentElement.get();e&&(e.type===hh.Deleted?this._models.originalReveal(N.fromPositions(new K(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==hh.Header?N.fromPositions(new K(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};eFe=aFe([lFe(4,ap)],eFe);xH=3;(function(i){i[i.Header=0]="Header",i[i.Unchanged=1]="Unchanged",i[i.Deleted=2]="Deleted",i[i.Added=3]="Added"})(hh||(hh={}));tFe=class{constructor(e,t){this.range=e,this.lines=t}},iFe=class{constructor(){this.type=hh.Header}},nFe=class{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=hh.Deleted,this.modifiedLineNumber=void 0}},rFe=class{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=hh.Added,this.originalLineNumber=void 0}},oFe=class{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=hh.Unchanged}},sFe=class extends W{constructor(e,t,n,r,o,s){super(),this._element=e,this._model=t,this._width=n,this._height=r,this._models=o,this._languageService=s,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";let a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Ns(a)),this._register(_t(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new Js("diffreview.close",y("label.close","Close"),"close-diff-review "+ut.asClassName(GAi),!0,async()=>t.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new Ub(this._content,{})),So(this.domNode,this._scrollbar.getDomNode(),a),this._register(_t(l=>{this._height.read(l),this._width.read(l),this._scrollbar.scanDomNode()})),this._register(Ve(()=>{So(this.domNode)})),this._register(up(this.domNode,{width:this._width,height:this._height})),this._register(up(this._content,{width:this._width,height:this._height})),this._register(ts((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(cn(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){let t=this._models.getOriginalOptions(),n=this._models.getModifiedOptions(),r=document.createElement("div");r.className="diff-review-table",r.setAttribute("role","list"),r.setAttribute("aria-label",y("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),mo(r,n.get(50)),So(this._content,r);let o=this._models.getOriginalModel(),s=this._models.getModifiedModel();if(!o||!s)return;let a=o.getOptions(),l=s.getOptions(),c=n.get(67),u=this._model.currentGroup.get();for(let d of u?.lines||[]){if(!u)break;let h;if(d.type===hh.Header){let p=document.createElement("div");p.className="diff-review-row",p.setAttribute("role","listitem");let g=u.range,v=this._model.currentGroupIndex.get(),A=this._model.groups.get().length,w=I=>I===0?y("no_lines_changed","no lines changed"):I===1?y("one_line_changed","1 line changed"):y("more_lines_changed","{0} lines changed",I),C=w(g.original.length),_=w(g.modified.length);p.setAttribute("aria-label",y({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",v+1,A,g.original.startLineNumber,C,g.modified.startLineNumber,_));let E=document.createElement("div");E.className="diff-review-cell diff-review-summary",E.appendChild(document.createTextNode(`${v+1}/${A}: @@ -${g.original.startLineNumber},${g.original.length} +${g.modified.startLineNumber},${g.modified.length} @@`)),p.appendChild(E),h=p}else h=this._createRow(d,c,this._width.get(),t,o,a,n,s,l);r.appendChild(h);let f=st(p=>this._model.currentElement.read(p)===d);e.add(_t(p=>{let g=f.read(p);h.tabIndex=g?0:-1,g&&h.focus()})),e.add(re(h,"focus",()=>{this._model.goToLine(d)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,r,o,s,a,l,c){let u=r.get(146),d=u.glyphMarginWidth+u.lineNumbersWidth,h=a.get(146),f=10+h.glyphMarginWidth+h.lineNumbersWidth,p="diff-review-row",g="",v="diff-review-spacer",A=null;switch(e.type){case hh.Added:p="diff-review-row line-insert",g=" char-insert",A=jAi;break;case hh.Deleted:p="diff-review-row line-delete",g=" char-delete",A=QAi;break}let w=document.createElement("div");w.style.minWidth=n+"px",w.className=p,w.setAttribute("role","listitem"),w.ariaLevel="";let C=document.createElement("div");C.className="diff-review-cell",C.style.height=`${t}px`,w.appendChild(C);let _=document.createElement("span");_.style.width=d+"px",_.style.minWidth=d+"px",_.className="diff-review-line-number"+g,e.originalLineNumber!==void 0?_.appendChild(document.createTextNode(String(e.originalLineNumber))):_.innerText="\xA0",C.appendChild(_);let E=document.createElement("span");E.style.width=f+"px",E.style.minWidth=f+"px",E.style.paddingRight="10px",E.className="diff-review-line-number"+g,e.modifiedLineNumber!==void 0?E.appendChild(document.createTextNode(String(e.modifiedLineNumber))):E.innerText="\xA0",C.appendChild(E);let I=document.createElement("span");if(I.className=v,A){let M=document.createElement("span");M.className=ut.asClassName(A),M.innerText="\xA0\xA0",I.appendChild(M)}else I.innerText="\xA0\xA0";C.appendChild(I);let T;if(e.modifiedLineNumber!==void 0){let M=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);VE._ttPolicy&&(M=VE._ttPolicy.createHTML(M)),C.insertAdjacentHTML("beforeend",M),T=l.getLineContent(e.modifiedLineNumber)}else{let M=this._getLineHtml(o,r,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);VE._ttPolicy&&(M=VE._ttPolicy.createHTML(M)),C.insertAdjacentHTML("beforeend",M),T=o.getLineContent(e.originalLineNumber)}T.length===0&&(T=y("blankLine","blank"));let L="";switch(e.type){case hh.Unchanged:e.originalLineNumber===e.modifiedLineNumber?L=y({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",T,e.originalLineNumber):L=y("equalLine","{0} original line {1} modified line {2}",T,e.originalLineNumber,e.modifiedLineNumber);break;case hh.Added:L=y("insertLine","+ {0} modified line {1}",T,e.modifiedLineNumber);break;case hh.Deleted:L=y("deleteLine","- {0} original line {1}",T,e.originalLineNumber);break}return w.setAttribute("aria-label",L),w}_getLineHtml(e,t,n,r,o){let s=e.getLineContent(r),a=t.get(50),l=To.createEmpty(s,o),c=dh.isBasicASCII(s,e.mightContainNonBasicASCII()),u=dh.containsRTL(s,c,e.mightContainRTL());return wF(new Wh(a.isMonospace&&!t.get(33),a.canUseHalfwidthRightwardsArrow,s,!1,c,u,0,l,[],n,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(118),t.get(100),t.get(95),t.get(51)!==fg.OFF,null)).html}};sFe=aFe([lFe(5,rn)],sFe);Bae=class{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}});var lBn,cBn,uBn,YAi,cFe,iN,Xx,uFe,dFe,nN,GP,qP,Nv,YP,KP,HE=D(()=>{er();Dr();vs();Oe();eo();sp();lBn=j("diffEditor.move.border","#8b8b8b9c",y("diffEditor.move.border","The border color for text that got moved in the diff editor.")),cBn=j("diffEditor.moveActive.border","#FFA500",y("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),uBn=j("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},y("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets.")),YAi=kn("diff-insert",Ee.add,y("diffInsertIcon","Line decoration for inserts in the diff editor.")),cFe=kn("diff-remove",Ee.remove,y("diffRemoveIcon","Line decoration for removals in the diff editor.")),iN=zt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ut.asClassName(YAi),marginClassName:"gutter-insert"}),Xx=zt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ut.asClassName(cFe),marginClassName:"gutter-delete"}),uFe=zt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),dFe=zt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),nN=zt.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),GP=zt.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),qP=zt.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),Nv=zt.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),YP=zt.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),KP=zt.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})});var $0t,hFe,rN,Zx,fFe,pFe,CH=D(()=>{wc();ht();et();id();md();fy();xv();eh();$0t=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},hFe=function(i,e){return function(t,n){e(t,n,i)}},Zx=vt("diffProviderFactoryService"),fFe=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(pFe,e)}};fFe=$0t([hFe(0,Ne)],fFe);ui(Zx,fFe,1);pFe=class{static{rN=this}static{this.diffCache=new Map}constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new G,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,n,r){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,r);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new gd(new Yt(1,2),new Yt(1,t.getLineCount()+1),[new eu(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let o=JSON.stringify([e.uri.toString(),t.uri.toString()]),s=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),a=rN.diffCache.get(o);if(a&&a.context===s)return a.result;let l=Ar.create(),c=await this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),u=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:u,timedOut:c?.quitEarly??!0,detectedMoves:n.computeMoves?c?.moves.length??0:-1}),r.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return rN.diffCache.size>10&&rN.diffCache.delete(rN.diffCache.keys().next().value),rN.diffCache.set(o,{result:c,context:s}),c}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};pFe=rN=$0t([hFe(1,pa),hFe(2,io)],pFe)});function JP(){return U5&&!!U5.VSCODE_DEV}function mFe(i){if(JP()){let e=KAi();return e.add(i),{dispose(){e.delete(i)}}}else return{dispose(){}}}function KAi(){zae||(zae=new Set);let i=globalThis;return i.$hotReload_applyNewExports||(i.$hotReload_applyNewExports=e=>{let t={config:{mode:void 0},...e},n=[];for(let r of zae){let o=r(t);o&&n.push(o)}if(n.length>0)return r=>{let o=!1;for(let s of n)s(r)&&(o=!0);return o}}),zae}var zae,gFe=D(()=>{fye();JP()&&mFe(({oldExports:i,newSrc:e,config:t})=>{if(t.mode==="patch-prototype")return n=>{for(let r in n){let o=n[r];if(console.log(`[hot-reload] Patching prototype methods of '${r}'`,{exportedItem:o}),typeof o=="function"&&o.prototype){let s=i[r];if(s){for(let a of Object.getOwnPropertyNames(o.prototype)){let l=Object.getOwnPropertyDescriptor(o.prototype,a),c=Object.getOwnPropertyDescriptor(s.prototype,a);l?.value?.toString()!==c?.value?.toString()&&console.log(`[hot-reload] Patching prototype method '${r}.${a}'`),Object.defineProperty(s.prototype,a,l)}n[r]=s}}}return!0}})});function lu(i,e){return JAi([i],e),i}function JAi(i,e){JP()&&bs("reload",n=>mFe(({oldExports:r})=>{if([...Object.values(r)].some(o=>i.includes(o)))return o=>(n(void 0),!0)})).read(e)}var XP=D(()=>{gFe();Tn()});function $Ai(i,e,t){return{changes:i.changes.map(n=>new gd(n.original,n.modified,n.innerChanges?n.innerChanges.map(r=>eyi(r,e,t)):void 0)),moves:i.moves,identical:i.identical,quitEarly:i.quitEarly}}function eyi(i,e,t){let n=i.originalRange,r=i.modifiedRange;return n.startColumn===1&&r.startColumn===1&&(n.endColumn!==1||r.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&r.endColumn===t.getLineMaxColumn(r.endLineNumber)&&n.endLineNumber{Jt();sn();ae();Tn();CH();Ng();XP();md();kTe();fy();Zz();vLe();TTe();gn();Qt();Mb();XAi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ZAi=function(i,e){return function(t,n){e(t,n,i)}},Vae=class extends W{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n){super(),this.model=e,this._options=t,this._diffProviderFactoryService=n,this._isDiffUpToDate=Gt(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Gt(this,void 0),this.diff=this._diff,this._unchangedRegions=Gt(this,void 0),this.unchangedRegions=st(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a)?.regions??[]:(fn(l=>{for(let c of this._unchangedRegions.get()?.regions||[])c.collapseAll(l)}),[])),this.movedTextToCompare=Gt(this,void 0),this._activeMovedText=Gt(this,void 0),this._hoveredMovedText=Gt(this,void 0),this.activeMovedText=st(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new Bi,this._diffProvider=st(this,a=>{let l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=bs("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(Ve(()=>this._cancellationTokenSource.cancel()));let r=Cg("contentChangedSignal"),o=this._register(new di(()=>r.trigger(void 0),200));this._register(_t(a=>{let l=this._unchangedRegions.read(a);if(!l||l.regions.some(p=>p.isDragged.read(a)))return;let c=l.originalDecorationIds.map(p=>e.original.getDecorationRange(p)).map(p=>p?Yt.fromRangeInclusive(p):void 0),u=l.modifiedDecorationIds.map(p=>e.modified.getDecorationRange(p)).map(p=>p?Yt.fromRangeInclusive(p):void 0),d=l.regions.map((p,g)=>!c[g]||!u[g]?void 0:new ZP(c[g].startLineNumber,u[g].startLineNumber,c[g].length,p.visibleLineCountTop.read(a),p.visibleLineCountBottom.read(a))).filter(If),h=[],f=!1;for(let p of xF(d,(g,v)=>g.getHiddenModifiedRange(a).endLineNumberExclusive===v.getHiddenModifiedRange(a).startLineNumber))if(p.length>1){f=!0;let g=p.reduce((A,w)=>A+w.lineCount,0),v=new ZP(p[0].originalLineNumber,p[0].modifiedLineNumber,g,p[0].visibleLineCountTop.get(),p[p.length-1].visibleLineCountBottom.get());h.push(v)}else h.push(p[0]);if(f){let p=e.original.deltaDecorations(l.originalDecorationIds,h.map(v=>({range:v.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),g=e.modified.deltaDecorations(l.modifiedDecorationIds,h.map(v=>({range:v.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));fn(v=>{this._unchangedRegions.set({regions:h,originalDecorationIds:p,modifiedDecorationIds:g},v)})}}));let s=(a,l,c)=>{let u=ZP.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),d,h=this._unchangedRegions.get();if(h){let v=h.originalDecorationIds.map(_=>e.original.getDecorationRange(_)).map(_=>_?Yt.fromRangeInclusive(_):void 0),A=h.modifiedDecorationIds.map(_=>e.modified.getDecorationRange(_)).map(_=>_?Yt.fromRangeInclusive(_):void 0),C=J0t(h.regions.map((_,E)=>{if(!v[E]||!A[E])return;let I=v[E].length;return new ZP(v[E].startLineNumber,A[E].startLineNumber,I,Math.min(_.visibleLineCountTop.get(),I),Math.min(_.visibleLineCountBottom.get(),I-_.visibleLineCountTop.get()))}).filter(If),(_,E)=>!E||_.modifiedLineNumber>=E.modifiedLineNumber+E.lineCount&&_.originalLineNumber>=E.originalLineNumber+E.lineCount).map(_=>new tu(_.getHiddenOriginalRange(c),_.getHiddenModifiedRange(c)));C=tu.clip(C,Yt.ofLength(1,e.original.getLineCount()),Yt.ofLength(1,e.modified.getLineCount())),d=tu.inverse(C,e.original.getLineCount(),e.modified.getLineCount())}let f=[];if(d)for(let v of u){let A=d.filter(w=>w.original.intersectsStrict(v.originalUnchangedRange)&&w.modified.intersectsStrict(v.modifiedUnchangedRange));f.push(...v.setVisibleRanges(A,l))}else f.push(...u);let p=e.original.deltaDecorations(h?.originalDecorationIds||[],f.map(v=>({range:v.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),g=e.modified.deltaDecorations(h?.modifiedDecorationIds||[],f.map(v=>({range:v.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:p,modifiedDecorationIds:g},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){let c=Kb.fromModelContentChanges(a.changes),u=(this._lastDiff,e.original,e.modified,void 0);u&&(this._lastDiff=u,fn(d=>{this._diff.set(_H.fromDiffResult(this._lastDiff),d),s(u,d);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,d)}))}this._isDiffUpToDate.set(!1,void 0),o.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){let c=Kb.fromModelContentChanges(a.changes),u=(this._lastDiff,e.original,e.modified,void 0);u&&(this._lastDiff=u,fn(d=>{this._diff.set(_H.fromDiffResult(this._lastDiff),d),s(u,d);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,d)}))}this._isDiffUpToDate.set(!1,void 0),o.schedule()})),this._register(ts(async(a,l)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),o.cancel(),r.read(a);let c=this._diffProvider.read(a);c.onChangeSignal.read(a),lu(GF,a),lu(J7,a),this._isDiffUpToDate.set(!1,void 0);let u=[];l.add(e.original.onDidChangeContent(f=>{let p=Kb.fromModelContentChanges(f.changes);u=UO(u,p)}));let d=[];l.add(e.modified.onDidChangeContent(f=>{let p=Kb.fromModelContentChanges(f.changes);d=UO(d,p)}));let h=await c.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(h=$Ai(h,e.original,e.modified),h=(e.original,e.modified,void 0)??h,h=(e.original,e.modified,void 0)??h,fn(f=>{s(h,f),this._lastDiff=h;let p=_H.fromDiffResult(h);this._diff.set(p,f),this._isDiffUpToDate.set(!0,f);let g=this.movedTextToCompare.get();this.movedTextToCompare.set(g?this._lastDiff.moves.find(v=>v.lineRangeMapping.modified.intersect(g.lineRangeMapping.modified)):void 0,f)}))}))}ensureModifiedLineIsVisible(e,t,n){if(this.diff.get()?.mappings.length===0)return;let r=this._unchangedRegions.get()?.regions||[];for(let o of r)if(o.getHiddenModifiedRange(void 0).contains(e)){o.showModifiedLine(e,t,n);return}}ensureOriginalLineIsVisible(e,t,n){if(this.diff.get()?.mappings.length===0)return;let r=this._unchangedRegions.get()?.regions||[];for(let o of r)if(o.getHiddenOriginalRange(void 0).contains(e)){o.showOriginalLine(e,t,n);return}}async waitForDiff(){await Uz(this.isDiffUpToDate,e=>e)}serializeState(){return{collapsedRegions:this._unchangedRegions.get()?.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){let t=e.collapsedRegions?.map(r=>Yt.deserialize(r.range)),n=this._unchangedRegions.get();!n||!t||fn(r=>{for(let o of n.regions)for(let s of t)if(o.modifiedUnchangedRange.intersect(s)){o.setHiddenModifiedRange(s,r);break}})}};Vae=XAi([ZAi(2,Zx)],Vae);_H=class i{static fromDiffResult(e){return new i(e.changes.map(t=>new SH(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,r){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=r}},SH=class{constructor(e){this.lineRangeMapping=e}},ZP=class i{static fromDiffs(e,t,n,r,o){let s=gd.inverse(e,t,n),a=[];for(let l of s){let c=l.original.startLineNumber,u=l.modified.startLineNumber,d=l.original.length,h=c===1&&u===1,f=c+d===t+1&&u+d===n+1;(h||f)&&d>=o+r?(h&&!f&&(d-=o),f&&!h&&(c+=o,u+=o,d-=o),a.push(new i(c,u,d,0,0))):d>=o*2+r&&(c+=o,u+=o,d-=o*2,a.push(new i(c,u,d,0,0)))}return a}get originalUnchangedRange(){return Yt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Yt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,r,o){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=Gt(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Gt(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=st(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=Gt(this,void 0);let s=Math.max(Math.min(r,this.lineCount),0),a=Math.max(Math.min(o,this.lineCount-r),0);WSe(r===s),WSe(o===a),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){let n=[],r=new gg(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange),o=this.originalLineNumber,s=this.modifiedLineNumber,a=this.modifiedLineNumber+this.lineCount;if(r.ranges.length===0)this.showAll(t),n.push(this);else{let l=0;for(let c of r.ranges){let u=l===r.ranges.length-1;l++;let d=(u?a:c.endLineNumberExclusive)-s,h=new i(o,s,d,0,0);h.setHiddenModifiedRange(c,t),n.push(h),o=h.originalUnchangedRange.endLineNumberExclusive,s=h.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Yt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Yt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let n=e.startLineNumber-this.modifiedLineNumber,r=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,r,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){let n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,n){let r=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),o=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&r{Ye();$a();er();ae();Si();Dr();Oe();Hae=class extends W{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,n,r,o,s,a,l,c){super(),this._getViewZoneId=e,this._marginDomNode=t,this._modifiedEditor=n,this._diff=r,this._editor=o,this._viewLineCounts=s,this._originalTextModel=a,this._contextMenuService=l,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ut.asClassName(Ee.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";let u=this._modifiedEditor.getOption(67);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${u}px`,this._diffActions.style.lineHeight=`${u}px`,this._marginDomNode.appendChild(this._diffActions);let d=0,h=n.getOption(128)&&!Tu,f=(p,g)=>{this._contextMenuService.showContextMenu({domForShadowRoot:h?n.getDomNode()??void 0:void 0,getAnchor:()=>({x:p,y:g}),getActions:()=>{let v=[],A=r.modified.isEmpty;return v.push(new Js("diff.clipboard.copyDeletedContent",A?r.original.length>1?y("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):y("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):r.original.length>1?y("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):y("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{let C=this._originalTextModel.getValueInRange(r.original.toExclusiveRange());await this._clipboardService.writeText(C)})),r.original.length>1&&v.push(new Js("diff.clipboard.copyDeletedLineContent",A?y("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",r.original.startLineNumber+d):y("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",r.original.startLineNumber+d),void 0,!0,async()=>{let C=this._originalTextModel.getLineContent(r.original.startLineNumber+d);C===""&&(C=this._originalTextModel.getEndOfLineSequence()===0?` +`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();let t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;let n={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(n);let o=this.hasTextFocus(),r=this._detachModel();this._attachModel(t),o&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(n),this._postDetachModelCleanup(r),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){let t=this._decorationTypeSubtypes[e];for(let n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,o){let r=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,o)}getTopForLineNumber(e,t=!1){return this._modelData?NN._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?NN._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,o=!1){let r=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,o)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;let n=this._modelData.model.getLineMaxColumn(e);return NN._getVerticalOffsetAfterPosition(this._modelData,e,n,t)}setHiddenAreas(e,t){this._modelData?.viewModel.setHiddenAreas(e.map(n=>R.lift(n)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;let t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return or.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!J.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,o){if(!this._modelData)return;if(!R.isIRange(e))throw new Error("Invalid arguments");let r=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,s,t,o)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new R(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,o){if(!J.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new R(e.lineNumber,e.column,e.lineNumber,e.column),t,n,o)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){let n=qe.isISelection(e),o=R.isIRange(e);if(!n&&!o)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(o){let r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;let n=new qe(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,o){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new R(e,1,t,1),n,!1,o)}revealRange(e,t=0,n=!1,o=!0){this._revealRange(e,n?1:0,o,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,o){if(!R.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(R.lift(e),t,n,o)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let o=0,r=e.length;o0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});let o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){n=n||{};try{switch(this._beginUpdate(),t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{let r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{let r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{let r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{let r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null,r.clipboardEvent);return}case"cut":this._cut(e);return}let o=this.getAction(t);if(o){Promise.resolve(o.run(n)).then(void 0,ft);return}if(!this._modelData||this._triggerEditorCommand(e,t,n))return;this._triggerCommand(t,n)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,o,r){this._modelData&&this._modelData.viewModel.compositionType(t,n,o,r,e)}_paste(e,t,n,o,r,s){if(!this._modelData)return;let a=this._modelData.viewModel,l=a.getSelection().getStartPosition();a.paste(t,n,o,e);let c=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:s,range:new R(l.lineNumber,l.column,c.lineNumber,c.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){let o=_y.getEditorCommand(t);return o?(n=n||{},n.source=e,this._instantiationService.invokeFunction(r=>{Promise.resolve(o.runEditorCommand(r,this,n)).then(void 0,ft)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(92))return!1;let o;return n?Array.isArray(n)?o=()=>n:o=n:o=()=>null,this._modelData.viewModel.executeEdits(e,t,o),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new AFe(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,GI(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,GI(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){let t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations(n=>n.deltaDecorations(t,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){let t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){let t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){let t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;let t=this._modelData.model.validatePosition(e),n=this._configuration.options,o=n.get(146),r=NN._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft();return{top:r,left:s,height:n.get(67)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){vr(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}let t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());let n=e.onBeforeAttached(),o=new tce(this._id,this._configuration,e,cle.create(rt(this._domElement)),dle.create(this._configuration.options),a=>Cl(rt(this._domElement),a),this.languageConfigurationService,this._themeService,n,{batchChanges:a=>{try{return this._beginUpdate(),a()}finally{this._endUpdate()}}});t.push(e.onWillDispose(()=>this.setModel(null))),t.push(o.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){let d=this.getOption(80),h=y("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",d);this._notificationService.prompt(vE.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:y("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}let l=[];for(let d=0,h=a.selections.length;d{this._paste("keyboard",r,s,a,l)},type:r=>{this._type("keyboard",r)},compositionType:(r,s,a,l)=>{this._compositionType("keyboard",r,s,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(r,s,a,l)=>{let c={text:r,pasteOnNewLine:s,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:r=>{let s={text:r};this._commandService.executeCommand("type",s)},compositionType:(r,s,a,l)=>{if(a||l){let c={text:r,replacePrevCharCnt:s,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{let c={text:r,replaceCharCnt:s};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};let n=new EB(e.coordinatesConverter);return n.onKeyDown=r=>this._onKeyDown.fire(r),n.onKeyUp=r=>this._onKeyUp.fire(r),n.onContextMenu=r=>this._onContextMenu.fire(r),n.onMouseMove=r=>this._onMouseMove.fire(r),n.onMouseLeave=r=>this._onMouseLeave.fire(r),n.onMouseDown=r=>this._onMouseDown.fire(r),n.onMouseUp=r=>this._onMouseUp.fire(r),n.onMouseDrag=r=>this._onMouseDrag.fire(r),n.onMouseDrop=r=>this._onMouseDrop.fire(r),n.onMouseDropCanceled=r=>this._onMouseDropCanceled.fire(r),n.onMouseWheel=r=>this._onMouseWheel.fire(r),[new lle(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;let e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){let t=[{range:new R(e.lineNumber,e.column,e.lineNumber,e.column),options:NN.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}};cD=NN=kui([yC(3,Re),yC(4,ei),yC(5,Ii),yC(6,Ze),yC(7,Wn),yC(8,_n),yC(9,Es),yC(10,Gi),yC(11,Me)],cD);Iui=0,pFe=class{constructor(e,t,n,o,r,s){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=o,this.listenersToRemove=r,this.attachedView=s}dispose(){Oi(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},nce=class extends H{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new q(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new q(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){let t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}},mu=class extends q{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}},mFe=class extends H{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=V.editorSimpleInput.bindTo(t),this._editorFocus=V.focus.bindTo(t),this._textInputFocus=V.textInputFocus.bindTo(t),this._editorTextFocus=V.editorTextFocus.bindTo(t),this._tabMovesFocus=V.tabMovesFocus.bindTo(t),this._editorReadonly=V.readOnly.bindTo(t),this._inDiffEditor=V.inDiffEditor.bindTo(t),this._editorColumnSelection=V.columnSelection.bindTo(t),this._hasMultipleSelections=V.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=V.hasNonEmptySelection.bindTo(t),this._canUndo=V.canUndo.bindTo(t),this._canRedo=V.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(hC.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){let e=this._editor.getOptions();this._tabMovesFocus.set(hC.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){let e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){let e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}},gFe=class extends H{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=V.languageId.bindTo(t),this._hasCompletionItemProvider=V.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=V.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=V.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=V.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=V.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=V.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=V.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=V.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=V.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=V.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=V.hasReferenceProvider.bindTo(t),this._hasRenameProvider=V.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=V.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=V.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=V.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=V.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=V.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=V.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=V.isInEmbeddedEditor.bindTo(t);let o=()=>this._update();this._register(e.onDidChangeModel(o)),this._register(e.onDidChangeModelLanguage(o)),this._register(n.completionProvider.onDidChange(o)),this._register(n.codeActionProvider.onDidChange(o)),this._register(n.codeLensProvider.onDidChange(o)),this._register(n.definitionProvider.onDidChange(o)),this._register(n.declarationProvider.onDidChange(o)),this._register(n.implementationProvider.onDidChange(o)),this._register(n.typeDefinitionProvider.onDidChange(o)),this._register(n.hoverProvider.onDidChange(o)),this._register(n.documentHighlightProvider.onDidChange(o)),this._register(n.documentSymbolProvider.onDidChange(o)),this._register(n.referenceProvider.onDidChange(o)),this._register(n.renameProvider.onDidChange(o)),this._register(n.documentFormattingEditProvider.onDidChange(o)),this._register(n.documentRangeFormattingEditProvider.onDidChange(o)),this._register(n.signatureHelpProvider.onDidChange(o)),this._register(n.inlayHintsProvider.onDidChange(o)),o()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){let e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===Vt.walkThroughSnippet||e.uri.scheme===Vt.vscodeChatCodeBlock)})}},bFe=class extends H{constructor(e,t){super(),this._onChange=this._register(new q),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(iu(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(iu(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){let e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}},AFe=class{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(o=>{this._isChangingDecorations||e.call(t,o)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];let e=this._editor.getModel(),t=[];for(let n of this._decorationIds){let o=e.getDecorationRange(n);o&&t.push(o)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{t=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}},Lui=encodeURIComponent("");Mui=encodeURIComponent('');ba((i,e)=>{let t=i.getColor(PI);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${fFe(t)}") repeat-x bottom left; }`);let n=i.getColor(sm);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${fFe(n)}") repeat-x bottom left; }`);let o=i.getColor($h);o&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${fFe(o)}") repeat-x bottom left; }`);let r=i.getColor(Uot);r&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${Fui(r)}") no-repeat bottom left; }`);let s=i.getColor(iht);s&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${s.rgba.a}; }`)})});var ebt=D(()=>{});var yf,MN=D(()=>{yf=class i{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new i(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0,o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();let r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}return new i(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,o,r){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=o,this._cursorPosition=r}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n,1)}}});function tbt(i,e,t,n){if(i.length===0)return e;if(e.length===0)return i;let o=[],r=0,s=0;for(;ru?(o.push(l),s++):(o.push(n(a,l)),r++,s++)}for(;r`Apply decorations from ${e.debugName}`},o=>{let r=e.read(o);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function wC(i,e){return i.appendChild(e),He(()=>{e.remove()})}function ibt(i,e){return i.prepend(e),He(()=>{e.remove()})}function wFe(i,e,t){let n=e.get(),o=n,r=n,s=Ut("animatedValue",n),a=-1,l=300,c;t.add(Qx({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(d,h)=>(d.didChange(e)&&(h.animate=h.animate||d.change),!0)},(d,h)=>{c!==void 0&&(i.cancelAnimationFrame(c),c=void 0),o=r,n=e.read(d),a=Date.now()-(h.animate?0:l),u()}));function u(){let d=Date.now()-a;r=Math.floor(Oui(d,o,n-o,l)),d{for(let[n,o]of Object.entries(e))o&&typeof o=="object"&&"read"in o&&(o=o.read(t)),typeof o=="number"&&(o=`${o}px`),n=n.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),i.style[n]=o})}function PB(i,e,t,n){let o=new se,r=[];return o.add(es((s,a)=>{let l=e.read(s),c=new Map,u=new Map;t&&t(!0),i.changeViewZones(d=>{for(let h of r)d.removeZone(h),n?.delete(h);r.length=0;for(let h of l){let f=d.addZone(h);h.setZoneId&&h.setZoneId(f),r.push(f),n?.add(f),c.set(h,f)}}),t&&t(!1),a.add(Qx({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(d,h){let f=u.get(d.changedObservable);return f!==void 0&&h.zoneIds.push(f),!0}},(d,h)=>{for(let f of l)f.onChange&&(u.set(f.onChange,c.get(f)),f.onChange.read(d));t&&t(!0),i.changeViewZones(f=>{for(let p of h.zoneIds)f.layoutZone(p)}),t&&t(!1)}))})),o.add({dispose(){t&&t(!0),i.changeViewZones(s=>{for(let a of r)s.removeZone(a)}),n?.clear(),t&&t(!1)}}),o}function xFe(i,e){let t=Rx(e,o=>o.original.startLineNumber<=i.lineNumber);if(!t)return R.fromPositions(i);if(t.original.endLineNumberExclusive<=i.lineNumber){let o=i.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return R.fromPositions(new J(o,i.column))}if(!t.innerChanges)return R.fromPositions(new J(t.modified.startLineNumber,1));let n=Rx(t.innerChanges,o=>o.originalRange.getStartPosition().isBeforeOrEqual(i));if(!n){let o=i.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return R.fromPositions(new J(o,i.column))}if(n.originalRange.containsPosition(i))return n.modifiedRange;{let o=Pui(n.originalRange.getEndPosition(),i);return R.fromPositions(o.addToPosition(n.modifiedRange.getEndPosition()))}}function Pui(i,e){return i.lineNumber===e.lineNumber?new au(0,e.column-i.column):new au(e.lineNumber-i.lineNumber,e.column-1)}function nbt(i,e){let t;return i.filter(n=>{let o=e(n,t);return t=n,o})}var FB,RN,k1,vFe,oce,FN,rce,yFe,Gg=D(()=>{lp();sn();de();In();QMe();kt();Ue();Ox();FB=class extends H{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new pB(e,t)),this._width=Ut(this,this.elementSizeObserver.getWidth()),this._height=Ut(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>fn(o=>{this._width.set(this.elementSizeObserver.getWidth(),o),this._height.set(this.elementSizeObserver.getHeight(),o)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}};RN=class extends H{constructor(e,t,n){super(),this._register(new vFe(e,n)),this._register(xp(n,{height:t.actualHeight,top:t.actualTop}))}},k1=class{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=Ut(this,void 0),this._actualHeight=Ut(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=n=>{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}},vFe=class i{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${i._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};oce=class extends Mi{dispose(){super.dispose(!0)}};FN=class{static create(e,t=void 0){return new rce(e,e,t)}static createWithDisposable(e,t,n=void 0){let o=new se;return o.add(t),o.add(e),new rce(e,o,n)}},rce=class extends FN{constructor(e,t,n){super(),this.object=e,this._disposable=t,this._debugOwner=n,this._refCount=1,this._isDisposed=!1,this._owners=[],n&&this._addOwner(n)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new yFe(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){let t=this._owners.indexOf(e);t!==-1&&this._owners.splice(t,1)}}},yFe=class extends FN{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}});var obt=D(()=>{});function Hui(i,e,t){let n=[];for(let o of pO(i,(r,s)=>s.modified.startLineNumber-r.modified.endLineNumberExclusive<2*eU)){let r=[];r.push(new SFe);let s=new Qt(Math.max(1,o[0].original.startLineNumber-eU),Math.min(o[o.length-1].original.endLineNumberExclusive+eU,e+1)),a=new Qt(Math.max(1,o[0].modified.startLineNumber-eU),Math.min(o[o.length-1].modified.endLineNumberExclusive+eU,t+1));xee(o,(u,d)=>{let h=new Qt(u?u.original.endLineNumberExclusive:s.startLineNumber,d?d.original.startLineNumber:s.endLineNumberExclusive),f=new Qt(u?u.modified.endLineNumberExclusive:a.startLineNumber,d?d.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(p=>{r.push(new TFe(p,f.startLineNumber+(p-h.startLineNumber)))}),d&&(d.original.forEach(p=>{r.push(new EFe(d,p))}),d.modified.forEach(p=>{r.push(new DFe(d,p))}))});let l=o[0].modified.join(o[o.length-1].modified),c=o[0].original.join(o[o.length-1].original);n.push(new _Fe(new cu(l,c),r))}return n}var IFe,LFe,Bui,zui,Vui,uD,CFe,eU,yh,_Fe,SFe,EFe,DFe,TFe,kFe,sce,rbt=D(()=>{Ye();Sy();Hg();Mg();il();Wt();oo();de();In();ko();um();Gg();ea();_d();ap();kt();Ue();Ly();Il();Fg();JS();d0();Be();$E();ht();Ap();obt();IFe=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},LFe=function(i,e){return function(t,n){e(t,n,i)}},Bui=Ln("diff-review-insert",De.add,y("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),zui=Ln("diff-review-remove",De.remove,y("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),Vui=Ln("diff-review-close",De.close,y("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer.")),uD=class extends H{static{this._ttPolicy=xd("diffReview",{createHTML:e=>e})}constructor(e,t,n,o,r,s,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=o,this._width=r,this._height=s,this._diffs=a,this._models=l,this._instantiationService=c,this._state=ph(this,(u,d)=>{let h=this._visible.read(u);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;let f=d.add(this._instantiationService.createInstance(CFe,this._diffs,this._models,this._setVisible,this._canClose)),p=d.add(this._instantiationService.createInstance(kFe,this._parentNode,f,this._width,this._height,this._models));return{model:f,view:p}}).recomputeInitiallyAndOnChange(this._store)}next(){fn(e=>{let t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){fn(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){fn(e=>{this._setVisible(!1,e)})}};uD=IFe([LFe(8,Re)],uD);CFe=class extends H{constructor(e,t,n,o,r){super(),this._diffs=e,this._models=t,this._setVisible=n,this.canClose=o,this._accessibilitySignalService=r,this._groups=Ut(this,[]),this._currentGroupIdx=Ut(this,0),this._currentElementIdx=Ut(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((s,a)=>this._groups.read(a)[s]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((s,a)=>this.currentGroup.read(a)?.lines[s]),this._register(Ct(s=>{let a=this._diffs.read(s);if(!a){this._groups.set([],void 0);return}let l=Hui(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());fn(c=>{let u=this._models.getModifiedPosition();if(u){let d=l.findIndex(h=>u?.lineNumber{let a=this.currentElement.read(s);a?.type===yh.Deleted?this._accessibilitySignalService.playSignal(Xu.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===yh.Added&&this._accessibilitySignalService.playSignal(Xu.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Ct(s=>{let a=this.currentElement.read(s);if(a&&a.type!==yh.Header){let l=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(R.fromPositions(new J(l,1)))}}))}_goToGroupDelta(e,t){let n=this.groups.get();!n||n.length<=1||Og(t,o=>{this._currentGroupIdx.set(Ci.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),o),this._currentElementIdx.set(0,o)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){let t=this.currentGroup.get();!t||t.lines.length<=1||fn(n=>{this._currentElementIdx.set(Ci.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){let t=this.currentGroup.get();if(!t)return;let n=t.lines.indexOf(e);n!==-1&&fn(o=>{this._currentElementIdx.set(n,o)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);let e=this.currentElement.get();e&&(e.type===yh.Deleted?this._models.originalReveal(R.fromPositions(new J(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==yh.Header?R.fromPositions(new J(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};CFe=IFe([LFe(4,vp)],CFe);eU=3;(function(i){i[i.Header=0]="Header",i[i.Unchanged=1]="Unchanged",i[i.Deleted=2]="Deleted",i[i.Added=3]="Added"})(yh||(yh={}));_Fe=class{constructor(e,t){this.range=e,this.lines=t}},SFe=class{constructor(){this.type=yh.Header}},EFe=class{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=yh.Deleted,this.modifiedLineNumber=void 0}},DFe=class{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=yh.Added,this.originalLineNumber=void 0}},TFe=class{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=yh.Unchanged}},kFe=class extends H{constructor(e,t,n,o,r,s){super(),this._element=e,this._model=t,this._width=n,this._height=o,this._models=r,this._languageService=s,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";let a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Ps(a)),this._register(Ct(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new ta("diffreview.close",y("label.close","Close"),"close-diff-review "+ut.asClassName(Vui),!0,async()=>t.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new i0(this._content,{})),kr(this.domNode,this._scrollbar.getDomNode(),a),this._register(Ct(l=>{this._height.read(l),this._width.read(l),this._scrollbar.scanDomNode()})),this._register(He(()=>{kr(this.domNode)})),this._register(xp(this.domNode,{width:this._width,height:this._height})),this._register(xp(this._content,{width:this._width,height:this._height})),this._register(es((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(un(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){let t=this._models.getOriginalOptions(),n=this._models.getModifiedOptions(),o=document.createElement("div");o.className="diff-review-table",o.setAttribute("role","list"),o.setAttribute("aria-label",y("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),vr(o,n.get(50)),kr(this._content,o);let r=this._models.getOriginalModel(),s=this._models.getModifiedModel();if(!r||!s)return;let a=r.getOptions(),l=s.getOptions(),c=n.get(67),u=this._model.currentGroup.get();for(let d of u?.lines||[]){if(!u)break;let h;if(d.type===yh.Header){let p=document.createElement("div");p.className="diff-review-row",p.setAttribute("role","listitem");let g=u.range,A=this._model.currentGroupIndex.get(),v=this._model.groups.get().length,w=I=>I===0?y("no_lines_changed","no lines changed"):I===1?y("one_line_changed","1 line changed"):y("more_lines_changed","{0} lines changed",I),C=w(g.original.length),_=w(g.modified.length);p.setAttribute("aria-label",y({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",A+1,v,g.original.startLineNumber,C,g.modified.startLineNumber,_));let E=document.createElement("div");E.className="diff-review-cell diff-review-summary",E.appendChild(document.createTextNode(`${A+1}/${v}: @@ -${g.original.startLineNumber},${g.original.length} +${g.modified.startLineNumber},${g.modified.length} @@`)),p.appendChild(E),h=p}else h=this._createRow(d,c,this._width.get(),t,r,a,n,s,l);o.appendChild(h);let f=at(p=>this._model.currentElement.read(p)===d);e.add(Ct(p=>{let g=f.read(p);h.tabIndex=g?0:-1,g&&h.focus()})),e.add(ce(h,"focus",()=>{this._model.goToLine(d)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,o,r,s,a,l,c){let u=o.get(146),d=u.glyphMarginWidth+u.lineNumbersWidth,h=a.get(146),f=10+h.glyphMarginWidth+h.lineNumbersWidth,p="diff-review-row",g="",A="diff-review-spacer",v=null;switch(e.type){case yh.Added:p="diff-review-row line-insert",g=" char-insert",v=Bui;break;case yh.Deleted:p="diff-review-row line-delete",g=" char-delete",v=zui;break}let w=document.createElement("div");w.style.minWidth=n+"px",w.className=p,w.setAttribute("role","listitem"),w.ariaLevel="";let C=document.createElement("div");C.className="diff-review-cell",C.style.height=`${t}px`,w.appendChild(C);let _=document.createElement("span");_.style.width=d+"px",_.style.minWidth=d+"px",_.className="diff-review-line-number"+g,e.originalLineNumber!==void 0?_.appendChild(document.createTextNode(String(e.originalLineNumber))):_.innerText="\xA0",C.appendChild(_);let E=document.createElement("span");E.style.width=f+"px",E.style.minWidth=f+"px",E.style.paddingRight="10px",E.className="diff-review-line-number"+g,e.modifiedLineNumber!==void 0?E.appendChild(document.createTextNode(String(e.modifiedLineNumber))):E.innerText="\xA0",C.appendChild(E);let I=document.createElement("span");if(I.className=A,v){let L=document.createElement("span");L.className=ut.asClassName(v),L.innerText="\xA0\xA0",I.appendChild(L)}else I.innerText="\xA0\xA0";C.appendChild(I);let T;if(e.modifiedLineNumber!==void 0){let L=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);uD._ttPolicy&&(L=uD._ttPolicy.createHTML(L)),C.insertAdjacentHTML("beforeend",L),T=l.getLineContent(e.modifiedLineNumber)}else{let L=this._getLineHtml(r,o,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);uD._ttPolicy&&(L=uD._ttPolicy.createHTML(L)),C.insertAdjacentHTML("beforeend",L),T=r.getLineContent(e.originalLineNumber)}T.length===0&&(T=y("blankLine","blank"));let N="";switch(e.type){case yh.Unchanged:e.originalLineNumber===e.modifiedLineNumber?N=y({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",T,e.originalLineNumber):N=y("equalLine","{0} original line {1} modified line {2}",T,e.originalLineNumber,e.modifiedLineNumber);break;case yh.Added:N=y("insertLine","+ {0} modified line {1}",T,e.modifiedLineNumber);break;case yh.Deleted:N=y("deleteLine","- {0} original line {1}",T,e.originalLineNumber);break}return w.setAttribute("aria-label",N),w}_getLineHtml(e,t,n,o,r){let s=e.getLineContent(o),a=t.get(50),l=Nr.createEmpty(s,r),c=vh.isBasicASCII(s,e.mightContainNonBasicASCII()),u=vh.containsRTL(s,c,e.mightContainRTL());return fO(new ef(a.isMonospace&&!t.get(33),a.canUseHalfwidthRightwardsArrow,s,!1,c,u,0,l,[],n,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(118),t.get(100),t.get(95),t.get(51)!==Dg.OFF,null)).html}};kFe=IFe([LFe(5,on)],kFe);sce=class{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}});var q4n,Y4n,K4n,Wui,NFe,ON,xC,MFe,RFe,PN,BB,zB,ZA,VB,HB,dD=D(()=>{oo();ko();bs();Be();nr();Ap();q4n=j("diffEditor.move.border","#8b8b8b9c",y("diffEditor.move.border","The border color for text that got moved in the diff editor.")),Y4n=j("diffEditor.moveActive.border","#FFA500",y("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),K4n=j("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},y("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets.")),Wui=Ln("diff-insert",De.add,y("diffInsertIcon","Line decoration for inserts in the diff editor.")),NFe=Ln("diff-remove",De.remove,y("diffRemoveIcon","Line decoration for removals in the diff editor.")),ON=Ot.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ut.asClassName(Wui),marginClassName:"gutter-insert"}),xC=Ot.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ut.asClassName(NFe),marginClassName:"gutter-delete"}),MFe=Ot.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),RFe=Ot.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),PN=Ot.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),BB=Ot.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),zB=Ot.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),ZA=Ot.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),VB=Ot.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),HB=Ot.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})});var sbt,FFe,BN,CC,OFe,PFe,tU=D(()=>{Dc();ht();et();cd();_d();Ly();WA();lh();sbt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},FFe=function(i,e){return function(t,n){e(t,n,i)}},CC=At("diffProviderFactoryService"),OFe=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(PFe,e)}};OFe=sbt([FFe(0,Re)],OFe);oi(CC,OFe,1);PFe=class{static{BN=this}static{this.diffCache=new Map}constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new q,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,n,o){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,o);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new Sd(new Qt(1,2),new Qt(1,t.getLineCount()+1),[new lu(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let r=JSON.stringify([e.uri.toString(),t.uri.toString()]),s=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),a=BN.diffCache.get(r);if(a&&a.context===s)return a.result;let l=xo.create(),c=await this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),u=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:u,timedOut:c?.quitEarly??!0,detectedMoves:n.computeMoves?c?.moves.length??0:-1}),o.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return BN.diffCache.size>10&&BN.diffCache.delete(BN.diffCache.keys().next().value),BN.diffCache.set(r,{result:c,context:s}),c}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};PFe=BN=sbt([FFe(1,wa),FFe(2,rr)],PFe)});function WB(){return M6&&!!M6.VSCODE_DEV}function BFe(i){if(WB()){let e=Uui();return e.add(i),{dispose(){e.delete(i)}}}else return{dispose(){}}}function Uui(){ace||(ace=new Set);let i=globalThis;return i.$hotReload_applyNewExports||(i.$hotReload_applyNewExports=e=>{let t={config:{mode:void 0},...e},n=[];for(let o of ace){let r=o(t);r&&n.push(r)}if(n.length>0)return o=>{let r=!1;for(let s of n)s(o)&&(r=!0);return r}}),ace}var ace,zFe=D(()=>{k1e();WB()&&BFe(({oldExports:i,newSrc:e,config:t})=>{if(t.mode==="patch-prototype")return n=>{for(let o in n){let r=n[o];if(console.log(`[hot-reload] Patching prototype methods of '${o}'`,{exportedItem:r}),typeof r=="function"&&r.prototype){let s=i[o];if(s){for(let a of Object.getOwnPropertyNames(r.prototype)){let l=Object.getOwnPropertyDescriptor(r.prototype,a),c=Object.getOwnPropertyDescriptor(s.prototype,a);l?.value?.toString()!==c?.value?.toString()&&console.log(`[hot-reload] Patching prototype method '${o}.${a}'`),Object.defineProperty(s.prototype,a,l)}n[o]=s}}}return!0}})});function gu(i,e){return jui([i],e),i}function jui(i,e){WB()&&gs("reload",n=>BFe(({oldExports:o})=>{if([...Object.values(o)].some(r=>i.includes(r)))return r=>(n(void 0),!0)})).read(e)}var UB=D(()=>{zFe();In()});function qui(i,e,t){return{changes:i.changes.map(n=>new Sd(n.original,n.modified,n.innerChanges?n.innerChanges.map(o=>Yui(o,e,t)):void 0)),moves:i.moves,identical:i.identical,quitEarly:i.quitEarly}}function Yui(i,e,t){let n=i.originalRange,o=i.modifiedRange;return n.startColumn===1&&o.startColumn===1&&(n.endColumn!==1||o.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&o.endColumn===t.getLineMaxColumn(o.endLineNumber)&&n.endLineNumber{Gt();sn();de();In();tU();Gg();UB();_d();ZTe();Ly();IH();HLe();XTe();gn();Wt();Gb();Qui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Gui=function(i,e){return function(t,n){e(t,n,i)}},lce=class extends H{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n){super(),this.model=e,this._options=t,this._diffProviderFactoryService=n,this._isDiffUpToDate=Ut(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Ut(this,void 0),this.diff=this._diff,this._unchangedRegions=Ut(this,void 0),this.unchangedRegions=at(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a)?.regions??[]:(fn(l=>{for(let c of this._unchangedRegions.get()?.regions||[])c.collapseAll(l)}),[])),this.movedTextToCompare=Ut(this,void 0),this._activeMovedText=Ut(this,void 0),this._hoveredMovedText=Ut(this,void 0),this.activeMovedText=at(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new Mi,this._diffProvider=at(this,a=>{let l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=gs("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(He(()=>this._cancellationTokenSource.cancel()));let o=Pg("contentChangedSignal"),r=this._register(new si(()=>o.trigger(void 0),200));this._register(Ct(a=>{let l=this._unchangedRegions.read(a);if(!l||l.regions.some(p=>p.isDragged.read(a)))return;let c=l.originalDecorationIds.map(p=>e.original.getDecorationRange(p)).map(p=>p?Qt.fromRangeInclusive(p):void 0),u=l.modifiedDecorationIds.map(p=>e.modified.getDecorationRange(p)).map(p=>p?Qt.fromRangeInclusive(p):void 0),d=l.regions.map((p,g)=>!c[g]||!u[g]?void 0:new jB(c[g].startLineNumber,u[g].startLineNumber,c[g].length,p.visibleLineCountTop.read(a),p.visibleLineCountBottom.read(a))).filter(Hf),h=[],f=!1;for(let p of pO(d,(g,A)=>g.getHiddenModifiedRange(a).endLineNumberExclusive===A.getHiddenModifiedRange(a).startLineNumber))if(p.length>1){f=!0;let g=p.reduce((v,w)=>v+w.lineCount,0),A=new jB(p[0].originalLineNumber,p[0].modifiedLineNumber,g,p[0].visibleLineCountTop.get(),p[p.length-1].visibleLineCountBottom.get());h.push(A)}else h.push(p[0]);if(f){let p=e.original.deltaDecorations(l.originalDecorationIds,h.map(A=>({range:A.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),g=e.modified.deltaDecorations(l.modifiedDecorationIds,h.map(A=>({range:A.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));fn(A=>{this._unchangedRegions.set({regions:h,originalDecorationIds:p,modifiedDecorationIds:g},A)})}}));let s=(a,l,c)=>{let u=jB.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),d,h=this._unchangedRegions.get();if(h){let A=h.originalDecorationIds.map(_=>e.original.getDecorationRange(_)).map(_=>_?Qt.fromRangeInclusive(_):void 0),v=h.modifiedDecorationIds.map(_=>e.modified.getDecorationRange(_)).map(_=>_?Qt.fromRangeInclusive(_):void 0),C=nbt(h.regions.map((_,E)=>{if(!A[E]||!v[E])return;let I=A[E].length;return new jB(A[E].startLineNumber,v[E].startLineNumber,I,Math.min(_.visibleLineCountTop.get(),I),Math.min(_.visibleLineCountBottom.get(),I-_.visibleLineCountTop.get()))}).filter(Hf),(_,E)=>!E||_.modifiedLineNumber>=E.modifiedLineNumber+E.lineCount&&_.originalLineNumber>=E.originalLineNumber+E.lineCount).map(_=>new cu(_.getHiddenOriginalRange(c),_.getHiddenModifiedRange(c)));C=cu.clip(C,Qt.ofLength(1,e.original.getLineCount()),Qt.ofLength(1,e.modified.getLineCount())),d=cu.inverse(C,e.original.getLineCount(),e.modified.getLineCount())}let f=[];if(d)for(let A of u){let v=d.filter(w=>w.original.intersectsStrict(A.originalUnchangedRange)&&w.modified.intersectsStrict(A.modifiedUnchangedRange));f.push(...A.setVisibleRanges(v,l))}else f.push(...u);let p=e.original.deltaDecorations(h?.originalDecorationIds||[],f.map(A=>({range:A.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),g=e.modified.deltaDecorations(h?.modifiedDecorationIds||[],f.map(A=>({range:A.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:p,modifiedDecorationIds:g},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){let c=l0.fromModelContentChanges(a.changes),u=(this._lastDiff,e.original,e.modified,void 0);u&&(this._lastDiff=u,fn(d=>{this._diff.set(iU.fromDiffResult(this._lastDiff),d),s(u,d);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,d)}))}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){let c=l0.fromModelContentChanges(a.changes),u=(this._lastDiff,e.original,e.modified,void 0);u&&(this._lastDiff=u,fn(d=>{this._diff.set(iU.fromDiffResult(this._lastDiff),d),s(u,d);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,d)}))}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(es(async(a,l)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),r.cancel(),o.read(a);let c=this._diffProvider.read(a);c.onChangeSignal.read(a),gu(BO,a),gu(TV,a),this._isDiffUpToDate.set(!1,void 0);let u=[];l.add(e.original.onDidChangeContent(f=>{let p=l0.fromModelContentChanges(f.changes);u=FP(u,p)}));let d=[];l.add(e.modified.onDidChangeContent(f=>{let p=l0.fromModelContentChanges(f.changes);d=FP(d,p)}));let h=await c.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(h=qui(h,e.original,e.modified),h=(e.original,e.modified,void 0)??h,h=(e.original,e.modified,void 0)??h,fn(f=>{s(h,f),this._lastDiff=h;let p=iU.fromDiffResult(h);this._diff.set(p,f),this._isDiffUpToDate.set(!0,f);let g=this.movedTextToCompare.get();this.movedTextToCompare.set(g?this._lastDiff.moves.find(A=>A.lineRangeMapping.modified.intersect(g.lineRangeMapping.modified)):void 0,f)}))}))}ensureModifiedLineIsVisible(e,t,n){if(this.diff.get()?.mappings.length===0)return;let o=this._unchangedRegions.get()?.regions||[];for(let r of o)if(r.getHiddenModifiedRange(void 0).contains(e)){r.showModifiedLine(e,t,n);return}}ensureOriginalLineIsVisible(e,t,n){if(this.diff.get()?.mappings.length===0)return;let o=this._unchangedRegions.get()?.regions||[];for(let r of o)if(r.getHiddenOriginalRange(void 0).contains(e)){r.showOriginalLine(e,t,n);return}}async waitForDiff(){await wH(this.isDiffUpToDate,e=>e)}serializeState(){return{collapsedRegions:this._unchangedRegions.get()?.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){let t=e.collapsedRegions?.map(o=>Qt.deserialize(o.range)),n=this._unchangedRegions.get();!n||!t||fn(o=>{for(let r of n.regions)for(let s of t)if(r.modifiedUnchangedRange.intersect(s)){r.setHiddenModifiedRange(s,o);break}})}};lce=Qui([Gui(2,CC)],lce);iU=class i{static fromDiffResult(e){return new i(e.changes.map(t=>new nU(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,o){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=o}},nU=class{constructor(e){this.lineRangeMapping=e}},jB=class i{static fromDiffs(e,t,n,o,r){let s=Sd.inverse(e,t,n),a=[];for(let l of s){let c=l.original.startLineNumber,u=l.modified.startLineNumber,d=l.original.length,h=c===1&&u===1,f=c+d===t+1&&u+d===n+1;(h||f)&&d>=r+o?(h&&!f&&(d-=r),f&&!h&&(c+=r,u+=r,d-=r),a.push(new i(c,u,d,0,0))):d>=r*2+o&&(c+=r,u+=r,d-=r*2,a.push(new i(c,u,d,0,0)))}return a}get originalUnchangedRange(){return Qt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Qt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,o,r){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=Ut(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Ut(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=at(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=Ut(this,void 0);let s=Math.max(Math.min(o,this.lineCount),0),a=Math.max(Math.min(r,this.lineCount-o),0);dEe(o===s),dEe(r===a),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){let n=[],o=new Ig(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange),r=this.originalLineNumber,s=this.modifiedLineNumber,a=this.modifiedLineNumber+this.lineCount;if(o.ranges.length===0)this.showAll(t),n.push(this);else{let l=0;for(let c of o.ranges){let u=l===o.ranges.length-1;l++;let d=(u?a:c.endLineNumberExclusive)-s,h=new i(r,s,d,0,0);h.setHiddenModifiedRange(c,t),n.push(h),r=h.originalUnchangedRange.endLineNumberExclusive,s=h.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Qt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Qt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let n=e.startLineNumber-this.modifiedLineNumber,o=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,o,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){let n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,n){let o=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),r=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&o{Ye();il();oo();de();wi();ko();Be();cce=class extends H{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,n,o,r,s,a,l,c){super(),this._getViewZoneId=e,this._marginDomNode=t,this._modifiedEditor=n,this._diff=o,this._editor=r,this._viewLineCounts=s,this._originalTextModel=a,this._contextMenuService=l,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ut.asClassName(De.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";let u=this._modifiedEditor.getOption(67);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${u}px`,this._diffActions.style.lineHeight=`${u}px`,this._marginDomNode.appendChild(this._diffActions);let d=0,h=n.getOption(128)&&!Ou,f=(p,g)=>{this._contextMenuService.showContextMenu({domForShadowRoot:h?n.getDomNode()??void 0:void 0,getAnchor:()=>({x:p,y:g}),getActions:()=>{let A=[],v=o.modified.isEmpty;return A.push(new ta("diff.clipboard.copyDeletedContent",v?o.original.length>1?y("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):y("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):o.original.length>1?y("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):y("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{let C=this._originalTextModel.getValueInRange(o.original.toExclusiveRange());await this._clipboardService.writeText(C)})),o.original.length>1&&A.push(new ta("diff.clipboard.copyDeletedLineContent",v?y("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.original.startLineNumber+d):y("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",o.original.startLineNumber+d),void 0,!0,async()=>{let C=this._originalTextModel.getLineContent(o.original.startLineNumber+d);C===""&&(C=this._originalTextModel.getEndOfLineSequence()===0?` `:`\r -`),await this._clipboardService.writeText(C)})),n.getOption(92)||v.push(new Js("diff.inline.revertChange",y("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),v},autoSelectFirstItem:!0})};this._register(cn(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;let{top:g,height:v}=bn(this._diffActions),A=Math.floor(u/3);p.preventDefault(),f(p.posx,g+v+A)})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(d=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,u),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(p=>{p.event.leftButton&&(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()&&(p.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,u),f(p.event.posx,p.event.posy+u))}))}_updateLightBulbPosition(e,t,n){let{top:r}=bn(e),o=t-r,s=Math.floor(o/n),a=s*n;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let c=0;c0,o=new jp(1e4),s=0,a=0,l=[];for(let h=0;h');let l=e.getLineContent(),c=dh.isBasicASCII(l,r),u=dh.containsRTL(l,c,o),d=ex(new Wh(s.fontInfo.isMonospace&&!s.disableMonospaceOptimizations,s.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,u,0,e,t,s.tabSize,0,s.fontInfo.spaceWidth,s.fontInfo.middotWidth,s.fontInfo.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==fg.OFF,null),a);return a.appendString(""),d.characterMapping.getHorizontalOffset(d.characterMapping.length)}var tvt,Wae,Uae,rvt=D(()=>{ay();qp();Ks();$w();aI();ES();Zb();tvt=fd("diffEditorWidget",{createHTML:i=>i});Wae=class{constructor(e,t,n,r){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=n,this.mightContainRTL=r}},Uae=class i{static fromEditor(e){let t=e.getOptions(),n=t.get(50),r=t.get(146);return new i(e.getModel()?.getOptions().tabSize||0,n,t.get(33),n.typicalHalfwidthCharacterWidth,t.get(105),t.get(67),r.decorationsWidth,t.get(118),t.get(100),t.get(95),t.get(51))}constructor(e,t,n,r,o,s,a,l,c,u,d){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=n,this.typicalHalfwidthCharacterWidth=r,this.scrollBeyondLastColumn=o,this.lineHeight=s,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=u,this.fontLigatures=d}}});function svt(i,e,t,n,r,o){let s=new cd(avt(i,n)),a=new cd(avt(e,r)),l=i.getOption(67),c=e.getOption(67),u=[],d=0,h=0;function f(p,g){for(;;){let v=s.peek(),A=a.peek();if(v&&v.lineNumber>=p&&(v=void 0),A&&A.lineNumber>=g&&(A=void 0),!v&&!A)break;let w=v?v.lineNumber-d:Number.MAX_VALUE,C=A?A.lineNumber-h:Number.MAX_VALUE;wC?(a.dequeue(),v={lineNumber:A.lineNumber-h+d,heightInPx:0}):(s.dequeue(),a.dequeue()),u.push({originalRange:Yt.ofLength(v.lineNumber,1),modifiedRange:Yt.ofLength(A.lineNumber,1),originalHeightInPx:l+v.heightInPx,modifiedHeightInPx:c+A.heightInPx,diff:void 0})}}for(let p of t){let C=function(_,E,I=!1){if(_H.lineNumber<_)?.reduce((H,B)=>H+B.heightInPx,0)??0,z=a.takeWhile(H=>H.lineNumberH+B.heightInPx,0)??0;u.push({originalRange:T,modifiedRange:L,originalHeightInPx:T.length*l+M,modifiedHeightInPx:L.length*c+z,diff:p.lineRangeMapping}),w=_,A=E},g=p.lineRangeMapping;f(g.original.startLineNumber,g.modified.startLineNumber);let v=!0,A=g.modified.startLineNumber,w=g.original.startLineNumber;if(o)for(let _ of g.innerChanges||[]){_.originalRange.startColumn>1&&_.modifiedRange.startColumn>1&&C(_.originalRange.startLineNumber,_.modifiedRange.startLineNumber);let E=i.getModel(),I=_.originalRange.endLineNumber<=E.getLineCount()?E.getLineMaxColumn(_.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;_.originalRange.endColumn1&&n.push({lineNumber:l,heightInPx:s*(c-1)})}for(let l of i.getWhitespaces()){if(e.has(l.id))continue;let c=l.afterLineNumber===0?0:o.convertViewPositionToModelPosition(new K(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:c,heightInPx:l.height})}return Y0t(t,n,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}function EH(i){return i.innerChanges?i.innerChanges.every(e=>lvt(e.modifiedRange)&&lvt(e.originalRange)||e.originalRange.equalsRange(new N(1,1,1,1))):!1}function lvt(i){return i.startLineNumber===i.endLineNumber}var tyi,ovt,jae,Qae=D(()=>{Ye();Qt();Jt();er();ae();Tn();Dr();gn();qp();HE();bFe();evt();rvt();Ng();md();Nt();Zb();Bx();bd();We();tyi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ovt=function(i,e){return function(t,n){e(t,n,i)}},jae=class extends W{constructor(e,t,n,r,o,s,a,l,c,u){super(),this._targetWindow=e,this._editors=t,this._diffModel=n,this._options=r,this._diffEditorWidget=o,this._canIgnoreViewZoneUpdateEvent=s,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=u,this._originalTopPadding=Gt(this,0),this._originalScrollOffset=Gt(this,0),this._originalScrollOffsetAnimated=ZRe(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=Gt(this,0),this._modifiedScrollOffset=Gt(this,0),this._modifiedScrollOffsetAnimated=ZRe(this._targetWindow,this._modifiedScrollOffset,this._store);let d=Gt("invalidateAlignmentsState",0),h=this._register(new di(()=>{d.set(d.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(C=>{(C.hasChanged(147)||C.hasChanged(67))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(C=>{(C.hasChanged(147)||C.hasChanged(67))&&h.schedule()}));let f=this._diffModel.map(C=>C?zi(this,C.model.original.onDidChangeTokens,()=>C.model.original.tokenization.backgroundTokenizationState===2):void 0).map((C,_)=>C?.read(_)),p=st(C=>{let _=this._diffModel.read(C),E=_?.diff.read(C);if(!_||!E)return null;d.read(C);let T=this._options.renderSideBySide.read(C);return svt(this._editors.original,this._editors.modified,E.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,T)}),g=st(C=>{let _=this._diffModel.read(C)?.movedTextToCompare.read(C);if(!_)return null;d.read(C);let E=_.changes.map(I=>new SH(I));return svt(this._editors.original,this._editors.modified,E,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function v(){let C=document.createElement("div");return C.className="diagonal-fill",C}let A=this._register(new te);this.viewZones=sh(this,(C,_)=>{A.clear();let E=p.read(C)||[],I=[],T=[],L=this._modifiedTopPadding.read(C);L>0&&T.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:L,showInHiddenAreas:!0,suppressMouseDown:!0});let M=this._originalTopPadding.read(C);M>0&&I.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:M,showInHiddenAreas:!0,suppressMouseDown:!0});let z=this._options.renderSideBySide.read(C),H=z?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(H){let le=this._editors.original.getModel();for(let oe of E)if(oe.diff)for(let fe=oe.originalRange.startLineNumber;fele.getLineCount())return{orig:I,mod:T};H?.addRequest(le.getLineContent(fe),null,null)}}let B=H?.finalize()??[],q=0,U=this._editors.modified.getOption(67),F=this._diffModel.read(C)?.movedTextToCompare.read(C),ne=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,ce=this._editors.original.getModel()?.mightContainRTL()??!1,se=Uae.fromEditor(this._editors.modified);for(let le of E)if(le.diff&&!z&&(!this._options.useTrueInlineDiffRendering.read(C)||!EH(le.diff))){if(!le.originalRange.isEmpty){f.read(C);let fe=document.createElement("div");fe.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");let Re=this._editors.original.getModel();if(le.originalRange.endLineNumberExclusive-1>Re.getLineCount())return{orig:I,mod:T};let ft=new Wae(le.originalRange.mapToLineArray(Be=>Re.tokenization.getLineTokens(Be)),le.originalRange.mapToLineArray(Be=>B[q++]),ne,ce),At=[];for(let Be of le.diff.innerChanges||[])At.push(new Vx(Be.originalRange.delta(-(le.diff.original.startLineNumber-1)),Nv.className,0));let Dt=nvt(ft,se,At,fe),Ct=document.createElement("div");if(Ct.className="inline-deleted-margin-view-zone",mo(Ct,se.fontInfo),this._options.renderIndicators.read(C))for(let Be=0;Bedb(Xt),Ct,this._editors.modified,le.diff,this._diffEditorWidget,Dt.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Be=0;Be1&&I.push({afterLineNumber:le.originalRange.startLineNumber+Be,domNode:v(),heightInPx:(Vt-1)*U,showInHiddenAreas:!0,suppressMouseDown:!0})}T.push({afterLineNumber:le.modifiedRange.startLineNumber-1,domNode:fe,heightInPx:Dt.heightInLines*U,minWidthInPx:Dt.minWidthInPx,marginDomNode:Ct,setZoneId(Be){Xt=Be},showInHiddenAreas:!0,suppressMouseDown:!0})}let oe=document.createElement("div");oe.className="gutter-delete",I.push({afterLineNumber:le.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:le.modifiedHeightInPx,marginDomNode:oe,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let oe=le.modifiedHeightInPx-le.originalHeightInPx;if(oe>0){if(F?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(le.originalRange.endLineNumberExclusive-1))continue;I.push({afterLineNumber:le.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:oe,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let fe=function(){let ft=document.createElement("div");return ft.className="arrow-revert-change "+ut.asClassName(Ee.arrowRight),_.add(re(ft,"mousedown",At=>At.stopPropagation())),_.add(re(ft,"click",At=>{At.stopPropagation(),o.revert(le.diff)})),we("div",{},ft)};if(F?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(le.modifiedRange.endLineNumberExclusive-1))continue;let Re;le.diff&&le.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(C)&&(Re=fe()),T.push({afterLineNumber:le.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-oe,marginDomNode:Re,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(let le of g.read(C)??[]){if(!F?.lineRangeMapping.original.intersect(le.originalRange)||!F?.lineRangeMapping.modified.intersect(le.modifiedRange))continue;let oe=le.modifiedHeightInPx-le.originalHeightInPx;oe>0?I.push({afterLineNumber:le.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:oe,showInHiddenAreas:!0,suppressMouseDown:!0}):T.push({afterLineNumber:le.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-oe,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:I,mod:T}});let w=!1;this._register(this._editors.original.onDidScrollChange(C=>{C.scrollLeftChanged&&!w&&(w=!0,this._editors.modified.setScrollLeft(C.scrollLeft),w=!1)})),this._register(this._editors.modified.onDidScrollChange(C=>{C.scrollLeftChanged&&!w&&(w=!0,this._editors.original.setScrollLeft(C.scrollLeft),w=!1)})),this._originalScrollTop=zi(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=zi(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(_t(C=>{let _=this._originalScrollTop.read(C)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(C))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(C));_!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(_,1)})),this._register(_t(C=>{let _=this._modifiedScrollTop.read(C)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(C))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(C));_!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(_,1)})),this._register(_t(C=>{let _=this._diffModel.read(C)?.movedTextToCompare.read(C),E=0;if(_){let I=this._editors.original.getTopForLineNumber(_.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();E=this._editors.modified.getTopForLineNumber(_.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-I}E>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(E,void 0)):E<0?(this._modifiedTopPadding.set(-E,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-E,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+E,void 0,!0)}))}};jae=tyi([ovt(8,uh),ovt(9,Xs)],jae)});var WE,vFe,Gae,AFe=D(()=>{Ye();Dg();$a();Qt();Jf();er();ae();Tn();Dr();Ng();Kf();Oe();WE=class i extends W{static{this.movedCodeBlockPadding=4}constructor(e,t,n,r,o){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=r,this._editors=o,this._originalScrollTop=zi(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=zi(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=bs("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Gt(this,0),this._modifiedViewZonesChangedSignal=bs("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=bs("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=sh(this,(u,d)=>{this._element.replaceChildren();let h=this._diffModel.read(u),f=h?.diff.read(u)?.movedTexts;if(!f||f.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(u);let p=this._originalEditorLayoutInfo.read(u),g=this._modifiedEditorLayoutInfo.read(u);if(!p||!g){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(u),this._originalViewZonesChangedSignal.read(u);let v=f.map(T=>{function L(ce,se){let le=se.getTopForLineNumber(ce.startLineNumber,!0),oe=se.getTopForLineNumber(ce.endLineNumberExclusive,!0);return(le+oe)/2}let M=L(T.lineRangeMapping.original,this._editors.original),z=this._originalScrollTop.read(u),H=L(T.lineRangeMapping.modified,this._editors.modified),B=this._modifiedScrollTop.read(u),q=M-z,U=H-B,F=Math.min(M,H),ne=Math.max(M,H);return{range:new Di(F,ne),from:q,to:U,fromWithoutScroll:M,toWithoutScroll:H,move:T}});v.sort(Tlt(aa(T=>T.fromWithoutScroll>T.toWithoutScroll,klt),aa(T=>T.fromWithoutScroll>T.toWithoutScroll?T.fromWithoutScroll:-T.toWithoutScroll,ud)));let A=vFe.compute(v.map(T=>T.range)),w=10,C=p.verticalScrollbarWidth,_=(A.getTrackCount()-1)*10+w*2,E=C+_+(g.contentLeft-i.movedCodeBlockPadding),I=0;for(let T of v){let L=A.getTrack(I),M=C+w+L*10,z=15,H=15,B=E,q=g.glyphMarginWidth+g.lineNumbersWidth,U=18,F=document.createElementNS("http://www.w3.org/2000/svg","rect");F.classList.add("arrow-rectangle"),F.setAttribute("x",`${B-q}`),F.setAttribute("y",`${T.to-U/2}`),F.setAttribute("width",`${q}`),F.setAttribute("height",`${U}`),this._element.appendChild(F);let ne=document.createElementNS("http://www.w3.org/2000/svg","g"),ce=document.createElementNS("http://www.w3.org/2000/svg","path");ce.setAttribute("d",`M 0 ${T.from} L ${M} ${T.from} L ${M} ${T.to} L ${B-H} ${T.to}`),ce.setAttribute("fill","none"),ne.appendChild(ce);let se=document.createElementNS("http://www.w3.org/2000/svg","polygon");se.classList.add("arrow"),d.add(_t(le=>{ce.classList.toggle("currentMove",T.move===h.activeMovedText.read(le)),se.classList.toggle("currentMove",T.move===h.activeMovedText.read(le))})),se.setAttribute("points",`${B-H},${T.to-z/2} ${B},${T.to} ${B-H},${T.to+z/2}`),ne.appendChild(se),this._element.appendChild(ne),I++}this.width.set(_,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(Ve(()=>this._element.remove())),this._register(_t(u=>{let d=this._originalEditorLayoutInfo.read(u),h=this._modifiedEditorLayoutInfo.read(u);!d||!h||(this._element.style.left=`${d.width-d.verticalScrollbarWidth}px`,this._element.style.height=`${d.height}px`,this._element.style.width=`${d.verticalScrollbarWidth+d.contentLeft-i.movedCodeBlockPadding+this.width.read(u)}px`)})),this._register(qb(this._state));let s=st(u=>{let h=this._diffModel.read(u)?.diff.read(u);return h?h.movedTexts.map(f=>({move:f,original:new d1(Xl(f.lineRangeMapping.original.startLineNumber-1),18),modified:new d1(Xl(f.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(QP(this._editors.original,s.map(u=>u.map(d=>d.original)))),this._register(QP(this._editors.modified,s.map(u=>u.map(d=>d.modified)))),this._register(ts((u,d)=>{let h=s.read(u);for(let f of h)d.add(new Gae(this._editors.original,f.original,f.move,"original",this._diffModel.get())),d.add(new Gae(this._editors.modified,f.modified,f.move,"modified",this._diffModel.get()))}));let a=bs("original.onDidFocusEditorWidget",u=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0))),l=bs("modified.onDidFocusEditorWidget",u=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0))),c="modified";this._register(yx({createEmptyChangeSummary:()=>{},handleChange:(u,d)=>(u.didChange(a)&&(c="original"),u.didChange(l)&&(c="modified"),!0)},u=>{a.read(u),l.read(u);let d=this._diffModel.read(u);if(!d)return;let h=d.diff.read(u),f;if(h&&c==="original"){let p=this._editors.originalCursor.read(u);p&&(f=h.movedTexts.find(g=>g.lineRangeMapping.original.contains(p.lineNumber)))}if(h&&c==="modified"){let p=this._editors.modifiedCursor.read(u);p&&(f=h.movedTexts.find(g=>g.lineRangeMapping.modified.contains(p.lineNumber)))}f!==d.movedTextToCompare.get()&&d.movedTextToCompare.set(void 0,void 0),d.setActiveMovedText(f)}))}},vFe=class i{static compute(e){let t=[],n=[];for(let r of e){let o=t.findIndex(s=>!s.intersectsStrict(r));o===-1&&(t.length>=6?o=Pct(t,aa(a=>a.intersectWithRangeLength(r),ud)):(o=t.length,t.push(new see))),t[o].addRange(r),n.push(o)}return new i(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}},Gae=class extends eN{constructor(e,t,n,r,o){let s=pi("div.diff-hidden-lines-widget");super(e,t,s.root),this._editor=e,this._move=n,this._kind=r,this._diffModel=o,this._nodes=pi("div.diff-moved-code-block",{style:{marginRight:"4px"}},[pi("div.text-content@textContent"),pi("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);let a=zi(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(up(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;n.changes.length>0?l=this._kind==="original"?y("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):y("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?y("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):y("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);let c=this._register(new Ns(this._nodes.actionBar,{highlightToggledItems:!0})),u=new Js("",l,"",!1);c.push(u,{icon:!1,label:!0});let d=new Js("","Compare",ut.asClassName(Ee.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(_t(h=>{let f=this._diffModel.movedTextToCompare.read(h)===n;d.checked=f})),c.push(d,{icon:!1,label:!0})}}});var qae,cvt=D(()=>{ae();Tn();Qae();AFe();HE();Ng();qae=class extends W{constructor(e,t,n,r){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=st(this,o=>{let s=this._diffModel.read(o),a=s?.diff.read(o);if(!a)return null;let l=this._diffModel.read(o).movedTextToCompare.read(o),c=this._options.renderIndicators.read(o),u=this._options.showEmptyDecorations.read(o),d=[],h=[];if(!l)for(let p of a.mappings)if(p.lineRangeMapping.original.isEmpty||d.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:c?Xx:dFe}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:c?iN:uFe}),p.lineRangeMapping.modified.isEmpty||p.lineRangeMapping.original.isEmpty)p.lineRangeMapping.original.isEmpty||d.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:YP}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:GP});else{let g=this._options.useTrueInlineDiffRendering.read(o)&&EH(p.lineRangeMapping);for(let v of p.lineRangeMapping.innerChanges||[])if(p.lineRangeMapping.original.contains(v.originalRange.startLineNumber)&&d.push({range:v.originalRange,options:v.originalRange.isEmpty()&&u?KP:Nv}),p.lineRangeMapping.modified.contains(v.modifiedRange.startLineNumber)&&h.push({range:v.modifiedRange,options:v.modifiedRange.isEmpty()&&u&&!g?qP:nN}),g){let A=s.model.original.getValueInRange(v.originalRange);h.push({range:v.modifiedRange,options:{description:"deleted-text",before:{content:A,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(l)for(let p of l.changes){let g=p.original.toInclusiveRange();g&&d.push({range:g,options:c?Xx:dFe});let v=p.modified.toInclusiveRange();v&&h.push({range:v,options:c?iN:uFe});for(let A of p.innerChanges||[])d.push({range:A.originalRange,options:Nv}),h.push({range:A.modifiedRange,options:nN})}let f=this._diffModel.read(o).activeMovedText.read(o);for(let p of a.movedTexts)d.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(p===f?" currentMove":""),blockPadding:[WE.movedCodeBlockPadding,0,WE.movedCodeBlockPadding,WE.movedCodeBlockPadding]}}),h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(p===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:d,modifiedDecorations:h}}),this._register(jP(this._editors.original,this._decorations.map(o=>o?.originalDecorations||[]))),this._register(jP(this._editors.modified,this._decorations.map(o=>o?.modifiedDecorations||[])))}}});var Yae,$P,yFe=D(()=>{aP();ae();Tn();$h();Yae=class{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=Ny(this,n=>{let r=this._sashRatio.read(n)??this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(r,n)},(n,r)=>{let o=this.dimensions.width.get();this._sashRatio.set(n/o,r)}),this._sashRatio=Gt(this,void 0)}_computeSashLeft(e,t){let n=this.dimensions.width.read(t),r=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),o=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):r,s=100;return n<=s*2?r:on-s?n-s:o}},$P=class extends W{constructor(e,t,n,r,o,s){super(),this._domNode=e,this._dimensions=t,this._enabled=n,this._boundarySashes=r,this.sashLeft=o,this._resetSash=s,this._sash=this._register(new of(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(a=>{this.sashLeft.set(this._startSashPosition+(a.currentX-a.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(_t(a=>{let l=this._boundarySashes.read(a);l&&(this._sash.orthogonalEndSash=l.bottom)})),this._register(_t(a=>{let l=this._enabled.read(a);this._sash.state=l?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}}});var Kae,wFe,uvt=D(()=>{Ye();ae();Tn();md();Kf();Kae=class extends W{constructor(e,t,n){super(),this._editor=e,this._domNode=t,this.itemProvider=n,this.scrollTop=zi(this,this._editor.onDidScrollChange,s=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(s=>s===0),this.modelAttached=zi(this,this._editor.onDidChangeModel,s=>this._editor.hasModel()),this.editorOnDidChangeViewZones=bs("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=bs("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=Cg("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";let r=this._domNode.appendChild(pi("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),o=new ResizeObserver(()=>{fn(s=>{this.domNodeSizeChanged.trigger(s)})});o.observe(this._domNode),this._register(Ve(()=>o.disconnect())),this._register(_t(s=>{r.className=this.isScrollTopZero.read(s)?"":"scroll-decoration"})),this._register(_t(s=>this.render(s)))}dispose(){super.dispose(),So(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);let t=this.scrollTop.read(e),n=this._editor.getVisibleRanges(),r=new Set(this.views.keys()),o=Di.ofStartAndLength(0,this._domNode.clientHeight);if(!o.isEmpty)for(let s of n){let a=new Yt(s.startLineNumber,s.endLineNumber+1),l=this.itemProvider.getIntersectingGutterItems(a,e);fn(c=>{for(let u of l){if(!u.range.intersect(a))continue;r.delete(u.id);let d=this.views.get(u.id);if(d)d.item.set(u,c);else{let g=document.createElement("div");this._domNode.appendChild(g);let v=Gt("item",u),A=this.itemProvider.createView(v,g);d=new wFe(v,A,g),this.views.set(u.id,d)}let h=u.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(u.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(u.range.startLineNumber-1,!1)-t,p=(u.range.endLineNumberExclusive===1?Math.max(h,this._editor.getTopForLineNumber(u.range.startLineNumber,!1)-t):Math.max(h,this._editor.getBottomForLineNumber(u.range.endLineNumberExclusive-1,!0)-t))-h;d.domNode.style.top=`${h}px`,d.domNode.style.height=`${p}px`,d.gutterItemView.layout(Di.ofStartAndLength(h,p),o)}})}for(let s of r){let a=this.views.get(s);a.gutterItemView.dispose(),a.domNode.remove(),this.views.delete(s)}}},wFe=class{constructor(e,t,n){this.item=e,this.gutterItemView=t,this.domNode=n}}});var eB,xFe=D(()=>{$a();eB=class extends Gf{constructor(e){super(),this._getContext=e}runAction(e,t){let n=this._getContext();return super.runAction(e,n)}}});var DH,dvt=D(()=>{hy();dx();DH=class extends G7{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){let e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new $c(e-1,t)}}});var hvt=D(()=>{});var Jae,tB,fvt=D(()=>{Dg();HIe();$a();er();Dr();et();ae();hvt();Oe();Zl();Jae=class extends W{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new rY),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new te),n.hoverDelegate=n.hoverDelegate??this._register(Yb()),this.options=n,this.toggleMenuAction=this._register(new tB(()=>this.toggleMenuActionViewItem?.show(),n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Ns(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,hoverDelegate:n.hoverDelegate,actionViewItemProvider:(r,o)=>{if(r.id===tB.ID)return this.toggleMenuActionViewItem=new pE(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ut.asClassNameArray(n.moreIcon??Ee.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let s=n.actionViewItemProvider(r,o);if(s)return s}if(r instanceof pg){let s=new pE(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return s.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(s),this.disposables.add(this._onDidChangeDropdownVisibility.add(s.onDidChangeVisibility)),s}}}))}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();let 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(r=>{this.actionBar.push(r,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){return this.options.getKeyBinding?.(e)?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}},tB=class i extends Js{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||y("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}});var pvt,$b,oN,iB,TH=D(()=>{Ye();Op();fvt();$a();Qt();iLe();Lt();et();td();ae();Oe();Ex();fr();F2e();Xn();Wt();bd();Yr();eh();pvt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$b=function(i,e){return function(t,n){e(t,n,i)}},oN=class extends Jae{constructor(e,t,n,r,o,s,a,l){super(e,o,{getKeyBinding:u=>s.lookupKeybinding(u.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"}),this._options=t,this._menuService=n,this._contextKeyService=r,this._contextMenuService=o,this._keybindingService=s,this._commandService=a,this._sessionDisposables=this._store.add(new te);let c=t?.telemetrySource;c&&this._store.add(this.actionBar.onDidRun(u=>l.publicLog2("workbenchActionExecuted",{id:u.action.id,from:c})))}setActions(e,t=[],n){this._sessionDisposables.clear();let r=e.slice(),o=t.slice(),s=[],a=0,l=[],c=!1;if(this._options?.hiddenItemStrategy!==-1)for(let u=0;uf?.id)),d=this._options.overflowBehavior.maxItems-u.size,h=0;for(let f=0;f=d&&(r[f]=void 0,l[f]=p))}}SEe(r),SEe(l),super.setActions(r,go.join(l,o)),(s.length>0||r.length>0)&&this._sessionDisposables.add(re(this.getElement(),"contextmenu",u=>{let d=new gl(rt(this.getElement()),u),h=this.getItemAction(d.target);if(!h)return;d.preventDefault(),d.stopPropagation();let f=[];if(h instanceof Ql&&h.menuKeybinding)f.push(h.menuKeybinding);else if(!(h instanceof Hb||h instanceof tB)){let g=!!this._keybindingService.lookupKeybinding(h.id);f.push(R2e(this._commandService,this._keybindingService,h.id,void 0,g))}if(s.length>0){let g=!1;if(a===1&&this._options?.hiddenItemStrategy===0){g=!0;for(let v=0;vthis._menuService.resetHiddenStates(n)}))),p.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>d,getActions:()=>p,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:typeof this._options?.telemetrySource=="string",contextKeyService:this._contextKeyService})}))}};oN=pvt([$b(2,el),$b(3,Ze),$b(4,Xs),$b(5,ni),$b(6,Oi),$b(7,io)],oN);iB=class extends oN{constructor(e,t,n,r,o,s,a,l,c){super(e,{resetMenu:t,...n},r,o,s,a,l,c),this._onDidChangeMenuItems=this._store.add(new G),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;let u=this._store.add(r.createMenu(t,o,{emitEventsForSubmenuChanges:!0})),d=()=>{let h=[],f=[];gE(u,n?.menuOptions,{primary:h,secondary:f},n?.toolbarOptions?.primaryGroup,n?.toolbarOptions?.shouldInlineSubmenu,n?.toolbarOptions?.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",h.length===0&&f.length===0),super.setActions(h,f)};this._store.add(u.onDidChange(()=>{d(),this._onDidChangeMenuItems.fire(this)})),d()}setActions(){throw new vi("This toolbar is populated from a menu.")}};iB=pvt([$b(3,el),$b(4,Ze),$b(5,Xs),$b(6,ni),$b(7,Oi),$b(8,io)],iB)});var mvt,Zae,CFe,Xae,$ae,ele,_Fe,gvt=D(()=>{Ye();ae();Tn();$h();yFe();Ng();uvt();xFe();md();Kf();We();hy();fy();dvt();TH();fr();Wt();px();ht();mvt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Zae=function(i,e){return function(t,n){e(t,n,i)}},CFe=[],Xae=35,$ae=class extends W{constructor(e,t,n,r,o,s,a,l,c){super(),this._diffModel=t,this._editors=n,this._options=r,this._sashLayout=o,this._boundarySashes=s,this._instantiationService=a,this._contextKeyService=l,this._menuService=c,this._menu=this._register(this._menuService.createMenu(tt.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=zi(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(u=>u.length>0),this._showSash=st(this,u=>this._options.renderSideBySide.read(u)&&this._hasActions.read(u)),this.width=st(this,u=>this._hasActions.read(u)?Xae:0),this.elements=pi("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:Xae+"px"}},[]),this._currentDiff=st(this,u=>{let d=this._diffModel.read(u);if(!d)return;let h=d.diff.read(u)?.mappings,f=this._editors.modifiedCursor.read(u);if(f)return h?.find(p=>p.lineRangeMapping.modified.contains(f.lineNumber))}),this._selectedDiffs=st(this,u=>{let h=this._diffModel.read(u)?.diff.read(u);if(!h)return CFe;let f=this._editors.modifiedSelections.read(u);if(f.every(A=>A.isEmpty()))return CFe;let p=new gg(f.map(A=>Yt.fromRangeInclusive(A))),v=h.mappings.filter(A=>A.lineRangeMapping.innerChanges&&p.intersects(A.lineRangeMapping.modified)).map(A=>({mapping:A,rangeMappings:A.lineRangeMapping.innerChanges.filter(w=>f.some(C=>N.areIntersecting(w.modifiedRange,C)))}));return v.length===0||v.every(A=>A.rangeMappings.length===0)?CFe:v}),this._register(K0t(e,this.elements.root)),this._register(re(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(up(this.elements.root,{display:this._hasActions.map(u=>u?"block":"none")})),fa(this,u=>this._showSash.read(u)?new $P(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,Ny(this,h=>this._sashLayout.sashLeft.read(h)-Xae,(h,f)=>this._sashLayout.sashLeft.set(h+Xae,f)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store),this._register(new Kae(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(u,d)=>{let h=this._diffModel.read(d);if(!h)return[];let f=h.diff.read(d);if(!f)return[];let p=this._selectedDiffs.read(d);if(p.length>0){let v=gd.fromRangeMappings(p.flatMap(A=>A.rangeMappings));return[new ele(v,!0,tt.DiffEditorSelectionToolbar,void 0,h.model.original.uri,h.model.modified.uri)]}let g=this._currentDiff.read(d);return f.mappings.map(v=>new ele(v.lineRangeMapping.withInnerChangesFromLineRanges(),v.lineRangeMapping===g?.lineRangeMapping,tt.DiffEditorHunkToolbar,void 0,h.model.original.uri,h.model.modified.uri))},createView:(u,d)=>this._instantiationService.createInstance(_Fe,u,d,this)})),this._register(re(this.elements.gutter,De.MOUSE_WHEEL,u=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(u)},{passive:!1}))}computeStagedValue(e){let t=e.innerChanges??[],n=new DH(this._editors.modifiedModel.get()),r=new DH(this._editors.original.getModel());return new GS(t.map(a=>a.toTextEdit(n))).apply(r)}layout(e){this.elements.gutter.style.left=e+"px"}};$ae=mvt([Zae(6,Ne),Zae(7,Ze),Zae(8,el)],$ae);ele=class{constructor(e,t,n,r,o,s){this.mapping=e,this.showAlways=t,this.menuId=n,this.rangeOverride=r,this.originalUri=o,this.modifiedUri=s}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}},_Fe=class extends W{constructor(e,t,n,r){super(),this._item=e,this._elements=pi("div.gutterItem",{style:{height:"20px",width:"34px"}},[pi("div.background@background",{},[]),pi("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,s=>s.showAlways),this._menuId=this._item.map(this,s=>s.menuId),this._isSmall=Gt(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;let o=this._register(r.createInstance(vy,"element",!0,{position:{hoverPosition:1}}));this._register(Jx(t,this._elements.root)),this._register(_t(s=>{let a=this._showAlways.read(s);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",a),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(ts((s,a)=>{this._elements.buttons.replaceChildren();let l=a.add(r.createInstance(iB,this._elements.buttons,this._menuId.read(s),{orientation:1,hoverDelegate:o,toolbarOptions:{primaryGroup:c=>c.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(s)?1:3},hiddenItemStrategy:0,actionRunner:new eB(()=>{let c=this._item.get(),u=c.mapping;return{mapping:u,originalWithModifiedChanges:n.computeStagedValue(u),originalUri:c.originalUri,modifiedUri:c.modifiedUri}}),menuOptions:{shouldForwardArgs:!0}}));a.add(l.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let n=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),n=this._elements.buttons.clientHeight;let r=e.length/2-n/2,o=n,s=e.start+r,a=Di.tryCreate(o,t.endExclusive-o-n),l=Di.tryCreate(e.start+o,e.endExclusive-n-o);l&&a&&l.start({deltas:[],didChange:!1}),handleChange:(t,n)=>{if(t.didChange(i)){let r=t.change;r!==void 0&&n.deltas.push(r),n.didChange=!0}return!0}},(t,n)=>{let r=i.read(t);n.didChange&&e(r,n.deltas)})}function bvt(i,e){let t=new te,n=tle(i,(r,o)=>{t.clear(),e(r,o,t)});return{dispose(){n.dispose(),t.dispose()}}}var SFe,$x=D(()=>{ky();ae();Tn();Gb();$h();Hn();SFe=class i extends W{static{this._map=new Map}static get(e){let t=i._map.get(e);if(!t){t=new i(e),i._map.set(e,t);let n=e.onDidDispose(()=>{let r=i._map.get(e);r&&(i._map.delete(e),r.dispose(),n.dispose())})}return t}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new Iy(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){let e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=Gt(this,this.editor.getModel()),this.model=this._model,this.isReadonly=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(92)),this._versionId=CO({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=CO({owner:this,equalsFn:Oz($I(qe.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=zi(this,t=>{let n=this.editor.onDidFocusEditorWidget(t),r=this.editor.onDidBlurEditorWidget(t);return{dispose(){n.dispose(),r.dispose()}}},()=>this.editor.hasWidgetFocus()),this.value=Ny(this,t=>(this.versionId.read(t),this.model.read(t)?.getValue()??""),(t,n)=>{let r=this.model.get();r!==null&&t!==r.getValue()&&r.setValue(t)}),this.valueIsEmpty=st(this,t=>(this.versionId.read(t),this.editor.getModel()?.getValueLength()===0)),this.cursorSelection=Jl({owner:this,equalsFn:Oz(qe.selectionsEqual)},t=>this.selections.read(t)?.[0]??null),this.onDidType=Cg(this),this.scrollTop=zi(this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=zi(this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=zi(this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(t=>t.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(t=>t.decorationsLeft),this.contentWidth=zi(this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(t=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,t)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(t=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(t=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}}))}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return zi(this,t=>this.editor.onDidChangeConfiguration(n=>{n.hasChanged(e)&&t(void 0)}),()=>this.editor.getOption(e))}setDecorations(e){let t=new te,n=this.editor.createDecorationsCollection();return t.add(My({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}createOverlayWidget(e){let t="observableOverlayWidget"+this._overlayWidgetCounter++,n={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(n);let r=_t(o=>{e.position.read(o),e.minContentWidthInPx.read(o),this.editor.layoutOverlayWidget(n)});return Ve(()=>{r.dispose(),this.editor.removeOverlayWidget(n)})}}});var iyi,nyi,ile,nB,nle,rle,EFe=D(()=>{Ye();mx();er();Ad();ae();Tn();$h();Dr();gn();$x();Ng();md();Nt();We();tr();Oe();ht();iyi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nyi=function(i,e){return function(t,n){e(t,n,i)}},nB=class extends W{static{ile=this}static{this._breadcrumbsSourceFactory=Gt(ile,()=>({dispose(){},getBreadcrumbItems(e,t){return[]}}))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,n,r){super(),this._editors=e,this._diffModel=t,this._options=n,this._instantiationService=r,this._modifiedOutlineSource=fa(this,l=>{let c=this._editors.modifiedModel.read(l),u=ile._breadcrumbsSourceFactory.read(l);return!c||!u?void 0:u(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===1)return;let c=this._diffModel.get();fn(u=>{for(let d of this._editors.original.getSelections()||[])c?.ensureOriginalLineIsVisible(d.getStartPosition().lineNumber,0,u),c?.ensureOriginalLineIsVisible(d.getEndPosition().lineNumber,0,u)})})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===1)return;let c=this._diffModel.get();fn(u=>{for(let d of this._editors.modified.getSelections()||[])c?.ensureModifiedLineIsVisible(d.getStartPosition().lineNumber,0,u),c?.ensureModifiedLineIsVisible(d.getEndPosition().lineNumber,0,u)})}));let o=this._diffModel.map((l,c)=>{let u=l?.unchangedRegions.read(c)??[];return u.length===1&&u[0].modifiedLineNumber===1&&u[0].lineCount===this._editors.modifiedModel.read(c)?.getLineCount()?[]:u});this.viewZones=sh(this,(l,c)=>{let u=this._modifiedOutlineSource.read(l);if(!u)return{origViewZones:[],modViewZones:[]};let d=[],h=[],f=this._options.renderSideBySide.read(l),p=this._options.compactMode.read(l),g=o.read(l);for(let v=0;vA.getHiddenOriginalRange(_).startLineNumber-1),C=new d1(w,12);d.push(C),c.add(new nle(this._editors.original,C,A,!f))}{let w=st(this,_=>A.getHiddenModifiedRange(_).startLineNumber-1),C=new d1(w,12);h.push(C),c.add(new nle(this._editors.modified,C,A))}}else{{let w=st(this,_=>A.getHiddenOriginalRange(_).startLineNumber-1),C=new d1(w,24);d.push(C),c.add(new rle(this._editors.original,C,A,A.originalUnchangedRange,!f,u,_=>this._diffModel.get().ensureModifiedLineIsVisible(_,2,void 0),this._options))}{let w=st(this,_=>A.getHiddenModifiedRange(_).startLineNumber-1),C=new d1(w,24);h.push(C),c.add(new rle(this._editors.modified,C,A,A.modifiedUnchangedRange,!1,u,_=>this._diffModel.get().ensureModifiedLineIsVisible(_,2,void 0),this._options))}}}return{origViewZones:d,modViewZones:h}});let s={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new es(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(y("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ut.asClassName(Ee.fold),zIndex:10001};this._register(jP(this._editors.original,st(this,l=>{let c=o.read(l),u=c.map(d=>({range:d.originalUnchangedRange.toInclusiveRange(),options:s}));for(let d of c)d.shouldHideControls(l)&&u.push({range:N.fromPositions(new K(d.originalLineNumber,1)),options:a});return u}))),this._register(jP(this._editors.modified,st(this,l=>{let c=o.read(l),u=c.map(d=>({range:d.modifiedUnchangedRange.toInclusiveRange(),options:s}));for(let d of c)d.shouldHideControls(l)&&u.push({range:Yt.ofLength(d.modifiedLineNumber,1).toInclusiveRange(),options:a});return u}))),this._register(_t(l=>{let c=o.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(u=>u.getHiddenOriginalRange(l).toInclusiveRange()).filter(If)),this._editors.modified.setHiddenAreas(c.map(u=>u.getHiddenModifiedRange(l).toInclusiveRange()).filter(If))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{if(!l.event.rightButton&&l.target.position&&l.target.element?.className.includes("fold-unchanged")){let c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let d=u.unchangedRegions.get().find(h=>h.modifiedUnchangedRange.includes(c));if(!d)return;d.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{if(!l.event.rightButton&&l.target.position&&l.target.element?.className.includes("fold-unchanged")){let c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let d=u.unchangedRegions.get().find(h=>h.originalUnchangedRange.includes(c));if(!d)return;d.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};nB=ile=iyi([nyi(3,Ne)],nB);nle=class extends eN{constructor(e,t,n,r=!1){let o=pi("div.diff-hidden-lines-widget");super(e,t,o.root),this._unchangedRegion=n,this._hide=r,this._nodes=pi("div.diff-hidden-lines-compact",[pi("div.line-left",[]),pi("div.text@text",[]),pi("div.line-right",[])]),o.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(_t(s=>{if(!this._hide){let a=this._unchangedRegion.getHiddenModifiedRange(s).length,l=y("hiddenLines","{0} hidden lines",a);this._nodes.text.innerText=l}}))}},rle=class extends eN{constructor(e,t,n,r,o,s,a,l){let c=pi("div.diff-hidden-lines-widget");super(e,t,c.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=r,this._hide=o,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=pi("div.diff-hidden-lines",[pi("div.top@top",{title:y("diff.hiddenLines.top","Click or drag to show more above")}),pi("div.center@content",{style:{display:"flex"}},[pi("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[we("a",{title:y("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...Xp("$(unfold)"))]),pi("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),pi("div.bottom@bottom",{title:y("diff.bottom","Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root),this._hide?So(this._nodes.first):this._register(up(this._nodes.first,{width:Il(this._editor).layoutInfoContentLeft})),this._register(_t(d=>{let h=this._unchangedRegion.visibleLineCountTop.read(d)+this._unchangedRegion.visibleLineCountBottom.read(d)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!h),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(d)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(d)>0),this._nodes.top.classList.toggle("canMoveBottom",!h);let f=this._unchangedRegion.isDragged.read(d),p=this._editor.getDomNode();p&&(p.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(p.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(d)>0),p.classList.toggle("canMoveBottom",!h)):f==="bottom"?(p.classList.toggle("canMoveTop",!h),p.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(d)>0)):(p.classList.toggle("canMoveTop",!1),p.classList.toggle("canMoveBottom",!1)))}));let u=this._editor;this._register(re(this._nodes.top,"mousedown",d=>{if(d.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),d.preventDefault();let h=d.clientY,f=!1,p=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let g=rt(this._nodes.top),v=re(g,"mousemove",w=>{let _=w.clientY-h;f=f||Math.abs(_)>2;let E=Math.round(_/u.getOption(67)),I=Math.max(0,Math.min(p+E,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(I,void 0)}),A=re(g,"mouseup",w=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),v.dispose(),A.dispose()})})),this._register(re(this._nodes.bottom,"mousedown",d=>{if(d.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),d.preventDefault();let h=d.clientY,f=!1,p=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let g=rt(this._nodes.bottom),v=re(g,"mousemove",w=>{let _=w.clientY-h;f=f||Math.abs(_)>2;let E=Math.round(_/u.getOption(67)),I=Math.max(0,Math.min(p-E,this._unchangedRegion.getMaxVisibleLineCountBottom())),T=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(I,void 0);let L=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(L-T))}),A=re(g,"mouseup",w=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){let C=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let _=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(_-C))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),v.dispose(),A.dispose()})})),this._register(_t(d=>{let h=[];if(!this._hide){let f=n.getHiddenModifiedRange(d).length,p=y("hiddenLines","{0} hidden lines",f),g=we("span",{title:y("diff.hiddenLines.expandAll","Double click to unfold")},p);g.addEventListener("dblclick",w=>{w.button===0&&(w.preventDefault(),this._unchangedRegion.showAll(void 0))}),h.push(g);let v=this._unchangedRegion.getHiddenModifiedRange(d),A=this._modifiedOutlineSource.getBreadcrumbItems(v,d);if(A.length>0){h.push(we("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let w=0;w{this._revealModifiedHiddenLine(C.startLineNumber)}}}}So(this._nodes.others,...h)}))}}});var ryi,oyi,Mv,sN,DFe=D(()=>{Ye();Za();Xee();ae();Tn();Ng();Nt();gRe();eo();Zn();ryi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},oyi=function(i,e){return function(t,n){e(t,n,i)}},sN=class extends W{static{Mv=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=this.ONE_OVERVIEW_WIDTH*2}constructor(e,t,n,r,o,s,a){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=r,this._rootHeight=o,this._modifiedEditorLayoutInfo=s,this._themeService=a,this.width=Mv.ENTIRE_DIFF_OVERVIEW_WIDTH;let l=zi(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=st(h=>{let f=l.read(h),p=f.getColor(Yst)||(f.getColor(Gst)||kZ).transparent(2),g=f.getColor(Kst)||(f.getColor(qst)||IZ).transparent(2);return{insertColor:p,removeColor:g}}),u=xi(document.createElement("div"));u.setClassName("diffViewport"),u.setPosition("absolute");let d=pi("div.diffOverview",{style:{position:"absolute",top:"0px",width:Mv.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(Jx(d,u.domNode)),this._register(cn(d,De.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(re(d,De.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(Jx(this._rootElement,d)),this._register(ts((h,f)=>{let p=this._diffModel.read(h),g=this._editors.original.createOverviewRuler("original diffOverviewRuler");g&&(f.add(g),f.add(Jx(d,g.getDomNode())));let v=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(v&&(f.add(v),f.add(Jx(d,v.getDomNode()))),!g||!v)return;let A=bs("viewZoneChanged",this._editors.original.onDidChangeViewZones),w=bs("viewZoneChanged",this._editors.modified.onDidChangeViewZones),C=bs("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),_=bs("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(_t(E=>{A.read(E),w.read(E),C.read(E),_.read(E);let I=c.read(E),T=p?.diff.read(E)?.mappings;function L(H,B,q){let U=q._getViewModel();return U?H.filter(F=>F.length>0).map(F=>{let ne=U.coordinatesConverter.convertModelPositionToViewPosition(new K(F.startLineNumber,1)),ce=U.coordinatesConverter.convertModelPositionToViewPosition(new K(F.endLineNumberExclusive,1)),se=ce.lineNumber-ne.lineNumber;return new fH(ne.lineNumber,ce.lineNumber,se,B.toString())}):[]}let M=L((T||[]).map(H=>H.lineRangeMapping.original),I.removeColor,this._editors.original),z=L((T||[]).map(H=>H.lineRangeMapping.modified),I.insertColor,this._editors.modified);g?.setZones(M),v?.setZones(z)})),f.add(_t(E=>{let I=this._rootHeight.read(E),T=this._rootWidth.read(E),L=this._modifiedEditorLayoutInfo.read(E);if(L){let M=Mv.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Mv.ONE_OVERVIEW_WIDTH;g.setLayout({top:0,height:I,right:M+Mv.ONE_OVERVIEW_WIDTH,width:Mv.ONE_OVERVIEW_WIDTH}),v.setLayout({top:0,height:I,right:0,width:Mv.ONE_OVERVIEW_WIDTH});let z=this._editors.modifiedScrollTop.read(E),H=this._editors.modifiedScrollHeight.read(E),B=this._editors.modified.getOption(104),q=new eE(B.verticalHasArrows?B.arrowSize:0,B.verticalScrollbarSize,0,L.height,H,z);u.setTop(q.getSliderPosition()),u.setHeight(q.getSliderSize())}else u.setTop(0),u.setHeight(0);d.style.height=I+"px",d.style.left=T-Mv.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",u.setWidth(Mv.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};sN=Mv=ryi([oyi(6,Bn)],sN)});var TFe,ole,sle,vvt=D(()=>{Ye();mx();er();ae();Tn();md();We();fy();tl();Oe();TFe=[],ole=class extends W{constructor(e,t,n,r){super(),this._editors=e,this._diffModel=t,this._options=n,this._widget=r,this._selectedDiffs=st(this,o=>{let a=this._diffModel.read(o)?.diff.read(o);if(!a)return TFe;let l=this._editors.modifiedSelections.read(o);if(l.every(h=>h.isEmpty()))return TFe;let c=new gg(l.map(h=>Yt.fromRangeInclusive(h))),d=a.mappings.filter(h=>h.lineRangeMapping.innerChanges&&c.intersects(h.lineRangeMapping.modified)).map(h=>({mapping:h,rangeMappings:h.lineRangeMapping.innerChanges.filter(f=>l.some(p=>N.areIntersecting(f.modifiedRange,p)))}));return d.length===0||d.every(h=>h.rangeMappings.length===0)?TFe:d}),this._register(ts((o,s)=>{if(!this._options.shouldRenderOldRevertArrows.read(o))return;let a=this._diffModel.read(o),l=a?.diff.read(o);if(!a||!l||a.movedTextToCompare.read(o))return;let c=[],u=this._selectedDiffs.read(o),d=new Set(u.map(h=>h.mapping));if(u.length>0){let h=this._editors.modifiedSelections.read(o),f=s.add(new sle(h[h.length-1].positionLineNumber,this._widget,u.flatMap(p=>p.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}for(let h of l.mappings)if(!d.has(h)&&!h.lineRangeMapping.modified.isEmpty&&h.lineRangeMapping.innerChanges){let f=s.add(new sle(h.lineRangeMapping.modified.startLineNumber,this._widget,h.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}s.add(Ve(()=>{for(let h of c)this._editors.modified.removeGlyphMarginWidget(h)}))}))}},sle=class i extends W{static{this.counter=0}getId(){return this._id}constructor(e,t,n,r){super(),this._lineNumber=e,this._widget=t,this._diffs=n,this._revertSelection=r,this._id=`revertButton${i.counter++}`,this._domNode=pi("div.revertButton",{title:this._revertSelection?y("revertSelectedChanges","Revert Selected Changes"):y("revertChange","Revert Change")},[yy(Ee.arrowRight)]).root,this._register(re(this._domNode,De.MOUSE_DOWN,o=>{o.button!==2&&(o.stopPropagation(),o.preventDefault())})),this._register(re(this._domNode,De.MOUSE_UP,o=>{o.stopPropagation(),o.preventDefault()})),this._register(re(this._domNode,De.CLICK,o=>{this._diffs instanceof tu?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),o.stopPropagation(),o.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:Hu.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}});function Avt(i,e,t){return Hht({debugName:()=>`Configuration Key "${i}"`},n=>t.onDidChangeConfiguration(r=>{r.affectsConfiguration(i)&&n(r)}),()=>t.getValue(i)??e)}function Mg(i,e,t){let n=i.bindTo(e);return My({debugName:()=>`Set Context Key "${i.key}"`},r=>{n.set(t(r))})}var kFe=D(()=>{Tn();Hz()});var syi,yvt,ale,wvt=D(()=>{et();ae();Tn();$x();DFe();Ks();Nt();Oe();ht();Yr();syi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},yvt=function(i,e){return function(t,n){e(t,n,i)}},ale=class extends W{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,n,r,o,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._argCodeEditorWidgetOptions=r,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new G),this.modifiedScrollTop=zi(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=zi(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=Il(this.modified),this.originalObs=Il(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=zi(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=Jl({owner:this,equalsFn:K.equals},l=>this.modifiedSelections.read(l)[0]?.getPosition()??new K(1,1)),this.originalCursor=zi(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new K(1,1)),this._argCodeEditorWidgetOptions=null,this._register(yx({createEmptyChangeSummary:()=>({}),handleChange:(l,c)=>(l.didChange(n.editorOptions)&&Object.assign(c,l.change.changedOptions),!0)},(l,c)=>{n.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,c)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,c))}))}_createLeftHandSideEditor(e,t){let n=this._adjustOptionsForLeftHandSide(void 0,e),r=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t);return r.setContextValue("isInDiffLeftEditor",!0),r}_createRightHandSideEditor(e,t){let n=this._adjustOptionsForRightHandSide(void 0,e),r=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t);return r.setContextValue("isInDiffRightEditor",!0),r}_constructInnerEditor(e,t,n,r){let o=this._createInnerEditor(e,t,n,r);return this._register(o.onDidContentSizeChange(s=>{let a=this.original.getContentWidth()+this.modified.getContentWidth()+sN.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),o}_adjustOptionsForLeftHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=Qh.revealHorizontalRightPadding.defaultValue+sN.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){let t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");let t=y("diff-aria-navigation-tip"," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};ale=syi([yvt(5,Ne),yvt(6,ni)],ale)});var lle,xvt=D(()=>{et();ae();lle=class i extends W{constructor(){super(...arguments),this._id=++i.idCounter,this._onDidDispose=this._register(new G),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,r=!0){this._targetEditor.revealRange(e,t,n,r)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}});function cyi(i,e){return i.mappings.every(t=>uyi(t.lineRangeMapping)||dyi(t.lineRangeMapping)||e&&EH(t.lineRangeMapping))}function uyi(i){return i.original.length===0}function dyi(i){return i.modified.length===0}function Cvt(i,e){return{enableSplitViewResizing:It(i.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:Flt(i.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:It(i.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:It(i.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:LS(i.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:LS(i.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:It(i.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:It(i.renderIndicators,e.renderIndicators),originalEditable:It(i.originalEditable,e.originalEditable),diffCodeLens:It(i.diffCodeLens,e.diffCodeLens),renderOverviewRuler:It(i.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Xo(i.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Xo(i.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:It(i.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:It(i.experimental?.showMoves,e.experimental.showMoves),showEmptyDecorations:It(i.experimental?.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:It(i.experimental?.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:It(i.hideUnchangedRegions?.enabled??i.experimental?.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:LS(i.hideUnchangedRegions?.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:LS(i.hideUnchangedRegions?.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:LS(i.hideUnchangedRegions?.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:It(i.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:It(i.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:LS(i.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:It(i.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:It(i.renderGutterMenu,e.renderGutterMenu),compactMode:It(i.compactMode,e.compactMode)}}var ayi,lyi,cle,_vt=D(()=>{Tn();Hz();Qae();Zke();Ks();oh();ayi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lyi=function(i,e){return function(t,n){e(t,n,i)}},cle=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=Gt(this,0),this._screenReaderMode=zi(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=st(this,r=>this._options.read(r).renderSideBySide&&this._diffEditorWidth.read(r)<=this._options.read(r).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=st(this,r=>this._options.read(r).renderOverviewRuler),this.renderSideBySide=st(this,r=>this.compactMode.read(r)&&this.shouldRenderInlineViewInSmartMode.read(r)?!1:this._options.read(r).renderSideBySide&&!(this._options.read(r).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(r)&&!this._screenReaderMode.read(r))),this.readOnly=st(this,r=>this._options.read(r).readOnly),this.shouldRenderOldRevertArrows=st(this,r=>!(!this._options.read(r).renderMarginRevertIcon||!this.renderSideBySide.read(r)||this.readOnly.read(r)||this.shouldRenderGutterMenu.read(r))),this.shouldRenderGutterMenu=st(this,r=>this._options.read(r).renderGutterMenu),this.renderIndicators=st(this,r=>this._options.read(r).renderIndicators),this.enableSplitViewResizing=st(this,r=>this._options.read(r).enableSplitViewResizing),this.splitViewDefaultRatio=st(this,r=>this._options.read(r).splitViewDefaultRatio),this.ignoreTrimWhitespace=st(this,r=>this._options.read(r).ignoreTrimWhitespace),this.maxComputationTimeMs=st(this,r=>this._options.read(r).maxComputationTime),this.showMoves=st(this,r=>this._options.read(r).experimental.showMoves&&this.renderSideBySide.read(r)),this.isInEmbeddedEditor=st(this,r=>this._options.read(r).isInEmbeddedEditor),this.diffWordWrap=st(this,r=>this._options.read(r).diffWordWrap),this.originalEditable=st(this,r=>this._options.read(r).originalEditable),this.diffCodeLens=st(this,r=>this._options.read(r).diffCodeLens),this.accessibilityVerbose=st(this,r=>this._options.read(r).accessibilityVerbose),this.diffAlgorithm=st(this,r=>this._options.read(r).diffAlgorithm),this.showEmptyDecorations=st(this,r=>this._options.read(r).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=st(this,r=>this._options.read(r).onlyShowAccessibleDiffViewer),this.compactMode=st(this,r=>this._options.read(r).compactMode),this.trueInlineDiffRenderingEnabled=st(this,r=>this._options.read(r).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=st(this,r=>!this.renderSideBySide.read(r)&&this.trueInlineDiffRenderingEnabled.read(r)),this.hideUnchangedRegions=st(this,r=>this._options.read(r).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=st(this,r=>this._options.read(r).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=st(this,r=>this._options.read(r).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=st(this,r=>this._options.read(r).hideUnchangedRegions.minimumLineCount),this._model=Gt(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,r=>jht(this,o=>{let s=r?.diff.read(o);return s?cyi(s,this.trueInlineDiffRenderingEnabled.read(o)):void 0})).flatten().map(this,r=>!!r),this.inlineViewHideOriginalLineNumbers=this.compactMode;let n={...e,...Cvt(e,Kl)};this._options=Gt(this,n)}updateOptions(e){let t=Cvt(e,this._options.get()),n={...this._options.get(),...e,...t};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};cle=ayi([lyi(1,Cs)],cle)});function fyi(i){return i.mappings.map(e=>{let t=e.lineRangeMapping,n,r,o,s,a=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,r=0,a=void 0):(n=t.original.startLineNumber,r=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(o=t.modified.startLineNumber-1,s=0,a=void 0):(o=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:r,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:a?.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var hyi,kH,e0,ule=D(()=>{Ye();Jf();Lt();et();ae();Tn();$h();q0t();ii();fs();$L();wH();Z0t();cvt();yFe();Qae();gvt();EFe();AFe();DFe();vvt();Ng();XP();kFe();Nt();We();JV();vn();kE();Wt();ht();IL();Qb();wvt();xvt();_vt();bFe();hyi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kH=function(i,e){return function(t,n){e(t,n,i)}},e0=class extends lle{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,n,r,o,s,a,l){super(),this._domElement=e,this._parentContextKeyService=r,this._parentInstantiationService=o,this._accessibilitySignalService=a,this._editorProgressService=l,this.elements=pi("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[pi("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),pi("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),pi("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(Ly(this,void 0)),this._diffModel=st(this,_=>this._diffModelSrc.read(_)?.object),this.onDidChangeModel=Se.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new am([Ze,this._contextKeyService]))),this._boundarySashes=Gt(this,void 0),this._accessibleDiffViewerShouldBeVisible=Gt(this,!1),this._accessibleDiffViewerVisible=st(this,_=>this._options.onlyShowAccessibleDiffViewer.read(_)?!0:this._accessibleDiffViewerShouldBeVisible.read(_)),this._movedBlocksLinesPart=Gt(this,void 0),this._layoutInfo=st(this,_=>{let E=this._rootSizeObserver.width.read(_),I=this._rootSizeObserver.height.read(_);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=I+"px";let T=this._sash.read(_),L=this._gutter.read(_),M=L?.width.read(_)??0,z=this._overviewRulerPart.read(_)?.width??0,H,B,q,U,F;if(!!T){let ce=T.sashLeft.read(_),se=this._movedBlocksLinesPart.read(_)?.width.read(_)??0;H=0,B=ce-M-se,F=ce-M,q=ce,U=E-q-z}else{F=0;let ce=this._options.inlineViewHideOriginalLineNumbers.read(_);H=M,ce?B=0:B=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(_)),q=M+B,U=E-q-z}return this.elements.original.style.left=H+"px",this.elements.original.style.width=B+"px",this._editors.original.layout({width:B,height:I},!0),L?.layout(F),this.elements.modified.style.left=q+"px",this.elements.modified.style.width=U+"px",this._editors.modified.layout({width:U,height:I},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((_,E)=>_?.diff.read(E)),this.onDidUpdateDiff=Se.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(Ve(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new UP(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(cle,t),this._register(_t(_=>{this._options.setWidth(this._rootSizeObserver.width.read(_))})),this._contextKeyService.createKey(V.isEmbeddedDiffEditor.key,!1),this._register(Mg(V.isEmbeddedDiffEditor,this._contextKeyService,_=>this._options.isInEmbeddedEditor.read(_))),this._register(Mg(V.comparingMovedCode,this._contextKeyService,_=>!!this._diffModel.read(_)?.movedTextToCompare.read(_))),this._register(Mg(V.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,_=>this._options.couldShowInlineViewBecauseOfSize.read(_))),this._register(Mg(V.diffEditorInlineMode,this._contextKeyService,_=>!this._options.renderSideBySide.read(_))),this._register(Mg(V.hasChanges,this._contextKeyService,_=>(this._diffModel.read(_)?.diff.read(_)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(ale,this.elements.original,this.elements.modified,this._options,n,(_,E,I,T)=>this._createInnerEditor(_,E,I,T))),this._register(Mg(V.diffEditorOriginalWritable,this._contextKeyService,_=>this._options.originalEditable.read(_))),this._register(Mg(V.diffEditorModifiedWritable,this._contextKeyService,_=>!this._options.readOnly.read(_))),this._register(Mg(V.diffEditorOriginalUri,this._contextKeyService,_=>this._diffModel.read(_)?.model.original.uri.toString()??"")),this._register(Mg(V.diffEditorModifiedUri,this._contextKeyService,_=>this._diffModel.read(_)?.model.modified.uri.toString()??"")),this._overviewRulerPart=fa(this,_=>this._options.renderOverviewRuler.read(_)?this._instantiationService.createInstance(lu(sN,_),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(E=>E.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);let c={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((_,E)=>_-(this._overviewRulerPart.read(E)?.width??0))};this._sashLayout=new Yae(this._options,c),this._sash=fa(this,_=>{let E=this._options.renderSideBySide.read(_);return this.elements.root.classList.toggle("side-by-side",E),E?new $P(this.elements.root,c,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);let u=fa(this,_=>this._instantiationService.createInstance(lu(nB,_),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);fa(this,_=>this._instantiationService.createInstance(lu(qae,_),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);let d=new Set,h=new Set,f=!1,p=fa(this,_=>this._instantiationService.createInstance(lu(jae,_),rt(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||u.get().isUpdatingHiddenAreas,d,h)).recomputeInitiallyAndOnChange(this._store),g=st(this,_=>{let E=p.read(_).viewZones.read(_).orig,I=u.read(_).viewZones.read(_).origViewZones;return E.concat(I)}),v=st(this,_=>{let E=p.read(_).viewZones.read(_).mod,I=u.read(_).viewZones.read(_).modViewZones;return E.concat(I)});this._register(QP(this._editors.original,g,_=>{f=_},d));let A;this._register(QP(this._editors.modified,v,_=>{f=_,f?A=lf.capture(this._editors.modified):(A?.restore(this._editors.modified),A=void 0)},h)),this._accessibleDiffViewer=fa(this,_=>this._instantiationService.createInstance(lu(VE,_),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(E,I)=>this._accessibleDiffViewerShouldBeVisible.set(E,I),this._options.onlyShowAccessibleDiffViewer.map(E=>!E),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((E,I)=>E?.diff.read(I)?.mappings.map(T=>T.lineRangeMapping)),new Bae(this._editors))).recomputeInitiallyAndOnChange(this._store);let w=this._accessibleDiffViewerVisible.map(_=>_?"hidden":"visible");this._register(up(this.elements.modified,{visibility:w})),this._register(up(this.elements.original,{visibility:w})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._gutter=fa(this,_=>this._options.shouldRenderGutterMenu.read(_)?this._instantiationService.createInstance(lu($ae,_),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(qb(this._layoutInfo)),fa(this,_=>new(lu(WE,_))(this.elements.root,this._diffModel,this._layoutInfo.map(E=>E.originalEditor),this._layoutInfo.map(E=>E.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,_=>{this._movedBlocksLinesPart.set(_,void 0)}),this._register(Se.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,_=>this._handleCursorPositionChange(_,!0))),this._register(Se.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,_=>this._handleCursorPositionChange(_,!1)));let C=this._diffModel.map(this,(_,E)=>{if(_)return _.diff.read(E)===void 0&&!_.isDiffUpToDate.read(E)});this._register(ts((_,E)=>{if(C.read(_)===!0){let I=this._editorProgressService.show(!0,1e3);E.add(Ve(()=>I.done()))}})),this._register(ts((_,E)=>{E.add(new(lu(ole,_))(this._editors,this._diffModel,this._options,this))})),this._register(ts((_,E)=>{let I=this._diffModel.read(_);if(I)for(let T of[I.model.original,I.model.modified])E.add(T.onWillDispose(L=>{pt(new vi("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(_t(_=>{this._options.setModel(this._diffModel.read(_))}))}_createInnerEditor(e,t,n,r){return e.createInstance(zE,t,n,r)}_createDiffEditorContributions(){let e=sy.getDiffEditorContributions();for(let t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){pt(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return zx.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){let e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){let t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(Vae,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){let t=e?"model"in e?tN.create(e).createNewRef(this):tN.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){let n=this._diffModel.get();!e&&n&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&xg(t,r=>{let o=e?.object;zi.batchEventsGlobally(r,()=>{this._editors.original.setModel(o?o.model.original:null),this._editors.modified.setModel(o?o.model.modified:null)});let s=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),r),setTimeout(()=>{s?.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){let e=this._diffModel.get()?.diff.get();return e?fyi(e):null}revert(e){let t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){let t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;let n=e.map(r=>({range:r.modifiedRange,text:t.model.original.getValueInRange(r.originalRange)}));this._editors.modified.executeEdits("diffEditor",n)}_goTo(e){this._editors.modified.setPosition(new K(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){let t=this._diffModel.get()?.diff.get()?.mappings;if(!t||t.length===0)return;let n=this._editors.modified.getPosition().lineNumber,r;e==="next"?r=t.find(o=>o.lineRangeMapping.modified.startLineNumber>n)??t[0]:r=cx(t,o=>o.lineRangeMapping.modified.startLineNumber{let t=e.diff.get()?.mappings;!t||t.length===0||this._goTo(t[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){let e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){let e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,n=e?this._editors.original:this._editors.modified,r,o=t.getSelection();if(o){let s=this._diffModel.get()?.diff.get()?.mappings.map(a=>e?a.lineRangeMapping.flip():a.lineRangeMapping);if(s){let a=$Re(o.getStartPosition(),s),l=$Re(o.getEndPosition(),s);r=N.plusRange(a,l)}}return{destination:n,destinationSelection:r}}switchSide(){let{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){let e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&fn(t=>{for(let n of e)n.collapseAll(t)})}showAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&fn(t=>{for(let n of e)n.showAll(t)})}_handleCursorPositionChange(e,t){if(e?.reason===3){let n=this._diffModel.get()?.diff.get()?.mappings.find(r=>t?r.lineRangeMapping.modified.contains(e.position.lineNumber):r.lineRangeMapping.original.contains(e.position.lineNumber));n?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(Qu.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):n?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(Qu.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):n&&this._accessibilitySignalService.playSignal(Qu.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};e0=hyi([kH(3,Ze),kH(4,Ne),kH(5,ai),kH(6,ap),kH(7,$f)],e0)});function myi(i){if(!i){if(Svt)return;Svt=!0}iht(i||Xi.document.body)}function LFe(i,e,t,n,r){if(t=t||"",!n){let o=t.indexOf(` -`),s=t;return o!==-1&&(s=t.substring(0,o)),Evt(i,t,e.createByFilepathOrFirstLine(r||null,s),r)}return Evt(i,t,e.createById(n),r)}function Evt(i,e,t,n){return i.createModel(e,t,n)}var IFe,co,pyi,Svt,dle,hle,fle,Dvt=D(()=>{Yl();ae();fs();wH();_Re();KV();kL();fr();Xn();nr();Wt();bd();ht();Yr();_c();Zn();oh();Ty();Bx();Qb();Zc();Sl();UTe();Yf();ks();Ui();ule();kE();ad();Zl();px();_g();IFe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},co=function(i,e){return function(t,n){e(t,n,i)}},pyi=0,Svt=!1;dle=class extends zE{constructor(e,t,n,r,o,s,a,l,c,u,d,h,f){let p={...t};p.ariaLabel=p.ariaLabel||Vte.editorViewAccessibleLabel,super(e,p,{},n,r,o,s,c,u,d,h,f),l instanceof LE?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,myi(p.ariaContainerElement),Kht((g,v)=>n.createInstance(vy,g,v,{})),Xht(a)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let r="DYNAMIC_"+ ++pyi,o=me.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(r,e,t,o),r}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),W.None;let t=e.id,n=e.label,r=me.and(me.equals("editorId",this.getId()),me.deserialize(e.precondition)),o=e.keybindings,s=me.and(r,me.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...p)=>Promise.resolve(e.run(this,...p)),u=new te,d=this.getId()+":"+t;if(u.add(ci.registerCommand(d,c)),a){let f={command:{id:d,title:n},when:r,group:a,order:l};u.add(Zo.appendMenuItem(tt.EditorContext,f))}if(Array.isArray(o))for(let f of o)u.add(this._standaloneKeybindingService.addDynamicKeybinding(d,f,c,s));let h=new VP(d,n,n,void 0,r,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,h),u.add(Ve(()=>{this._actions.delete(t)})),u}_triggerCommand(e,t){if(this._codeEditorService instanceof nz)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};dle=IFe([co(2,Ne),co(3,ai),co(4,Oi),co(5,Ze),co(6,nh),co(7,ni),co(8,Bn),co(9,Cn),co(10,Cs),co(11,qi),co(12,Le)],dle);hle=class extends dle{constructor(e,t,n,r,o,s,a,l,c,u,d,h,f,p,g,v){let A={...t};YV(d,A,!1);let w=c.registerEditorContainer(e);typeof A.theme=="string"&&c.setTheme(A.theme),typeof A.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!A.autoDetectHighContrast);let C=A.model;delete A.model,super(e,A,n,r,o,s,a,l,c,u,h,g,v),this._configurationService=d,this._standaloneThemeService=c,this._register(w);let _;if(typeof C>"u"){let E=p.getLanguageIdByMimeType(A.language)||A.language||ps;_=LFe(f,p,A.value||"",E,void 0),this._ownsModel=!0}else _=C,this._ownsModel=!1;if(this._attachModel(_),_){let E={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(E)}}dispose(){super.dispose()}updateOptions(e){YV(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};hle=IFe([co(2,Ne),co(3,ai),co(4,Oi),co(5,Ze),co(6,nh),co(7,ni),co(8,ru),co(9,Cn),co(10,kt),co(11,Cs),co(12,an),co(13,rn),co(14,qi),co(15,Le)],hle);fle=class extends e0{constructor(e,t,n,r,o,s,a,l,c,u,d,h){let f={...t};YV(l,f,!0);let p=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},r,n,o,h,u),this._configurationService=l,this._standaloneThemeService=s,this._register(p)}dispose(){super.dispose()}updateOptions(e){YV(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(dle,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};fle=IFe([co(2,Ne),co(3,Ze),co(4,ai),co(5,ru),co(6,Cn),co(7,kt),co(8,Xs),co(9,$f),co(10,uh),co(11,ap)],fle)});var Tvt=D(()=>{});var gyi,kvt,ple,rB,NFe=D(()=>{Ye();Wne();er();ae();Tn();Gb();$x();ule();Ex();TH();fr();ht();xFe();Wt();IL();gyi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kvt=function(i,e){return function(t,n){e(t,n,i)}},ple=class{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}},rB=class extends W{constructor(e,t,n,r,o){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=n,this._instantiationService=r,this._viewModel=Gt(this,void 0),this._collapsed=st(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=Gt(this,500),this.contentHeight=st(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=Gt(this,0),this._modifiedWidth=Gt(this,0),this._originalContentWidth=Gt(this,0),this._originalWidth=Gt(this,0),this.maxScroll=st(this,l=>{let c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),u=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>u?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:u,width:this._originalWidth.read(l)}}),this._elements=pi("div.multiDiffEntry",[pi("div.header@header",[pi("div.header-content",[pi("div.collapse-button@collapseButton"),pi("div.file-path",[pi("div.title.modified.show-file-icons@primaryPath",[]),pi("div.status.deleted@status",["R"]),pi("div.title.original.show-file-icons@secondaryPath",[])]),pi("div.actions@actions")])]),pi("div.editorParent",[pi("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(e0,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=Il(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Il(this.editor.getOriginalEditor()).isFocused,this.isFocused=st(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new te),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;let s=new Mx(this._elements.collapseButton,{});this._register(_t(l=>{s.element.className="",s.icon=this._collapsed.read(l)?Ee.chevronRight:Ee.chevronDown})),this._register(s.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register(_t(l=>{this._elements.editor.style.display=this._collapsed.read(l)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{let c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{let c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{eL(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;let c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(_t(l=>{let c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(o.createScoped(this._elements.actions));let a=this._register(this._instantiationService.createChild(new am([Ze,this._contextKeyService])));this._register(a.createInstance(iB,this._elements.actions,tt.MultiDiffEditorFileToolbar,{actionRunner:this._register(new eB(()=>this._viewModel.get()?.modifiedUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>yie(a,l,c)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(r){return{...r,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){eL(r=>{this._viewModel.set(void 0,r),this.editor.setDiffModel(null,r),this._dataStore.clear()});return}let n=e.viewModel.documentDiffItem;if(eL(r=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let o=!1,s=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",o=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",s=!0),this._elements.status.classList.toggle("renamed",o),this._elements.status.classList.toggle("deleted",s),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,this._resourceLabel2?.setUri(o?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,r),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,r),this.editor.updateOptions(t(n.options??{}))}),n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{this.editor.updateOptions(t(n.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,r=>{r||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(let[r,o]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(r,o)}render(e,t,n,r){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";let o=e.length-this._headerHeight,s=Math.max(0,Math.min(r.start-e.start,o));this._elements.header.style.transform=`translateY(${s}px)`,eL(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=n,this.editor.getOriginalEditor().setScrollTop(n)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",s>0||n>0),this._elements.header.classList.toggle("collapsed",s===o)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};rB=gyi([kvt(3,Ne),kvt(4,Ze)],rB)});var mle,Ivt=D(()=>{mle=class{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{let n=[...this._unused.values()];t=n.find(r=>this._itemData.get(r).getId()===e.getId())??n[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(let e of this._used)e.dispose();for(let e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}});var byi,Lvt,gle,MFe,Nvt=D(()=>{Ye();Ag();Qt();Jf();Lt();ae();Tn();Gb();eO();Tvt();Ng();Kf();Hn();vn();Wt();ht();IL();NFe();Ivt();Oe();byi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Lvt=function(i,e){return function(t,n){e(t,n,i)}},gle=class extends W{constructor(e,t,n,r,o,s){super(),this._element=e,this._dimension=t,this._viewModel=n,this._workbenchUIElementFactory=r,this._parentContextKeyService=o,this._parentInstantiationService=s,this._scrollableElements=pi("div.scrollContent",[pi("div@content",{style:{overflow:"hidden"}}),pi("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new vg({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>vl(rt(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new Ay(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=pi("div.monaco-component.multiDiffEditor",{},[pi("div",{},[this._scrollableElement.getDomNode()]),pi("div.placeholder@placeholder",{},[pi("div",[y("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new UP(this._element,void 0)),this._objectPool=this._register(new mle(l=>{let c=this._instantiationService.createInstance(rB,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return c.setData(l),c})),this.scrollTop=zi(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=zi(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=sh(this,(l,c)=>{let u=this._viewModel.read(l);if(!u)return{items:[],getItem:p=>{throw new vi}};let d=u.items.read(l),h=new Map;return{items:d.map(p=>{let g=c.add(new MFe(p,this._objectPool,this.scrollLeft,A=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+A})})),v=this._lastDocStates?.[g.getKey()];return v&&fn(A=>{g.setViewState(v,A)}),h.set(p,g),g}),getItem:p=>h.get(p)}}),this._viewItems=this._viewItemsInfo.map(this,l=>l.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(l,c)=>l.reduce((u,d)=>u+d.contentHeight.read(c)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new am([Ze,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(V.inMultiDiffEditor.key,!0),this._register(ts((l,c)=>{let u=this._viewModel.read(l);if(u&&u.contextKeys)for(let[d,h]of Object.entries(u.contextKeys)){let f=this._contextKeyService.createKey(d,void 0);f.set(h),c.add(Ve(()=>f.reset()))}}));let a=this._parentContextKeyService.createKey(V.multiDiffEditorAllCollapsed.key,!1);this._register(_t(l=>{let c=this._viewModel.read(l);if(c){let u=c.items.read(l).every(d=>d.collapsed.read(l));a.set(u)}})),this._register(_t(l=>{let c=this._dimension.read(l);this._sizeObserver.observe(c)})),this._register(_t(l=>{let c=this._viewItems.read(l);this._elements.placeholder.classList.toggle("visible",c.length===0)})),this._scrollableElements.content.style.position="relative",this._register(_t(l=>{let c=this._sizeObserver.height.read(l);this._scrollableElements.root.style.height=`${c}px`;let u=this._totalHeight.read(l);this._scrollableElements.content.style.height=`${u}px`;let d=this._sizeObserver.width.read(l),h=d,f=this._viewItems.read(l),p=Q7(f,aa(g=>g.maxScroll.read(l).maxScroll,ud));if(p){let g=p.maxScroll.read(l);h=d+g.maxScroll}this._scrollableElement.setScrollDimensions({width:d,height:c,scrollHeight:u,scrollWidth:h})})),e.replaceChildren(this._elements.root),this._register(Ve(()=>{e.replaceChildren()})),this._register(this._register(_t(l=>{eL(c=>{this.render(l)})})))}render(e){let t=this.scrollTop.read(e),n=0,r=0,o=0,s=this._sizeObserver.height.read(e),a=Di.ofStartAndLength(t,s),l=this._sizeObserver.width.read(e);for(let c of this._viewItems.read(e)){let u=c.contentHeight.read(e),d=Math.min(u,s),h=Di.ofStartAndLength(r,d),f=Di.ofStartAndLength(o,u);if(f.isBefore(a))n-=u-d,c.hide();else if(f.isAfter(a))c.hide();else{let p=Math.max(0,Math.min(a.start-f.start,u-d));n-=p;let g=Di.ofStartAndLength(t+n,s);c.render(h,p,l,g)}r+=d+this._spaceBetweenPx,o+=u+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+n)}px)`}};gle=byi([Lvt(4,Ze),Lvt(5,Ne)],gle);MFe=class extends W{constructor(e,t,n,r){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=n,this._deltaScrollVertical=r,this._templateRef=this._register(Ly(this,void 0)),this.contentHeight=st(this,o=>this._templateRef.read(o)?.object.contentHeight?.read(o)??this.viewModel.lastTemplateData.read(o).contentHeight),this.maxScroll=st(this,o=>this._templateRef.read(o)?.object.maxScroll.read(o)??{maxScroll:0,scrollWidth:0}),this.template=st(this,o=>this._templateRef.read(o)?.object),this._isHidden=Gt(this,!1),this._isFocused=st(this,o=>this.template.read(o)?.isFocused.read(o)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(_t(o=>{let s=this._scrollLeft.read(o);this._templateRef.read(o)?.object.setScrollLeft(s)})),this._register(_t(o=>{let s=this._templateRef.read(o);!s||!this._isHidden.read(o)||s.object.isFocused.read(o)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);let n=this.viewModel.lastTemplateData.get(),r=e.selections?.map(qe.liftSelection);this.viewModel.lastTemplateData.set({...n,selections:r},t);let o=this._templateRef.get();o&&r&&o.object.editor.setSelections(r)}_updateTemplateData(e){let t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){let e=this._templateRef.get();e&&fn(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,n,r){this._isHidden.set(!1,void 0);let o=this._templateRef.get();if(!o){o=this._objectPool.getUnusedObj(new ple(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(o,void 0);let s=this.viewModel.lastTemplateData.get().selections;s&&o.object.editor.setSelections(s)}o.object.render(e,n,t,r)}}});var Q9n,G9n,q9n,Mvt=D(()=>{Oe();eo();Q9n=j("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},y("multiDiffEditor.headerBackground","The background color of the diff editor's header")),G9n=j("multiDiffEditor.background",Vh,y("multiDiffEditor.background","The background color of the multi file diff editor")),q9n=j("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},y("multiDiffEditor.border","The border color of the multi file diff editor"))});var vyi,Ayi,ble,Rvt=D(()=>{ae();Tn();XP();Nvt();ht();Mvt();NFe();vyi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ayi=function(i,e){return function(t,n){e(t,n,i)}},ble=class extends W{constructor(e,t,n){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=n,this._dimension=Gt(this,void 0),this._viewModel=Gt(this,void 0),this._widgetImpl=sh(this,(r,o)=>(lu(rB,r),o.add(this._instantiationService.createInstance(lu(gle,r),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(qb(this._widgetImpl))}};ble=vyi([Ayi(2,Ne)],ble)});function yyi(i,e,t){return ri.initialize(t||{}).createInstance(hle,i,e)}function wyi(i){return ri.get(ai).onCodeEditorAdd(t=>{i(t)})}function xyi(i){return ri.get(ai).onDiffEditorAdd(t=>{i(t)})}function Cyi(){return ri.get(ai).listCodeEditors()}function _yi(){return ri.get(ai).listDiffEditors()}function Syi(i,e,t){return ri.initialize(t||{}).createInstance(fle,i,e)}function Eyi(i,e){let t=ri.initialize(e||{});return new ble(i,{},t)}function Dyi(i){if(typeof i.id!="string"||typeof i.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return ci.registerCommand(i.id,i.run)}function Tyi(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");let e=me.deserialize(i.precondition),t=(r,...o)=>Sr.runEditorCommand(r,o,e,(s,a,l)=>Promise.resolve(i.run(a,...l))),n=new te;if(n.add(ci.registerCommand(i.id,t)),i.contextMenuGroupId){let r={command:{id:i.id,title:i.label},when:e,group:i.contextMenuGroupId,order:i.contextMenuOrder||0};n.add(Zo.appendMenuItem(tt.EditorContext,r))}if(Array.isArray(i.keybindings)){let r=ri.get(ni);if(!(r instanceof LE))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{let o=me.and(e,me.deserialize(i.keybindingContext));n.add(r.addDynamicKeybindings(i.keybindings.map(s=>({keybinding:s,command:i.id,when:o}))))}}return n}function kyi(i){return Fvt([i])}function Fvt(i){let e=ri.get(ni);return e instanceof LE?e.addDynamicKeybindings(i.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:me.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),W.None)}function Iyi(i,e,t){let n=ri.get(rn),r=n.getLanguageIdByMimeType(e)||e;return LFe(ri.get(an),n,i,r,t)}function Lyi(i,e){let t=ri.get(rn),n=t.getLanguageIdByMimeType(e)||e||ps;i.setLanguage(t.createById(n))}function Nyi(i,e,t){i&&ri.get(tf).changeOne(e,i.uri,t)}function Myi(i){ri.get(tf).changeAll(i,[])}function Ryi(i){return ri.get(tf).read(i)}function Fyi(i){return ri.get(tf).onMarkerChanged(i)}function Oyi(i){return ri.get(an).getModel(i)}function Pyi(){return ri.get(an).getModels()}function Byi(i){return ri.get(an).onModelAdded(i)}function zyi(i){return ri.get(an).onModelRemoved(i)}function Vyi(i){return ri.get(an).onModelLanguageChanged(t=>{i({model:t.model,oldLanguage:t.oldLanguageId})})}function Hyi(i){return Zgt(ri.get(an),i)}function Wyi(i,e){let t=ri.get(rn),n=ri.get(ru);return wP.colorizeElement(n,t,i,e).then(()=>{n.registerEditorContainer(i)})}function Uyi(i,e,t){let n=ri.get(rn);return ri.get(ru).registerEditorContainer(Xi.document.body),wP.colorize(n,i,e,t)}function jyi(i,e,t=4){return ri.get(ru).registerEditorContainer(Xi.document.body),wP.colorizeModelLine(i,e,t)}function Qyi(i){let e=Wn.get(i);return e||{getInitialState:()=>Sy,tokenize:(t,n,r)=>sO(i,r)}}function Gyi(i,e){Wn.getOrCreate(e);let t=Qyi(e),n=Pu(i),r=[],o=t.getInitialState();for(let s=0,a=n.length;s{if(!n)return null;let o=t.options?.selection,s;return o&&typeof o.endLineNumber=="number"&&typeof o.endColumn=="number"?s=o:o&&(s={lineNumber:o.startLineNumber,column:o.startColumn}),await i.openCodeEditor(n,t.resource,s)?n:null})}function Ovt(){return{create:yyi,getEditors:Cyi,getDiffEditors:_yi,onDidCreateEditor:wyi,onDidCreateDiffEditor:xyi,createDiffEditor:Syi,addCommand:Dyi,addEditorAction:Tyi,addKeybindingRule:kyi,addKeybindingRules:Fvt,createModel:Iyi,setModelLanguage:Lyi,setModelMarkers:Nyi,getModelMarkers:Ryi,removeAllMarkers:Myi,onDidChangeMarkers:Fyi,getModels:Pyi,getModel:Oyi,onDidCreateModel:Byi,onWillDisposeModel:zyi,onDidChangeModelLanguage:Vyi,createWebWorker:Hyi,colorizeElement:Wyi,colorize:Uyi,colorizeModelLine:jyi,tokenize:Gyi,defineTheme:qyi,setTheme:Yyi,remeasureFonts:Kyi,registerCommand:Jyi,registerLinkOpener:Xyi,registerEditorOpener:Zyi,AccessibilitySupport:_Y,ContentWidgetPositionPreference:IY,CursorChangeReason:LY,DefaultEndOfLine:NY,EditorAutoIndentStrategy:RY,EditorOption:FY,EndOfLinePreference:OY,EndOfLineSequence:PY,MinimapPosition:GY,MinimapSectionHeaderStyle:qY,MouseTargetType:YY,OverlayWidgetPositionPreference:XY,OverviewRulerLane:ZY,GlyphMarginLane:BY,RenderLineNumbersType:tK,RenderMinimap:iK,ScrollbarVisibility:rK,ScrollType:nK,TextEditorCursorBlinkingStyle:uK,TextEditorCursorStyle:dK,TrackedRangeStickiness:hK,WrappingIndent:fK,InjectedTextCursorStops:HY,PositionAffinity:eK,ShowLightbulbIconMode:sK,ConfigurationChangedEvent:TF,BareFontInfo:bI,FontInfo:vI,TextModelResolvedOptions:WS,FindMatch:uy,ApplyUpdateResult:kS,EditorZoom:hd,createMultiFileDiffEditor:Eyi,EditorType:zx,EditorOptions:Qh}}var Pvt=D(()=>{ad();ae();Pt();mn();zlt();SDe();ii();fs();$gt();Ks();NF();f$();JV();tr();Sl();Yf();aO();tl();Zc();ZT();lbt();Dvt();KV();kL();fr();Xn();Wt();Yr();Vy();vd();Rvt()});function $yi(i,e){if(!e||!Array.isArray(e))return!1;for(let t of e)if(!i(t))return!1;return!0}function vle(i,e){return typeof i=="boolean"?i:e}function Bvt(i,e){return typeof i=="string"?i:e}function e1i(i){let e={};for(let t of i)e[t]=!0;return e}function zvt(i,e=!1){e&&(i=i.map(function(n){return n.toLowerCase()}));let t=e1i(i);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function RFe(i,e,t){e=e.replace(/@@/g,"");let n=0,r;do r=!1,e=e.replace(/@(\w+)/g,function(s,a){r=!0;let l="";if(typeof i[a]=="string")l=i[a];else if(i[a]&&i[a]instanceof RegExp)l=i[a].source;else throw i[a]===void 0?Kr(i,"language definition does not contain attribute '"+a+"', used at: "+e):Kr(i,"attribute reference '"+a+"' must be a string, used at: "+e);return NE(l)?"":"(?:"+l+")"}),n++;while(r&&n<5);e=e.replace(/\x01/g,"@");let o=(i.ignoreCase?"i":"")+(i.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(nbt(i,e,c),o)),l)}return new RegExp(e,o)}function t1i(i,e,t,n){if(n<0)return i;if(n=100){n=n-100;let r=t.split(".");if(r.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw Kr(i,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw Kr(i,"the next state must be a string value in rule: "+e);{let r=t.next;if(!/^(@pop|@push|@popall)$/.test(r)&&(r[0]==="@"&&(r=r.substr(1)),r.indexOf("$")<0&&!rbt(i,a1(i,r,"",[],""))))throw Kr(i,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=r}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,i.usesEmbedded=!0),n}}else if(Array.isArray(t)){let n=[];for(let r=0,o=t.length;r=1&&c.length<=3)if(d.setRegex(n,c[0]),c.length>=3)if(typeof c[1]=="string")d.setAction(n,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){let h=c[1];h.next=c[2],d.setAction(n,h)}else throw Kr(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+s);else d.setAction(n,c[1]);else{if(!c.regex)throw Kr(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+s);c.name&&typeof c.name=="string"&&(d.name=c.name),c.matchOnlyAtStart&&(d.matchOnlyAtLineStart=vle(c.matchOnlyAtLineStart,!1)),d.setRegex(n,c.regex),d.setAction(n,c.action)}a.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Kr(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let s in e.tokenizer)if(e.tokenizer.hasOwnProperty(s)){t.start||(t.start=s);let a=e.tokenizer[s];t.tokenizer[s]=new Array,r("tokenizer."+s,t.tokenizer[s],a)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Kr(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let o=[];for(let s of e.brackets){let a=s;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Kr(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+t.tokenPostfix,open:Tv(t,a.open),close:Tv(t,a.close)});else throw Kr(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=o,t.noThrow=!0,t}var OFe,Vvt=D(()=>{bMe();OFe=class{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let n;if(typeof t=="string")n=t;else if(t instanceof RegExp)n=t.source;else throw Kr(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=n.length>0&&n[0]==="^",this.name=this.name+": "+n,this.regex=RFe(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")",!0)}setAction(e,t){this.action=FFe(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}});function n1i(i){BS.registerLanguage(i)}function r1i(){let i=[];return i=i.concat(BS.getLanguages()),i}function o1i(i){return ri.get(rn).languageIdCodec.encodeLanguageId(i)}function s1i(i,e){return ri.withServices(()=>{let n=ri.get(rn).onDidRequestRichLanguageFeatures(r=>{r===i&&(n.dispose(),e())});return n})}function a1i(i,e){return ri.withServices(()=>{let n=ri.get(rn).onDidRequestBasicLanguageFeatures(r=>{r===i&&(n.dispose(),e())});return n})}function l1i(i,e){if(!ri.get(rn).isRegisteredLanguageId(i))throw new Error(`Cannot set configuration for unknown language ${i}`);return ri.get(qi).register(i,e,100)}function c1i(i){return typeof i.getInitialState=="function"}function u1i(i){return"tokenizeEncoded"in i}function Hvt(i){return i&&typeof i.then=="function"}function d1i(i){let e=ri.get(ru);if(i){let t=[null];for(let n=1,r=i.length;n{let n=await Promise.resolve(e.create());return n?c1i(n)?Wvt(i,n):new ML(ri.get(rn),ri.get(ru),i,PFe(i,n),ri.get(kt)):null});return Wn.registerFactory(i,t)}function h1i(i,e){if(!ri.get(rn).isRegisteredLanguageId(i))throw new Error(`Cannot set tokens provider for unknown language ${i}`);return Hvt(e)?zFe(i,{create:()=>e}):Wn.register(i,Wvt(i,e))}function f1i(i,e){let t=n=>new ML(ri.get(rn),ri.get(ru),i,PFe(i,n),ri.get(kt));return Hvt(e)?zFe(i,{create:()=>e}):Wn.register(i,t(e))}function p1i(i,e){return ri.get(Le).referenceProvider.register(i,e)}function m1i(i,e){return ri.get(Le).renameProvider.register(i,e)}function g1i(i,e){return ri.get(Le).newSymbolNamesProvider.register(i,e)}function b1i(i,e){return ri.get(Le).signatureHelpProvider.register(i,e)}function v1i(i,e){return ri.get(Le).hoverProvider.register(i,{provideHover:async(n,r,o,s)=>{let a=n.getWordAtPosition(r);return Promise.resolve(e.provideHover(n,r,o,s)).then(l=>{if(l)return!l.range&&a&&(l.range=new N(r.lineNumber,a.startColumn,r.lineNumber,a.endColumn)),l.range||(l.range=new N(r.lineNumber,r.column,r.lineNumber,r.column)),l})}})}function A1i(i,e){return ri.get(Le).documentSymbolProvider.register(i,e)}function y1i(i,e){return ri.get(Le).documentHighlightProvider.register(i,e)}function w1i(i,e){return ri.get(Le).linkedEditingRangeProvider.register(i,e)}function x1i(i,e){return ri.get(Le).definitionProvider.register(i,e)}function C1i(i,e){return ri.get(Le).implementationProvider.register(i,e)}function _1i(i,e){return ri.get(Le).typeDefinitionProvider.register(i,e)}function S1i(i,e){return ri.get(Le).codeLensProvider.register(i,e)}function E1i(i,e,t){return ri.get(Le).codeActionProvider.register(i,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(r,o,s,a)=>{let c=ri.get(tf).read({resource:r.uri}).filter(u=>N.areIntersectingOrTouching(u,o));return e.provideCodeActions(r,o,{markers:c,only:s.only,trigger:s.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function D1i(i,e){return ri.get(Le).documentFormattingEditProvider.register(i,e)}function T1i(i,e){return ri.get(Le).documentRangeFormattingEditProvider.register(i,e)}function k1i(i,e){return ri.get(Le).onTypeFormattingEditProvider.register(i,e)}function I1i(i,e){return ri.get(Le).linkProvider.register(i,e)}function L1i(i,e){return ri.get(Le).completionProvider.register(i,e)}function N1i(i,e){return ri.get(Le).colorProvider.register(i,e)}function M1i(i,e){return ri.get(Le).foldingRangeProvider.register(i,e)}function R1i(i,e){return ri.get(Le).declarationProvider.register(i,e)}function F1i(i,e){return ri.get(Le).selectionRangeProvider.register(i,e)}function O1i(i,e){return ri.get(Le).documentSemanticTokensProvider.register(i,e)}function P1i(i,e){return ri.get(Le).documentRangeSemanticTokensProvider.register(i,e)}function B1i(i,e){return ri.get(Le).inlineCompletionsProvider.register(i,e)}function z1i(i,e){return ri.get(Le).inlineEditProvider.register(i,e)}function V1i(i,e){return ri.get(Le).inlayHintsProvider.register(i,e)}function Uvt(){return{register:n1i,getLanguages:r1i,onLanguage:s1i,onLanguageEncountered:a1i,getEncodedLanguageId:o1i,setLanguageConfiguration:l1i,setColorMap:d1i,registerTokensProviderFactory:zFe,setTokensProvider:h1i,setMonarchTokensProvider:f1i,registerReferenceProvider:p1i,registerRenameProvider:m1i,registerNewSymbolNameProvider:g1i,registerCompletionItemProvider:L1i,registerSignatureHelpProvider:b1i,registerHoverProvider:v1i,registerDocumentSymbolProvider:A1i,registerDocumentHighlightProvider:y1i,registerLinkedEditingRangeProvider:w1i,registerDefinitionProvider:x1i,registerImplementationProvider:C1i,registerTypeDefinitionProvider:_1i,registerCodeLensProvider:S1i,registerCodeActionProvider:E1i,registerDocumentFormattingEditProvider:D1i,registerDocumentRangeFormattingEditProvider:T1i,registerOnTypeFormattingEditProvider:k1i,registerLinkProvider:I1i,registerColorProvider:N1i,registerFoldingRangeProvider:M1i,registerDeclarationProvider:R1i,registerSelectionRangeProvider:F1i,registerDocumentSemanticTokensProvider:O1i,registerDocumentRangeSemanticTokensProvider:P1i,registerInlineCompletionsProvider:B1i,registerInlineEditProvider:z1i,registerInlayHintsProvider:V1i,DocumentHighlightKind:MY,CompletionItemKind:DY,CompletionItemTag:TY,CompletionItemInsertTextRule:EY,SymbolKind:lK,SymbolTag:cK,IndentAction:VY,CompletionTriggerKind:kY,SignatureHelpTriggerKind:aK,InlayHintKind:WY,InlineCompletionTriggerKind:UY,InlineEditTriggerKind:jY,CodeActionTriggerType:SY,NewSymbolNameTag:KY,NewSymbolNameTriggerKind:JY,PartialAcceptTriggerKind:$Y,HoverVerbosityAction:zY,FoldingRangeKind:yA,SelectedSuggestionInfo:zM}}var BFe,Ale,jvt=D(()=>{Ho();We();tr();Sl();ks();Yf();Ui();ZT();KV();Vvt();wMe();kL();nr();Vy();BFe=class{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return Ale.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){let r=this._actual.tokenizeEncoded(e,n);return new pw(r.tokens,r.endState)}},Ale=class i{constructor(e,t,n,r){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=r}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){let n=[],r=0;for(let o=0,s=e.length;o0&&o[s-1]===h)continue;let f=d.startIndex;c===0?f=0:f{ii();Wt();sn();Sp();ht();wc();Oe();VFe=vt("IEditorCancelService"),Qvt=new Pe("cancellableOperation",!1,y("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));ui(VFe,class{constructor(){this._tokens=new WeakMap}add(i,e){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(r=>{let o=Qvt.bindTo(r.get(Ze)),s=new Ro;return{key:o,tokens:s}}),this._tokens.set(i,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(i){let e=this._tokens.get(i);if(!e)return;let t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);yle=class extends Bi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(VFe).add(e,this))}dispose(){this._unregister(),super.dispose()}};Qe(new class extends Sr{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:Qvt})}runEditorCommand(i,e){i.get(VFe).cancel(e)}})});var oB,dp,aN,eC=D(()=>{Pt();We();sn();ae();Gvt();oB=class i{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){let n=e.getModel();this.modelVersionId=n?ig("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof i))return!1;let t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new i(e,this.flags))}},dp=class extends yle{constructor(e,t,n,r){super(e,r),this._listener=new te,t&4&&this._listener.add(e.onDidChangeCursorPosition(o=>{(!n||!N.containsPosition(n,o.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(o=>{(!n||!N.containsRange(n,o.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(o=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(o=>this.cancel())),this._listener.add(e.onDidChangeModelContent(o=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}},aN=class extends Bi{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}});function t0(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===zx.ICodeEditor:!1}function IH(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===zx.IDiffEditor:!1}function H1i(i){return!!i&&typeof i=="object"&&typeof i.onDidChangeActiveEditor=="function"}function wle(i){return t0(i)?i:IH(i)?i.getModifiedEditor():H1i(i)&&t0(i.activeCodeEditor)?i.activeCodeEditor:null}var sB=D(()=>{JV()});var lN,HFe=D(()=>{$p();We();$L();lN=class i{static _handleEolEdits(e,t){let n,r=[];for(let o of t)typeof o.eol=="number"&&(n=o.eol),o.range&&typeof o.text=="string"&&r.push(o);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),r}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let n=e.getModel(),r=n.validateRange(t.range);return n.getFullModelRange().equalsRange(r)}static execute(e,t,n){n&&e.pushUndoStop();let r=lf.capture(e),o=i._handleEolEdits(e,t);o.length===1&&i._isFullModelReplaceEdit(e,o[0])?e.executeEdits("formatEditsCommand",o.map(s=>Dn.replace(N.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",o.map(s=>Dn.replaceMove(N.lift(s.range),s.text))),n&&e.pushUndoStop(),r.restoreRelativeVerticalPositionOfCursor(e)}}});var xle,Cle,qvt=D(()=>{xle=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}},Cle=class{constructor(e){if(this._set=new Set,e)for(let t of e)this.add(t)}add(e){this._set.add(xle.toKey(e))}has(e){return this._set.has(xle.toKey(e))}}});function Yvt(i,e,t){let n=[],r=new Cle,o=i.ordered(t);for(let a of o)n.push(a),a.extensionId&&r.add(a.extensionId);let s=e.ordered(t);for(let a of s){if(a.extensionId){if(r.has(a.extensionId))continue;r.add(a.extensionId)}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,u){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,u)}})}return n}async function WFe(i,e,t,n,r,o,s){let a=i.get(Ne),{documentRangeFormattingEditProvider:l}=i.get(Le),c=t0(e)?e.getModel():e,u=l.ordered(c),d=await aB.select(u,c,n,2);d&&(r.report(d),await a.invokeFunction(W1i,d,e,t,o,s))}async function W1i(i,e,t,n,r,o){let s=i.get(pa),a=i.get(no),l=i.get(ap),c,u;t0(t)?(c=t.getModel(),u=new dp(t,5,void 0,r)):(c=t,u=new aN(t,r));let d=[],h=0;for(let A of _F(n).sort(N.compareRangesUsingStarts))h>0&&N.areIntersectingOrTouching(d[h-1],A)?d[h-1]=N.fromPositions(d[h-1].getStartPosition(),A.getEndPosition()):h=d.push(A);let f=async A=>{a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,A);let w=await e.provideDocumentRangeFormattingEdits(c,A,c.getFormattingOptions(),u.token)||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,w),w},p=(A,w)=>{if(!A.length||!w.length)return!1;let C=A.reduce((_,E)=>N.plusRange(_,E.range),A[0].range);if(!w.some(_=>N.intersectRanges(C,_.range)))return!1;for(let _ of A)for(let E of w)if(N.intersectRanges(_.range,E.range))return!0;return!1},g=[],v=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,d);let A=await e.provideDocumentRangesFormattingEdits(c,d,c.getFormattingOptions(),u.token)||[];a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,A),v.push(A)}else{for(let A of d){if(u.token.isCancellationRequested)return!0;v.push(await f(A))}for(let A=0;A({text:C.text,range:N.lift(C.range),forceMoveMarkers:!0})),C=>{for(let{range:_}of C)if(N.areIntersectingOrTouching(_,w))return[new qe(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn)];return null})}return l.playSignal(Qu.format,{userGesture:o}),!0}async function Kvt(i,e,t,n,r,o){let s=i.get(Ne),a=i.get(Le),l=t0(e)?e.getModel():e,c=Yvt(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),u=await aB.select(c,l,t,1);u&&(n.report(u),await s.invokeFunction(U1i,u,e,t,r,o))}async function U1i(i,e,t,n,r,o){let s=i.get(pa),a=i.get(ap),l,c;t0(t)?(l=t.getModel(),c=new dp(t,5,void 0,r)):(l=t,c=new aN(t,r));let u;try{let d=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(u=await s.computeMoreMinimalEdits(l.uri,d),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||u.length===0)return!1;if(t0(t))lN.execute(t,u,n!==2),n!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{let[{range:d}]=u,h=new qe(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);l.pushEditOperations([h],u.map(f=>({text:f.text,range:N.lift(f.range),forceMoveMarkers:!0})),f=>{for(let{range:p}of f)if(N.areIntersectingOrTouching(p,h))return[new qe(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn)];return null})}return a.playSignal(Qu.format,{userGesture:o}),!0}async function j1i(i,e,t,n,r,o){let s=e.documentRangeFormattingEditProvider.ordered(t);for(let a of s){let l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,r,o)).catch(ln);if(Jo(l))return await i.computeMoreMinimalEdits(t.uri,l)}}async function Q1i(i,e,t,n,r){let o=Yvt(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(let s of o){let a=await Promise.resolve(s.provideDocumentFormattingEdits(t,n,r)).catch(ln);if(Jo(a))return await i.computeMoreMinimalEdits(t.uri,a)}}function UFe(i,e,t,n,r,o,s){let a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(r)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,r,o,s)).catch(ln).then(l=>i.computeMoreMinimalEdits(t.uri,l))}var aB,jFe=D(()=>{Qt();sn();Lt();td();Sp();gn();mn();eC();sB();Nt();We();Hn();xv();Yp();HFe();Xn();qvt();ht();Ui();th();kE();aB=class i{static{this._selectors=new Ro}static setFormatterSelector(e){return{dispose:i._selectors.unshift(e)}}static async select(e,t,n,r){if(e.length===0)return;let o=bi.first(i._selectors);if(o)return await o(e,t,n,r)}};ci.registerCommand("_executeFormatRangeProvider",async function(i,...e){let[t,n,r]=e;yi(Xe.isUri(t)),yi(N.isIRange(n));let o=i.get(xs),s=i.get(pa),a=i.get(Le),l=await o.createModelReference(t);try{return j1i(s,a,l.object.textEditorModel,N.lift(n),r,Ft.None)}finally{l.dispose()}});ci.registerCommand("_executeFormatDocumentProvider",async function(i,...e){let[t,n]=e;yi(Xe.isUri(t));let r=i.get(xs),o=i.get(pa),s=i.get(Le),a=await r.createModelReference(t);try{return Q1i(o,s,a.object.textEditorModel,n,Ft.None)}finally{a.dispose()}});ci.registerCommand("_executeFormatOnTypeProvider",async function(i,...e){let[t,n,r,o]=e;yi(Xe.isUri(t)),yi(K.isIPosition(n)),yi(typeof r=="string");let s=i.get(xs),a=i.get(pa),l=i.get(Le),c=await s.createModelReference(t);try{return UFe(a,l,c.object.textEditorModel,K.lift(n),r,o,Ft.None)}finally{c.dispose()}})});var cN={};Ih(cN,{CancellationTokenSource:()=>Jvt,Emitter:()=>_le,KeyCode:()=>Xvt,KeyMod:()=>Zvt,MarkerSeverity:()=>nAt,MarkerTag:()=>rAt,Position:()=>$vt,Range:()=>eAt,Selection:()=>tAt,SelectionDirection:()=>iAt,Token:()=>oAt,Uri:()=>Sle,editor:()=>Rg,languages:()=>Fg});var fh,Jvt,_le,Xvt,Zvt,$vt,eAt,tAt,iAt,nAt,rAt,Sle,oAt,Rg,Fg,G1i,uN=D(()=>{Ks();X5();Pvt();jvt();jFe();Qh.wrappingIndent.defaultValue=0;Qh.glyphMargin.defaultValue=!1;Qh.autoIndent.defaultValue=3;Qh.overviewRulerLanes.defaultValue=2;aB.setFormatterSelector((i,e,t)=>Promise.resolve(i[0]));fh=pK();fh.editor=Ovt();fh.languages=Uvt();Jvt=fh.CancellationTokenSource,_le=fh.Emitter,Xvt=fh.KeyCode,Zvt=fh.KeyMod,$vt=fh.Position,eAt=fh.Range,tAt=fh.Selection,iAt=fh.SelectionDirection,nAt=fh.MarkerSeverity,rAt=fh.MarkerTag,Sle=fh.Uri,oAt=fh.Token,Rg=fh.editor,Fg=fh.languages,G1i=globalThis.MonacoEnvironment;(G1i?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=fh);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})});function cAt(i){let e=i.id;aAt[e]=i,LH.languages.register(i);let t=Z1i.getOrCreate(e);LH.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),LH.languages.onLanguageEncountered(e,async()=>{let n=await t.load();LH.languages.setLanguageConfiguration(e,n.conf)})}var q1i,Y1i,K1i,J1i,sAt,X1i,LH,aAt,QFe,Z1i,uAt=D(()=>{uN();q1i=Object.defineProperty,Y1i=Object.getOwnPropertyDescriptor,K1i=Object.getOwnPropertyNames,J1i=Object.prototype.hasOwnProperty,sAt=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of K1i(e))!J1i.call(i,r)&&r!==t&&q1i(i,r,{get:()=>e[r],enumerable:!(n=Y1i(e,r))||n.enumerable});return i},X1i=(i,e,t)=>(sAt(i,e,"default"),t&&sAt(t,e,"default")),LH={};X1i(LH,cN);aAt={},QFe={},Z1i=class lAt{static getOrCreate(e){return QFe[e]||(QFe[e]=new lAt(e)),QFe[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,n)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,aAt[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}});var dAt={};Ih(dAt,{conf:()=>$1i,language:()=>ewi});var $1i,ewi,hAt=D(()=>{$1i={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},ewi={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}});var fAt=D(()=>{uAt();cAt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Promise.resolve().then(()=>(hAt(),dAt))})});var Oyt={};Ih(Oyt,{CompletionAdapter:()=>wyt,DefinitionAdapter:()=>bwi,DiagnosticsAdapter:()=>yyt,DocumentColorAdapter:()=>Iyt,DocumentFormattingEditProvider:()=>Dyt,DocumentHighlightAdapter:()=>mwi,DocumentLinkAdapter:()=>xwi,DocumentRangeFormattingEditProvider:()=>Tyt,DocumentSymbolAdapter:()=>_yt,FoldingRangeAdapter:()=>Lyt,HoverAdapter:()=>xyt,ReferenceAdapter:()=>vwi,RenameAdapter:()=>Awi,SelectionRangeAdapter:()=>Nyt,WorkerManager:()=>Ayt,fromPosition:()=>UE,fromRange:()=>lOe,getWorker:()=>Pwi,setupMode:()=>zwi,toRange:()=>cf,toTextEdit:()=>pB});function lwi(i){switch(i){case uB.Error:return rr.MarkerSeverity.Error;case uB.Warning:return rr.MarkerSeverity.Warning;case uB.Information:return rr.MarkerSeverity.Info;case uB.Hint:return rr.MarkerSeverity.Hint;default:return rr.MarkerSeverity.Info}}function cwi(i,e){let t=typeof e.code=="number"?String(e.code):e.code;return{severity:lwi(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:t,source:e.source}}function UE(i){if(i)return{character:i.column-1,line:i.lineNumber-1}}function lOe(i){if(i)return{start:{line:i.startLineNumber-1,character:i.startColumn-1},end:{line:i.endLineNumber-1,character:i.endColumn-1}}}function cf(i){if(i)return new rr.Range(i.start.line+1,i.start.character+1,i.end.line+1,i.end.character+1)}function uwi(i){return typeof i.insert<"u"&&typeof i.replace<"u"}function dwi(i){let e=rr.languages.CompletionItemKind;switch(i){case cu.Text:return e.Text;case cu.Method:return e.Method;case cu.Function:return e.Function;case cu.Constructor:return e.Constructor;case cu.Field:return e.Field;case cu.Variable:return e.Variable;case cu.Class:return e.Class;case cu.Interface:return e.Interface;case cu.Module:return e.Module;case cu.Property:return e.Property;case cu.Unit:return e.Unit;case cu.Value:return e.Value;case cu.Enum:return e.Enum;case cu.Keyword:return e.Keyword;case cu.Snippet:return e.Snippet;case cu.Color:return e.Color;case cu.File:return e.File;case cu.Reference:return e.Reference}return e.Property}function pB(i){if(i)return{range:cf(i.range),text:i.newText}}function hwi(i){return i&&i.command==="editor.action.triggerSuggest"?{id:i.command,title:i.title,arguments:i.arguments}:void 0}function fwi(i){return i&&typeof i=="object"&&typeof i.kind=="string"}function uyt(i){return typeof i=="string"?{value:i}:fwi(i)?i.kind==="plaintext"?{value:i.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:i.value}:{value:"```"+i.language+` -`+i.value+"\n```\n"}}function pwi(i){if(i)return Array.isArray(i)?i.map(uyt):[uyt(i)]}function gwi(i){switch(i){case FH.Read:return rr.languages.DocumentHighlightKind.Read;case FH.Write:return rr.languages.DocumentHighlightKind.Write;case FH.Text:return rr.languages.DocumentHighlightKind.Text}return rr.languages.DocumentHighlightKind.Text}function Cyt(i){return{uri:rr.Uri.parse(i.uri),range:cf(i.range)}}function ywi(i){if(!i||!i.changes)return;let e=[];for(let t in i.changes){let n=rr.Uri.parse(t);for(let r of i.changes[t])e.push({resource:n,versionId:void 0,textEdit:{range:cf(r.range),text:r.newText}})}return{edits:e}}function wwi(i){return"children"in i}function Syt(i){return{name:i.name,detail:i.detail??"",kind:Eyt(i.kind),range:cf(i.range),selectionRange:cf(i.selectionRange),tags:i.tags??[],children:(i.children??[]).map(e=>Syt(e))}}function Eyt(i){let e=rr.languages.SymbolKind;switch(i){case uu.File:return e.File;case uu.Module:return e.Module;case uu.Namespace:return e.Namespace;case uu.Package:return e.Package;case uu.Class:return e.Class;case uu.Method:return e.Method;case uu.Property:return e.Property;case uu.Field:return e.Field;case uu.Constructor:return e.Constructor;case uu.Enum:return e.Enum;case uu.Interface:return e.Interface;case uu.Function:return e.Function;case uu.Variable:return e.Variable;case uu.Constant:return e.Constant;case uu.String:return e.String;case uu.Number:return e.Number;case uu.Boolean:return e.Boolean;case uu.Array:return e.Array}return e.Function}function kyt(i){return{tabSize:i.tabSize,insertSpaces:i.insertSpaces}}function Cwi(i){switch(i){case RH.Comment:return rr.languages.FoldingRangeKind.Comment;case RH.Imports:return rr.languages.FoldingRangeKind.Imports;case RH.Region:return rr.languages.FoldingRangeKind.Region}}function _wi(i,e=!1){let t=i.length,n=0,r="",o=0,s=16,a=0,l=0,c=0,u=0,d=0;function h(C,_){let E=0,I=0;for(;E=48&&T<=57)I=I*16+T-48;else if(T>=65&&T<=70)I=I*16+T-65+10;else if(T>=97&&T<=102)I=I*16+T-97+10;else break;n++,E++}return E=t){C+=i.substring(_,n),d=2;break}let E=i.charCodeAt(n);if(E===34){C+=i.substring(_,n),n++;break}if(E===92){if(C+=i.substring(_,n),n++,n>=t){d=2;break}switch(i.charCodeAt(n++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=` -`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:let T=h(4,!0);T>=0?C+=String.fromCharCode(T):d=4;break;default:d=5}_=n;continue}if(E>=0&&E<=31)if(NH(E)){C+=i.substring(_,n),d=2;break}else d=6;n++}return C}function v(){if(r="",d=0,o=n,l=a,u=c,n>=t)return o=t,s=17;let C=i.charCodeAt(n);if(GFe(C)){do n++,r+=String.fromCharCode(C),C=i.charCodeAt(n);while(GFe(C));return s=15}if(NH(C))return n++,r+=String.fromCharCode(C),C===13&&i.charCodeAt(n)===10&&(n++,r+=` -`),a++,c=n,s=14;switch(C){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,r=g(),s=10;case 47:let _=n-1;if(i.charCodeAt(n+1)===47){for(n+=2;n=12&&C<=15);return C}return{setPosition:f,getPosition:()=>n,scan:e?w:v,getToken:()=>s,getTokenValue:()=>r,getTokenOffset:()=>o,getTokenLength:()=>n-o,getTokenStartLine:()=>l,getTokenStartCharacter:()=>o-u,getTokenError:()=>d}}function GFe(i){return i===32||i===9}function NH(i){return i===10||i===13}function lB(i){return i>=48&&i<=57}function Ewi(i){return{getInitialState:()=>new Ryt(null,null,!1,null),tokenize:(e,t)=>Owi(i,e,t)}}function Owi(i,e,t,n=0){let r=0,o=!1;switch(t.scanError){case 2:e='"'+e,r=1;break;case 1:e="/*"+e,r=2;break}let s=Swi(e),a=t.lastWasColon,l=t.parents,c={tokens:[],endState:t.clone()};for(;;){let u=n+s.getPosition(),d="",h=s.scan();if(h===17)break;if(u===n+s.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+e.substr(s.getPosition(),3));switch(o&&(u-=r),o=r>0,h){case 1:l=MH.push(l,0),d=gyt,a=!1;break;case 2:l=MH.pop(l),d=gyt,a=!1;break;case 3:l=MH.push(l,1),d=byt,a=!1;break;case 4:l=MH.pop(l),d=byt,a=!1;break;case 6:d=Dwi,a=!0;break;case 5:d=Twi,a=!1;break;case 8:case 9:d=kwi,a=!1;break;case 7:d=Iwi,a=!1;break;case 10:let p=(l?l.type:0)===1;d=a||p?Lwi:Mwi,a=!1;break;case 11:d=Nwi,a=!1;break}if(i)switch(h){case 12:d=Fwi;break;case 13:d=Rwi;break}c.endState=new Ryt(t.getStateData(),s.getTokenError(),a,l),c.tokens.push({startIndex:u,scopes:d})}return c}function Pwi(){return new Promise((i,e)=>{if(!i0)return e("JSON not registered!");i(i0)})}function zwi(i){let e=[],t=[],n=new Ayt(i);e.push(n),i0=(...s)=>n.getLanguageServiceWorker(...s);function r(){let{languageId:s,modeConfiguration:a}=i;Fyt(t),a.documentFormattingEdits&&t.push(rr.languages.registerDocumentFormattingEditProvider(s,new Dyt(i0))),a.documentRangeFormattingEdits&&t.push(rr.languages.registerDocumentRangeFormattingEditProvider(s,new Tyt(i0))),a.completionItems&&t.push(rr.languages.registerCompletionItemProvider(s,new wyt(i0,[" ",":",'"']))),a.hovers&&t.push(rr.languages.registerHoverProvider(s,new xyt(i0))),a.documentSymbols&&t.push(rr.languages.registerDocumentSymbolProvider(s,new _yt(i0))),a.tokens&&t.push(rr.languages.setTokensProvider(s,Ewi(!0))),a.colors&&t.push(rr.languages.registerColorProvider(s,new Iyt(i0))),a.foldingRanges&&t.push(rr.languages.registerFoldingRangeProvider(s,new Lyt(i0))),a.diagnostics&&t.push(new Bwi(s,i0,i)),a.selectionRanges&&t.push(rr.languages.registerSelectionRangeProvider(s,new Nyt(i0)))}r(),e.push(rr.languages.setLanguageConfiguration(i.languageId,Vwi));let o=i.modeConfiguration;return i.onDidChange(s=>{s.modeConfiguration!==o&&(o=s.modeConfiguration,r())}),e.push(vyt(t)),vyt(e)}function vyt(i){return{dispose:()=>Fyt(i)}}function Fyt(i){for(;i.length;)i.pop().dispose()}var twi,iwi,nwi,rwi,pAt,owi,rr,swi,Ayt,mAt,qFe,gAt,Ele,Rv,Dc,Dle,bAt,YFe,vAt,AAt,RH,yAt,KFe,uB,wAt,xAt,Tle,dB,hB,JFe,fB,CAt,XFe,ZFe,$Fe,eOe,tOe,_At,SAt,iOe,EAt,nOe,OH,cu,rOe,DAt,TAt,kAt,IAt,LAt,NAt,kle,MAt,RAt,FAt,FH,OAt,uu,PAt,BAt,zAt,VAt,HAt,Ile,WAt,UAt,jAt,QAt,GAt,qAt,YAt,KAt,JAt,XAt,ZAt,$At,eyt,oOe,sOe,tyt,iyt,nyt,ryt,oyt,syt,ayt,lyt,cyt,awi,He,yyt,wyt,xyt,mwi,bwi,vwi,Awi,_yt,xwi,Dyt,Tyt,Iyt,Lyt,Nyt,dyt,jzn,cB,Qzn,hyt,Swi,fyt,pyt,myt,gyt,byt,Dwi,Twi,kwi,Iwi,Lwi,Nwi,Mwi,Rwi,Fwi,MH,Ryt,i0,Bwi,Vwi,Pyt=D(()=>{uN();twi=Object.defineProperty,iwi=Object.getOwnPropertyDescriptor,nwi=Object.getOwnPropertyNames,rwi=Object.prototype.hasOwnProperty,pAt=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nwi(e))!rwi.call(i,r)&&r!==t&&twi(i,r,{get:()=>e[r],enumerable:!(n=iwi(e,r))||n.enumerable});return i},owi=(i,e,t)=>(pAt(i,e,"default"),t&&pAt(t,e,"default")),rr={};owi(rr,cN);swi=120*1e3,Ayt=class{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>swi&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=rr.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let e;return this._getClient().then(t=>{e=t}).then(t=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(t=>e)}};(function(i){function e(t){return typeof t=="string"}i.is=e})(mAt||(mAt={}));(function(i){function e(t){return typeof t=="string"}i.is=e})(qFe||(qFe={}));(function(i){i.MIN_VALUE=-2147483648,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(gAt||(gAt={}));(function(i){i.MIN_VALUE=0,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(Ele||(Ele={}));(function(i){function e(n,r){return n===Number.MAX_VALUE&&(n=Ele.MAX_VALUE),r===Number.MAX_VALUE&&(r=Ele.MAX_VALUE),{line:n,character:r}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&He.uinteger(r.line)&&He.uinteger(r.character)}i.is=t})(Rv||(Rv={}));(function(i){function e(n,r,o,s){if(He.uinteger(n)&&He.uinteger(r)&&He.uinteger(o)&&He.uinteger(s))return{start:Rv.create(n,r),end:Rv.create(o,s)};if(Rv.is(n)&&Rv.is(r))return{start:n,end:r};throw new Error(`Range#create called with invalid arguments[${n}, ${r}, ${o}, ${s}]`)}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&Rv.is(r.start)&&Rv.is(r.end)}i.is=t})(Dc||(Dc={}));(function(i){function e(n,r){return{uri:n,range:r}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&Dc.is(r.range)&&(He.string(r.uri)||He.undefined(r.uri))}i.is=t})(Dle||(Dle={}));(function(i){function e(n,r,o,s){return{targetUri:n,targetRange:r,targetSelectionRange:o,originSelectionRange:s}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&Dc.is(r.targetRange)&&He.string(r.targetUri)&&Dc.is(r.targetSelectionRange)&&(Dc.is(r.originSelectionRange)||He.undefined(r.originSelectionRange))}i.is=t})(bAt||(bAt={}));(function(i){function e(n,r,o,s){return{red:n,green:r,blue:o,alpha:s}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&He.numberRange(r.red,0,1)&&He.numberRange(r.green,0,1)&&He.numberRange(r.blue,0,1)&&He.numberRange(r.alpha,0,1)}i.is=t})(YFe||(YFe={}));(function(i){function e(n,r){return{range:n,color:r}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&Dc.is(r.range)&&YFe.is(r.color)}i.is=t})(vAt||(vAt={}));(function(i){function e(n,r,o){return{label:n,textEdit:r,additionalTextEdits:o}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&He.string(r.label)&&(He.undefined(r.textEdit)||hB.is(r))&&(He.undefined(r.additionalTextEdits)||He.typedArray(r.additionalTextEdits,hB.is))}i.is=t})(AAt||(AAt={}));(function(i){i.Comment="comment",i.Imports="imports",i.Region="region"})(RH||(RH={}));(function(i){function e(n,r,o,s,a,l){let c={startLine:n,endLine:r};return He.defined(o)&&(c.startCharacter=o),He.defined(s)&&(c.endCharacter=s),He.defined(a)&&(c.kind=a),He.defined(l)&&(c.collapsedText=l),c}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&He.uinteger(r.startLine)&&He.uinteger(r.startLine)&&(He.undefined(r.startCharacter)||He.uinteger(r.startCharacter))&&(He.undefined(r.endCharacter)||He.uinteger(r.endCharacter))&&(He.undefined(r.kind)||He.string(r.kind))}i.is=t})(yAt||(yAt={}));(function(i){function e(n,r){return{location:n,message:r}}i.create=e;function t(n){let r=n;return He.defined(r)&&Dle.is(r.location)&&He.string(r.message)}i.is=t})(KFe||(KFe={}));(function(i){i.Error=1,i.Warning=2,i.Information=3,i.Hint=4})(uB||(uB={}));(function(i){i.Unnecessary=1,i.Deprecated=2})(wAt||(wAt={}));(function(i){function e(t){let n=t;return He.objectLiteral(n)&&He.string(n.href)}i.is=e})(xAt||(xAt={}));(function(i){function e(n,r,o,s,a,l){let c={range:n,message:r};return He.defined(o)&&(c.severity=o),He.defined(s)&&(c.code=s),He.defined(a)&&(c.source=a),He.defined(l)&&(c.relatedInformation=l),c}i.create=e;function t(n){var r;let o=n;return He.defined(o)&&Dc.is(o.range)&&He.string(o.message)&&(He.number(o.severity)||He.undefined(o.severity))&&(He.integer(o.code)||He.string(o.code)||He.undefined(o.code))&&(He.undefined(o.codeDescription)||He.string((r=o.codeDescription)===null||r===void 0?void 0:r.href))&&(He.string(o.source)||He.undefined(o.source))&&(He.undefined(o.relatedInformation)||He.typedArray(o.relatedInformation,KFe.is))}i.is=t})(Tle||(Tle={}));(function(i){function e(n,r,...o){let s={title:n,command:r};return He.defined(o)&&o.length>0&&(s.arguments=o),s}i.create=e;function t(n){let r=n;return He.defined(r)&&He.string(r.title)&&He.string(r.command)}i.is=t})(dB||(dB={}));(function(i){function e(o,s){return{range:o,newText:s}}i.replace=e;function t(o,s){return{range:{start:o,end:o},newText:s}}i.insert=t;function n(o){return{range:o,newText:""}}i.del=n;function r(o){let s=o;return He.objectLiteral(s)&&He.string(s.newText)&&Dc.is(s.range)}i.is=r})(hB||(hB={}));(function(i){function e(n,r,o){let s={label:n};return r!==void 0&&(s.needsConfirmation=r),o!==void 0&&(s.description=o),s}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&He.string(r.label)&&(He.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(He.string(r.description)||r.description===void 0)}i.is=t})(JFe||(JFe={}));(function(i){function e(t){let n=t;return He.string(n)}i.is=e})(fB||(fB={}));(function(i){function e(o,s,a){return{range:o,newText:s,annotationId:a}}i.replace=e;function t(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}i.insert=t;function n(o,s){return{range:o,newText:"",annotationId:s}}i.del=n;function r(o){let s=o;return hB.is(s)&&(JFe.is(s.annotationId)||fB.is(s.annotationId))}i.is=r})(CAt||(CAt={}));(function(i){function e(n,r){return{textDocument:n,edits:r}}i.create=e;function t(n){let r=n;return He.defined(r)&&iOe.is(r.textDocument)&&Array.isArray(r.edits)}i.is=t})(XFe||(XFe={}));(function(i){function e(n,r,o){let s={kind:"create",uri:n};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}i.create=e;function t(n){let r=n;return r&&r.kind==="create"&&He.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||He.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||He.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||fB.is(r.annotationId))}i.is=t})(ZFe||(ZFe={}));(function(i){function e(n,r,o,s){let a={kind:"rename",oldUri:n,newUri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}i.create=e;function t(n){let r=n;return r&&r.kind==="rename"&&He.string(r.oldUri)&&He.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||He.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||He.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||fB.is(r.annotationId))}i.is=t})($Fe||($Fe={}));(function(i){function e(n,r,o){let s={kind:"delete",uri:n};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}i.create=e;function t(n){let r=n;return r&&r.kind==="delete"&&He.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||He.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||He.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||fB.is(r.annotationId))}i.is=t})(eOe||(eOe={}));(function(i){function e(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(r=>He.string(r.kind)?ZFe.is(r)||$Fe.is(r)||eOe.is(r):XFe.is(r)))}i.is=e})(tOe||(tOe={}));(function(i){function e(n){return{uri:n}}i.create=e;function t(n){let r=n;return He.defined(r)&&He.string(r.uri)}i.is=t})(_At||(_At={}));(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return He.defined(r)&&He.string(r.uri)&&He.integer(r.version)}i.is=t})(SAt||(SAt={}));(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return He.defined(r)&&He.string(r.uri)&&(r.version===null||He.integer(r.version))}i.is=t})(iOe||(iOe={}));(function(i){function e(n,r,o,s){return{uri:n,languageId:r,version:o,text:s}}i.create=e;function t(n){let r=n;return He.defined(r)&&He.string(r.uri)&&He.string(r.languageId)&&He.integer(r.version)&&He.string(r.text)}i.is=t})(EAt||(EAt={}));(function(i){i.PlainText="plaintext",i.Markdown="markdown";function e(t){let n=t;return n===i.PlainText||n===i.Markdown}i.is=e})(nOe||(nOe={}));(function(i){function e(t){let n=t;return He.objectLiteral(t)&&nOe.is(n.kind)&&He.string(n.value)}i.is=e})(OH||(OH={}));(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(cu||(cu={}));(function(i){i.PlainText=1,i.Snippet=2})(rOe||(rOe={}));(function(i){i.Deprecated=1})(DAt||(DAt={}));(function(i){function e(n,r,o){return{newText:n,insert:r,replace:o}}i.create=e;function t(n){let r=n;return r&&He.string(r.newText)&&Dc.is(r.insert)&&Dc.is(r.replace)}i.is=t})(TAt||(TAt={}));(function(i){i.asIs=1,i.adjustIndentation=2})(kAt||(kAt={}));(function(i){function e(t){let n=t;return n&&(He.string(n.detail)||n.detail===void 0)&&(He.string(n.description)||n.description===void 0)}i.is=e})(IAt||(IAt={}));(function(i){function e(t){return{label:t}}i.create=e})(LAt||(LAt={}));(function(i){function e(t,n){return{items:t||[],isIncomplete:!!n}}i.create=e})(NAt||(NAt={}));(function(i){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i.fromPlainText=e;function t(n){let r=n;return He.string(r)||He.objectLiteral(r)&&He.string(r.language)&&He.string(r.value)}i.is=t})(kle||(kle={}));(function(i){function e(t){let n=t;return!!n&&He.objectLiteral(n)&&(OH.is(n.contents)||kle.is(n.contents)||He.typedArray(n.contents,kle.is))&&(t.range===void 0||Dc.is(t.range))}i.is=e})(MAt||(MAt={}));(function(i){function e(t,n){return n?{label:t,documentation:n}:{label:t}}i.create=e})(RAt||(RAt={}));(function(i){function e(t,n,...r){let o={label:t};return He.defined(n)&&(o.documentation=n),He.defined(r)?o.parameters=r:o.parameters=[],o}i.create=e})(FAt||(FAt={}));(function(i){i.Text=1,i.Read=2,i.Write=3})(FH||(FH={}));(function(i){function e(t,n){let r={range:t};return He.number(n)&&(r.kind=n),r}i.create=e})(OAt||(OAt={}));(function(i){i.File=1,i.Module=2,i.Namespace=3,i.Package=4,i.Class=5,i.Method=6,i.Property=7,i.Field=8,i.Constructor=9,i.Enum=10,i.Interface=11,i.Function=12,i.Variable=13,i.Constant=14,i.String=15,i.Number=16,i.Boolean=17,i.Array=18,i.Object=19,i.Key=20,i.Null=21,i.EnumMember=22,i.Struct=23,i.Event=24,i.Operator=25,i.TypeParameter=26})(uu||(uu={}));(function(i){i.Deprecated=1})(PAt||(PAt={}));(function(i){function e(t,n,r,o,s){let a={name:t,kind:n,location:{uri:o,range:r}};return s&&(a.containerName=s),a}i.create=e})(BAt||(BAt={}));(function(i){function e(t,n,r,o){return o!==void 0?{name:t,kind:n,location:{uri:r,range:o}}:{name:t,kind:n,location:{uri:r}}}i.create=e})(zAt||(zAt={}));(function(i){function e(n,r,o,s,a,l){let c={name:n,detail:r,kind:o,range:s,selectionRange:a};return l!==void 0&&(c.children=l),c}i.create=e;function t(n){let r=n;return r&&He.string(r.name)&&He.number(r.kind)&&Dc.is(r.range)&&Dc.is(r.selectionRange)&&(r.detail===void 0||He.string(r.detail))&&(r.deprecated===void 0||He.boolean(r.deprecated))&&(r.children===void 0||Array.isArray(r.children))&&(r.tags===void 0||Array.isArray(r.tags))}i.is=t})(VAt||(VAt={}));(function(i){i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll"})(HAt||(HAt={}));(function(i){i.Invoked=1,i.Automatic=2})(Ile||(Ile={}));(function(i){function e(n,r,o){let s={diagnostics:n};return r!=null&&(s.only=r),o!=null&&(s.triggerKind=o),s}i.create=e;function t(n){let r=n;return He.defined(r)&&He.typedArray(r.diagnostics,Tle.is)&&(r.only===void 0||He.typedArray(r.only,He.string))&&(r.triggerKind===void 0||r.triggerKind===Ile.Invoked||r.triggerKind===Ile.Automatic)}i.is=t})(WAt||(WAt={}));(function(i){function e(n,r,o){let s={title:n},a=!0;return typeof r=="string"?(a=!1,s.kind=r):dB.is(r)?s.command=r:s.edit=r,a&&o!==void 0&&(s.kind=o),s}i.create=e;function t(n){let r=n;return r&&He.string(r.title)&&(r.diagnostics===void 0||He.typedArray(r.diagnostics,Tle.is))&&(r.kind===void 0||He.string(r.kind))&&(r.edit!==void 0||r.command!==void 0)&&(r.command===void 0||dB.is(r.command))&&(r.isPreferred===void 0||He.boolean(r.isPreferred))&&(r.edit===void 0||tOe.is(r.edit))}i.is=t})(UAt||(UAt={}));(function(i){function e(n,r){let o={range:n};return He.defined(r)&&(o.data=r),o}i.create=e;function t(n){let r=n;return He.defined(r)&&Dc.is(r.range)&&(He.undefined(r.command)||dB.is(r.command))}i.is=t})(jAt||(jAt={}));(function(i){function e(n,r){return{tabSize:n,insertSpaces:r}}i.create=e;function t(n){let r=n;return He.defined(r)&&He.uinteger(r.tabSize)&&He.boolean(r.insertSpaces)}i.is=t})(QAt||(QAt={}));(function(i){function e(n,r,o){return{range:n,target:r,data:o}}i.create=e;function t(n){let r=n;return He.defined(r)&&Dc.is(r.range)&&(He.undefined(r.target)||He.string(r.target))}i.is=t})(GAt||(GAt={}));(function(i){function e(n,r){return{range:n,parent:r}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&Dc.is(r.range)&&(r.parent===void 0||i.is(r.parent))}i.is=t})(qAt||(qAt={}));(function(i){i.namespace="namespace",i.type="type",i.class="class",i.enum="enum",i.interface="interface",i.struct="struct",i.typeParameter="typeParameter",i.parameter="parameter",i.variable="variable",i.property="property",i.enumMember="enumMember",i.event="event",i.function="function",i.method="method",i.macro="macro",i.keyword="keyword",i.modifier="modifier",i.comment="comment",i.string="string",i.number="number",i.regexp="regexp",i.operator="operator",i.decorator="decorator"})(YAt||(YAt={}));(function(i){i.declaration="declaration",i.definition="definition",i.readonly="readonly",i.static="static",i.deprecated="deprecated",i.abstract="abstract",i.async="async",i.modification="modification",i.documentation="documentation",i.defaultLibrary="defaultLibrary"})(KAt||(KAt={}));(function(i){function e(t){let n=t;return He.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i.is=e})(JAt||(JAt={}));(function(i){function e(n,r){return{range:n,text:r}}i.create=e;function t(n){let r=n;return r!=null&&Dc.is(r.range)&&He.string(r.text)}i.is=t})(XAt||(XAt={}));(function(i){function e(n,r,o){return{range:n,variableName:r,caseSensitiveLookup:o}}i.create=e;function t(n){let r=n;return r!=null&&Dc.is(r.range)&&He.boolean(r.caseSensitiveLookup)&&(He.string(r.variableName)||r.variableName===void 0)}i.is=t})(ZAt||(ZAt={}));(function(i){function e(n,r){return{range:n,expression:r}}i.create=e;function t(n){let r=n;return r!=null&&Dc.is(r.range)&&(He.string(r.expression)||r.expression===void 0)}i.is=t})($At||($At={}));(function(i){function e(n,r){return{frameId:n,stoppedLocation:r}}i.create=e;function t(n){let r=n;return He.defined(r)&&Dc.is(n.stoppedLocation)}i.is=t})(eyt||(eyt={}));(function(i){i.Type=1,i.Parameter=2;function e(t){return t===1||t===2}i.is=e})(oOe||(oOe={}));(function(i){function e(n){return{value:n}}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&(r.tooltip===void 0||He.string(r.tooltip)||OH.is(r.tooltip))&&(r.location===void 0||Dle.is(r.location))&&(r.command===void 0||dB.is(r.command))}i.is=t})(sOe||(sOe={}));(function(i){function e(n,r,o){let s={position:n,label:r};return o!==void 0&&(s.kind=o),s}i.create=e;function t(n){let r=n;return He.objectLiteral(r)&&Rv.is(r.position)&&(He.string(r.label)||He.typedArray(r.label,sOe.is))&&(r.kind===void 0||oOe.is(r.kind))&&r.textEdits===void 0||He.typedArray(r.textEdits,hB.is)&&(r.tooltip===void 0||He.string(r.tooltip)||OH.is(r.tooltip))&&(r.paddingLeft===void 0||He.boolean(r.paddingLeft))&&(r.paddingRight===void 0||He.boolean(r.paddingRight))}i.is=t})(tyt||(tyt={}));(function(i){function e(t){return{kind:"snippet",value:t}}i.createSnippet=e})(iyt||(iyt={}));(function(i){function e(t,n,r,o){return{insertText:t,filterText:n,range:r,command:o}}i.create=e})(nyt||(nyt={}));(function(i){function e(t){return{items:t}}i.create=e})(ryt||(ryt={}));(function(i){i.Invoked=0,i.Automatic=1})(oyt||(oyt={}));(function(i){function e(t,n){return{range:t,text:n}}i.create=e})(syt||(syt={}));(function(i){function e(t,n){return{triggerKind:t,selectedCompletionInfo:n}}i.create=e})(ayt||(ayt={}));(function(i){function e(t){let n=t;return He.objectLiteral(n)&&qFe.is(n.uri)&&He.string(n.name)}i.is=e})(lyt||(lyt={}));(function(i){function e(o,s,a,l){return new awi(o,s,a,l)}i.create=e;function t(o){let s=o;return!!(He.defined(s)&&He.string(s.uri)&&(He.undefined(s.languageId)||He.string(s.languageId))&&He.uinteger(s.lineCount)&&He.func(s.getText)&&He.func(s.positionAt)&&He.func(s.offsetAt))}i.is=t;function n(o,s){let a=o.getText(),l=r(s,(u,d)=>{let h=u.range.start.line-d.range.start.line;return h===0?u.range.start.character-d.range.start.character:h}),c=a.length;for(let u=l.length-1;u>=0;u--){let d=l[u],h=o.offsetAt(d.range.start),f=o.offsetAt(d.range.end);if(f<=c)a=a.substring(0,h)+d.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}i.applyEdits=n;function r(o,s){if(o.length<=1)return o;let a=o.length/2|0,l=o.slice(0,a),c=o.slice(a);r(l,s),r(c,s);let u=0,d=0,h=0;for(;u0&&i.push(e.length),this._lineOffsets=i}return this._lineOffsets}positionAt(i){i=Math.max(Math.min(i,this._content.length),0);let e=this.getLineOffsets(),t=0,n=e.length;if(n===0)return Rv.create(0,i);for(;ti?n=o:t=o+1}let r=t-1;return Rv.create(r,i-e[r])}offsetAt(i){let e=this.getLineOffsets();if(i.line>=e.length)return this._content.length;if(i.line<0)return 0;let t=e[i.line],n=i.line+1"u"}i.undefined=n;function r(f){return f===!0||f===!1}i.boolean=r;function o(f){return e.call(f)==="[object String]"}i.string=o;function s(f){return e.call(f)==="[object Number]"}i.number=s;function a(f,p,g){return e.call(f)==="[object Number]"&&p<=f&&f<=g}i.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}i.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}i.uinteger=c;function u(f){return e.call(f)==="[object Function]"}i.func=u;function d(f){return f!==null&&typeof f=="object"}i.objectLiteral=d;function h(f,p){return Array.isArray(f)&&f.every(p)}i.typedArray=h})(He||(He={}));yyt=class{constructor(i,e,t){this._languageId=i,this._worker=e,this._disposables=[],this._listener=Object.create(null);let n=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let a;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(a),a=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},r=o=>{rr.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),a=this._listener[s];a&&(a.dispose(),delete this._listener[s])};this._disposables.push(rr.editor.onDidCreateModel(n)),this._disposables.push(rr.editor.onWillDisposeModel(r)),this._disposables.push(rr.editor.onDidChangeModelLanguage(o=>{r(o.model),n(o.model)})),this._disposables.push(t(o=>{rr.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(r(s),n(s))})})),this._disposables.push({dispose:()=>{rr.editor.getModels().forEach(r);for(let o in this._listener)this._listener[o].dispose()}}),rr.editor.getModels().forEach(n)}dispose(){this._disposables.forEach(i=>i&&i.dispose()),this._disposables.length=0}_doValidate(i,e){this._worker(i).then(t=>t.doValidation(i.toString())).then(t=>{let n=t.map(o=>cwi(i,o)),r=rr.editor.getModel(i);r&&r.getLanguageId()===e&&rr.editor.setModelMarkers(r,e,n)}).then(void 0,t=>{console.error(t)})}};wyt=class{constructor(i,e){this._worker=i,this._triggerCharacters=e}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(i,e,t,n){let r=i.uri;return this._worker(r).then(o=>o.doComplete(r.toString(),UE(e))).then(o=>{if(!o)return;let s=i.getWordUntilPosition(e),a=new rr.Range(e.lineNumber,s.startColumn,e.lineNumber,s.endColumn),l=o.items.map(c=>{let u={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:hwi(c.command),range:a,kind:dwi(c.kind)};return c.textEdit&&(uwi(c.textEdit)?u.range={insert:cf(c.textEdit.insert),replace:cf(c.textEdit.replace)}:u.range=cf(c.textEdit.range),u.insertText=c.textEdit.newText),c.additionalTextEdits&&(u.additionalTextEdits=c.additionalTextEdits.map(pB)),c.insertTextFormat===rOe.Snippet&&(u.insertTextRules=rr.languages.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:l}})}};xyt=class{constructor(i){this._worker=i}provideHover(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.doHover(n.toString(),UE(e))).then(r=>{if(r)return{range:cf(r.range),contents:pwi(r.contents)}})}};mwi=class{constructor(i){this._worker=i}provideDocumentHighlights(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.findDocumentHighlights(n.toString(),UE(e))).then(r=>{if(r)return r.map(o=>({range:cf(o.range),kind:gwi(o.kind)}))})}};bwi=class{constructor(i){this._worker=i}provideDefinition(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.findDefinition(n.toString(),UE(e))).then(r=>{if(r)return[Cyt(r)]})}};vwi=class{constructor(i){this._worker=i}provideReferences(i,e,t,n){let r=i.uri;return this._worker(r).then(o=>o.findReferences(r.toString(),UE(e))).then(o=>{if(o)return o.map(Cyt)})}},Awi=class{constructor(i){this._worker=i}provideRenameEdits(i,e,t,n){let r=i.uri;return this._worker(r).then(o=>o.doRename(r.toString(),UE(e),t)).then(o=>ywi(o))}};_yt=class{constructor(i){this._worker=i}provideDocumentSymbols(i,e){let t=i.uri;return this._worker(t).then(n=>n.findDocumentSymbols(t.toString())).then(n=>{if(n)return n.map(r=>wwi(r)?Syt(r):{name:r.name,detail:"",containerName:r.containerName,kind:Eyt(r.kind),range:cf(r.location.range),selectionRange:cf(r.location.range),tags:[]})})}};xwi=class{constructor(i){this._worker=i}provideLinks(i,e){let t=i.uri;return this._worker(t).then(n=>n.findDocumentLinks(t.toString())).then(n=>{if(n)return{links:n.map(r=>({range:cf(r.range),url:r.target}))}})}},Dyt=class{constructor(i){this._worker=i}provideDocumentFormattingEdits(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.format(n.toString(),null,kyt(e)).then(o=>{if(!(!o||o.length===0))return o.map(pB)}))}},Tyt=class{constructor(i){this._worker=i,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(i,e,t,n){let r=i.uri;return this._worker(r).then(o=>o.format(r.toString(),lOe(e),kyt(t)).then(s=>{if(!(!s||s.length===0))return s.map(pB)}))}};Iyt=class{constructor(i){this._worker=i}provideDocumentColors(i,e){let t=i.uri;return this._worker(t).then(n=>n.findDocumentColors(t.toString())).then(n=>{if(n)return n.map(r=>({color:r.color,range:cf(r.range)}))})}provideColorPresentations(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.getColorPresentations(n.toString(),e.color,lOe(e.range))).then(r=>{if(r)return r.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=pB(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(pB)),s})})}},Lyt=class{constructor(i){this._worker=i}provideFoldingRanges(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.getFoldingRanges(n.toString(),e)).then(r=>{if(r)return r.map(o=>{let s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=Cwi(o.kind)),s})})}};Nyt=class{constructor(i){this._worker=i}provideSelectionRanges(i,e,t){let n=i.uri;return this._worker(n).then(r=>r.getSelectionRanges(n.toString(),e.map(UE))).then(r=>{if(r)return r.map(o=>{let s=[];for(;o;)s.push({range:cf(o.range)}),o=o.parent;return s})})}};(function(i){i[i.lineFeed=10]="lineFeed",i[i.carriageReturn=13]="carriageReturn",i[i.space=32]="space",i[i._0=48]="_0",i[i._1=49]="_1",i[i._2=50]="_2",i[i._3=51]="_3",i[i._4=52]="_4",i[i._5=53]="_5",i[i._6=54]="_6",i[i._7=55]="_7",i[i._8=56]="_8",i[i._9=57]="_9",i[i.a=97]="a",i[i.b=98]="b",i[i.c=99]="c",i[i.d=100]="d",i[i.e=101]="e",i[i.f=102]="f",i[i.g=103]="g",i[i.h=104]="h",i[i.i=105]="i",i[i.j=106]="j",i[i.k=107]="k",i[i.l=108]="l",i[i.m=109]="m",i[i.n=110]="n",i[i.o=111]="o",i[i.p=112]="p",i[i.q=113]="q",i[i.r=114]="r",i[i.s=115]="s",i[i.t=116]="t",i[i.u=117]="u",i[i.v=118]="v",i[i.w=119]="w",i[i.x=120]="x",i[i.y=121]="y",i[i.z=122]="z",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.asterisk=42]="asterisk",i[i.backslash=92]="backslash",i[i.closeBrace=125]="closeBrace",i[i.closeBracket=93]="closeBracket",i[i.colon=58]="colon",i[i.comma=44]="comma",i[i.dot=46]="dot",i[i.doubleQuote=34]="doubleQuote",i[i.minus=45]="minus",i[i.openBrace=123]="openBrace",i[i.openBracket=91]="openBracket",i[i.plus=43]="plus",i[i.slash=47]="slash",i[i.formFeed=12]="formFeed",i[i.tab=9]="tab"})(dyt||(dyt={}));jzn=new Array(20).fill(0).map((i,e)=>" ".repeat(e)),cB=200,Qzn={" ":{"\n":new Array(cB).fill(0).map((i,e)=>` -`+" ".repeat(e)),"\r":new Array(cB).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(cB).fill(0).map((i,e)=>`\r -`+" ".repeat(e))}," ":{"\n":new Array(cB).fill(0).map((i,e)=>` -`+" ".repeat(e)),"\r":new Array(cB).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(cB).fill(0).map((i,e)=>`\r -`+" ".repeat(e))}};(function(i){i.DEFAULT={allowTrailingComma:!1}})(hyt||(hyt={}));Swi=_wi;(function(i){i[i.None=0]="None",i[i.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=2]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",i[i.InvalidUnicode=4]="InvalidUnicode",i[i.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",i[i.InvalidCharacter=6]="InvalidCharacter"})(fyt||(fyt={}));(function(i){i[i.OpenBraceToken=1]="OpenBraceToken",i[i.CloseBraceToken=2]="CloseBraceToken",i[i.OpenBracketToken=3]="OpenBracketToken",i[i.CloseBracketToken=4]="CloseBracketToken",i[i.CommaToken=5]="CommaToken",i[i.ColonToken=6]="ColonToken",i[i.NullKeyword=7]="NullKeyword",i[i.TrueKeyword=8]="TrueKeyword",i[i.FalseKeyword=9]="FalseKeyword",i[i.StringLiteral=10]="StringLiteral",i[i.NumericLiteral=11]="NumericLiteral",i[i.LineCommentTrivia=12]="LineCommentTrivia",i[i.BlockCommentTrivia=13]="BlockCommentTrivia",i[i.LineBreakTrivia=14]="LineBreakTrivia",i[i.Trivia=15]="Trivia",i[i.Unknown=16]="Unknown",i[i.EOF=17]="EOF"})(pyt||(pyt={}));(function(i){i[i.InvalidSymbol=1]="InvalidSymbol",i[i.InvalidNumberFormat=2]="InvalidNumberFormat",i[i.PropertyNameExpected=3]="PropertyNameExpected",i[i.ValueExpected=4]="ValueExpected",i[i.ColonExpected=5]="ColonExpected",i[i.CommaExpected=6]="CommaExpected",i[i.CloseBraceExpected=7]="CloseBraceExpected",i[i.CloseBracketExpected=8]="CloseBracketExpected",i[i.EndOfFileExpected=9]="EndOfFileExpected",i[i.InvalidCommentToken=10]="InvalidCommentToken",i[i.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=12]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",i[i.InvalidUnicode=14]="InvalidUnicode",i[i.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",i[i.InvalidCharacter=16]="InvalidCharacter"})(myt||(myt={}));gyt="delimiter.bracket.json",byt="delimiter.array.json",Dwi="delimiter.colon.json",Twi="delimiter.comma.json",kwi="keyword.json",Iwi="keyword.json",Lwi="string.value.json",Nwi="number.json",Mwi="string.key.json",Rwi="comment.block.json",Fwi="comment.line.json",MH=class Myt{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(e,t){return new Myt(e,t)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}},Ryt=class aOe{constructor(e,t,n,r){this._state=e,this.scanError=t,this.lastWasColon=n,this.parents=r}clone(){return new aOe(this._state,this.scanError,this.lastWasColon,this.parents)}equals(e){return e===this?!0:!e||!(e instanceof aOe)?!1:this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&MH.equals(this.parents,e.parents)}getStateData(){return this._state}setStateData(e){this._state=e}};Bwi=class extends yyt{constructor(i,e,t){super(i,e,t.onDidChange),this._disposables.push(rr.editor.onWillDisposeModel(n=>{this._resetSchema(n.uri)})),this._disposables.push(rr.editor.onDidChangeModelLanguage(n=>{this._resetSchema(n.model.uri)}))}_resetSchema(i){this._worker().then(e=>{e.resetSchema(i.toString())})}};Vwi={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}});var Hyt={};Ih(Hyt,{getWorker:()=>zyt,jsonDefaults:()=>cOe});function Vyt(){return Promise.resolve().then(()=>(Pyt(),Oyt))}var Hwi,Wwi,Uwi,jwi,Byt,Qwi,PH,Gwi,qwi,Ywi,cOe,zyt,uOe=D(()=>{uN();uN();Hwi=Object.defineProperty,Wwi=Object.getOwnPropertyDescriptor,Uwi=Object.getOwnPropertyNames,jwi=Object.prototype.hasOwnProperty,Byt=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Uwi(e))!jwi.call(i,r)&&r!==t&&Hwi(i,r,{get:()=>e[r],enumerable:!(n=Wwi(e,r))||n.enumerable});return i},Qwi=(i,e,t)=>(Byt(i,e,"default"),t&&Byt(t,e,"default")),PH={};Qwi(PH,cN);Gwi=class{constructor(i,e,t){this._onDidChange=new PH.Emitter,this._languageId=i,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},qwi={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Ywi={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},cOe=new Gwi("json",qwi,Ywi),zyt=()=>Vyt().then(i=>i.getWorker());PH.languages.json={jsonDefaults:cOe,getWorker:zyt};PH.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});PH.languages.onLanguage("json",()=>{Vyt().then(i=>i.setupMode(cOe))})});function Kwi(i,e,t){return i.get(ai).listDiffEditors().find(o=>{let s=o.getModifiedEditor(),a=o.getOriginalEditor();return s&&s.getModel()?.uri.toString()===t.toString()&&a&&a.getModel()?.uri.toString()===e.toString()})||null}function bB(i){let t=i.get(ai).listDiffEditors(),n=hs();if(n)for(let r of t){let o=r.getContainerDomNode();if(Jwi(o,n))return r}return null}function Jwi(i,e){let t=e;for(;t;){if(t===i)return!0;t=t.parentElement}return!1}var Lle,BH,zH,HH,Nle,Mle,Rle,Fle,mB,Wyt,gB,VH,Uyt=D(()=>{Ye();er();ii();fs();ule();vn();Oe();fr();nr();Wt();HE();Lle=class extends la{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Bt("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:Ee.map,toggled:me.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:me.has("isInDiffEditor"),menu:{when:me.has("isInDiffEditor"),id:tt.EditorTitle,order:22,group:"navigation"}})}run(e,...t){let n=e.get(kt),r=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",r)}},BH=class extends la{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Bt("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:me.has("isInDiffEditor")})}run(e,...t){let n=e.get(kt),r=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",r)}},zH=class extends la{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Bt("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:me.has("isInDiffEditor")})}run(e,...t){let n=e.get(kt),r=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",r)}},HH=Bt("diffEditor","Diff Editor"),Nle=class extends ih{constructor(){super({id:"diffEditor.switchSide",title:Bt("switchSide","Switch Side"),icon:Ee.arrowSwap,precondition:me.has("isInDiffEditor"),f1:!0,category:HH})}runEditorCommand(e,t,n){let r=bB(e);if(r instanceof e0){if(n&&n.dryRun)return{destinationSelection:r.mapToOtherSide().destinationSelection};r.switchSide()}}},Mle=class extends ih{constructor(){super({id:"diffEditor.exitCompareMove",title:Bt("exitCompareMove","Exit Compare Move"),icon:Ee.close,precondition:V.comparingMovedCode,f1:!1,category:HH,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){let r=bB(e);r instanceof e0&&r.exitCompareMove()}},Rle=class extends ih{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Bt("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:Ee.fold,precondition:me.has("isInDiffEditor"),f1:!0,category:HH})}runEditorCommand(e,t,...n){let r=bB(e);r instanceof e0&&r.collapseAllUnchangedRegions()}},Fle=class extends ih{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Bt("showAllUnchangedRegions","Show All Unchanged Regions"),icon:Ee.unfold,precondition:me.has("isInDiffEditor"),f1:!0,category:HH})}runEditorCommand(e,t,...n){let r=bB(e);r instanceof e0&&r.showAllUnchangedRegions()}},mB=class extends la{constructor(){super({id:"diffEditor.revert",title:Bt("revert","Revert"),f1:!1,category:HH})}run(e,t){let n=Kwi(e,t.originalUri,t.modifiedUri);n instanceof e0&&n.revertRangeMappings(t.mapping.innerChanges??[])}},Wyt=Bt("accessibleDiffViewer","Accessible Diff Viewer"),gB=class i extends la{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:i.id,title:Bt("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:Wyt,precondition:me.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){bB(e)?.accessibleDiffViewerNext()}},VH=class i extends la{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:i.id,title:Bt("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:Wyt,precondition:me.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){bB(e)?.accessibleDiffViewerPrev()}}});var jyt=D(()=>{er();Uyt();vn();Oe();fr();Xn();Wt();HE();Pn(Lle);Pn(BH);Pn(zH);Zo.appendMenuItem(tt.EditorTitle,{command:{id:new zH().desc.id,title:y("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:me.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:me.has("isInDiffEditor")},order:11,group:"1_diff",when:me.and(V.diffEditorRenderSideBySideInlineBreakpointReached,me.has("isInDiffEditor"))});Zo.appendMenuItem(tt.EditorTitle,{command:{id:new BH().desc.id,title:y("showMoves","Show Moved Code Blocks"),icon:Ee.move,toggled:yI.create("config.diffEditor.experimental.showMoves",!0),precondition:me.has("isInDiffEditor")},order:10,group:"1_diff",when:me.has("isInDiffEditor")});Pn(mB);for(let i of[{icon:Ee.arrowRight,key:V.diffEditorInlineMode.toNegated()},{icon:Ee.discard,key:V.diffEditorInlineMode}])Zo.appendMenuItem(tt.DiffEditorHunkToolbar,{command:{id:new mB().desc.id,title:y("revertHunk","Revert Block"),icon:i.icon},when:me.and(V.diffEditorModifiedWritable,i.key),order:5,group:"primary"}),Zo.appendMenuItem(tt.DiffEditorSelectionToolbar,{command:{id:new mB().desc.id,title:y("revertSelection","Revert Selection"),icon:i.icon},when:me.and(V.diffEditorModifiedWritable,i.key),order:5,group:"primary"});Pn(Nle);Pn(Mle);Pn(Rle);Pn(Fle);Zo.appendMenuItem(tt.EditorTitle,{command:{id:gB.id,title:y("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:me.has("isInDiffEditor")},order:10,group:"2_diff",when:me.and(V.accessibleDiffViewerVisible.negate(),me.has("isInDiffEditor"))});ci.registerCommandAlias("editor.action.diffReview.next",gB.id);Pn(gB);ci.registerCommandAlias("editor.action.diffReview.prev",VH.id);Pn(VH)});var Qyt=D(()=>{});var Xwi,Zwi,dOe,Ole,jE,hOe,fOe,pOe,mOe,Gyt=D(()=>{Yl();Ad();Ep();Qyt();ii();Hn();vn();Oe();Wt();Xwi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Zwi=function(i,e){return function(t,n){e(t,n,i)}},Ole=new Pe("selectionAnchorSet",!1),jE=class{static{dOe=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(dOe.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Ole.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(qe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new es().appendText(y("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),gs(y("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(qe.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};jE=dOe=Xwi([Zwi(1,Ze)],jE);hOe=class extends Fe{constructor(){super({id:"editor.action.setSelectionAnchor",label:y("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2080),weight:100}})}async run(e,t){jE.get(t)?.setSelectionAnchor()}},fOe=class extends Fe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:y("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Ole})}async run(e,t){jE.get(t)?.goToSelectionAnchor()}},pOe=class extends Fe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:y("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Ole,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2089),weight:100}})}async run(e,t){jE.get(t)?.selectFromAnchorToCursor()}},mOe=class extends Fe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:y("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Ole,kbOpts:{kbExpr:V.editorTextFocus,primary:9,weight:100}})}async run(e,t){jE.get(t)?.cancelSelectionAnchor()}};Tt(jE.ID,jE,4);xe(hOe);xe(fOe);xe(pOe);xe(mOe)});var qyt=D(()=>{});var $wi,gOe,bOe,vOe,AOe,dN,Yyt=D(()=>{Jt();ae();qyt();ii();Nt();We();Hn();vn();tl();vs();Oe();fr();eo();Zn();$wi=j("editorOverviewRuler.bracketMatchForeground","#A0A0A0",y("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),gOe=class extends Fe{constructor(){super({id:"editor.action.jumpToBracket",label:y("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:3165,weight:100}})}run(e,t){dN.get(t)?.jumpToBracket()}},bOe=class extends Fe{constructor(){super({id:"editor.action.selectToBracket",label:y("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Bt("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){let r=!0;n&&n.selectBrackets===!1&&(r=!1),dN.get(t)?.selectToBracket(r)}},vOe=class extends Fe{constructor(){super({id:"editor.action.removeBrackets",label:y("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:2561,weight:100}})}run(e,t){dN.get(t)?.removeBrackets(this.id)}},AOe=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},dN=class i extends W{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new di(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),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(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new qe(s.lineNumber,s.column,s.lineNumber,s.column):new qe(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(N.compareRangesUsingStarts);let[c,u]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?u.getEndPosition():u.getStartPosition(),u.containsPosition(o)){let d=a;a=l,l=d}}a&&l&&n.push(new qe(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=zt.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Tr($wi),position:Cc.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=zt.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let d=0,h=e.length;d1&&o.sort(K.compare);let a=[],l=0,c=0,u=r.length;for(let d=0,h=o.length;d{We();Hn();Ple=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(n)))if(this._isMovingLeft){let s=new N(n,r-1,n,r),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new N(n,o,n,o),a)}else{let s=new N(n,o,n,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new N(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new qe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new qe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var Ble,yOe,wOe,Jyt=D(()=>{ii();vn();Kyt();Oe();Ble=class extends Fe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let o of r)n.push(new Ple(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},yOe=class extends Ble{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:y("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:V.writable})}},wOe=class extends Ble{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:y("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:V.writable})}};xe(yOe);xe(wOe)});var xOe,Xyt=D(()=>{ii();PL();xoe();We();vn();Oe();xOe=class extends Fe{constructor(){super({id:"editor.action.transposeLetters",label:y("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let u=l===c?s.getPosition():Qo.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),d=Qo.leftPosition(n,u),h=Qo.leftPosition(n,d),f=n.getValueInRange(N.fromPositions(h,d)),p=n.getValueInRange(N.fromPositions(d,u)),g=N.fromPositions(h,u);r.push(new Ms(g,p+f))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};xe(xOe)});var QE,WH=D(()=>{QE=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;ri,asFile:()=>{},value:typeof i=="string"?i:void 0}}function Zyt(i,e,t){let n={id:QE(),name:i,uri:e,data:t};return{asString:async()=>"",asFile:()=>n,value:void 0}}function zle(i){return i.toLowerCase()}function Vle(i,e){return $yt(zle(i),e.map(zle))}function $yt(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;let t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[n,r,o]=t;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}var vB,hN,jH=D(()=>{Qt();td();WH();vB=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return bi.some(this,([n,r])=>r.asFile())&&t.push("files"),$yt(zle(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){let 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(let[e,t]of this._entries)for(let n of t)yield[e,n]}toKey(e){return zle(e)}};hN=Object.freeze({create:i=>Uh(i.map(e=>e.toString())).join(`\r +`),await this._clipboardService.writeText(C)})),n.getOption(92)||A.push(new ta("diff.inline.revertChange",y("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),A},autoSelectFirstItem:!0})};this._register(un(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;let{top:g,height:A}=bn(this._diffActions),v=Math.floor(u/3);p.preventDefault(),f(p.posx,g+A+v)})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(d=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,u),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(p=>{p.event.leftButton&&(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()&&(p.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,u),f(p.event.posx,p.event.posy+u))}))}_updateLightBulbPosition(e,t,n){let{top:o}=bn(e),r=t-o,s=Math.floor(r/n),a=s*n;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let c=0;c0,r=new am(1e4),s=0,a=0,l=[];for(let h=0;h');let l=e.getLineContent(),c=vh.isBasicASCII(l,o),u=vh.containsRTL(l,c,r),d=Sx(new ef(s.fontInfo.isMonospace&&!s.disableMonospaceOptimizations,s.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,u,0,e,t,s.tabSize,0,s.fontInfo.spaceWidth,s.fontInfo.middotWidth,s.fontInfo.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==Dg.OFF,null),a);return a.appendString(""),d.characterMapping.getHorizontalOffset(d.characterMapping.length)}var lbt,uce,dce,dbt=D(()=>{Sy();um();ea();_x();HI();JS();d0();lbt=xd("diffEditorWidget",{createHTML:i=>i});uce=class{constructor(e,t,n,o){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=n,this.mightContainRTL=o}},dce=class i{static fromEditor(e){let t=e.getOptions(),n=t.get(50),o=t.get(146);return new i(e.getModel()?.getOptions().tabSize||0,n,t.get(33),n.typicalHalfwidthCharacterWidth,t.get(105),t.get(67),o.decorationsWidth,t.get(118),t.get(100),t.get(95),t.get(51))}constructor(e,t,n,o,r,s,a,l,c,u,d){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=n,this.typicalHalfwidthCharacterWidth=o,this.scrollBeyondLastColumn=r,this.lineHeight=s,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=u,this.fontLigatures=d}}});function fbt(i,e,t,n,o,r){let s=new Ad(pbt(i,n)),a=new Ad(pbt(e,o)),l=i.getOption(67),c=e.getOption(67),u=[],d=0,h=0;function f(p,g){for(;;){let A=s.peek(),v=a.peek();if(A&&A.lineNumber>=p&&(A=void 0),v&&v.lineNumber>=g&&(v=void 0),!A&&!v)break;let w=A?A.lineNumber-d:Number.MAX_VALUE,C=v?v.lineNumber-h:Number.MAX_VALUE;wC?(a.dequeue(),A={lineNumber:v.lineNumber-h+d,heightInPx:0}):(s.dequeue(),a.dequeue()),u.push({originalRange:Qt.ofLength(A.lineNumber,1),modifiedRange:Qt.ofLength(v.lineNumber,1),originalHeightInPx:l+A.heightInPx,modifiedHeightInPx:c+v.heightInPx,diff:void 0})}}for(let p of t){let C=function(_,E,I=!1){if(_z.lineNumber<_)?.reduce((z,Q)=>z+Q.heightInPx,0)??0,B=a.takeWhile(z=>z.lineNumberz+Q.heightInPx,0)??0;u.push({originalRange:T,modifiedRange:N,originalHeightInPx:T.length*l+L,modifiedHeightInPx:N.length*c+B,diff:p.lineRangeMapping}),w=_,v=E},g=p.lineRangeMapping;f(g.original.startLineNumber,g.modified.startLineNumber);let A=!0,v=g.modified.startLineNumber,w=g.original.startLineNumber;if(r)for(let _ of g.innerChanges||[]){_.originalRange.startColumn>1&&_.modifiedRange.startColumn>1&&C(_.originalRange.startLineNumber,_.modifiedRange.startLineNumber);let E=i.getModel(),I=_.originalRange.endLineNumber<=E.getLineCount()?E.getLineMaxColumn(_.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;_.originalRange.endColumn1&&n.push({lineNumber:l,heightInPx:s*(c-1)})}for(let l of i.getWhitespaces()){if(e.has(l.id))continue;let c=l.afterLineNumber===0?0:r.convertViewPositionToModelPosition(new J(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:c,heightInPx:l.height})}return tbt(t,n,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}function oU(i){return i.innerChanges?i.innerChanges.every(e=>mbt(e.modifiedRange)&&mbt(e.originalRange)||e.originalRange.equalsRange(new R(1,1,1,1))):!1}function mbt(i){return i.startLineNumber===i.endLineNumber}var Kui,hbt,hce,fce=D(()=>{Ye();Wt();Gt();oo();de();In();ko();gn();um();dD();VFe();abt();dbt();Gg();_d();kt();d0();cC();Ed();Ue();Kui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},hbt=function(i,e){return function(t,n){e(t,n,i)}},hce=class extends H{constructor(e,t,n,o,r,s,a,l,c,u){super(),this._targetWindow=e,this._editors=t,this._diffModel=n,this._options=o,this._diffEditorWidget=r,this._canIgnoreViewZoneUpdateEvent=s,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=u,this._originalTopPadding=Ut(this,0),this._originalScrollOffset=Ut(this,0),this._originalScrollOffsetAnimated=wFe(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=Ut(this,0),this._modifiedScrollOffset=Ut(this,0),this._modifiedScrollOffsetAnimated=wFe(this._targetWindow,this._modifiedScrollOffset,this._store);let d=Ut("invalidateAlignmentsState",0),h=this._register(new si(()=>{d.set(d.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(C=>{(C.hasChanged(147)||C.hasChanged(67))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(C=>{(C.hasChanged(147)||C.hasChanged(67))&&h.schedule()}));let f=this._diffModel.map(C=>C?Ri(this,C.model.original.onDidChangeTokens,()=>C.model.original.tokenization.backgroundTokenizationState===2):void 0).map((C,_)=>C?.read(_)),p=at(C=>{let _=this._diffModel.read(C),E=_?.diff.read(C);if(!_||!E)return null;d.read(C);let T=this._options.renderSideBySide.read(C);return fbt(this._editors.original,this._editors.modified,E.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,T)}),g=at(C=>{let _=this._diffModel.read(C)?.movedTextToCompare.read(C);if(!_)return null;d.read(C);let E=_.changes.map(I=>new nU(I));return fbt(this._editors.original,this._editors.modified,E,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function A(){let C=document.createElement("div");return C.className="diagonal-fill",C}let v=this._register(new se);this.viewZones=ph(this,(C,_)=>{v.clear();let E=p.read(C)||[],I=[],T=[],N=this._modifiedTopPadding.read(C);N>0&&T.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:N,showInHiddenAreas:!0,suppressMouseDown:!0});let L=this._originalTopPadding.read(C);L>0&&I.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:L,showInHiddenAreas:!0,suppressMouseDown:!0});let B=this._options.renderSideBySide.read(C),z=B?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(z){let $=this._editors.original.getModel();for(let re of E)if(re.diff)for(let ue=re.originalRange.startLineNumber;ue$.getLineCount())return{orig:I,mod:T};z?.addRequest($.getLineContent(ue),null,null)}}let Q=z?.finalize()??[],Z=0,U=this._editors.modified.getOption(67),M=this._diffModel.read(C)?.movedTextToCompare.read(C),ee=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,X=this._editors.original.getModel()?.mightContainRTL()??!1,Y=dce.fromEditor(this._editors.modified);for(let $ of E)if($.diff&&!B&&(!this._options.useTrueInlineDiffRendering.read(C)||!oU($.diff))){if(!$.originalRange.isEmpty){f.read(C);let ue=document.createElement("div");ue.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");let Ie=this._editors.original.getModel();if($.originalRange.endLineNumberExclusive-1>Ie.getLineCount())return{orig:I,mod:T};let nt=new uce($.originalRange.mapToLineArray(Fe=>Ie.tokenization.getLineTokens(Fe)),$.originalRange.mapToLineArray(Fe=>Q[Z++]),ee,X),mt=[];for(let Fe of $.diff.innerChanges||[])mt.push(new dC(Fe.originalRange.delta(-($.diff.original.startLineNumber-1)),ZA.className,0));let xt=ubt(nt,Y,mt,ue),wt=document.createElement("div");if(wt.className="inline-deleted-margin-view-zone",vr(wt,Y.fontInfo),this._options.renderIndicators.read(C))for(let Fe=0;FeSb(Ht),wt,this._editors.modified,$.diff,this._diffEditorWidget,xt.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Fe=0;Fe1&&I.push({afterLineNumber:$.originalRange.startLineNumber+Fe,domNode:A(),heightInPx:(zt-1)*U,showInHiddenAreas:!0,suppressMouseDown:!0})}T.push({afterLineNumber:$.modifiedRange.startLineNumber-1,domNode:ue,heightInPx:xt.heightInLines*U,minWidthInPx:xt.minWidthInPx,marginDomNode:wt,setZoneId(Fe){Ht=Fe},showInHiddenAreas:!0,suppressMouseDown:!0})}let re=document.createElement("div");re.className="gutter-delete",I.push({afterLineNumber:$.originalRange.endLineNumberExclusive-1,domNode:A(),heightInPx:$.modifiedHeightInPx,marginDomNode:re,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let re=$.modifiedHeightInPx-$.originalHeightInPx;if(re>0){if(M?.lineRangeMapping.original.delta(-1).deltaLength(2).contains($.originalRange.endLineNumberExclusive-1))continue;I.push({afterLineNumber:$.originalRange.endLineNumberExclusive-1,domNode:A(),heightInPx:re,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let ue=function(){let nt=document.createElement("div");return nt.className="arrow-revert-change "+ut.asClassName(De.arrowRight),_.add(ce(nt,"mousedown",mt=>mt.stopPropagation())),_.add(ce(nt,"click",mt=>{mt.stopPropagation(),r.revert($.diff)})),xe("div",{},nt)};if(M?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains($.modifiedRange.endLineNumberExclusive-1))continue;let Ie;$.diff&&$.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(C)&&(Ie=ue()),T.push({afterLineNumber:$.modifiedRange.endLineNumberExclusive-1,domNode:A(),heightInPx:-re,marginDomNode:Ie,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(let $ of g.read(C)??[]){if(!M?.lineRangeMapping.original.intersect($.originalRange)||!M?.lineRangeMapping.modified.intersect($.modifiedRange))continue;let re=$.modifiedHeightInPx-$.originalHeightInPx;re>0?I.push({afterLineNumber:$.originalRange.endLineNumberExclusive-1,domNode:A(),heightInPx:re,showInHiddenAreas:!0,suppressMouseDown:!0}):T.push({afterLineNumber:$.modifiedRange.endLineNumberExclusive-1,domNode:A(),heightInPx:-re,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:I,mod:T}});let w=!1;this._register(this._editors.original.onDidScrollChange(C=>{C.scrollLeftChanged&&!w&&(w=!0,this._editors.modified.setScrollLeft(C.scrollLeft),w=!1)})),this._register(this._editors.modified.onDidScrollChange(C=>{C.scrollLeftChanged&&!w&&(w=!0,this._editors.original.setScrollLeft(C.scrollLeft),w=!1)})),this._originalScrollTop=Ri(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Ri(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Ct(C=>{let _=this._originalScrollTop.read(C)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(C))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(C));_!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(_,1)})),this._register(Ct(C=>{let _=this._modifiedScrollTop.read(C)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(C))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(C));_!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(_,1)})),this._register(Ct(C=>{let _=this._diffModel.read(C)?.movedTextToCompare.read(C),E=0;if(_){let I=this._editors.original.getTopForLineNumber(_.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();E=this._editors.modified.getTopForLineNumber(_.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-I}E>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(E,void 0)):E<0?(this._modifiedTopPadding.set(-E,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-E,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+E,void 0,!0)}))}};hce=Kui([hbt(8,Ah),hbt(9,ia)],hce)});var hD,HFe,pce,WFe=D(()=>{Ye();Hg();il();Wt();lp();oo();de();In();ko();Gg();ap();Be();hD=class i extends H{static{this.movedCodeBlockPadding=4}constructor(e,t,n,o,r){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=o,this._editors=r,this._originalScrollTop=Ri(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Ri(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=gs("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Ut(this,0),this._modifiedViewZonesChangedSignal=gs("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=gs("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=ph(this,(u,d)=>{this._element.replaceChildren();let h=this._diffModel.read(u),f=h?.diff.read(u)?.movedTexts;if(!f||f.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(u);let p=this._originalEditorLayoutInfo.read(u),g=this._modifiedEditorLayoutInfo.read(u);if(!p||!g){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(u),this._originalViewZonesChangedSignal.read(u);let A=f.map(T=>{function N(X,Y){let $=Y.getTopForLineNumber(X.startLineNumber,!0),re=Y.getTopForLineNumber(X.endLineNumberExclusive,!0);return($+re)/2}let L=N(T.lineRangeMapping.original,this._editors.original),B=this._originalScrollTop.read(u),z=N(T.lineRangeMapping.modified,this._editors.modified),Q=this._modifiedScrollTop.read(u),Z=L-B,U=z-Q,M=Math.min(L,z),ee=Math.max(L,z);return{range:new Ci(M,ee),from:Z,to:U,fromWithoutScroll:L,toWithoutScroll:z,move:T}});A.sort(Fst(pa(T=>T.fromWithoutScroll>T.toWithoutScroll,Ost),pa(T=>T.fromWithoutScroll>T.toWithoutScroll?T.fromWithoutScroll:-T.toWithoutScroll,vd)));let v=HFe.compute(A.map(T=>T.range)),w=10,C=p.verticalScrollbarWidth,_=(v.getTrackCount()-1)*10+w*2,E=C+_+(g.contentLeft-i.movedCodeBlockPadding),I=0;for(let T of A){let N=v.getTrack(I),L=C+w+N*10,B=15,z=15,Q=E,Z=g.glyphMarginWidth+g.lineNumbersWidth,U=18,M=document.createElementNS("http://www.w3.org/2000/svg","rect");M.classList.add("arrow-rectangle"),M.setAttribute("x",`${Q-Z}`),M.setAttribute("y",`${T.to-U/2}`),M.setAttribute("width",`${Z}`),M.setAttribute("height",`${U}`),this._element.appendChild(M);let ee=document.createElementNS("http://www.w3.org/2000/svg","g"),X=document.createElementNS("http://www.w3.org/2000/svg","path");X.setAttribute("d",`M 0 ${T.from} L ${L} ${T.from} L ${L} ${T.to} L ${Q-z} ${T.to}`),X.setAttribute("fill","none"),ee.appendChild(X);let Y=document.createElementNS("http://www.w3.org/2000/svg","polygon");Y.classList.add("arrow"),d.add(Ct($=>{X.classList.toggle("currentMove",T.move===h.activeMovedText.read($)),Y.classList.toggle("currentMove",T.move===h.activeMovedText.read($))})),Y.setAttribute("points",`${Q-z},${T.to-B/2} ${Q},${T.to} ${Q-z},${T.to+B/2}`),ee.appendChild(Y),this._element.appendChild(ee),I++}this.width.set(_,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(He(()=>this._element.remove())),this._register(Ct(u=>{let d=this._originalEditorLayoutInfo.read(u),h=this._modifiedEditorLayoutInfo.read(u);!d||!h||(this._element.style.left=`${d.width-d.verticalScrollbarWidth}px`,this._element.style.height=`${d.height}px`,this._element.style.width=`${d.verticalScrollbarWidth+d.contentLeft-i.movedCodeBlockPadding+this.width.read(u)}px`)})),this._register(s0(this._state));let s=at(u=>{let h=this._diffModel.read(u)?.diff.read(u);return h?h.movedTexts.map(f=>({move:f,original:new k1(tc(f.lineRangeMapping.original.startLineNumber-1),18),modified:new k1(tc(f.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(PB(this._editors.original,s.map(u=>u.map(d=>d.original)))),this._register(PB(this._editors.modified,s.map(u=>u.map(d=>d.modified)))),this._register(es((u,d)=>{let h=s.read(u);for(let f of h)d.add(new pce(this._editors.original,f.original,f.move,"original",this._diffModel.get())),d.add(new pce(this._editors.modified,f.modified,f.move,"modified",this._diffModel.get()))}));let a=gs("original.onDidFocusEditorWidget",u=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0))),l=gs("modified.onDidFocusEditorWidget",u=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0))),c="modified";this._register(Qx({createEmptyChangeSummary:()=>{},handleChange:(u,d)=>(u.didChange(a)&&(c="original"),u.didChange(l)&&(c="modified"),!0)},u=>{a.read(u),l.read(u);let d=this._diffModel.read(u);if(!d)return;let h=d.diff.read(u),f;if(h&&c==="original"){let p=this._editors.originalCursor.read(u);p&&(f=h.movedTexts.find(g=>g.lineRangeMapping.original.contains(p.lineNumber)))}if(h&&c==="modified"){let p=this._editors.modifiedCursor.read(u);p&&(f=h.movedTexts.find(g=>g.lineRangeMapping.modified.contains(p.lineNumber)))}f!==d.movedTextToCompare.get()&&d.movedTextToCompare.set(void 0,void 0),d.setActiveMovedText(f)}))}},HFe=class i{static compute(e){let t=[],n=[];for(let o of e){let r=t.findIndex(s=>!s.intersectsStrict(o));r===-1&&(t.length>=6?r=jat(t,pa(a=>a.intersectWithRangeLength(o),vd)):(r=t.length,t.push(new Tte))),t[r].addRange(o),n.push(r)}return new i(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}},pce=class extends RN{constructor(e,t,n,o,r){let s=ci("div.diff-hidden-lines-widget");super(e,t,s.root),this._editor=e,this._move=n,this._kind=o,this._diffModel=r,this._nodes=ci("div.diff-moved-code-block",{style:{marginRight:"4px"}},[ci("div.text-content@textContent"),ci("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);let a=Ri(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(xp(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;n.changes.length>0?l=this._kind==="original"?y("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):y("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?y("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):y("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);let c=this._register(new Ps(this._nodes.actionBar,{highlightToggledItems:!0})),u=new ta("",l,"",!1);c.push(u,{icon:!1,label:!0});let d=new ta("","Compare",ut.asClassName(De.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Ct(h=>{let f=this._diffModel.movedTextToCompare.read(h)===n;d.checked=f})),c.push(d,{icon:!1,label:!0})}}});var mce,gbt=D(()=>{de();In();fce();WFe();dD();Gg();mce=class extends H{constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=at(this,r=>{let s=this._diffModel.read(r),a=s?.diff.read(r);if(!a)return null;let l=this._diffModel.read(r).movedTextToCompare.read(r),c=this._options.renderIndicators.read(r),u=this._options.showEmptyDecorations.read(r),d=[],h=[];if(!l)for(let p of a.mappings)if(p.lineRangeMapping.original.isEmpty||d.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:c?xC:RFe}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:c?ON:MFe}),p.lineRangeMapping.modified.isEmpty||p.lineRangeMapping.original.isEmpty)p.lineRangeMapping.original.isEmpty||d.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:VB}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:BB});else{let g=this._options.useTrueInlineDiffRendering.read(r)&&oU(p.lineRangeMapping);for(let A of p.lineRangeMapping.innerChanges||[])if(p.lineRangeMapping.original.contains(A.originalRange.startLineNumber)&&d.push({range:A.originalRange,options:A.originalRange.isEmpty()&&u?HB:ZA}),p.lineRangeMapping.modified.contains(A.modifiedRange.startLineNumber)&&h.push({range:A.modifiedRange,options:A.modifiedRange.isEmpty()&&u&&!g?zB:PN}),g){let v=s.model.original.getValueInRange(A.originalRange);h.push({range:A.modifiedRange,options:{description:"deleted-text",before:{content:v,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(l)for(let p of l.changes){let g=p.original.toInclusiveRange();g&&d.push({range:g,options:c?xC:RFe});let A=p.modified.toInclusiveRange();A&&h.push({range:A,options:c?ON:MFe});for(let v of p.innerChanges||[])d.push({range:v.originalRange,options:ZA}),h.push({range:v.modifiedRange,options:PN})}let f=this._diffModel.read(r).activeMovedText.read(r);for(let p of a.movedTexts)d.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(p===f?" currentMove":""),blockPadding:[hD.movedCodeBlockPadding,0,hD.movedCodeBlockPadding,hD.movedCodeBlockPadding]}}),h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(p===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:d,modifiedDecorations:h}}),this._register(OB(this._editors.original,this._decorations.map(r=>r?.originalDecorations||[]))),this._register(OB(this._editors.modified,this._decorations.map(r=>r?.modifiedDecorations||[])))}}});var gce,QB,UFe=D(()=>{$P();de();In();hf();gce=class{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=Jy(this,n=>{let o=this._sashRatio.read(n)??this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(o,n)},(n,o)=>{let r=this.dimensions.width.get();this._sashRatio.set(n/r,o)}),this._sashRatio=Ut(this,void 0)}_computeSashLeft(e,t){let n=this.dimensions.width.read(t),o=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),r=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):o,s=100;return n<=s*2?o:rn-s?n-s:r}},QB=class extends H{constructor(e,t,n,o,r,s){super(),this._domNode=e,this._dimensions=t,this._enabled=n,this._boundarySashes=o,this.sashLeft=r,this._resetSash=s,this._sash=this._register(new bf(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(a=>{this.sashLeft.set(this._startSashPosition+(a.currentX-a.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(Ct(a=>{let l=this._boundarySashes.read(a);l&&(this._sash.orthogonalEndSash=l.bottom)})),this._register(Ct(a=>{let l=this._enabled.read(a);this._sash.state=l?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}}});var bce,jFe,bbt=D(()=>{Ye();de();In();_d();ap();bce=class extends H{constructor(e,t,n){super(),this._editor=e,this._domNode=t,this.itemProvider=n,this.scrollTop=Ri(this,this._editor.onDidScrollChange,s=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(s=>s===0),this.modelAttached=Ri(this,this._editor.onDidChangeModel,s=>this._editor.hasModel()),this.editorOnDidChangeViewZones=gs("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=gs("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=Pg("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";let o=this._domNode.appendChild(ci("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),r=new ResizeObserver(()=>{fn(s=>{this.domNodeSizeChanged.trigger(s)})});r.observe(this._domNode),this._register(He(()=>r.disconnect())),this._register(Ct(s=>{o.className=this.isScrollTopZero.read(s)?"":"scroll-decoration"})),this._register(Ct(s=>this.render(s)))}dispose(){super.dispose(),kr(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);let t=this.scrollTop.read(e),n=this._editor.getVisibleRanges(),o=new Set(this.views.keys()),r=Ci.ofStartAndLength(0,this._domNode.clientHeight);if(!r.isEmpty)for(let s of n){let a=new Qt(s.startLineNumber,s.endLineNumber+1),l=this.itemProvider.getIntersectingGutterItems(a,e);fn(c=>{for(let u of l){if(!u.range.intersect(a))continue;o.delete(u.id);let d=this.views.get(u.id);if(d)d.item.set(u,c);else{let g=document.createElement("div");this._domNode.appendChild(g);let A=Ut("item",u),v=this.itemProvider.createView(A,g);d=new jFe(A,v,g),this.views.set(u.id,d)}let h=u.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(u.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(u.range.startLineNumber-1,!1)-t,p=(u.range.endLineNumberExclusive===1?Math.max(h,this._editor.getTopForLineNumber(u.range.startLineNumber,!1)-t):Math.max(h,this._editor.getBottomForLineNumber(u.range.endLineNumberExclusive-1,!0)-t))-h;d.domNode.style.top=`${h}px`,d.domNode.style.height=`${p}px`,d.gutterItemView.layout(Ci.ofStartAndLength(h,p),r)}})}for(let s of o){let a=this.views.get(s);a.gutterItemView.dispose(),a.domNode.remove(),this.views.delete(s)}}},jFe=class{constructor(e,t,n){this.item=e,this.gutterItemView=t,this.domNode=n}}});var GB,QFe=D(()=>{il();GB=class extends op{constructor(e){super(),this._getContext=e}runAction(e,t){let n=this._getContext();return super.runAction(e,n)}}});var rU,Abt=D(()=>{Iy();Ox();rU=class extends _V{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){let e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new au(e-1,t)}}});var vbt=D(()=>{});var Ace,qB,ybt=D(()=>{Hg();uLe();il();oo();ko();et();de();vbt();Be();ic();Ace=class extends H{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new OK),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new se),n.hoverDelegate=n.hoverDelegate??this._register(a0()),this.options=n,this.toggleMenuAction=this._register(new qB(()=>this.toggleMenuActionViewItem?.show(),n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Ps(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,hoverDelegate:n.hoverDelegate,actionViewItemProvider:(o,r)=>{if(o.id===qB.ID)return this.toggleMenuActionViewItem=new BE(o,o.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ut.asClassNameArray(n.moreIcon??De.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let s=n.actionViewItemProvider(o,r);if(s)return s}if(o instanceof Tg){let s=new BE(o,o.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:o.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return s.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(s),this.disposables.add(this._onDidChangeDropdownVisibility.add(s.onDidChangeVisibility)),s}}}))}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();let 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(o=>{this.actionBar.push(o,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(o)})})}getKeybindingLabel(e){return this.options.getKeyBinding?.(e)?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}},qB=class i extends ta{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||y("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}});var wbt,h0,zN,YB,sU=D(()=>{Ye();$p();ybt();il();Wt();SLe();Tt();et();ld();de();Be();Xx();go();oMe();to();Bt();Ed();Xo();lh();wbt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},h0=function(i,e){return function(t,n){e(t,n,i)}},zN=class extends Ace{constructor(e,t,n,o,r,s,a,l){super(e,r,{getKeyBinding:u=>s.lookupKeybinding(u.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"}),this._options=t,this._menuService=n,this._contextKeyService=o,this._contextMenuService=r,this._keybindingService=s,this._commandService=a,this._sessionDisposables=this._store.add(new se);let c=t?.telemetrySource;c&&this._store.add(this.actionBar.onDidRun(u=>l.publicLog2("workbenchActionExecuted",{id:u.action.id,from:c})))}setActions(e,t=[],n){this._sessionDisposables.clear();let o=e.slice(),r=t.slice(),s=[],a=0,l=[],c=!1;if(this._options?.hiddenItemStrategy!==-1)for(let u=0;uf?.id)),d=this._options.overflowBehavior.maxItems-u.size,h=0;for(let f=0;f=d&&(o[f]=void 0,l[f]=p))}}YEe(o),YEe(l),super.setActions(o,yr.join(l,r)),(s.length>0||o.length>0)&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",u=>{let d=new wl(rt(this.getElement()),u),h=this.getItemAction(d.target);if(!h)return;d.preventDefault(),d.stopPropagation();let f=[];if(h instanceof Kl&&h.menuKeybinding)f.push(h.menuKeybinding);else if(!(h instanceof e0||h instanceof qB)){let g=!!this._keybindingService.lookupKeybinding(h.id);f.push(nMe(this._commandService,this._keybindingService,h.id,void 0,g))}if(s.length>0){let g=!1;if(a===1&&this._options?.hiddenItemStrategy===0){g=!0;for(let A=0;Athis._menuService.resetHiddenStates(n)}))),p.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>d,getActions:()=>p,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:typeof this._options?.telemetrySource=="string",contextKeyService:this._contextKeyService})}))}};zN=wbt([h0(2,nl),h0(3,Ze),h0(4,ia),h0(5,Xt),h0(6,Ii),h0(7,rr)],zN);YB=class extends zN{constructor(e,t,n,o,r,s,a,l,c){super(e,{resetMenu:t,...n},o,r,s,a,l,c),this._onDidChangeMenuItems=this._store.add(new q),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;let u=this._store.add(o.createMenu(t,r,{emitEventsForSubmenuChanges:!0})),d=()=>{let h=[],f=[];VE(u,n?.menuOptions,{primary:h,secondary:f},n?.toolbarOptions?.primaryGroup,n?.toolbarOptions?.shouldInlineSubmenu,n?.toolbarOptions?.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",h.length===0&&f.length===0),super.setActions(h,f)};this._store.add(u.onDidChange(()=>{d(),this._onDidChangeMenuItems.fire(this)})),d()}setActions(){throw new fi("This toolbar is populated from a menu.")}};YB=wbt([h0(3,nl),h0(4,Ze),h0(5,ia),h0(6,Xt),h0(7,Ii),h0(8,rr)],YB)});var xbt,yce,GFe,vce,wce,xce,qFe,Cbt=D(()=>{Ye();de();In();hf();UFe();Gg();bbt();QFe();_d();ap();Ue();Iy();Ly();Abt();sU();go();Bt();zx();ht();xbt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},yce=function(i,e){return function(t,n){e(t,n,i)}},GFe=[],vce=35,wce=class extends H{constructor(e,t,n,o,r,s,a,l,c){super(),this._diffModel=t,this._editors=n,this._options=o,this._sashLayout=r,this._boundarySashes=s,this._instantiationService=a,this._contextKeyService=l,this._menuService=c,this._menu=this._register(this._menuService.createMenu(tt.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=Ri(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(u=>u.length>0),this._showSash=at(this,u=>this._options.renderSideBySide.read(u)&&this._hasActions.read(u)),this.width=at(this,u=>this._hasActions.read(u)?vce:0),this.elements=ci("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:vce+"px"}},[]),this._currentDiff=at(this,u=>{let d=this._diffModel.read(u);if(!d)return;let h=d.diff.read(u)?.mappings,f=this._editors.modifiedCursor.read(u);if(f)return h?.find(p=>p.lineRangeMapping.modified.contains(f.lineNumber))}),this._selectedDiffs=at(this,u=>{let h=this._diffModel.read(u)?.diff.read(u);if(!h)return GFe;let f=this._editors.modifiedSelections.read(u);if(f.every(v=>v.isEmpty()))return GFe;let p=new Ig(f.map(v=>Qt.fromRangeInclusive(v))),A=h.mappings.filter(v=>v.lineRangeMapping.innerChanges&&p.intersects(v.lineRangeMapping.modified)).map(v=>({mapping:v,rangeMappings:v.lineRangeMapping.innerChanges.filter(w=>f.some(C=>R.areIntersecting(w.modifiedRange,C)))}));return A.length===0||A.every(v=>v.rangeMappings.length===0)?GFe:A}),this._register(ibt(e,this.elements.root)),this._register(ce(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(xp(this.elements.root,{display:this._hasActions.map(u=>u?"block":"none")})),ya(this,u=>this._showSash.read(u)?new QB(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,Jy(this,h=>this._sashLayout.sashLeft.read(h)-vce,(h,f)=>this._sashLayout.sashLeft.set(h+vce,f)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store),this._register(new bce(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(u,d)=>{let h=this._diffModel.read(d);if(!h)return[];let f=h.diff.read(d);if(!f)return[];let p=this._selectedDiffs.read(d);if(p.length>0){let A=Sd.fromRangeMappings(p.flatMap(v=>v.rangeMappings));return[new xce(A,!0,tt.DiffEditorSelectionToolbar,void 0,h.model.original.uri,h.model.modified.uri)]}let g=this._currentDiff.read(d);return f.mappings.map(A=>new xce(A.lineRangeMapping.withInnerChangesFromLineRanges(),A.lineRangeMapping===g?.lineRangeMapping,tt.DiffEditorHunkToolbar,void 0,h.model.original.uri,h.model.modified.uri))},createView:(u,d)=>this._instantiationService.createInstance(qFe,u,d,this)})),this._register(ce(this.elements.gutter,Te.MOUSE_WHEEL,u=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(u)},{passive:!1}))}computeStagedValue(e){let t=e.innerChanges??[],n=new rU(this._editors.modifiedModel.get()),o=new rU(this._editors.original.getModel());return new gE(t.map(a=>a.toTextEdit(n))).apply(o)}layout(e){this.elements.gutter.style.left=e+"px"}};wce=xbt([yce(6,Re),yce(7,Ze),yce(8,nl)],wce);xce=class{constructor(e,t,n,o,r,s){this.mapping=e,this.showAlways=t,this.menuId=n,this.rangeOverride=o,this.originalUri=r,this.modifiedUri=s}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}},qFe=class extends H{constructor(e,t,n,o){super(),this._item=e,this._elements=ci("div.gutterItem",{style:{height:"20px",width:"34px"}},[ci("div.background@background",{},[]),ci("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,s=>s.showAlways),this._menuId=this._item.map(this,s=>s.menuId),this._isSmall=Ut(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;let r=this._register(o.createInstance(Oy,"element",!0,{position:{hoverPosition:1}}));this._register(wC(t,this._elements.root)),this._register(Ct(s=>{let a=this._showAlways.read(s);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",a),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(es((s,a)=>{this._elements.buttons.replaceChildren();let l=a.add(o.createInstance(YB,this._elements.buttons,this._menuId.read(s),{orientation:1,hoverDelegate:r,toolbarOptions:{primaryGroup:c=>c.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(s)?1:3},hiddenItemStrategy:0,actionRunner:new GB(()=>{let c=this._item.get(),u=c.mapping;return{mapping:u,originalWithModifiedChanges:n.computeStagedValue(u),originalUri:c.originalUri,modifiedUri:c.modifiedUri}}),menuOptions:{shouldForwardArgs:!0}}));a.add(l.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let n=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),n=this._elements.buttons.clientHeight;let o=e.length/2-n/2,r=n,s=e.start+o,a=Ci.tryCreate(r,t.endExclusive-r-n),l=Ci.tryCreate(e.start+r,e.endExclusive-n-r);l&&a&&l.start({deltas:[],didChange:!1}),handleChange:(t,n)=>{if(t.didChange(i)){let o=t.change;o!==void 0&&n.deltas.push(o),n.didChange=!0}return!0}},(t,n)=>{let o=i.read(t);n.didChange&&e(o,n.deltas)})}function _bt(i,e){let t=new se,n=Cce(i,(o,r)=>{t.clear(),e(o,r,t)});return{dispose(){n.dispose(),t.dispose()}}}var YFe,_C=D(()=>{qy();de();In();r0();hf();Qn();YFe=class i extends H{static{this._map=new Map}static get(e){let t=i._map.get(e);if(!t){t=new i(e),i._map.set(e,t);let n=e.onDidDispose(()=>{let o=i._map.get(e);o&&(i._map.delete(e),o.dispose(),n.dispose())})}return t}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new Yy(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){let e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=Ut(this,this.editor.getModel()),this.model=this._model,this.isReadonly=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(92)),this._versionId=mP({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=mP({owner:this,equalsFn:pH(ML(qe.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=Ri(this,t=>{let n=this.editor.onDidFocusEditorWidget(t),o=this.editor.onDidBlurEditorWidget(t);return{dispose(){n.dispose(),o.dispose()}}},()=>this.editor.hasWidgetFocus()),this.value=Jy(this,t=>(this.versionId.read(t),this.model.read(t)?.getValue()??""),(t,n)=>{let o=this.model.get();o!==null&&t!==o.getValue()&&o.setValue(t)}),this.valueIsEmpty=at(this,t=>(this.versionId.read(t),this.editor.getModel()?.getValueLength()===0)),this.cursorSelection=ec({owner:this,equalsFn:pH(qe.selectionsEqual)},t=>this.selections.read(t)?.[0]??null),this.onDidType=Pg(this),this.scrollTop=Ri(this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=Ri(this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=Ri(this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(t=>t.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(t=>t.decorationsLeft),this.contentWidth=Ri(this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(t=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,t)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(t=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(t=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}}))}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return Ri(this,t=>this.editor.onDidChangeConfiguration(n=>{n.hasChanged(e)&&t(void 0)}),()=>this.editor.getOption(e))}setDecorations(e){let t=new se,n=this.editor.createDecorationsCollection();return t.add(Xy({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},o=>{let r=e.read(o);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}createOverlayWidget(e){let t="observableOverlayWidget"+this._overlayWidgetCounter++,n={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(n);let o=Ct(r=>{e.position.read(r),e.minContentWidthInPx.read(r),this.editor.layoutOverlayWidget(n)});return He(()=>{o.dispose(),this.editor.removeOverlayWidget(n)})}}});var Jui,Xui,_ce,KB,Sce,Ece,KFe=D(()=>{Ye();Vx();oo();Td();de();In();hf();ko();gn();_C();Gg();_d();kt();Ue();ro();Be();ht();Jui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Xui=function(i,e){return function(t,n){e(t,n,i)}},KB=class extends H{static{_ce=this}static{this._breadcrumbsSourceFactory=Ut(_ce,()=>({dispose(){},getBreadcrumbItems(e,t){return[]}}))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._instantiationService=o,this._modifiedOutlineSource=ya(this,l=>{let c=this._editors.modifiedModel.read(l),u=_ce._breadcrumbsSourceFactory.read(l);return!c||!u?void 0:u(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===1)return;let c=this._diffModel.get();fn(u=>{for(let d of this._editors.original.getSelections()||[])c?.ensureOriginalLineIsVisible(d.getStartPosition().lineNumber,0,u),c?.ensureOriginalLineIsVisible(d.getEndPosition().lineNumber,0,u)})})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===1)return;let c=this._diffModel.get();fn(u=>{for(let d of this._editors.modified.getSelections()||[])c?.ensureModifiedLineIsVisible(d.getStartPosition().lineNumber,0,u),c?.ensureModifiedLineIsVisible(d.getEndPosition().lineNumber,0,u)})}));let r=this._diffModel.map((l,c)=>{let u=l?.unchangedRegions.read(c)??[];return u.length===1&&u[0].modifiedLineNumber===1&&u[0].lineCount===this._editors.modifiedModel.read(c)?.getLineCount()?[]:u});this.viewZones=ph(this,(l,c)=>{let u=this._modifiedOutlineSource.read(l);if(!u)return{origViewZones:[],modViewZones:[]};let d=[],h=[],f=this._options.renderSideBySide.read(l),p=this._options.compactMode.read(l),g=r.read(l);for(let A=0;Av.getHiddenOriginalRange(_).startLineNumber-1),C=new k1(w,12);d.push(C),c.add(new Sce(this._editors.original,C,v,!f))}{let w=at(this,_=>v.getHiddenModifiedRange(_).startLineNumber-1),C=new k1(w,12);h.push(C),c.add(new Sce(this._editors.modified,C,v))}}else{{let w=at(this,_=>v.getHiddenOriginalRange(_).startLineNumber-1),C=new k1(w,24);d.push(C),c.add(new Ece(this._editors.original,C,v,v.originalUnchangedRange,!f,u,_=>this._diffModel.get().ensureModifiedLineIsVisible(_,2,void 0),this._options))}{let w=at(this,_=>v.getHiddenModifiedRange(_).startLineNumber-1),C=new k1(w,24);h.push(C),c.add(new Ece(this._editors.modified,C,v,v.modifiedUnchangedRange,!1,u,_=>this._diffModel.get().ensureModifiedLineIsVisible(_,2,void 0),this._options))}}}return{origViewZones:d,modViewZones:h}});let s={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new $r(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(y("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ut.asClassName(De.fold),zIndex:10001};this._register(OB(this._editors.original,at(this,l=>{let c=r.read(l),u=c.map(d=>({range:d.originalUnchangedRange.toInclusiveRange(),options:s}));for(let d of c)d.shouldHideControls(l)&&u.push({range:R.fromPositions(new J(d.originalLineNumber,1)),options:a});return u}))),this._register(OB(this._editors.modified,at(this,l=>{let c=r.read(l),u=c.map(d=>({range:d.modifiedUnchangedRange.toInclusiveRange(),options:s}));for(let d of c)d.shouldHideControls(l)&&u.push({range:Qt.ofLength(d.modifiedLineNumber,1).toInclusiveRange(),options:a});return u}))),this._register(Ct(l=>{let c=r.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(u=>u.getHiddenOriginalRange(l).toInclusiveRange()).filter(Hf)),this._editors.modified.setHiddenAreas(c.map(u=>u.getHiddenModifiedRange(l).toInclusiveRange()).filter(Hf))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{if(!l.event.rightButton&&l.target.position&&l.target.element?.className.includes("fold-unchanged")){let c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let d=u.unchangedRegions.get().find(h=>h.modifiedUnchangedRange.includes(c));if(!d)return;d.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{if(!l.event.rightButton&&l.target.position&&l.target.element?.className.includes("fold-unchanged")){let c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let d=u.unchangedRegions.get().find(h=>h.originalUnchangedRange.includes(c));if(!d)return;d.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};KB=_ce=Jui([Xui(3,Re)],KB);Sce=class extends RN{constructor(e,t,n,o=!1){let r=ci("div.diff-hidden-lines-widget");super(e,t,r.root),this._unchangedRegion=n,this._hide=o,this._nodes=ci("div.diff-hidden-lines-compact",[ci("div.line-left",[]),ci("div.text@text",[]),ci("div.line-right",[])]),r.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(Ct(s=>{if(!this._hide){let a=this._unchangedRegion.getHiddenModifiedRange(s).length,l=y("hiddenLines","{0} hidden lines",a);this._nodes.text.innerText=l}}))}},Ece=class extends RN{constructor(e,t,n,o,r,s,a,l){let c=ci("div.diff-hidden-lines-widget");super(e,t,c.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=o,this._hide=r,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=ci("div.diff-hidden-lines",[ci("div.top@top",{title:y("diff.hiddenLines.top","Click or drag to show more above")}),ci("div.center@content",{style:{display:"flex"}},[ci("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[xe("a",{title:y("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...pm("$(unfold)"))]),ci("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),ci("div.bottom@bottom",{title:y("diff.bottom","Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root),this._hide?kr(this._nodes.first):this._register(xp(this._nodes.first,{width:Fl(this._editor).layoutInfoContentLeft})),this._register(Ct(d=>{let h=this._unchangedRegion.visibleLineCountTop.read(d)+this._unchangedRegion.visibleLineCountBottom.read(d)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!h),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(d)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(d)>0),this._nodes.top.classList.toggle("canMoveBottom",!h);let f=this._unchangedRegion.isDragged.read(d),p=this._editor.getDomNode();p&&(p.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(p.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(d)>0),p.classList.toggle("canMoveBottom",!h)):f==="bottom"?(p.classList.toggle("canMoveTop",!h),p.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(d)>0)):(p.classList.toggle("canMoveTop",!1),p.classList.toggle("canMoveBottom",!1)))}));let u=this._editor;this._register(ce(this._nodes.top,"mousedown",d=>{if(d.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),d.preventDefault();let h=d.clientY,f=!1,p=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let g=rt(this._nodes.top),A=ce(g,"mousemove",w=>{let _=w.clientY-h;f=f||Math.abs(_)>2;let E=Math.round(_/u.getOption(67)),I=Math.max(0,Math.min(p+E,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(I,void 0)}),v=ce(g,"mouseup",w=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),A.dispose(),v.dispose()})})),this._register(ce(this._nodes.bottom,"mousedown",d=>{if(d.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),d.preventDefault();let h=d.clientY,f=!1,p=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let g=rt(this._nodes.bottom),A=ce(g,"mousemove",w=>{let _=w.clientY-h;f=f||Math.abs(_)>2;let E=Math.round(_/u.getOption(67)),I=Math.max(0,Math.min(p-E,this._unchangedRegion.getMaxVisibleLineCountBottom())),T=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(I,void 0);let N=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(N-T))}),v=ce(g,"mouseup",w=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){let C=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let _=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(_-C))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),A.dispose(),v.dispose()})})),this._register(Ct(d=>{let h=[];if(!this._hide){let f=n.getHiddenModifiedRange(d).length,p=y("hiddenLines","{0} hidden lines",f),g=xe("span",{title:y("diff.hiddenLines.expandAll","Double click to unfold")},p);g.addEventListener("dblclick",w=>{w.button===0&&(w.preventDefault(),this._unchangedRegion.showAll(void 0))}),h.push(g);let A=this._unchangedRegion.getHiddenModifiedRange(d),v=this._modifiedOutlineSource.getBreadcrumbItems(A,d);if(v.length>0){h.push(xe("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let w=0;w{this._revealModifiedHiddenLine(C.startLineNumber)}}}}kr(this._nodes.others,...h)}))}}});var Zui,$ui,$A,VN,JFe=D(()=>{Ye();tl();vie();de();In();Gg();kt();zRe();nr();io();Zui=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},$ui=function(i,e){return function(t,n){e(t,n,i)}},VN=class extends H{static{$A=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=this.ONE_OVERVIEW_WIDTH*2}constructor(e,t,n,o,r,s,a){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=o,this._rootHeight=r,this._modifiedEditorLayoutInfo=s,this._themeService=a,this.width=$A.ENTIRE_DIFF_OVERVIEW_WIDTH;let l=Ri(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=at(h=>{let f=l.read(h),p=f.getColor(trt)||(f.getColor($ot)||X$).transparent(2),g=f.getColor(irt)||(f.getColor(ert)||Z$).transparent(2);return{insertColor:p,removeColor:g}}),u=Ai(document.createElement("div"));u.setClassName("diffViewport"),u.setPosition("absolute");let d=ci("div.diffOverview",{style:{position:"absolute",top:"0px",width:$A.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(wC(d,u.domNode)),this._register(un(d,Te.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(ce(d,Te.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(wC(this._rootElement,d)),this._register(es((h,f)=>{let p=this._diffModel.read(h),g=this._editors.original.createOverviewRuler("original diffOverviewRuler");g&&(f.add(g),f.add(wC(d,g.getDomNode())));let A=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(A&&(f.add(A),f.add(wC(d,A.getDomNode()))),!g||!A)return;let v=gs("viewZoneChanged",this._editors.original.onDidChangeViewZones),w=gs("viewZoneChanged",this._editors.modified.onDidChangeViewZones),C=gs("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),_=gs("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(Ct(E=>{v.read(E),w.read(E),C.read(E),_.read(E);let I=c.read(E),T=p?.diff.read(E)?.mappings;function N(z,Q,Z){let U=Z._getViewModel();return U?z.filter(M=>M.length>0).map(M=>{let ee=U.coordinatesConverter.convertModelPositionToViewPosition(new J(M.startLineNumber,1)),X=U.coordinatesConverter.convertModelPositionToViewPosition(new J(M.endLineNumberExclusive,1)),Y=X.lineNumber-ee.lineNumber;return new QW(ee.lineNumber,X.lineNumber,Y,Q.toString())}):[]}let L=N((T||[]).map(z=>z.lineRangeMapping.original),I.removeColor,this._editors.original),B=N((T||[]).map(z=>z.lineRangeMapping.modified),I.insertColor,this._editors.modified);g?.setZones(L),A?.setZones(B)})),f.add(Ct(E=>{let I=this._rootHeight.read(E),T=this._rootWidth.read(E),N=this._modifiedEditorLayoutInfo.read(E);if(N){let L=$A.ENTIRE_DIFF_OVERVIEW_WIDTH-2*$A.ONE_OVERVIEW_WIDTH;g.setLayout({top:0,height:I,right:L+$A.ONE_OVERVIEW_WIDTH,width:$A.ONE_OVERVIEW_WIDTH}),A.setLayout({top:0,height:I,right:0,width:$A.ONE_OVERVIEW_WIDTH});let B=this._editors.modifiedScrollTop.read(E),z=this._editors.modifiedScrollHeight.read(E),Q=this._editors.modified.getOption(104),Z=new _E(Q.verticalHasArrows?Q.arrowSize:0,Q.verticalScrollbarSize,0,N.height,z,B);u.setTop(Z.getSliderPosition()),u.setHeight(Z.getSliderSize())}else u.setTop(0),u.setHeight(0);d.style.height=I+"px",d.style.left=T-$A.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",u.setWidth($A.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};VN=$A=Zui([$ui(6,Wn)],VN)});var XFe,Dce,Tce,Sbt=D(()=>{Ye();Vx();oo();de();In();_d();Ue();Ly();ol();Be();XFe=[],Dce=class extends H{constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._widget=o,this._selectedDiffs=at(this,r=>{let a=this._diffModel.read(r)?.diff.read(r);if(!a)return XFe;let l=this._editors.modifiedSelections.read(r);if(l.every(h=>h.isEmpty()))return XFe;let c=new Ig(l.map(h=>Qt.fromRangeInclusive(h))),d=a.mappings.filter(h=>h.lineRangeMapping.innerChanges&&c.intersects(h.lineRangeMapping.modified)).map(h=>({mapping:h,rangeMappings:h.lineRangeMapping.innerChanges.filter(f=>l.some(p=>R.areIntersecting(f.modifiedRange,p)))}));return d.length===0||d.every(h=>h.rangeMappings.length===0)?XFe:d}),this._register(es((r,s)=>{if(!this._options.shouldRenderOldRevertArrows.read(r))return;let a=this._diffModel.read(r),l=a?.diff.read(r);if(!a||!l||a.movedTextToCompare.read(r))return;let c=[],u=this._selectedDiffs.read(r),d=new Set(u.map(h=>h.mapping));if(u.length>0){let h=this._editors.modifiedSelections.read(r),f=s.add(new Tce(h[h.length-1].positionLineNumber,this._widget,u.flatMap(p=>p.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}for(let h of l.mappings)if(!d.has(h)&&!h.lineRangeMapping.modified.isEmpty&&h.lineRangeMapping.innerChanges){let f=s.add(new Tce(h.lineRangeMapping.modified.startLineNumber,this._widget,h.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}s.add(He(()=>{for(let h of c)this._editors.modified.removeGlyphMarginWidget(h)}))}))}},Tce=class i extends H{static{this.counter=0}getId(){return this._id}constructor(e,t,n,o){super(),this._lineNumber=e,this._widget=t,this._diffs=n,this._revertSelection=o,this._id=`revertButton${i.counter++}`,this._domNode=ci("div.revertButton",{title:this._revertSelection?y("revertSelectedChanges","Revert Selected Changes"):y("revertChange","Revert Change")},[By(De.arrowRight)]).root,this._register(ce(this._domNode,Te.MOUSE_DOWN,r=>{r.button!==2&&(r.stopPropagation(),r.preventDefault())})),this._register(ce(this._domNode,Te.MOUSE_UP,r=>{r.stopPropagation(),r.preventDefault()})),this._register(ce(this._domNode,Te.CLICK,r=>{this._diffs instanceof cu?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),r.stopPropagation(),r.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:qu.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}});function Ebt(i,e,t){return Yut({debugName:()=>`Configuration Key "${i}"`},n=>t.onDidChangeConfiguration(o=>{o.affectsConfiguration(i)&&n(o)}),()=>t.getValue(i)??e)}function qg(i,e,t){let n=i.bindTo(e);return Xy({debugName:()=>`Set Context Key "${i.key}"`},o=>{n.set(t(o))})}var ZFe=D(()=>{In();vH()});var edi,Dbt,kce,Tbt=D(()=>{et();de();In();_C();JFe();ea();kt();Be();ht();Xo();edi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Dbt=function(i,e){return function(t,n){e(t,n,i)}},kce=class extends H{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,n,o,r,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._argCodeEditorWidgetOptions=o,this._createInnerEditor=r,this._instantiationService=s,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new q),this.modifiedScrollTop=Ri(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Ri(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=Fl(this.modified),this.originalObs=Fl(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=Ri(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=ec({owner:this,equalsFn:J.equals},l=>this.modifiedSelections.read(l)[0]?.getPosition()??new J(1,1)),this.originalCursor=Ri(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new J(1,1)),this._argCodeEditorWidgetOptions=null,this._register(Qx({createEmptyChangeSummary:()=>({}),handleChange:(l,c)=>(l.didChange(n.editorOptions)&&Object.assign(c,l.change.changedOptions),!0)},(l,c)=>{n.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,c)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,c))}))}_createLeftHandSideEditor(e,t){let n=this._adjustOptionsForLeftHandSide(void 0,e),o=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t);return o.setContextValue("isInDiffLeftEditor",!0),o}_createRightHandSideEditor(e,t){let n=this._adjustOptionsForRightHandSide(void 0,e),o=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t);return o.setContextValue("isInDiffRightEditor",!0),o}_constructInnerEditor(e,t,n,o){let r=this._createInnerEditor(e,t,n,o);return this._register(r.onDidContentSizeChange(s=>{let a=this.original.getContentWidth()+this.modified.getContentWidth()+VN.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),r}_adjustOptionsForLeftHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=of.revealHorizontalRightPadding.defaultValue+VN.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){let t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");let t=y("diff-aria-navigation-tip"," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};kce=edi([Dbt(5,Re),Dbt(6,Xt)],kce)});var Ice,kbt=D(()=>{et();de();Ice=class i extends H{constructor(){super(...arguments),this._id=++i.idCounter,this._onDidDispose=this._register(new q),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,o=!0){this._targetEditor.revealRange(e,t,n,o)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}});function ndi(i,e){return i.mappings.every(t=>odi(t.lineRangeMapping)||rdi(t.lineRangeMapping)||e&&oU(t.lineRangeMapping))}function odi(i){return i.original.length===0}function rdi(i){return i.modified.length===0}function Ibt(i,e){return{enableSplitViewResizing:Dt(i.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:Wst(i.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Dt(i.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Dt(i.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:tE(i.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:tE(i.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Dt(i.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Dt(i.renderIndicators,e.renderIndicators),originalEditable:Dt(i.originalEditable,e.originalEditable),diffCodeLens:Dt(i.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Dt(i.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Jr(i.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Jr(i.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Dt(i.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Dt(i.experimental?.showMoves,e.experimental.showMoves),showEmptyDecorations:Dt(i.experimental?.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:Dt(i.experimental?.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:Dt(i.hideUnchangedRegions?.enabled??i.experimental?.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:tE(i.hideUnchangedRegions?.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:tE(i.hideUnchangedRegions?.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:tE(i.hideUnchangedRegions?.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Dt(i.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Dt(i.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:tE(i.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Dt(i.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:Dt(i.renderGutterMenu,e.renderGutterMenu),compactMode:Dt(i.compactMode,e.compactMode)}}var tdi,idi,Lce,Lbt=D(()=>{In();vH();fce();wIe();ea();fh();tdi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},idi=function(i,e){return function(t,n){e(t,n,i)}},Lce=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=Ut(this,0),this._screenReaderMode=Ri(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=at(this,o=>this._options.read(o).renderSideBySide&&this._diffEditorWidth.read(o)<=this._options.read(o).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=at(this,o=>this._options.read(o).renderOverviewRuler),this.renderSideBySide=at(this,o=>this.compactMode.read(o)&&this.shouldRenderInlineViewInSmartMode.read(o)?!1:this._options.read(o).renderSideBySide&&!(this._options.read(o).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(o)&&!this._screenReaderMode.read(o))),this.readOnly=at(this,o=>this._options.read(o).readOnly),this.shouldRenderOldRevertArrows=at(this,o=>!(!this._options.read(o).renderMarginRevertIcon||!this.renderSideBySide.read(o)||this.readOnly.read(o)||this.shouldRenderGutterMenu.read(o))),this.shouldRenderGutterMenu=at(this,o=>this._options.read(o).renderGutterMenu),this.renderIndicators=at(this,o=>this._options.read(o).renderIndicators),this.enableSplitViewResizing=at(this,o=>this._options.read(o).enableSplitViewResizing),this.splitViewDefaultRatio=at(this,o=>this._options.read(o).splitViewDefaultRatio),this.ignoreTrimWhitespace=at(this,o=>this._options.read(o).ignoreTrimWhitespace),this.maxComputationTimeMs=at(this,o=>this._options.read(o).maxComputationTime),this.showMoves=at(this,o=>this._options.read(o).experimental.showMoves&&this.renderSideBySide.read(o)),this.isInEmbeddedEditor=at(this,o=>this._options.read(o).isInEmbeddedEditor),this.diffWordWrap=at(this,o=>this._options.read(o).diffWordWrap),this.originalEditable=at(this,o=>this._options.read(o).originalEditable),this.diffCodeLens=at(this,o=>this._options.read(o).diffCodeLens),this.accessibilityVerbose=at(this,o=>this._options.read(o).accessibilityVerbose),this.diffAlgorithm=at(this,o=>this._options.read(o).diffAlgorithm),this.showEmptyDecorations=at(this,o=>this._options.read(o).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=at(this,o=>this._options.read(o).onlyShowAccessibleDiffViewer),this.compactMode=at(this,o=>this._options.read(o).compactMode),this.trueInlineDiffRenderingEnabled=at(this,o=>this._options.read(o).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=at(this,o=>!this.renderSideBySide.read(o)&&this.trueInlineDiffRenderingEnabled.read(o)),this.hideUnchangedRegions=at(this,o=>this._options.read(o).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=at(this,o=>this._options.read(o).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=at(this,o=>this._options.read(o).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=at(this,o=>this._options.read(o).hideUnchangedRegions.minimumLineCount),this._model=Ut(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,o=>Xut(this,r=>{let s=o?.diff.read(r);return s?ndi(s,this.trueInlineDiffRenderingEnabled.read(r)):void 0})).flatten().map(this,o=>!!o),this.inlineViewHideOriginalLineNumbers=this.compactMode;let n={...e,...Ibt(e,$l)};this._options=Ut(this,n)}updateOptions(e){let t=Ibt(e,this._options.get()),n={...this._options.get(),...e,...t};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};Lce=tdi([idi(1,Es)],Lce)});function adi(i){return i.mappings.map(e=>{let t=e.lineRangeMapping,n,o,r,s,a=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,o=0,a=void 0):(n=t.original.startLineNumber,o=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(r=t.modified.startLineNumber-1,s=0,a=void 0):(r=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:o,modifiedStartLineNumber:r,modifiedEndLineNumber:s,charChanges:a?.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var sdi,aU,f0,Nce=D(()=>{Ye();lp();Tt();et();de();In();hf();ebt();Jt();hs();MN();$W();rbt();gbt();UFe();fce();Cbt();KFe();WFe();JFe();Sbt();Gg();UB();ZFe();kt();Ue();TW();An();$E();Bt();ht();uN();o0();Tbt();kbt();Lbt();VFe();sdi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},aU=function(i,e){return function(t,n){e(t,n,i)}},f0=class extends Ice{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,n,o,r,s,a,l){super(),this._domElement=e,this._parentContextKeyService=o,this._parentInstantiationService=r,this._accessibilitySignalService=a,this._editorProgressService=l,this.elements=ci("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[ci("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),ci("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),ci("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(Ky(this,void 0)),this._diffModel=at(this,_=>this._diffModelSrc.read(_)?.object),this.onDidChangeModel=Ee.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new _m([Ze,this._contextKeyService]))),this._boundarySashes=Ut(this,void 0),this._accessibleDiffViewerShouldBeVisible=Ut(this,!1),this._accessibleDiffViewerVisible=at(this,_=>this._options.onlyShowAccessibleDiffViewer.read(_)?!0:this._accessibleDiffViewerShouldBeVisible.read(_)),this._movedBlocksLinesPart=Ut(this,void 0),this._layoutInfo=at(this,_=>{let E=this._rootSizeObserver.width.read(_),I=this._rootSizeObserver.height.read(_);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=I+"px";let T=this._sash.read(_),N=this._gutter.read(_),L=N?.width.read(_)??0,B=this._overviewRulerPart.read(_)?.width??0,z,Q,Z,U,M;if(!!T){let X=T.sashLeft.read(_),Y=this._movedBlocksLinesPart.read(_)?.width.read(_)??0;z=0,Q=X-L-Y,M=X-L,Z=X,U=E-Z-B}else{M=0;let X=this._options.inlineViewHideOriginalLineNumbers.read(_);z=L,X?Q=0:Q=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(_)),Z=L+Q,U=E-Z-B}return this.elements.original.style.left=z+"px",this.elements.original.style.width=Q+"px",this._editors.original.layout({width:Q,height:I},!0),N?.layout(M),this.elements.modified.style.left=Z+"px",this.elements.modified.style.width=U+"px",this._editors.modified.layout({width:U,height:I},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((_,E)=>_?.diff.read(E)),this.onDidUpdateDiff=Ee.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(He(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new FB(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(Lce,t),this._register(Ct(_=>{this._options.setWidth(this._rootSizeObserver.width.read(_))})),this._contextKeyService.createKey(V.isEmbeddedDiffEditor.key,!1),this._register(qg(V.isEmbeddedDiffEditor,this._contextKeyService,_=>this._options.isInEmbeddedEditor.read(_))),this._register(qg(V.comparingMovedCode,this._contextKeyService,_=>!!this._diffModel.read(_)?.movedTextToCompare.read(_))),this._register(qg(V.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,_=>this._options.couldShowInlineViewBecauseOfSize.read(_))),this._register(qg(V.diffEditorInlineMode,this._contextKeyService,_=>!this._options.renderSideBySide.read(_))),this._register(qg(V.hasChanges,this._contextKeyService,_=>(this._diffModel.read(_)?.diff.read(_)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(kce,this.elements.original,this.elements.modified,this._options,n,(_,E,I,T)=>this._createInnerEditor(_,E,I,T))),this._register(qg(V.diffEditorOriginalWritable,this._contextKeyService,_=>this._options.originalEditable.read(_))),this._register(qg(V.diffEditorModifiedWritable,this._contextKeyService,_=>!this._options.readOnly.read(_))),this._register(qg(V.diffEditorOriginalUri,this._contextKeyService,_=>this._diffModel.read(_)?.model.original.uri.toString()??"")),this._register(qg(V.diffEditorModifiedUri,this._contextKeyService,_=>this._diffModel.read(_)?.model.modified.uri.toString()??"")),this._overviewRulerPart=ya(this,_=>this._options.renderOverviewRuler.read(_)?this._instantiationService.createInstance(gu(VN,_),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(E=>E.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);let c={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((_,E)=>_-(this._overviewRulerPart.read(E)?.width??0))};this._sashLayout=new gce(this._options,c),this._sash=ya(this,_=>{let E=this._options.renderSideBySide.read(_);return this.elements.root.classList.toggle("side-by-side",E),E?new QB(this.elements.root,c,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);let u=ya(this,_=>this._instantiationService.createInstance(gu(KB,_),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);ya(this,_=>this._instantiationService.createInstance(gu(mce,_),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);let d=new Set,h=new Set,f=!1,p=ya(this,_=>this._instantiationService.createInstance(gu(hce,_),rt(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||u.get().isUpdatingHiddenAreas,d,h)).recomputeInitiallyAndOnChange(this._store),g=at(this,_=>{let E=p.read(_).viewZones.read(_).orig,I=u.read(_).viewZones.read(_).origViewZones;return E.concat(I)}),A=at(this,_=>{let E=p.read(_).viewZones.read(_).mod,I=u.read(_).viewZones.read(_).modViewZones;return E.concat(I)});this._register(PB(this._editors.original,g,_=>{f=_},d));let v;this._register(PB(this._editors.modified,A,_=>{f=_,f?v=yf.capture(this._editors.modified):(v?.restore(this._editors.modified),v=void 0)},h)),this._accessibleDiffViewer=ya(this,_=>this._instantiationService.createInstance(gu(uD,_),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(E,I)=>this._accessibleDiffViewerShouldBeVisible.set(E,I),this._options.onlyShowAccessibleDiffViewer.map(E=>!E),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((E,I)=>E?.diff.read(I)?.mappings.map(T=>T.lineRangeMapping)),new sce(this._editors))).recomputeInitiallyAndOnChange(this._store);let w=this._accessibleDiffViewerVisible.map(_=>_?"hidden":"visible");this._register(xp(this.elements.modified,{visibility:w})),this._register(xp(this.elements.original,{visibility:w})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._gutter=ya(this,_=>this._options.shouldRenderGutterMenu.read(_)?this._instantiationService.createInstance(gu(wce,_),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(s0(this._layoutInfo)),ya(this,_=>new(gu(hD,_))(this.elements.root,this._diffModel,this._layoutInfo.map(E=>E.originalEditor),this._layoutInfo.map(E=>E.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,_=>{this._movedBlocksLinesPart.set(_,void 0)}),this._register(Ee.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,_=>this._handleCursorPositionChange(_,!0))),this._register(Ee.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,_=>this._handleCursorPositionChange(_,!1)));let C=this._diffModel.map(this,(_,E)=>{if(_)return _.diff.read(E)===void 0&&!_.isDiffUpToDate.read(E)});this._register(es((_,E)=>{if(C.read(_)===!0){let I=this._editorProgressService.show(!0,1e3);E.add(He(()=>I.done()))}})),this._register(es((_,E)=>{E.add(new(gu(Dce,_))(this._editors,this._diffModel,this._options,this))})),this._register(es((_,E)=>{let I=this._diffModel.read(_);if(I)for(let T of[I.model.original,I.model.modified])E.add(T.onWillDispose(N=>{ft(new fi("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(Ct(_=>{this._options.setModel(this._diffModel.read(_))}))}_createInnerEditor(e,t,n,o){return e.createInstance(cD,t,n,o)}_createDiffEditorContributions(){let e=_y.getDiffEditorContributions();for(let t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){ft(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return uC.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){let e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){let t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(lce,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){let t=e?"model"in e?FN.create(e).createNewRef(this):FN.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){let n=this._diffModel.get();!e&&n&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&Og(t,o=>{let r=e?.object;Ri.batchEventsGlobally(o,()=>{this._editors.original.setModel(r?r.model.original:null),this._editors.modified.setModel(r?r.model.modified:null)});let s=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),o),setTimeout(()=>{s?.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){let e=this._diffModel.get()?.diff.get();return e?adi(e):null}revert(e){let t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){let t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;let n=e.map(o=>({range:o.modifiedRange,text:t.model.original.getValueInRange(o.originalRange)}));this._editors.modified.executeEdits("diffEditor",n)}_goTo(e){this._editors.modified.setPosition(new J(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){let t=this._diffModel.get()?.diff.get()?.mappings;if(!t||t.length===0)return;let n=this._editors.modified.getPosition().lineNumber,o;e==="next"?o=t.find(r=>r.lineRangeMapping.modified.startLineNumber>n)??t[0]:o=Rx(t,r=>r.lineRangeMapping.modified.startLineNumber{let t=e.diff.get()?.mappings;!t||t.length===0||this._goTo(t[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){let e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){let e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,n=e?this._editors.original:this._editors.modified,o,r=t.getSelection();if(r){let s=this._diffModel.get()?.diff.get()?.mappings.map(a=>e?a.lineRangeMapping.flip():a.lineRangeMapping);if(s){let a=xFe(r.getStartPosition(),s),l=xFe(r.getEndPosition(),s);o=R.plusRange(a,l)}}return{destination:n,destinationSelection:o}}switchSide(){let{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){let e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&fn(t=>{for(let n of e)n.collapseAll(t)})}showAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&fn(t=>{for(let n of e)n.showAll(t)})}_handleCursorPositionChange(e,t){if(e?.reason===3){let n=this._diffModel.get()?.diff.get()?.mappings.find(o=>t?o.lineRangeMapping.modified.contains(e.position.lineNumber):o.lineRangeMapping.original.contains(e.position.lineNumber));n?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(Xu.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):n?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(Xu.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):n&&this._accessibilitySignalService.playSignal(Xu.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};f0=sdi([aU(3,Ze),aU(4,Re),aU(5,ei),aU(6,vp),aU(7,dp)],f0)});function cdi(i){if(!i){if(Nbt)return;Nbt=!0}cut(i||Xi.document.body)}function eOe(i,e,t,n,o){if(t=t||"",!n){let r=t.indexOf(` +`),s=t;return r!==-1&&(s=t.substring(0,r)),Mbt(i,t,e.createByFilepathOrFirstLine(o||null,s),o)}return Mbt(i,t,e.createById(n),o)}function Mbt(i,e,t,n){return i.createModel(e,t,n)}var $Fe,hr,ldi,Nbt,Mce,Rce,Fce,Rbt=D(()=>{Zl();de();hs();$W();qRe();DW();cN();go();to();ao();Bt();Ed();ht();Xo();Ic();io();fh();Gy();cC();o0();su();Il();hke();sp();Rs();Hi();Nce();$E();gd();ic();zx();Bg();$Fe=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},hr=function(i,e){return function(t,n){e(t,n,i)}},ldi=0,Nbt=!1;Mce=class extends cD{constructor(e,t,n,o,r,s,a,l,c,u,d,h,f){let p={...t};p.ariaLabel=p.ariaLabel||lne.editorViewAccessibleLabel,super(e,p,{},n,o,r,s,c,u,d,h,f),l instanceof tD?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,cdi(p.ariaContainerElement),idt((g,A)=>n.createInstance(Oy,g,A,{})),odt(a)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let o="DYNAMIC_"+ ++ldi,r=ge.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(o,e,t,r),o}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),H.None;let t=e.id,n=e.label,o=ge.and(ge.equals("editorId",this.getId()),ge.deserialize(e.precondition)),r=e.keybindings,s=ge.and(o,ge.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...p)=>Promise.resolve(e.run(this,...p)),u=new se,d=this.getId()+":"+t;if(u.add(ii.registerCommand(d,c)),a){let f={command:{id:d,title:n},when:o,group:a,order:l};u.add(Xr.appendMenuItem(tt.EditorContext,f))}if(Array.isArray(r))for(let f of r)u.add(this._standaloneKeybindingService.addDynamicKeybinding(d,f,c,s));let h=new NB(d,n,n,void 0,o,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,h),u.add(He(()=>{this._actions.delete(t)})),u}_triggerCommand(e,t){if(this._codeEditorService instanceof FV)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Mce=$Fe([hr(2,Re),hr(3,ei),hr(4,Ii),hr(5,Ze),hr(6,dh),hr(7,Xt),hr(8,Wn),hr(9,_n),hr(10,Es),hr(11,Gi),hr(12,Me)],Mce);Rce=class extends Mce{constructor(e,t,n,o,r,s,a,l,c,u,d,h,f,p,g,A){let v={...t};EW(d,v,!1);let w=c.registerEditorContainer(e);typeof v.theme=="string"&&c.setTheme(v.theme),typeof v.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!v.autoDetectHighContrast);let C=v.model;delete v.model,super(e,v,n,o,r,s,a,l,c,u,h,g,A),this._configurationService=d,this._standaloneThemeService=c,this._register(w);let _;if(typeof C>"u"){let E=p.getLanguageIdByMimeType(v.language)||v.language||fs;_=eOe(f,p,v.value||"",E,void 0),this._ownsModel=!0}else _=C,this._ownsModel=!1;if(this._attachModel(_),_){let E={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(E)}}dispose(){super.dispose()}updateOptions(e){EW(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Rce=$Fe([hr(2,Re),hr(3,ei),hr(4,Ii),hr(5,Ze),hr(6,dh),hr(7,Xt),hr(8,hu),hr(9,_n),hr(10,Et),hr(11,Es),hr(12,an),hr(13,on),hr(14,Gi),hr(15,Me)],Rce);Fce=class extends f0{constructor(e,t,n,o,r,s,a,l,c,u,d,h){let f={...t};EW(l,f,!0);let p=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},o,n,r,h,u),this._configurationService=l,this._standaloneThemeService=s,this._register(p)}dispose(){super.dispose()}updateOptions(e){EW(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(Mce,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};Fce=$Fe([hr(2,Re),hr(3,Ze),hr(4,ei),hr(5,hu),hr(6,_n),hr(7,Et),hr(8,ia),hr(9,dp),hr(10,Ah),hr(11,vp)],Fce)});var Fbt=D(()=>{});var udi,Obt,Oce,JB,tOe=D(()=>{Ye();ure();oo();de();In();r0();_C();Nce();Xx();sU();go();ht();QFe();Bt();uN();udi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Obt=function(i,e){return function(t,n){e(t,n,i)}},Oce=class{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}},JB=class extends H{constructor(e,t,n,o,r){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=n,this._instantiationService=o,this._viewModel=Ut(this,void 0),this._collapsed=at(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=Ut(this,500),this.contentHeight=at(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=Ut(this,0),this._modifiedWidth=Ut(this,0),this._originalContentWidth=Ut(this,0),this._originalWidth=Ut(this,0),this.maxScroll=at(this,l=>{let c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),u=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>u?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:u,width:this._originalWidth.read(l)}}),this._elements=ci("div.multiDiffEntry",[ci("div.header@header",[ci("div.header-content",[ci("div.collapse-button@collapseButton"),ci("div.file-path",[ci("div.title.modified.show-file-icons@primaryPath",[]),ci("div.status.deleted@status",["R"]),ci("div.title.original.show-file-icons@secondaryPath",[])]),ci("div.actions@actions")])]),ci("div.editorParent",[ci("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(f0,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=Fl(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Fl(this.editor.getOriginalEditor()).isFocused,this.isFocused=at(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new se),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;let s=new oC(this._elements.collapseButton,{});this._register(Ct(l=>{s.element.className="",s.icon=this._collapsed.read(l)?De.chevronRight:De.chevronDown})),this._register(s.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register(Ct(l=>{this._elements.editor.style.display=this._collapsed.read(l)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{let c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{let c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{RL(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;let c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(Ct(l=>{let c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(r.createScoped(this._elements.actions));let a=this._register(this._instantiationService.createChild(new _m([Ze,this._contextKeyService])));this._register(a.createInstance(YB,this._elements.actions,tt.MultiDiffEditorFileToolbar,{actionRunner:this._register(new GB(()=>this._viewModel.get()?.modifiedUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>Wne(a,l,c)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(o){return{...o,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){RL(o=>{this._viewModel.set(void 0,o),this.editor.setDiffModel(null,o),this._dataStore.clear()});return}let n=e.viewModel.documentDiffItem;if(RL(o=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let r=!1,s=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",r=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",s=!0),this._elements.status.classList.toggle("renamed",r),this._elements.status.classList.toggle("deleted",s),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,this._resourceLabel2?.setUri(r?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,o),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,o),this.editor.updateOptions(t(n.options??{}))}),n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{this.editor.updateOptions(t(n.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,o=>{o||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(let[o,r]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(o,r)}render(e,t,n,o){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";let r=e.length-this._headerHeight,s=Math.max(0,Math.min(o.start-e.start,r));this._elements.header.style.transform=`translateY(${s}px)`,RL(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=n,this.editor.getOriginalEditor().setScrollTop(n)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",s>0||n>0),this._elements.header.classList.toggle("collapsed",s===r)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};JB=udi([Obt(3,Re),Obt(4,Ze)],JB)});var Pce,Pbt=D(()=>{Pce=class{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{let n=[...this._unused.values()];t=n.find(o=>this._itemData.get(o).getId()===e.getId())??n[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(let e of this._used)e.dispose();for(let e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}});var ddi,Bbt,Bce,iOe,zbt=D(()=>{Ye();Mg();Wt();lp();Tt();de();In();r0();GO();Fbt();Gg();ap();Qn();An();Bt();ht();uN();tOe();Pbt();Be();ddi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Bbt=function(i,e){return function(t,n){e(t,n,i)}},Bce=class extends H{constructor(e,t,n,o,r,s){super(),this._element=e,this._dimension=t,this._viewModel=n,this._workbenchUIElementFactory=o,this._parentContextKeyService=r,this._parentInstantiationService=s,this._scrollableElements=ci("div.scrollContent",[ci("div@content",{style:{overflow:"hidden"}}),ci("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new Ng({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>Cl(rt(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new Py(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=ci("div.monaco-component.multiDiffEditor",{},[ci("div",{},[this._scrollableElement.getDomNode()]),ci("div.placeholder@placeholder",{},[ci("div",[y("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new FB(this._element,void 0)),this._objectPool=this._register(new Pce(l=>{let c=this._instantiationService.createInstance(JB,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return c.setData(l),c})),this.scrollTop=Ri(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Ri(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=ph(this,(l,c)=>{let u=this._viewModel.read(l);if(!u)return{items:[],getItem:p=>{throw new fi}};let d=u.items.read(l),h=new Map;return{items:d.map(p=>{let g=c.add(new iOe(p,this._objectPool,this.scrollLeft,v=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+v})})),A=this._lastDocStates?.[g.getKey()];return A&&fn(v=>{g.setViewState(A,v)}),h.set(p,g),g}),getItem:p=>h.get(p)}}),this._viewItems=this._viewItemsInfo.map(this,l=>l.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(l,c)=>l.reduce((u,d)=>u+d.contentHeight.read(c)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new _m([Ze,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(V.inMultiDiffEditor.key,!0),this._register(es((l,c)=>{let u=this._viewModel.read(l);if(u&&u.contextKeys)for(let[d,h]of Object.entries(u.contextKeys)){let f=this._contextKeyService.createKey(d,void 0);f.set(h),c.add(He(()=>f.reset()))}}));let a=this._parentContextKeyService.createKey(V.multiDiffEditorAllCollapsed.key,!1);this._register(Ct(l=>{let c=this._viewModel.read(l);if(c){let u=c.items.read(l).every(d=>d.collapsed.read(l));a.set(u)}})),this._register(Ct(l=>{let c=this._dimension.read(l);this._sizeObserver.observe(c)})),this._register(Ct(l=>{let c=this._viewItems.read(l);this._elements.placeholder.classList.toggle("visible",c.length===0)})),this._scrollableElements.content.style.position="relative",this._register(Ct(l=>{let c=this._sizeObserver.height.read(l);this._scrollableElements.root.style.height=`${c}px`;let u=this._totalHeight.read(l);this._scrollableElements.content.style.height=`${u}px`;let d=this._sizeObserver.width.read(l),h=d,f=this._viewItems.read(l),p=CV(f,pa(g=>g.maxScroll.read(l).maxScroll,vd));if(p){let g=p.maxScroll.read(l);h=d+g.maxScroll}this._scrollableElement.setScrollDimensions({width:d,height:c,scrollHeight:u,scrollWidth:h})})),e.replaceChildren(this._elements.root),this._register(He(()=>{e.replaceChildren()})),this._register(this._register(Ct(l=>{RL(c=>{this.render(l)})})))}render(e){let t=this.scrollTop.read(e),n=0,o=0,r=0,s=this._sizeObserver.height.read(e),a=Ci.ofStartAndLength(t,s),l=this._sizeObserver.width.read(e);for(let c of this._viewItems.read(e)){let u=c.contentHeight.read(e),d=Math.min(u,s),h=Ci.ofStartAndLength(o,d),f=Ci.ofStartAndLength(r,u);if(f.isBefore(a))n-=u-d,c.hide();else if(f.isAfter(a))c.hide();else{let p=Math.max(0,Math.min(a.start-f.start,u-d));n-=p;let g=Ci.ofStartAndLength(t+n,s);c.render(h,p,l,g)}o+=d+this._spaceBetweenPx,r+=u+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+n)}px)`}};Bce=ddi([Bbt(4,Ze),Bbt(5,Re)],Bce);iOe=class extends H{constructor(e,t,n,o){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=n,this._deltaScrollVertical=o,this._templateRef=this._register(Ky(this,void 0)),this.contentHeight=at(this,r=>this._templateRef.read(r)?.object.contentHeight?.read(r)??this.viewModel.lastTemplateData.read(r).contentHeight),this.maxScroll=at(this,r=>this._templateRef.read(r)?.object.maxScroll.read(r)??{maxScroll:0,scrollWidth:0}),this.template=at(this,r=>this._templateRef.read(r)?.object),this._isHidden=Ut(this,!1),this._isFocused=at(this,r=>this.template.read(r)?.isFocused.read(r)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(Ct(r=>{let s=this._scrollLeft.read(r);this._templateRef.read(r)?.object.setScrollLeft(s)})),this._register(Ct(r=>{let s=this._templateRef.read(r);!s||!this._isHidden.read(r)||s.object.isFocused.read(r)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);let n=this.viewModel.lastTemplateData.get(),o=e.selections?.map(qe.liftSelection);this.viewModel.lastTemplateData.set({...n,selections:o},t);let r=this._templateRef.get();r&&o&&r.object.editor.setSelections(o)}_updateTemplateData(e){let t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){let e=this._templateRef.get();e&&fn(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,n,o){this._isHidden.set(!1,void 0);let r=this._templateRef.get();if(!r){r=this._objectPool.getUnusedObj(new Oce(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(r,void 0);let s=this.viewModel.lastTemplateData.get().selections;s&&r.object.editor.setSelections(s)}r.object.render(e,n,t,o)}}});var IVn,LVn,NVn,Vbt=D(()=>{Be();nr();IVn=j("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},y("multiDiffEditor.headerBackground","The background color of the diff editor's header")),LVn=j("multiDiffEditor.background",Zh,y("multiDiffEditor.background","The background color of the multi file diff editor")),NVn=j("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},y("multiDiffEditor.border","The border color of the multi file diff editor"))});var hdi,fdi,zce,Hbt=D(()=>{de();In();UB();zbt();ht();Vbt();tOe();hdi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},fdi=function(i,e){return function(t,n){e(t,n,i)}},zce=class extends H{constructor(e,t,n){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=n,this._dimension=Ut(this,void 0),this._viewModel=Ut(this,void 0),this._widgetImpl=ph(this,(o,r)=>(gu(JB,o),r.add(this._instantiationService.createInstance(gu(Bce,o),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(s0(this._widgetImpl))}};zce=hdi([fdi(2,Re)],zce)});function pdi(i,e,t){return Zt.initialize(t||{}).createInstance(Rce,i,e)}function mdi(i){return Zt.get(ei).onCodeEditorAdd(t=>{i(t)})}function gdi(i){return Zt.get(ei).onDiffEditorAdd(t=>{i(t)})}function bdi(){return Zt.get(ei).listCodeEditors()}function Adi(){return Zt.get(ei).listDiffEditors()}function vdi(i,e,t){return Zt.initialize(t||{}).createInstance(Fce,i,e)}function ydi(i,e){let t=Zt.initialize(e||{});return new zce(i,{},t)}function wdi(i){if(typeof i.id!="string"||typeof i.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return ii.registerCommand(i.id,i.run)}function xdi(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");let e=ge.deserialize(i.precondition),t=(o,...r)=>Eo.runEditorCommand(o,r,e,(s,a,l)=>Promise.resolve(i.run(a,...l))),n=new se;if(n.add(ii.registerCommand(i.id,t)),i.contextMenuGroupId){let o={command:{id:i.id,title:i.label},when:e,group:i.contextMenuGroupId,order:i.contextMenuOrder||0};n.add(Xr.appendMenuItem(tt.EditorContext,o))}if(Array.isArray(i.keybindings)){let o=Zt.get(Xt);if(!(o instanceof tD))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{let r=ge.and(e,ge.deserialize(i.keybindingContext));n.add(o.addDynamicKeybindings(i.keybindings.map(s=>({keybinding:s,command:i.id,when:r}))))}}return n}function Cdi(i){return Wbt([i])}function Wbt(i){let e=Zt.get(Xt);return e instanceof tD?e.addDynamicKeybindings(i.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:ge.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),H.None)}function _di(i,e,t){let n=Zt.get(on),o=n.getLanguageIdByMimeType(e)||e;return eOe(Zt.get(an),n,i,o,t)}function Sdi(i,e){let t=Zt.get(on),n=t.getLanguageIdByMimeType(e)||e||fs;i.setLanguage(t.createById(n))}function Edi(i,e,t){i&&Zt.get(pf).changeOne(e,i.uri,t)}function Ddi(i){Zt.get(pf).changeAll(i,[])}function Tdi(i){return Zt.get(pf).read(i)}function kdi(i){return Zt.get(pf).onMarkerChanged(i)}function Idi(i){return Zt.get(an).getModel(i)}function Ldi(){return Zt.get(an).getModels()}function Ndi(i){return Zt.get(an).onModelAdded(i)}function Mdi(i){return Zt.get(an).onModelRemoved(i)}function Rdi(i){return Zt.get(an).onModelLanguageChanged(t=>{i({model:t.model,oldLanguage:t.oldLanguageId})})}function Fdi(i){return rmt(Zt.get(an),i)}function Odi(i,e){let t=Zt.get(on),n=Zt.get(hu);return fB.colorizeElement(n,t,i,e).then(()=>{n.registerEditorContainer(i)})}function Pdi(i,e,t){let n=Zt.get(on);return Zt.get(hu).registerEditorContainer(Xi.document.body),fB.colorize(n,i,e,t)}function Bdi(i,e,t=4){return Zt.get(hu).registerEditorContainer(Xi.document.body),fB.colorizeModelLine(i,e,t)}function zdi(i){let e=Gn.get(i);return e||{getInitialState:()=>Uy,tokenize:(t,n,o)=>ZO(i,o)}}function Vdi(i,e){Gn.getOrCreate(e);let t=zdi(e),n=Uu(i),o=[],r=t.getInitialState();for(let s=0,a=n.length;s{if(!n)return null;let r=t.options?.selection,s;return r&&typeof r.endLineNumber=="number"&&typeof r.endColumn=="number"?s=r:r&&(s={lineNumber:r.startLineNumber,column:r.startColumn}),await i.openCodeEditor(n,t.resource,s)?n:null})}function Ubt(){return{create:pdi,getEditors:bdi,getDiffEditors:Adi,onDidCreateEditor:mdi,onDidCreateDiffEditor:gdi,createDiffEditor:vdi,addCommand:wdi,addEditorAction:xdi,addKeybindingRule:Cdi,addKeybindingRules:Wbt,createModel:_di,setModelLanguage:Sdi,setModelMarkers:Edi,getModelMarkers:Tdi,removeAllMarkers:Ddi,onDidChangeMarkers:kdi,getModels:Ldi,getModel:Idi,onDidCreateModel:Ndi,onWillDisposeModel:Mdi,onDidChangeModelLanguage:Rdi,createWebWorker:Fdi,colorizeElement:Odi,colorize:Pdi,colorizeModelLine:Bdi,tokenize:Vdi,defineTheme:Hdi,setTheme:Wdi,remeasureFonts:Udi,registerCommand:jdi,registerLinkOpener:Qdi,registerEditorOpener:Gdi,AccessibilitySupport:iJ,ContentWidgetPositionPreference:lJ,CursorChangeReason:cJ,DefaultEndOfLine:uJ,EditorAutoIndentStrategy:hJ,EditorOption:fJ,EndOfLinePreference:pJ,EndOfLineSequence:mJ,MinimapPosition:_J,MinimapSectionHeaderStyle:SJ,MouseTargetType:EJ,OverlayWidgetPositionPreference:kJ,OverviewRulerLane:IJ,GlyphMarginLane:gJ,RenderLineNumbersType:MJ,RenderMinimap:RJ,ScrollbarVisibility:OJ,ScrollType:FJ,TextEditorCursorBlinkingStyle:WJ,TextEditorCursorStyle:UJ,TrackedRangeStickiness:jJ,WrappingIndent:QJ,InjectedTextCursorStops:vJ,PositionAffinity:NJ,ShowLightbulbIconMode:BJ,ConfigurationChangedEvent:yO,BareFontInfo:XI,FontInfo:ZI,TextModelResolvedOptions:hE,FindMatch:Ty,ApplyUpdateResult:$S,EditorZoom:wd,createMultiFileDiffEditor:ydi,EditorType:uC,EditorOptions:of}}var jbt=D(()=>{gd();de();Rt();mn();Gst();YDe();Jt();hs();smt();ea();_O();Fee();TW();ro();Il();sp();$O();ol();su();xk();mmt();Rbt();DW();cN();go();to();Bt();Xo();o1();Dd();Hbt()});function qdi(i,e){if(!e||!Array.isArray(e))return!1;for(let t of e)if(!i(t))return!1;return!0}function Vce(i,e){return typeof i=="boolean"?i:e}function Qbt(i,e){return typeof i=="string"?i:e}function Ydi(i){let e={};for(let t of i)e[t]=!0;return e}function Gbt(i,e=!1){e&&(i=i.map(function(n){return n.toLowerCase()}));let t=Ydi(i);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function nOe(i,e,t){e=e.replace(/@@/g,"");let n=0,o;do o=!1,e=e.replace(/@(\w+)/g,function(s,a){o=!0;let l="";if(typeof i[a]=="string")l=i[a];else if(i[a]&&i[a]instanceof RegExp)l=i[a].source;else throw i[a]===void 0?Zo(i,"language definition does not contain attribute '"+a+"', used at: "+e):Zo(i,"attribute reference '"+a+"' must be a string, used at: "+e);return iD(l)?"":"(?:"+l+")"}),n++;while(o&&n<5);e=e.replace(/\x01/g,"@");let r=(i.ignoreCase?"i":"")+(i.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(umt(i,e,c),r)),l)}return new RegExp(e,r)}function Kdi(i,e,t,n){if(n<0)return i;if(n=100){n=n-100;let o=t.split(".");if(o.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw Zo(i,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw Zo(i,"the next state must be a string value in rule: "+e);{let o=t.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!dmt(i,S1(i,o,"",[],""))))throw Zo(i,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=o}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,i.usesEmbedded=!0),n}}else if(Array.isArray(t)){let n=[];for(let o=0,r=t.length;o=1&&c.length<=3)if(d.setRegex(n,c[0]),c.length>=3)if(typeof c[1]=="string")d.setAction(n,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){let h=c[1];h.next=c[2],d.setAction(n,h)}else throw Zo(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+s);else d.setAction(n,c[1]);else{if(!c.regex)throw Zo(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+s);c.name&&typeof c.name=="string"&&(d.name=c.name),c.matchOnlyAtStart&&(d.matchOnlyAtLineStart=Vce(c.matchOnlyAtLineStart,!1)),d.setRegex(n,c.regex),d.setAction(n,c.action)}a.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Zo(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let s in e.tokenizer)if(e.tokenizer.hasOwnProperty(s)){t.start||(t.start=s);let a=e.tokenizer[s];t.tokenizer[s]=new Array,o("tokenizer."+s,t.tokenizer[s],a)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Zo(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let s of e.brackets){let a=s;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Zo(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")r.push({token:a.token+t.tokenPostfix,open:YA(t,a.open),close:YA(t,a.close)});else throw Zo(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=r,t.noThrow=!0,t}var rOe,qbt=D(()=>{VMe();rOe=class{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let n;if(typeof t=="string")n=t;else if(t instanceof RegExp)n=t.source;else throw Zo(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=n.length>0&&n[0]==="^",this.name=this.name+": "+n,this.regex=nOe(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")",!0)}setAction(e,t){this.action=oOe(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}});function Xdi(i){lE.registerLanguage(i)}function Zdi(){let i=[];return i=i.concat(lE.getLanguages()),i}function $di(i){return Zt.get(on).languageIdCodec.encodeLanguageId(i)}function ehi(i,e){return Zt.withServices(()=>{let n=Zt.get(on).onDidRequestRichLanguageFeatures(o=>{o===i&&(n.dispose(),e())});return n})}function thi(i,e){return Zt.withServices(()=>{let n=Zt.get(on).onDidRequestBasicLanguageFeatures(o=>{o===i&&(n.dispose(),e())});return n})}function ihi(i,e){if(!Zt.get(on).isRegisteredLanguageId(i))throw new Error(`Cannot set configuration for unknown language ${i}`);return Zt.get(Gi).register(i,e,100)}function nhi(i){return typeof i.getInitialState=="function"}function ohi(i){return"tokenizeEncoded"in i}function Ybt(i){return i&&typeof i.then=="function"}function rhi(i){let e=Zt.get(hu);if(i){let t=[null];for(let n=1,o=i.length;n{let n=await Promise.resolve(e.create());return n?nhi(n)?Kbt(i,n):new fN(Zt.get(on),Zt.get(hu),i,sOe(i,n),Zt.get(Et)):null});return Gn.registerFactory(i,t)}function shi(i,e){if(!Zt.get(on).isRegisteredLanguageId(i))throw new Error(`Cannot set tokens provider for unknown language ${i}`);return Ybt(e)?lOe(i,{create:()=>e}):Gn.register(i,Kbt(i,e))}function ahi(i,e){let t=n=>new fN(Zt.get(on),Zt.get(hu),i,sOe(i,n),Zt.get(Et));return Ybt(e)?lOe(i,{create:()=>e}):Gn.register(i,t(e))}function lhi(i,e){return Zt.get(Me).referenceProvider.register(i,e)}function chi(i,e){return Zt.get(Me).renameProvider.register(i,e)}function uhi(i,e){return Zt.get(Me).newSymbolNamesProvider.register(i,e)}function dhi(i,e){return Zt.get(Me).signatureHelpProvider.register(i,e)}function hhi(i,e){return Zt.get(Me).hoverProvider.register(i,{provideHover:async(n,o,r,s)=>{let a=n.getWordAtPosition(o);return Promise.resolve(e.provideHover(n,o,r,s)).then(l=>{if(l)return!l.range&&a&&(l.range=new R(o.lineNumber,a.startColumn,o.lineNumber,a.endColumn)),l.range||(l.range=new R(o.lineNumber,o.column,o.lineNumber,o.column)),l})}})}function fhi(i,e){return Zt.get(Me).documentSymbolProvider.register(i,e)}function phi(i,e){return Zt.get(Me).documentHighlightProvider.register(i,e)}function mhi(i,e){return Zt.get(Me).linkedEditingRangeProvider.register(i,e)}function ghi(i,e){return Zt.get(Me).definitionProvider.register(i,e)}function bhi(i,e){return Zt.get(Me).implementationProvider.register(i,e)}function Ahi(i,e){return Zt.get(Me).typeDefinitionProvider.register(i,e)}function vhi(i,e){return Zt.get(Me).codeLensProvider.register(i,e)}function yhi(i,e,t){return Zt.get(Me).codeActionProvider.register(i,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(o,r,s,a)=>{let c=Zt.get(pf).read({resource:o.uri}).filter(u=>R.areIntersectingOrTouching(u,r));return e.provideCodeActions(o,r,{markers:c,only:s.only,trigger:s.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function whi(i,e){return Zt.get(Me).documentFormattingEditProvider.register(i,e)}function xhi(i,e){return Zt.get(Me).documentRangeFormattingEditProvider.register(i,e)}function Chi(i,e){return Zt.get(Me).onTypeFormattingEditProvider.register(i,e)}function _hi(i,e){return Zt.get(Me).linkProvider.register(i,e)}function Shi(i,e){return Zt.get(Me).completionProvider.register(i,e)}function Ehi(i,e){return Zt.get(Me).colorProvider.register(i,e)}function Dhi(i,e){return Zt.get(Me).foldingRangeProvider.register(i,e)}function Thi(i,e){return Zt.get(Me).declarationProvider.register(i,e)}function khi(i,e){return Zt.get(Me).selectionRangeProvider.register(i,e)}function Ihi(i,e){return Zt.get(Me).documentSemanticTokensProvider.register(i,e)}function Lhi(i,e){return Zt.get(Me).documentRangeSemanticTokensProvider.register(i,e)}function Nhi(i,e){return Zt.get(Me).inlineCompletionsProvider.register(i,e)}function Mhi(i,e){return Zt.get(Me).inlineEditProvider.register(i,e)}function Rhi(i,e){return Zt.get(Me).inlayHintsProvider.register(i,e)}function Jbt(){return{register:Xdi,getLanguages:Zdi,onLanguage:ehi,onLanguageEncountered:thi,getEncodedLanguageId:$di,setLanguageConfiguration:ihi,setColorMap:rhi,registerTokensProviderFactory:lOe,setTokensProvider:shi,setMonarchTokensProvider:ahi,registerReferenceProvider:lhi,registerRenameProvider:chi,registerNewSymbolNameProvider:uhi,registerCompletionItemProvider:Shi,registerSignatureHelpProvider:dhi,registerHoverProvider:hhi,registerDocumentSymbolProvider:fhi,registerDocumentHighlightProvider:phi,registerLinkedEditingRangeProvider:mhi,registerDefinitionProvider:ghi,registerImplementationProvider:bhi,registerTypeDefinitionProvider:Ahi,registerCodeLensProvider:vhi,registerCodeActionProvider:yhi,registerDocumentFormattingEditProvider:whi,registerDocumentRangeFormattingEditProvider:xhi,registerOnTypeFormattingEditProvider:Chi,registerLinkProvider:_hi,registerColorProvider:Ehi,registerFoldingRangeProvider:Dhi,registerDeclarationProvider:Thi,registerSelectionRangeProvider:khi,registerDocumentSemanticTokensProvider:Ihi,registerDocumentRangeSemanticTokensProvider:Lhi,registerInlineCompletionsProvider:Nhi,registerInlineEditProvider:Mhi,registerInlayHintsProvider:Rhi,DocumentHighlightKind:dJ,CompletionItemKind:rJ,CompletionItemTag:sJ,CompletionItemInsertTextRule:oJ,SymbolKind:VJ,SymbolTag:HJ,IndentAction:AJ,CompletionTriggerKind:aJ,SignatureHelpTriggerKind:zJ,InlayHintKind:yJ,InlineCompletionTriggerKind:wJ,InlineEditTriggerKind:xJ,CodeActionTriggerType:nJ,NewSymbolNameTag:DJ,NewSymbolNameTriggerKind:TJ,PartialAcceptTriggerKind:LJ,HoverVerbosityAction:bJ,FoldingRangeKind:Vv,SelectedSuggestionInfo:vR}}var aOe,Hce,Xbt=D(()=>{Wr();Ue();ro();Il();Rs();sp();Hi();xk();DW();qbt();jMe();cN();ao();o1();aOe=class{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return Hce.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){let o=this._actual.tokenizeEncoded(e,n);return new Lw(o.tokens,o.endState)}},Hce=class i{constructor(e,t,n,o){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=o}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){let n=[],o=0;for(let r=0,s=e.length;r0&&r[s-1]===h)continue;let f=d.startIndex;c===0?f=0:f{Jt();Bt();sn();Pp();ht();Dc();Be();cOe=At("IEditorCancelService"),Zbt=new ze("cancellableOperation",!1,y("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));oi(cOe,class{constructor(){this._tokens=new WeakMap}add(i,e){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(o=>{let r=Zbt.bindTo(o.get(Ze)),s=new Br;return{key:r,tokens:s}}),this._tokens.set(i,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(i){let e=this._tokens.get(i);if(!e)return;let t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);Wce=class extends Mi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(cOe).add(e,this))}dispose(){this._unregister(),super.dispose()}};Qe(new class extends Eo{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:Zbt})}runEditorCommand(i,e){i.get(cOe).cancel(e)}})});var XB,Cp,HN,SC=D(()=>{Rt();Ue();sn();de();$bt();XB=class i{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){let n=e.getModel();this.modelVersionId=n?gg("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof i))return!1;let t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new i(e,this.flags))}},Cp=class extends Wce{constructor(e,t,n,o){super(e,o),this._listener=new se,t&4&&this._listener.add(e.onDidChangeCursorPosition(r=>{(!n||!R.containsPosition(n,r.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(r=>{(!n||!R.containsRange(n,r.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(r=>this.cancel())),this._listener.add(e.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}},HN=class extends Mi{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}});function p0(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===uC.ICodeEditor:!1}function lU(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===uC.IDiffEditor:!1}function Fhi(i){return!!i&&typeof i=="object"&&typeof i.onDidChangeActiveEditor=="function"}function Uce(i){return p0(i)?i:lU(i)?i.getModifiedEditor():Fhi(i)&&p0(i.activeCodeEditor)?i.activeCodeEditor:null}var ZB=D(()=>{TW()});var WN,uOe=D(()=>{gm();Ue();MN();WN=class i{static _handleEolEdits(e,t){let n,o=[];for(let r of t)typeof r.eol=="number"&&(n=r.eol),r.range&&typeof r.text=="string"&&o.push(r);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),o}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let n=e.getModel(),o=n.validateRange(t.range);return n.getFullModelRange().equalsRange(o)}static execute(e,t,n){n&&e.pushUndoStop();let o=yf.capture(e),r=i._handleEolEdits(e,t);r.length===1&&i._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(s=>kn.replace(R.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",r.map(s=>kn.replaceMove(R.lift(s.range),s.text))),n&&e.pushUndoStop(),o.restoreRelativeVerticalPositionOfCursor(e)}}});var jce,Qce,e0t=D(()=>{jce=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}},Qce=class{constructor(e){if(this._set=new Set,e)for(let t of e)this.add(t)}add(e){this._set.add(jce.toKey(e))}has(e){return this._set.has(jce.toKey(e))}}});function t0t(i,e,t){let n=[],o=new Qce,r=i.ordered(t);for(let a of r)n.push(a),a.extensionId&&o.add(a.extensionId);let s=e.ordered(t);for(let a of s){if(a.extensionId){if(o.has(a.extensionId))continue;o.add(a.extensionId)}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,u){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,u)}})}return n}async function dOe(i,e,t,n,o,r,s){let a=i.get(Re),{documentRangeFormattingEditProvider:l}=i.get(Me),c=p0(e)?e.getModel():e,u=l.ordered(c),d=await $B.select(u,c,n,2);d&&(o.report(d),await a.invokeFunction(Ohi,d,e,t,r,s))}async function Ohi(i,e,t,n,o,r){let s=i.get(wa),a=i.get(sr),l=i.get(vp),c,u;p0(t)?(c=t.getModel(),u=new Cp(t,5,void 0,o)):(c=t,u=new HN(t,o));let d=[],h=0;for(let v of gO(n).sort(R.compareRangesUsingStarts))h>0&&R.areIntersectingOrTouching(d[h-1],v)?d[h-1]=R.fromPositions(d[h-1].getStartPosition(),v.getEndPosition()):h=d.push(v);let f=async v=>{a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,v);let w=await e.provideDocumentRangeFormattingEdits(c,v,c.getFormattingOptions(),u.token)||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,w),w},p=(v,w)=>{if(!v.length||!w.length)return!1;let C=v.reduce((_,E)=>R.plusRange(_,E.range),v[0].range);if(!w.some(_=>R.intersectRanges(C,_.range)))return!1;for(let _ of v)for(let E of w)if(R.intersectRanges(_.range,E.range))return!0;return!1},g=[],A=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,d);let v=await e.provideDocumentRangesFormattingEdits(c,d,c.getFormattingOptions(),u.token)||[];a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,v),A.push(v)}else{for(let v of d){if(u.token.isCancellationRequested)return!0;A.push(await f(v))}for(let v=0;v({text:C.text,range:R.lift(C.range),forceMoveMarkers:!0})),C=>{for(let{range:_}of C)if(R.areIntersectingOrTouching(_,w))return[new qe(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn)];return null})}return l.playSignal(Xu.format,{userGesture:r}),!0}async function i0t(i,e,t,n,o,r){let s=i.get(Re),a=i.get(Me),l=p0(e)?e.getModel():e,c=t0t(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),u=await $B.select(c,l,t,1);u&&(n.report(u),await s.invokeFunction(Phi,u,e,t,o,r))}async function Phi(i,e,t,n,o,r){let s=i.get(wa),a=i.get(vp),l,c;p0(t)?(l=t.getModel(),c=new Cp(t,5,void 0,o)):(l=t,c=new HN(t,o));let u;try{let d=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(u=await s.computeMoreMinimalEdits(l.uri,d),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||u.length===0)return!1;if(p0(t))WN.execute(t,u,n!==2),n!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{let[{range:d}]=u,h=new qe(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);l.pushEditOperations([h],u.map(f=>({text:f.text,range:R.lift(f.range),forceMoveMarkers:!0})),f=>{for(let{range:p}of f)if(R.areIntersectingOrTouching(p,h))return[new qe(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn)];return null})}return a.playSignal(Xu.format,{userGesture:r}),!0}async function Bhi(i,e,t,n,o,r){let s=e.documentRangeFormattingEditProvider.ordered(t);for(let a of s){let l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,o,r)).catch(ln);if(Kr(l))return await i.computeMoreMinimalEdits(t.uri,l)}}async function zhi(i,e,t,n,o){let r=t0t(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(let s of r){let a=await Promise.resolve(s.provideDocumentFormattingEdits(t,n,o)).catch(ln);if(Kr(a))return await i.computeMoreMinimalEdits(t.uri,a)}}function hOe(i,e,t,n,o,r,s){let a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,o,r,s)).catch(ln).then(l=>i.computeMoreMinimalEdits(t.uri,l))}var $B,fOe=D(()=>{Wt();sn();Tt();ld();Pp();gn();mn();SC();ZB();kt();Ue();Qn();WA();dm();uOe();to();e0t();ht();Hi();ch();$E();$B=class i{static{this._selectors=new Br}static setFormatterSelector(e){return{dispose:i._selectors.unshift(e)}}static async select(e,t,n,o){if(e.length===0)return;let r=hi.first(i._selectors);if(r)return await r(e,t,n,o)}};ii.registerCommand("_executeFormatRangeProvider",async function(i,...e){let[t,n,o]=e;gi(Je.isUri(t)),gi(R.isIRange(n));let r=i.get(Ss),s=i.get(wa),a=i.get(Me),l=await r.createModelReference(t);try{return Bhi(s,a,l.object.textEditorModel,R.lift(n),o,Nt.None)}finally{l.dispose()}});ii.registerCommand("_executeFormatDocumentProvider",async function(i,...e){let[t,n]=e;gi(Je.isUri(t));let o=i.get(Ss),r=i.get(wa),s=i.get(Me),a=await o.createModelReference(t);try{return zhi(r,s,a.object.textEditorModel,n,Nt.None)}finally{a.dispose()}});ii.registerCommand("_executeFormatOnTypeProvider",async function(i,...e){let[t,n,o,r]=e;gi(Je.isUri(t)),gi(J.isIPosition(n)),gi(typeof o=="string");let s=i.get(Ss),a=i.get(wa),l=i.get(Me),c=await s.createModelReference(t);try{return hOe(a,l,c.object.textEditorModel,J.lift(n),o,r,Nt.None)}finally{c.dispose()}})});var UN={};ad(UN,{CancellationTokenSource:()=>n0t,Emitter:()=>Gce,KeyCode:()=>o0t,KeyMod:()=>r0t,MarkerSeverity:()=>u0t,MarkerTag:()=>d0t,Position:()=>s0t,Range:()=>a0t,Selection:()=>l0t,SelectionDirection:()=>c0t,Token:()=>h0t,Uri:()=>qce,editor:()=>Yg,languages:()=>Kg});var wh,n0t,Gce,o0t,r0t,s0t,a0t,l0t,c0t,u0t,d0t,qce,h0t,Yg,Kg,Vhi,jN=D(()=>{ea();H6();jbt();Xbt();fOe();of.wrappingIndent.defaultValue=0;of.glyphMargin.defaultValue=!1;of.autoIndent.defaultValue=3;of.overviewRulerLanes.defaultValue=2;$B.setFormatterSelector((i,e,t)=>Promise.resolve(i[0]));wh=GJ();wh.editor=Ubt();wh.languages=Jbt();n0t=wh.CancellationTokenSource,Gce=wh.Emitter,o0t=wh.KeyCode,r0t=wh.KeyMod,s0t=wh.Position,a0t=wh.Range,l0t=wh.Selection,c0t=wh.SelectionDirection,u0t=wh.MarkerSeverity,d0t=wh.MarkerTag,qce=wh.Uri,h0t=wh.Token,Yg=wh.editor,Kg=wh.languages,Vhi=globalThis.MonacoEnvironment;(Vhi?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=wh);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})});function g0t(i){let e=i.id;p0t[e]=i,cU.languages.register(i);let t=Ghi.getOrCreate(e);cU.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),cU.languages.onLanguageEncountered(e,async()=>{let n=await t.load();cU.languages.setLanguageConfiguration(e,n.conf)})}var Hhi,Whi,Uhi,jhi,f0t,Qhi,cU,p0t,pOe,Ghi,b0t=D(()=>{jN();Hhi=Object.defineProperty,Whi=Object.getOwnPropertyDescriptor,Uhi=Object.getOwnPropertyNames,jhi=Object.prototype.hasOwnProperty,f0t=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Uhi(e))!jhi.call(i,o)&&o!==t&&Hhi(i,o,{get:()=>e[o],enumerable:!(n=Whi(e,o))||n.enumerable});return i},Qhi=(i,e,t)=>(f0t(i,e,"default"),t&&f0t(t,e,"default")),cU={};Qhi(cU,UN);p0t={},pOe={},Ghi=class m0t{static getOrCreate(e){return pOe[e]||(pOe[e]=new m0t(e)),pOe[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,n)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,p0t[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}});var A0t={};ad(A0t,{conf:()=>qhi,language:()=>Yhi});var qhi,Yhi,v0t=D(()=>{qhi={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},Yhi={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}});var y0t=D(()=>{b0t();g0t({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Promise.resolve().then(()=>(v0t(),A0t))})});var UAt={};ad(UAt,{CompletionAdapter:()=>TAt,DefinitionAdapter:()=>dfi,DiagnosticsAdapter:()=>DAt,DocumentColorAdapter:()=>PAt,DocumentFormattingEditProvider:()=>RAt,DocumentHighlightAdapter:()=>cfi,DocumentLinkAdapter:()=>gfi,DocumentRangeFormattingEditProvider:()=>FAt,DocumentSymbolAdapter:()=>LAt,FoldingRangeAdapter:()=>BAt,HoverAdapter:()=>kAt,ReferenceAdapter:()=>hfi,RenameAdapter:()=>ffi,SelectionRangeAdapter:()=>zAt,WorkerManager:()=>EAt,fromPosition:()=>fD,fromRange:()=>LOe,getWorker:()=>Lfi,setupMode:()=>Mfi,toRange:()=>wf,toTextEdit:()=>s3});function ifi(i){switch(i){case i3.Error:return lo.MarkerSeverity.Error;case i3.Warning:return lo.MarkerSeverity.Warning;case i3.Information:return lo.MarkerSeverity.Info;case i3.Hint:return lo.MarkerSeverity.Hint;default:return lo.MarkerSeverity.Info}}function nfi(i,e){let t=typeof e.code=="number"?String(e.code):e.code;return{severity:ifi(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:t,source:e.source}}function fD(i){if(i)return{character:i.column-1,line:i.lineNumber-1}}function LOe(i){if(i)return{start:{line:i.startLineNumber-1,character:i.startColumn-1},end:{line:i.endLineNumber-1,character:i.endColumn-1}}}function wf(i){if(i)return new lo.Range(i.start.line+1,i.start.character+1,i.end.line+1,i.end.character+1)}function ofi(i){return typeof i.insert<"u"&&typeof i.replace<"u"}function rfi(i){let e=lo.languages.CompletionItemKind;switch(i){case bu.Text:return e.Text;case bu.Method:return e.Method;case bu.Function:return e.Function;case bu.Constructor:return e.Constructor;case bu.Field:return e.Field;case bu.Variable:return e.Variable;case bu.Class:return e.Class;case bu.Interface:return e.Interface;case bu.Module:return e.Module;case bu.Property:return e.Property;case bu.Unit:return e.Unit;case bu.Value:return e.Value;case bu.Enum:return e.Enum;case bu.Keyword:return e.Keyword;case bu.Snippet:return e.Snippet;case bu.Color:return e.Color;case bu.File:return e.File;case bu.Reference:return e.Reference}return e.Property}function s3(i){if(i)return{range:wf(i.range),text:i.newText}}function sfi(i){return i&&i.command==="editor.action.triggerSuggest"?{id:i.command,title:i.title,arguments:i.arguments}:void 0}function afi(i){return i&&typeof i=="object"&&typeof i.kind=="string"}function bAt(i){return typeof i=="string"?{value:i}:afi(i)?i.kind==="plaintext"?{value:i.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:i.value}:{value:"```"+i.language+` +`+i.value+"\n```\n"}}function lfi(i){if(i)return Array.isArray(i)?i.map(bAt):[bAt(i)]}function ufi(i){switch(i){case fU.Read:return lo.languages.DocumentHighlightKind.Read;case fU.Write:return lo.languages.DocumentHighlightKind.Write;case fU.Text:return lo.languages.DocumentHighlightKind.Text}return lo.languages.DocumentHighlightKind.Text}function IAt(i){return{uri:lo.Uri.parse(i.uri),range:wf(i.range)}}function pfi(i){if(!i||!i.changes)return;let e=[];for(let t in i.changes){let n=lo.Uri.parse(t);for(let o of i.changes[t])e.push({resource:n,versionId:void 0,textEdit:{range:wf(o.range),text:o.newText}})}return{edits:e}}function mfi(i){return"children"in i}function NAt(i){return{name:i.name,detail:i.detail??"",kind:MAt(i.kind),range:wf(i.range),selectionRange:wf(i.selectionRange),tags:i.tags??[],children:(i.children??[]).map(e=>NAt(e))}}function MAt(i){let e=lo.languages.SymbolKind;switch(i){case Au.File:return e.File;case Au.Module:return e.Module;case Au.Namespace:return e.Namespace;case Au.Package:return e.Package;case Au.Class:return e.Class;case Au.Method:return e.Method;case Au.Property:return e.Property;case Au.Field:return e.Field;case Au.Constructor:return e.Constructor;case Au.Enum:return e.Enum;case Au.Interface:return e.Interface;case Au.Function:return e.Function;case Au.Variable:return e.Variable;case Au.Constant:return e.Constant;case Au.String:return e.String;case Au.Number:return e.Number;case Au.Boolean:return e.Boolean;case Au.Array:return e.Array}return e.Function}function OAt(i){return{tabSize:i.tabSize,insertSpaces:i.insertSpaces}}function bfi(i){switch(i){case hU.Comment:return lo.languages.FoldingRangeKind.Comment;case hU.Imports:return lo.languages.FoldingRangeKind.Imports;case hU.Region:return lo.languages.FoldingRangeKind.Region}}function Afi(i,e=!1){let t=i.length,n=0,o="",r=0,s=16,a=0,l=0,c=0,u=0,d=0;function h(C,_){let E=0,I=0;for(;E=48&&T<=57)I=I*16+T-48;else if(T>=65&&T<=70)I=I*16+T-65+10;else if(T>=97&&T<=102)I=I*16+T-97+10;else break;n++,E++}return E=t){C+=i.substring(_,n),d=2;break}let E=i.charCodeAt(n);if(E===34){C+=i.substring(_,n),n++;break}if(E===92){if(C+=i.substring(_,n),n++,n>=t){d=2;break}switch(i.charCodeAt(n++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=` +`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:let T=h(4,!0);T>=0?C+=String.fromCharCode(T):d=4;break;default:d=5}_=n;continue}if(E>=0&&E<=31)if(uU(E)){C+=i.substring(_,n),d=2;break}else d=6;n++}return C}function A(){if(o="",d=0,r=n,l=a,u=c,n>=t)return r=t,s=17;let C=i.charCodeAt(n);if(mOe(C)){do n++,o+=String.fromCharCode(C),C=i.charCodeAt(n);while(mOe(C));return s=15}if(uU(C))return n++,o+=String.fromCharCode(C),C===13&&i.charCodeAt(n)===10&&(n++,o+=` +`),a++,c=n,s=14;switch(C){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,o=g(),s=10;case 47:let _=n-1;if(i.charCodeAt(n+1)===47){for(n+=2;n=12&&C<=15);return C}return{setPosition:f,getPosition:()=>n,scan:e?w:A,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>r,getTokenLength:()=>n-r,getTokenStartLine:()=>l,getTokenStartCharacter:()=>r-u,getTokenError:()=>d}}function mOe(i){return i===32||i===9}function uU(i){return i===10||i===13}function e3(i){return i>=48&&i<=57}function yfi(i){return{getInitialState:()=>new HAt(null,null,!1,null),tokenize:(e,t)=>Ifi(i,e,t)}}function Ifi(i,e,t,n=0){let o=0,r=!1;switch(t.scanError){case 2:e='"'+e,o=1;break;case 1:e="/*"+e,o=2;break}let s=vfi(e),a=t.lastWasColon,l=t.parents,c={tokens:[],endState:t.clone()};for(;;){let u=n+s.getPosition(),d="",h=s.scan();if(h===17)break;if(u===n+s.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+e.substr(s.getPosition(),3));switch(r&&(u-=o),r=o>0,h){case 1:l=dU.push(l,0),d=CAt,a=!1;break;case 2:l=dU.pop(l),d=CAt,a=!1;break;case 3:l=dU.push(l,1),d=_At,a=!1;break;case 4:l=dU.pop(l),d=_At,a=!1;break;case 6:d=wfi,a=!0;break;case 5:d=xfi,a=!1;break;case 8:case 9:d=Cfi,a=!1;break;case 7:d=_fi,a=!1;break;case 10:let p=(l?l.type:0)===1;d=a||p?Sfi:Dfi,a=!1;break;case 11:d=Efi,a=!1;break}if(i)switch(h){case 12:d=kfi;break;case 13:d=Tfi;break}c.endState=new HAt(t.getStateData(),s.getTokenError(),a,l),c.tokens.push({startIndex:u,scopes:d})}return c}function Lfi(){return new Promise((i,e)=>{if(!m0)return e("JSON not registered!");i(m0)})}function Mfi(i){let e=[],t=[],n=new EAt(i);e.push(n),m0=(...s)=>n.getLanguageServiceWorker(...s);function o(){let{languageId:s,modeConfiguration:a}=i;WAt(t),a.documentFormattingEdits&&t.push(lo.languages.registerDocumentFormattingEditProvider(s,new RAt(m0))),a.documentRangeFormattingEdits&&t.push(lo.languages.registerDocumentRangeFormattingEditProvider(s,new FAt(m0))),a.completionItems&&t.push(lo.languages.registerCompletionItemProvider(s,new TAt(m0,[" ",":",'"']))),a.hovers&&t.push(lo.languages.registerHoverProvider(s,new kAt(m0))),a.documentSymbols&&t.push(lo.languages.registerDocumentSymbolProvider(s,new LAt(m0))),a.tokens&&t.push(lo.languages.setTokensProvider(s,yfi(!0))),a.colors&&t.push(lo.languages.registerColorProvider(s,new PAt(m0))),a.foldingRanges&&t.push(lo.languages.registerFoldingRangeProvider(s,new BAt(m0))),a.diagnostics&&t.push(new Nfi(s,m0,i)),a.selectionRanges&&t.push(lo.languages.registerSelectionRangeProvider(s,new zAt(m0)))}o(),e.push(lo.languages.setLanguageConfiguration(i.languageId,Rfi));let r=i.modeConfiguration;return i.onDidChange(s=>{s.modeConfiguration!==r&&(r=s.modeConfiguration,o())}),e.push(SAt(t)),SAt(e)}function SAt(i){return{dispose:()=>WAt(i)}}function WAt(i){for(;i.length;)i.pop().dispose()}var Khi,Jhi,Xhi,Zhi,w0t,$hi,lo,efi,EAt,x0t,gOe,C0t,Yce,ev,Mc,Kce,_0t,bOe,S0t,E0t,hU,D0t,AOe,i3,T0t,k0t,Jce,n3,o3,vOe,r3,I0t,yOe,wOe,xOe,COe,_Oe,L0t,N0t,SOe,M0t,EOe,pU,bu,DOe,R0t,F0t,O0t,P0t,B0t,z0t,Xce,V0t,H0t,W0t,fU,U0t,Au,j0t,Q0t,G0t,q0t,Y0t,Zce,K0t,J0t,X0t,Z0t,$0t,eAt,tAt,iAt,nAt,oAt,rAt,sAt,aAt,TOe,kOe,lAt,cAt,uAt,dAt,hAt,fAt,pAt,mAt,gAt,tfi,We,DAt,TAt,kAt,cfi,dfi,hfi,ffi,LAt,gfi,RAt,FAt,PAt,BAt,zAt,AAt,kWn,t3,IWn,vAt,vfi,yAt,wAt,xAt,CAt,_At,wfi,xfi,Cfi,_fi,Sfi,Efi,Dfi,Tfi,kfi,dU,HAt,m0,Nfi,Rfi,jAt=D(()=>{jN();Khi=Object.defineProperty,Jhi=Object.getOwnPropertyDescriptor,Xhi=Object.getOwnPropertyNames,Zhi=Object.prototype.hasOwnProperty,w0t=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Xhi(e))!Zhi.call(i,o)&&o!==t&&Khi(i,o,{get:()=>e[o],enumerable:!(n=Jhi(e,o))||n.enumerable});return i},$hi=(i,e,t)=>(w0t(i,e,"default"),t&&w0t(t,e,"default")),lo={};$hi(lo,UN);efi=120*1e3,EAt=class{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>efi&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=lo.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let e;return this._getClient().then(t=>{e=t}).then(t=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(t=>e)}};(function(i){function e(t){return typeof t=="string"}i.is=e})(x0t||(x0t={}));(function(i){function e(t){return typeof t=="string"}i.is=e})(gOe||(gOe={}));(function(i){i.MIN_VALUE=-2147483648,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(C0t||(C0t={}));(function(i){i.MIN_VALUE=0,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(Yce||(Yce={}));(function(i){function e(n,o){return n===Number.MAX_VALUE&&(n=Yce.MAX_VALUE),o===Number.MAX_VALUE&&(o=Yce.MAX_VALUE),{line:n,character:o}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&We.uinteger(o.line)&&We.uinteger(o.character)}i.is=t})(ev||(ev={}));(function(i){function e(n,o,r,s){if(We.uinteger(n)&&We.uinteger(o)&&We.uinteger(r)&&We.uinteger(s))return{start:ev.create(n,o),end:ev.create(r,s)};if(ev.is(n)&&ev.is(o))return{start:n,end:o};throw new Error(`Range#create called with invalid arguments[${n}, ${o}, ${r}, ${s}]`)}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&ev.is(o.start)&&ev.is(o.end)}i.is=t})(Mc||(Mc={}));(function(i){function e(n,o){return{uri:n,range:o}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&Mc.is(o.range)&&(We.string(o.uri)||We.undefined(o.uri))}i.is=t})(Kce||(Kce={}));(function(i){function e(n,o,r,s){return{targetUri:n,targetRange:o,targetSelectionRange:r,originSelectionRange:s}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&Mc.is(o.targetRange)&&We.string(o.targetUri)&&Mc.is(o.targetSelectionRange)&&(Mc.is(o.originSelectionRange)||We.undefined(o.originSelectionRange))}i.is=t})(_0t||(_0t={}));(function(i){function e(n,o,r,s){return{red:n,green:o,blue:r,alpha:s}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&We.numberRange(o.red,0,1)&&We.numberRange(o.green,0,1)&&We.numberRange(o.blue,0,1)&&We.numberRange(o.alpha,0,1)}i.is=t})(bOe||(bOe={}));(function(i){function e(n,o){return{range:n,color:o}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&Mc.is(o.range)&&bOe.is(o.color)}i.is=t})(S0t||(S0t={}));(function(i){function e(n,o,r){return{label:n,textEdit:o,additionalTextEdits:r}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&We.string(o.label)&&(We.undefined(o.textEdit)||o3.is(o))&&(We.undefined(o.additionalTextEdits)||We.typedArray(o.additionalTextEdits,o3.is))}i.is=t})(E0t||(E0t={}));(function(i){i.Comment="comment",i.Imports="imports",i.Region="region"})(hU||(hU={}));(function(i){function e(n,o,r,s,a,l){let c={startLine:n,endLine:o};return We.defined(r)&&(c.startCharacter=r),We.defined(s)&&(c.endCharacter=s),We.defined(a)&&(c.kind=a),We.defined(l)&&(c.collapsedText=l),c}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&We.uinteger(o.startLine)&&We.uinteger(o.startLine)&&(We.undefined(o.startCharacter)||We.uinteger(o.startCharacter))&&(We.undefined(o.endCharacter)||We.uinteger(o.endCharacter))&&(We.undefined(o.kind)||We.string(o.kind))}i.is=t})(D0t||(D0t={}));(function(i){function e(n,o){return{location:n,message:o}}i.create=e;function t(n){let o=n;return We.defined(o)&&Kce.is(o.location)&&We.string(o.message)}i.is=t})(AOe||(AOe={}));(function(i){i.Error=1,i.Warning=2,i.Information=3,i.Hint=4})(i3||(i3={}));(function(i){i.Unnecessary=1,i.Deprecated=2})(T0t||(T0t={}));(function(i){function e(t){let n=t;return We.objectLiteral(n)&&We.string(n.href)}i.is=e})(k0t||(k0t={}));(function(i){function e(n,o,r,s,a,l){let c={range:n,message:o};return We.defined(r)&&(c.severity=r),We.defined(s)&&(c.code=s),We.defined(a)&&(c.source=a),We.defined(l)&&(c.relatedInformation=l),c}i.create=e;function t(n){var o;let r=n;return We.defined(r)&&Mc.is(r.range)&&We.string(r.message)&&(We.number(r.severity)||We.undefined(r.severity))&&(We.integer(r.code)||We.string(r.code)||We.undefined(r.code))&&(We.undefined(r.codeDescription)||We.string((o=r.codeDescription)===null||o===void 0?void 0:o.href))&&(We.string(r.source)||We.undefined(r.source))&&(We.undefined(r.relatedInformation)||We.typedArray(r.relatedInformation,AOe.is))}i.is=t})(Jce||(Jce={}));(function(i){function e(n,o,...r){let s={title:n,command:o};return We.defined(r)&&r.length>0&&(s.arguments=r),s}i.create=e;function t(n){let o=n;return We.defined(o)&&We.string(o.title)&&We.string(o.command)}i.is=t})(n3||(n3={}));(function(i){function e(r,s){return{range:r,newText:s}}i.replace=e;function t(r,s){return{range:{start:r,end:r},newText:s}}i.insert=t;function n(r){return{range:r,newText:""}}i.del=n;function o(r){let s=r;return We.objectLiteral(s)&&We.string(s.newText)&&Mc.is(s.range)}i.is=o})(o3||(o3={}));(function(i){function e(n,o,r){let s={label:n};return o!==void 0&&(s.needsConfirmation=o),r!==void 0&&(s.description=r),s}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&We.string(o.label)&&(We.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(We.string(o.description)||o.description===void 0)}i.is=t})(vOe||(vOe={}));(function(i){function e(t){let n=t;return We.string(n)}i.is=e})(r3||(r3={}));(function(i){function e(r,s,a){return{range:r,newText:s,annotationId:a}}i.replace=e;function t(r,s,a){return{range:{start:r,end:r},newText:s,annotationId:a}}i.insert=t;function n(r,s){return{range:r,newText:"",annotationId:s}}i.del=n;function o(r){let s=r;return o3.is(s)&&(vOe.is(s.annotationId)||r3.is(s.annotationId))}i.is=o})(I0t||(I0t={}));(function(i){function e(n,o){return{textDocument:n,edits:o}}i.create=e;function t(n){let o=n;return We.defined(o)&&SOe.is(o.textDocument)&&Array.isArray(o.edits)}i.is=t})(yOe||(yOe={}));(function(i){function e(n,o,r){let s={kind:"create",uri:n};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),r!==void 0&&(s.annotationId=r),s}i.create=e;function t(n){let o=n;return o&&o.kind==="create"&&We.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||We.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||We.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||r3.is(o.annotationId))}i.is=t})(wOe||(wOe={}));(function(i){function e(n,o,r,s){let a={kind:"rename",oldUri:n,newUri:o};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(a.options=r),s!==void 0&&(a.annotationId=s),a}i.create=e;function t(n){let o=n;return o&&o.kind==="rename"&&We.string(o.oldUri)&&We.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||We.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||We.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||r3.is(o.annotationId))}i.is=t})(xOe||(xOe={}));(function(i){function e(n,o,r){let s={kind:"delete",uri:n};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),r!==void 0&&(s.annotationId=r),s}i.create=e;function t(n){let o=n;return o&&o.kind==="delete"&&We.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||We.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||We.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||r3.is(o.annotationId))}i.is=t})(COe||(COe={}));(function(i){function e(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(o=>We.string(o.kind)?wOe.is(o)||xOe.is(o)||COe.is(o):yOe.is(o)))}i.is=e})(_Oe||(_Oe={}));(function(i){function e(n){return{uri:n}}i.create=e;function t(n){let o=n;return We.defined(o)&&We.string(o.uri)}i.is=t})(L0t||(L0t={}));(function(i){function e(n,o){return{uri:n,version:o}}i.create=e;function t(n){let o=n;return We.defined(o)&&We.string(o.uri)&&We.integer(o.version)}i.is=t})(N0t||(N0t={}));(function(i){function e(n,o){return{uri:n,version:o}}i.create=e;function t(n){let o=n;return We.defined(o)&&We.string(o.uri)&&(o.version===null||We.integer(o.version))}i.is=t})(SOe||(SOe={}));(function(i){function e(n,o,r,s){return{uri:n,languageId:o,version:r,text:s}}i.create=e;function t(n){let o=n;return We.defined(o)&&We.string(o.uri)&&We.string(o.languageId)&&We.integer(o.version)&&We.string(o.text)}i.is=t})(M0t||(M0t={}));(function(i){i.PlainText="plaintext",i.Markdown="markdown";function e(t){let n=t;return n===i.PlainText||n===i.Markdown}i.is=e})(EOe||(EOe={}));(function(i){function e(t){let n=t;return We.objectLiteral(t)&&EOe.is(n.kind)&&We.string(n.value)}i.is=e})(pU||(pU={}));(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(bu||(bu={}));(function(i){i.PlainText=1,i.Snippet=2})(DOe||(DOe={}));(function(i){i.Deprecated=1})(R0t||(R0t={}));(function(i){function e(n,o,r){return{newText:n,insert:o,replace:r}}i.create=e;function t(n){let o=n;return o&&We.string(o.newText)&&Mc.is(o.insert)&&Mc.is(o.replace)}i.is=t})(F0t||(F0t={}));(function(i){i.asIs=1,i.adjustIndentation=2})(O0t||(O0t={}));(function(i){function e(t){let n=t;return n&&(We.string(n.detail)||n.detail===void 0)&&(We.string(n.description)||n.description===void 0)}i.is=e})(P0t||(P0t={}));(function(i){function e(t){return{label:t}}i.create=e})(B0t||(B0t={}));(function(i){function e(t,n){return{items:t||[],isIncomplete:!!n}}i.create=e})(z0t||(z0t={}));(function(i){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i.fromPlainText=e;function t(n){let o=n;return We.string(o)||We.objectLiteral(o)&&We.string(o.language)&&We.string(o.value)}i.is=t})(Xce||(Xce={}));(function(i){function e(t){let n=t;return!!n&&We.objectLiteral(n)&&(pU.is(n.contents)||Xce.is(n.contents)||We.typedArray(n.contents,Xce.is))&&(t.range===void 0||Mc.is(t.range))}i.is=e})(V0t||(V0t={}));(function(i){function e(t,n){return n?{label:t,documentation:n}:{label:t}}i.create=e})(H0t||(H0t={}));(function(i){function e(t,n,...o){let r={label:t};return We.defined(n)&&(r.documentation=n),We.defined(o)?r.parameters=o:r.parameters=[],r}i.create=e})(W0t||(W0t={}));(function(i){i.Text=1,i.Read=2,i.Write=3})(fU||(fU={}));(function(i){function e(t,n){let o={range:t};return We.number(n)&&(o.kind=n),o}i.create=e})(U0t||(U0t={}));(function(i){i.File=1,i.Module=2,i.Namespace=3,i.Package=4,i.Class=5,i.Method=6,i.Property=7,i.Field=8,i.Constructor=9,i.Enum=10,i.Interface=11,i.Function=12,i.Variable=13,i.Constant=14,i.String=15,i.Number=16,i.Boolean=17,i.Array=18,i.Object=19,i.Key=20,i.Null=21,i.EnumMember=22,i.Struct=23,i.Event=24,i.Operator=25,i.TypeParameter=26})(Au||(Au={}));(function(i){i.Deprecated=1})(j0t||(j0t={}));(function(i){function e(t,n,o,r,s){let a={name:t,kind:n,location:{uri:r,range:o}};return s&&(a.containerName=s),a}i.create=e})(Q0t||(Q0t={}));(function(i){function e(t,n,o,r){return r!==void 0?{name:t,kind:n,location:{uri:o,range:r}}:{name:t,kind:n,location:{uri:o}}}i.create=e})(G0t||(G0t={}));(function(i){function e(n,o,r,s,a,l){let c={name:n,detail:o,kind:r,range:s,selectionRange:a};return l!==void 0&&(c.children=l),c}i.create=e;function t(n){let o=n;return o&&We.string(o.name)&&We.number(o.kind)&&Mc.is(o.range)&&Mc.is(o.selectionRange)&&(o.detail===void 0||We.string(o.detail))&&(o.deprecated===void 0||We.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}i.is=t})(q0t||(q0t={}));(function(i){i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll"})(Y0t||(Y0t={}));(function(i){i.Invoked=1,i.Automatic=2})(Zce||(Zce={}));(function(i){function e(n,o,r){let s={diagnostics:n};return o!=null&&(s.only=o),r!=null&&(s.triggerKind=r),s}i.create=e;function t(n){let o=n;return We.defined(o)&&We.typedArray(o.diagnostics,Jce.is)&&(o.only===void 0||We.typedArray(o.only,We.string))&&(o.triggerKind===void 0||o.triggerKind===Zce.Invoked||o.triggerKind===Zce.Automatic)}i.is=t})(K0t||(K0t={}));(function(i){function e(n,o,r){let s={title:n},a=!0;return typeof o=="string"?(a=!1,s.kind=o):n3.is(o)?s.command=o:s.edit=o,a&&r!==void 0&&(s.kind=r),s}i.create=e;function t(n){let o=n;return o&&We.string(o.title)&&(o.diagnostics===void 0||We.typedArray(o.diagnostics,Jce.is))&&(o.kind===void 0||We.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||n3.is(o.command))&&(o.isPreferred===void 0||We.boolean(o.isPreferred))&&(o.edit===void 0||_Oe.is(o.edit))}i.is=t})(J0t||(J0t={}));(function(i){function e(n,o){let r={range:n};return We.defined(o)&&(r.data=o),r}i.create=e;function t(n){let o=n;return We.defined(o)&&Mc.is(o.range)&&(We.undefined(o.command)||n3.is(o.command))}i.is=t})(X0t||(X0t={}));(function(i){function e(n,o){return{tabSize:n,insertSpaces:o}}i.create=e;function t(n){let o=n;return We.defined(o)&&We.uinteger(o.tabSize)&&We.boolean(o.insertSpaces)}i.is=t})(Z0t||(Z0t={}));(function(i){function e(n,o,r){return{range:n,target:o,data:r}}i.create=e;function t(n){let o=n;return We.defined(o)&&Mc.is(o.range)&&(We.undefined(o.target)||We.string(o.target))}i.is=t})($0t||($0t={}));(function(i){function e(n,o){return{range:n,parent:o}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&Mc.is(o.range)&&(o.parent===void 0||i.is(o.parent))}i.is=t})(eAt||(eAt={}));(function(i){i.namespace="namespace",i.type="type",i.class="class",i.enum="enum",i.interface="interface",i.struct="struct",i.typeParameter="typeParameter",i.parameter="parameter",i.variable="variable",i.property="property",i.enumMember="enumMember",i.event="event",i.function="function",i.method="method",i.macro="macro",i.keyword="keyword",i.modifier="modifier",i.comment="comment",i.string="string",i.number="number",i.regexp="regexp",i.operator="operator",i.decorator="decorator"})(tAt||(tAt={}));(function(i){i.declaration="declaration",i.definition="definition",i.readonly="readonly",i.static="static",i.deprecated="deprecated",i.abstract="abstract",i.async="async",i.modification="modification",i.documentation="documentation",i.defaultLibrary="defaultLibrary"})(iAt||(iAt={}));(function(i){function e(t){let n=t;return We.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i.is=e})(nAt||(nAt={}));(function(i){function e(n,o){return{range:n,text:o}}i.create=e;function t(n){let o=n;return o!=null&&Mc.is(o.range)&&We.string(o.text)}i.is=t})(oAt||(oAt={}));(function(i){function e(n,o,r){return{range:n,variableName:o,caseSensitiveLookup:r}}i.create=e;function t(n){let o=n;return o!=null&&Mc.is(o.range)&&We.boolean(o.caseSensitiveLookup)&&(We.string(o.variableName)||o.variableName===void 0)}i.is=t})(rAt||(rAt={}));(function(i){function e(n,o){return{range:n,expression:o}}i.create=e;function t(n){let o=n;return o!=null&&Mc.is(o.range)&&(We.string(o.expression)||o.expression===void 0)}i.is=t})(sAt||(sAt={}));(function(i){function e(n,o){return{frameId:n,stoppedLocation:o}}i.create=e;function t(n){let o=n;return We.defined(o)&&Mc.is(n.stoppedLocation)}i.is=t})(aAt||(aAt={}));(function(i){i.Type=1,i.Parameter=2;function e(t){return t===1||t===2}i.is=e})(TOe||(TOe={}));(function(i){function e(n){return{value:n}}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&(o.tooltip===void 0||We.string(o.tooltip)||pU.is(o.tooltip))&&(o.location===void 0||Kce.is(o.location))&&(o.command===void 0||n3.is(o.command))}i.is=t})(kOe||(kOe={}));(function(i){function e(n,o,r){let s={position:n,label:o};return r!==void 0&&(s.kind=r),s}i.create=e;function t(n){let o=n;return We.objectLiteral(o)&&ev.is(o.position)&&(We.string(o.label)||We.typedArray(o.label,kOe.is))&&(o.kind===void 0||TOe.is(o.kind))&&o.textEdits===void 0||We.typedArray(o.textEdits,o3.is)&&(o.tooltip===void 0||We.string(o.tooltip)||pU.is(o.tooltip))&&(o.paddingLeft===void 0||We.boolean(o.paddingLeft))&&(o.paddingRight===void 0||We.boolean(o.paddingRight))}i.is=t})(lAt||(lAt={}));(function(i){function e(t){return{kind:"snippet",value:t}}i.createSnippet=e})(cAt||(cAt={}));(function(i){function e(t,n,o,r){return{insertText:t,filterText:n,range:o,command:r}}i.create=e})(uAt||(uAt={}));(function(i){function e(t){return{items:t}}i.create=e})(dAt||(dAt={}));(function(i){i.Invoked=0,i.Automatic=1})(hAt||(hAt={}));(function(i){function e(t,n){return{range:t,text:n}}i.create=e})(fAt||(fAt={}));(function(i){function e(t,n){return{triggerKind:t,selectedCompletionInfo:n}}i.create=e})(pAt||(pAt={}));(function(i){function e(t){let n=t;return We.objectLiteral(n)&&gOe.is(n.uri)&&We.string(n.name)}i.is=e})(mAt||(mAt={}));(function(i){function e(r,s,a,l){return new tfi(r,s,a,l)}i.create=e;function t(r){let s=r;return!!(We.defined(s)&&We.string(s.uri)&&(We.undefined(s.languageId)||We.string(s.languageId))&&We.uinteger(s.lineCount)&&We.func(s.getText)&&We.func(s.positionAt)&&We.func(s.offsetAt))}i.is=t;function n(r,s){let a=r.getText(),l=o(s,(u,d)=>{let h=u.range.start.line-d.range.start.line;return h===0?u.range.start.character-d.range.start.character:h}),c=a.length;for(let u=l.length-1;u>=0;u--){let d=l[u],h=r.offsetAt(d.range.start),f=r.offsetAt(d.range.end);if(f<=c)a=a.substring(0,h)+d.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}i.applyEdits=n;function o(r,s){if(r.length<=1)return r;let a=r.length/2|0,l=r.slice(0,a),c=r.slice(a);o(l,s),o(c,s);let u=0,d=0,h=0;for(;u0&&i.push(e.length),this._lineOffsets=i}return this._lineOffsets}positionAt(i){i=Math.max(Math.min(i,this._content.length),0);let e=this.getLineOffsets(),t=0,n=e.length;if(n===0)return ev.create(0,i);for(;ti?n=r:t=r+1}let o=t-1;return ev.create(o,i-e[o])}offsetAt(i){let e=this.getLineOffsets();if(i.line>=e.length)return this._content.length;if(i.line<0)return 0;let t=e[i.line],n=i.line+1"u"}i.undefined=n;function o(f){return f===!0||f===!1}i.boolean=o;function r(f){return e.call(f)==="[object String]"}i.string=r;function s(f){return e.call(f)==="[object Number]"}i.number=s;function a(f,p,g){return e.call(f)==="[object Number]"&&p<=f&&f<=g}i.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}i.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}i.uinteger=c;function u(f){return e.call(f)==="[object Function]"}i.func=u;function d(f){return f!==null&&typeof f=="object"}i.objectLiteral=d;function h(f,p){return Array.isArray(f)&&f.every(p)}i.typedArray=h})(We||(We={}));DAt=class{constructor(i,e,t){this._languageId=i,this._worker=e,this._disposables=[],this._listener=Object.create(null);let n=r=>{let s=r.getLanguageId();if(s!==this._languageId)return;let a;this._listener[r.uri.toString()]=r.onDidChangeContent(()=>{window.clearTimeout(a),a=window.setTimeout(()=>this._doValidate(r.uri,s),500)}),this._doValidate(r.uri,s)},o=r=>{lo.editor.setModelMarkers(r,this._languageId,[]);let s=r.uri.toString(),a=this._listener[s];a&&(a.dispose(),delete this._listener[s])};this._disposables.push(lo.editor.onDidCreateModel(n)),this._disposables.push(lo.editor.onWillDisposeModel(o)),this._disposables.push(lo.editor.onDidChangeModelLanguage(r=>{o(r.model),n(r.model)})),this._disposables.push(t(r=>{lo.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(o(s),n(s))})})),this._disposables.push({dispose:()=>{lo.editor.getModels().forEach(o);for(let r in this._listener)this._listener[r].dispose()}}),lo.editor.getModels().forEach(n)}dispose(){this._disposables.forEach(i=>i&&i.dispose()),this._disposables.length=0}_doValidate(i,e){this._worker(i).then(t=>t.doValidation(i.toString())).then(t=>{let n=t.map(r=>nfi(i,r)),o=lo.editor.getModel(i);o&&o.getLanguageId()===e&&lo.editor.setModelMarkers(o,e,n)}).then(void 0,t=>{console.error(t)})}};TAt=class{constructor(i,e){this._worker=i,this._triggerCharacters=e}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(i,e,t,n){let o=i.uri;return this._worker(o).then(r=>r.doComplete(o.toString(),fD(e))).then(r=>{if(!r)return;let s=i.getWordUntilPosition(e),a=new lo.Range(e.lineNumber,s.startColumn,e.lineNumber,s.endColumn),l=r.items.map(c=>{let u={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:sfi(c.command),range:a,kind:rfi(c.kind)};return c.textEdit&&(ofi(c.textEdit)?u.range={insert:wf(c.textEdit.insert),replace:wf(c.textEdit.replace)}:u.range=wf(c.textEdit.range),u.insertText=c.textEdit.newText),c.additionalTextEdits&&(u.additionalTextEdits=c.additionalTextEdits.map(s3)),c.insertTextFormat===DOe.Snippet&&(u.insertTextRules=lo.languages.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:r.isIncomplete,suggestions:l}})}};kAt=class{constructor(i){this._worker=i}provideHover(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.doHover(n.toString(),fD(e))).then(o=>{if(o)return{range:wf(o.range),contents:lfi(o.contents)}})}};cfi=class{constructor(i){this._worker=i}provideDocumentHighlights(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.findDocumentHighlights(n.toString(),fD(e))).then(o=>{if(o)return o.map(r=>({range:wf(r.range),kind:ufi(r.kind)}))})}};dfi=class{constructor(i){this._worker=i}provideDefinition(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.findDefinition(n.toString(),fD(e))).then(o=>{if(o)return[IAt(o)]})}};hfi=class{constructor(i){this._worker=i}provideReferences(i,e,t,n){let o=i.uri;return this._worker(o).then(r=>r.findReferences(o.toString(),fD(e))).then(r=>{if(r)return r.map(IAt)})}},ffi=class{constructor(i){this._worker=i}provideRenameEdits(i,e,t,n){let o=i.uri;return this._worker(o).then(r=>r.doRename(o.toString(),fD(e),t)).then(r=>pfi(r))}};LAt=class{constructor(i){this._worker=i}provideDocumentSymbols(i,e){let t=i.uri;return this._worker(t).then(n=>n.findDocumentSymbols(t.toString())).then(n=>{if(n)return n.map(o=>mfi(o)?NAt(o):{name:o.name,detail:"",containerName:o.containerName,kind:MAt(o.kind),range:wf(o.location.range),selectionRange:wf(o.location.range),tags:[]})})}};gfi=class{constructor(i){this._worker=i}provideLinks(i,e){let t=i.uri;return this._worker(t).then(n=>n.findDocumentLinks(t.toString())).then(n=>{if(n)return{links:n.map(o=>({range:wf(o.range),url:o.target}))}})}},RAt=class{constructor(i){this._worker=i}provideDocumentFormattingEdits(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.format(n.toString(),null,OAt(e)).then(r=>{if(!(!r||r.length===0))return r.map(s3)}))}},FAt=class{constructor(i){this._worker=i,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(i,e,t,n){let o=i.uri;return this._worker(o).then(r=>r.format(o.toString(),LOe(e),OAt(t)).then(s=>{if(!(!s||s.length===0))return s.map(s3)}))}};PAt=class{constructor(i){this._worker=i}provideDocumentColors(i,e){let t=i.uri;return this._worker(t).then(n=>n.findDocumentColors(t.toString())).then(n=>{if(n)return n.map(o=>({color:o.color,range:wf(o.range)}))})}provideColorPresentations(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.getColorPresentations(n.toString(),e.color,LOe(e.range))).then(o=>{if(o)return o.map(r=>{let s={label:r.label};return r.textEdit&&(s.textEdit=s3(r.textEdit)),r.additionalTextEdits&&(s.additionalTextEdits=r.additionalTextEdits.map(s3)),s})})}},BAt=class{constructor(i){this._worker=i}provideFoldingRanges(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.getFoldingRanges(n.toString(),e)).then(o=>{if(o)return o.map(r=>{let s={start:r.startLine+1,end:r.endLine+1};return typeof r.kind<"u"&&(s.kind=bfi(r.kind)),s})})}};zAt=class{constructor(i){this._worker=i}provideSelectionRanges(i,e,t){let n=i.uri;return this._worker(n).then(o=>o.getSelectionRanges(n.toString(),e.map(fD))).then(o=>{if(o)return o.map(r=>{let s=[];for(;r;)s.push({range:wf(r.range)}),r=r.parent;return s})})}};(function(i){i[i.lineFeed=10]="lineFeed",i[i.carriageReturn=13]="carriageReturn",i[i.space=32]="space",i[i._0=48]="_0",i[i._1=49]="_1",i[i._2=50]="_2",i[i._3=51]="_3",i[i._4=52]="_4",i[i._5=53]="_5",i[i._6=54]="_6",i[i._7=55]="_7",i[i._8=56]="_8",i[i._9=57]="_9",i[i.a=97]="a",i[i.b=98]="b",i[i.c=99]="c",i[i.d=100]="d",i[i.e=101]="e",i[i.f=102]="f",i[i.g=103]="g",i[i.h=104]="h",i[i.i=105]="i",i[i.j=106]="j",i[i.k=107]="k",i[i.l=108]="l",i[i.m=109]="m",i[i.n=110]="n",i[i.o=111]="o",i[i.p=112]="p",i[i.q=113]="q",i[i.r=114]="r",i[i.s=115]="s",i[i.t=116]="t",i[i.u=117]="u",i[i.v=118]="v",i[i.w=119]="w",i[i.x=120]="x",i[i.y=121]="y",i[i.z=122]="z",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.asterisk=42]="asterisk",i[i.backslash=92]="backslash",i[i.closeBrace=125]="closeBrace",i[i.closeBracket=93]="closeBracket",i[i.colon=58]="colon",i[i.comma=44]="comma",i[i.dot=46]="dot",i[i.doubleQuote=34]="doubleQuote",i[i.minus=45]="minus",i[i.openBrace=123]="openBrace",i[i.openBracket=91]="openBracket",i[i.plus=43]="plus",i[i.slash=47]="slash",i[i.formFeed=12]="formFeed",i[i.tab=9]="tab"})(AAt||(AAt={}));kWn=new Array(20).fill(0).map((i,e)=>" ".repeat(e)),t3=200,IWn={" ":{"\n":new Array(t3).fill(0).map((i,e)=>` +`+" ".repeat(e)),"\r":new Array(t3).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(t3).fill(0).map((i,e)=>`\r +`+" ".repeat(e))}," ":{"\n":new Array(t3).fill(0).map((i,e)=>` +`+" ".repeat(e)),"\r":new Array(t3).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(t3).fill(0).map((i,e)=>`\r +`+" ".repeat(e))}};(function(i){i.DEFAULT={allowTrailingComma:!1}})(vAt||(vAt={}));vfi=Afi;(function(i){i[i.None=0]="None",i[i.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=2]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",i[i.InvalidUnicode=4]="InvalidUnicode",i[i.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",i[i.InvalidCharacter=6]="InvalidCharacter"})(yAt||(yAt={}));(function(i){i[i.OpenBraceToken=1]="OpenBraceToken",i[i.CloseBraceToken=2]="CloseBraceToken",i[i.OpenBracketToken=3]="OpenBracketToken",i[i.CloseBracketToken=4]="CloseBracketToken",i[i.CommaToken=5]="CommaToken",i[i.ColonToken=6]="ColonToken",i[i.NullKeyword=7]="NullKeyword",i[i.TrueKeyword=8]="TrueKeyword",i[i.FalseKeyword=9]="FalseKeyword",i[i.StringLiteral=10]="StringLiteral",i[i.NumericLiteral=11]="NumericLiteral",i[i.LineCommentTrivia=12]="LineCommentTrivia",i[i.BlockCommentTrivia=13]="BlockCommentTrivia",i[i.LineBreakTrivia=14]="LineBreakTrivia",i[i.Trivia=15]="Trivia",i[i.Unknown=16]="Unknown",i[i.EOF=17]="EOF"})(wAt||(wAt={}));(function(i){i[i.InvalidSymbol=1]="InvalidSymbol",i[i.InvalidNumberFormat=2]="InvalidNumberFormat",i[i.PropertyNameExpected=3]="PropertyNameExpected",i[i.ValueExpected=4]="ValueExpected",i[i.ColonExpected=5]="ColonExpected",i[i.CommaExpected=6]="CommaExpected",i[i.CloseBraceExpected=7]="CloseBraceExpected",i[i.CloseBracketExpected=8]="CloseBracketExpected",i[i.EndOfFileExpected=9]="EndOfFileExpected",i[i.InvalidCommentToken=10]="InvalidCommentToken",i[i.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=12]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",i[i.InvalidUnicode=14]="InvalidUnicode",i[i.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",i[i.InvalidCharacter=16]="InvalidCharacter"})(xAt||(xAt={}));CAt="delimiter.bracket.json",_At="delimiter.array.json",wfi="delimiter.colon.json",xfi="delimiter.comma.json",Cfi="keyword.json",_fi="keyword.json",Sfi="string.value.json",Efi="number.json",Dfi="string.key.json",Tfi="comment.block.json",kfi="comment.line.json",dU=class VAt{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(e,t){return new VAt(e,t)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}},HAt=class IOe{constructor(e,t,n,o){this._state=e,this.scanError=t,this.lastWasColon=n,this.parents=o}clone(){return new IOe(this._state,this.scanError,this.lastWasColon,this.parents)}equals(e){return e===this?!0:!e||!(e instanceof IOe)?!1:this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&dU.equals(this.parents,e.parents)}getStateData(){return this._state}setStateData(e){this._state=e}};Nfi=class extends DAt{constructor(i,e,t){super(i,e,t.onDidChange),this._disposables.push(lo.editor.onWillDisposeModel(n=>{this._resetSchema(n.uri)})),this._disposables.push(lo.editor.onDidChangeModelLanguage(n=>{this._resetSchema(n.model.uri)}))}_resetSchema(i){this._worker().then(e=>{e.resetSchema(i.toString())})}};Rfi={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}});var YAt={};ad(YAt,{getWorker:()=>GAt,jsonDefaults:()=>NOe});function qAt(){return Promise.resolve().then(()=>(jAt(),UAt))}var Ffi,Ofi,Pfi,Bfi,QAt,zfi,mU,Vfi,Hfi,Wfi,NOe,GAt,MOe=D(()=>{jN();jN();Ffi=Object.defineProperty,Ofi=Object.getOwnPropertyDescriptor,Pfi=Object.getOwnPropertyNames,Bfi=Object.prototype.hasOwnProperty,QAt=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Pfi(e))!Bfi.call(i,o)&&o!==t&&Ffi(i,o,{get:()=>e[o],enumerable:!(n=Ofi(e,o))||n.enumerable});return i},zfi=(i,e,t)=>(QAt(i,e,"default"),t&&QAt(t,e,"default")),mU={};zfi(mU,UN);Vfi=class{constructor(i,e,t){this._onDidChange=new mU.Emitter,this._languageId=i,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},Hfi={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Wfi={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},NOe=new Vfi("json",Hfi,Wfi),GAt=()=>qAt().then(i=>i.getWorker());mU.languages.json={jsonDefaults:NOe,getWorker:GAt};mU.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});mU.languages.onLanguage("json",()=>{qAt().then(i=>i.setupMode(NOe))})});function Ufi(i,e,t){return i.get(ei).listDiffEditors().find(r=>{let s=r.getModifiedEditor(),a=r.getOriginalEditor();return s&&s.getModel()?.uri.toString()===t.toString()&&a&&a.getModel()?.uri.toString()===e.toString()})||null}function c3(i){let t=i.get(ei).listDiffEditors(),n=ds();if(n)for(let o of t){let r=o.getContainerDomNode();if(jfi(r,n))return o}return null}function jfi(i,e){let t=e;for(;t;){if(t===i)return!0;t=t.parentElement}return!1}var $ce,gU,bU,vU,eue,tue,iue,nue,a3,KAt,l3,AU,JAt=D(()=>{Ye();oo();Jt();hs();Nce();An();Be();go();ao();Bt();dD();$ce=class extends ma{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Ft("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:De.map,toggled:ge.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:ge.has("isInDiffEditor"),menu:{when:ge.has("isInDiffEditor"),id:tt.EditorTitle,order:22,group:"navigation"}})}run(e,...t){let n=e.get(Et),o=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",o)}},gU=class extends ma{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Ft("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:ge.has("isInDiffEditor")})}run(e,...t){let n=e.get(Et),o=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",o)}},bU=class extends ma{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Ft("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:ge.has("isInDiffEditor")})}run(e,...t){let n=e.get(Et),o=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",o)}},vU=Ft("diffEditor","Diff Editor"),eue=class extends uh{constructor(){super({id:"diffEditor.switchSide",title:Ft("switchSide","Switch Side"),icon:De.arrowSwap,precondition:ge.has("isInDiffEditor"),f1:!0,category:vU})}runEditorCommand(e,t,n){let o=c3(e);if(o instanceof f0){if(n&&n.dryRun)return{destinationSelection:o.mapToOtherSide().destinationSelection};o.switchSide()}}},tue=class extends uh{constructor(){super({id:"diffEditor.exitCompareMove",title:Ft("exitCompareMove","Exit Compare Move"),icon:De.close,precondition:V.comparingMovedCode,f1:!1,category:vU,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){let o=c3(e);o instanceof f0&&o.exitCompareMove()}},iue=class extends uh{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Ft("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:De.fold,precondition:ge.has("isInDiffEditor"),f1:!0,category:vU})}runEditorCommand(e,t,...n){let o=c3(e);o instanceof f0&&o.collapseAllUnchangedRegions()}},nue=class extends uh{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Ft("showAllUnchangedRegions","Show All Unchanged Regions"),icon:De.unfold,precondition:ge.has("isInDiffEditor"),f1:!0,category:vU})}runEditorCommand(e,t,...n){let o=c3(e);o instanceof f0&&o.showAllUnchangedRegions()}},a3=class extends ma{constructor(){super({id:"diffEditor.revert",title:Ft("revert","Revert"),f1:!1,category:vU})}run(e,t){let n=Ufi(e,t.originalUri,t.modifiedUri);n instanceof f0&&n.revertRangeMappings(t.mapping.innerChanges??[])}},KAt=Ft("accessibleDiffViewer","Accessible Diff Viewer"),l3=class i extends ma{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:i.id,title:Ft("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:KAt,precondition:ge.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){c3(e)?.accessibleDiffViewerNext()}},AU=class i extends ma{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:i.id,title:Ft("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:KAt,precondition:ge.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){c3(e)?.accessibleDiffViewerPrev()}}});var XAt=D(()=>{oo();JAt();An();Be();go();to();Bt();dD();Hn($ce);Hn(gU);Hn(bU);Xr.appendMenuItem(tt.EditorTitle,{command:{id:new bU().desc.id,title:y("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:ge.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:ge.has("isInDiffEditor")},order:11,group:"1_diff",when:ge.and(V.diffEditorRenderSideBySideInlineBreakpointReached,ge.has("isInDiffEditor"))});Xr.appendMenuItem(tt.EditorTitle,{command:{id:new gU().desc.id,title:y("showMoves","Show Moved Code Blocks"),icon:De.move,toggled:eL.create("config.diffEditor.experimental.showMoves",!0),precondition:ge.has("isInDiffEditor")},order:10,group:"1_diff",when:ge.has("isInDiffEditor")});Hn(a3);for(let i of[{icon:De.arrowRight,key:V.diffEditorInlineMode.toNegated()},{icon:De.discard,key:V.diffEditorInlineMode}])Xr.appendMenuItem(tt.DiffEditorHunkToolbar,{command:{id:new a3().desc.id,title:y("revertHunk","Revert Block"),icon:i.icon},when:ge.and(V.diffEditorModifiedWritable,i.key),order:5,group:"primary"}),Xr.appendMenuItem(tt.DiffEditorSelectionToolbar,{command:{id:new a3().desc.id,title:y("revertSelection","Revert Selection"),icon:i.icon},when:ge.and(V.diffEditorModifiedWritable,i.key),order:5,group:"primary"});Hn(eue);Hn(tue);Hn(iue);Hn(nue);Xr.appendMenuItem(tt.EditorTitle,{command:{id:l3.id,title:y("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:ge.has("isInDiffEditor")},order:10,group:"2_diff",when:ge.and(V.accessibleDiffViewerVisible.negate(),ge.has("isInDiffEditor"))});ii.registerCommandAlias("editor.action.diffReview.next",l3.id);Hn(l3);ii.registerCommandAlias("editor.action.diffReview.prev",AU.id);Hn(AU)});var ZAt=D(()=>{});var Qfi,Gfi,ROe,oue,pD,FOe,OOe,POe,BOe,$At=D(()=>{Zl();Td();Bp();ZAt();Jt();Qn();An();Be();Bt();Qfi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Gfi=function(i,e){return function(t,n){e(t,n,i)}},oue=new ze("selectionAnchorSet",!1),pD=class{static{ROe=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(ROe.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=oue.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(qe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new $r().appendText(y("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ms(y("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(qe.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};pD=ROe=Qfi([Gfi(1,Ze)],pD);FOe=class extends Pe{constructor(){super({id:"editor.action.setSelectionAnchor",label:y("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2080),weight:100}})}async run(e,t){pD.get(t)?.setSelectionAnchor()}},OOe=class extends Pe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:y("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:oue})}async run(e,t){pD.get(t)?.goToSelectionAnchor()}},POe=class extends Pe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:y("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:oue,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2089),weight:100}})}async run(e,t){pD.get(t)?.selectFromAnchorToCursor()}},BOe=class extends Pe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:y("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:oue,kbOpts:{kbExpr:V.editorTextFocus,primary:9,weight:100}})}async run(e,t){pD.get(t)?.cancelSelectionAnchor()}};St(pD.ID,pD,4);Ce(FOe);Ce(OOe);Ce(POe);Ce(BOe)});var evt=D(()=>{});var qfi,zOe,VOe,HOe,WOe,QN,tvt=D(()=>{Gt();de();evt();Jt();kt();Ue();Qn();An();ol();bs();Be();go();nr();io();qfi=j("editorOverviewRuler.bracketMatchForeground","#A0A0A0",y("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),zOe=class extends Pe{constructor(){super({id:"editor.action.jumpToBracket",label:y("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:3165,weight:100}})}run(e,t){QN.get(t)?.jumpToBracket()}},VOe=class extends Pe{constructor(){super({id:"editor.action.selectToBracket",label:y("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Ft("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){let o=!0;n&&n.selectBrackets===!1&&(o=!1),QN.get(t)?.selectToBracket(o)}},HOe=class extends Pe{constructor(){super({id:"editor.action.removeBrackets",label:y("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:2561,weight:100}})}run(e,t){QN.get(t)?.removeBrackets(this.id)}},WOe=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},QN=class i extends H{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new si(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),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(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let o=n.getStartPosition(),r=e.bracketPairs.matchBracket(o),s=null;if(r)r[0].containsPosition(o)&&!r[1].containsPosition(o)?s=r[1].getStartPosition():r[1].containsPosition(o)&&(s=r[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(o);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(o);l&&l.range&&(s=l.range.getStartPosition())}}return s?new qe(s.lineNumber,s.column,s.lineNumber,s.column):new qe(o.lineNumber,o.column,o.lineNumber,o.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(o=>{let r=o.getStartPosition(),s=t.bracketPairs.matchBracket(r);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(r),!s)){let c=t.bracketPairs.findNextBracket(r);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(R.compareRangesUsingStarts);let[c,u]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?u.getEndPosition():u.getStartPosition(),u.containsPosition(r)){let d=a;a=l,l=d}}a&&l&&n.push(new qe(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let o=n.getPosition(),r=t.bracketPairs.matchBracket(o);r||(r=t.bracketPairs.findEnclosingBrackets(o)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Ot.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Io(qfi),position:kc.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Ot.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let o=n.brackets;o&&(e[t++]={range:o[0],options:n.options},e[t++]={range:o[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),o=[];this._lastVersionId===n&&(o=this._lastBracketsData);let r=[],s=0;for(let d=0,h=e.length;d1&&r.sort(J.compare);let a=[],l=0,c=0,u=o.length;for(let d=0,h=r.length;d{Ue();Qn();rue=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,o=this._selection.startColumn,r=this._selection.endColumn;if(!(this._isMovingLeft&&o===1)&&!(!this._isMovingLeft&&r===e.getLineMaxColumn(n)))if(this._isMovingLeft){let s=new R(n,o-1,n,o),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new R(n,r,n,r),a)}else{let s=new R(n,r,n,r+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new R(n,o,n,o),a)}}computeCursorState(e,t){return this._isMovingLeft?new qe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new qe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var sue,UOe,jOe,nvt=D(()=>{Jt();An();ivt();Be();sue=class extends Pe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],o=t.getSelections();for(let r of o)n.push(new rue(r,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},UOe=class extends sue{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:y("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:V.writable})}},jOe=class extends sue{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:y("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:V.writable})}};Ce(UOe);Ce(jOe)});var QOe,ovt=D(()=>{Jt();bN();jse();Ue();An();Be();QOe=class extends Pe{constructor(){super({id:"editor.action.transposeLetters",label:y("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),o=[],r=t.getSelections();for(let s of r){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let u=l===c?s.getPosition():Gr.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),d=Gr.leftPosition(n,u),h=Gr.leftPosition(n,d),f=n.getValueInRange(R.fromPositions(h,d)),p=n.getValueInRange(R.fromPositions(d,u)),g=R.fromPositions(h,u);o.push(new Bs(g,p+f))}o.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop())}};Ce(QOe)});var mD,yU=D(()=>{mD=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let o=0;oi,asFile:()=>{},value:typeof i=="string"?i:void 0}}function rvt(i,e,t){let n={id:mD(),name:i,uri:e,data:t};return{asString:async()=>"",asFile:()=>n,value:void 0}}function aue(i){return i.toLowerCase()}function lue(i,e){return svt(aue(i),e.map(aue))}function svt(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;let t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[n,o,r]=t;return r==="*"?e.some(s=>s.startsWith(o+"/")):!1}var u3,GN,xU=D(()=>{Wt();ld();yU();u3=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return hi.some(this,([n,o])=>o.asFile())&&t.push("files"),svt(aue(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){let 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(let[e,t]of this._entries)for(let n of t)yield[e,n]}toKey(e){return aue(e)}};GN=Object.freeze({create:i=>tf(i.map(e=>e.toString())).join(`\r `),split:i=>i.split(`\r -`),parse:i=>hN.split(i).filter(e=>!e.startsWith("#"))})});var Un,n0=D(()=>{Un=class i{static{this.sep="."}static{this.None=new i("@@none@@")}static{this.Empty=new i("")}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+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new i((this.value?[this.value,...e]:e).join(i.sep))}}});var _Oe,COe,exi,Hle,SOe=D(()=>{sa();_Oe={EDITORS:"CodeEditors",FILES:"CodeFiles"},COe=class{},exi={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Gi.add(exi.DragAndDropContribution,new COe);Hle=class i{static{this.INSTANCE=new i}constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}});function EOe(i){let e=new vB;for(let t of i.items){let n=t.type;if(t.kind==="string"){let r=new Promise(o=>t.getAsString(o));e.append(n,UH(r))}else if(t.kind==="file"){let r=t.getAsFile();r&&e.append(n,txi(r))}}return e}function txi(i){let e=i.path?Xe.parse(i.path):void 0;return Zyt(i.name,e,async()=>new Uint8Array(await i.arrayBuffer()))}function Wle(i,e=!1){let t=EOe(i),n=t.get(hE.INTERNAL_URI_LIST);if(n)t.replace(Gr.uriList,n);else if(e||!t.has(Gr.uriList)){let r=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?r.push(Xe.file(a).toString()):r.push(Xe.parse(s.name,!0).toString())}catch{}}}r.length&&t.replace(Gr.uriList,UH(hN.create(r)))}for(let r of ixi)t.delete(r);return t}var ixi,DOe=D(()=>{iie();jH();PS();mn();SOe();ixi=Object.freeze([_Oe.EDITORS,_Oe.FILES,hE.RESOURCES,hE.INTERNAL_URI_LIST])});async function e1t(i){let e=i.get(Gr.uriList);if(!e)return[];let t=await e.asString(),n=[];for(let r of hN.parse(t))try{n.push({uri:Xe.parse(r),originalText:r})}catch{}return n}var kOe,QH,GH,tC,Ule,jle,TOe,Qle,Gle,qle=D(()=>{Qt();jH();n0();ae();PS();bl();Ec();mn();tr();Ui();Oe();pO();kOe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},QH=function(i,e){return function(t,n){e(t,n,i)}},GH=class{async provideDocumentPasteEdits(e,t,n,r,o){let s=await this.getEdit(n,o);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,n,r){let o=await this.getEdit(n,r);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}},tC=class i extends GH{constructor(){super(...arguments),this.kind=i.kind,this.dropMimeTypes=[Gr.text],this.pasteMimeTypes=[Gr.text]}static{this.id="text"}static{this.kind=new Un("text.plain")}async getEdit(e,t){let n=e.get(Gr.text);if(!n||e.has(Gr.uriList))return;let r=await n.asString();return{handledMimeType:Gr.text,title:y("text.label","Insert Plain Text"),insertText:r,kind:this.kind}}},Ule=class extends GH{constructor(){super(...arguments),this.kind=new Un("uri.absolute"),this.dropMimeTypes=[Gr.uriList],this.pasteMimeTypes=[Gr.uriList]}async getEdit(e,t){let n=await e1t(e);if(!n.length||t.isCancellationRequested)return;let r=0,o=n.map(({uri:a,originalText:l})=>a.scheme===jt.file?a.fsPath:(r++,l)).join(" "),s;return r>0?s=n.length>1?y("defaultDropProvider.uriList.uris","Insert Uris"):y("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?y("defaultDropProvider.uriList.paths","Insert Paths"):y("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:Gr.uriList,insertText:o,title:s,kind:this.kind}}},jle=class extends GH{constructor(e){super(),this._workspaceContextService=e,this.kind=new Un("uri.relative"),this.dropMimeTypes=[Gr.uriList],this.pasteMimeTypes=[Gr.uriList]}async getEdit(e,t){let n=await e1t(e);if(!n.length||t.isCancellationRequested)return;let r=yl(n.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?Fdt(s.uri,o):void 0}));if(r.length)return{handledMimeType:Gr.uriList,insertText:r.join(" "),title:n.length>1?y("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):y("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};jle=kOe([QH(0,gv)],jle);TOe=class{constructor(){this.kind=new Un("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Gr.text}]}async provideDocumentPasteEdits(e,t,n,r,o){if(r.triggerKind!==KT.PasteAs&&!r.only?.contains(this.kind))return;let a=await n.get("text/html")?.asString();if(!(!a||o.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:y("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}};Qle=class extends W{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new tC)),this._register(e.documentDropEditProvider.register("*",new Ule)),this._register(e.documentDropEditProvider.register("*",new jle(t)))}};Qle=kOe([QH(0,Le),QH(1,gv)],Qle);Gle=class extends W{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new tC)),this._register(e.documentPasteEditProvider.register("*",new Ule)),this._register(e.documentPasteEditProvider.register("*",new jle(t))),this._register(e.documentPasteEditProvider.register("*",new TOe))}};Gle=kOe([QH(0,Le),QH(1,gv)],Gle)});function t1t(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var IOe,GE,du,Yle,cm,fN,LOe,Fv,qH,AB,hp,qE=D(()=>{IOe=class i{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=i._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(i.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(i.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]>"u"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}},GE=class{constructor(){this._children=[]}appendChild(e){return e instanceof du&&this._children[this._children.length-1]instanceof du?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.slice(0);o.splice(r,1,...t),n._children=o,(function s(a,l){for(let c of a)c.parent=l,s(c.children,c)})(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof AB)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},du=class i extends GE{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},Yle=class extends GE{},cm=class i extends Yle{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof fN?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},fN=class i extends GE{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof du&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},LOe=class i extends GE{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Fv&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof Fv){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},Fv=class i extends GE{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},qH=class i extends Yle{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new du(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};AB=class i extends GE{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof cm&&(e.push(n),t=!t||t.indexr===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return t1t([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof cm&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof qH&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){t1t(this.children,e)}},hp=class{constructor(){this._scanner=new IOe,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new AB;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n??!1,t??!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,o=[];t.walk(l=>(l instanceof cm&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let u=r.get(l.index);if(!u)return;let d=new cm(l.index);d.transform=l.transform;for(let h of u){let f=h.clone();d.appendChild(f),f instanceof cm&&r.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}t.replace(l,[d])},a=new Set;for(let l of o)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new cm(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new du(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new cm(Number(t)):new qH(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let o=new cm(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new du("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new fN;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new du(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let o=new qH(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new du("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){let t=new LOe,n="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new du(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new Fv(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Fv(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Fv(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Fv(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Fv(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){let o=this._until(1);if(o){let s=this._until(4);if(s)return e.appendChild(new Fv(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Fv(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new du(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function Kle(i,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(n=>new dE(i,{range:n,text:typeof t.insertText=="string"?hp.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function Jle(i){function e(s,a){return"mimeType"in s?s.mimeType===a.handledMimeType:!!a.kind&&s.kind.contains(a.kind)}let t=new Map;for(let s of i)for(let a of s.yieldTo??[])for(let l of i)if(l!==s&&e(a,l)){let c=t.get(s);c||(c=[],t.set(s,c)),c.push(l)}if(!t.size)return Array.from(i);let n=new Set,r=[];function o(s){if(!s.length)return[];let a=s[0];if(r.includes(a))return console.warn("Yield to cycle detected",a),s;if(n.has(a))return o(s.slice(1));let l=[],c=t.get(a);return c&&(r.push(a),l=o(c),r.pop()),n.add(a),[...l,a,...o(s.slice(1))]}return o(Array.from(i))}var Xle=D(()=>{KI();qE()});var i1t=D(()=>{});var nxi,rxi,oxi,NOe,yB,Zle=D(()=>{Ye();Jt();er();ae();Pt();Dr();i1t();We();vs();ht();nxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rxi=function(i,e){return function(t,n){e(t,n,i)}},oxi=zt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:oZ,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),NOe=class i extends W{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,n,r,o){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=we(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=we("span.icon");this.domNode.append(t),t.classList.add(...ut.asClassNameArray(Ee.loading),"codicon-modifier-spin");let n=()=>{let r=this.editor.getOption(67);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};n(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(52)||r.hasChanged(67))&&n()})),this._register(re(this.domNode,De.CLICK,r=>{this.delegate.cancel()}))}getId(){return i.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)}},yB=class extends W{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new On),this._currentWidget=this._register(new On),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,n,r,o){let s=this._operationIdPool++;this._currentOperation=s,this.clear(),this._showPromise.value=Bp(()=>{let a=N.fromPositions(e);this._currentDecorations.set([{range:a,options:oxi}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(NOe,this.id,this._editor,a,t,r))},o??this._showDelay);try{return await n}finally{this._currentOperation===s&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};yB=nxi([rxi(2,Ne)],yB)});var n1t=D(()=>{});var sxi,r1t,$le,hu,axi,ece,wB=D(()=>{xz();Yl();et();Ad();ae();n1t();ii();We();vx();Oe();Wt();vd();Ye();sxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},r1t=function(i,e){return function(t,n){e(t,n,i)}},hu=class{static{$le=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new Pe("messageVisible",!1,y("messageVisible","Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution($le.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new On,this._messageListeners=new te,this._mouseOverMessage=!1,this._editor=e,this._visible=$le.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){gs(Xh(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=Xh(e)?aE(e,{actionHandler:{callback:r=>{this.closeMessage(),Cz(this._openerService,r,Xh(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new ece(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Se.debounce(this._editor.onDidBlurEditorText,(r,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Co(hs(),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(re(this._messageWidget.value.getDomNode(),De.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(re(this._messageWidget.value.getDomNode(),De.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new N(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(ece.fadeOut(this._messageWidget.value))}};hu=$le=sxi([r1t(1,Ze),r1t(2,jo)],hu);axi=Sr.bindToContribution(hu.get);Qe(new axi({id:"leaveEditorMessage",precondition:hu.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:130,primary:9}}));ece=class{static fadeOut(e){let 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},r){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";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");typeof r=="string"?(s.classList.add("message"),s.textContent=r):(r.classList.add("message"),s.appendChild(r)),this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),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)}};Tt(hu.ID,hu,4)});function MOe(i,e){return e&&(i.stack||i.stacktrace)?y("stackTrace.format","{0}: {1}",s1t(i),o1t(i.stack)||o1t(i.stacktrace)):s1t(i)}function o1t(i){return Array.isArray(i)?i.join(` -`):i}function s1t(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?y("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||y("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function xB(i=null,e=!1){if(!i)return y("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=yl(i),n=xB(t[0],e);return t.length>1?y("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(Ea(i))return i;if(i.detail){let t=i.detail;if(t.error)return MOe(t.error,e);if(t.exception)return MOe(t.exception,e)}return i.stack?MOe(i,e):i.message?i.message:y("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var ROe=D(()=>{Qt();gn();Oe()});var a1t=D(()=>{});var l1t,CB,FOe,OOe,_B,POe=D(()=>{Ye();Wne();$a();ROe();Lt();et();ae();a1t();KI();Xle();Oe();Wt();bd();ht();Yr();_c();l1t=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},CB=function(i,e){return function(t,n){e(t,n,i)}},OOe=class extends W{static{FOe=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,n,r,o,s,a,l,c,u){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=u,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(Ve(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Ve((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(d=>{o.containsPosition(d.position)||this.dispose()})),this._register(Se.runAndSubscribe(u.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){let e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=we(".post-edit-widget"),this.button=this._register(new Mx(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(re(this.domNode,De.CLICK,()=>this.showSelector()))}getId(){return FOe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=bn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>oy({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};OOe=FOe=l1t([CB(7,Xs),CB(8,Ze),CB(9,ni)],OOe);_B=class extends W{constructor(e,t,n,r,o,s,a){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._notificationService=a,this._currentWidget=this._register(new On),this._register(Se.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,n,r,o){let s=this._editor.getModel();if(!s||!e.length)return;let a=t.allEdits.at(t.activeEditIndex);if(!a)return;let l=async v=>{let A=this._editor.getModel();A&&(await A.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:v,allEdits:t.allEdits},n,r,o))},c=(v,A)=>{ja(v)||(this._notificationService.error(A),n&&this.show(e[0],t,l))},u;try{u=await r(a,o)}catch(v){return c(v,y("resolveError",`Error resolving edit '{0}': -{1}`,a.title,xB(v)))}if(o.isCancellationRequested)return;let d=Kle(s.uri,e,u),h=e[0],f=s.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let p,g;try{p=await this._bulkEditService.apply(d,{editor:this._editor,token:o}),g=s.getDecorationRange(f[0])}catch(v){return c(v,y("applyError",`Error applying edit '{0}': -{1}`,a.title,xB(v)))}finally{s.deltaDecorations(f,[])}o.isCancellationRequested||n&&p.isApplied&&t.allEdits.length>1&&this.show(g??h,t,l)}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(OOe,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};_B=l1t([CB(4,Ne),CB(5,Dy),CB(6,Cn)],_B)});var lxi,SB,pN,zOe,tce,BOe,Ov,VOe=D(()=>{Ye();Qt();Jt();sn();jH();n0();ae();PS();Si();WH();rH();DOe();KI();We();tr();Ui();qle();Xle();eC();Zle();wB();Oe();Bx();Wt();ht();Qb();rf();POe();Lt();lxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},SB=function(i,e){return function(t,n){e(t,n,i)}},zOe="editor.changePasteType",tce=new Pe("pasteWidgetVisible",!1,y("pasteWidgetVisible","Whether the paste widget is showing")),BOe="application/vnd.code.copyMetadata",Ov=class extends W{static{pN=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(pN.ID)}constructor(e,t,n,r,o,s,a){super(),this._bulkEditService=n,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(re(l,"copy",c=>this.handleCopy(c))),this._register(re(l,"cut",c=>this.handleCopy(c))),this._register(re(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new yB("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(_B,"pasteIntoEditor",e,tce,{id:zOe,label:y("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},qw().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(!this._editor.hasTextFocus()||(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled()))return;let t=this._editor.getModel(),n=this._editor.getSelections();if(!t||!n?.length)return;let r=this._editor.getOption(37),o=n,s=n.length===1&&n[0].isEmpty();if(s){if(!r)return;o=[new N(o[0].startLineNumber,1,o[0].startLineNumber,1+t.getLineLength(o[0].startLineNumber))]}let a=this._editor._getViewModel()?.getPlainTextToCopy(n,r,Nr),c={multicursorText:Array.isArray(a)?a:null,pasteOnNewLine:s,mode:null},u=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(g=>!!g.prepareDocumentPaste);if(!u.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:c});return}let d=EOe(e.clipboardData),h=u.flatMap(g=>g.copyMimeTypes??[]),f=QE();this.setCopyMetadata(e.clipboardData,{id:f,providerCopyMimeTypes:h,defaultPastePayload:c});let p=hr(async g=>{let v=yl(await Promise.all(u.map(async A=>{try{return await A.prepareDocumentPaste(t,o,d,g)}catch(w){console.error(w);return}})));v.reverse();for(let A of v)for(let[w,C]of A)d.replace(w,C);return d});pN._currentCopyOperation?.dataTransferPromise.cancel(),pN._currentCopyOperation={handle:f,dataTransferPromise:p}}async handlePaste(e){if(!e.clipboardData||!this._editor.hasTextFocus())return;hu.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;let t=this._editor.getModel(),n=this._editor.getSelections();if(!n?.length||!t||this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;let r=this.fetchCopyMetadata(e),o=Wle(e.clipboardData);o.delete(BOe);let s=[...e.clipboardData.types,...r?.providerCopyMimeTypes??[],Gr.uriList],a=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(l=>{let c=this._pasteAsActionContext?.preferred;return c&&l.providedPasteEditKinds&&!this.providerMatchesPreference(l,c)?!1:l.pasteMimeTypes?.some(u=>Vle(u,s))});if(!a.length){this._pasteAsActionContext?.preferred&&this.showPasteAsNoEditMessage(n,this._pasteAsActionContext.preferred);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,a,n,o,r):this.doPasteInline(a,n,o,r,e)}showPasteAsNoEditMessage(e,t){hu.get(this._editor)?.showMessage(y("pasteAsError","No paste edits for '{0}' found",t instanceof Un?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,n,r,o){let s=this._editor;if(!s.hasModel())return;let a=new dp(s,3,void 0),l=hr(async c=>{let u=this._editor;if(!u.hasModel())return;let d=u.getModel(),h=new te,f=h.add(new Bi(c));h.add(a.token.onCancellationRequested(()=>f.cancel()));let p=f.token;try{if(await this.mergeInDataFromCopy(n,r,p),p.isCancellationRequested)return;let g=e.filter(w=>this.isSupportedPasteProvider(w,n));if(!g.length||g.length===1&&g[0]instanceof tC)return this.applyDefaultPasteHandler(n,r,p,o);let v={triggerKind:KT.Automatic},A=await this.getPasteEdits(g,n,d,t,v,p);if(h.add(A),p.isCancellationRequested)return;if(A.edits.length===1&&A.edits[0].provider instanceof tC)return this.applyDefaultPasteHandler(n,r,p,o);if(A.edits.length){let w=u.getOption(85).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:A.edits},w,(C,_)=>new Promise((E,I)=>{(async()=>{try{let T=C.provider.resolveDocumentPasteEdit?.(C,_),L=new Pp,M=T&&await this._pasteProgressManager.showWhile(t[0].getEndPosition(),y("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([L.p,T]),{cancel:()=>(L.cancel(),I(new Hc))},0);return M&&(C.additionalEdit=M.additionalEdit),E(C)}catch(T){return I(T)}})()}),p)}await this.applyDefaultPasteHandler(n,r,p,o)}finally{h.dispose(),this._currentPasteOperation===l&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),y("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),l,{cancel:async()=>{try{if(l.cancel(),a.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(n,r,a.token,o)}finally{a.dispose()}}}).then(()=>{a.dispose()}),this._currentPasteOperation=l}showPasteAsPick(e,t,n,r,o){let s=hr(async a=>{let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),u=new te,d=u.add(new dp(l,3,void 0,a));try{if(await this.mergeInDataFromCopy(r,o,d.token),d.token.isCancellationRequested)return;let h=t.filter(A=>this.isSupportedPasteProvider(A,r,e));e&&(h=h.filter(A=>this.providerMatchesPreference(A,e)));let f={triggerKind:KT.PasteAs,only:e&&e instanceof Un?e:void 0},p=u.add(await this.getPasteEdits(h,r,c,n,f,d.token));if(d.token.isCancellationRequested)return;if(e&&(p={edits:p.edits.filter(A=>e instanceof Un?e.contains(A.kind):e.providerId===A.provider.id),dispose:p.dispose}),!p.edits.length){f.only&&this.showPasteAsNoEditMessage(n,f.only);return}let g;if(e?g=p.edits.at(0):g=(await this._quickInputService.pick(p.edits.map(w=>({label:w.title,description:w.kind?.value,edit:w})),{placeHolder:y("pasteAsPickerPlaceholder","Select Paste Action")}))?.edit,!g)return;let v=Kle(c.uri,n,g);await this._bulkEditService.apply(v,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:y("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(BOe,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;let t=e.clipboardData.getData(BOe);if(t)try{return JSON.parse(t)}catch{return}let[n,r]=goe.getTextData(e.clipboardData);if(r)return{defaultPastePayload:{mode:r.mode,multicursorText:r.multicursorText??null,pasteOnNewLine:!!r.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,n){if(t?.id&&pN._currentCopyOperation?.handle===t.id){let r=await pN._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(let[o,s]of r)e.replace(o,s)}if(!e.has(Gr.uriList)){let r=await this._clipboardService.readResources();if(n.isCancellationRequested)return;r.length&&e.append(Gr.uriList,UH(hN.create(r)))}}async getPasteEdits(e,t,n,r,o,s){let a=new te,l=await YA(Promise.all(e.map(async u=>{try{let d=await u.provideDocumentPasteEdits?.(n,r,t,o,s);return d&&a.add(d),d?.edits?.map(h=>({...h,provider:u}))}catch(d){ja(d)||console.error(d);return}})),s),c=yl(l??[]).flat().filter(u=>!o.only||o.only.contains(u.kind));return{edits:Jle(c),dispose:()=>a.dispose()}}async applyDefaultPasteHandler(e,t,n,r){let s=await(e.get(Gr.text)??e.get("text"))?.asString()??"";if(n.isCancellationRequested)return;let a={clipboardEvent:r,text:s,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",a)}isSupportedPasteProvider(e,t,n){return e.pasteMimeTypes?.some(r=>t.matches(r))?!n||this.providerMatchesPreference(e,n):!1}providerMatchesPreference(e,t){return t instanceof Un?e.providedPasteEditKinds?e.providedPasteEditKinds.some(n=>t.contains(n)):!0:e.id===t.providerId}};Ov=pN=lxi([SB(1,Ne),SB(2,Dy),SB(3,uh),SB(4,Le),SB(5,Na),SB(6,Mte)],Ov)});function UOe(i){return i.register(),i}function u1t(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(ai).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(37),s=r.getSelection();return s&&s.isEmpty()&&!o||r.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(qw().execCommand(e),!0)))}var mN,cxi,c1t,uxi,dxi,hxi,HOe,WOe,d1t=D(()=>{Ph();Ye();Si();rH();ii();fs();vn();VOe();Oe();fr();Bx();Wt();mN="9_cutcopypaste",cxi=Lh||document.queryCommandSupported("cut"),c1t=Lh||document.queryCommandSupported("copy"),uxi=typeof navigator.clipboard>"u"||ml?document.queryCommandSupported("paste"):!0;dxi=cxi?UOe(new rx({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Lh?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:tt.MenubarEditMenu,group:"2_ccp",title:y({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:tt.EditorContext,group:mN,title:y("actions.clipboard.cutLabel","Cut"),when:V.writable,order:1},{menuId:tt.CommandPalette,group:"",title:y("actions.clipboard.cutLabel","Cut"),order:1},{menuId:tt.SimpleEditorContext,group:mN,title:y("actions.clipboard.cutLabel","Cut"),when:V.writable,order:1}]})):void 0,hxi=c1t?UOe(new rx({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Lh?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:tt.MenubarEditMenu,group:"2_ccp",title:y({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:tt.EditorContext,group:mN,title:y("actions.clipboard.copyLabel","Copy"),order:2},{menuId:tt.CommandPalette,group:"",title:y("actions.clipboard.copyLabel","Copy"),order:1},{menuId:tt.SimpleEditorContext,group:mN,title:y("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Zo.appendMenuItem(tt.MenubarEditMenu,{submenu:tt.MenubarCopy,title:Bt("copy as","Copy As"),group:"2_ccp",order:3});Zo.appendMenuItem(tt.EditorContext,{submenu:tt.EditorContextCopy,title:Bt("copy as","Copy As"),group:mN,order:3});Zo.appendMenuItem(tt.EditorContext,{submenu:tt.EditorContextShare,title:Bt("share","Share"),group:"11_share",order:-1,when:me.and(me.notEquals("resourceScheme","output"),V.editorTextFocus)});Zo.appendMenuItem(tt.ExplorerContext,{submenu:tt.ExplorerContextShare,title:Bt("share","Share"),group:"11_share",order:-1});HOe=uxi?UOe(new rx({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Lh?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:tt.MenubarEditMenu,group:"2_ccp",title:y({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:tt.EditorContext,group:mN,title:y("actions.clipboard.pasteLabel","Paste"),when:V.writable,order:4},{menuId:tt.CommandPalette,group:"",title:y("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:tt.SimpleEditorContext,group:mN,title:y("actions.clipboard.pasteLabel","Paste"),when:V.writable,order:4}]})):void 0,WOe=class extends Fe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:y("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(nH.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),nH.forceCopyWithSyntaxHighlighting=!1)}};u1t(dxi,"cut");u1t(hxi,"copy");HOe&&(HOe.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(ai),n=i.get(uh),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?r.getContainerDomNode().ownerDocument.execCommand("paste")?Ov.get(r)?.finishedPaste()??Promise.resolve():cb?(async()=>{let s=await n.readText();if(s!==""){let a=_P.INSTANCE.get(s),l=!1,c=null,u=null;a&&(l=r.getOption(37)&&!!a.isFromEmptySelection,c=typeof a.multicursorText<"u"?a.multicursorText:null,u=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:u})}})():!0:!1}),HOe.addImplementation(0,"generic-dom",(i,e)=>(qw().execCommand("paste"),!0)));c1t&&xe(WOe)});function h1t(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>p1t(e,t,i.include))||!i.includeSourceActions&&pr.Source.contains(e))}function f1t(i,e){let t=e.kind?new Un(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>p1t(t,n,i.include))||!i.includeSourceActions&&t&&pr.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function p1t(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var pr,fu,YE,ice,KE=D(()=>{Lt();n0();pr=new class{constructor(){this.QuickFix=new Un("quickfix"),this.Refactor=new Un("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new Un("notebook"),this.Source=new Un("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(fu||(fu={}));YE=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.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 Un(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}},ice=class{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(n){ln(n)}t&&(this.action.edit=t.edit)}return this}}});async function XE(i,e,t,n,r,o){let s=n.filter||{},a={...s,excludes:[...s.excludes||[],pr.Notebook]},l={only:s.include?.value,trigger:n.type},c=new aN(e,o),u=n.type===2,d=fxi(i,e,u?a:s),h=new te,f=d.map(async g=>{try{r.report(g);let v=await g.provideCodeActions(e,t,l,c.token);if(v&&h.add(v),c.token.isCancellationRequested)return m1t;let A=(v?.actions||[]).filter(C=>C&&f1t(s,C)),w=mxi(g,A,s.include);return{actions:A.map(C=>new ice(C,g)),documentation:w}}catch(v){if(ja(v))throw v;return ln(v),m1t}}),p=i.onDidChange(()=>{let g=i.all(e);Zi(g,d)||c.cancel()});try{let g=await Promise.all(f),v=g.map(w=>w.actions).flat(),A=[...yl(g.map(w=>w.documentation)),...pxi(i,e,n,v)];return new jOe(v,A,h)}finally{p.dispose(),c.dispose()}}function fxi(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>h1t(t,new Un(r))):!0)}function*pxi(i,e,t,n){if(e&&n.length)for(let r of i.all(e))r._getAdditionalMenuItems&&(yield*r._getAdditionalMenuItems?.({trigger:t.type,only:t.filter?.include?.value},n.map(o=>o.action)))}function mxi(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Un(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r?.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new Un(r.kind)))return o.command}}async function g1t(i,e,t,n,r=Ft.None){let o=i.get(Dy),s=i.get(Oi),a=i.get(io),l=i.get(Cn);if(a.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),await e.resolve(r),!r.isCancellationRequested&&!(e.action.edit?.edits.length&&!(await o.apply(e.action.edit,{editor:n?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==JE.OnSave,showPreview:n?.preview})).isApplied)&&e.action.command)try{await s.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){let u=gxi(c);l.error(typeof u=="string"?u:y("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function gxi(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var nce,EB,rce,oce,sce,YH,KH,jOe,m1t,JE,gN=D(()=>{Qt();sn();Lt();ae();mn();KI();We();Hn();Ui();Zc();eC();Oe();Xn();_c();Qb();eh();KE();n0();nce="editor.action.codeAction",EB="editor.action.quickFix",rce="editor.action.autoFix",oce="editor.action.refactor",sce="editor.action.sourceAction",YH="editor.action.organizeImports",KH="editor.action.fixAll",jOe=class i extends W{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:Jo(e.diagnostics)?Jo(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Jo(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&pr.QuickFix.contains(new Un(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}},m1t={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions",i.FromAILightbulb="fromAILightbulb"})(JE||(JE={}));ci.registerCommand("_executeCodeActionProvider",async function(i,e,t,n,r){if(!(e instanceof Xe))throw dc();let{codeActionProvider:o}=i.get(Le),s=i.get(an).getModel(e);if(!s)throw dc();let a=qe.isISelection(t)?qe.liftSelection(t):N.isIRange(t)?s.validateRange(t):void 0;if(!a)throw dc();let l=typeof n=="string"?new Un(n):void 0,c=await XE(o,s,a,{type:1,triggerAction:fu.Default,filter:{includeSourceActions:!0,include:l}},Zf.None,Ft.None),u=[],d=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;hh.action)}finally{setTimeout(()=>c.dispose(),100)}})});var bxi,vxi,QOe,ace,b1t=D(()=>{n0();nv();gN();KE();Yr();bxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vxi=function(i,e){return function(t,n){e(t,n,i)}},ace=class{static{QOe=this}static{this.codeActionCommands=[oce,nce,sce,YH,KH]}constructor(e){this.keybindingService=e}getResolver(){let e=new Ys(()=>this.keybindingService.getKeybindings().filter(t=>QOe.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===YH?n={kind:pr.SourceOrganizeImports.value}:t.command===KH&&(n={kind:pr.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...YE.fromUser(n,{kind:Un.None,apply:"never"})}}));return t=>{if(t.kind)return this.bestKeybindingForCodeAction(t,e.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Un(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};ace=QOe=bxi([vxi(0,ni)],ace)});var v1t=D(()=>{});var A1t=D(()=>{});var JH=D(()=>{v1t();A1t()});var y1t=D(()=>{});var vjn,Ajn,yjn,wjn,xjn,Cjn,_jn,Sjn,Ejn,Djn,Tjn,kjn,Ijn,Ljn,Njn,Mjn,Rjn,Fjn,Ojn,Pjn,Bjn,zjn,Vjn,Hjn,Wjn,Ujn,jjn,Qjn,Gjn,qjn,Yjn,Kjn,Jjn,lce=D(()=>{y1t();Oe();eo();vjn=j("symbolIcon.arrayForeground",Ei,y("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ajn=j("symbolIcon.booleanForeground",Ei,y("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yjn=j("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},y("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wjn=j("symbolIcon.colorForeground",Ei,y("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xjn=j("symbolIcon.constantForeground",Ei,y("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Cjn=j("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_jn=j("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},y("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sjn=j("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ejn=j("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},y("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Djn=j("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tjn=j("symbolIcon.fileForeground",Ei,y("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kjn=j("symbolIcon.folderForeground",Ei,y("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ijn=j("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ljn=j("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Njn=j("symbolIcon.keyForeground",Ei,y("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mjn=j("symbolIcon.keywordForeground",Ei,y("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rjn=j("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Fjn=j("symbolIcon.moduleForeground",Ei,y("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ojn=j("symbolIcon.namespaceForeground",Ei,y("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Pjn=j("symbolIcon.nullForeground",Ei,y("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Bjn=j("symbolIcon.numberForeground",Ei,y("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zjn=j("symbolIcon.objectForeground",Ei,y("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vjn=j("symbolIcon.operatorForeground",Ei,y("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Hjn=j("symbolIcon.packageForeground",Ei,y("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Wjn=j("symbolIcon.propertyForeground",Ei,y("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ujn=j("symbolIcon.referenceForeground",Ei,y("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jjn=j("symbolIcon.snippetForeground",Ei,y("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Qjn=j("symbolIcon.stringForeground",Ei,y("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Gjn=j("symbolIcon.structForeground",Ei,y("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qjn=j("symbolIcon.textForeground",Ei,y("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yjn=j("symbolIcon.typeParameterForeground",Ei,y("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Kjn=j("symbolIcon.unitForeground",Ei,y("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Jjn=j("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function x1t(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:w1t,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title,canPreview:!!o.action.edit?.edits.length}));let n=Axi.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Un(o.action.kind):Un.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions){let a=o.group;r.push({kind:"action",item:s,group:s.action.isAI?{title:a.title,kind:a.kind,icon:Ee.sparkle}:a,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}}return r}var w1t,Axi,C1t=D(()=>{JH();er();KE();lce();Oe();n0();w1t=Object.freeze({kind:Un.Empty,title:y("codeAction.widget.id.more","More Actions...")}),Axi=Object.freeze([{kind:pr.QuickFix,title:y("codeAction.widget.id.quickfix","Quick Fix")},{kind:pr.RefactorExtract,title:y("codeAction.widget.id.extract","Extract"),icon:Ee.wrench},{kind:pr.RefactorInline,title:y("codeAction.widget.id.inline","Inline"),icon:Ee.wrench},{kind:pr.RefactorRewrite,title:y("codeAction.widget.id.convert","Rewrite"),icon:Ee.wrench},{kind:pr.RefactorMove,title:y("codeAction.widget.id.move","Move"),icon:Ee.wrench},{kind:pr.SurroundWith,title:y("codeAction.widget.id.surround","Surround With"),icon:Ee.surroundWith},{kind:pr.Source,title:y("codeAction.widget.id.source","Source Action"),icon:Ee.symbolFile},w1t])});var _1t=D(()=>{});var yxi,wxi,DB,S1t,E1t,D1t,T1t,k1t,Pv,bN,GOe=D(()=>{Ye();Xf();er();et();ae();Dr();_1t();tl();vs();one();gN();Oe();Yr();sp();We();yxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wxi=function(i,e){return function(t,n){e(t,n,i)}},S1t=kn("gutter-lightbulb",Ee.lightBulb,y("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),E1t=kn("gutter-lightbulb-auto-fix",Ee.lightbulbAutofix,y("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),D1t=kn("gutter-lightbulb-sparkle",Ee.lightbulbSparkle,y("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),T1t=kn("gutter-lightbulb-aifix-auto-fix",Ee.lightbulbSparkleAutofix,y("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),k1t=kn("gutter-lightbulb-sparkle-filled",Ee.sparkleFilled,y("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(Pv||(Pv={}));bN=class extends W{static{DB=this}static{this.GUTTER_DECORATION=zt.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:ut.asClassName(Ee.lightBulb),glyphMargin:{position:Hu.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new G),this.onClick=this._onClick.event,this._state=Pv.Hidden,this._gutterState=Pv.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+S1t.id,"codicon-"+T1t.id,"codicon-"+E1t.id,"codicon-"+D1t.id,"codicon-"+k1t.id],this.gutterDecoration=DB.GUTTER_DECORATION,this._domNode=we("div.lightBulbWidget"),this._domNode.role="listbox",this._register(Do.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide(),(this.gutterState.type!==1||!r||this.gutterState.editorPosition.lineNumber>=r.getLineCount())&&this.gutterHide()})),this._register(ost(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=bn(this._domNode),s=this._editor.getOption(67),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(Se.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(rce)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(EB)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async n=>{if(!n.target.element||!this.lightbulbClasses.some(l=>n.target.element&&n.target.element.classList.contains(l))||this.gutterState.type!==1)return;this._editor.focus();let{top:r,height:o}=bn(n.target.element),s=this._editor.getOption(67),a=Math.floor(s/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber22,p=E=>E>2&&this._editor.getTopForLineNumber(E)===this._editor.getTopForLineNumber(E-1),g=this._editor.getLineDecorations(a),v=!1;if(g)for(let E of g){let I=E.options.glyphMarginClassName;if(I&&!this.lightbulbClasses.some(T=>I.includes(T))){v=!0;break}}let A=a,w=1;if(!f){let E=I=>{let T=s.getLineContent(I);return/^\s*$|^\s+/.test(T)||T.length<=w};if(a>1&&!p(a-1)){let I=s.getLineCount(),T=a===I,L=a>1&&E(a-1),M=!T&&E(a+1),z=E(a),H=!M&&!L;if(!M&&!L&&!v)return this.gutterState=new Pv.Showing(e,t,n,{position:{lineNumber:A,column:w},preference:DB._posPref}),this.renderGutterLightbub(),this.hide();L||T||L&&!z?A-=1:(M||H&&z)&&(A+=1)}else if(a===1&&(a===s.getLineCount()||!E(a+1)&&!E(a)))if(this.gutterState=new Pv.Showing(e,t,n,{position:{lineNumber:A,column:w},preference:DB._posPref}),v)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(a{this._gutterDecorationID=t.addDecoration(new N(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(t=>{t.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,t){this._editor.changeDecorations(n=>{n.changeDecoration(e,new N(t,0,t,0)),n.changeDecorationOptions(e,this.gutterDecoration)})}_updateLightbulbTitle(e,t){this.state.type===1&&(t?this.title=y("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=y("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=y("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=y("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};bN=DB=yxi([wxi(1,ni)],bN)});var qOe=D(()=>{});function xxi(i){if(i.kind==="action")return i.label}function L1t(i){return i.replace(/\r\n|\r|\n/g," ")}var I1t,YOe,ZOe,$Oe,KOe,JOe,XOe,cce,uce,N1t=D(()=>{Ye();BV();_x();sn();er();ae();Si();Dr();qOe();Oe();bd();Yr();By();eo();I1t=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},YOe=function(i,e){return function(t,n){e(t,n,i)}},ZOe="acceptSelectedCodeAction",$Oe="previewSelectedCodeAction",KOe=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){n.text.textContent=e.group?.title??""}disposeTemplate(e){}},JOe=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new i1(e,Qa);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){if(e.group?.icon?(n.icon.className=ut.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=it(e.group.icon.color.id))):(n.icon.className=ut.asClassName(Ee.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=L1t(e.label),n.keybinding.set(e.keybinding),bst(!!e.keybinding,n.keybinding.element);let r=this._keybindingService.lookupKeybinding(ZOe)?.getLabel(),o=this._keybindingService.lookupKeybinding($Oe)?.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:r&&o?this._supportsPreview&&e.canPreview?n.container.title=y({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",r,o):n.container.title=y({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",r):n.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};JOe=I1t([YOe(1,ni)],JOe);XOe=class extends UIEvent{constructor(){super("acceptSelectedAction")}},cce=class extends UIEvent{constructor(){super("previewSelectedAction")}};uce=class extends W{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Bi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new il(e,this.domNode,a,[new JOe(t,this._keybindingService),new KOe],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:xxi},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?L1t(l?.label):"";return l.disabled&&(c=y({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>y({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Sx),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(l=>l.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=e;if(this._allMenuItems.length>=50)o=380;else{let l=this._allMenuItems.map((c,u)=>{let d=this.domNode.ownerDocument.getElementById(this._list.getElementID(u));if(d){d.style.width="auto";let h=d.getBoundingClientRect().width;return d.style.width="",h}return 0});o=Math.max(...l,e)}let a=Math.min(r,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,o),this.domNode.style.height=`${a}px`,this._list.domFocus(),o}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new cce:new XOe;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof cce):this._list.setSelection([])}onFocus(){let e=this._list.getFocus();if(e.length===0)return;let t=e[0],n=this._list.element(t);this._delegate.onFocus?.(n.item)}async onListHover(e){let t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){let n=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};uce=I1t([YOe(4,rh),YOe(5,ni)],uce)});var Cxi,ePe,vN,ZE,AN,XH,M1t=D(()=>{Ye();Dg();ae();qOe();Oe();N1t();fr();Wt();bd();wc();ht();eo();Cxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ePe=function(i,e){return function(t,n){e(t,n,i)}};j("actionBar.toggledBackground",Jw,y("actionBar.toggledBackground","Background color for toggled action items in action bar."));vN={Visible:new Pe("codeActionMenuVisible",!1,y("codeActionMenuVisible","Whether the action widget list is visible"))},ZE=vt("actionWidgetService"),AN=class extends W{get isVisible(){return vN.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new On)}show(e,t,n,r,o,s,a){let l=vN.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(uce,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:u=>(l.set(!0),this._renderWidget(u,c,a??[])),onHide:u=>{l.reset(),this._onWidgetClosed(u)}},s,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,n){let 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");let o=new te,s=document.createElement("div"),a=e.appendChild(s);a.classList.add("context-view-block"),o.add(re(a,De.MOUSE_DOWN,f=>f.stopPropagation()));let l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),o.add(re(c,De.POINTER_MOVE,()=>c.remove())),o.add(re(c,De.MOUSE_DOWN,()=>c.remove()));let u=0;if(n.length){let f=this._createActionBar(".action-widget-action-bar",n);f&&(r.appendChild(f.getContainer().parentElement),o.add(f),u=f.getContainer().offsetWidth)}let d=this._list.value?.layout(u);r.style.width=`${d}px`;let h=o.add(Yc(e));return o.add(h.onDidBlur(()=>this.hide(!0))),o}_createActionBar(e,t){if(!t.length)return;let n=we(e),r=new Ns(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){this._list.value?.hide(e)}};AN=Cxi([ePe(0,rh),ePe(1,Ze),ePe(2,Ne)],AN);ui(ZE,AN,1);XH=1100;Pn(class extends la{constructor(){super({id:"hideCodeActionWidget",title:Bt("hideCodeActionWidget.title","Hide action widget"),precondition:vN.Visible,keybinding:{weight:XH,primary:9,secondary:[1033]}})}run(i){i.get(ZE).hide(!0)}});Pn(class extends la{constructor(){super({id:"selectPrevCodeAction",title:Bt("selectPrevCodeAction.title","Select previous action"),precondition:vN.Visible,keybinding:{weight:XH,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(ZE);e instanceof AN&&e.focusPrevious()}});Pn(class extends la{constructor(){super({id:"selectNextCodeAction",title:Bt("selectNextCodeAction.title","Select next action"),precondition:vN.Visible,keybinding:{weight:XH,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(ZE);e instanceof AN&&e.focusNext()}});Pn(class extends la{constructor(){super({id:ZOe,title:Bt("acceptSelected.title","Accept selected action"),precondition:vN.Visible,keybinding:{weight:XH,primary:3,secondary:[2137]}})}run(i){let e=i.get(ZE);e instanceof AN&&e.acceptSelected()}});Pn(class extends la{constructor(){super({id:$Oe,title:Bt("previewSelected.title","Preview selected action"),precondition:vN.Visible,keybinding:{weight:XH,primary:2051}})}run(i){let e=i.get(ZE);e instanceof AN&&e.acceptSelected(!0)}})});var iPe,R1t,tPe,yN,F1t,dce,nPe=D(()=>{Jt();Lt();et();ae();Ec();Ks();Nt();Hn();Wt();Qb();KE();gN();n0();id();iPe=new Pe("supportedCodeAction",""),R1t="_typescript.applyFixAllCodeAction",tPe=class extends W{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new oa),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>gx(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:fu.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getSelection();if(e.type===1)return t;let n=this._editor.getOption(65).enabled;if(n!==hg.Off){{if(n===hg.On)return t;if(n===hg.OnCode){if(!t.isEmpty())return t;let o=this._editor.getModel(),{lineNumber:s,column:a}=t.getPosition(),l=o.getLineContent(s);if(l.length===0)return;if(a===1){if(/\s/.test(l[0]))return}else if(a===o.getLineMaxColumn(s)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[a-2])&&/\s/.test(l[a-1]))return}}return t}}};(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(ja(s))return F1t;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(yN||(yN={}));F1t=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1}),dce=class extends W{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._configurationService=s,this._telemetryService=a,this._codeActionOracle=this._register(new On),this._state=yN.Empty,this._onDidChangeState=this._register(new G),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=iPe.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(yN.Empty,!0))}_settingEnabledNearbyQuickfixes(){let e=this._editor?.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(yN.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){let t=this._registry.all(e).flatMap(n=>n.providedCodeActionKinds??[]);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new tPe(this._editor,this._markerService,n=>{if(!n){this.setState(yN.Empty);return}let r=n.selection.getStartPosition(),o=hr(async l=>{if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===fu.QuickFix||n.trigger.filter?.include?.contains(pr.QuickFix))){let c=await XE(this._registry,e,n.selection,n.trigger,Zf.None,l),u=[...c.allActions];if(l.isCancellationRequested)return F1t;let d=c.validActions?.some(f=>f.action.kind?pr.QuickFix.contains(new Un(f.action.kind)):!1),h=this._markerService.read({resource:e.uri});if(d){for(let f of c.validActions)f.action.command?.arguments?.some(p=>typeof p=="string"&&p.includes(R1t))&&(f.action.diagnostics=[...h.filter(p=>p.relatedInformation)]);return{validActions:c.validActions,allActions:u,documentation:c.documentation,hasAutoFix:c.hasAutoFix,hasAIFix:c.hasAIFix,allAIFixes:c.allAIFixes,dispose:()=>{c.dispose()}}}else if(!d&&h.length>0){let f=n.selection.getPosition(),p=f,g=Number.MAX_VALUE,v=[...c.validActions];for(let w of h){let C=w.endColumn,_=w.endLineNumber,E=w.startLineNumber;if(_===f.lineNumber||E===f.lineNumber){p=new K(_,C);let I={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:n.trigger.filter?.include?n.trigger.filter?.include:pr.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:n.trigger.context?.notAvailableMessage||"",position:p}},T=new qe(p.lineNumber,p.column,p.lineNumber,p.column),L=await XE(this._registry,e,T,I,Zf.None,l);if(L.validActions.length!==0){for(let M of L.validActions)M.action.command?.arguments?.some(z=>typeof z=="string"&&z.includes(R1t))&&(M.action.diagnostics=[...h.filter(z=>z.relatedInformation)]);c.allActions.length===0&&u.push(...L.allActions),Math.abs(f.column-C)_.findIndex(E=>E.action.title===w.action.title)===C);return A.sort((w,C)=>w.action.isPreferred&&!C.action.isPreferred?-1:!w.action.isPreferred&&C.action.isPreferred||w.action.isAI&&!C.action.isAI?1:!w.action.isAI&&C.action.isAI?-1:0),{validActions:A,allActions:u,documentation:c.documentation,hasAutoFix:c.hasAutoFix,hasAIFix:c.hasAIFix,allAIFixes:c.allAIFixes,dispose:()=>{c.dispose()}}}}if(n.trigger.type===1){let c=new Ar,u=await XE(this._registry,e,n.selection,n.trigger,Zf.None,l);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:u.validActions.length,duration:c.elapsed()}),u}return XE(this._registry,e,n.selection,n.trigger,Zf.None,l)});n.trigger.type===1&&this._progressService?.showWhile(o,250);let s=new yN.Triggered(n.trigger,r,o),a=!1;this._state.type===1&&(a=this._state.trigger.type===1&&s.type===1&&s.trigger.type===2&&this._state.position!==s.position),a?setTimeout(()=>{this.setState(s)},500):this.setState(s)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:fu.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.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 _xi,h1,TB,Sxi,iC,hce=D(()=>{Ye();Yl();Lt();nv();ae();Nt();vs();Ui();gN();b1t();C1t();GOe();wB();Oe();M1t();Xn();nr();Wt();ht();Vy();Qb();eo();Pb();Zn();KE();nPe();n0();eh();_xi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},h1=function(i,e){return function(t,n){e(t,n,i)}},Sxi="quickfix-edit-highlight",iC=class extends W{static{TB=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(TB.ID)}constructor(e,t,n,r,o,s,a,l,c,u,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=u,this._telemetryService=d,this._activeCodeActions=this._register(new On),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new dce(this._editor,o.codeActionProvider,t,n,s,l,this._telemetryService)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new Ys(()=>{let h=this._editor.getContribution(bN.ID);return h&&this._register(h.onClick(f=>this.showCodeActionsFromLightbulb(f.actions,f))),h}),this._resolver=r.createInstance(ace),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){let n=e.validActions[0],r=n.action.command;r&&r.id==="inlineChat.start"&&r.arguments&&r.arguments.length>=1&&(r.arguments[0]={...r.arguments[0],autoSend:!1}),await this._applyCodeAction(n,!1,!1,JE.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){if(!this._editor.hasModel())return;hu.get(this._editor)?.closeMessage();let o=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,n,r){try{await this._instantiationService.invokeFunction(g1t,e,r,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:fu.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(e.type!==1){this.hideLightBulbWidget();return}let t;try{t=await e.actions}catch(r){pt(r);return}if(!(this._disposed||this._editor.getSelection()?.startLineNumber!==e.position.lineNumber))if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),e.trigger.type===1){if(e.trigger.filter?.include){let o=this.tryGetValidActionToApply(e.trigger,t);if(o){try{this.hideLightBulbWidget(),await this._applyCodeAction(o,!1,!1,JE.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){let s=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(s&&s.action.disabled){hu.get(this._editor)?.showMessage(s.action.disabled,e.trigger.context.position),t.dispose();return}}}let r=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!r&&!t.validActions.length)){hu.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,t.dispose();return}this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:r,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}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]}static{this.DECORATION=zt.register({description:"quickfix-highlight",className:Sxi})}async showCodeActionList(e,t,n){let r=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;let s=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!s.length)return;let a=K.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(c,u)=>{this._applyCodeAction(c,!0,!!u,n.fromLightbulb?JE.FromAILightbulb:JE.FromCodeActions),this._actionWidgetService.hide(!1),r.clear()},onHide:c=>{this._editor?.focus(),r.clear()},onHover:async(c,u)=>{if(u.isCancellationRequested)return;let d=!1,h=c.action.kind;if(h){let f=new Un(h);d=[pr.RefactorExtract,pr.RefactorInline,pr.RefactorRewrite,pr.RefactorMove,pr.Source].some(g=>g.contains(f))}return{canPreview:d||!!c.action.edit?.edits.length}},onFocus:c=>{if(c&&c.action){let u=c.action.ranges,d=c.action.diagnostics;if(r.clear(),u&&u.length>0){let h=d&&d?.length>1?d.map(f=>({range:f,options:TB.DECORATION})):u.map(f=>({range:f,options:TB.DECORATION}));r.set(h)}else if(d&&d.length>0){let h=d.map(p=>({range:p,options:TB.DECORATION}));r.set(h);let f=d[0];if(f.startLineNumber&&f.startColumn){let p=this._editor.getModel()?.getWordAtPosition({lineNumber:f.startLineNumber,column:f.startColumn})?.word;yd(y("editingNewSelection","Context: {0} at line {1} and column {2}.",p,f.startLineNumber,f.startColumn))}}}else r.clear()}};this._actionWidgetService.show("codeActionWidget",!0,x1t(s,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,o,this._getActionBarActions(e,t,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=bn(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){let e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>({id:o.id,label:o.title,tooltip:o.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(o.id,...o.arguments??[])}));return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:y("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:y("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};iC=TB=_xi([h1(1,tf),h1(2,Ze),h1(3,Ne),h1(4,Le),h1(5,$f),h1(6,Oi),h1(7,kt),h1(8,ZE),h1(9,Ne),h1(10,io)],iC);ua((i,e)=>{((r,o)=>{o&&e.addRule(`.monaco-editor ${r} { background-color: ${o}; }`)})(".quickfix-edit-highlight",i.getColor(cg));let n=i.getColor(Rb);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Bu(i.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)})});function ZH(i){return me.regex(iPe.keys()[0],new RegExp("(\\s|^)"+Ja(i.value)+"\\b"))}function wN(i,e,t,n,r=fu.Default){i.hasModel()&&iC.get(i)?.manualTriggerAtCurrentPosition(e,r,t,n)}var rPe,fce,pce,mce,gce,bce,vce,Ace,O1t=D(()=>{n0();Pt();ii();vn();gN();Oe();Wt();KE();hce();nPe();rPe={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:y("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:y("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[y("args.schema.apply.first","Always apply the first returned code action."),y("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),y("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:y("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};fce=class extends Fe{constructor(){super({id:EB,label:y("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:me.and(V.writable,V.hasCodeActionsProvider),kbOpts:{kbExpr:V.textInputFocus,primary:2137,weight:100}})}run(e,t){return wN(t,y("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,fu.QuickFix)}},pce=class extends Sr{constructor(){super({id:nce,precondition:me.and(V.writable,V.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:rPe}]}})}runEditorCommand(e,t,n){let r=YE.fromUser(n,{kind:Un.Empty,apply:"ifSingle"});return wN(t,typeof n?.kind=="string"?r.preferred?y("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):y("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?y("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):y("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},mce=class extends Fe{constructor(){super({id:oce,label:y("refactor.label","Refactor..."),alias:"Refactor...",precondition:me.and(V.writable,V.hasCodeActionsProvider),kbOpts:{kbExpr:V.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:me.and(V.writable,ZH(pr.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:rPe}]}})}run(e,t,n){let r=YE.fromUser(n,{kind:pr.Refactor,apply:"never"});return wN(t,typeof n?.kind=="string"?r.preferred?y("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):y("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?y("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):y("editor.action.refactor.noneMessage","No refactorings available"),{include:pr.Refactor.contains(r.kind)?r.kind:Un.None,onlyIncludePreferredActions:r.preferred},r.apply,fu.Refactor)}},gce=class extends Fe{constructor(){super({id:sce,label:y("source.label","Source Action..."),alias:"Source Action...",precondition:me.and(V.writable,V.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:me.and(V.writable,ZH(pr.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:rPe}]}})}run(e,t,n){let r=YE.fromUser(n,{kind:pr.Source,apply:"never"});return wN(t,typeof n?.kind=="string"?r.preferred?y("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):y("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?y("editor.action.source.noneMessage.preferred","No preferred source actions available"):y("editor.action.source.noneMessage","No source actions available"),{include:pr.Source.contains(r.kind)?r.kind:Un.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,fu.SourceAction)}},bce=class extends Fe{constructor(){super({id:YH,label:y("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:me.and(V.writable,ZH(pr.SourceOrganizeImports)),kbOpts:{kbExpr:V.textInputFocus,primary:1581,weight:100}})}run(e,t){return wN(t,y("editor.action.organize.noneMessage","No organize imports action available"),{include:pr.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",fu.OrganizeImports)}},vce=class extends Fe{constructor(){super({id:KH,label:y("fixAll.label","Fix All"),alias:"Fix All",precondition:me.and(V.writable,ZH(pr.SourceFixAll))})}run(e,t){return wN(t,y("fixAll.noneMessage","No fix all action available"),{include:pr.SourceFixAll,includeSourceActions:!0},"ifSingle",fu.FixAll)}},Ace=class extends Fe{constructor(){super({id:rce,label:y("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:me.and(V.writable,ZH(pr.QuickFix)),kbOpts:{kbExpr:V.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return wN(t,y("editor.action.autoFix.noneMessage","No auto fixes available"),{include:pr.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",fu.AutoFix)}}});var P1t=D(()=>{ii();Ste();O1t();hce();GOe();Oe();cy();sa();Tt(iC.ID,iC,3);Tt(bN.ID,bN,4);xe(fce);xe(mce);xe(gce);xe(bce);xe(Ace);xe(vce);Qe(new pce);Gi.as(xc.Configuration).registerConfiguration({...JI,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:y("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});Gi.as(xc.Configuration).registerConfiguration({...JI,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:y("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});Gi.as(xc.Configuration).registerConfiguration({...JI,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:y("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}})});async function oPe(i,e,t){let n=i.ordered(e),r=new Map,o=new kB,s=n.map(async(a,l)=>{r.set(a,l);try{let c=await Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){ln(c)}});return await Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:r.get(a.provider)r.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),o}var kB,sPe=D(()=>{sn();Lt();ae();gn();mn();Zc();Xn();Ui();kB=class{constructor(){this.lenses=[],this._disposables=new te}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};ci.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;yi(Xe.isUri(t)),yi(typeof n=="number"||!n);let{codeLensProvider:r}=i.get(Le),o=i.get(an).getModel(t);if(!o)throw dc();let s=[],a=new te;return oPe(r,o,Ft.None).then(l=>{a.add(l);let c=[];for(let u of l.lenses)n==null||u.symbol.command?s.push(u.symbol):n-- >0&&u.provider.resolveCodeLens&&c.push(Promise.resolve(u.provider.resolveCodeLens(o,u.symbol,Ft.None)).then(d=>s.push(d||u.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var Exi,Dxi,lPe,yce,aPe,B1t=D(()=>{et();ql();We();sPe();wc();ht();yv();ad();Ye();Exi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Dxi=function(i,e){return function(t,n){e(t,n,i)}},lPe=vt("ICodeLensCache"),yce=class{constructor(e,t){this.lineCount=e,this.data=t}},aPe=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Gl(20,.75);let t="codelens/cache";Yk(Xi,()=>e.remove(t,1));let n="codelens/cache2",r=e.get(n,1,"{}");this._deserialize(r);let o=Se.filter(e.onWillSaveState,s=>s.reason===mE.SHUTDOWN);Se.once(o)(s=>{e.store(n,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(s=>({range:s.symbol.range,command:s.symbol.command&&{id:"",title:s.symbol.command?.title}})),r=new kB;r.add({lenses:n,dispose:()=>{}},this._fakeProvider);let o=new yce(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){let 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(){let e=Object.create(null);for(let[t,n]of this._cache){let r=new Set;for(let o of n.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let n in t){let r=t[n],o=[];for(let a of r.lines)o.push({range:new N(a,1,a,11)});let s=new kB;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new yce(r.lineCount,s))}}catch{}}};aPe=Exi([Dxi(0,ec)],aPe);ui(lPe,aPe,1)});var z1t=D(()=>{});var cPe,uPe,IB,V1t,$H,H1t=D(()=>{Ye();mx();z1t();We();vs();cPe=class{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")}},uPe=class i{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${i._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();let n=[],r=!1;for(let o=0;o{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:V1t},d=>this._decorationIds[u]=d),a?a=N.plusRange(a,c.symbol.range):a=N.lift(c.symbol.range)}),this._viewZone=new cPe(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new uPe(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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)=>{let n=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(n&&N.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,r)=>{t.addDecoration({range:n.symbol.range,options:V1t},o=>this._decorationIds[r]=o)})}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{Jt();Lt();ae();$L();ii();Ks();vn();sPe();B1t();H1t();Oe();Xn();_c();rf();Kp();Ui();Txi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eW=function(i,e){return function(t,n){e(t,n,i)}},tW=class{static{this.ID="css.editor.codeLens"}constructor(e,t,n,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new te,this._localToDispose=new te,this._lenses=[],this._oldCodeLensModels=new te,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new di(()=>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(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52)),t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),r=this._editor.getOption(50),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",_l.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&Bp(()=>{let r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(let r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){let o=r.onDidChange(()=>n.schedule());this._localToDispose.add(o)}let n=new di(()=>{let r=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=hr(o=>oPe(this._languageFeaturesService.codeLensProvider,e,o)),this._getCodeLensModelPromise.then(o=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=o,this._codeLensCache.put(e,o);let s=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=s,this._renderCodeLensSymbols(o),this._resolveCodeLensesInViewportSoon()},pt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Ve(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(r=>{this._editor.changeViewZones(o=>{let s=[],a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?s.push(c):(c.update(o),a=c.getLineNumber())});let l=new IB;s.forEach(c=>{c.dispose(l,o),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ve(()=>{if(this._editor.getModel()){let r=lf.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if(o?.tagName==="SPAN"&&(o=o.parentElement),o?.tagName==="A")for(let s of this._lenses){let a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new IB;for(let r of this._lenses)r.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],n.push(r)))}if(!n.length&&!this._lenses.length)return;let o=lf.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new IB,u=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),u++,d++)}for(;uthis._resolveCodeLensesInViewportSoon())),d++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;let e=this._editor.getModel();if(!e)return;let t=[],n=[];if(this._lenses.forEach(s=>{let a=s.computeIfNecessary(e);a&&(t.push(a),n.push(s))}),t.length===0)return;let r=Date.now(),o=hr(s=>{let a=t.map((l,c)=>{let u=new Array(l.length),d=l.map((h,f)=>!h.symbol.command&&typeof h.provider.resolveCodeLens=="function"?Promise.resolve(h.provider.resolveCodeLens(e,h.symbol,s)).then(p=>{u[f]=p},ln):(u[f]=h.symbol,Promise.resolve(void 0)));return Promise.all(d).then(()=>{!s.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(u)})});return Promise.all(a)});this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then(()=>{let s=this._resolveCodeLensesDebounce.update(e,Date.now()-r);this._resolveCodeLensesScheduler.delay=s,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},s=>{pt(s),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};tW=Txi([eW(1,Le),eW(2,da),eW(3,Oi),eW(4,Cn),eW(5,lPe)],tW);Tt(tW.ID,tW,1);xe(class extends Fe{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:V.hasCodeLensProvider,label:y("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;let n=e.get(Na),r=e.get(Oi),o=e.get(Cn),s=t.getSelection().positionLineNumber,a=t.getContribution(tW.ID);if(!a)return;let l=await a.getModel();if(!l)return;let c=[];for(let h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===s&&c.push({label:h.symbol.command.title,command:h.symbol.command});if(c.length===0)return;let u=await n.pick(c,{canPickMany:!1,placeHolder:y("placeHolder","Select a command")});if(!u)return;let d=u.command;if(l.isDisposed){let f=(await a.getModel())?.lenses.find(p=>p.symbol.range.startLineNumber===s&&p.symbol.command?.title===d.title);if(!f||!f.symbol.command)return;d=f.symbol.command}try{await r.executeCommand(d.id,...d.arguments||[])}catch(h){o.error(h)}}})});var U1t,dPe,xN,hPe,fPe=D(()=>{Ho();ae();Ui();IE();xv();U1t=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dPe=function(i,e){return function(t,n){e(t,n,i)}},xN=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,n){let r=t.range,o=t.color,s=o.alpha,a=new pe(new Ri(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?pe.Format.CSS.formatRGB(a):pe.Format.CSS.formatRGBA(a),c=s?pe.Format.CSS.formatHSL(a):pe.Format.CSS.formatHSLA(a),u=s?pe.Format.CSS.formatHex(a):pe.Format.CSS.formatHexA(a),d=[];return d.push({label:l,textEdit:{range:r,text:l}}),d.push({label:c,textEdit:{range:r,text:c}}),d.push({label:u,textEdit:{range:r,text:u}}),d}};xN=U1t([dPe(0,pa)],xN);hPe=class extends W{constructor(e,t){super(),this._register(e.colorProvider.register("*",new xN(t)))}};hPe=U1t([dPe(0,Le),dPe(1,pa)],hPe);Xb(hPe)});async function wce(i,e,t,n=!0){return vPe(new pPe,i,e,t,n)}function bPe(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}async function vPe(i,e,t,n,r){let o=!1,s,a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){let u=l[c];if(u instanceof xN)s=u;else try{await i.compute(u,t,n,a)&&(o=!0)}catch(d){ln(d)}}return o?a:s&&r?(await i.compute(s,t,n,a),a):[]}function j1t(i,e){let{colorProvider:t}=i.get(Le),n=i.get(an).getModel(e);if(!n)throw dc();let r=i.get(kt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}var pPe,mPe,gPe,APe=D(()=>{sn();Lt();mn();We();Zc();Xn();Ui();fPe();nr();pPe=class{constructor(){}async compute(e,t,n,r){let o=await e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)}},mPe=class{constructor(){}async compute(e,t,n,r){let o=await e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)}},gPe=class{constructor(e){this.colorInfo=e}async compute(e,t,n,r){let o=await e.provideColorPresentations(t,this.colorInfo,Ft.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)}};ci.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof Xe))throw dc();let{model:n,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=j1t(i,t);return vPe(new mPe,r,n,Ft.None,o)});ci.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,n]=e,{uri:r,range:o}=n;if(!(r instanceof Xe)||!Array.isArray(t)||t.length!==4||!N.isIRange(o))throw dc();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=j1t(i,r),[c,u,d,h]=t;return vPe(new gPe({range:o,color:{red:c,green:u,blue:d,alpha:h}}),a,s,Ft.None,l)})});var kxi,yPe,wPe,CPe,CN,xPe,_Pe=D(()=>{Jt();Ho();Lt();et();ae();id();Pt();pF();ii();We();vs();Kp();Ui();APe();nr();kxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},yPe=function(i,e){return function(t,n){e(t,n,i)}},CPe=Object.create({}),CN=class extends W{static{wPe=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new te),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new fF(this._editor),this._decoratorLimitReporter=new xPe,this._colorDecorationClassRefs=this._register(new te),this._debounceInformation=r.for(n.colorProvider,"Document Colors",{min:wPe.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(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(21),l=o.hasChanged(148);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){let r=n.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new oa,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=hr(async e=>{let t=this._editor.getModel();if(!t)return[];let n=new Ar(!1),r=await wce(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),r});try{let e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){pt(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){let 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:zt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(21);for(let o=0;othis._colorDatas.has(r.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};CN=wPe=kxi([yPe(1,kt),yPe(2,Le),yPe(3,da)],CN);xPe=class{constructor(){this._onDidChange=new G,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Tt(CN.ID,CN,1)});var xce,Q1t=D(()=>{et();xce=class{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 G,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new G,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new G,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 r=0;r{});var um,SPe,EPe,DPe,TPe,_ce,kPe,IPe,LPe,Sce,G1t=D(()=>{d$();Ye();rF();bg();er();Ho();et();ae();Dr();Cce();Oe();eo();sp();um=we,SPe=class extends W{constructor(e,t,n,r=!1){super(),this.model=t,this.showingStandaloneColorPicker=r,this._closeButton=null,this._domNode=um(".colorpicker-header"),be(e,this._domNode),this._pickedColorNode=be(this._domNode,um(".picked-color")),be(this._pickedColorNode,um("span.codicon.codicon-color-mode")),this._pickedColorPresentation=be(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");let o=y("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=be(this._domNode,um(".original-color")),this._originalColorNode.style.backgroundColor=pe.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(i7)||pe.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(i7)||pe.white})),this._register(re(this._pickedColorNode,De.CLICK,()=>this.model.selectNextColorPresentation())),this._register(re(this._originalColorNode,De.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=pe.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 EPe(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=pe.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:""}},EPe=class extends W{constructor(e){super(),this._onClicked=this._register(new G),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),be(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),be(this._button,t),be(t,um(".button"+ut.asCSSSelector(kn("color-picker-close",Ee.close,y("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(re(this._button,De.CLICK,()=>{this._onClicked.fire()}))}},DPe=class extends W{constructor(e,t,n,r=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=um(".colorpicker-body"),be(e,this._domNode),this._saturationBox=new TPe(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 kPe(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new IPe(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new LPe(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let n=this.model.color.hsva;this.model.color=new pe(new sv(n.h,e,t,n.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new pe(new sv(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,n=(1-e)*360;this.model.color=new pe(new sv(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()}},TPe=class extends W{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new G,this.onColorFlushed=this._onColorFlushed.event,this._domNode=um(".saturation-wrap"),be(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",be(this._domNode,this._canvas),this.selection=um(".saturation-selection"),be(this._domNode,this.selection),this.layout(),this._register(re(this._domNode,De.POINTER_DOWN,r=>this.onPointerDown(r))),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 ag);let t=bn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);let n=re(e.target.ownerDocument,De.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}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();let e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){let e=this.model.color.hsva,t=new pe(new sv(e.h,1,1,1)),n=this._canvas.getContext("2d"),r=n.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");let o=n.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=pe.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();let t=e.hsva;this.paintSelection(t.s,t.v)}},_ce=class extends W{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new G,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=be(e,um(".standalone-strip")),this.overlay=be(this.domNode,um(".standalone-overlay"))):(this.domNode=be(e,um(".strip")),this.overlay=be(this.domNode,um(".overlay"))),this.slider=be(this.domNode,um(".slider")),this.slider.style.top="0px",this._register(re(this.domNode,De.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){let t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new ag),n=bn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);let r=re(e.target.ownerDocument,De.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){let 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`}},kPe=class extends _ce{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);let{r:t,g:n,b:r}=e.rgba,o=new pe(new Ri(t,n,r,1)),s=new pe(new Ri(t,n,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},IPe=class extends _ce{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},LPe=class extends W{constructor(e){super(),this._onClicked=this._register(new G),this.onClicked=this._onClicked.event,this._button=be(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(re(this._button,De.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}},Sce=class extends Ls{constructor(e,t,n,r,o=!1){super(),this.model=t,this.pixelRatio=n,this._register(MS.getInstance(rt(e)).onDidChange(()=>this.layout())),this._domNode=um(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new SPe(this._domNode,this.model,r,o)),this.body=this._register(new DPe(this._domNode,this.model,this.pixelRatio,o))}layout(){this.body.layout()}get domNode(){return this._domNode}}});var LB,$E,dm,Og,Pg=D(()=>{LB=class{constructor(e,t,n,r){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=r,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}},$E=class{constructor(e,t,n,r,o,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},dm=class{constructor(e){this.renderedHoverParts=e}dispose(){for(let e of this.renderedHoverParts)e.dispose()}},Og=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});async function K1t(i,e,t,n){let r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new Ri(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),u=new pe(c),d=await bPe(e,t,n,Ft.None),h=new xce(u,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(u,r),i instanceof _N?new NPe(i,N.lift(t.range),h,n):new MPe(i,N.lift(t.range),h,n)}function J1t(i,e,t,n,r){if(n.length===0||!e.hasModel())return;if(r.setMinimumDimensions){let h=e.getOption(67)+8;r.setMinimumDimensions(new hn(302,h))}let o=new te,s=n[0],a=e.getModel(),l=s.model,c=o.add(new Sce(r.fragment,l,e.getOption(144),t,i instanceof NB)),u=!1,d=new N(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof NB){let h=s.model.color;i.color=h,Ece(a,l,h,d,s),o.add(l.onColorFlushed(f=>{i.color=f}))}else o.add(l.onColorFlushed(async h=>{await Ece(a,l,h,d,s),u=!0,d=X1t(e,d,l)}));return o.add(l.onDidChangeColor(h=>{Ece(a,l,h,d,s)})),o.add(e.onDidChangeModelContent(h=>{u?u=!1:(r.hide(),e.focus())})),{hoverPart:s,colorPicker:c,disposables:o}}function X1t(i,e,t){let n=[],r=t.presentation.textEdit??{range:e,text:t.presentation.label,forceMoveMarkers:!1};n.push(r),t.presentation.additionalTextEdits&&n.push(...t.presentation.additionalTextEdits);let o=N.lift(r.range),s=i.getModel()._setTrackedRange(null,o,3);return i.executeEdits("colorpicker",n),i.pushUndoStop(),i.getModel()._getTrackedRange(s)??o}async function Ece(i,e,t,n,r){let o=await bPe(i,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,Ft.None);e.colorPresentations=o||[]}var q1t,Y1t,NPe,_N,MPe,NB,Dce=D(()=>{Jt();sn();Ho();ae();We();APe();_Pe();Q1t();G1t();Pg();Zn();Ye();q1t=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Y1t=function(i,e){return function(t,n){e(t,n,i)}},NPe=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},_N=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return Ou.fromPromise(this._computeAsync(e,t,n))}async _computeAsync(e,t,n){if(!this._editor.hasModel())return[];let r=CN.get(this._editor);if(!r)return[];for(let o of t){if(!r.isColorDecoration(o))continue;let s=r.getColorData(o.range.getStartPosition());if(s)return[await K1t(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]}renderHoverParts(e,t){let n=J1t(this,this._editor,this._themeService,t,e);if(!n)return new dm([]);this._colorPicker=n.colorPicker;let r={hoverPart:n.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){n.disposables.dispose()}};return new dm([r])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};_N=q1t([Y1t(1,Bn)],_N);MPe=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r}},NB=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,n){if(!this._editor.hasModel()||!CN.get(this._editor))return null;let o=await wce(n,this._editor.getModel(),Ft.None),s=null,a=null;for(let d of o){let h=d.colorInfo;N.containsRange(h.range,e.range)&&(s=h,a=d.provider)}let l=s??e,c=a??t,u=!!s;return{colorHover:await K1t(this,this._editor.getModel(),l,c),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;let t=e.model,n=new N(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await Ece(this._editor.getModel(),t,this._color,n,e),n=X1t(this._editor,n,t))}renderHoverParts(e,t){return J1t(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};NB=q1t([Y1t(1,Bn)],NB)});var Tce,Z1t,$1t,ewt,twt,iwt,nwt,rwt,owt,swt,SN,awt,EN,lwt,kce=D(()=>{Oe();Tce="editor.action.showHover",Z1t="editor.action.showDefinitionPreviewHover",$1t="editor.action.scrollUpHover",ewt="editor.action.scrollDownHover",twt="editor.action.scrollLeftHover",iwt="editor.action.scrollRightHover",nwt="editor.action.pageUpHover",rwt="editor.action.pageDownHover",owt="editor.action.goToTopHover",swt="editor.action.goToBottomHover",SN="editor.action.increaseHoverVerbosityLevel",awt=y({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),EN="editor.action.decreaseHoverVerbosityLevel",lwt=y({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level")});var cwt=D(()=>{});var Ice,Lce,Nce,Mce=D(()=>{Ice="editor.action.inlineSuggest.commit",Lce="editor.action.inlineSuggest.showPrevious",Nce="editor.action.inlineSuggest.showNext"});var PPe,r0,Rce,Fce,Ixi,Lxi,nC,RPe,FPe,OPe,Oce=D(()=>{Ye();rL();BV();$a();Qt();Jt();er();ae();Tn();$h();Si();Dr();cwt();Nt();tr();Mce();Oe();Ex();TH();fr();Xn();Wt();bd();ht();Yr();eh();sp();PPe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},r0=function(i,e){return function(t,n){e(t,n,i)}},Fce=class extends W{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=st(this,r=>{let o=this.model.read(r)?.primaryGhostText.read(r);if(!this.alwaysShowToolbar.read(r)||!o||o.parts.length===0)return this.sessionPosition=void 0,null;let s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);let a=new K(o.lineNumber,Math.min(s,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(ts((r,o)=>{let s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;let a=sh((c,u)=>{let d=u.add(this.instantiationService.createInstance(nC,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands));return e.addContentWidget(d),u.add(Ve(()=>e.removeContentWidget(d))),u.add(_t(h=>{this.position.read(h)&&s.lastTriggerKind.read(h)!==Lf.Explicit&&s.triggerExplicitly()})),d}),l=Fy(this,(c,u)=>!!this.position.read(c)||!!u);o.add(_t(c=>{l.read(c)&&a.read(c)}))}))}};Fce=PPe([r0(2,Ne)],Fce);Ixi=kn("inline-suggestion-hints-next",Ee.chevronRight,y("parameterHintsNextIcon","Icon for show next parameter hint.")),Lxi=kn("inline-suggestion-hints-previous",Ee.chevronLeft,y("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),nC=class extends W{static{Rce=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,n){let r=new Js(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=y({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,n,r,o,s,a,l,c,u,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=u,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${Rce.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=pi("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[pi("div@toolBar")]),this.previousAction=this.createCommandAction(Lce,y("previous","Previous"),ut.asClassName(Lxi)),this.availableSuggestionCountAction=new Js("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(Nce,y("next","Next"),ut.asClassName(Ixi)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(tt.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new di(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new di(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.toolBar=this._register(l.createInstance(OPe,this.nodes.toolBar,tt.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof Ql)return l.createInstance(FPe,h,void 0);if(h===this.availableSuggestionCountAction){let p=new RPe(void 0,h,{label:!0,icon:!1});return p.setClass("availableSuggestionCount"),p}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{Rce._dropDownVisible=h})),this._register(_t(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(_t(h=>{let f=this._suggestionCount.read(h),p=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${p+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(_t(h=>{let p=this._extraCommands.read(h).map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:v=>this._commandService.executeCommand(g.id)}));for(let[g,v]of this.inlineCompletionsActionsMenus.getActions())for(let A of v)A instanceof Ql&&p.push(A);p.length>0&&p.unshift(new go),this.toolBar.setAdditionalSecondaryActions(p)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};nC=Rce=PPe([r0(6,Oi),r0(7,Ne),r0(8,ni),r0(9,Ze),r0(10,el)],nC);RPe=class extends Eg{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}},FPe=class extends zy{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=pi("div.keybinding").root;this._register(new i1(t,Qa,{disableTitle:!0,...Lre})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},OPe=class extends oN{constructor(e,t,n,r,o,s,a,l,c){super(e,{resetMenu:t,...n},r,o,s,a,l,c),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){let e=[],t=[];gE(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){Zi(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Zi(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};OPe=PPe([r0(3,el),r0(4,Ze),r0(5,Xs),r0(6,ni),r0(7,Oi),r0(8,io)],OPe)});function eD(i,e,t){let n=bn(i);return!(en.left+n.width||tn.top+n.height)}var iW=D(()=>{Ye()});var BPe,MB,zPe=D(()=>{Jt();Lt();et();ae();BPe=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},MB=class extends W{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new G),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new di(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new di(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new di(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,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=Dot(e=>this._computer.computeAsync(e)),(async()=>{try{for await(let e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){pt(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;let e=this._state===0,t=this._state===4;this._onResult.fire(new BPe(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)}}});var tD,Pce=D(()=>{Ye();aP();et();ae();tD=class{constructor(){this._onDidWillResize=new G,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new G,this.onDidResize=this._onDidResize.event,this._sashListener=new te,this._size=new hn(0,0),this._minSize=new hn(0,0),this._maxSize=new hn(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new of(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new of(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new of(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:SV.North}),this._southSash=new of(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:SV.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(Se.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(Se.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(r=>{e&&(n=r.currentX-r.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(r=>{e&&(n=-(r.currentX-r.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(r=>{e&&(t=-(r.currentY-r.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(r=>{e&&(t=r.currentY-r.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Se.any(this._eastSash.onDidReset,this._westSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Se.any(this._northSash.onDidReset,this._southSash.onDidReset)(r=>{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,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:r}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(n,Math.min(o,e)),t=Math.max(r,Math.min(s,t));let a=new hn(t,e);hn.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,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}}});var Nxi,Mxi,Bce,uwt=D(()=>{Pce();ae();Nt();Ye();Nxi=30,Mxi=24,Bce=class extends W{constructor(e,t=new hn(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new tD),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=hn.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 hn(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(){return this._contentPosition?.position?K.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:bn(t).top+n.top-Nxi}_availableVerticalSpaceBelow(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;let r=bn(t),o=zh(t.ownerDocument.body),s=r.top+n.top+n.height;return o.height-s-Mxi}_findPositionPreference(e,t){let n=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),r=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),o=Math.min(Math.max(r,n),e),s=Math.min(e,o),a;return this._editor.getOption(60).above?a=s<=r?1:2:a=s<=n?2:1,a===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),a}_resize(e){this._resizableNode.layout(e.height,e.width)}}});function hwt(i,e,t,n,r,o){let s=t+r/2,a=n+o/2,l=Math.max(Math.abs(i-s)-r/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}var Rxi,zce,f1,dwt,Fxi,Vce,fwt=D(()=>{Ye();Yr();uwt();Wt();nr();oh();vn();nO();et();Rxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zce=function(i,e){return function(t,n){e(t,n,i)}},dwt=30,Fxi=6,Vce=class extends Bce{static{f1=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new hn(0,0)}get isVisibleFromKeyboard(){return this._renderedHover?.source===1}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,n,r,o){let s=e.getOption(67)+8,a=150,l=new hn(a,s);super(e,l),this._configurationService=n,this._accessibilityService=r,this._keybindingService=o,this._hover=this._register(new tE),this._onDidResize=this._register(new G),this.onDidResize=this._onDidResize.event,this._minimumSize=l,this._hoverVisibleKey=V.hoverVisible.bindTo(t),this._hoverFocusedKey=V.hoverFocused.bindTo(t),be(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()}));let c=this._register(Yc(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return f1.ID}static _applyDimensions(e,t,n){let r=typeof t=="number"?`${t}px`:t,o=typeof n=="number"?`${n}px`:n;e.style.width=r,e.style.height=o}_setContentsDomNodeDimensions(e,t){let n=this._hover.contentsDomNode;return f1._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){let n=this._hover.containerDomNode;return f1._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){let r=typeof t=="number"?`${t}px`:t,o=typeof n=="number"?`${n}px`:n;e.style.maxWidth=r,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){f1._applyMaxDimensions(this._hover.contentsDomNode,e,t),f1._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");let t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n)}_updateResizableNodeMaxDimensions(){let e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new hn(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){f1._lastDimensions=new hn(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){let e=this._renderedHover?.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){let e=this._findAvailableSpaceVertically();if(!e)return;let t=Fxi;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");let e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;let e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,r),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){let{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(o=>this._editor.applyFontInfo(o))}_updateContent(e){let t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){let e=Math.max(this._editor.getLayoutInfo().height/4,250,f1._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,f1._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);let t=og(this._hover.containerDomNode),n=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,n)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();let o=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&nte(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");o&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+o)}hide(){if(!this._renderedHover)return;let e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new hn(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){let e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new hn(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){let e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new hn(e,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();let e=this._hover.containerDomNode,t=og(e),n=bc(e);if(this._resizableNode.layout(t,n),this._setHoverWidgetDimensions(n,t),t=og(e),n=bc(e),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(t,n),this._renderedHover?.showAtPosition){let r=og(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-dwt})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+dwt})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let 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})}};Vce=f1=Rxi([zce(1,Ze),zce(2,kt),zce(3,Cs),zce(4,ni)],Vce)});var Hce,pwt=D(()=>{Qt();Jt();Hce=class i{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[];let n=e.getModel(),r=t.range.startLineNumber;if(r>n.getLineCount())return[];let o=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){let t=this._anchor;if(!this._editor.hasModel()||!t)return Ou.EMPTY;let n=i._getLineDecorations(this._editor,t);return Ou.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):Ou.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return yl(t)}}});var nW,VPe,mwt=D(()=>{nW=class{constructor(e,t,n){this.anchor=e,this.hoverParts=t,this.isComplete=n}filter(e){let t=this.hoverParts.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.hoverParts.length?this:new VPe(this,this.anchor,t,this.isComplete)}},VPe=class extends nW{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}}});var Oxi,Pxi,gwt,RB,HPe=D(()=>{Ye();nO();ae();Yr();Oxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Pxi=function(i,e){return function(t,n){e(t,n,i)}},gwt=we,RB=class extends W{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=gwt("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=be(this.hoverElement,gwt("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;this._hasContent=!0;let r=this._register(iO.render(this.actionsElement,e,n));return this.actions.push(r),r}append(e){let t=be(this.actionsElement,e);return this._hasContent=!0,t}};RB=Oxi([Pxi(0,ni)],RB)});async function Bxi(i,e,t,n,r){let o=await Promise.resolve(i.provideHover(t,n,r)).catch(ln);if(!(!o||!zxi(o)))return new WPe(i,o,e)}function rW(i,e,t,n,r=!1){let s=i.ordered(e,r).map((a,l)=>Bxi(a,l,e,t,n));return Ou.fromPromises(s).coalesce()}function bwt(i,e,t,n,r=!1){return rW(i,e,t,n,r).map(o=>o.hover).toPromise()}function zxi(i){let e=typeof i.range<"u",t=typeof i.contents<"u"&&i.contents&&i.contents.length>0;return e&&t}var WPe,UPe=D(()=>{Jt();sn();Lt();ii();Ui();WPe=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};yc("_executeHoverProvider",(i,e,t)=>{let n=i.get(Le);return bwt(n.hoverProvider,e,t,Ft.None)});yc("_executeHoverProvider_recursive",(i,e,t)=>{let n=i.get(Le);return bwt(n.hoverProvider,e,t,Ft.None,!0)})});function vwt(i,e,t,n,r){e.sort(aa(s=>s.ordinal,ud));let o=[];for(let s of e)o.push(Awt(t,s,n,r,i.onContentsChanged));return new dm(o)}function Awt(i,e,t,n,r){let o=new te,s=FB("div.hover-row"),a=FB("div.hover-row-contents");s.appendChild(a);let l=e.contents;for(let u of l){if(bx(u))continue;let d=FB("div.markdown-hover"),h=be(d,FB("div.hover-contents")),f=o.add(new Zh({editor:i},t,n));o.add(f.onDidRenderAsync(()=>{h.className="hover-contents code-hover-contents",r()}));let p=o.add(f.render(u));h.appendChild(p.element),a.appendChild(d)}return{hoverPart:e,hoverElement:s,dispose(){o.dispose()}}}function Uxi(i,e){switch(e){case Hd.Increase:{let t=i.lookupKeybinding(SN);return t?y("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",t.getLabel()):y("increaseVerbosity","Increase Hover Verbosity")}case Hd.Decrease:{let t=i.lookupKeybinding(EN);return t?y("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",t.getLabel()):y("decreaseVerbosity","Decrease Hover Verbosity")}}}var Vxi,DN,FB,Hxi,Wxi,uf,Wce,iD,OB,jPe,oW=D(()=>{Ye();Qt();sn();Ad();ae();vx();kce();We();Sl();Pg();Oe();nr();vd();Ui();tr();sp();er();Dr();Lt();Yr();nO();px();Jt();UPe();Xn();Vxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},DN=function(i,e){return function(t,n){e(t,n,i)}},FB=we,Hxi=kn("hover-increase-verbosity",Ee.add,y("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),Wxi=kn("hover-decrease-verbosity",Ee.remove,y("decreaseHoverVerbosity","Icon for decreasing hover verbosity.")),uf=class{constructor(e,t,n,r,o,s=void 0){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=r,this.ordinal=o,this.source=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Wce=class{constructor(e,t,n){this.hover=e,this.hoverProvider=t,this.hoverPosition=n}supportsVerbosityAction(e){switch(e){case Hd.Increase:return this.hover.canIncreaseVerbosity??!1;case Hd.Decrease:return this.hover.canDecreaseVerbosity??!1}}},iD=class{constructor(e,t,n,r,o,s,a,l){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=r,this._languageFeaturesService=o,this._keybindingService=s,this._hoverService=a,this._commandService=l,this.hoverOrdinal=3}createLoadingMessage(e){return new uf(this,e.range,[new es().appendText(y("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[],a=1e3,l=n.getLineLength(r),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(118),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;u>=0&&l>u&&e.range.startColumn>=u&&(h=!0,s.push(new uf(this,e.range,[{value:y("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof d=="number"&&l>=d&&s.push(new uf(this,e.range,[{value:y("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(let p of t){let g=p.range.startLineNumber===r?p.range.startColumn:1,v=p.range.endLineNumber===r?p.range.endColumn:o,A=p.options.hoverMessage;if(!A||bx(A))continue;p.options.beforeContentClassName&&(f=!0);let w=new N(e.range.startLineNumber,g,e.range.startLineNumber,v);s.push(new uf(this,w,_F(A),f,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return Ou.EMPTY;let r=this._editor.getModel(),o=this._languageFeaturesService.hoverProvider;return o.has(r)?this._getMarkdownHovers(o,r,e,n):Ou.EMPTY}_getMarkdownHovers(e,t,n,r){let o=n.range.getStartPosition();return rW(e,t,o,r).filter(l=>!bx(l.hover.contents)).map(l=>{let c=l.hover.range?N.lift(l.hover.range):n.range,u=new Wce(l.hover,l.provider,o);return new uf(this,c,l.hover.contents,!1,l.ordinal,u)})}renderHoverParts(e,t){return this._renderedHoverParts=new jPe(t,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,t,n){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t,n))}};iD=Vxi([DN(1,rn),DN(2,jo),DN(3,kt),DN(4,Le),DN(5,ni),DN(6,nh),DN(7,Oi)],iD);OB=class{constructor(e,t,n){this.hoverPart=e,this.hoverElement=t,this.disposables=n}dispose(){this.disposables.dispose()}},jPe=class{constructor(e,t,n,r,o,s,a,l,c,u,d){this._hoverParticipant=n,this._editor=r,this._languageService=o,this._openerService=s,this._commandService=a,this._keybindingService=l,this._hoverService=c,this._configurationService=u,this._onFinishedRendering=d,this._ongoingHoverOperations=new Map,this._disposables=new te,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add(Ve(()=>{this.renderedHoverParts.forEach(h=>{h.dispose()}),this._ongoingHoverOperations.forEach(h=>{h.tokenSource.dispose(!0)})}))}_renderHoverParts(e,t,n){return e.sort(aa(r=>r.ordinal,ud)),e.map(r=>{let o=this._renderHoverPart(r,n);return t.appendChild(o.hoverElement),o})}_renderHoverPart(e,t){let n=this._renderMarkdownHover(e,t),r=n.hoverElement,o=e.source,s=new te;if(s.add(n),!o)return new OB(e,r,s);let a=o.supportsVerbosityAction(Hd.Increase),l=o.supportsVerbosityAction(Hd.Decrease);if(!a&&!l)return new OB(e,r,s);let c=FB("div.verbosity-actions");return r.prepend(c),s.add(this._renderHoverExpansionAction(c,Hd.Increase,a)),s.add(this._renderHoverExpansionAction(c,Hd.Decrease,l)),new OB(e,r,s)}_renderMarkdownHover(e,t){return Awt(this._editor,e,this._languageService,this._openerService,t)}_renderHoverExpansionAction(e,t,n){let r=new te,o=t===Hd.Increase,s=be(e,FB(ut.asCSSSelector(o?Hxi:Wxi)));s.tabIndex=0;let a=new vy("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(r.add(this._hoverService.setupManagedHover(a,s,Uxi(this._keybindingService,t))),!n)return s.classList.add("disabled"),r;s.classList.add("enabled");let l=()=>this._commandService.executeCommand(t===Hd.Increase?SN:EN);return r.add(new fz(s,l)),r.add(new pz(s,l,[3,10])),r}async updateMarkdownHoverPartVerbosityLevel(e,t,n=!0){let r=this._editor.getModel();if(!r)return;let o=this._getRenderedHoverPartAtIndex(t),s=o?.hoverPart.source;if(!o||!s?.supportsVerbosityAction(e))return;let a=await this._fetchHover(s,r,e);if(!a)return;let l=new Wce(a,s.hoverProvider,s.hoverPosition),c=o.hoverPart,u=new uf(this._hoverParticipant,c.range,a.contents,c.isBeforeContent,c.ordinal,l),d=this._renderHoverPart(u,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(t,d,u),n&&this._focusOnHoverPartWithIndex(t),{hoverPart:u,hoverElement:d.hoverElement}}async _fetchHover(e,t,n){let r=n===Hd.Increase?1:-1,o=e.hoverProvider,s=this._ongoingHoverOperations.get(o);s&&(s.tokenSource.cancel(),r+=s.verbosityDelta);let a=new Bi;this._ongoingHoverOperations.set(o,{verbosityDelta:r,tokenSource:a});let l={verbosityRequest:{verbosityDelta:r,previousHover:e.hover}},c;try{c=await Promise.resolve(o.provideHover(t,e.hoverPosition,a.token,l))}catch(u){ln(u)}return a.dispose(),this._ongoingHoverOperations.delete(o),c}_replaceRenderedHoverPartAtIndex(e,t,n){if(e>=this.renderedHoverParts.length||e<0)return;let r=this.renderedHoverParts[e],o=r.hoverElement,s=t.hoverElement,a=Array.from(s.children);o.replaceChildren(...a);let l=new OB(n,o,t.disposables);o.focus(),r.dispose(),this.renderedHoverParts[e]=l}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}});function QPe(i,e){return!!i[e]}function ywt(i){return i==="altKey"?qt?new PB(57,"metaKey",6,"altKey"):new PB(5,"ctrlKey",6,"altKey"):qt?new PB(6,"altKey",57,"metaKey"):new PB(6,"altKey",5,"ctrlKey")}var sW,Uce,PB,p1,aW=D(()=>{et();ae();Si();sW=class{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=QPe(e.event,t.triggerModifier),this.hasSideBySideModifier=QPe(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},Uce=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=QPe(e,t.triggerModifier)}},PB=class{constructor(e,t,n,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};p1=class extends W{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new G),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new G),this.onExecute=this._onExecute.event,this._onCancel=this._register(new G),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(n=>n.target.position?n.target.position.lineNumber:0),this._opts=ywt(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(78)){let r=ywt(this._editor.getOption(78));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new sW(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new sW(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new sW(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new Uce(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new Uce(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=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){let t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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()}}});function wwt(i){return Xe.from({scheme:jt.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var lW,GPe,cW,qPe=D(()=>{Lt();ae();Nt();We();bl();mn();lW=class{constructor(e,t){this.range=e,this.direction=t}},GPe=class i{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){let t=new i(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){try{let t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(t){ln(t),this._isResolved=!1}}},cW=class i{static{this._emptyInlayHintList=Object.freeze({dispose(){},hints:[]})}static async create(e,t,n,r){let o=[],s=e.ordered(t).reverse().map(a=>n.map(async l=>{try{let c=await a.provideInlayHints(t,l,r);(c?.hints.length||a.onDidChangeInlayHints)&&o.push([c??i._emptyInlayHintList,a])}catch(c){ln(c)}}));if(await Promise.all(s.flat()),r.isCancellationRequested||t.isDisposed())throw new Hc;return new i(n,o,t)}constructor(e,t,n){this._disposables=new te,this.ranges=e,this.provider=new Set;let r=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=n.validatePosition(a.position),c="before",u=i._getRangeAtPosition(n,l),d;u.getStartPosition().isBefore(l)?(d=N.fromPositions(u.getStartPosition(),l),c="after"):(d=N.fromPositions(l,u.getEndPosition()),c="before"),r.push(new GPe(a,new lW(d,c),s))}}this.items=r.sort((o,s)=>K.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let n=t.lineNumber,r=e.getWordAtPosition(t);if(r)return new N(n,r.startColumn,n,r.endColumn);e.tokenization.tokenizeIfCheap(n);let o=e.tokenization.getLineTokens(n),s=t.column-1,a=o.findTokenIndexAtOffset(s),l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&a{Xd();fs();wH();ks();Ui();oh();Xn();Wt();ht();_c();Zn();jxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rC=function(i,e){return function(t,n){e(t,n,i)}},pu=class extends zE{constructor(e,t,n,r,o,s,a,l,c,u,d,h,f){super(e,{...r.getRawOptions(),overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()},n,o,s,a,l,c,u,d,h,f),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(p=>this._onParentConfigurationChanged(p)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){lI(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};pu=jxi([rC(4,Ne),rC(5,ai),rC(6,Oi),rC(7,Ze),rC(8,Bn),rC(9,Cn),rC(10,Cs),rC(11,qi),rC(12,Le)],pu)});var xwt=D(()=>{});var Cwt=D(()=>{});var _wt,Qxi,Gxi,YPe,KPe,JPe,jce,Swt=D(()=>{Ye();aP();Ho();Az();ae();Xd();Cwt();We();vs();_wt=new pe(new Ri(0,122,204)),Qxi={showArrow:!0,showFrame:!0,className:"",frameColor:_wt,arrowColor:_wt,keepEditorSelection:!1},Gxi="vs.editor.contrib.zoneWidget",YPe=class{constructor(e,t,n,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},KPe=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},JPe=class i{static{this._IdGenerator=new QI(".arrow-decoration-")}constructor(e){this._editor=e,this._ruleName=i._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),bZ(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(){bZ(this._ruleName),tF(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:N.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}},jce=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new te,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Bb(t),lI(this.options,Qxi,!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=>{let r=this._getWidth(n);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(r)}))}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 JPe(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;let n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash?.layout()}get position(){let e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){let n=N.isIRange(e)?N.lift(e):N.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:zt.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){let e=this.editor.getOption(67),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){let n=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){let h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/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 YPe(s,n.lineNumber,n.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new KPe(Gxi+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}let u=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,o),this.options.keepEditorSelection||this.editor.setSelection(e);let d=this.editor.getModel();if(d){let h=d.validateRange(new N(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 of(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){let n=(t.currentY-e.startY)/this.editor.getOption(67),r=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+r;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){let e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}});function Twt(i){let e=i.get(ai).getFocusedCodeEditor();return e instanceof pu?e.getParentEditor():e}var Ewt,Dwt,XPe,mu,Qce,qxi,BB,kwt,Gce,qce,Iwt,Lwt,cZn,uZn,dZn,hZn,Nwt,fZn,pZn,mZn,gZn,bZn,TN=D(()=>{Ye();Dg();$a();er();Dr();Ho();et();Xd();xwt();ii();fs();oC();Swt();Oe();Ex();Wt();wc();ht();eo();Ewt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Dwt=function(i,e){return function(t,n){e(t,n,i)}},XPe=vt("IPeekViewService");ui(XPe,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let n=()=>{let r=this._widgets.get(i);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);(function(i){i.inPeekEditor=new Pe("inReferenceSearchEditor",!0,y("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(mu||(mu={}));Qce=class{static{this.ID="editor.contrib.referenceController"}constructor(e,t){e instanceof pu&&mu.inPeekEditor.bindTo(t)}dispose(){}};Qce=Ewt([Dwt(1,Ze)],Qce);Tt(Qce.ID,Qce,0);qxi={headerBackgroundColor:pe.white,primaryHeadingColor:pe.fromHex("#333333"),secondaryHeadingColor:pe.fromHex("#6c6c6cb3")},BB=class extends jce{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new G,this.onDidClose=this._onDidClose.event,lI(this.options,qxi,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=we(".head"),this._bodyElement=we(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=we(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),cn(this._titleElement,"click",o=>this._onTitleClick(o))),be(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=we("span.filename"),this._secondaryHeading=we("span.dirname"),this._metaHeading=we("span.meta"),be(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=we(".peekview-actions");be(this._headElement,n);let r=this._getActionBarOptions();this._actionbarWidget=new Ns(n,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Js("peekview.close",y("label.close","Close"),ut.asClassName(Ee.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:yie.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:_o(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Ul(this._metaHeading)):Al(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let n=Math.ceil(this.editor.getOption(67)*1.2),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,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`)}};BB=Ewt([Dwt(2,Ne)],BB);kwt=j("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:pe.black,hcLight:pe.white},y("peekViewTitleBackground","Background color of the peek view title area.")),Gce=j("peekViewTitleLabel.foreground",{dark:pe.white,light:pe.black,hcDark:pe.white,hcLight:Wp},y("peekViewTitleForeground","Color of the peek view title.")),qce=j("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},y("peekViewTitleInfoForeground","Color of the peek view title info.")),Iwt=j("peekView.border",{dark:Hh,light:Hh,hcDark:Fi,hcLight:Fi},y("peekViewBorder","Color of the peek view borders and arrow.")),Lwt=j("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:pe.black,hcLight:pe.white},y("peekViewResultsBackground","Background color of the peek view result list.")),cZn=j("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:pe.white,hcLight:Wp},y("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),uZn=j("peekViewResult.fileForeground",{dark:pe.white,light:"#1E1E1E",hcDark:pe.white,hcLight:Wp},y("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),dZn=j("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},y("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),hZn=j("peekViewResult.selectionForeground",{dark:pe.white,light:"#6C6C6C",hcDark:pe.white,hcLight:Wp},y("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Nwt=j("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:pe.black,hcLight:pe.white},y("peekViewEditorBackground","Background color of the peek view editor.")),fZn=j("peekViewEditorGutter.background",Nwt,y("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),pZn=j("peekViewEditorStickyScroll.background",Nwt,y("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),mZn=j("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},y("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),gZn=j("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},y("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),bZn=j("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Jn,hcLight:Jn},y("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var Bg,ZPe,sC,df,zB=D(()=>{Lt();et();Az();ae();ql();Ec();Pt();We();Oe();Bg=class{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=vz.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){let e=this.parent.getPreview(this)?.preview(this.range);return e?y({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}",e.value,Sc(this.uri),this.range.startLineNumber,this.range.startColumn):y("aria.oneReference","in {0} on line {1} at column {2}",Sc(this.uri),this.range.startLineNumber,this.range.startColumn)}},ZPe=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let n=this._modelReference.object.textEditorModel;if(!n)return;let{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:r,column:o-t}),c=new N(r,l.startColumn,r,o),u=new N(s,a,s,1073741824),d=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),f=n.getValueInRange(u).replace(/\s+$/,"");return{value:d+h+f,highlight:{start:d.length,end:d.length+h.length}}}},sC=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ms}dispose(){Vi(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?y("aria.fileReferences.1","1 symbol in {0}, full path {1}",Sc(this.uri),this.uri.fsPath):y("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Sc(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{let n=await e.createModelReference(t.uri);this._previews.set(t.uri,new ZPe(n))}catch(n){pt(n)}return this}},df=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new G,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[n]=e;e.sort(i._compareReferences);let r;for(let o of e)if((!r||!oo.isEqual(r.uri,o.uri,!0))&&(r=new sC(this,o.uri),this.groups.push(r)),r.children.length===0||i._compareReferences(o,r.children[r.children.length-1])!==0){let s=new Bg(n===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){Vi(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?y("aria.result.0","No results found"):this.references.length===1?y("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?y("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):y("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.length,s=n.parent.groups.length;return s===1||t&&r+10?(t?r=(r+1)%o:r=(r+o-1)%o,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%s,n.parent.groups[r].children[0]):(r=(r+s-1)%s,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}nearestReference(e,t){let n=this.references.map((r,o)=>({idx:o,prefixLen:Uf(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLeno.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(let n of this.references)if(n.uri.toString()===e.toString()&&N.containsPosition(n.range,t))return n}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return oo.compare(e.uri,t.uri)||N.compareRangesUsingStarts(e.range,t.range)}}});var Mwt=D(()=>{});var $ce,eue,$Pe,Yce,Kce,Jce,Xce,eBe,uW,tBe,dW,Zce,Rwt=D(()=>{Ye();hNe();d2e();kre();yg();ae();Ec();Yp();Oe();ht();Yr();hO();By();zB();$ce=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eue=function(i,e){return function(t,n){e(t,n,i)}},Yce=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof df||e instanceof sC}getChildren(e){if(e instanceof df)return e.groups;if(e instanceof sC)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Yce=$ce([eue(0,xs)],Yce);Kce=class{getHeight(){return 23}getTemplateId(e){return e instanceof sC?uW.id:dW.id}},Jce=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof Bg){let t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return Sc(e.uri)}};Jce=$ce([eue(0,ni)],Jce);Xce=class{getId(e){return e instanceof Bg?e.id:e.uri}},eBe=class extends W{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new Ox(n,{supportHighlights:!0})),this.badge=new bL(be(n,we(".count")),{},bie),e.appendChild(n)}set(e,t){let n=sE(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(y("referencesCount","{0} references",r)):this.badge.setTitleFormat(y("referenceCount","{0} reference",r))}};eBe=$ce([eue(1,mv)],eBe);uW=class{static{$Pe=this}static{this.id="FileReferencesRenderer"}constructor(e){this._instantiationService=e,this.templateId=$Pe.id}renderTemplate(e){return this._instantiationService.createInstance(eBe,e)}renderElement(e,t,n){n.set(e.element,oE(e.filterData))}disposeTemplate(e){e.dispose()}};uW=$Pe=$ce([eue(0,Ne)],uW);tBe=class extends W{constructor(e){super(),this.label=this._register(new t1(e))}set(e,t){let n=e.parent.getPreview(e)?.preview(e.range);if(!n||!n.value)this.label.set(`${Sc(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:r,highlight:o}=n;t&&!Jh.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,oE(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[o]))}}},dW=class i{constructor(){this.templateId=i.id}static{this.id="OneReferenceRenderer"}renderTemplate(e){return new tBe(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}},Zce=class{getWidgetAriaLabel(){return y("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var Kxi,VB,iBe,tue,nBe,iue,Fwt=D(()=>{Ye();xNe();Ho();et();ae();bl();Ec();Mwt();oC();We();vs();Yf();Yp();Rwt();TN();Oe();ht();Yr();hO();PV();Zn();zB();Kxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},VB=function(i,e){return function(t,n){e(t,n,i)}},iBe=class i{static{this.DecorationOptions=zt.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new te,this._callOnModelChange=new te,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();let e=this._editor.getModel();if(e){for(let 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()));let t=[],n=[];for(let r=0,o=e.children.length;r{let o=r.deltaDecorations([],t);for(let s=0;s{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(nBe,"ReferencesWidget",this._treeContainer,new Kce,[this._instantiationService.createInstance(uW),this._instantiationService.createInstance(dW)],this._instantiationService.createInstance(Yce),n),this._splitView.addView({onDidChange:Se.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},TV.Distribute),this._splitView.addView({onDidChange:Se.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},TV.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let r=(o,s)=>{o instanceof Bg&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")})),Al(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new hn(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=y("noResults","No results"),Ul(this._messageContainer),Promise.resolve(void 0)):(Al(this._messageContainer),this._decorationsManager=new iBe(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=>{let{event:t,target:n}=e;if(t.detail!==2)return;let r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Ul(this._treeContainer),Ul(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(){let[e]=this._tree.getFocus();if(e instanceof Bg)return e;if(e instanceof sC&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==jt.inMemory?this.setTitle(Ldt(e.uri),this._uriLabel.getUriLabel(sE(e.uri))):this.setTitle(y("peekView.alternateTitle","References"));let n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));let r=await n;if(!this._model){r.dispose();return}Vi(this._previewModelReference);let o=r.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=N.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()}};iue=Kxi([VB(3,Bn),VB(4,xs),VB(5,Ne),VB(6,XPe),VB(7,mv),VB(8,ni)],iue)});function IN(i,e){let t=Twt(i);if(!t)return;let n=aC.get(t);n&&e(n)}var Jxi,HB,nue,kN,aC,rBe=D(()=>{Jt();Lt();Ep();ae();fs();Nt();We();TN();Oe();Xn();nr();Wt();ht();nx();PV();_c();yv();zB();Fwt();vn();pP();Jxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},HB=function(i,e){return function(t,n){e(t,n,i)}},kN=new Pe("referenceSearchVisible",!1,y("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),aC=class{static{nue=this}static{this.ID="editor.contrib.referencesController"}static get(e){return e.getContribution(nue.ID)}constructor(e,t,n,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new te,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=kN.bindTo(n)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))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()}));let o="peekViewLayout",s=tue.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(iue,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(y("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget?(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:u}=l;if(c)switch(u){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));let a=++this._requestIdPool;t.then(l=>{if(a!==this._requestIdPool||!this._widget){l.dispose();return}return this._model?.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(y("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let c=this._editor.getModel().uri,u=new K(e.startLineNumber,e.startColumn),d=this._model.nearestReference(c,u);if(d)return this._widget.setSelection(d).then(()=>{this._widget&&this._editor.getOption(87)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;let r=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(r),await this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.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){this._widget?.hide(),this._ignoreModelChangeEvent=!0;let n=N.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(n),this._widget.focusOnReferenceTree();else{let o=nue.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o?.toggleWidget(n,hr(a=>Promise.resolve(s)),this._peekMode??!1)}},r=>{this._ignoreModelChangeEvent=!1,pt(r)})}openReference(e,t,n){t||this.closeWidget();let{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,t)}};aC=nue=Jxi([HB(2,Ze),HB(3,ai),HB(4,Cn),HB(5,Ne),HB(6,ec),HB(7,kt)],aC);La.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Wr(2089,60),when:me.or(kN,mu.inPeekEditor),handler(i){IN(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});La.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:me.or(kN,mu.inPeekEditor),handler(i){IN(i,e=>{e.goToNextOrPreviousReference(!0)})}});La.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:me.or(kN,mu.inPeekEditor),handler(i){IN(i,e=>{e.goToNextOrPreviousReference(!1)})}});ci.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ci.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ci.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ci.registerCommand("closeReferenceSearch",i=>IN(i,e=>e.closeWidget()));La.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:me.and(mu.inPeekEditor,me.not("config.editor.stablePeek"))});La.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:me.and(kN,me.not("config.editor.stablePeek"),me.or(V.editorTextFocus,dre.negate()))});La.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:me.and(kN,r2e,_re.negate(),Sre.negate()),handler(i){let t=i.get(np).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof Bg&&IN(i,n=>n.revealReference(t[0]))}});La.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:me.and(kN,r2e,_re.negate(),Sre.negate()),handler(i){let t=i.get(np).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof Bg&&IN(i,n=>n.openReference(t[0],!0,!0))}});ci.registerCommand("openReference",i=>{let t=i.get(np).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof Bg&&IN(i,n=>n.openReference(t[0],!1,!0))})});var Owt,hW,aBe,fW,oBe,sBe,Pwt=D(()=>{et();ae();Ec();ii();fs();We();Oe();Wt();wc();ht();Yr();nx();_c();Owt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},hW=function(i,e){return function(t,n){e(t,n,i)}},aBe=new Pe("hasSymbols",!1,y("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),fW=vt("ISymbolNavigationService"),oBe=class{constructor(e,t,n,r){this._editorService=t,this._notificationService=n,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=aBe.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){let 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();let n=new sBe(this._editorService),r=n.onDidChange(o=>{if(this._ignoreEditorChange)return;let s=this._editorService.getActiveCodeEditor();if(!s)return;let a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,u=!1;for(let d of t.references)if(gx(d.uri,a.uri))c=!0,u=u||N.containsPosition(d.range,l);else if(c)break;(!c||!u)&&this.reset()});this._currentState=hc(n,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;let t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:N.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();let e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?y("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):y("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};oBe=Owt([hW(0,Ze),hW(1,ai),hW(2,Cn),hW(3,ni)],oBe);ui(fW,oBe,1);Qe(new class extends Sr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:aBe,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(fW).revealNext(e)}});La.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:aBe,primary:9,handler(i){i.get(fW).reset()}});sBe=class{constructor(e){this._listener=new Map,this._disposables=new te,this._onDidChange=new G,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(),Vi(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,hc(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};sBe=Owt([hW(0,ai)],sBe)});function lBe(i,e){return e.uri.scheme===i.uri.scheme?!0:!K9(e.uri,jt.walkThroughSnippet,jt.vscodeChatCodeBlock,jt.vscodeChatCodeCompareBlock)}async function pW(i,e,t,n,r){let s=t.ordered(i,n).map(l=>Promise.resolve(r(l,i,e)).then(void 0,c=>{ln(c)})),a=await Promise.all(s);return yl(a.flat()).filter(l=>lBe(i,l))}function nD(i,e,t,n,r){return pW(e,t,i,n,(o,s,a)=>o.provideDefinition(s,a,r))}function rue(i,e,t,n,r){return pW(e,t,i,n,(o,s,a)=>o.provideDeclaration(s,a,r))}function oue(i,e,t,n,r){return pW(e,t,i,n,(o,s,a)=>o.provideImplementation(s,a,r))}function sue(i,e,t,n,r){return pW(e,t,i,n,(o,s,a)=>o.provideTypeDefinition(s,a,r))}function WB(i,e,t,n,r,o){return pW(e,t,i,r,async(s,a,l)=>{let c=(await s.provideReferences(a,l,{includeDeclaration:!0},o))?.filter(d=>lBe(a,d));if(!n||!c||c.length!==2)return c;let u=(await s.provideReferences(a,l,{includeDeclaration:!1},o))?.filter(d=>lBe(a,d));return u&&u.length===1?u:c})}async function m1(i){let e=await i(),t=new df(e,""),n=t.references.map(r=>r.link);return t.dispose(),n}var aue=D(()=>{Qt();sn();Lt();bl();ii();Ui();zB();yc("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(Le),r=nD(n.definitionProvider,e,t,!1,Ft.None);return m1(()=>r)});yc("_executeDefinitionProvider_recursive",(i,e,t)=>{let n=i.get(Le),r=nD(n.definitionProvider,e,t,!0,Ft.None);return m1(()=>r)});yc("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(Le),r=sue(n.typeDefinitionProvider,e,t,!1,Ft.None);return m1(()=>r)});yc("_executeTypeDefinitionProvider_recursive",(i,e,t)=>{let n=i.get(Le),r=sue(n.typeDefinitionProvider,e,t,!0,Ft.None);return m1(()=>r)});yc("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(Le),r=rue(n.declarationProvider,e,t,!1,Ft.None);return m1(()=>r)});yc("_executeDeclarationProvider_recursive",(i,e,t)=>{let n=i.get(Le),r=rue(n.declarationProvider,e,t,!0,Ft.None);return m1(()=>r)});yc("_executeReferenceProvider",(i,e,t)=>{let n=i.get(Le),r=WB(n.referenceProvider,e,t,!1,!1,Ft.None);return m1(()=>r)});yc("_executeReferenceProvider_recursive",(i,e,t)=>{let n=i.get(Le),r=WB(n.referenceProvider,e,t,!1,!0,Ft.None);return m1(()=>r)});yc("_executeImplementationProvider",(i,e,t)=>{let n=i.get(Le),r=oue(n.implementationProvider,e,t,!1,Ft.None);return m1(()=>r)});yc("_executeImplementationProvider_recursive",(i,e,t)=>{let n=i.get(Le),r=oue(n.implementationProvider,e,t,!0,Ft.None);return m1(()=>r)})});var LN,g1,lC,lue,cue,uue,due,hBe,hue=D(()=>{Yl();Jt();Ep();gn();mn();eC();sB();ii();fs();oC();Nt();We();vn();tr();rBe();zB();Pwt();wB();TN();Oe();fr();Xn();Wt();ht();_c();Qb();aue();Ui();td();pP();Zo.appendMenuItem(tt.EditorContext,{submenu:tt.EditorContextPeek,title:y("peek.submenu","Peek"),group:"navigation",order:100});LN=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||K.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},g1=class i extends ih{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t={...e,f1:!0};if(t.menu)for(let n of bi.wrap(t.menu))(n.id===tt.EditorContext||n.id===tt.EditorContextPeek)&&(n.when=me.and(e.precondition,n.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,r){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(Cn),s=e.get(ai),a=e.get($f),l=e.get(fW),c=e.get(Le),u=e.get(Ne),d=t.getModel(),h=t.getPosition(),f=LN.is(n)?n:new LN(d,h),p=new dp(t,5),g=YA(this._getLocationModel(c,f.model,f.position,p.token),p.token).then(async v=>{if(!v||p.token.isCancellationRequested)return;gs(v.ariaMessage);let A;if(v.referenceAt(d.uri,h)){let C=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(C)&&i._allSymbolNavigationCommands.has(C)&&(A=i._allSymbolNavigationCommands.get(C))}let w=v.references.length;if(w===0){if(!this.configuration.muteMessage){let C=d.getWordAtPosition(h);hu.get(t)?.showMessage(this._getNoResultFoundMessage(C),h)}}else if(w===1&&A)i._activeAlternativeCommands.add(this.desc.id),u.invokeFunction(C=>A.runEditorCommand(C,t,n,r).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,v,r)},v=>{o.error(v)}).finally(()=>{p.dispose()});return a.showWhile(g,250),g}async _onResult(e,t,n,r,o){let s=this._getGoToPreference(n);if(!(n instanceof pu)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(n,r,o);else{let a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",c=await this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,r,o):r.dispose(),s==="goto"&&t.put(a)}}async _openReference(e,t,n,r,o){let s;if(tYe(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=await t.openCodeEditor({resource:n.uri,options:{selection:N.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(o){let l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}}_openInPeek(e,t,n){let r=aC.get(e);r&&e.hasModel()?r.toggleWidget(n??e.getSelection(),hr(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}},lC=class extends g1{async _getLocationModel(e,t,n,r){return new df(await nD(e.definitionProvider,t,n,!1,r),y("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y("noResultWord","No definition found for '{0}'",e.word):y("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}};Pn(class cBe extends lC{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:cBe.id,title:{...Bt("actions.goToDecl.label","Go to Definition"),mnemonicTitle:y({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:V.hasDefinitionProvider,keybinding:[{when:V.editorTextFocus,primary:70,weight:100},{when:me.and(V.editorTextFocus,$Ne),primary:2118,weight:100}],menu:[{id:tt.EditorContext,group:"navigation",order:1.1},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ci.registerCommandAlias("editor.action.goToDeclaration",cBe.id)}});Pn(class uBe extends lC{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:uBe.id,title:Bt("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:me.and(V.hasDefinitionProvider,V.isInEmbeddedEditor.toNegated()),keybinding:[{when:V.editorTextFocus,primary:Wr(2089,70),weight:100},{when:me.and(V.editorTextFocus,$Ne),primary:Wr(2089,2118),weight:100}]}),ci.registerCommandAlias("editor.action.openDeclarationToTheSide",uBe.id)}});Pn(class dBe extends lC{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:dBe.id,title:Bt("actions.previewDecl.label","Peek Definition"),precondition:me.and(V.hasDefinitionProvider,mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),keybinding:{when:V.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:tt.EditorContextPeek,group:"peek",order:2}}),ci.registerCommandAlias("editor.action.previewDeclaration",dBe.id)}});lue=class extends g1{async _getLocationModel(e,t,n,r){return new df(await rue(e.declarationProvider,t,n,!1,r),y("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?y("decl.noResultWord","No declaration found for '{0}'",e.word):y("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}};Pn(class Bwt extends lue{static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Bwt.id,title:{...Bt("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:y({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:me.and(V.hasDeclarationProvider,V.isInEmbeddedEditor.toNegated()),menu:[{id:tt.EditorContext,group:"navigation",order:1.3},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?y("decl.noResultWord","No declaration found for '{0}'",e.word):y("decl.generic.noResults","No declaration found")}});Pn(class extends lue{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:Bt("actions.peekDecl.label","Peek Declaration"),precondition:me.and(V.hasDeclarationProvider,mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),menu:{id:tt.EditorContextPeek,group:"peek",order:3}})}});cue=class extends g1{async _getLocationModel(e,t,n,r){return new df(await sue(e.typeDefinitionProvider,t,n,!1,r),y("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):y("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}};Pn(class zwt extends cue{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:zwt.ID,title:{...Bt("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:y({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:V.hasTypeDefinitionProvider,keybinding:{when:V.editorTextFocus,primary:0,weight:100},menu:[{id:tt.EditorContext,group:"navigation",order:1.4},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}});Pn(class Vwt extends cue{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Vwt.ID,title:Bt("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:me.and(V.hasTypeDefinitionProvider,mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),menu:{id:tt.EditorContextPeek,group:"peek",order:4}})}});uue=class extends g1{async _getLocationModel(e,t,n,r){return new df(await oue(e.implementationProvider,t,n,!1,r),y("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?y("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):y("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}};Pn(class Hwt extends uue{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Hwt.ID,title:{...Bt("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:y({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:V.hasImplementationProvider,keybinding:{when:V.editorTextFocus,primary:2118,weight:100},menu:[{id:tt.EditorContext,group:"navigation",order:1.45},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}});Pn(class Wwt extends uue{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Wwt.ID,title:Bt("actions.peekImplementation.label","Peek Implementations"),precondition:me.and(V.hasImplementationProvider,mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),keybinding:{when:V.editorTextFocus,primary:3142,weight:100},menu:{id:tt.EditorContextPeek,group:"peek",order:5}})}});due=class extends g1{_getNoResultFoundMessage(e){return e?y("references.no","No references found for '{0}'",e.word):y("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}};Pn(class extends due{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...Bt("goToReferences.label","Go to References"),mnemonicTitle:y({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:me.and(V.hasReferenceProvider,mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),keybinding:{when:V.editorTextFocus,primary:1094,weight:100},menu:[{id:tt.EditorContext,group:"navigation",order:1.45},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,n,r){return new df(await WB(e.referenceProvider,t,n,!0,!1,r),y("ref.title","References"))}});Pn(class extends due{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:Bt("references.action.label","Peek References"),precondition:me.and(V.hasReferenceProvider,mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),menu:{id:tt.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,n,r){return new df(await WB(e.referenceProvider,t,n,!1,!1,r),y("ref.title","References"))}});hBe=class extends g1{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:Bt("label.generic","Go to Any Symbol"),precondition:me.and(mu.notInPeekEditor,V.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}async _getLocationModel(e,t,n,r){return new df(this._references,y("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&y("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}};ci.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Xe},{name:"position",description:"The position at which to start",constraint:K.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(i,e,t,n,r,o,s)=>{yi(Xe.isUri(e)),yi(K.isIPosition(t)),yi(Array.isArray(n)),yi(typeof r>"u"||typeof r=="string"),yi(typeof s>"u"||typeof s=="boolean");let a=i.get(ai),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(t0(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let u=new class extends hBe{_getNoResultFoundMessage(d){return o||super._getNoResultFoundMessage(d)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},n,r);c.get(Ne).invokeFunction(u.run.bind(u),l)})}});ci.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Xe},{name:"position",description:"The position at which to start",constraint:K.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(i,e,t,n,r)=>{i.get(Oi).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)}});ci.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{yi(Xe.isUri(e)),yi(K.isIPosition(t));let n=i.get(Le),r=i.get(ai);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!t0(o)||!o.hasModel())return;let s=aC.get(o);if(!s)return;let a=hr(c=>WB(n.referenceProvider,o.getModel(),K.lift(t),!1,!1,c).then(u=>new df(u,y("ref.title","References")))),l=new N(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});ci.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});async function Uwt(i,e,t,n){let r=i.get(xs),o=i.get(Xs),s=i.get(Oi),a=i.get(Ne),l=i.get(Cn);if(await n.item.resolve(Ft.None),!n.part.location)return;let c=n.part.location,u=[],d=new Set(Zo.getMenuItems(tt.EditorContext).map(f=>FS(f)?f.command.id:QE()));for(let f of g1.all())d.has(f.desc.id)&&u.push(new Js(f.desc.id,Ql.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{let p=await r.createModelReference(c.uri);try{let g=new LN(p.object.textEditorModel,N.getStartPosition(c.range)),v=n.item.anchor.range;await a.invokeFunction(f.runEditorCommand.bind(f),e,g,v)}finally{p.dispose()}}));if(n.part.command){let{command:f}=n.part;u.push(new go),u.push(new Js(f.id,f.title,void 0,!0,async()=>{try{await s.executeCommand(f.id,...f.arguments??[])}catch(p){l.notify({severity:KS.Error,source:n.item.provider.displayName,message:p})}}))}let h=e.getOption(128);o.showContextMenu({domForShadowRoot:h?e.getDomNode()??void 0:void 0,getAnchor:()=>{let f=bn(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function fue(i,e,t,n){let o=await i.get(xs).createModelReference(n.uri);await t.invokeWithinContext(async s=>{let a=e.hasSideBySideModifier,l=s.get(Ze),c=mu.inPeekEditor.getValue(l),u=!a&&t.getOption(89)&&!c;return new lC({openToSide:a,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new LN(o.object.textEditorModel,N.getStartPosition(n.range)),N.lift(n.range))}),o.dispose()}var fBe=D(()=>{Ye();$a();sn();WH();We();Yp();hue();TN();fr();Xn();Wt();bd();ht();_c()});function Zxi(i){return i.replace(/[ \t]/g,"\xA0")}var Xxi,UB,jB,pBe,jwt,QB,mBe,NN,gBe=D(()=>{Ye();Qt();Jt();sn();Lt();ae();ql();gn();mn();pF();$L();Ks();$p();We();tr();tl();vs();Kp();Ui();Yp();aW();qPe();fBe();Xn();wc();ht();_c();eo();Zn();Xxi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},UB=function(i,e){return function(t,n){e(t,n,i)}},pBe=class i{constructor(){this._entries=new Gl(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let n=i._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},jwt=vt("IInlayHintsCache");ui(jwt,pBe,1);QB=class{constructor(e,t){this.item=e,this.index=t}get part(){let e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}},mBe=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},NN=class{static{jB=this}static{this.ID="editor.contrib.InlayHints"}static{this._MAX_DECORATORS=1500}static{this._MAX_LABEL_LEN=43}static get(e){return e.getContribution(jB.ID)??void 0}constructor(e,t,n,r,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=r,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new te,this._sessionDisposables=new te,this._decorationsMetadata=new Map,this._ruleFactory=new fF(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(142)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(142);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if(e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(Gw.getInstance().event(c=>{if(!this._editor.hasModel())return;let u=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(u!==this._activeRenderMode){this._activeRenderMode=u;let d=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(d);this._updateHintsDecorators([d.getFullModelRange()],h),s.schedule(0)}}))}let n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(Ve(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let r,o=new Set,s=new di(async()=>{let a=Date.now();r?.dispose(!0),r=new Bi;let l=t.onWillDispose(()=>r?.cancel());try{let c=r.token,u=await cW.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){u.dispose();return}for(let d of u.provider)typeof d.onDidChangeInlayHints=="function"&&!o.has(d)&&(o.add(d),this._sessionDisposables.add(d.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(u),this._updateHintsDecorators(u.ranges,u.items),this._cacheHintsForFastRestore(t)}catch(c){pt(c)}finally{r.dispose(),l.dispose()}},this._debounceInfo.get(t));this._sessionDisposables.add(s),this._sessionDisposables.add(Ve(()=>r?.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{r?.cancel();let l=Math.max(s.delay,1250);s.schedule(l)})),this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let e=new te,t=e.add(new p1(this._editor)),n=new te;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(r=>{let[o]=r,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){n.clear();return}let l=new Bi;n.add(Ve(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new mBe(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,u=new N(c,1,c,a.getLineMaxColumn(c)),d=this._getInlineHintsForRange(u);this._updateHintsDecorators([u],d),n.add(Ve(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([u],d)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(async r=>{let o=this._getInlayHintLabelPart(r);if(o){let s=o.part;s.location?this._instaService.invokeFunction(fue,r,this._editor,s.location):xY.is(s.command)&&await this._invokeCommand(s.command,o.item)}})),e}_getInlineHintsForRange(e){let t=new Set;for(let n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(async t=>{if(t.event.detail!==2)return;let n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),await n.item.resolve(Ft.None),Jo(n.item.hint.textEdits))){let r=n.item.hint.textEdits.map(o=>Dn.replace(N.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!Er(e.event.target))return;let t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(Uwt,this._editor,e.event.target,t)})}_getInlayHintLabelPart(e){if(e.target.type!==6)return;let t=e.target.detail.injectedText?.options;if(t instanceof Jy&&t?.attachedData instanceof QB)return t.attachedData}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(n){this._notificationService.notify({severity:KS.Error,source:t.provider.displayName,message:n})}}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[n,r]of this._decorationsMetadata){if(t.has(r.item))continue;let o=e.getDecorationRange(n);if(o){let s=new lW(o,r.item.anchor.direction),a=r.item.with({anchor:s});t.set(r.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=[];for(let o of n.sort(N.compareRangesUsingStarts)){let s=t.validateRange(new N(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!N.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=N.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,t){let n=[],r=(p,g,v,A,w)=>{let C={content:v,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:g.className,cursorStops:A,attachedData:w};n.push({item:p,classNameRef:g,decoration:{range:p.anchor.range,options:{description:"InlayHint",showIfCollapsed:p.anchor.range.isEmpty(),collapseOnReplaceEdit:!p.anchor.range.isEmpty(),stickiness:0,[p.anchor.direction]:this._activeRenderMode===0?C:void 0}}})},o=(p,g)=>{let v=this._ruleFactory.createClassNameRef({width:`${s/3|0}px`,display:"inline-block"});r(p,v,"\u200A",g?Yh.Right:Yh.None)},{fontSize:s,fontFamily:a,padding:l,isUniform:c}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,a);let d={line:0,totalLen:0};for(let p of t){if(d.line!==p.anchor.range.startLineNumber&&(d={line:p.anchor.range.startLineNumber,totalLen:0}),d.totalLen>jB._MAX_LABEL_LEN)continue;p.hint.paddingLeft&&o(p,!1);let g=typeof p.hint.label=="string"?[{label:p.hint.label}]:p.hint.label;for(let v=0;v0&&(E=E.slice(0,-T)+"\u2026",I=!0),r(p,this._ruleFactory.createClassNameRef(_),Zxi(E),C&&!p.hint.paddingRight?Yh.Right:Yh.None,new QB(p,v)),I)break}if(p.hint.paddingRight&&o(p,!0),n.length>jB._MAX_DECORATORS)break}let h=[];for(let[p,g]of this._decorationsMetadata){let v=this._editor.getModel()?.getDecorationRange(p);v&&e.some(A=>A.containsRange(v))&&(h.push(p),g.classNameRef.dispose(),this._decorationsMetadata.delete(p))}let f=lf.capture(this._editor);this._editor.changeDecorations(p=>{let g=p.deltaDecorations(h,n.map(v=>v.decoration));for(let v=0;vn)&&(o=n);let s=e.fontFamily||r;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===r&&o===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};NN=jB=Xxi([UB(1,Le),UB(2,da),UB(3,jwt),UB(4,Oi),UB(5,Cn),UB(6,Ne)],NN);ci.registerCommand("_executeInlayHintProvider",async(i,...e)=>{let[t,n]=e;yi(Xe.isUri(t)),yi(N.isIRange(n));let{inlayHintsProvider:r}=i.get(Le),o=await i.get(xs).createModelReference(t);try{let s=await cW.create(r,o.object.textEditorModel,[N.lift(n)],Ft.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}})});var $xi,rD,pue,GB,bBe=D(()=>{Jt();Ad();Nt();vs();Pg();Sl();Yp();UPe();oW();gBe();nr();vd();Ui();Oe();Si();qPe();Qt();Yr();px();Xn();$xi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rD=function(i,e){return function(t,n){e(t,n,i)}},pue=class extends $E{constructor(e,t,n,r){super(10,t,e.item.anchor.range,n,r,!0),this.part=e}},GB=class extends iD{constructor(e,t,n,r,o,s,a,l,c){super(e,t,n,s,l,r,o,c),this._resolverService=a,this.hoverOrdinal=6}suggestHoverAnchor(e){if(!NN.get(this._editor)||e.target.type!==6)return null;let n=e.target.detail.injectedText?.options;return n instanceof Jy&&n.attachedData instanceof QB?new pue(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof pue?new Ou(async r=>{let{part:o}=e;if(await o.item.resolve(n),n.isCancellationRequested)return;let s;typeof o.item.hint.tooltip=="string"?s=new es().appendText(o.item.hint.tooltip):o.item.hint.tooltip&&(s=o.item.hint.tooltip),s&&r.emitOne(new uf(this,e.range,[s],!1,0)),Jo(o.item.hint.textEdits)&&r.emitOne(new uf(this,e.range,[new es().appendText(y("hint.dbl","Double-click to insert"))],!1,10001));let a;if(typeof o.part.tooltip=="string"?a=new es().appendText(o.part.tooltip):o.part.tooltip&&(a=o.part.tooltip),a&&r.emitOne(new uf(this,e.range,[a],!1,1)),o.part.location||o.part.command){let c,d=this._editor.getOption(78)==="altKey"?qt?y("links.navigate.kb.meta.mac","cmd + click"):y("links.navigate.kb.meta","ctrl + click"):qt?y("links.navigate.kb.alt.mac","option + click"):y("links.navigate.kb.alt","alt + click");o.part.location&&o.part.command?c=new es().appendText(y("hint.defAndCommand","Go to Definition ({0}), right click for more",d)):o.part.location?c=new es().appendText(y("hint.def","Go to Definition ({0})",d)):o.part.command&&(c=new es(`[${y("hint.cmd","Execute Command")}](${wwt(o.part.command)} "${o.part.command.title}") (${d})`,{isTrusted:!0})),c&&r.emitOne(new uf(this,e.range,[c],!1,1e4))}let l=await this._resolveInlayHintLabelPartHover(o,n);for await(let c of l)r.emitOne(c)}):Ou.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return Ou.EMPTY;let{uri:n,range:r}=e.part.location,o=await this._resolverService.createModelReference(n);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?rW(this._languageFeaturesService.hoverProvider,s,new K(r.startLineNumber,r.startColumn),t).filter(a=>!bx(a.hover.contents)).map(a=>new uf(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Ou.EMPTY}finally{o.dispose()}}};GB=$xi([rD(1,rn),rD(2,jo),rD(3,ni),rD(4,nh),rD(5,kt),rD(6,xs),rD(7,Le),rD(8,Oi)],GB)});var mue,vBe,ABe,Qwt=D(()=>{Pg();ae();HPe();vs();Nt();We();Ye();oW();Dce();bBe();Lt();mue=class i extends W{constructor(e,t,n,r,o,s){super();let a=t.anchor,l=t.hoverParts;this._renderedHoverParts=this._register(new ABe(e,n,l,s,o));let{showAtPosition:c,showAtSecondaryPosition:u}=i.computeHoverPositions(e,a.range,l);this.shouldAppearBeforeContent=l.some(d=>d.isBeforeContent),this.showAtPosition=c,this.showAtSecondaryPosition=u,this.initialMousePosX=a.initialMousePosX,this.initialMousePosY=a.initialMousePosY,this.shouldFocus=r.shouldFocus,this.source=r.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,t,n){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,n)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,n){let r=1;if(e.hasModel()){let u=e._getViewModel(),d=u.coordinatesConverter,h=d.convertModelRangeToViewRange(t),f=u.getLineMinColumn(h.startLineNumber),p=new K(h.startLineNumber,f);r=d.convertViewPositionToModelPosition(p).column}let o=t.startLineNumber,s=t.startColumn,a;for(let u of n){let d=u.range,h=d.startLineNumber===o,f=d.endLineNumber===o;if(h&&f){let g=d.startColumn,v=Math.min(s,g);s=Math.max(v,r)}u.forceShowAtRange&&(a=d)}let l,c;if(a){let u=a.getStartPosition();l=u,c=u}else l=t.getStartPosition(),c=new K(o,s);return{showAtPosition:l,showAtSecondaryPosition:c}}},vBe=class{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}},ABe=class i extends W{static{this._DECORATION_OPTIONS=zt.register({description:"content-hover-highlight",className:"hoverHighlight"})}constructor(e,t,n,r,o){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=o,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,n,o,r)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,n)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(t.length===0)return W.None;let n=t[0].range;for(let o of t){let s=o.range;n=N.plusRange(n,s)}let r=e.createDecorationsCollection();return r.set([{range:n,options:i._DECORATION_OPTIONS}]),Ve(()=>{r.clear()})}_renderParts(e,t,n,r){let o=new RB(r),s={fragment:this._fragment,statusBar:o,...n},a=new te;for(let c of e){let u=this._renderHoverPartsForParticipant(t,c,s);a.add(u);for(let d of u.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:c,hoverPart:d.hoverPart,hoverElement:d.hoverElement})}let l=this._renderStatusBar(this._fragment,o);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),Ve(()=>{a.dispose()})}_renderHoverPartsForParticipant(e,t,n){let r=e.filter(s=>s.owner===t);return r.length>0?t.renderHoverParts(n,r):new dm([])}_renderStatusBar(e,t){if(t.hasContent)return new vBe(e,t)}_registerListenersOnRenderedParts(){let e=new te;return this._renderedParts.forEach((t,n)=>{let r=t.hoverElement;r.tabIndex=0,e.add(re(r,De.FOCUS_IN,o=>{o.stopPropagation(),this._focusedHoverPartIndex=n})),e.add(re(r,De.FOCUS_OUT,o=>{o.stopPropagation(),this._focusedHoverPartIndex=-1}))}),e}_updateMarkdownAndColorParticipantInfo(e){let t=e.find(n=>n instanceof iD&&!(n instanceof GB));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find(n=>n instanceof _N)}async updateHoverVerbosityLevel(e,t,n){if(!this._markdownHoverParticipant)return;let r=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,t);if(r===void 0)return;let o=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,r,n);o&&(this._renderedParts[t]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:o.hoverPart,hoverElement:o.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){let n=this._renderedParts[t];if(!n||n.type!=="hoverPart"||!(n.participant===e))return;let o=this._renderedParts.findIndex(s=>s.type==="hoverPart"&&s.participant===e);if(o===-1)throw new vi;return t-o}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}}});var eCi,Gwt,gue,qwt=D(()=>{Ye();ae();tr();zPe();Pg();ht();Yr();fwt();pwt();mwt();et();Qwt();iW();eCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Gwt=function(i,e){return function(t,n){e(t,n,i)}},gue=class extends W{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._onContentsChanged=this._register(new G),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(Vce,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new Hce(this._editor,this._participants),this._hoverOperation=this._register(new MB(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){let e=[];for(let t of Og.getAll()){let n=this._instantiationService.createInstance(t,this._editor);e.push(n)}return e.sort((t,n)=>t.hoverOrdinal-n.hoverOrdinal),this._register(this._contentHoverWidget.onDidResize(()=>{this._participants.forEach(t=>t.handleResize?.())})),e}_registerListeners(){this._register(this._hoverOperation.onResult(t=>{if(!this._computer.anchor)return;let n=t.hasLoadingMessage?this._addLoadingMessage(t.value):t.value;this._withResult(new nW(this._computer.anchor,n,t.isComplete))}));let e=this._contentHoverWidget.getDomNode();this._register(cn(e,"keydown",t=>{t.equals(9)&&this.hide()})),this._register(cn(e,"mouseleave",t=>{this._onMouseLeave(t)})),this._register(Wn.onDidChange(()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,t,n,r,o){if(!(this._contentHoverWidget.position&&this._currentResult))return e?(this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):!1;let a=this._editor.getOption(60).sticky,l=o&&this._contentHoverWidget.isMouseGettingCloser(o.event.posx,o.event.posy);return a&&l?(e&&this._startHoverOperationIfNecessary(e,t,n,r,!0),!0):e?this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){let t=e;if(this._currentResult===t)return;t&&t.hoverParts.length===0&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(let t of this._participants){if(!t.createLoadingMessage)continue;let n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}return e}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;let r=e.hoverParts.length===0,o=this._computer.insistOnKeepingHoverVisible;r&&o||this._setCurrentResult(e)}_showHover(e){let t=this._getHoverContext();this._renderedContentHover=new mue(this._editor,e,this._participants,this._computer,t,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},setMinimumDimensions:r=>{this._contentHoverWidget.setMinimumDimensions(r)}}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;let n=this._findHoverAnchorCandidates(e);if(!(n.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);let o=n[0];return this._startShowingOrUpdateHover(o,0,0,!1,e)}_findHoverAnchorCandidates(e){let t=[];for(let r of this._participants){if(!r.suggestHoverAnchor)continue;let o=r.suggestHoverAnchor(e);o&&t.push(o)}let n=e.target;switch(n.type){case 6:{t.push(new LB(0,n.range,e.event.posx,e.event.posy));break}case 7:{let r=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;if(!(!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTexto.priority-r.priority),t}_onMouseLeave(e){let t=this._editor.getDomNode();(!t||!eD(t,e.x,e.y))&&this.hide()}startShowingAtRange(e,t,n,r){this._startShowingOrUpdateHover(new LB(0,e,void 0,void 0),t,n,r,null)}async updateHoverVerbosityLevel(e,t,n){this._renderedContentHover?.updateHoverVerbosityLevel(e,t,n)}focusedHoverPartIndex(){return this._renderedContentHover?.focusedHoverPartIndex??-1}containsNode(e){return e?this._contentHoverWidget.getDomNode().contains(e):!1}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};gue=eCi([Gwt(1,Ne),Gwt(2,ni)],gue)});var mW=D(()=>{});var tCi,Ywt,yBe,bue,Tc,vue=D(()=>{kce();ae();ht();Oce();Yr();Jt();iW();qwt();mW();et();tCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ywt=function(i,e){return function(t,n){e(t,n,i)}},bue=!1,Tc=class extends W{static{yBe=this}static{this.ID="editor.contrib.contentHover"}constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._onHoverContentsChanged=this._register(new G),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new te,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new di(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(yBe.ID)}_hookListeners(){let e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._shouldNotHideCurrentHoverWidget(e)&&this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){let t=this._contentWidget?.getDomNode();return t?eD(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e))||bue||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,n=(s,a)=>{let l=this._isMouseOnContentHoverWidget(s);return a&&l},r=s=>{let a=this._isMouseOnContentHoverWidget(s),l=this._contentWidget?.isColorPickerVisible??!1;return a&&l},o=(s,a)=>(a&&this._contentWidget?.containsNode(s.event.browserEvent.view?.document.activeElement)&&!s.event.browserEvent.view?.getSelection()?.isCollapsed)??!1;return n(e,t)||r(e)||o(e,t)}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,this._contentWidget?.isFocused||this._contentWidget?.isResizing))return;let t=this._hoverSettings.sticky;if(t&&this._contentWidget?.isVisibleFromKeyboard)return;if(this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}let r=this._hoverSettings.hidingDelay;if(this._contentWidget?.isVisible&&t&&r>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(r);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;let n=e.target.element?.classList.contains("colorpicker-color-decoration"),r=this._editor.getOption(149),o=this._hoverSettings.enabled,s=this._hoverState.activatedByDecoratorClick;if(n&&(r==="click"&&!s||r==="hover"&&!o&&!bue||r==="clickAndHover"&&!o&&!s)||!n&&!o&&!s){this._hideWidgets();return}this._tryShowHoverWidget(e)||bue||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateContentWidget().showsOrWillShow(e)}_onKeyDown(e){if(!this._editor.hasModel())return;let t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=t.kind===1||t.kind===2&&(t.commandId===Tce||t.commandId===SN||t.commandId===EN)&&this._contentWidget?.isVisible;e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||n||this._hideWidgets()}_hideWidgets(){bue||this._hoverState.mouseDown&&this._contentWidget?.isColorPickerVisible||nC.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(gue,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}showContentHover(e,t,n,r,o=!1){this._hoverState.activatedByDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,r)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,n){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,n)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}};Tc=yBe=tCi([Ywt(1,Ne),Ywt(2,ni)],Tc)});var Aue,Kwt=D(()=>{ae();ii();We();_Pe();Dce();vue();Pg();Aue=class extends W{static{this.ID="editor.contrib.colorContribution"}constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=this._editor.getOption(149);if(t!=="click"&&t!=="clickAndHover")return;let n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==CPe||!n.range)return;let r=this._editor.getContribution(Tc.ID);if(r&&!r.isColorPickerVisible){let o=new N(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);r.showContentHover(o,1,0,!1,!0)}}};Tt(Aue.ID,Aue,2);Og.register(_N)});var Xwt,qB,wBe,xBe,oD,Jwt,iCi,CBe,_Be,Zwt=D(()=>{ae();Dce();ht();HPe();Yr();et();Ui();ii();vn();Wt();fPe();Ye();Cce();xv();Xwt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qB=function(i,e){return function(t,n){e(t,n,i)}},oD=class extends W{static{wBe=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(e,t,n){super(),this._editor=e,this._instantiationService=n,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=V.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=V.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(CBe,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(wBe.ID)}};oD=wBe=Xwt([qB(1,Ze),qB(2,Ne)],oD);Tt(oD.ID,oD,1);Jwt=8,iCi=22,CBe=class extends W{static{xBe=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._keybindingService=o,this._languageFeaturesService=s,this._editorWorkerService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new G),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(NB,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;let l=this._editor.getSelection(),c=l?{startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},u=this._register(Yc(this._body));this._register(u.onDidBlur(d=>{this.hide()})),this._register(u.onDidFocus(d=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(d=>{let h=d.target.element?.classList;h&&h.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(d=>{this._render(d.value,d.foundInEditor)})),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return xBe.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){let t=await this._computeAsync(e);t&&this._onResult.fire(new _Be(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;let t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=await this._standaloneColorPickerParticipant.createColorHover(t,new xN(this._editorWorkerService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null}_render(e,t){let n=document.createDocumentFragment(),r=this._register(new RB(this._keybindingService)),o={fragment:n,statusBar:r,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;let s=this._standaloneColorPickerParticipant.renderHoverParts(o,[e]);if(!s)return;this._register(s.disposables);let a=s.colorPicker;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),a.layout();let l=a.body,c=l.saturationBox.domNode.clientWidth,u=l.domNode.clientWidth-c-iCi-Jwt,d=a.body.enterButton;d?.onClicked(()=>{this.updateEditor(),this.hide()});let h=a.header,f=h.pickedColorNode;f.style.width=c+Jwt+"px";let p=h.originalColorNode;p.style.width=u+"px",a.header.closeButton?.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};CBe=xBe=Xwt([qB(3,Ne),qB(4,ni),qB(5,Le),qB(6,pa)],CBe);_Be=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var SBe,EBe,DBe,$wt=D(()=>{ii();Oe();Zwt();vn();fr();Cce();SBe=class extends ih{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...Bt("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:y({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:tt.CommandPalette}],metadata:{description:Bt("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){oD.get(t)?.showOrFocus()}},EBe=class extends Fe{constructor(){super({id:"editor.action.hideColorPicker",label:y({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:V.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:Bt("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,t){oD.get(t)?.hide()}},DBe=class extends Fe{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:y({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:V.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:Bt("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){oD.get(t)?.insertColor()}};xe(EBe);xe(DBe);Pn(SBe)});var cC,TBe=D(()=>{$p();Nt();We();Hn();cC=class i{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;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,u=e.endColumn,d=o.getLineContent(a),h=o.getLineContent(c),f=d.lastIndexOf(t,l-1+t.length),p=h.indexOf(n,u-1-n.length);if(f!==-1&&p!==-1)if(a===c)d.substring(f+t.length,p).indexOf(n)>=0&&(f=-1,p=-1);else{let v=d.substring(f+t.length),A=h.substring(0,p);(v.indexOf(n)>=0||A.indexOf(n)>=0)&&(f=-1,p=-1)}let g;f!==-1&&p!==-1?(r&&f+t.length0&&h.charCodeAt(p-1)===32&&(n=" "+n,p-=1),g=i._createRemoveBlockCommentOperations(new N(a,f+t.length+1,c,p+1),t,n)):(g=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(let v of g)s.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return N.isEmpty(e)?r.push(Dn.delete(new N(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(Dn.delete(new N(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Dn.delete(new N(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return N.isEmpty(e)?o.push(Dn.replace(new N(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(Dn.insert(new K(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(Dn.insert(new K(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new qe(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new qe(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}});var yue,ext=D(()=>{Pt();$p();Nt();We();Hn();TBe();yue=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._indentSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,u=n-t+1;co?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var gW,kBe,IBe,LBe,NBe,txt=D(()=>{Ep();ii();We();vn();ks();TBe();ext();Oe();fr();gW=class extends Fe{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(qi);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(23),l=t.getSelections().map((u,d)=>({selection:u,index:d,ignoreFirstLine:!1}));l.sort((u,d)=>N.compareRangesUsingStarts(u.selection,d.selection));let c=l[0];for(let u=1;u{Ye();rL();$a();ae();Si();ii();vn();Oe();fr();Wt();bd();Yr();nr();pO();nCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},MN=function(i,e){return function(t,n){e(t,n,i)}},RN=class{static{MBe=this}static{this.ID="editor.contrib.contextmenu"}static get(e){return e.getContribution(MBe.ID)}constructor(e,t,n,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new te,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let u=this._contextViewService.getContextViewElement(),d=c.srcElement;d.shadowRoot&&ov(u)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(24)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let r of this._editor.getSelections())if(r.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(24)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],r=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(let o of r){let[,s]=o,a=0;for(let l of s)if(l instanceof Hb){let c=this._getMenuActions(e,l.item.submenu);c.length>0&&(n.push(new pg(l.id,l.label,c)),a++)}else n.push(l),a++;a&&n.push(new go)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let r=t;if(!r){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=bn(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;r={x:l,y:c}}let o=this._editor.getOption(128)&&!Tu;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>e,getActionViewItem:s=>{let a=this._keybindingFor(s);if(a)return new Eg(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});let l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new Eg(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||xht(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(73),n=0,r=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,u)=>new pg(`menu-action-${++n}`,c,u,void 0),s=(c,u,d,h,f)=>{if(!u)return r({label:c,enabled:u,run:()=>{}});let p=v=>()=>{this._configurationService.updateValue(d,v)},g=[];for(let v of f)g.push(r({label:v.label,checked:h===v.value,run:p(v.value)}));return o(c,g)},a=[];a.push(r({label:y("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new go),a.push(r({label:y("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(y("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:y("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:y("context.minimap.size.fill","Fill"),value:"fill"},{label:y("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(y("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:y("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:y("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(128)&&!Tu;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};RN=MBe=nCi([MN(1,Xs),MN(2,rh),MN(3,Ze),MN(4,ni),MN(5,el),MN(6,kt),MN(7,gv)],RN);RBe=class extends Fe{constructor(){super({id:"editor.action.showContextMenu",label:y("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:1092,weight:100}})}run(e,t){RN.get(t)?.showContextMenu()}};Tt(RN.ID,RN,2);xe(RBe)});var bW,vW,YB,OBe,PBe,ixt=D(()=>{ae();ii();vn();Oe();bW=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let r=0;r{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;let n=new bW(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new vW(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 vW(new bW(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 vW(new bW(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}},OBe=class extends Fe{constructor(){super({id:"cursorUndo",label:y("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:2099,weight:100}})}run(e,t,n){YB.get(t)?.cursorUndo()}},PBe=class extends Fe{constructor(){super({id:"cursorRedo",label:y("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){YB.get(t)?.cursorRedo()}};Tt(YB.ID,YB,0);xe(OBe);xe(PBe)});var nxt=D(()=>{});var wue,rxt=D(()=>{We();Hn();wue=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new N(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 qe(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 qe(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.lineNumber{ae();Si();nxt();ii();Nt();We();Hn();vs();rxt();xue=class i extends W{static{this.ID="editor.contrib.dragAndDrop"}static{this.TRIGGER_KEY_VALUE=qt?6:5}constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._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(35)||this._editor.getOption(22)||(KB(e)&&(this._modifierPressed=!0),this._mouseDown&&KB(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(KB(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.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){let t=e.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}KB(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){let t=new K(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let r=this._editor.getSelection();if(r){let{selectionStartLineNumber:o,selectionStartColumn:s}=r;n=[new qe(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new qe(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(KB(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new wue(this._dragSelection,t,KB(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=zt.register({description:"dnd-target",className:"dnd-target"})}showAt(e){this._dndDecorationIds.set([{range:new N(e.lineNumber,e.column,e.lineNumber,e.column),options:i._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()}};Tt(xue.ID,xue,2)});var axt=D(()=>{n0();ii();vn();IE();VOe();qle();Oe();Tt(Ov.ID,Ov,0);Xb(Gle);Qe(new class extends Sr{constructor(){super({id:zOe,precondition:tce,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e){return Ov.get(e)?.changePasteType()}});Qe(new class extends Sr{constructor(){super({id:"editor.hidePasteWidget",precondition:tce,kbOpts:{weight:100,primary:9}})}runEditorCommand(i,e){Ov.get(e)?.clearWidgets()}});xe(class sxt extends Fe{static{this.argsSchema={type:"object",properties:{kind:{type:"string",description:y("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}}}constructor(){super({id:"editor.action.pasteAs",label:y("pasteAs","Paste As..."),alias:"Paste As...",precondition:V.writable,metadata:{description:"Paste as",args:[{name:"args",schema:sxt.argsSchema}]}})}run(e,t,n){let r=typeof n?.kind=="string"?n.kind:void 0;return!r&&n&&(r=typeof n.id=="string"?n.id:void 0),Ov.get(t)?.pasteAs(r?new Un(r):void 0)}});xe(class extends Fe{constructor(){super({id:"editor.action.pasteAsText",label:y("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:V.writable})}run(i,e){return Ov.get(e)?.pasteAs({providerId:tC.id})}})});var Cue,AW,BBe=D(()=>{Cue=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){let t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},AW=class{constructor(e){this.identifier=e}}});var zBe,lxt=D(()=>{wc();ht();BBe();zBe=vt("treeViewsDndService");ui(zBe,Cue,1)});var rCi,_ue,VBe,HBe,WBe,Sue,FN,cxt=D(()=>{Qt();Jt();jH();n0();ae();DOe();We();Ui();BBe();lxt();eC();Zle();Oe();nr();Wt();SOe();ht();Xle();POe();rCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_ue=function(i,e){return function(t,n){e(t,n,i)}},HBe="editor.experimental.dropIntoEditor.defaultProvider",WBe="editor.changeDropType",Sue=new Pe("dropWidgetVisible",!1,y("dropWidgetVisible","Whether the drop widget is showing")),FN=class extends W{static{VBe=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(e){return e.getContribution(VBe.ID)}constructor(e,t,n,r,o){super(),this._configService=n,this._languageFeaturesService=r,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=Hle.getInstance(),this._dropProgressManager=this._register(t.createInstance(yB,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(_B,"dropIntoEditor",e,Sue,{id:WBe,label:y("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,n){if(!n.dataTransfer||!e.hasModel())return;this._currentOperation?.cancel(),e.focus(),e.setPosition(t);let r=hr(async o=>{let s=new te,a=s.add(new dp(e,1,void 0,o));try{let l=await this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;let c=e.getModel();if(!c)return;let u=this._languageFeaturesService.documentDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(f=>l.matches(f)):!0),d=s.add(await this.getDropEdits(u,c,t,l,a));if(a.token.isCancellationRequested)return;if(d.edits.length){let h=this.getInitialActiveEditIndex(c,d.edits),f=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([N.fromPositions(t)],{activeEditIndex:h,allEdits:d.edits},f,async p=>p,o)}}finally{s.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(t,y("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r,{cancel:()=>r.cancel()}),this._currentOperation=r}async getDropEdits(e,t,n,r,o){let s=new te,a=await YA(Promise.all(e.map(async c=>{try{let u=await c.provideDocumentDropEdits(t,n,r,o.token);return u&&s.add(u),u?.edits.map(d=>({...d,providerId:c.id}))}catch(u){console.error(u)}})),o.token),l=yl(a??[]).flat();return{edits:Jle(l),dispose:()=>s.dispose()}}getInitialActiveEditIndex(e,t){let n=this._configService.getValue(HBe,{resource:e.uri});for(let[r,o]of Object.entries(n)){let s=new Un(o),a=t.findIndex(l=>s.value===l.providerId&&l.handledMimeType&&Vle(r,[l.handledMimeType]));if(a>=0)return a}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new vB;let t=Wle(e.dataTransfer);if(this.treeItemsTransfer.hasData(AW.prototype)){let n=this.treeItemsTransfer.getData(AW.prototype);if(Array.isArray(n))for(let r of n){let o=await this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t}};FN=VBe=rCi([_ue(1,Ne),_ue(2,kt),_ue(3,Le),_ue(4,zBe)],FN)});var uxt=D(()=>{ii();Ste();IE();qle();Oe();cy();sa();cxt();Tt(FN.ID,FN,2);Xb(Qle);Qe(new class extends Sr{constructor(){super({id:WBe,precondition:Sue,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){FN.get(e)?.changeDropType()}});Qe(new class extends Sr{constructor(){super({id:"editor.hideDropWidget",precondition:Sue,kbOpts:{weight:100,primary:9}})}runEditorCommand(i,e,t){FN.get(e)?.clearWidgets()}});Gi.as(xc.Configuration).registerConfiguration({...JI,properties:{[HBe]:{type:"object",scope:5,description:y("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})});var Eue,dxt=D(()=>{We();tl();vs();eo();Zn();Eue=class i{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){let 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){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){let s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new N(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let r=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){r=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/c)),d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,p=e.length;f=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new N(d,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,h=g.endLineNumber)}o.push({range:new N(d,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;an.removeDecoration(a)),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumbere.column))return r}}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 o;if(!(o.startColumn{We();Due=class{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let n=[];for(let s=0;sN.compareRangesUsingStarts(s.range,a.range));let r=[],o=n[0];for(let s=1;s0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function fxt(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function pxt(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=UBe([r[a]],s)+t}),o.slice(0,-1)}var mxt=D(()=>{Pt()});function gxt(i){if(!i||i.length===0)return new XB(null);let e=[],t=new QBe(i);for(let n=0,r=i.length;n=r)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` -`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1{mxt();Tue=class{constructor(e){this.staticValue=e,this.kind=0}},jBe=class{constructor(e){this.pieces=e,this.kind=1}},XB=class i{static fromStaticValue(e){return new i([JB.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new Tue(""):e.length===1&&e[0].staticValue!==null?this._state=new Tue(e[0].staticValue):this._state=new jBe(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?UBe(e,this._state.staticValue):this._state.staticValue;let n="";for(let r=0,o=this._state.pieces.length;r0){let l=[],c=s.caseOps.length,u=0;for(let d=0,h=a.length;d=c){l.push(a.slice(d));break}switch(s.caseOps[u]){case"U":l.push(a[d].toUpperCase());break;case"u":l.push(a[d].toUpperCase()),u++;break;case"L":l.push(a[d].toLowerCase());break;case"l":l.push(a[d].toLowerCase()),u++;break;default:l.push(a[d])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e{Jf();Jt();ae();PL();Nt();We();Hn();U7();dxt();hxt();bxt();Wt();v1=new Pe("findWidgetVisible",!1),Sor=v1.toNegated(),ZB=new Pe("findInputFocussed",!1),yW=new Pe("replaceInputFocussed",!1),wW={primary:545,mac:{primary:2593}},xW={primary:565,mac:{primary:2613}},CW={primary:560,mac:{primary:2608}},_W={primary:554,mac:{primary:2602}},SW={primary:558,mac:{primary:2606}},Ir={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},b1=19999,oCi=240,kue=class i{constructor(e,t){this._toDispose=new te,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new oa,this._decorations=new Eue(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new di(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Vi(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},oCi)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t<"u"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new N(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,b1);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=QS(r.map(l=>l.range),l=>N.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new K(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let u=this._decorations.matchAfterPosition(e);u&&this._setCurrentFindMatch(u);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new K(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=b1?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new fv(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let d="mu";n.ignoreCase&&(d+="i"),n.global&&(d+="g"),n=new RegExp(n.source,d)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let u=new OE(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;ss.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o{});var Iue,Axt=D(()=>{Ye();vxt();mNe();bg();Jt();EW();eo();Zl();Iue=class i extends Ls{static{this.ID="editor.contrib.findOptionsWidget"}constructor(e,t,n){super(),this._hideSoon=this._register(new di(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:it(rI),inputActiveOptionForeground:it(oI),inputActiveOptionBackground:it(Jw)},o=this._register(Yb());this.caseSensitive=this._register(new tP({appendTitle:this._keybindingLabelFor(Ir.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:o,...r})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new iP({appendTitle:this._keybindingLabelFor(Ir.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:o,...r})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new nP({appendTitle:this._keybindingLabelFor(Ir.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:o,...r})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(s=>{let a=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(re(this._domNode,De.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(re(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}});function Lue(i,e){return i===1?!0:i===2?!1:e}var Nue,yxt=D(()=>{et();ae();We();EW();Nue=class extends W{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Lue(this._isRegexOverride,this._isRegex)}get wholeWord(){return Lue(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Lue(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Lue(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new G),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n<"u"&&(N.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){let r={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1,s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,r.searchString=!0,o=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,r.replaceString=!0,o=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,r.isRevealed=!0,o=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,r.isReplaceRevealed=!0,o=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(e.searchScope?.every(u=>this._searchScope?.some(d=>!N.equalsRange(d,u)))||(this._searchScope=e.searchScope,r.searchScope=!0,o=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,r.loop=!0,o=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,r.isSearching=!0,o=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,r.filters=!0,o=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,r.isRegex=!0),a!==this.wholeWord&&(o=!0,r.wholeWord=!0),l!==this.matchCase&&(o=!0,r.matchCase=!0),c!==this.preserveCase&&(o=!0,r.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(r)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=b1}}});var wxt=D(()=>{});var sCi,aCi,GBe,Mue,xxt=D(()=>{Ye();eP();Gne();bg();er();et();bNe();Oe();Zl();sCi=y("defaultLabel","input"),aCi=y("label.preserveCaseToggle","Preserve Case"),GBe=class extends kg{constructor(e){super({icon:Ee.preserveCase,title:aCi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??ko("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},Mue=class extends Ls{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new G),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new G),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new G),this._onInput=this._register(new G),this._onKeyUp=this._register(new G),this._onPreserveCaseKeyDown=this._register(new G),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||sCi;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rP(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new GBe({appendTitle:o,isChecked:!1,...r.toggleStyles})),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let u=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let p=-1;h.equals(17)?p=(f+1)%u.length:h.equals(15)&&(f===0?p=u.length-1:p=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):p>=0&&u[p].focus(),Ai.stop(h,!0)}}});let d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}});function Dxt(i,e){if(Rue.includes(e))throw new Error("Cannot register the same widget multiple times");Rue.push(e);let t=new te,n=new Pe(qBe,!1).bindTo(i),r=new Pe(Sxt,!0).bindTo(i),o=new Pe(Ext,!0).bindTo(i),s=()=>{n.set(!0),DW=e},a=()=>{n.set(!1),DW===e&&(DW=void 0)};return Jk(e.element)&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(Ve(()=>{Rue.splice(Rue.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var Cxt,_xt,Pue,qBe,Sxt,Ext,DW,Rue,Fue,Oue,YBe=D(()=>{qne();xxt();Wt();nx();Oe();ae();Ye();Cxt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_xt=function(i,e){return function(t,n){e(t,n,i)}},Pue=new Pe("suggestWidgetVisible",!1,y("suggestWidgetVisible","Whether suggestion are visible")),qBe="historyNavigationWidgetFocus",Sxt="historyNavigationForwardsEnabled",Ext="historyNavigationBackwardsEnabled",Rue=[];Fue=class extends vL{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(Dxt(o,this.inputBox))}};Fue=Cxt([_xt(3,Ze)],Fue);Oue=class extends Mue{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(Dxt(s,this.inputBox))}};Oue=Cxt([_xt(3,Ze)],Oue);La.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:me.and(me.has(qBe),me.equals(Ext,!0),me.not("isComposing"),Pue.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{DW?.showPreviousValue()}});La.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:me.and(me.has(qBe),me.equals(Sxt,!0),me.not("isComposing"),Pue.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{DW?.showNextValue()}})});function KBe(i){return i.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()==="Up"&&i.lookupKeybinding("history.showNext")?.getElectronAccelerator()==="Down"}var Txt=D(()=>{});function Rxt(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function Fxt(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd{Ye();Yl();eP();aP();bg();Jt();er();Lt();ae();Si();Pt();wxt();We();EW();Oe();YBe();Txt();eo();sp();Zn();Dr();Pb();gn();By();Zl();kxt=kn("find-collapsed",Ee.chevronRight,y("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Ixt=kn("find-expanded",Ee.chevronDown,y("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),lCi=kn("find-selection",Ee.selection,y("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),cCi=kn("find-replace",Ee.replace,y("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),uCi=kn("find-replace-all",Ee.replaceAll,y("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),dCi=kn("find-previous-match",Ee.arrowUp,y("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),hCi=kn("find-next-match",Ee.arrowDown,y("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),fCi=y("label.findDialog","Find / Replace"),pCi=y("label.find","Find"),mCi=y("placeholder.find","Find"),gCi=y("label.previousMatchButton","Previous Match"),bCi=y("label.nextMatchButton","Next Match"),vCi=y("label.toggleSelectionFind","Find in Selection"),ACi=y("label.closeButton","Close"),yCi=y("label.replace","Replace"),wCi=y("placeholder.replace","Replace"),xCi=y("label.replaceButton","Replace"),CCi=y("label.replaceAllButton","Replace All"),_Ci=y("label.toggleReplaceButton","Toggle Replace"),SCi=y("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",b1),ECi=y("label.matchesLocation","{0} of {1}"),Lxt=y("label.noResults","No results"),A1=419,DCi=275,TCi=DCi-54,TW=69,kCi=33,Nxt="ctrlEnterReplaceAll.windows.donotask",Mxt=qt?256:2048,kW=class{constructor(e){this.afterLineNumber=e,this.heightInPx=kCi,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};Bue=class i extends Ls{static{this.ID="editor.contrib.findWidget"}constructor(e,t,n,r,o,s,a,l,c,u){super(),this._hoverService=u,this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=n,this._contextViewProvider=r,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(Nxt,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new ra(500),this._register(Ve(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(146)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(41)){let h=this._codeEditor.getOption(41).loop;this._state.change({loop:h},!1);let f=this._codeEditor.getOption(41).addExtraSpaceOnTop;f&&!this._viewZone&&(this._viewZone=new kW(0),this._showViewZone()),!f&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){let d=await this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}})),this._findInputFocused=ZB.bindTo(s),this._findFocusTracker=this._register(Yc(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=yW.bindTo(s),this._replaceFocusTracker=this._register(Yc(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new kW(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(92)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=bc(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,pt)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=TW+"px",this._state.matchesCount>=b1?this._matchesCount.title=SCi:this._matchesCount.title="",this._matchesCount.firstChild?.remove();let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=b1&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=ig(ECi,n,t)}else e=Lxt;this._matchesCount.appendChild(document.createTextNode(e)),gs(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),TW=Math.max(TW,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===Lxt)return n===""?y("ariaSearchNoResultEmpty","{0} found",e):y("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=y("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return y("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=bn(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);let l=dZ(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new kW(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(84).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&bc(this._domNode)>A1){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=bc(this._findInput.domNode);return}if(A1+28+r>=n&&(s=!0),A1+28+r-TW>=n&&(a=!0),A1+28+r-TW>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=bc(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!N.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(Mxt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Rxt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return Fxt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(Mxt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Nr&&Lh&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(y("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Nxt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Rxt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return Fxt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new Fue(null,this._contextViewProvider,{width:TCi,label:pCi,placeholder:mCi,appendCaseSensitiveLabel:this._keybindingLabelFor(Ir.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Ir.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Ir.ToggleRegexCommand),validation:u=>{if(u.length===0||!this._findInput.getRegex())return null;try{return new RegExp(u,"gu"),null}catch(d){return{content:d.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>KBe(this._keybindingService),inputBoxStyles:MO,toggleStyles:NO},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(u=>this._onFindInputKeyDown(u))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(u=>{u.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),u.preventDefault())})),this._register(this._findInput.onRegexKeyDown(u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),u.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(u=>{this._tryUpdateHeight()&&this._showViewZone()})),vo&&this._register(this._findInput.onMouseDown(u=>this._onFindInputMouseDown(u))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();let n=this._register(Yb());this._prevBtn=this._register(new sD({label:gCi+this._keybindingLabelFor(Ir.PreviousMatchFindAction),icon:dCi,hoverDelegate:n,onTrigger:()=>{db(this._codeEditor.getAction(Ir.PreviousMatchFindAction)).run().then(void 0,pt)}},this._hoverService)),this._nextBtn=this._register(new sD({label:bCi+this._keybindingLabelFor(Ir.NextMatchFindAction),icon:hCi,hoverDelegate:n,onTrigger:()=>{db(this._codeEditor.getAction(Ir.NextMatchFindAction)).run().then(void 0,pt)}},this._hoverService));let r=document.createElement("div");r.className="find-part",r.appendChild(this._findInput.domNode);let o=document.createElement("div");o.className="find-actions",r.appendChild(o),o.appendChild(this._matchesCount),o.appendChild(this._prevBtn.domNode),o.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new kg({icon:lCi,title:vCi+this._keybindingLabelFor(Ir.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:n,inputActiveOptionBackground:it(Jw),inputActiveOptionBorder:it(rI),inputActiveOptionForeground:it(oI)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let u=this._codeEditor.getSelections();u=u.map(d=>(d.endColumn===1&&d.endLineNumber>d.startLineNumber&&(d=d.setEndPosition(d.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(d.endLineNumber-1))),d.isEmpty()?null:d)).filter(d=>!!d),u.length&&this._state.change({searchScope:u},!0)}}else this._state.change({searchScope:null},!0)})),o.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new sD({label:ACi+this._keybindingLabelFor(Ir.CloseFindWidgetCommand),icon:Hre,hoverDelegate:n,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),u.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new Oue(null,void 0,{label:yCi,placeholder:wCi,appendPreserveCaseLabel:this._keybindingLabelFor(Ir.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>KBe(this._keybindingService),inputBoxStyles:MO,toggleStyles:NO},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(u=>this._onReplaceInputKeyDown(u))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(u=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(u=>{u.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),u.preventDefault())}));let s=this._register(Yb());this._replaceBtn=this._register(new sD({label:xCi+this._keybindingLabelFor(Ir.ReplaceOneAction),icon:cCi,hoverDelegate:s,onTrigger:()=>{this._controller.replace()},onKeyDown:u=>{u.equals(1026)&&(this._closeBtn.focus(),u.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new sD({label:CCi+this._keybindingLabelFor(Ir.ReplaceAllAction),icon:uCi,hoverDelegate:s,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));let a=document.createElement("div");a.className="replace-part",a.appendChild(this._replaceInput.domNode);let l=document.createElement("div");l.className="replace-actions",a.appendChild(l),l.appendChild(this._replaceBtn.domNode),l.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new sD({label:_Ci,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=bc(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=fCi,this._domNode.role="dialog",this._domNode.style.width=`${A1}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(r),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(a),this._resizeSash=this._register(new of(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let c=A1;this._register(this._resizeSash.onDidStart(()=>{c=bc(this._domNode)})),this._register(this._resizeSash.onDidChange(u=>{this._resized=!0;let d=c+u.startX-u.currentX;if(dh||(this._domNode.style.width=`${d}px`,this._isReplaceVisible&&(this._replaceInput.width=bc(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let u=bc(this._domNode);if(u{this._opts.onTrigger(),r.preventDefault()}),this.onkeydown(this._domNode,r=>{if(r.equals(10)||r.equals(3)){this._opts.onTrigger(),r.preventDefault();return}this._opts.onKeyDown?.(r)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ut.asClassNameArray(kxt)),this._domNode.classList.add(...ut.asClassNameArray(Ixt))):(this._domNode.classList.remove(...ut.asClassNameArray(Ixt)),this._domNode.classList.add(...ut.asClassNameArray(kxt)))}};ua((i,e)=>{let t=i.getColor(Rb);t&&e.addRule(`.monaco-editor .findMatch { border: 1px ${Bu(i.type)?"dotted":"solid"} ${t}; box-sizing: border-box; }`);let n=i.getColor(Hst);n&&e.addRule(`.monaco-editor .findScope { border: 1px ${Bu(i.type)?"dashed":"solid"} ${n}; }`);let r=i.getColor(Fi);r&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${r}; }`);let o=i.getColor(zst);o&&e.addRule(`.monaco-editor .findMatchInline { color: ${o}; }`);let s=i.getColor(Vst);s&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${s}; }`)})});function XBe(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n){Jt();ae();Pt();ii();tm();vn();tl();EW();Axt();yxt();Oxt();Oe();fr();Bx();Wt();bd();Yr();_c();rf();yv();Zn();px();Pxt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zg=function(i,e){return function(t,n){e(t,n,i)}},ICi=524288;ph=class extends W{static{JBe=this}static{this.ID="editor.contrib.findController"}get editor(){return this._editor}static get(e){return e.getContribution(JBe.ID)}constructor(e,t,n,r,o,s){super(),this._editor=e,this._findWidgetVisible=v1.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=r,this._notificationService=o,this._hoverService=s,this._updateHistoryDelayer=new ra(500),this._state=this._register(new Nue),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(a=>this._onStateChanged(a))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let a=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),a&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!ZB.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Ja(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;let n={...t,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){let r=XBe(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=Ja(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=XBe(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new kue(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(y("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};ph=JBe=Pxt([zg(1,Ze),zg(2,ec),zg(3,uh),zg(4,Cn),zg(5,nh)],ph);ZBe=class extends ph{constructor(e,t,n,r,o,s,a,l,c){super(e,n,a,l,s,c),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();let n=this._editor.getSelection(),r=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":r=!0;break;case"never":r=!1;break;case"multiline":{r=!!n&&n.startLineNumber!==n.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||r,await super._start(e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new Bue(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new Iue(this._editor,this._state,this._keybindingService))}};ZBe=Pxt([zg(1,rh),zg(2,Ze),zg(3,ni),zg(4,Bn),zg(5,Cn),zg(6,ec),zg(7,uh),zg(8,nh)],ZBe);LCi=LDe(new L7({id:Ir.StartFindAction,label:y("startFindAction","Find"),alias:"Find",precondition:me.or(V.focus,me.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:tt.MenubarEditMenu,group:"3_find",title:y({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));LCi.addImplementation(0,(i,e,t)=>{let n=ph.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});NCi={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]},$Be=class extends Fe{constructor(){super({id:Ir.StartFindWithArgs,label:y("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:NCi})}async run(e,t,n){let r=ph.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};await r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:n?.findInSelection||!1,loop:t.getOption(41).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}}},e3e=class extends Fe{constructor(){super({id:Ir.StartFindWithSelection,label:y("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){let n=ph.get(t);n&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),n.setGlobalBufferTerm(n.getState().searchString))}},zue=class extends Fe{async run(e,t){let n=ph.get(t);n&&!this._run(n)&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))}},t3e=class extends zue{constructor(){super({id:Ir.NextMatchFindAction,label:y("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:V.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:me.and(V.focus,ZB),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},i3e=class extends zue{constructor(){super({id:Ir.PreviousMatchFindAction,label:y("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:V.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:me.and(V.focus,ZB),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},n3e=class extends Fe{constructor(){super({id:Ir.GoToMatchFindAction,label:y("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:v1}),this._highlightDecorations=[]}run(e,t,n){let r=ph.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(Cn).notify({severity:KS.Warning,message:y("findMatchAction.noResults","No matches. Try searching for something else.")});return}let s=e.get(Na),a=new te,l=a.add(s.createInputBox());l.placeholder=y("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let c=d=>{let h=parseInt(d);if(isNaN(h))return;let f=r.getState().matchesCount;if(h>0&&h<=f)return h-1;if(h<0&&h>=-f)return f+h},u=d=>{let h=c(d);if(typeof h=="number"){l.validationMessage=void 0,r.goToMatch(h);let f=r.getState().currentMatch;f&&this.addDecorations(t,f)}else l.validationMessage=y("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue(d=>{u(d)})),a.add(l.onDidAccept(()=>{let d=c(l.value);typeof d=="number"?(r.goToMatch(d),l.hide()):l.validationMessage=y("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)})),a.add(l.onDidHide(()=>{this.clearDecorations(t),a.dispose()})),l.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Tr(Mie),position:Cc.Full}}}])})}},Vue=class extends Fe{async run(e,t){let n=ph.get(t);if(!n)return;let r=XBe(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))}},r3e=class extends Vue{constructor(){super({id:Ir.NextSelectionMatchFindAction,label:y("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},o3e=class extends Vue{constructor(){super({id:Ir.PreviousSelectionMatchFindAction,label:y("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},MCi=LDe(new L7({id:Ir.StartFindReplaceAction,label:y("startReplace","Replace"),alias:"Replace",precondition:me.or(V.focus,me.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:tt.MenubarEditMenu,group:"3_find",title:y({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));MCi.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(92))return!1;let n=ph.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});Tt(ph.ID,ZBe,0);xe($Be);xe(e3e);xe(t3e);xe(i3e);xe(n3e);xe(r3e);xe(o3e);Bv=Sr.bindToContribution(ph.get);Qe(new Bv({id:Ir.CloseFindWidgetCommand,precondition:v1,handler:i=>i.closeFindWidget(),kbOpts:{weight:105,kbExpr:me.and(V.focus,me.not("isComposing")),primary:9,secondary:[1033]}}));Qe(new Bv({id:Ir.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:V.focus,primary:wW.primary,mac:wW.mac,win:wW.win,linux:wW.linux}}));Qe(new Bv({id:Ir.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:105,kbExpr:V.focus,primary:xW.primary,mac:xW.mac,win:xW.win,linux:xW.linux}}));Qe(new Bv({id:Ir.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:105,kbExpr:V.focus,primary:CW.primary,mac:CW.mac,win:CW.win,linux:CW.linux}}));Qe(new Bv({id:Ir.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:105,kbExpr:V.focus,primary:_W.primary,mac:_W.mac,win:_W.win,linux:_W.linux}}));Qe(new Bv({id:Ir.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:105,kbExpr:V.focus,primary:SW.primary,mac:SW.mac,win:SW.win,linux:SW.linux}}));Qe(new Bv({id:Ir.ReplaceOneAction,precondition:v1,handler:i=>i.replace(),kbOpts:{weight:105,kbExpr:V.focus,primary:3094}}));Qe(new Bv({id:Ir.ReplaceOneAction,precondition:v1,handler:i=>i.replace(),kbOpts:{weight:105,kbExpr:me.and(V.focus,yW),primary:3}}));Qe(new Bv({id:Ir.ReplaceAllAction,precondition:v1,handler:i=>i.replaceAll(),kbOpts:{weight:105,kbExpr:V.focus,primary:2563}}));Qe(new Bv({id:Ir.ReplaceAllAction,precondition:v1,handler:i=>i.replaceAll(),kbOpts:{weight:105,kbExpr:me.and(V.focus,yW),primary:void 0,mac:{primary:2051}}}));Qe(new Bv({id:Ir.SelectAllMatchesAction,precondition:v1,handler:i=>i.selectAllMatches(),kbOpts:{weight:105,kbExpr:V.focus,primary:515}}))});var Bxt=D(()=>{});var RCi,zxt,Vg,Vxt,IW,_d,a3e,LW=D(()=>{RCi={0:" ",1:"u",2:"r"},zxt=65535,Vg=16777215,Vxt=4278190080,IW=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1<zxt)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new IW(e.length),this._userDefinedStates=new IW(e.length),this._recoveredStates=new IW(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;nVg||s>Vg)throw new Error("startLineNumber or endLineNumber must not exceed "+Vg);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Vg}getEndLineNumber(e){return this._endIndexes[e]&Vg}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r>>24)+((this._endIndexes[e]&Vxt)>>>16);return t===zxt?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;tArray.isArray(v)?(w=>ww=d.startLineNumber))u&&u.startLineNumber===d.startLineNumber?(d.source===1?v=d:(v=u,v.isCollapsed=d.isCollapsed&&(u.endLineNumber===d.endLineNumber||!r?.startsInside(u.startLineNumber+1,u.endLineNumber+1)),v.source=0),u=s(++l)):(v=d,d.isCollapsed&&d.source===0&&(v.source=2)),d=a(++c);else{let A=c,w=d;for(;;){if(!w||w.startLineNumber>u.endLineNumber){v=u;break}if(w.source===1&&w.endLineNumber>u.endLineNumber)break;w=a(++A)}u=s(++l)}if(v){for(;f&&f.endLineNumberv.startLineNumber&&v.startLineNumber>p&&v.endLineNumber<=n&&(!f||f.endLineNumber>=v.endLineNumber)&&(g.push(v),p=v.startLineNumber,f&&h.push(f),f=v)}}return g}},a3e=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}});function NW(i,e,t){let n=[];for(let r of t){let o=i.getRegionAtLine(r);if(o){let s=!o.isCollapsed;if(n.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&cs.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function Hxt(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function Wxt(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function c3e(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function Wue(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function Uue(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function Uxt(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function jxt(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function Qxt(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex{et();LW();gS();Hue=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new G,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new _d(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;rs&&(s=c),r++}};for(let l of e){let c=l.regionIndex,u=this._editorDecorationIds[c];if(u&&!t[u]){t[u]=!0,a(c);let d=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,d),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;rn&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){let t=[];for(let n=0,r=this._regions.length;n=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;let t=[],n=this._textModel.getLineCount();for(let o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>n)continue;let s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);(!o.checksum||s===o.checksum)&&t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:o.isCollapsed??!0,source:o.source??0})}let r=_d.sanitizeAndMerge(this._regions,t,n);this.updatePost(_d.fromFoldRanges(r))}_getLinesChecksum(e,t){return mS(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s=e.startLineNumber&&i<=e.endLineNumber}function Gxt(i,e){let t=QS(i,n=>e=0&&i[t].endLineNumber>=e?i[t]:null}var jue,qxt=D(()=>{Jf();et();We();zI();jue=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new G,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||Jp(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n0}isHidden(e){return Gxt(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!FCi(s,r))&&(r=Gxt(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function zCi(i,e,t,n=BCi){let r=i.getOptions().tabSize,o=new d3e(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let u=i.getLineContent(c),d=uL(u,r),h=a[a.length-1];if(d===-1){e&&(h.endAbove=c);continue}let f;if(s&&(f=u.match(s)))if(f[1]){let p=a.length-1;for(;p>0&&a[p].indent!==-2;)p--;if(p>0){a.length=p+1,h=a[p],o.insertFirst(c,h.line,d),h.line=c,h.indent=d,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>d){do a.pop(),h=a[a.length-1];while(h.indent>d);let p=h.endAbove-1;p-c>=1&&o.insertFirst(c,p,d)}h.indent===d?h.endAbove=c:a.push({indent:d,endAbove:c,line:c})}return o.toIndentRanges(i)}var OCi,PCi,PN,d3e,BCi,h3e=D(()=>{one();LW();OCi=5e3,PCi="indent",PN=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=PCi}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(zCi(this.editorModel,n,r,this.foldingRangesLimit))}},d3e=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Vg||t>Vg)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new _d(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;lt){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let u=this._startIndexes[l],d=e.getLineContent(u),h=uL(d,o);(h{}}});var VCi,MW,RW,Yxt,Kxt,f3e,$B,Que,Gue,p3e=D(()=>{er();vs();Oe();eo();sp();Zn();Dr();VCi=j("editor.foldBackground",{light:hi(Kw,.3),dark:hi(Kw,.3),hcDark:null,hcLight:null},y("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);j("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},y("collapsedTextColor","Color of the collapsed text after the first line of a folded range."));j("editorGutter.foldingControlForeground",tI,y("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));MW=kn("folding-expanded",Ee.chevronDown,y("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),RW=kn("folding-collapsed",Ee.chevronRight,y("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Yxt=kn("folding-manual-collapsed",RW,y("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),Kxt=kn("folding-manual-expanded",MW,y("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),f3e={color:Tr(VCi),position:1},$B=y("linesCollapsed","Click to expand the range."),Que=y("linesExpanded","Click to collapse the range."),Gue=class i{static{this.COLLAPSED_VISUAL_DECORATION=zt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:$B,firstLineDecorationClassName:ut.asClassName(RW)})}static{this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=zt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f3e,isWholeLine:!0,linesDecorationsTooltip:$B,firstLineDecorationClassName:ut.asClassName(RW)})}static{this.MANUALLY_COLLAPSED_VISUAL_DECORATION=zt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:$B,firstLineDecorationClassName:ut.asClassName(Yxt)})}static{this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=zt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f3e,isWholeLine:!0,linesDecorationsTooltip:$B,firstLineDecorationClassName:ut.asClassName(Yxt)})}static{this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=zt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:$B})}static{this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=zt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f3e,isWholeLine:!0,linesDecorationsTooltip:$B})}static{this.EXPANDED_VISUAL_DECORATION=zt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ut.asClassName(MW),linesDecorationsTooltip:Que})}static{this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=zt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ut.asClassName(MW),linesDecorationsTooltip:Que})}static{this.MANUALLY_EXPANDED_VISUAL_DECORATION=zt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ut.asClassName(Kxt),linesDecorationsTooltip:Que})}static{this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=zt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:ut.asClassName(Kxt),linesDecorationsTooltip:Que})}static{this.NO_CONTROLS_EXPANDED_RANGE_DECORATION=zt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0})}static{this.HIDDEN_RANGE_DECORATION=zt.register({description:"folding-hidden-range-decoration",stickiness:1})}constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}});function UCi(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,HCi,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},ln));return Promise.all(r).then(o=>n)}function jCi(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new m3e(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}var HCi,WCi,BN,m3e,g3e=D(()=>{Lt();ae();LW();HCi={},WCi="syntax",BN=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=WCi,this.disposables=new te,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return UCi(this.providers,this.editorModel,e).then(t=>t?jCi(t,this.foldingRangesLimit):this.fallbackRangeProvider?.compute(e)??null)}dispose(){this.disposables.dispose()}};m3e=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Vg||t>Vg)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;re){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a!1}:{startsInside(e,t){for(let n of i){let r=n.startLineNumber;if(r>=e&&r<=t)return!0}return!1}}}function Jxt(i){if(!Ga(i)){if(!Fo(i))return!1;let e=i;if(!Ga(e.levels)&&!Tp(e.levels)||!Ga(e.direction)&&!Ea(e.direction)||!Ga(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(Tp)))return!1}return!0}var QCi,FW,OW,gu,y1,PW,kc,b3e,v3e,A3e,y3e,w3e,x3e,C3e,_3e,S3e,E3e,D3e,T3e,k3e,que,I3e,L3e,N3e,M3e,R3e,Yue=D(()=>{Jt();sn();Lt();Ep();ae();Pt();gn();Bxt();$L();ii();vn();tr();ks();u3e();qxt();h3e();Oe();Wt();p3e();LW();g3e();_c();Kp();id();Ui();et();Xn();mn();Zc();nr();QCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FW=function(i,e){return function(t,n){e(t,n,i)}},gu=new Pe("foldingEnabled",!1),y1=class extends W{static{OW=this}static{this.ID="editor.contrib.folding"}static get(e){return e.getContribution(OW.ID)}static getFoldingRangeProviders(e,t){let n=e.foldingRangeProvider.ordered(t);return OW._foldingRangeSelector?.(n,t)??n}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new te),this.editor=e,this._foldingLimitReporter=new PW(e);let a=this.editor.getOptions();this._isEnabled=a.get(43),this._useFoldingProviders=a.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(46),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Gue(e),this.foldingDecorationProvider.showFoldingControls=a.get(111),this.foldingDecorationProvider.showFoldingHighlights=a.get(45),this.foldingEnabled=gu.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(47)&&this.onModelChanged(),l.hasChanged(111)||l.hasChanged(45)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(111),this.foldingDecorationProvider.showFoldingHighlights=c.get(45),this.triggerFoldingModelChanged()}l.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),l.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new Hue(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new jue(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new ra(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new di(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new PN(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=OW.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new BN(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new Ar,n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=hr(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let c=o.setCollapsedAllOfType(yA.Imports.value,!0);c&&(s=lf.capture(this.editor),this._currentModelHasFoldedImports=c)}let a=this.editor.getSelections();e.update(o,GCi(a)),s?.restore(this.editor);let l=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=l)}return e})}).then(void 0,e=>(pt(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,pt)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let u=h=>!h.containedBy(s)&&!s.containedBy(h),d=t.getRegionsInside(null,u);for(let h of d)h.isCollapsed&&c.push(h);c.length===0&&(c=d)}else{let u=e.event.middleButton||e.event.shiftKey;if(u)for(let d of t.getRegionsInside(s))d.isCollapsed===a&&c.push(d);(a||!u||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};y1=OW=QCi([FW(1,Ze),FW(2,qi),FW(3,Cn),FW(4,da),FW(5,Le)],y1);PW=class{constructor(e){this.editor=e,this._onDidChange=new G,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},kc=class extends Fe{runEditorCommand(e,t,n){let r=e.get(qi),o=y1.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};b3e=class extends kc{constructor(){super({id:"editor.unfold",label:y("unfoldAction.label","Unfold"),alias:"Unfold",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: +`),parse:i=>GN.split(i).filter(e=>!e.startsWith("#"))})});var qn,g0=D(()=>{qn=class i{static{this.sep="."}static{this.None=new i("@@none@@")}static{this.Empty=new i("")}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+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new i((this.value?[this.value,...e]:e).join(i.sep))}}});var qOe,GOe,Yfi,cue,YOe=D(()=>{fa();qOe={EDITORS:"CodeEditors",FILES:"CodeFiles"},GOe=class{},Yfi={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Qi.add(Yfi.DragAndDropContribution,new GOe);cue=class i{static{this.INSTANCE=new i}constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}});function KOe(i){let e=new u3;for(let t of i.items){let n=t.type;if(t.kind==="string"){let o=new Promise(r=>t.getAsString(r));e.append(n,wU(o))}else if(t.kind==="file"){let o=t.getAsFile();o&&e.append(n,Kfi(o))}}return e}function Kfi(i){let e=i.path?Je.parse(i.path):void 0;return rvt(i.name,e,async()=>new Uint8Array(await i.arrayBuffer()))}function uue(i,e=!1){let t=KOe(i),n=t.get(OE.INTERNAL_URI_LIST);if(n)t.replace(Ko.uriList,n);else if(e||!t.has(Ko.uriList)){let o=[];for(let r of i.items){let s=r.getAsFile();if(s){let a=s.path;try{a?o.push(Je.file(a).toString()):o.push(Je.parse(s.name,!0).toString())}catch{}}}o.length&&t.replace(Ko.uriList,wU(GN.create(o)))}for(let o of Jfi)t.delete(o);return t}var Jfi,JOe=D(()=>{_ne();xU();aE();mn();YOe();Jfi=Object.freeze([qOe.EDITORS,qOe.FILES,OE.RESOURCES,OE.INTERNAL_URI_LIST])});async function avt(i){let e=i.get(Ko.uriList);if(!e)return[];let t=await e.asString(),n=[];for(let o of GN.parse(t))try{n.push({uri:Je.parse(o),originalText:o})}catch{}return n}var ZOe,CU,_U,EC,due,hue,XOe,fue,pue,mue=D(()=>{Wt();xU();g0();de();aE();xl();Nc();mn();ro();Hi();Be();sP();ZOe=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},CU=function(i,e){return function(t,n){e(t,n,i)}},_U=class{async provideDocumentPasteEdits(e,t,n,o,r){let s=await this.getEdit(n,r);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,n,o){let r=await this.getEdit(n,o);if(r)return{edits:[{insertText:r.insertText,title:r.title,kind:r.kind,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}],dispose(){}}}},EC=class i extends _U{constructor(){super(...arguments),this.kind=i.kind,this.dropMimeTypes=[Ko.text],this.pasteMimeTypes=[Ko.text]}static{this.id="text"}static{this.kind=new qn("text.plain")}async getEdit(e,t){let n=e.get(Ko.text);if(!n||e.has(Ko.uriList))return;let o=await n.asString();return{handledMimeType:Ko.text,title:y("text.label","Insert Plain Text"),insertText:o,kind:this.kind}}},due=class extends _U{constructor(){super(...arguments),this.kind=new qn("uri.absolute"),this.dropMimeTypes=[Ko.uriList],this.pasteMimeTypes=[Ko.uriList]}async getEdit(e,t){let n=await avt(e);if(!n.length||t.isCancellationRequested)return;let o=0,r=n.map(({uri:a,originalText:l})=>a.scheme===Vt.file?a.fsPath:(o++,l)).join(" "),s;return o>0?s=n.length>1?y("defaultDropProvider.uriList.uris","Insert Uris"):y("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?y("defaultDropProvider.uriList.paths","Insert Paths"):y("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:Ko.uriList,insertText:r,title:s,kind:this.kind}}},hue=class extends _U{constructor(e){super(),this._workspaceContextService=e,this.kind=new qn("uri.relative"),this.dropMimeTypes=[Ko.uriList],this.pasteMimeTypes=[Ko.uriList]}async getEdit(e,t){let n=await avt(e);if(!n.length||t.isCancellationRequested)return;let o=Sl(n.map(({uri:r})=>{let s=this._workspaceContextService.getWorkspaceFolder(r);return s?Wct(s.uri,r):void 0}));if(o.length)return{handledMimeType:Ko.uriList,insertText:o.join(" "),title:n.length>1?y("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):y("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};hue=ZOe([CU(0,OA)],hue);XOe=class{constructor(){this.kind=new qn("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Ko.text}]}async provideDocumentPasteEdits(e,t,n,o,r){if(o.triggerKind!==vk.PasteAs&&!o.only?.contains(this.kind))return;let a=await n.get("text/html")?.asString();if(!(!a||r.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:y("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}};fue=class extends H{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new EC)),this._register(e.documentDropEditProvider.register("*",new due)),this._register(e.documentDropEditProvider.register("*",new hue(t)))}};fue=ZOe([CU(0,Me),CU(1,OA)],fue);pue=class extends H{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new EC)),this._register(e.documentPasteEditProvider.register("*",new due)),this._register(e.documentPasteEditProvider.register("*",new hue(t))),this._register(e.documentPasteEditProvider.register("*",new XOe))}};pue=ZOe([CU(0,Me),CU(1,OA)],pue)});function lvt(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var $Oe,gD,vu,gue,Em,qN,ePe,tv,SU,d3,_p,bD=D(()=>{$Oe=class i{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),o;if(o=i._table[n],typeof o=="number")return this.pos+=1,{type:o,pos:e,len:1};if(i.isDigitCharacter(n)){o=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:o,pos:e,len:t}}if(i.isVariableCharacter(n)){o=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:o,pos:e,len:t}}o=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]>"u"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:o,pos:e,len:t}}},gD=class{constructor(){this._children=[]}appendChild(e){return e instanceof vu&&this._children[this._children.length-1]instanceof vu?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,o=n.children.indexOf(e),r=n.children.slice(0);r.splice(o,1,...t),n._children=r,(function s(a,l){for(let c of a)c.parent=l,s(c.children,c)})(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof d3)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},vu=class i extends gD{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},gue=class extends gD{},Em=class i extends gue{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof qN?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},qN=class i extends gD{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof vu&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},ePe=class i extends gD{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,o=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(r=>r instanceof tv&&!!r.elseValue)&&(o=this._replace([])),o}_replace(e){let t="";for(let n of this._children)if(n instanceof tv){let o=e[n.index]||"";o=n.resolve(o),t+=o}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},tv=class i extends gD{constructor(e,t,n,o){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=o}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,o)=>o===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},SU=class i extends gue{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new vu(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};d3=class i extends gD{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof Em&&(e.push(n),t=!t||t.indexo===e?(n=!0,!1):(t+=o.len(),!0)),n?t:-1}fullLen(e){let t=0;return lvt([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof Em&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof SU&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){lvt(this.children,e)}},_p=class{constructor(){this._scanner=new $Oe,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let o=new d3;return this.parseFragment(e,o),this.ensureFinalTabstop(o,n??!1,t??!1),o}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let o=new Map,r=[];t.walk(l=>(l instanceof Em&&(l.isFinalTabstop?o.set(0,void 0):!o.has(l.index)&&l.children.length>0?o.set(l.index,l.children):r.push(l)),!0));let s=(l,c)=>{let u=o.get(l.index);if(!u)return;let d=new Em(l.index);d.transform=l.transform;for(let h of u){let f=h.clone();d.appendChild(f),f instanceof Em&&o.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}t.replace(l,[d])},a=new Set;for(let l of r)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(r=>r.index===0)||e.appendChild(new Em(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new vu(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Em(Number(t)):new SU(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let r=new Em(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new vu("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){let s=new qN;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(s),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(t),!1;n.push(o)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new vu(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let r=new SU(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new vu("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseTransform(e){let t=new ePe,n="",o="";for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(6,!0)||r,n+=r;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(5,!0)||this._accept(6,!0)||r,t.appendChild(new vu(r));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,o)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let o=this._accept(8,!0);if(o)if(n){if(this._accept(4))return e.appendChild(new tv(Number(o))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new tv(Number(o))),!0;else return this._backTo(t),!1;if(this._accept(6)){let r=this._accept(9,!0);return!r||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new tv(Number(o),r)),!0)}else if(this._accept(11)){let r=this._until(4);if(r)return e.appendChild(new tv(Number(o),void 0,r,void 0)),!0}else if(this._accept(12)){let r=this._until(4);if(r)return e.appendChild(new tv(Number(o),void 0,void 0,r)),!0}else if(this._accept(13)){let r=this._until(1);if(r){let s=this._until(4);if(s)return e.appendChild(new tv(Number(o),void 0,r,s)),!0}}else{let r=this._until(4);if(r)return e.appendChild(new tv(Number(o),void 0,void 0,r)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new vu(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function bue(i,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(n=>new FE(i,{range:n,text:typeof t.insertText=="string"?_p.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function Aue(i){function e(s,a){return"mimeType"in s?s.mimeType===a.handledMimeType:!!a.kind&&s.kind.contains(a.kind)}let t=new Map;for(let s of i)for(let a of s.yieldTo??[])for(let l of i)if(l!==s&&e(a,l)){let c=t.get(s);c||(c=[],t.set(s,c)),c.push(l)}if(!t.size)return Array.from(i);let n=new Set,o=[];function r(s){if(!s.length)return[];let a=s[0];if(o.includes(a))return console.warn("Yield to cycle detected",a),s;if(n.has(a))return r(s.slice(1));let l=[],c=t.get(a);return c&&(o.push(a),l=r(c),o.pop()),n.add(a),[...l,a,...r(s.slice(1))]}return r(Array.from(i))}var vue=D(()=>{kL();bD()});var cvt=D(()=>{});var Xfi,Zfi,$fi,tPe,h3,yue=D(()=>{Ye();Gt();oo();de();Rt();ko();cvt();Ue();bs();ht();Xfi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Zfi=function(i,e){return function(t,n){e(t,n,i)}},$fi=Ot.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:D$,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),tPe=class i extends H{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,n,o,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(o),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=xe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=xe("span.icon");this.domNode.append(t),t.classList.add(...ut.asClassNameArray(De.loading),"codicon-modifier-spin");let n=()=>{let o=this.editor.getOption(67);this.domNode.style.height=`${o}px`,this.domNode.style.width=`${Math.ceil(.8*o)}px`};n(),this._register(this.editor.onDidChangeConfiguration(o=>{(o.hasChanged(52)||o.hasChanged(67))&&n()})),this._register(ce(this.domNode,Te.CLICK,o=>{this.delegate.cancel()}))}getId(){return i.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)}},h3=class extends H{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Vn),this._currentWidget=this._register(new Vn),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,n,o,r){let s=this._operationIdPool++;this._currentOperation=s,this.clear(),this._showPromise.value=tm(()=>{let a=R.fromPositions(e);this._currentDecorations.set([{range:a,options:$fi}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(tPe,this.id,this._editor,a,t,o))},r??this._showDelay);try{return await n}finally{this._currentOperation===s&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};h3=Xfi([Zfi(2,Re)],h3)});var uvt=D(()=>{});var epi,dvt,wue,yu,tpi,xue,f3=D(()=>{eH();Zl();et();Td();de();uvt();Jt();Ue();Ux();Be();Bt();Dd();Ye();epi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dvt=function(i,e){return function(t,n){e(t,n,i)}},yu=class{static{wue=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new ze("messageVisible",!1,y("messageVisible","Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(wue.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Vn,this._messageListeners=new se,this._mouseOverMessage=!1,this._editor=e,this._visible=wue.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ms(uf(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=uf(e)?LE(e,{actionHandler:{callback:o=>{this.closeMessage(),tH(this._openerService,o,uf(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new xue(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ee.debounce(this._editor.onDidBlurEditorText,(o,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Dr(ds(),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(),Te.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Te.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(o=>{o.target.position&&(n?n.containsPosition(o.target.position)||this.closeMessage():n=new R(t.lineNumber-3,1,o.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(xue.fadeOut(this._messageWidget.value))}};yu=wue=epi([dvt(1,Ze),dvt(2,Qr)],yu);tpi=Eo.bindToContribution(yu.get);Qe(new tpi({id:"leaveEditorMessage",precondition:yu.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:130,primary:9}}));xue=class{static fadeOut(e){let 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},o){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";let r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);let s=document.createElement("div");typeof o=="string"?(s.classList.add("message"),s.textContent=o):(o.classList.add("message"),s.appendChild(o)),this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),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)}};St(yu.ID,yu,4)});function iPe(i,e){return e&&(i.stack||i.stacktrace)?y("stackTrace.format","{0}: {1}",fvt(i),hvt(i.stack)||hvt(i.stacktrace)):fvt(i)}function hvt(i){return Array.isArray(i)?i.join(` +`):i}function fvt(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?y("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||y("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function p3(i=null,e=!1){if(!i)return y("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=Sl(i),n=p3(t[0],e);return t.length>1?y("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(Na(i))return i;if(i.detail){let t=i.detail;if(t.error)return iPe(t.error,e);if(t.exception)return iPe(t.exception,e)}return i.stack?iPe(i,e):i.message?i.message:y("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var nPe=D(()=>{Wt();gn();Be()});var pvt=D(()=>{});var mvt,m3,oPe,rPe,g3,sPe=D(()=>{Ye();ure();il();nPe();Tt();et();de();pvt();kL();vue();Be();Bt();Ed();ht();Xo();Ic();mvt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},m3=function(i,e){return function(t,n){e(t,n,i)}},rPe=class extends H{static{oPe=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,n,o,r,s,a,l,c,u){super(),this.typeId=e,this.editor=t,this.showCommand=o,this.range=r,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=u,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(He(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(He((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(d=>{r.containsPosition(d.position)||this.dispose()})),this._register(Ee.runAndSubscribe(u.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){let e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=xe(".post-edit-widget"),this.button=this._register(new oC(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(ce(this.domNode,Te.CLICK,()=>this.showSelector()))}getId(){return oPe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=bn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Cy({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};rPe=oPe=mvt([m3(7,ia),m3(8,Ze),m3(9,Xt)],rPe);g3=class extends H{constructor(e,t,n,o,r,s,a){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=o,this._instantiationService=r,this._bulkEditService=s,this._notificationService=a,this._currentWidget=this._register(new Vn),this._register(Ee.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,n,o,r){let s=this._editor.getModel();if(!s||!e.length)return;let a=t.allEdits.at(t.activeEditIndex);if(!a)return;let l=async A=>{let v=this._editor.getModel();v&&(await v.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:A,allEdits:t.allEdits},n,o,r))},c=(A,v)=>{Ka(A)||(this._notificationService.error(v),n&&this.show(e[0],t,l))},u;try{u=await o(a,r)}catch(A){return c(A,y("resolveError",`Error resolving edit '{0}': +{1}`,a.title,p3(A)))}if(r.isCancellationRequested)return;let d=bue(s.uri,e,u),h=e[0],f=s.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let p,g;try{p=await this._bulkEditService.apply(d,{editor:this._editor,token:r}),g=s.getDecorationRange(f[0])}catch(A){return c(A,y("applyError",`Error applying edit '{0}': +{1}`,a.title,p3(A)))}finally{s.deltaDecorations(f,[])}r.isCancellationRequested||n&&p.isApplied&&t.allEdits.length>1&&this.show(g??h,t,l)}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(rPe,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};g3=mvt([m3(4,Re),m3(5,Qy),m3(6,_n)],g3)});var ipi,b3,YN,lPe,Cue,aPe,iv,cPe=D(()=>{Ye();Wt();Gt();sn();xU();g0();de();aE();wi();yU();OW();JOe();kL();Ue();ro();Hi();mue();vue();SC();yue();f3();Be();cC();Bt();ht();o0();gf();sPe();Tt();ipi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},b3=function(i,e){return function(t,n){e(t,n,i)}},lPe="editor.changePasteType",Cue=new ze("pasteWidgetVisible",!1,y("pasteWidgetVisible","Whether the paste widget is showing")),aPe="application/vnd.code.copyMetadata",iv=class extends H{static{YN=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(YN.ID)}constructor(e,t,n,o,r,s,a){super(),this._bulkEditService=n,this._clipboardService=o,this._languageFeaturesService=r,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(ce(l,"copy",c=>this.handleCopy(c))),this._register(ce(l,"cut",c=>this.handleCopy(c))),this._register(ce(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new h3("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(g3,"pasteIntoEditor",e,Cue,{id:lPe,label:y("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},Ax().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(!this._editor.hasTextFocus()||(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled()))return;let t=this._editor.getModel(),n=this._editor.getSelections();if(!t||!n?.length)return;let o=this._editor.getOption(37),r=n,s=n.length===1&&n[0].isEmpty();if(s){if(!o)return;r=[new R(r[0].startLineNumber,1,r[0].startLineNumber,1+t.getLineLength(r[0].startLineNumber))]}let a=this._editor._getViewModel()?.getPlainTextToCopy(n,o,Fo),c={multicursorText:Array.isArray(a)?a:null,pasteOnNewLine:s,mode:null},u=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(g=>!!g.prepareDocumentPaste);if(!u.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:c});return}let d=KOe(e.clipboardData),h=u.flatMap(g=>g.copyMimeTypes??[]),f=mD();this.setCopyMetadata(e.clipboardData,{id:f,providerCopyMimeTypes:h,defaultPastePayload:c});let p=mo(async g=>{let A=Sl(await Promise.all(u.map(async v=>{try{return await v.prepareDocumentPaste(t,r,d,g)}catch(w){console.error(w);return}})));A.reverse();for(let v of A)for(let[w,C]of v)d.replace(w,C);return d});YN._currentCopyOperation?.dataTransferPromise.cancel(),YN._currentCopyOperation={handle:f,dataTransferPromise:p}}async handlePaste(e){if(!e.clipboardData||!this._editor.hasTextFocus())return;yu.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;let t=this._editor.getModel(),n=this._editor.getSelections();if(!n?.length||!t||this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;let o=this.fetchCopyMetadata(e),r=uue(e.clipboardData);r.delete(aPe);let s=[...e.clipboardData.types,...o?.providerCopyMimeTypes??[],Ko.uriList],a=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(l=>{let c=this._pasteAsActionContext?.preferred;return c&&l.providedPasteEditKinds&&!this.providerMatchesPreference(l,c)?!1:l.pasteMimeTypes?.some(u=>lue(u,s))});if(!a.length){this._pasteAsActionContext?.preferred&&this.showPasteAsNoEditMessage(n,this._pasteAsActionContext.preferred);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,a,n,r,o):this.doPasteInline(a,n,r,o,e)}showPasteAsNoEditMessage(e,t){yu.get(this._editor)?.showMessage(y("pasteAsError","No paste edits for '{0}' found",t instanceof qn?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,n,o,r){let s=this._editor;if(!s.hasModel())return;let a=new Cp(s,3,void 0),l=mo(async c=>{let u=this._editor;if(!u.hasModel())return;let d=u.getModel(),h=new se,f=h.add(new Mi(c));h.add(a.token.onCancellationRequested(()=>f.cancel()));let p=f.token;try{if(await this.mergeInDataFromCopy(n,o,p),p.isCancellationRequested)return;let g=e.filter(w=>this.isSupportedPasteProvider(w,n));if(!g.length||g.length===1&&g[0]instanceof EC)return this.applyDefaultPasteHandler(n,o,p,r);let A={triggerKind:vk.Automatic},v=await this.getPasteEdits(g,n,d,t,A,p);if(h.add(v),p.isCancellationRequested)return;if(v.edits.length===1&&v.edits[0].provider instanceof EC)return this.applyDefaultPasteHandler(n,o,p,r);if(v.edits.length){let w=u.getOption(85).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:v.edits},w,(C,_)=>new Promise((E,I)=>{(async()=>{try{let T=C.provider.resolveDocumentPasteEdit?.(C,_),N=new em,L=T&&await this._pasteProgressManager.showWhile(t[0].getEndPosition(),y("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([N.p,T]),{cancel:()=>(N.cancel(),I(new qc))},0);return L&&(C.additionalEdit=L.additionalEdit),E(C)}catch(T){return I(T)}})()}),p)}await this.applyDefaultPasteHandler(n,o,p,r)}finally{h.dispose(),this._currentPasteOperation===l&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),y("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),l,{cancel:async()=>{try{if(l.cancel(),a.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(n,o,a.token,r)}finally{a.dispose()}}}).then(()=>{a.dispose()}),this._currentPasteOperation=l}showPasteAsPick(e,t,n,o,r){let s=mo(async a=>{let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),u=new se,d=u.add(new Cp(l,3,void 0,a));try{if(await this.mergeInDataFromCopy(o,r,d.token),d.token.isCancellationRequested)return;let h=t.filter(v=>this.isSupportedPasteProvider(v,o,e));e&&(h=h.filter(v=>this.providerMatchesPreference(v,e)));let f={triggerKind:vk.PasteAs,only:e&&e instanceof qn?e:void 0},p=u.add(await this.getPasteEdits(h,o,c,n,f,d.token));if(d.token.isCancellationRequested)return;if(e&&(p={edits:p.edits.filter(v=>e instanceof qn?e.contains(v.kind):e.providerId===v.provider.id),dispose:p.dispose}),!p.edits.length){f.only&&this.showPasteAsNoEditMessage(n,f.only);return}let g;if(e?g=p.edits.at(0):g=(await this._quickInputService.pick(p.edits.map(w=>({label:w.title,description:w.kind?.value,edit:w})),{placeHolder:y("pasteAsPickerPlaceholder","Select Paste Action")}))?.edit,!g)return;let A=bue(c.uri,n,g);await this._bulkEditService.apply(A,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:y("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(aPe,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;let t=e.clipboardData.getData(aPe);if(t)try{return JSON.parse(t)}catch{return}let[n,o]=Bse.getTextData(e.clipboardData);if(o)return{defaultPastePayload:{mode:o.mode,multicursorText:o.multicursorText??null,pasteOnNewLine:!!o.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,n){if(t?.id&&YN._currentCopyOperation?.handle===t.id){let o=await YN._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(let[r,s]of o)e.replace(r,s)}if(!e.has(Ko.uriList)){let o=await this._clipboardService.readResources();if(n.isCancellationRequested)return;o.length&&e.append(Ko.uriList,wU(GN.create(o)))}}async getPasteEdits(e,t,n,o,r,s){let a=new se,l=await hy(Promise.all(e.map(async u=>{try{let d=await u.provideDocumentPasteEdits?.(n,o,t,r,s);return d&&a.add(d),d?.edits?.map(h=>({...h,provider:u}))}catch(d){Ka(d)||console.error(d);return}})),s),c=Sl(l??[]).flat().filter(u=>!r.only||r.only.contains(u.kind));return{edits:Aue(c),dispose:()=>a.dispose()}}async applyDefaultPasteHandler(e,t,n,o){let s=await(e.get(Ko.text)??e.get("text"))?.asString()??"";if(n.isCancellationRequested)return;let a={clipboardEvent:o,text:s,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",a)}isSupportedPasteProvider(e,t,n){return e.pasteMimeTypes?.some(o=>t.matches(o))?!n||this.providerMatchesPreference(e,n):!1}providerMatchesPreference(e,t){return t instanceof qn?e.providedPasteEditKinds?e.providedPasteEditKinds.some(n=>t.contains(n)):!0:e.id===t.providerId}};iv=YN=ipi([b3(1,Re),b3(2,Qy),b3(3,Ah),b3(4,Me),b3(5,Pa),b3(6,tne)],iv)});function hPe(i){return i.register(),i}function bvt(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let o=t.get(ei).getFocusedCodeEditor();if(o&&o.hasTextFocus()){let r=o.getOption(37),s=o.getSelection();return s&&s.isEmpty()&&!r||o.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(Ax().execCommand(e),!0)))}var KN,npi,gvt,opi,rpi,spi,uPe,dPe,Avt=D(()=>{Kh();Ye();wi();OW();Jt();hs();An();cPe();Be();go();cC();Bt();KN="9_cutcopypaste",npi=Bh||document.queryCommandSupported("cut"),gvt=Bh||document.queryCommandSupported("copy"),opi=typeof navigator.clipboard>"u"||yl?document.queryCommandSupported("paste"):!0;rpi=npi?hPe(new kx({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Bh?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:tt.MenubarEditMenu,group:"2_ccp",title:y({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:tt.EditorContext,group:KN,title:y("actions.clipboard.cutLabel","Cut"),when:V.writable,order:1},{menuId:tt.CommandPalette,group:"",title:y("actions.clipboard.cutLabel","Cut"),order:1},{menuId:tt.SimpleEditorContext,group:KN,title:y("actions.clipboard.cutLabel","Cut"),when:V.writable,order:1}]})):void 0,spi=gvt?hPe(new kx({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Bh?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:tt.MenubarEditMenu,group:"2_ccp",title:y({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:tt.EditorContext,group:KN,title:y("actions.clipboard.copyLabel","Copy"),order:2},{menuId:tt.CommandPalette,group:"",title:y("actions.clipboard.copyLabel","Copy"),order:1},{menuId:tt.SimpleEditorContext,group:KN,title:y("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Xr.appendMenuItem(tt.MenubarEditMenu,{submenu:tt.MenubarCopy,title:Ft("copy as","Copy As"),group:"2_ccp",order:3});Xr.appendMenuItem(tt.EditorContext,{submenu:tt.EditorContextCopy,title:Ft("copy as","Copy As"),group:KN,order:3});Xr.appendMenuItem(tt.EditorContext,{submenu:tt.EditorContextShare,title:Ft("share","Share"),group:"11_share",order:-1,when:ge.and(ge.notEquals("resourceScheme","output"),V.editorTextFocus)});Xr.appendMenuItem(tt.ExplorerContext,{submenu:tt.ExplorerContextShare,title:Ft("share","Share"),group:"11_share",order:-1});uPe=opi?hPe(new kx({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Bh?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:tt.MenubarEditMenu,group:"2_ccp",title:y({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:tt.EditorContext,group:KN,title:y("actions.clipboard.pasteLabel","Paste"),when:V.writable,order:4},{menuId:tt.CommandPalette,group:"",title:y("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:tt.SimpleEditorContext,group:KN,title:y("actions.clipboard.pasteLabel","Paste"),when:V.writable,order:4}]})):void 0,dPe=class extends Pe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:y("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(FW.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),FW.forceCopyWithSyntaxHighlighting=!1)}};bvt(rpi,"cut");bvt(spi,"copy");uPe&&(uPe.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(ei),n=i.get(Ah),o=t.getFocusedCodeEditor();return o&&o.hasTextFocus()?o.getContainerDomNode().ownerDocument.execCommand("paste")?iv.get(o)?.finishedPaste()??Promise.resolve():Cb?(async()=>{let s=await n.readText();if(s!==""){let a=gB.INSTANCE.get(s),l=!1,c=null,u=null;a&&(l=o.getOption(37)&&!!a.isFromEmptySelection,c=typeof a.multicursorText<"u"?a.multicursorText:null,u=a.mode),o.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:u})}})():!0:!1}),uPe.addImplementation(0,"generic-dom",(i,e)=>(Ax().execCommand("paste"),!0)));gvt&&Ce(dPe)});function vvt(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>wvt(e,t,i.include))||!i.includeSourceActions&&bo.Source.contains(e))}function yvt(i,e){let t=e.kind?new qn(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>wvt(t,n,i.include))||!i.includeSourceActions&&t&&bo.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function wvt(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var bo,wu,AD,_ue,vD=D(()=>{Tt();g0();bo=new class{constructor(){this.QuickFix=new qn("quickfix"),this.Refactor=new qn("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new qn("notebook"),this.Source=new qn("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(wu||(wu={}));AD=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.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 qn(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}},_ue=class{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(n){ln(n)}t&&(this.action.edit=t.edit)}return this}}});async function wD(i,e,t,n,o,r){let s=n.filter||{},a={...s,excludes:[...s.excludes||[],bo.Notebook]},l={only:s.include?.value,trigger:n.type},c=new HN(e,r),u=n.type===2,d=api(i,e,u?a:s),h=new se,f=d.map(async g=>{try{o.report(g);let A=await g.provideCodeActions(e,t,l,c.token);if(A&&h.add(A),c.token.isCancellationRequested)return xvt;let v=(A?.actions||[]).filter(C=>C&&yvt(s,C)),w=cpi(g,v,s.include);return{actions:v.map(C=>new _ue(C,g)),documentation:w}}catch(A){if(Ka(A))throw A;return ln(A),xvt}}),p=i.onDidChange(()=>{let g=i.all(e);Zi(g,d)||c.cancel()});try{let g=await Promise.all(f),A=g.map(w=>w.actions).flat(),v=[...Sl(g.map(w=>w.documentation)),...lpi(i,e,n,A)];return new fPe(A,v,h)}finally{p.dispose(),c.dispose()}}function api(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(o=>vvt(t,new qn(o))):!0)}function*lpi(i,e,t,n){if(e&&n.length)for(let o of i.all(e))o._getAdditionalMenuItems&&(yield*o._getAdditionalMenuItems?.({trigger:t.type,only:t.filter?.include?.value},n.map(r=>r.action)))}function cpi(i,e,t){if(!i.documentation)return;let n=i.documentation.map(o=>({kind:new qn(o.kind),command:o.command}));if(t){let o;for(let r of n)r.kind.contains(t)&&(o?o.kind.contains(r.kind)&&(o=r):o=r);if(o)return o?.command}for(let o of e)if(o.kind){for(let r of n)if(r.kind.contains(new qn(o.kind)))return r.command}}async function Cvt(i,e,t,n,o=Nt.None){let r=i.get(Qy),s=i.get(Ii),a=i.get(rr),l=i.get(_n);if(a.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),await e.resolve(o),!o.isCancellationRequested&&!(e.action.edit?.edits.length&&!(await r.apply(e.action.edit,{editor:n?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==yD.OnSave,showPreview:n?.preview})).isApplied)&&e.action.command)try{await s.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){let u=upi(c);l.error(typeof u=="string"?u:y("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function upi(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var Sue,A3,Eue,Due,Tue,EU,DU,fPe,xvt,yD,JN=D(()=>{Wt();sn();Tt();de();mn();kL();Ue();Qn();Hi();su();SC();Be();to();Ic();o0();lh();vD();g0();Sue="editor.action.codeAction",A3="editor.action.quickFix",Eue="editor.action.autoFix",Due="editor.action.refactor",Tue="editor.action.sourceAction",EU="editor.action.organizeImports",DU="editor.action.fixAll",fPe=class i extends H{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:Kr(e.diagnostics)?Kr(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Kr(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:o})=>!o.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&bo.QuickFix.contains(new qn(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}},xvt={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions",i.FromAILightbulb="fromAILightbulb"})(yD||(yD={}));ii.registerCommand("_executeCodeActionProvider",async function(i,e,t,n,o){if(!(e instanceof Je))throw mc();let{codeActionProvider:r}=i.get(Me),s=i.get(an).getModel(e);if(!s)throw mc();let a=qe.isISelection(t)?qe.liftSelection(t):R.isIRange(t)?s.validateRange(t):void 0;if(!a)throw mc();let l=typeof n=="string"?new qn(n):void 0,c=await wD(r,s,a,{type:1,triggerAction:wu.Default,filter:{includeSourceActions:!0,include:l}},up.None,Nt.None),u=[],d=Math.min(c.validActions.length,typeof o=="number"?o:0);for(let h=0;hh.action)}finally{setTimeout(()=>c.dispose(),100)}})});var dpi,hpi,pPe,kue,_vt=D(()=>{g0();CA();JN();vD();Xo();dpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},hpi=function(i,e){return function(t,n){e(t,n,i)}},kue=class{static{pPe=this}static{this.codeActionCommands=[Due,Sue,Tue,EU,DU]}constructor(e){this.keybindingService=e}getResolver(){let e=new $s(()=>this.keybindingService.getKeybindings().filter(t=>pPe.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===EU?n={kind:bo.SourceOrganizeImports.value}:t.command===DU&&(n={kind:bo.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...AD.fromUser(n,{kind:qn.None,apply:"never"})}}));return t=>{if(t.kind)return this.bestKeybindingForCodeAction(t,e.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new qn(e.kind);return t.filter(o=>o.kind.contains(n)).filter(o=>o.preferred?e.isPreferred:!0).reduceRight((o,r)=>o?o.kind.contains(r.kind)?r:o:r,void 0)}};kue=pPe=dpi([hpi(0,Xt)],kue)});var Svt=D(()=>{});var Evt=D(()=>{});var TU=D(()=>{Svt();Evt()});var Dvt=D(()=>{});var nqn,oqn,rqn,sqn,aqn,lqn,cqn,uqn,dqn,hqn,fqn,pqn,mqn,gqn,bqn,Aqn,vqn,yqn,wqn,xqn,Cqn,_qn,Sqn,Eqn,Dqn,Tqn,kqn,Iqn,Lqn,Nqn,Mqn,Rqn,Fqn,Iue=D(()=>{Dvt();Be();nr();nqn=j("symbolIcon.arrayForeground",xi,y("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oqn=j("symbolIcon.booleanForeground",xi,y("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rqn=j("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},y("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sqn=j("symbolIcon.colorForeground",xi,y("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),aqn=j("symbolIcon.constantForeground",xi,y("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lqn=j("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cqn=j("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},y("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uqn=j("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dqn=j("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},y("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hqn=j("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fqn=j("symbolIcon.fileForeground",xi,y("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pqn=j("symbolIcon.folderForeground",xi,y("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mqn=j("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gqn=j("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bqn=j("symbolIcon.keyForeground",xi,y("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Aqn=j("symbolIcon.keywordForeground",xi,y("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vqn=j("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},y("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yqn=j("symbolIcon.moduleForeground",xi,y("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wqn=j("symbolIcon.namespaceForeground",xi,y("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xqn=j("symbolIcon.nullForeground",xi,y("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Cqn=j("symbolIcon.numberForeground",xi,y("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_qn=j("symbolIcon.objectForeground",xi,y("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sqn=j("symbolIcon.operatorForeground",xi,y("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Eqn=j("symbolIcon.packageForeground",xi,y("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Dqn=j("symbolIcon.propertyForeground",xi,y("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tqn=j("symbolIcon.referenceForeground",xi,y("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kqn=j("symbolIcon.snippetForeground",xi,y("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Iqn=j("symbolIcon.stringForeground",xi,y("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Lqn=j("symbolIcon.structForeground",xi,y("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Nqn=j("symbolIcon.textForeground",xi,y("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mqn=j("symbolIcon.typeParameterForeground",xi,y("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rqn=j("symbolIcon.unitForeground",xi,y("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Fqn=j("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},y("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function kvt(i,e,t){if(!e)return i.map(r=>({kind:"action",item:r,group:Tvt,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!r.action.edit?.edits.length}));let n=fpi.map(r=>({group:r,actions:[]}));for(let r of i){let s=r.action.kind?new qn(r.action.kind):qn.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(r);break}}let o=[];for(let r of n)if(r.actions.length){o.push({kind:"header",group:r.group});for(let s of r.actions){let a=r.group;o.push({kind:"action",item:s,group:s.action.isAI?{title:a.title,kind:a.kind,icon:De.sparkle}:a,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}}return o}var Tvt,fpi,Ivt=D(()=>{TU();oo();vD();Iue();Be();g0();Tvt=Object.freeze({kind:qn.Empty,title:y("codeAction.widget.id.more","More Actions...")}),fpi=Object.freeze([{kind:bo.QuickFix,title:y("codeAction.widget.id.quickfix","Quick Fix")},{kind:bo.RefactorExtract,title:y("codeAction.widget.id.extract","Extract"),icon:De.wrench},{kind:bo.RefactorInline,title:y("codeAction.widget.id.inline","Inline"),icon:De.wrench},{kind:bo.RefactorRewrite,title:y("codeAction.widget.id.convert","Rewrite"),icon:De.wrench},{kind:bo.RefactorMove,title:y("codeAction.widget.id.move","Move"),icon:De.wrench},{kind:bo.SurroundWith,title:y("codeAction.widget.id.surround","Surround With"),icon:De.surroundWith},{kind:bo.Source,title:y("codeAction.widget.id.source","Source Action"),icon:De.symbolFile},Tvt])});var Lvt=D(()=>{});var ppi,mpi,v3,Nvt,Mvt,Rvt,Fvt,Ovt,nv,XN,mPe=D(()=>{Ye();cp();oo();et();de();ko();Lvt();ol();bs();Doe();JN();Be();Xo();Ap();Ue();ppi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},mpi=function(i,e){return function(t,n){e(t,n,i)}},Nvt=Ln("gutter-lightbulb",De.lightBulb,y("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),Mvt=Ln("gutter-lightbulb-auto-fix",De.lightbulbAutofix,y("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),Rvt=Ln("gutter-lightbulb-sparkle",De.lightbulbSparkle,y("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),Fvt=Ln("gutter-lightbulb-aifix-auto-fix",De.lightbulbSparkleAutofix,y("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),Ovt=Ln("gutter-lightbulb-sparkle-filled",De.sparkleFilled,y("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));(function(i){i.Hidden={type:0};class e{constructor(n,o,r,s){this.actions=n,this.trigger=o,this.editorPosition=r,this.widgetPosition=s,this.type=1}}i.Showing=e})(nv||(nv={}));XN=class extends H{static{v3=this}static{this.GUTTER_DECORATION=Ot.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:ut.asClassName(De.lightBulb),glyphMargin:{position:qu.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new q),this.onClick=this._onClick.event,this._state=nv.Hidden,this._gutterState=nv.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+Nvt.id,"codicon-"+Fvt.id,"codicon-"+Mvt.id,"codicon-"+Rvt.id,"codicon-"+Ovt.id],this.gutterDecoration=v3.GUTTER_DECORATION,this._domNode=xe("div.lightBulbWidget"),this._domNode.role="listbox",this._register(Lr.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let o=this._editor.getModel();(this.state.type!==1||!o||this.state.editorPosition.lineNumber>=o.getLineCount())&&this.hide(),(this.gutterState.type!==1||!o||this.gutterState.editorPosition.lineNumber>=o.getLineCount())&&this.gutterHide()})),this._register(hot(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:o,height:r}=bn(this._domNode),s=this._editor.getOption(67),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(Ee.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(Eue)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(A3)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async n=>{if(!n.target.element||!this.lightbulbClasses.some(l=>n.target.element&&n.target.element.classList.contains(l))||this.gutterState.type!==1)return;this._editor.focus();let{top:o,height:r}=bn(n.target.element),s=this._editor.getOption(67),a=Math.floor(s/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber22,p=E=>E>2&&this._editor.getTopForLineNumber(E)===this._editor.getTopForLineNumber(E-1),g=this._editor.getLineDecorations(a),A=!1;if(g)for(let E of g){let I=E.options.glyphMarginClassName;if(I&&!this.lightbulbClasses.some(T=>I.includes(T))){A=!0;break}}let v=a,w=1;if(!f){let E=I=>{let T=s.getLineContent(I);return/^\s*$|^\s+/.test(T)||T.length<=w};if(a>1&&!p(a-1)){let I=s.getLineCount(),T=a===I,N=a>1&&E(a-1),L=!T&&E(a+1),B=E(a),z=!L&&!N;if(!L&&!N&&!A)return this.gutterState=new nv.Showing(e,t,n,{position:{lineNumber:v,column:w},preference:v3._posPref}),this.renderGutterLightbub(),this.hide();N||T||N&&!B?v-=1:(L||z&&B)&&(v+=1)}else if(a===1&&(a===s.getLineCount()||!E(a+1)&&!E(a)))if(this.gutterState=new nv.Showing(e,t,n,{position:{lineNumber:v,column:w},preference:v3._posPref}),A)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(a{this._gutterDecorationID=t.addDecoration(new R(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(t=>{t.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,t){this._editor.changeDecorations(n=>{n.changeDecoration(e,new R(t,0,t,0)),n.changeDecorationOptions(e,this.gutterDecoration)})}_updateLightbulbTitle(e,t){this.state.type===1&&(t?this.title=y("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=y("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=y("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=y("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};XN=v3=ppi([mpi(1,Xt)],XN)});var gPe=D(()=>{});function gpi(i){if(i.kind==="action")return i.label}function Bvt(i){return i.replace(/\r\n|\r|\n/g," ")}var Pvt,bPe,wPe,xPe,APe,vPe,yPe,Lue,Nue,zvt=D(()=>{Ye();gW();Kx();sn();oo();de();wi();ko();gPe();Be();Ed();Xo();i1();nr();Pvt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bPe=function(i,e){return function(t,n){e(t,n,i)}},wPe="acceptSelectedCodeAction",xPe="previewSelectedCodeAction",APe=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){n.text.textContent=e.group?.title??""}disposeTemplate(e){}},vPe=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let o=new y1(e,Ja);return{container:e,icon:t,text:n,keybinding:o}}renderElement(e,t,n){if(e.group?.icon?(n.icon.className=ut.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=it(e.group.icon.color.id))):(n.icon.className=ut.asClassName(De.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=Bvt(e.label),n.keybinding.set(e.keybinding),_ot(!!e.keybinding,n.keybinding.element);let o=this._keybindingService.lookupKeybinding(wPe)?.getLabel(),r=this._keybindingService.lookupKeybinding(xPe)?.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&r?this._supportsPreview&&e.canPreview?n.container.title=y({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",o,r):n.container.title=y({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",o):n.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};vPe=Pvt([bPe(1,Xt)],vPe);yPe=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Lue=class extends UIEvent{constructor(){super("previewSelectedAction")}};Nue=class extends H{constructor(e,t,n,o,r,s){super(),this._delegate=o,this._contextViewService=r,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Mi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new rl(e,this.domNode,a,[new vPe(t,this._keybindingService),new APe],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:gpi},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?Bvt(l?.label):"";return l.disabled&&(c=y({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>y({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Jx),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(l=>l.kind==="header").length,o=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(o);let r=e;if(this._allMenuItems.length>=50)r=380;else{let l=this._allMenuItems.map((c,u)=>{let d=this.domNode.ownerDocument.getElementById(this._list.getElementID(u));if(d){d.style.width="auto";let h=d.getBoundingClientRect().width;return d.style.width="",h}return 0});r=Math.max(...l,e)}let a=Math.min(o,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,r),this.domNode.style.height=`${a}px`,this._list.domFocus(),r}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],o=this._list.element(n);if(!this.focusCondition(o))return;let r=e?new Lue:new yPe;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Lue):this._list.setSelection([])}onFocus(){let e=this._list.getFocus();if(e.length===0)return;let t=e[0],n=this._list.element(t);this._delegate.onFocus?.(n.item)}async onListHover(e){let t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){let n=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Nue=Pvt([bPe(4,hh),bPe(5,Xt)],Nue)});var bpi,CPe,ZN,xD,$N,kU,Vvt=D(()=>{Ye();Hg();de();gPe();Be();zvt();go();Bt();Ed();Dc();ht();nr();bpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},CPe=function(i,e){return function(t,n){e(t,n,i)}};j("actionBar.toggledBackground",wx,y("actionBar.toggledBackground","Background color for toggled action items in action bar."));ZN={Visible:new ze("codeActionMenuVisible",!1,y("codeActionMenuVisible","Whether the action widget list is visible"))},xD=At("actionWidgetService"),$N=class extends H{get isVisible(){return ZN.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Vn)}show(e,t,n,o,r,s,a){let l=ZN.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Nue,e,t,n,o);this._contextViewService.showContextView({getAnchor:()=>r,render:u=>(l.set(!0),this._renderWidget(u,c,a??[])),onHide:u=>{l.reset(),this._onWidgetClosed(u)}},s,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,n){let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let r=new se,s=document.createElement("div"),a=e.appendChild(s);a.classList.add("context-view-block"),r.add(ce(a,Te.MOUSE_DOWN,f=>f.stopPropagation()));let l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),r.add(ce(c,Te.POINTER_MOVE,()=>c.remove())),r.add(ce(c,Te.MOUSE_DOWN,()=>c.remove()));let u=0;if(n.length){let f=this._createActionBar(".action-widget-action-bar",n);f&&(o.appendChild(f.getContainer().parentElement),r.add(f),u=f.getContainer().offsetWidth)}let d=this._list.value?.layout(u);o.style.width=`${d}px`;let h=r.add(iu(e));return r.add(h.onDidBlur(()=>this.hide(!0))),r}_createActionBar(e,t){if(!t.length)return;let n=xe(e),o=new Ps(n);return o.push(t,{icon:!1,label:!0}),o}_onWidgetClosed(e){this._list.value?.hide(e)}};$N=bpi([CPe(0,hh),CPe(1,Ze),CPe(2,Re)],$N);oi(xD,$N,1);kU=1100;Hn(class extends ma{constructor(){super({id:"hideCodeActionWidget",title:Ft("hideCodeActionWidget.title","Hide action widget"),precondition:ZN.Visible,keybinding:{weight:kU,primary:9,secondary:[1033]}})}run(i){i.get(xD).hide(!0)}});Hn(class extends ma{constructor(){super({id:"selectPrevCodeAction",title:Ft("selectPrevCodeAction.title","Select previous action"),precondition:ZN.Visible,keybinding:{weight:kU,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(xD);e instanceof $N&&e.focusPrevious()}});Hn(class extends ma{constructor(){super({id:"selectNextCodeAction",title:Ft("selectNextCodeAction.title","Select next action"),precondition:ZN.Visible,keybinding:{weight:kU,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(xD);e instanceof $N&&e.focusNext()}});Hn(class extends ma{constructor(){super({id:wPe,title:Ft("acceptSelected.title","Accept selected action"),precondition:ZN.Visible,keybinding:{weight:kU,primary:3,secondary:[2137]}})}run(i){let e=i.get(xD);e instanceof $N&&e.acceptSelected()}});Hn(class extends ma{constructor(){super({id:xPe,title:Ft("previewSelected.title","Preview selected action"),precondition:ZN.Visible,keybinding:{weight:kU,primary:2051}})}run(i){let e=i.get(xD);e instanceof $N&&e.acceptSelected(!0)}})});var SPe,Hvt,_Pe,e2,Wvt,Mue,EPe=D(()=>{Gt();Tt();et();de();Nc();ea();kt();Qn();Bt();o0();vD();JN();g0();cd();SPe=new ze("supportedCodeAction",""),Hvt="_typescript.applyFixAllCodeAction",_Pe=class extends H{constructor(e,t,n,o=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=o,this._autoTriggerTimer=this._register(new ha),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>Hx(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:wu.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getSelection();if(e.type===1)return t;let n=this._editor.getOption(65).enabled;if(n!==Eg.Off){{if(n===Eg.On)return t;if(n===Eg.OnCode){if(!t.isEmpty())return t;let r=this._editor.getModel(),{lineNumber:s,column:a}=t.getPosition(),l=r.getLineContent(s);if(l.length===0)return;if(a===1){if(/\s/.test(l[0]))return}else if(a===r.getLineMaxColumn(s)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[a-2])&&/\s/.test(l[a-1]))return}}return t}}};(function(i){i.Empty={type:0};class e{constructor(n,o,r){this.trigger=n,this.position=o,this._cancellablePromise=r,this.type=1,this.actions=r.catch(s=>{if(Ka(s))return Wvt;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(e2||(e2={}));Wvt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1}),Mue=class extends H{constructor(e,t,n,o,r,s,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=s,this._telemetryService=a,this._codeActionOracle=this._register(new Vn),this._state=e2.Empty,this._onDidChangeState=this._register(new q),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=SPe.bindTo(o),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(e2.Empty,!0))}_settingEnabledNearbyQuickfixes(){let e=this._editor?.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(e2.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){let t=this._registry.all(e).flatMap(n=>n.providedCodeActionKinds??[]);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new _Pe(this._editor,this._markerService,n=>{if(!n){this.setState(e2.Empty);return}let o=n.selection.getStartPosition(),r=mo(async l=>{if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===wu.QuickFix||n.trigger.filter?.include?.contains(bo.QuickFix))){let c=await wD(this._registry,e,n.selection,n.trigger,up.None,l),u=[...c.allActions];if(l.isCancellationRequested)return Wvt;let d=c.validActions?.some(f=>f.action.kind?bo.QuickFix.contains(new qn(f.action.kind)):!1),h=this._markerService.read({resource:e.uri});if(d){for(let f of c.validActions)f.action.command?.arguments?.some(p=>typeof p=="string"&&p.includes(Hvt))&&(f.action.diagnostics=[...h.filter(p=>p.relatedInformation)]);return{validActions:c.validActions,allActions:u,documentation:c.documentation,hasAutoFix:c.hasAutoFix,hasAIFix:c.hasAIFix,allAIFixes:c.allAIFixes,dispose:()=>{c.dispose()}}}else if(!d&&h.length>0){let f=n.selection.getPosition(),p=f,g=Number.MAX_VALUE,A=[...c.validActions];for(let w of h){let C=w.endColumn,_=w.endLineNumber,E=w.startLineNumber;if(_===f.lineNumber||E===f.lineNumber){p=new J(_,C);let I={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:n.trigger.filter?.include?n.trigger.filter?.include:bo.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:n.trigger.context?.notAvailableMessage||"",position:p}},T=new qe(p.lineNumber,p.column,p.lineNumber,p.column),N=await wD(this._registry,e,T,I,up.None,l);if(N.validActions.length!==0){for(let L of N.validActions)L.action.command?.arguments?.some(B=>typeof B=="string"&&B.includes(Hvt))&&(L.action.diagnostics=[...h.filter(B=>B.relatedInformation)]);c.allActions.length===0&&u.push(...N.allActions),Math.abs(f.column-C)_.findIndex(E=>E.action.title===w.action.title)===C);return v.sort((w,C)=>w.action.isPreferred&&!C.action.isPreferred?-1:!w.action.isPreferred&&C.action.isPreferred||w.action.isAI&&!C.action.isAI?1:!w.action.isAI&&C.action.isAI?-1:0),{validActions:v,allActions:u,documentation:c.documentation,hasAutoFix:c.hasAutoFix,hasAIFix:c.hasAIFix,allAIFixes:c.allAIFixes,dispose:()=>{c.dispose()}}}}if(n.trigger.type===1){let c=new xo,u=await wD(this._registry,e,n.selection,n.trigger,up.None,l);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:u.validActions.length,duration:c.elapsed()}),u}return wD(this._registry,e,n.selection,n.trigger,up.None,l)});n.trigger.type===1&&this._progressService?.showWhile(r,250);let s=new e2.Triggered(n.trigger,o,r),a=!1;this._state.type===1&&(a=this._state.trigger.type===1&&s.type===1&&s.trigger.type===2&&this._state.position!==s.position),a?setTimeout(()=>{this.setState(s)},500):this.setState(s)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:wu.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.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 Api,I1,y3,vpi,DC,Rue=D(()=>{Ye();Zl();Tt();CA();de();kt();bs();Hi();JN();_vt();Ivt();mPe();f3();Be();Vvt();to();ao();Bt();ht();o1();o0();nr();Jb();io();vD();EPe();g0();lh();Api=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},I1=function(i,e){return function(t,n){e(t,n,i)}},vpi="quickfix-edit-highlight",DC=class extends H{static{y3=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(y3.ID)}constructor(e,t,n,o,r,s,a,l,c,u,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=u,this._telemetryService=d,this._activeCodeActions=this._register(new Vn),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Mue(this._editor,r.codeActionProvider,t,n,s,l,this._telemetryService)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new $s(()=>{let h=this._editor.getContribution(XN.ID);return h&&this._register(h.onClick(f=>this.showCodeActionsFromLightbulb(f.actions,f))),h}),this._resolver=o.createInstance(kue),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){let n=e.validActions[0],o=n.action.command;o&&o.id==="inlineChat.start"&&o.arguments&&o.arguments.length>=1&&(o.arguments[0]={...o.arguments[0],autoSend:!1}),await this._applyCodeAction(n,!1,!1,yD.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,o){if(!this._editor.hasModel())return;yu.get(this._editor)?.closeMessage();let r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:o,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,n,o){try{await this._instantiationService.invokeFunction(Cvt,e,o,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:wu.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(e.type!==1){this.hideLightBulbWidget();return}let t;try{t=await e.actions}catch(o){ft(o);return}if(!(this._disposed||this._editor.getSelection()?.startLineNumber!==e.position.lineNumber))if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),e.trigger.type===1){if(e.trigger.filter?.include){let r=this.tryGetValidActionToApply(e.trigger,t);if(r){try{this.hideLightBulbWidget(),await this._applyCodeAction(r,!1,!1,yD.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){let s=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(s&&s.action.disabled){yu.get(this._editor)?.showMessage(s.action.disabled,e.trigger.context.position),t.dispose();return}}}let o=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!o&&!t.validActions.length)){yu.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,t.dispose();return}this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:o,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}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]}static{this.DECORATION=Ot.register({description:"quickfix-highlight",className:vpi})}async showCodeActionList(e,t,n){let o=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;let s=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!s.length)return;let a=J.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(c,u)=>{this._applyCodeAction(c,!0,!!u,n.fromLightbulb?yD.FromAILightbulb:yD.FromCodeActions),this._actionWidgetService.hide(!1),o.clear()},onHide:c=>{this._editor?.focus(),o.clear()},onHover:async(c,u)=>{if(u.isCancellationRequested)return;let d=!1,h=c.action.kind;if(h){let f=new qn(h);d=[bo.RefactorExtract,bo.RefactorInline,bo.RefactorRewrite,bo.RefactorMove,bo.Source].some(g=>g.contains(f))}return{canPreview:d||!!c.action.edit?.edits.length}},onFocus:c=>{if(c&&c.action){let u=c.action.ranges,d=c.action.diagnostics;if(o.clear(),u&&u.length>0){let h=d&&d?.length>1?d.map(f=>({range:f,options:y3.DECORATION})):u.map(f=>({range:f,options:y3.DECORATION}));o.set(h)}else if(d&&d.length>0){let h=d.map(p=>({range:p,options:y3.DECORATION}));o.set(h);let f=d[0];if(f.startLineNumber&&f.startColumn){let p=this._editor.getModel()?.getWordAtPosition({lineNumber:f.startLineNumber,column:f.startColumn})?.word;kd(y("editingNewSelection","Context: {0} at line {1} and column {2}.",p,f.startLineNumber,f.startColumn))}}}else o.clear()}};this._actionWidgetService.show("codeActionWidget",!0,kvt(s,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,r,this._getActionBarActions(e,t,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=bn(this._editor.getDomNode()),o=n.left+t.left,r=n.top+t.top+t.height;return{x:o,y:r}}_shouldShowHeaders(){let e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let o=e.documentation.map(r=>({id:r.id,label:r.title,tooltip:r.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(r.id,...r.arguments??[])}));return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&o.push(this._showDisabled?{id:"hideMoreActions",label:y("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:y("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),o}};DC=y3=Api([I1(1,pf),I1(2,Ze),I1(3,Re),I1(4,Me),I1(5,dp),I1(6,Ii),I1(7,Et),I1(8,xD),I1(9,Re),I1(10,rr)],DC);ba((i,e)=>{((o,r)=>{r&&e.addRule(`.monaco-editor ${o} { background-color: ${r}; }`)})(".quickfix-edit-highlight",i.getColor(Cg));let n=i.getColor(qb);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${ju(i.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)})});function IU(i){return ge.regex(SPe.keys()[0],new RegExp("(\\s|^)"+$a(i.value)+"\\b"))}function t2(i,e,t,n,o=wu.Default){i.hasModel()&&DC.get(i)?.manualTriggerAtCurrentPosition(e,o,t,n)}var DPe,Fue,Oue,Pue,Bue,zue,Vue,Hue,Uvt=D(()=>{g0();Rt();Jt();An();JN();Be();Bt();vD();Rue();EPe();DPe={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:y("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:y("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[y("args.schema.apply.first","Always apply the first returned code action."),y("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),y("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:y("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};Fue=class extends Pe{constructor(){super({id:A3,label:y("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ge.and(V.writable,V.hasCodeActionsProvider),kbOpts:{kbExpr:V.textInputFocus,primary:2137,weight:100}})}run(e,t){return t2(t,y("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,wu.QuickFix)}},Oue=class extends Eo{constructor(){super({id:Sue,precondition:ge.and(V.writable,V.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:DPe}]}})}runEditorCommand(e,t,n){let o=AD.fromUser(n,{kind:qn.Empty,apply:"ifSingle"});return t2(t,typeof n?.kind=="string"?o.preferred?y("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):y("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):o.preferred?y("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):y("editor.action.codeAction.noneMessage","No code actions available"),{include:o.kind,includeSourceActions:!0,onlyIncludePreferredActions:o.preferred},o.apply)}},Pue=class extends Pe{constructor(){super({id:Due,label:y("refactor.label","Refactor..."),alias:"Refactor...",precondition:ge.and(V.writable,V.hasCodeActionsProvider),kbOpts:{kbExpr:V.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ge.and(V.writable,IU(bo.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:DPe}]}})}run(e,t,n){let o=AD.fromUser(n,{kind:bo.Refactor,apply:"never"});return t2(t,typeof n?.kind=="string"?o.preferred?y("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):y("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):o.preferred?y("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):y("editor.action.refactor.noneMessage","No refactorings available"),{include:bo.Refactor.contains(o.kind)?o.kind:qn.None,onlyIncludePreferredActions:o.preferred},o.apply,wu.Refactor)}},Bue=class extends Pe{constructor(){super({id:Tue,label:y("source.label","Source Action..."),alias:"Source Action...",precondition:ge.and(V.writable,V.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ge.and(V.writable,IU(bo.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:DPe}]}})}run(e,t,n){let o=AD.fromUser(n,{kind:bo.Source,apply:"never"});return t2(t,typeof n?.kind=="string"?o.preferred?y("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):y("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):o.preferred?y("editor.action.source.noneMessage.preferred","No preferred source actions available"):y("editor.action.source.noneMessage","No source actions available"),{include:bo.Source.contains(o.kind)?o.kind:qn.None,includeSourceActions:!0,onlyIncludePreferredActions:o.preferred},o.apply,wu.SourceAction)}},zue=class extends Pe{constructor(){super({id:EU,label:y("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ge.and(V.writable,IU(bo.SourceOrganizeImports)),kbOpts:{kbExpr:V.textInputFocus,primary:1581,weight:100}})}run(e,t){return t2(t,y("editor.action.organize.noneMessage","No organize imports action available"),{include:bo.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",wu.OrganizeImports)}},Vue=class extends Pe{constructor(){super({id:DU,label:y("fixAll.label","Fix All"),alias:"Fix All",precondition:ge.and(V.writable,IU(bo.SourceFixAll))})}run(e,t){return t2(t,y("fixAll.noneMessage","No fix all action available"),{include:bo.SourceFixAll,includeSourceActions:!0},"ifSingle",wu.FixAll)}},Hue=class extends Pe{constructor(){super({id:Eue,label:y("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ge.and(V.writable,IU(bo.QuickFix)),kbOpts:{kbExpr:V.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return t2(t,y("editor.action.autoFix.noneMessage","No auto fixes available"),{include:bo.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",wu.AutoFix)}}});var jvt=D(()=>{Jt();qie();Uvt();Rue();mPe();Be();Dy();fa();St(DC.ID,DC,3);St(XN.ID,XN,4);Ce(Fue);Ce(Pue);Ce(Bue);Ce(zue);Ce(Hue);Ce(Vue);Qe(new Oue);Qi.as(Tc.Configuration).registerConfiguration({...IL,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:y("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});Qi.as(Tc.Configuration).registerConfiguration({...IL,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:y("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});Qi.as(Tc.Configuration).registerConfiguration({...IL,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:y("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}})});async function TPe(i,e,t){let n=i.ordered(e),o=new Map,r=new w3,s=n.map(async(a,l)=>{o.set(a,l);try{let c=await Promise.resolve(a.provideCodeLenses(e,t));c&&r.add(c,a)}catch(c){ln(c)}});return await Promise.all(s),r.lenses=r.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:o.get(a.provider)o.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),r}var w3,kPe=D(()=>{sn();Tt();de();gn();mn();su();to();Hi();w3=class{constructor(){this.lenses=[],this._disposables=new se}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};ii.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;gi(Je.isUri(t)),gi(typeof n=="number"||!n);let{codeLensProvider:o}=i.get(Me),r=i.get(an).getModel(t);if(!r)throw mc();let s=[],a=new se;return TPe(o,r,Nt.None).then(l=>{a.add(l);let c=[];for(let u of l.lenses)n==null||u.symbol.command?s.push(u.symbol):n-- >0&&u.provider.resolveCodeLens&&c.push(Promise.resolve(u.provider.resolveCodeLens(r,u.symbol,Nt.None)).then(d=>s.push(d||u.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var ypi,wpi,LPe,Wue,IPe,Qvt=D(()=>{et();Xl();Ue();kPe();Dc();ht();VA();gd();Ye();ypi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},wpi=function(i,e){return function(t,n){e(t,n,i)}},LPe=At("ICodeLensCache"),Wue=class{constructor(e,t){this.lineCount=e,this.data=t}},IPe=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Jl(20,.75);let t="codelens/cache";TI(Xi,()=>e.remove(t,1));let n="codelens/cache2",o=e.get(n,1,"{}");this._deserialize(o);let r=Ee.filter(e.onWillSaveState,s=>s.reason===zE.SHUTDOWN);Ee.once(r)(s=>{e.store(n,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(s=>({range:s.symbol.range,command:s.symbol.command&&{id:"",title:s.symbol.command?.title}})),o=new w3;o.add({lenses:n,dispose:()=>{}},this._fakeProvider);let r=new Wue(e.getLineCount(),o);this._cache.set(e.uri.toString(),r)}get(e){let 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(){let e=Object.create(null);for(let[t,n]of this._cache){let o=new Set;for(let r of n.data.lenses)o.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...o.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let n in t){let o=t[n],r=[];for(let a of o.lines)r.push({range:new R(a,1,a,11)});let s=new w3;s.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new Wue(o.lineCount,s))}}catch{}}};IPe=ypi([wpi(0,oc)],IPe);oi(LPe,IPe,1)});var Gvt=D(()=>{});var NPe,MPe,x3,qvt,LU,Yvt=D(()=>{Ye();Vx();Gvt();Ue();bs();NPe=class{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")}},MPe=class i{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${i._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();let n=[],o=!1;for(let r=0;r{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:qvt},d=>this._decorationIds[u]=d),a?a=R.plusRange(a,c.symbol.range):a=R.lift(c.symbol.range)}),this._viewZone=new NPe(a.startLineNumber-1,r,s),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new MPe(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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)=>{let n=this._editor.getModel().getDecorationRange(e),o=this._data[t].symbol;return!!(n&&R.isEmpty(o.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,o)=>{t.addDecoration({range:n.symbol.range,options:qvt},r=>this._decorationIds[o]=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{Gt();Tt();de();MN();Jt();ea();An();kPe();Qvt();Yvt();Be();to();Ic();gf();hm();Hi();xpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},NU=function(i,e){return function(t,n){e(t,n,i)}},MU=class{static{this.ID="css.editor.codeLens"}constructor(e,t,n,o,r,s){this._editor=e,this._languageFeaturesService=t,this._commandService=o,this._notificationService=r,this._codeLensCache=s,this._disposables=new se,this._localToDispose=new se,this._lenses=[],this._oldCodeLensModels=new se,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new si(()=>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(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52)),t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),o=this._editor.getOption(50),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",o.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",kl.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&tm(()=>{let o=this._codeLensCache.get(e);t===o&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(let o of this._languageFeaturesService.codeLensProvider.all(e))if(typeof o.onDidChange=="function"){let r=o.onDidChange(()=>n.schedule());this._localToDispose.add(r)}let n=new si(()=>{let o=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=mo(r=>TPe(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);let s=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=s,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},ft)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(He(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(o=>{this._editor.changeViewZones(r=>{let s=[],a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?s.push(c):(c.update(r),a=c.getLineNumber())});let l=new x3;s.forEach(c=>{c.dispose(l,r),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(o)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(o=>{o.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(He(()=>{if(this._editor.getModel()){let o=yf.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(r,s)})}),o.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(o=>{if(o.target.type!==9)return;let r=o.target.element;if(r?.tagName==="SPAN"&&(r=r.parentElement),r?.tagName==="A")for(let s of this._lenses){let a=s.getCommand(r);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new x3;for(let o of this._lenses)o.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],o;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(o&&o[o.length-1].symbol.range.startLineNumber===l?o.push(a):(o=[a],n.push(o)))}if(!n.length&&!this._lenses.length)return;let r=yf.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new x3,u=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),u++,d++)}for(;uthis._resolveCodeLensesInViewportSoon())),d++;c.commit(a)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;let e=this._editor.getModel();if(!e)return;let t=[],n=[];if(this._lenses.forEach(s=>{let a=s.computeIfNecessary(e);a&&(t.push(a),n.push(s))}),t.length===0)return;let o=Date.now(),r=mo(s=>{let a=t.map((l,c)=>{let u=new Array(l.length),d=l.map((h,f)=>!h.symbol.command&&typeof h.provider.resolveCodeLens=="function"?Promise.resolve(h.provider.resolveCodeLens(e,h.symbol,s)).then(p=>{u[f]=p},ln):(u[f]=h.symbol,Promise.resolve(void 0)));return Promise.all(d).then(()=>{!s.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(u)})});return Promise.all(a)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{let s=this._resolveCodeLensesDebounce.update(e,Date.now()-o);this._resolveCodeLensesScheduler.delay=s,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},s=>{ft(s),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};MU=xpi([NU(1,Me),NU(2,Aa),NU(3,Ii),NU(4,_n),NU(5,LPe)],MU);St(MU.ID,MU,1);Ce(class extends Pe{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:V.hasCodeLensProvider,label:y("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;let n=e.get(Pa),o=e.get(Ii),r=e.get(_n),s=t.getSelection().positionLineNumber,a=t.getContribution(MU.ID);if(!a)return;let l=await a.getModel();if(!l)return;let c=[];for(let h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===s&&c.push({label:h.symbol.command.title,command:h.symbol.command});if(c.length===0)return;let u=await n.pick(c,{canPickMany:!1,placeHolder:y("placeHolder","Select a command")});if(!u)return;let d=u.command;if(l.isDisposed){let f=(await a.getModel())?.lenses.find(p=>p.symbol.range.startLineNumber===s&&p.symbol.command?.title===d.title);if(!f||!f.symbol.command)return;d=f.symbol.command}try{await o.executeCommand(d.id,...d.arguments||[])}catch(h){r.error(h)}}})});var Jvt,RPe,i2,FPe,OPe=D(()=>{Wr();de();Hi();eD();WA();Jvt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},RPe=function(i,e){return function(t,n){e(t,n,i)}},i2=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,n){let o=t.range,r=t.color,s=r.alpha,a=new me(new Ti(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),s)),l=s?me.Format.CSS.formatRGB(a):me.Format.CSS.formatRGBA(a),c=s?me.Format.CSS.formatHSL(a):me.Format.CSS.formatHSLA(a),u=s?me.Format.CSS.formatHex(a):me.Format.CSS.formatHexA(a),d=[];return d.push({label:l,textEdit:{range:o,text:l}}),d.push({label:c,textEdit:{range:o,text:c}}),d.push({label:u,textEdit:{range:o,text:u}}),d}};i2=Jvt([RPe(0,wa)],i2);FPe=class extends H{constructor(e,t){super(),this._register(e.colorProvider.register("*",new i2(t)))}};FPe=Jvt([RPe(0,Me),RPe(1,wa)],FPe);u0(FPe)});async function Uue(i,e,t,n=!0){return HPe(new PPe,i,e,t,n)}function VPe(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}async function HPe(i,e,t,n,o){let r=!1,s,a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){let u=l[c];if(u instanceof i2)s=u;else try{await i.compute(u,t,n,a)&&(r=!0)}catch(d){ln(d)}}return r?a:s&&o?(await i.compute(s,t,n,a),a):[]}function Xvt(i,e){let{colorProvider:t}=i.get(Me),n=i.get(an).getModel(e);if(!n)throw mc();let o=i.get(Et).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:o}}var PPe,BPe,zPe,WPe=D(()=>{sn();Tt();mn();Ue();su();to();Hi();OPe();ao();PPe=class{constructor(){}async compute(e,t,n,o){let r=await e.provideDocumentColors(t,n);if(Array.isArray(r))for(let s of r)o.push({colorInfo:s,provider:e});return Array.isArray(r)}},BPe=class{constructor(){}async compute(e,t,n,o){let r=await e.provideDocumentColors(t,n);if(Array.isArray(r))for(let s of r)o.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(r)}},zPe=class{constructor(e){this.colorInfo=e}async compute(e,t,n,o){let r=await e.provideColorPresentations(t,this.colorInfo,Nt.None);return Array.isArray(r)&&o.push(...r),Array.isArray(r)}};ii.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof Je))throw mc();let{model:n,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:r}=Xvt(i,t);return HPe(new BPe,o,n,Nt.None,r)});ii.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,n]=e,{uri:o,range:r}=n;if(!(o instanceof Je)||!Array.isArray(t)||t.length!==4||!R.isIRange(r))throw mc();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=Xvt(i,o),[c,u,d,h]=t;return HPe(new zPe({range:r,color:{red:c,green:u,blue:d,alpha:h}}),a,s,Nt.None,l)})});var Cpi,UPe,jPe,GPe,n2,QPe,qPe=D(()=>{Gt();Wr();Tt();et();de();cd();Rt();sO();Jt();Ue();bs();hm();Hi();WPe();ao();Cpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},UPe=function(i,e){return function(t,n){e(t,n,i)}},GPe=Object.create({}),n2=class extends H{static{jPe=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,n,o){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new se),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new rO(this._editor),this._decoratorLimitReporter=new QPe,this._colorDecorationClassRefs=this._register(new se),this._debounceInformation=o.for(n.colorProvider,"Document Colors",{min:jPe.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=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);let a=s!==this._isColorDecoratorsEnabled||r.hasChanged(21),l=r.hasChanged(148);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){let o=n.colorDecorators;if(o&&o.enable!==void 0&&!o.enable)return o.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new ha,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=mo(async e=>{let t=this._editor.getModel();if(!t)return[];let n=new xo(!1),o=await Uue(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),o});try{let e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){ft(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){let 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:Ot.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((o,r)=>this._colorDatas.set(o,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(21);for(let r=0;rthis._colorDatas.has(o.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};n2=jPe=Cpi([UPe(1,Et),UPe(2,Me),UPe(3,Aa)],n2);QPe=class{constructor(){this._onDidChange=new q,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};St(n2.ID,n2,1)});var jue,Zvt=D(()=>{et();jue=class{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 q,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new q,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new q,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 o=0;o{});var Dm,YPe,KPe,JPe,XPe,Gue,ZPe,$Pe,eBe,que,$vt=D(()=>{Mee();Ye();JF();Lg();oo();Wr();et();de();ko();Que();Be();nr();Ap();Dm=xe,YPe=class extends H{constructor(e,t,n,o=!1){super(),this.model=t,this.showingStandaloneColorPicker=o,this._closeButton=null,this._domNode=Dm(".colorpicker-header"),Ae(e,this._domNode),this._pickedColorNode=Ae(this._domNode,Dm(".picked-color")),Ae(this._pickedColorNode,Dm("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Ae(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");let r=y("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",r),this._originalColorNode=Ae(this._domNode,Dm(".original-color")),this._originalColorNode.style.backgroundColor=me.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(Rz)||me.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(Rz)||me.white})),this._register(ce(this._pickedColorNode,Te.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Te.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=me.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 KPe(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=me.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:""}},KPe=class extends H{constructor(e){super(),this._onClicked=this._register(new q),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Ae(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),Ae(this._button,t),Ae(t,Dm(".button"+ut.asCSSSelector(Ln("color-picker-close",De.close,y("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(ce(this._button,Te.CLICK,()=>{this._onClicked.fire()}))}},JPe=class extends H{constructor(e,t,n,o=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Dm(".colorpicker-body"),Ae(e,this._domNode),this._saturationBox=new XPe(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 ZPe(this._domNode,this.model,o),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new $Pe(this._domNode,this.model,o),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),o&&(this._insertButton=this._register(new eBe(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let n=this.model.color.hsva;this.model.color=new me(new EA(n.h,e,t,n.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new me(new EA(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,n=(1-e)*360;this.model.color=new me(new EA(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()}},XPe=class extends H{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new q,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Dm(".saturation-wrap"),Ae(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Ae(this._domNode,this._canvas),this.selection=Dm(".saturation-selection"),Ae(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Te.POINTER_DOWN,o=>this.onPointerDown(o))),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 wg);let t=bn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangePosition(o.pageX-t.left,o.pageY-t.top),()=>null);let n=ce(e.target.ownerDocument,Te.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let n=Math.max(0,Math.min(1,e/this.width)),o=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,o),this._onDidChange.fire({s:n,v:o})}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();let e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){let e=this.model.color.hsva,t=new me(new EA(e.h,1,1,1)),n=this._canvas.getContext("2d"),o=n.createLinearGradient(0,0,this._canvas.width,0);o.addColorStop(0,"rgba(255, 255, 255, 1)"),o.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),o.addColorStop(1,"rgba(255, 255, 255, 0)");let 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=me.Format.CSS.format(t),n.fill(),n.fillStyle=o,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(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();let t=e.hsva;this.paintSelection(t.s,t.v)}},Gue=class extends H{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new q,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=Ae(e,Dm(".standalone-strip")),this.overlay=Ae(this.domNode,Dm(".standalone-overlay"))):(this.domNode=Ae(e,Dm(".strip")),this.overlay=Ae(this.domNode,Dm(".overlay"))),this.slider=Ae(this.domNode,Dm(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Te.POINTER_DOWN,o=>this.onPointerDown(o))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){let t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new wg),n=bn(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);let o=ce(e.target.ownerDocument,Te.POINTER_UP,()=>{this._onColorFlushed.fire(),o.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){let 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`}},ZPe=class extends Gue{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);let{r:t,g:n,b:o}=e.rgba,r=new me(new Ti(t,n,o,1)),s=new me(new Ti(t,n,o,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},$Pe=class extends Gue{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},eBe=class extends H{constructor(e){super(),this._onClicked=this._register(new q),this.onClicked=this._onClicked.event,this._button=Ae(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(ce(this._button,Te.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}},que=class extends Os{constructor(e,t,n,o,r=!1){super(),this.model=t,this.pixelRatio=n,this._register(nE.getInstance(rt(e)).onDidChange(()=>this.layout())),this._domNode=Dm(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new YPe(this._domNode,this.model,o,r)),this.body=this._register(new JPe(this._domNode,this.model,this.pixelRatio,r))}layout(){this.body.layout()}get domNode(){return this._domNode}}});var C3,CD,Tm,Jg,Xg=D(()=>{C3=class{constructor(e,t,n,o){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=o,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}},CD=class{constructor(e,t,n,o,r,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=o,this.initialMousePosY=r,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},Tm=class{constructor(e){this.renderedHoverParts=e}dispose(){for(let e of this.renderedHoverParts)e.dispose()}},Jg=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});async function iyt(i,e,t,n){let o=e.getValueInRange(t.range),{red:r,green:s,blue:a,alpha:l}=t.color,c=new Ti(Math.round(r*255),Math.round(s*255),Math.round(a*255),l),u=new me(c),d=await VPe(e,t,n,Nt.None),h=new jue(u,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(u,o),i instanceof o2?new tBe(i,R.lift(t.range),h,n):new iBe(i,R.lift(t.range),h,n)}function nyt(i,e,t,n,o){if(n.length===0||!e.hasModel())return;if(o.setMinimumDimensions){let h=e.getOption(67)+8;o.setMinimumDimensions(new hn(302,h))}let r=new se,s=n[0],a=e.getModel(),l=s.model,c=r.add(new que(o.fragment,l,e.getOption(144),t,i instanceof _3)),u=!1,d=new R(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof _3){let h=s.model.color;i.color=h,Yue(a,l,h,d,s),r.add(l.onColorFlushed(f=>{i.color=f}))}else r.add(l.onColorFlushed(async h=>{await Yue(a,l,h,d,s),u=!0,d=oyt(e,d,l)}));return r.add(l.onDidChangeColor(h=>{Yue(a,l,h,d,s)})),r.add(e.onDidChangeModelContent(h=>{u?u=!1:(o.hide(),e.focus())})),{hoverPart:s,colorPicker:c,disposables:r}}function oyt(i,e,t){let n=[],o=t.presentation.textEdit??{range:e,text:t.presentation.label,forceMoveMarkers:!1};n.push(o),t.presentation.additionalTextEdits&&n.push(...t.presentation.additionalTextEdits);let r=R.lift(o.range),s=i.getModel()._setTrackedRange(null,r,3);return i.executeEdits("colorpicker",n),i.pushUndoStop(),i.getModel()._getTrackedRange(s)??r}async function Yue(i,e,t,n,o){let r=await VPe(i,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},o.provider,Nt.None);e.colorPresentations=r||[]}var eyt,tyt,tBe,o2,iBe,_3,Kue=D(()=>{Gt();sn();Wr();de();Ue();WPe();qPe();Zvt();$vt();Xg();io();Ye();eyt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},tyt=function(i,e){return function(t,n){e(t,n,i)}},tBe=class{constructor(e,t,n,o){this.owner=e,this.range=t,this.model=n,this.provider=o,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},o2=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return Wu.fromPromise(this._computeAsync(e,t,n))}async _computeAsync(e,t,n){if(!this._editor.hasModel())return[];let o=n2.get(this._editor);if(!o)return[];for(let r of t){if(!o.isColorDecoration(r))continue;let s=o.getColorData(r.range.getStartPosition());if(s)return[await iyt(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]}renderHoverParts(e,t){let n=nyt(this,this._editor,this._themeService,t,e);if(!n)return new Tm([]);this._colorPicker=n.colorPicker;let o={hoverPart:n.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){n.disposables.dispose()}};return new Tm([o])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};o2=eyt([tyt(1,Wn)],o2);iBe=class{constructor(e,t,n,o){this.owner=e,this.range=t,this.model=n,this.provider=o}},_3=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,n){if(!this._editor.hasModel()||!n2.get(this._editor))return null;let r=await Uue(n,this._editor.getModel(),Nt.None),s=null,a=null;for(let d of r){let h=d.colorInfo;R.containsRange(h.range,e.range)&&(s=h,a=d.provider)}let l=s??e,c=a??t,u=!!s;return{colorHover:await iyt(this,this._editor.getModel(),l,c),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;let t=e.model,n=new R(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await Yue(this._editor.getModel(),t,this._color,n,e),n=oyt(this._editor,n,t))}renderHoverParts(e,t){return nyt(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};_3=eyt([tyt(1,Wn)],_3)});var Jue,ryt,syt,ayt,lyt,cyt,uyt,dyt,hyt,fyt,r2,pyt,s2,myt,Xue=D(()=>{Be();Jue="editor.action.showHover",ryt="editor.action.showDefinitionPreviewHover",syt="editor.action.scrollUpHover",ayt="editor.action.scrollDownHover",lyt="editor.action.scrollLeftHover",cyt="editor.action.scrollRightHover",uyt="editor.action.pageUpHover",dyt="editor.action.pageDownHover",hyt="editor.action.goToTopHover",fyt="editor.action.goToBottomHover",r2="editor.action.increaseHoverVerbosityLevel",pyt=y({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),s2="editor.action.decreaseHoverVerbosityLevel",myt=y({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level")});var gyt=D(()=>{});var Zue,$ue,ede,tde=D(()=>{Zue="editor.action.inlineSuggest.commit",$ue="editor.action.inlineSuggest.showPrevious",ede="editor.action.inlineSuggest.showNext"});var sBe,b0,ide,nde,_pi,Spi,TC,nBe,oBe,rBe,ode=D(()=>{Ye();BL();gW();il();Wt();Gt();oo();de();In();hf();wi();ko();gyt();kt();ro();tde();Be();Xx();sU();go();to();Bt();Ed();ht();Xo();lh();Ap();sBe=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},b0=function(i,e){return function(t,n){e(t,n,i)}},nde=class extends H{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=at(this,o=>{let r=this.model.read(o)?.primaryGhostText.read(o);if(!this.alwaysShowToolbar.read(o)||!r||r.parts.length===0)return this.sessionPosition=void 0,null;let s=r.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==r.lineNumber&&(this.sessionPosition=void 0);let a=new J(r.lineNumber,Math.min(s,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(es((o,r)=>{let s=this.model.read(o);if(!s||!this.alwaysShowToolbar.read(o))return;let a=ph((c,u)=>{let d=u.add(this.instantiationService.createInstance(TC,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands));return e.addContentWidget(d),u.add(He(()=>e.removeContentWidget(d))),u.add(Ct(h=>{this.position.read(h)&&s.lastTriggerKind.read(h)!==Wf.Explicit&&s.triggerExplicitly()})),d}),l=$y(this,(c,u)=>!!this.position.read(c)||!!u);r.add(Ct(c=>{l.read(c)&&a.read(c)}))}))}};nde=sBe([b0(2,Re)],nde);_pi=Ln("inline-suggestion-hints-next",De.chevronRight,y("parameterHintsNextIcon","Icon for show next parameter hint.")),Spi=Ln("inline-suggestion-hints-previous",De.chevronLeft,y("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),TC=class extends H{static{ide=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,n){let o=new ta(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return r&&(s=y({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),o.tooltip=s,o}constructor(e,t,n,o,r,s,a,l,c,u,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=o,this._suggestionCount=r,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=u,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${ide.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=ci("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[ci("div@toolBar")]),this.previousAction=this.createCommandAction($ue,y("previous","Previous"),ut.asClassName(Spi)),this.availableSuggestionCountAction=new ta("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(ede,y("next","Next"),ut.asClassName(_pi)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(tt.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new si(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new si(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.toolBar=this._register(l.createInstance(rBe,this.nodes.toolBar,tt.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof Kl)return l.createInstance(oBe,h,void 0);if(h===this.availableSuggestionCountAction){let p=new nBe(void 0,h,{label:!0,icon:!1});return p.setClass("availableSuggestionCount"),p}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{ide._dropDownVisible=h})),this._register(Ct(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(Ct(h=>{let f=this._suggestionCount.read(h),p=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${p+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Ct(h=>{let p=this._extraCommands.read(h).map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:A=>this._commandService.executeCommand(g.id)}));for(let[g,A]of this.inlineCompletionsActionsMenus.getActions())for(let v of A)v instanceof Kl&&p.push(v);p.length>0&&p.unshift(new yr),this.toolBar.setAdditionalSecondaryActions(p)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};TC=ide=sBe([b0(6,Ii),b0(7,Re),b0(8,Xt),b0(9,Ze),b0(10,nl)],TC);nBe=class extends Vg{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}},oBe=class extends n1{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=ci("div.keybinding").root;this._register(new y1(t,Ja,{disableTitle:!0,...$re})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},rBe=class extends zN{constructor(e,t,n,o,r,s,a,l,c){super(e,{resetMenu:t,...n},o,r,s,a,l,c),this.menuId=t,this.options2=n,this.menuService=o,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){let e=[],t=[];VE(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){Zi(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Zi(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};rBe=sBe([b0(3,nl),b0(4,Ze),b0(5,ia),b0(6,Xt),b0(7,Ii),b0(8,rr)],rBe)});function _D(i,e,t){let n=bn(i);return!(en.left+n.width||tn.top+n.height)}var RU=D(()=>{Ye()});var aBe,S3,lBe=D(()=>{Gt();Tt();et();de();aBe=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},S3=class extends H{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new q),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new si(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new si(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new si(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,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=Rnt(e=>this._computer.computeAsync(e)),(async()=>{try{for await(let e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){ft(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;let e=this._state===0,t=this._state===4;this._onResult.fire(new aBe(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)}}});var SD,rde=D(()=>{Ye();$P();et();de();SD=class{constructor(){this._onDidWillResize=new q,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new q,this.onDidResize=this._onDidResize.event,this._sashListener=new se,this._size=new hn(0,0),this._minSize=new hn(0,0),this._maxSize=new hn(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new bf(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new bf(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new bf(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:nW.North}),this._southSash=new bf(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:nW.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(Ee.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(Ee.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(o=>{e&&(n=o.currentX-o.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(o=>{e&&(n=-(o.currentX-o.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(o=>{e&&(t=-(o.currentY-o.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(o=>{e&&(t=o.currentY-o.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ee.any(this._eastSash.onDidReset,this._westSash.onDidReset)(o=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ee.any(this._northSash.onDidReset,this._southSash.onDidReset)(o=>{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,o){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=o?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:o}=this._minSize,{height:r,width:s}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(o,Math.min(s,t));let a=new hn(t,e);hn.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,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}}});var Epi,Dpi,sde,byt=D(()=>{rde();de();kt();Ye();Epi=30,Dpi=24,sde=class extends H{constructor(e,t=new hn(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new SD),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=hn.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 hn(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(){return this._contentPosition?.position?J.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:bn(t).top+n.top-Epi}_availableVerticalSpaceBelow(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;let o=bn(t),r=Xh(t.ownerDocument.body),s=o.top+n.top+n.height;return r.height-s-Dpi}_findPositionPreference(e,t){let n=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),o=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),r=Math.min(Math.max(o,n),e),s=Math.min(e,r),a;return this._editor.getOption(60).above?a=s<=o?1:2:a=s<=n?2:1,a===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),a}_resize(e){this._resizableNode.layout(e.height,e.width)}}});function vyt(i,e,t,n,o,r){let s=t+o/2,a=n+r/2,l=Math.max(Math.abs(i-s)-o/2,0),c=Math.max(Math.abs(e-a)-r/2,0);return Math.sqrt(l*l+c*c)}var Tpi,ade,L1,Ayt,kpi,lde,yyt=D(()=>{Ye();Xo();byt();Bt();ao();fh();An();KO();et();Tpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ade=function(i,e){return function(t,n){e(t,n,i)}},Ayt=30,kpi=6,lde=class extends sde{static{L1=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new hn(0,0)}get isVisibleFromKeyboard(){return this._renderedHover?.source===1}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,n,o,r){let s=e.getOption(67)+8,a=150,l=new hn(a,s);super(e,l),this._configurationService=n,this._accessibilityService=o,this._keybindingService=r,this._hover=this._register(new SE),this._onDidResize=this._register(new q),this.onDidResize=this._onDidResize.event,this._minimumSize=l,this._hoverVisibleKey=V.hoverVisible.bindTo(t),this._hoverFocusedKey=V.hoverFocused.bindTo(t),Ae(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()}));let c=this._register(iu(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return L1.ID}static _applyDimensions(e,t,n){let o=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=o,e.style.height=r}_setContentsDomNodeDimensions(e,t){let n=this._hover.contentsDomNode;return L1._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){let n=this._hover.containerDomNode;return L1._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){let o=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=o,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){L1._applyMaxDimensions(this._hover.contentsDomNode,e,t),L1._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");let t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n)}_updateResizableNodeMaxDimensions(){let e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new hn(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){L1._lastDimensions=new hn(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){let e=this._renderedHover?.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){let e=this._findAvailableSpaceVertically();if(!e)return;let t=kpi;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");let e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;let e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,o),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){let{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(r=>this._editor.applyFontInfo(r))}_updateContent(e){let t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){let e=Math.max(this._editor.getLayoutInfo().height/4,250,L1._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,L1._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);let t=vg(this._hover.containerDomNode),n=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,n)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();let r=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&Sie(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");r&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+r)}hide(){if(!this._renderedHover)return;let e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new hn(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){let e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new hn(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){let e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new hn(e,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();let e=this._hover.containerDomNode,t=vg(e),n=Cc(e);if(this._resizableNode.layout(t,n),this._setHoverWidgetDimensions(n,t),t=vg(e),n=Cc(e),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(t,n),this._renderedHover?.showAtPosition){let o=vg(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(o,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-Ayt})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+Ayt})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let 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})}};lde=L1=Tpi([ade(1,Ze),ade(2,Et),ade(3,Es),ade(4,Xt)],lde)});var cde,wyt=D(()=>{Wt();Gt();cde=class i{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[];let n=e.getModel(),o=t.range.startLineNumber;if(o>n.getLineCount())return[];let r=n.getLineMaxColumn(o);return e.getLineDecorations(o).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===o?s.range.startColumn:1,l=s.range.endLineNumber===o?s.range.endColumn:r;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){let t=this._anchor;if(!this._editor.hasModel()||!t)return Wu.EMPTY;let n=i._getLineDecorations(this._editor,t);return Wu.merge(this._participants.map(o=>o.computeAsync?o.computeAsync(t,n,e):Wu.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return Sl(t)}}});var FU,cBe,xyt=D(()=>{FU=class{constructor(e,t,n){this.anchor=e,this.hoverParts=t,this.isComplete=n}filter(e){let t=this.hoverParts.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.hoverParts.length?this:new cBe(this,this.anchor,t,this.isComplete)}},cBe=class extends FU{constructor(e,t,n,o){super(t,n,o),this.original=e}filter(e){return this.original.filter(e)}}});var Ipi,Lpi,Cyt,E3,uBe=D(()=>{Ye();KO();de();Xo();Ipi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Lpi=function(i,e){return function(t,n){e(t,n,i)}},Cyt=xe,E3=class extends H{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=Cyt("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=Ae(this.hoverElement,Cyt("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;this._hasContent=!0;let o=this._register(YO.render(this.actionsElement,e,n));return this.actions.push(o),o}append(e){let t=Ae(this.actionsElement,e);return this._hasContent=!0,t}};E3=Ipi([Lpi(0,Xt)],E3)});async function Npi(i,e,t,n,o){let r=await Promise.resolve(i.provideHover(t,n,o)).catch(ln);if(!(!r||!Mpi(r)))return new dBe(i,r,e)}function OU(i,e,t,n,o=!1){let s=i.ordered(e,o).map((a,l)=>Npi(a,l,e,t,n));return Wu.fromPromises(s).coalesce()}function _yt(i,e,t,n,o=!1){return OU(i,e,t,n,o).map(r=>r.hover).toPromise()}function Mpi(i){let e=typeof i.range<"u",t=typeof i.contents<"u"&&i.contents&&i.contents.length>0;return e&&t}var dBe,hBe=D(()=>{Gt();sn();Tt();Jt();Hi();dBe=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};Ec("_executeHoverProvider",(i,e,t)=>{let n=i.get(Me);return _yt(n.hoverProvider,e,t,Nt.None)});Ec("_executeHoverProvider_recursive",(i,e,t)=>{let n=i.get(Me);return _yt(n.hoverProvider,e,t,Nt.None,!0)})});function Syt(i,e,t,n,o){e.sort(pa(s=>s.ordinal,vd));let r=[];for(let s of e)r.push(Eyt(t,s,n,o,i.onContentsChanged));return new Tm(r)}function Eyt(i,e,t,n,o){let r=new se,s=D3("div.hover-row"),a=D3("div.hover-row-contents");s.appendChild(a);let l=e.contents;for(let u of l){if(Wx(u))continue;let d=D3("div.markdown-hover"),h=Ae(d,D3("div.hover-contents")),f=r.add(new df({editor:i},t,n));r.add(f.onDidRenderAsync(()=>{h.className="hover-contents code-hover-contents",o()}));let p=r.add(f.render(u));h.appendChild(p.element),a.appendChild(d)}return{hoverPart:e,hoverElement:s,dispose(){r.dispose()}}}function Ppi(i,e){switch(e){case Jd.Increase:{let t=i.lookupKeybinding(r2);return t?y("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",t.getLabel()):y("increaseVerbosity","Increase Hover Verbosity")}case Jd.Decrease:{let t=i.lookupKeybinding(s2);return t?y("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",t.getLabel()):y("decreaseVerbosity","Decrease Hover Verbosity")}}}var Rpi,a2,D3,Fpi,Opi,xf,ude,ED,T3,fBe,PU=D(()=>{Ye();Wt();sn();Td();de();Ux();Xue();Ue();Il();Xg();Be();ao();Dd();Hi();ro();Ap();oo();ko();Tt();Xo();KO();zx();Gt();hBe();to();Rpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},a2=function(i,e){return function(t,n){e(t,n,i)}},D3=xe,Fpi=Ln("hover-increase-verbosity",De.add,y("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),Opi=Ln("hover-decrease-verbosity",De.remove,y("decreaseHoverVerbosity","Icon for decreasing hover verbosity.")),xf=class{constructor(e,t,n,o,r,s=void 0){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=o,this.ordinal=r,this.source=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},ude=class{constructor(e,t,n){this.hover=e,this.hoverProvider=t,this.hoverPosition=n}supportsVerbosityAction(e){switch(e){case Jd.Increase:return this.hover.canIncreaseVerbosity??!1;case Jd.Decrease:return this.hover.canDecreaseVerbosity??!1}}},ED=class{constructor(e,t,n,o,r,s,a,l){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=o,this._languageFeaturesService=r,this._keybindingService=s,this._hoverService=a,this._commandService=l,this.hoverOrdinal=3}createLoadingMessage(e){return new xf(this,e.range,[new $r().appendText(y("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),o=e.range.startLineNumber,r=n.getLineMaxColumn(o),s=[],a=1e3,l=n.getLineLength(o),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(118),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;u>=0&&l>u&&e.range.startColumn>=u&&(h=!0,s.push(new xf(this,e.range,[{value:y("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof d=="number"&&l>=d&&s.push(new xf(this,e.range,[{value:y("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(let p of t){let g=p.range.startLineNumber===o?p.range.startColumn:1,A=p.range.endLineNumber===o?p.range.endColumn:r,v=p.options.hoverMessage;if(!v||Wx(v))continue;p.options.beforeContentClassName&&(f=!0);let w=new R(e.range.startLineNumber,g,e.range.startLineNumber,A);s.push(new xf(this,w,gO(v),f,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return Wu.EMPTY;let o=this._editor.getModel(),r=this._languageFeaturesService.hoverProvider;return r.has(o)?this._getMarkdownHovers(r,o,e,n):Wu.EMPTY}_getMarkdownHovers(e,t,n,o){let r=n.range.getStartPosition();return OU(e,t,r,o).filter(l=>!Wx(l.hover.contents)).map(l=>{let c=l.hover.range?R.lift(l.hover.range):n.range,u=new ude(l.hover,l.provider,r);return new xf(this,c,l.hover.contents,!1,l.ordinal,u)})}renderHoverParts(e,t){return this._renderedHoverParts=new fBe(t,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,t,n){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t,n))}};ED=Rpi([a2(1,on),a2(2,Qr),a2(3,Et),a2(4,Me),a2(5,Xt),a2(6,dh),a2(7,Ii)],ED);T3=class{constructor(e,t,n){this.hoverPart=e,this.hoverElement=t,this.disposables=n}dispose(){this.disposables.dispose()}},fBe=class{constructor(e,t,n,o,r,s,a,l,c,u,d){this._hoverParticipant=n,this._editor=o,this._languageService=r,this._openerService=s,this._commandService=a,this._keybindingService=l,this._hoverService=c,this._configurationService=u,this._onFinishedRendering=d,this._ongoingHoverOperations=new Map,this._disposables=new se,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add(He(()=>{this.renderedHoverParts.forEach(h=>{h.dispose()}),this._ongoingHoverOperations.forEach(h=>{h.tokenSource.dispose(!0)})}))}_renderHoverParts(e,t,n){return e.sort(pa(o=>o.ordinal,vd)),e.map(o=>{let r=this._renderHoverPart(o,n);return t.appendChild(r.hoverElement),r})}_renderHoverPart(e,t){let n=this._renderMarkdownHover(e,t),o=n.hoverElement,r=e.source,s=new se;if(s.add(n),!r)return new T3(e,o,s);let a=r.supportsVerbosityAction(Jd.Increase),l=r.supportsVerbosityAction(Jd.Decrease);if(!a&&!l)return new T3(e,o,s);let c=D3("div.verbosity-actions");return o.prepend(c),s.add(this._renderHoverExpansionAction(c,Jd.Increase,a)),s.add(this._renderHoverExpansionAction(c,Jd.Decrease,l)),new T3(e,o,s)}_renderMarkdownHover(e,t){return Eyt(this._editor,e,this._languageService,this._openerService,t)}_renderHoverExpansionAction(e,t,n){let o=new se,r=t===Jd.Increase,s=Ae(e,D3(ut.asCSSSelector(r?Fpi:Opi)));s.tabIndex=0;let a=new Oy("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(o.add(this._hoverService.setupManagedHover(a,s,Ppi(this._keybindingService,t))),!n)return s.classList.add("disabled"),o;s.classList.add("enabled");let l=()=>this._commandService.executeCommand(t===Jd.Increase?r2:s2);return o.add(new QV(s,l)),o.add(new GV(s,l,[3,10])),o}async updateMarkdownHoverPartVerbosityLevel(e,t,n=!0){let o=this._editor.getModel();if(!o)return;let r=this._getRenderedHoverPartAtIndex(t),s=r?.hoverPart.source;if(!r||!s?.supportsVerbosityAction(e))return;let a=await this._fetchHover(s,o,e);if(!a)return;let l=new ude(a,s.hoverProvider,s.hoverPosition),c=r.hoverPart,u=new xf(this._hoverParticipant,c.range,a.contents,c.isBeforeContent,c.ordinal,l),d=this._renderHoverPart(u,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(t,d,u),n&&this._focusOnHoverPartWithIndex(t),{hoverPart:u,hoverElement:d.hoverElement}}async _fetchHover(e,t,n){let o=n===Jd.Increase?1:-1,r=e.hoverProvider,s=this._ongoingHoverOperations.get(r);s&&(s.tokenSource.cancel(),o+=s.verbosityDelta);let a=new Mi;this._ongoingHoverOperations.set(r,{verbosityDelta:o,tokenSource:a});let l={verbosityRequest:{verbosityDelta:o,previousHover:e.hover}},c;try{c=await Promise.resolve(r.provideHover(t,e.hoverPosition,a.token,l))}catch(u){ln(u)}return a.dispose(),this._ongoingHoverOperations.delete(r),c}_replaceRenderedHoverPartAtIndex(e,t,n){if(e>=this.renderedHoverParts.length||e<0)return;let o=this.renderedHoverParts[e],r=o.hoverElement,s=t.hoverElement,a=Array.from(s.children);r.replaceChildren(...a);let l=new T3(n,r,t.disposables);r.focus(),o.dispose(),this.renderedHoverParts[e]=l}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}});function pBe(i,e){return!!i[e]}function Dyt(i){return i==="altKey"?jt?new k3(57,"metaKey",6,"altKey"):new k3(5,"ctrlKey",6,"altKey"):jt?new k3(6,"altKey",57,"metaKey"):new k3(6,"altKey",5,"ctrlKey")}var BU,dde,k3,N1,zU=D(()=>{et();de();wi();BU=class{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=pBe(e.event,t.triggerModifier),this.hasSideBySideModifier=pBe(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},dde=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=pBe(e,t.triggerModifier)}},k3=class{constructor(e,t,n,o){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=o}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};N1=class extends H{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new q),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new q),this.onExecute=this._onExecute.event,this._onCancel=this._register(new q),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(n=>n.target.position?n.target.position.lineNumber:0),this._opts=Dyt(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(78)){let o=Dyt(this._editor.getOption(78));if(this._opts.equals(o))return;this._opts=o,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new BU(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new BU(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new BU(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new dde(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new dde(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=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){let t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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()}}});function Tyt(i){return Je.from({scheme:Vt.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var VU,mBe,HU,gBe=D(()=>{Tt();de();kt();Ue();xl();mn();VU=class{constructor(e,t){this.range=e,this.direction=t}},mBe=class i{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){let t=new i(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){try{let t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(t){ln(t),this._isResolved=!1}}},HU=class i{static{this._emptyInlayHintList=Object.freeze({dispose(){},hints:[]})}static async create(e,t,n,o){let r=[],s=e.ordered(t).reverse().map(a=>n.map(async l=>{try{let c=await a.provideInlayHints(t,l,o);(c?.hints.length||a.onDidChangeInlayHints)&&r.push([c??i._emptyInlayHintList,a])}catch(c){ln(c)}}));if(await Promise.all(s.flat()),o.isCancellationRequested||t.isDisposed())throw new qc;return new i(n,r,t)}constructor(e,t,n){this._disposables=new se,this.ranges=e,this.provider=new Set;let o=[];for(let[r,s]of t){this._disposables.add(r),this.provider.add(s);for(let a of r.hints){let l=n.validatePosition(a.position),c="before",u=i._getRangeAtPosition(n,l),d;u.getStartPosition().isBefore(l)?(d=R.fromPositions(u.getStartPosition(),l),c="after"):(d=R.fromPositions(l,u.getEndPosition()),c="before"),o.push(new mBe(a,new VU(d,c),s))}}this.items=o.sort((r,s)=>J.compare(r.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let n=t.lineNumber,o=e.getWordAtPosition(t);if(o)return new R(n,o.startColumn,n,o.endColumn);e.tokenization.tokenizeIfCheap(n);let r=e.tokenization.getLineTokens(n),s=t.column-1,a=r.findTokenIndexAtOffset(s),l=r.getStartOffset(a),c=r.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=r.getStartOffset(a-1),c=r.getEndOffset(a-1)):c===s&&a{rh();hs();$W();Rs();Hi();fh();to();Bt();ht();Ic();io();Bpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},kC=function(i,e){return function(t,n){e(t,n,i)}},xu=class extends cD{constructor(e,t,n,o,r,s,a,l,c,u,d,h,f){super(e,{...o.getRawOptions(),overflowWidgetsDomNode:o.getOverflowWidgetsDomNode()},n,r,s,a,l,c,u,d,h,f),this._parentEditor=o,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(o.onDidChangeConfiguration(p=>this._onParentConfigurationChanged(p)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){WI(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};xu=Bpi([kC(4,Re),kC(5,ei),kC(6,Ii),kC(7,Ze),kC(8,Wn),kC(9,_n),kC(10,Es),kC(11,Gi),kC(12,Me)],xu)});var kyt=D(()=>{});var Iyt=D(()=>{});var Lyt,zpi,Vpi,bBe,ABe,vBe,hde,Nyt=D(()=>{Ye();$P();Wr();XV();de();rh();Iyt();Ue();bs();Lyt=new me(new Ti(0,122,204)),zpi={showArrow:!0,showFrame:!0,className:"",frameColor:Lyt,arrowColor:Lyt,keepEditorSelection:!1},Vpi="vs.editor.contrib.zoneWidget",bBe=class{constructor(e,t,n,o,r,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=o,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=r,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},ABe=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},vBe=class i{static{this._IdGenerator=new SL(".arrow-decoration-")}constructor(e){this._editor=e,this._ruleName=i._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),z$(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(){z$(this._ruleName),qF(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:R.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}},hde=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new se,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Xb(t),WI(this.options,zpi,!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=>{let o=this._getWidth(n);this.domNode.style.width=o+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(o)}))}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 vBe(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;let n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash?.layout()}get position(){let e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){let n=R.isIRange(e)?R.lift(e):R.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Ot.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){let e=this.editor.getOption(67),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){let n=e.getStartPosition(),o=this.editor.getLayoutInfo(),r=this._getWidth(o);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(o)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){let h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/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 bBe(s,n.lineNumber,n.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new ABe(Vpi+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}let u=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,r),this.options.keepEditorSelection||this.editor.setSelection(e);let d=this.editor.getModel();if(d){let h=d.validateRange(new R(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 bf(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){let n=(t.currentY-e.startY)/this.editor.getOption(67),o=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+o;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(){let e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}});function Fyt(i){let e=i.get(ei).getFocusedCodeEditor();return e instanceof xu?e.getParentEditor():e}var Myt,Ryt,yBe,Cu,fde,Hpi,I3,Oyt,pde,mde,Pyt,Byt,Yeo,Keo,Jeo,Xeo,zyt,Zeo,$eo,eto,tto,ito,l2=D(()=>{Ye();Hg();il();oo();ko();Wr();et();rh();kyt();Jt();hs();IC();Nyt();Be();Xx();Bt();Dc();ht();nr();Myt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ryt=function(i,e){return function(t,n){e(t,n,i)}},yBe=At("IPeekViewService");oi(yBe,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let n=()=>{let o=this._widgets.get(i);o&&o.widget===e&&(o.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);(function(i){i.inPeekEditor=new ze("inReferenceSearchEditor",!0,y("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Cu||(Cu={}));fde=class{static{this.ID="editor.contrib.referenceController"}constructor(e,t){e instanceof xu&&Cu.inPeekEditor.bindTo(t)}dispose(){}};fde=Myt([Ryt(1,Ze)],fde);St(fde.ID,fde,0);Hpi={headerBackgroundColor:me.white,primaryHeadingColor:me.fromHex("#333333"),secondaryHeadingColor:me.fromHex("#6c6c6cb3")},I3=class extends hde{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new q,this.onDidClose=this._onDidClose.event,WI(this.options,Hpi,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=xe(".head"),this._bodyElement=xe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=xe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),un(this._titleElement,"click",r=>this._onTitleClick(r))),Ae(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=xe("span.filename"),this._secondaryHeading=xe("span.dirname"),this._metaHeading=xe("span.meta"),Ae(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=xe(".peekview-actions");Ae(this._headElement,n);let o=this._getActionBarOptions();this._actionbarWidget=new Ps(n,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ta("peekview.close",y("label.close","Close"),ut.asClassName(De.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Wne.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:Tr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,ql(this._metaHeading)):_l(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let n=Math.ceil(this.editor.getOption(67)*1.2),o=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(o,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`)}};I3=Myt([Ryt(2,Re)],I3);Oyt=j("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:me.black,hcLight:me.white},y("peekViewTitleBackground","Background color of the peek view title area.")),pde=j("peekViewTitleLabel.foreground",{dark:me.white,light:me.black,hcDark:me.white,hcLight:rm},y("peekViewTitleForeground","Color of the peek view title.")),mde=j("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},y("peekViewTitleInfoForeground","Color of the peek view title info.")),Pyt=j("peekView.border",{dark:$h,light:$h,hcDark:ki,hcLight:ki},y("peekViewBorder","Color of the peek view borders and arrow.")),Byt=j("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:me.black,hcLight:me.white},y("peekViewResultsBackground","Background color of the peek view result list.")),Yeo=j("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:me.white,hcLight:rm},y("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Keo=j("peekViewResult.fileForeground",{dark:me.white,light:"#1E1E1E",hcDark:me.white,hcLight:rm},y("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),Jeo=j("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},y("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Xeo=j("peekViewResult.selectionForeground",{dark:me.white,light:"#6C6C6C",hcDark:me.white,hcLight:rm},y("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),zyt=j("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:me.black,hcLight:me.white},y("peekViewEditorBackground","Background color of the peek view editor.")),Zeo=j("peekViewEditorGutter.background",zyt,y("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),$eo=j("peekViewEditorStickyScroll.background",zyt,y("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),eto=j("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},y("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),tto=j("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},y("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),ito=j("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:eo,hcLight:eo},y("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var Zg,wBe,LC,Cf,L3=D(()=>{Tt();et();XV();de();Xl();Nc();Rt();Ue();Be();Zg=class{constructor(e,t,n,o){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=o,this.id=JV.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){let e=this.parent.getPreview(this)?.preview(this.range);return e?y({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}",e.value,Lc(this.uri),this.range.startLineNumber,this.range.startColumn):y("aria.oneReference","in {0} on line {1} at column {2}",Lc(this.uri),this.range.startLineNumber,this.range.startColumn)}},wBe=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let n=this._modelReference.object.textEditorModel;if(!n)return;let{startLineNumber:o,startColumn:r,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:o,column:r-t}),c=new R(o,l.startColumn,o,r),u=new R(s,a,s,1073741824),d=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),f=n.getValueInRange(u).replace(/\s+$/,"");return{value:d+h+f,highlight:{start:d.length,end:d.length+h.length}}}},LC=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ps}dispose(){Oi(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?y("aria.fileReferences.1","1 symbol in {0}, full path {1}",Lc(this.uri),this.uri.fsPath):y("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Lc(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{let n=await e.createModelReference(t.uri);this._previews.set(t.uri,new wBe(n))}catch(n){ft(n)}return this}},Cf=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new q,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[n]=e;e.sort(i._compareReferences);let o;for(let r of e)if((!o||!lr.isEqual(o.uri,r.uri,!0))&&(o=new LC(this,r.uri),this.groups.push(o)),o.children.length===0||i._compareReferences(r,o.children[o.children.length-1])!==0){let s=new Zg(n===r,o,r,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),o.children.push(s)}}dispose(){Oi(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?y("aria.result.0","No results found"):this.references.length===1?y("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?y("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):y("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,o=n.children.indexOf(e),r=n.children.length,s=n.parent.groups.length;return s===1||t&&o+10?(t?o=(o+1)%r:o=(o+r-1)%r,n.children[o]):(o=n.parent.groups.indexOf(n),t?(o=(o+1)%s,n.parent.groups[o].children[0]):(o=(o+s-1)%s,n.parent.groups[o].children[n.parent.groups[o].children.length-1]))}nearestReference(e,t){let n=this.references.map((o,r)=>({idx:r,prefixLen:tp(o.uri.toString(),e.toString()),offsetDist:Math.abs(o.range.startLineNumber-t.lineNumber)*100+Math.abs(o.range.startColumn-t.column)})).sort((o,r)=>o.prefixLen>r.prefixLen?-1:o.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(let n of this.references)if(n.uri.toString()===e.toString()&&R.containsPosition(n.range,t))return n}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return lr.compare(e.uri,t.uri)||R.compareRangesUsingStarts(e.range,t.range)}}});var Vyt=D(()=>{});var wde,xde,xBe,gde,bde,Ade,vde,CBe,WU,_Be,UU,yde,Hyt=D(()=>{Ye();FNe();R2e();Xre();Rg();de();Nc();dm();Be();ht();Xo();oP();i1();L3();wde=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},xde=function(i,e){return function(t,n){e(t,n,i)}},gde=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Cf||e instanceof LC}getChildren(e){if(e instanceof Cf)return e.groups;if(e instanceof LC)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};gde=wde([xde(0,Ss)],gde);bde=class{getHeight(){return 23}getTemplateId(e){return e instanceof LC?WU.id:UU.id}},Ade=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof Zg){let t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return Lc(e.uri)}};Ade=wde([xde(0,Xt)],Ade);vde=class{getId(e){return e instanceof Zg?e.id:e.uri}},CBe=class extends H{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new aC(n,{supportHighlights:!0})),this.badge=new XL(Ae(n,xe(".count")),{},zne),e.appendChild(n)}set(e,t){let n=IE(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let o=e.children.length;this.badge.setCount(o),o>1?this.badge.setTitleFormat(y("referencesCount","{0} references",o)):this.badge.setTitleFormat(y("referenceCount","{0} reference",o))}};CBe=wde([xde(1,FA)],CBe);WU=class{static{xBe=this}static{this.id="FileReferencesRenderer"}constructor(e){this._instantiationService=e,this.templateId=xBe.id}renderTemplate(e){return this._instantiationService.createInstance(CBe,e)}renderElement(e,t,n){n.set(e.element,kE(e.filterData))}disposeTemplate(e){e.dispose()}};WU=xBe=wde([xde(0,Re)],WU);_Be=class extends H{constructor(e){super(),this.label=this._register(new v1(e))}set(e,t){let n=e.parent.getPreview(e)?.preview(e.range);if(!n||!n.value)this.label.set(`${Lc(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:r}=n;t&&!cf.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,kE(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[r]))}}},UU=class i{constructor(){this.templateId=i.id}static{this.id="OneReferenceRenderer"}renderTemplate(e){return new _Be(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}},yde=class{getWidgetAriaLabel(){return y("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var Upi,N3,SBe,Cde,EBe,_de,Wyt=D(()=>{Ye();QNe();Wr();et();de();xl();Nc();Vyt();IC();Ue();bs();sp();dm();Hyt();l2();Be();ht();Xo();oP();mW();io();L3();Upi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},N3=function(i,e){return function(t,n){e(t,n,i)}},SBe=class i{static{this.DecorationOptions=Ot.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new se,this._callOnModelChange=new se,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();let e=this._editor.getModel();if(e){for(let 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()));let t=[],n=[];for(let o=0,r=e.children.length;o{let r=o.deltaDecorations([],t);for(let s=0;s{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(EBe,"ReferencesWidget",this._treeContainer,new bde,[this._instantiationService.createInstance(WU),this._instantiationService.createInstance(UU)],this._instantiationService.createInstance(gde),n),this._splitView.addView({onDidChange:Ee.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},sW.Distribute),this._splitView.addView({onDidChange:Ee.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)}},sW.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let o=(r,s)=>{r instanceof Zg&&(s==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:s,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(r=>{r.sideBySide?o(r.element,"side"):r.editorOptions.pinned?o(r.element,"goto"):o(r.element,"show")})),_l(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new hn(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=y("noResults","No results"),ql(this._messageContainer),Promise.resolve(void 0)):(_l(this._messageContainer),this._decorationsManager=new SBe(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=>{let{event:t,target:n}=e;if(t.detail!==2)return;let o=this._getFocusedReference();o&&this._onDidSelectReference.fire({element:{uri:o.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),ql(this._treeContainer),ql(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(){let[e]=this._tree.getFocus();if(e instanceof Zg)return e;if(e instanceof LC&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Vt.inMemory?this.setTitle(Bct(e.uri),this._uriLabel.getUriLabel(IE(e.uri))):this.setTitle(y("peekView.alternateTitle","References"));let n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));let o=await n;if(!this._model){o.dispose();return}Oi(this._previewModelReference);let r=o.object;if(r){let s=this._preview.getModel()===r.textEditorModel?0:1,a=R.lift(e.range).collapseToStart();this._previewModelReference=o,this._preview.setModel(r.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),o.dispose()}};_de=Upi([N3(3,Wn),N3(4,Ss),N3(5,Re),N3(6,yBe),N3(7,FA),N3(8,Xt)],_de)});function u2(i,e){let t=Fyt(i);if(!t)return;let n=NC.get(t);n&&e(n)}var jpi,M3,Sde,c2,NC,DBe=D(()=>{Gt();Tt();Bp();de();hs();kt();Ue();l2();Be();to();ao();Bt();ht();Tx();mW();Ic();VA();L3();Wyt();An();sB();jpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},M3=function(i,e){return function(t,n){e(t,n,i)}},c2=new ze("referenceSearchVisible",!1,y("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),NC=class{static{Sde=this}static{this.ID="editor.contrib.referencesController"}static get(e){return e.getContribution(Sde.ID)}constructor(e,t,n,o,r,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=o,this._notificationService=r,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new se,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=c2.bindTo(n)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let o;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))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()}));let r="peekViewLayout",s=Cde.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(_de,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(y("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.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:u}=l;if(c)switch(u){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));let a=++this._requestIdPool;t.then(l=>{if(a!==this._requestIdPool||!this._widget){l.dispose();return}return this._model?.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(y("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let c=this._editor.getModel().uri,u=new J(e.startLineNumber,e.startColumn),d=this._model.nearestReference(c,u);if(d)return this._widget.setSelection(d).then(()=>{this._widget&&this._editor.getOption(87)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;let o=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(o),await this._gotoReference(o,!1),r?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.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){this._widget?.hide(),this._ignoreModelChangeEvent=!0;let n=R.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(n),this._widget.focusOnReferenceTree();else{let r=Sde.get(o),s=this._model.clone();this.closeWidget(),o.focus(),r?.toggleWidget(n,mo(a=>Promise.resolve(s)),this._peekMode??!1)}},o=>{this._ignoreModelChangeEvent=!1,ft(o)})}openReference(e,t,n){t||this.closeWidget();let{uri:o,range:r}=e;this._editorService.openCodeEditor({resource:o,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};NC=Sde=jpi([M3(2,Ze),M3(3,ei),M3(4,_n),M3(5,Re),M3(6,oc),M3(7,Et)],NC);Oa.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Qo(2089,60),when:ge.or(c2,Cu.inPeekEditor),handler(i){u2(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Oa.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:ge.or(c2,Cu.inPeekEditor),handler(i){u2(i,e=>{e.goToNextOrPreviousReference(!0)})}});Oa.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:ge.or(c2,Cu.inPeekEditor),handler(i){u2(i,e=>{e.goToNextOrPreviousReference(!1)})}});ii.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ii.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ii.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ii.registerCommand("closeReferenceSearch",i=>u2(i,e=>e.closeWidget()));Oa.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:ge.and(Cu.inPeekEditor,ge.not("config.editor.stablePeek"))});Oa.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:ge.and(c2,ge.not("config.editor.stablePeek"),ge.or(V.editorTextFocus,Mre.negate()))});Oa.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ge.and(c2,D2e,Gre.negate(),qre.negate()),handler(i){let t=i.get(mp).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof Zg&&u2(i,n=>n.revealReference(t[0]))}});Oa.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ge.and(c2,D2e,Gre.negate(),qre.negate()),handler(i){let t=i.get(mp).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof Zg&&u2(i,n=>n.openReference(t[0],!0,!0))}});ii.registerCommand("openReference",i=>{let t=i.get(mp).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof Zg&&u2(i,n=>n.openReference(t[0],!1,!0))})});var Uyt,jU,IBe,QU,TBe,kBe,jyt=D(()=>{et();de();Nc();Jt();hs();Ue();Be();Bt();Dc();ht();Xo();Tx();Ic();Uyt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},jU=function(i,e){return function(t,n){e(t,n,i)}},IBe=new ze("hasSymbols",!1,y("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),QU=At("ISymbolNavigationService"),TBe=class{constructor(e,t,n,o){this._editorService=t,this._notificationService=n,this._keybindingService=o,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=IBe.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){let 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();let n=new kBe(this._editorService),o=n.onDidChange(r=>{if(this._ignoreEditorChange)return;let s=this._editorService.getActiveCodeEditor();if(!s)return;let a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,u=!1;for(let d of t.references)if(Hx(d.uri,a.uri))c=!0,u=u||R.containsPosition(d.range,l);else if(c)break;(!c||!u)&&this.reset()});this._currentState=gc(n,o)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;let t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:R.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();let e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?y("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):y("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};TBe=Uyt([jU(0,Ze),jU(1,ei),jU(2,_n),jU(3,Xt)],TBe);oi(QU,TBe,1);Qe(new class extends Eo{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:IBe,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(QU).revealNext(e)}});Oa.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:IBe,primary:9,handler(i){i.get(QU).reset()}});kBe=class{constructor(e){this._listener=new Map,this._disposables=new se,this._onDidChange=new q,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(),Oi(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,gc(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};kBe=Uyt([jU(0,ei)],kBe)});function LBe(i,e){return e.uri.scheme===i.uri.scheme?!0:!Dz(e.uri,Vt.walkThroughSnippet,Vt.vscodeChatCodeBlock,Vt.vscodeChatCodeCompareBlock)}async function GU(i,e,t,n,o){let s=t.ordered(i,n).map(l=>Promise.resolve(o(l,i,e)).then(void 0,c=>{ln(c)})),a=await Promise.all(s);return Sl(a.flat()).filter(l=>LBe(i,l))}function DD(i,e,t,n,o){return GU(e,t,i,n,(r,s,a)=>r.provideDefinition(s,a,o))}function Ede(i,e,t,n,o){return GU(e,t,i,n,(r,s,a)=>r.provideDeclaration(s,a,o))}function Dde(i,e,t,n,o){return GU(e,t,i,n,(r,s,a)=>r.provideImplementation(s,a,o))}function Tde(i,e,t,n,o){return GU(e,t,i,n,(r,s,a)=>r.provideTypeDefinition(s,a,o))}function R3(i,e,t,n,o,r){return GU(e,t,i,o,async(s,a,l)=>{let c=(await s.provideReferences(a,l,{includeDeclaration:!0},r))?.filter(d=>LBe(a,d));if(!n||!c||c.length!==2)return c;let u=(await s.provideReferences(a,l,{includeDeclaration:!1},r))?.filter(d=>LBe(a,d));return u&&u.length===1?u:c})}async function M1(i){let e=await i(),t=new Cf(e,""),n=t.references.map(o=>o.link);return t.dispose(),n}var kde=D(()=>{Wt();sn();Tt();xl();Jt();Hi();L3();Ec("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(Me),o=DD(n.definitionProvider,e,t,!1,Nt.None);return M1(()=>o)});Ec("_executeDefinitionProvider_recursive",(i,e,t)=>{let n=i.get(Me),o=DD(n.definitionProvider,e,t,!0,Nt.None);return M1(()=>o)});Ec("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(Me),o=Tde(n.typeDefinitionProvider,e,t,!1,Nt.None);return M1(()=>o)});Ec("_executeTypeDefinitionProvider_recursive",(i,e,t)=>{let n=i.get(Me),o=Tde(n.typeDefinitionProvider,e,t,!0,Nt.None);return M1(()=>o)});Ec("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(Me),o=Ede(n.declarationProvider,e,t,!1,Nt.None);return M1(()=>o)});Ec("_executeDeclarationProvider_recursive",(i,e,t)=>{let n=i.get(Me),o=Ede(n.declarationProvider,e,t,!0,Nt.None);return M1(()=>o)});Ec("_executeReferenceProvider",(i,e,t)=>{let n=i.get(Me),o=R3(n.referenceProvider,e,t,!1,!1,Nt.None);return M1(()=>o)});Ec("_executeReferenceProvider_recursive",(i,e,t)=>{let n=i.get(Me),o=R3(n.referenceProvider,e,t,!1,!0,Nt.None);return M1(()=>o)});Ec("_executeImplementationProvider",(i,e,t)=>{let n=i.get(Me),o=Dde(n.implementationProvider,e,t,!1,Nt.None);return M1(()=>o)});Ec("_executeImplementationProvider_recursive",(i,e,t)=>{let n=i.get(Me),o=Dde(n.implementationProvider,e,t,!0,Nt.None);return M1(()=>o)})});var d2,R1,MC,Ide,Lde,Nde,Mde,FBe,Rde=D(()=>{Zl();Gt();Bp();gn();mn();SC();ZB();Jt();hs();IC();kt();Ue();An();ro();DBe();L3();jyt();f3();l2();Be();go();to();Bt();ht();Ic();o0();kde();Hi();ld();sB();Xr.appendMenuItem(tt.EditorContext,{submenu:tt.EditorContextPeek,title:y("peek.submenu","Peek"),group:"navigation",order:100});d2=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||J.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},R1=class i extends uh{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t={...e,f1:!0};if(t.menu)for(let n of hi.wrap(t.menu))(n.id===tt.EditorContext||n.id===tt.EditorContextPeek)&&(n.when=ge.and(e.precondition,n.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,o){if(!t.hasModel())return Promise.resolve(void 0);let r=e.get(_n),s=e.get(ei),a=e.get(dp),l=e.get(QU),c=e.get(Me),u=e.get(Re),d=t.getModel(),h=t.getPosition(),f=d2.is(n)?n:new d2(d,h),p=new Cp(t,5),g=hy(this._getLocationModel(c,f.model,f.position,p.token),p.token).then(async A=>{if(!A||p.token.isCancellationRequested)return;ms(A.ariaMessage);let v;if(A.referenceAt(d.uri,h)){let C=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(C)&&i._allSymbolNavigationCommands.has(C)&&(v=i._allSymbolNavigationCommands.get(C))}let w=A.references.length;if(w===0){if(!this.configuration.muteMessage){let C=d.getWordAtPosition(h);yu.get(t)?.showMessage(this._getNoResultFoundMessage(C),h)}}else if(w===1&&v)i._activeAlternativeCommands.add(this.desc.id),u.invokeFunction(C=>v.runEditorCommand(C,t,n,o).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,A,o)},A=>{r.error(A)}).finally(()=>{p.dispose()});return a.showWhile(g,250),g}async _onResult(e,t,n,o,r){let s=this._getGoToPreference(n);if(!(n instanceof xu)&&(this.configuration.openInPeek||s==="peek"&&o.references.length>1))this._openInPeek(n,o,r);else{let a=o.firstReference(),l=o.references.length>1&&s==="gotoAndPeek",c=await this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,o,r):o.dispose(),s==="goto"&&t.put(a)}}async _openReference(e,t,n,o,r){let s;if(SYe(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=await t.openCodeEditor({resource:n.uri,options:{selection:R.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,o);if(a){if(r){let l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}}_openInPeek(e,t,n){let o=NC.get(e);o&&e.hasModel()?o.toggleWidget(n??e.getSelection(),mo(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}},MC=class extends R1{async _getLocationModel(e,t,n,o){return new Cf(await DD(e.definitionProvider,t,n,!1,o),y("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y("noResultWord","No definition found for '{0}'",e.word):y("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}};Hn(class NBe extends MC{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:NBe.id,title:{...Ft("actions.goToDecl.label","Go to Definition"),mnemonicTitle:y({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:V.hasDefinitionProvider,keybinding:[{when:V.editorTextFocus,primary:70,weight:100},{when:ge.and(V.editorTextFocus,x2e),primary:2118,weight:100}],menu:[{id:tt.EditorContext,group:"navigation",order:1.1},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ii.registerCommandAlias("editor.action.goToDeclaration",NBe.id)}});Hn(class MBe extends MC{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:MBe.id,title:Ft("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:ge.and(V.hasDefinitionProvider,V.isInEmbeddedEditor.toNegated()),keybinding:[{when:V.editorTextFocus,primary:Qo(2089,70),weight:100},{when:ge.and(V.editorTextFocus,x2e),primary:Qo(2089,2118),weight:100}]}),ii.registerCommandAlias("editor.action.openDeclarationToTheSide",MBe.id)}});Hn(class RBe extends MC{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:RBe.id,title:Ft("actions.previewDecl.label","Peek Definition"),precondition:ge.and(V.hasDefinitionProvider,Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),keybinding:{when:V.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:tt.EditorContextPeek,group:"peek",order:2}}),ii.registerCommandAlias("editor.action.previewDeclaration",RBe.id)}});Ide=class extends R1{async _getLocationModel(e,t,n,o){return new Cf(await Ede(e.declarationProvider,t,n,!1,o),y("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?y("decl.noResultWord","No declaration found for '{0}'",e.word):y("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}};Hn(class Qyt extends Ide{static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Qyt.id,title:{...Ft("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:y({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:ge.and(V.hasDeclarationProvider,V.isInEmbeddedEditor.toNegated()),menu:[{id:tt.EditorContext,group:"navigation",order:1.3},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?y("decl.noResultWord","No declaration found for '{0}'",e.word):y("decl.generic.noResults","No declaration found")}});Hn(class extends Ide{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:Ft("actions.peekDecl.label","Peek Declaration"),precondition:ge.and(V.hasDeclarationProvider,Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),menu:{id:tt.EditorContextPeek,group:"peek",order:3}})}});Lde=class extends R1{async _getLocationModel(e,t,n,o){return new Cf(await Tde(e.typeDefinitionProvider,t,n,!1,o),y("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):y("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}};Hn(class Gyt extends Lde{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Gyt.ID,title:{...Ft("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:y({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:V.hasTypeDefinitionProvider,keybinding:{when:V.editorTextFocus,primary:0,weight:100},menu:[{id:tt.EditorContext,group:"navigation",order:1.4},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}});Hn(class qyt extends Lde{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:qyt.ID,title:Ft("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:ge.and(V.hasTypeDefinitionProvider,Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),menu:{id:tt.EditorContextPeek,group:"peek",order:4}})}});Nde=class extends R1{async _getLocationModel(e,t,n,o){return new Cf(await Dde(e.implementationProvider,t,n,!1,o),y("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?y("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):y("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}};Hn(class Yyt extends Nde{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Yyt.ID,title:{...Ft("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:y({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:V.hasImplementationProvider,keybinding:{when:V.editorTextFocus,primary:2118,weight:100},menu:[{id:tt.EditorContext,group:"navigation",order:1.45},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}});Hn(class Kyt extends Nde{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Kyt.ID,title:Ft("actions.peekImplementation.label","Peek Implementations"),precondition:ge.and(V.hasImplementationProvider,Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),keybinding:{when:V.editorTextFocus,primary:3142,weight:100},menu:{id:tt.EditorContextPeek,group:"peek",order:5}})}});Mde=class extends R1{_getNoResultFoundMessage(e){return e?y("references.no","No references found for '{0}'",e.word):y("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}};Hn(class extends Mde{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...Ft("goToReferences.label","Go to References"),mnemonicTitle:y({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:ge.and(V.hasReferenceProvider,Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),keybinding:{when:V.editorTextFocus,primary:1094,weight:100},menu:[{id:tt.EditorContext,group:"navigation",order:1.45},{id:tt.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,n,o){return new Cf(await R3(e.referenceProvider,t,n,!0,!1,o),y("ref.title","References"))}});Hn(class extends Mde{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:Ft("references.action.label","Peek References"),precondition:ge.and(V.hasReferenceProvider,Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated()),menu:{id:tt.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,n,o){return new Cf(await R3(e.referenceProvider,t,n,!1,!1,o),y("ref.title","References"))}});FBe=class extends R1{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:Ft("label.generic","Go to Any Symbol"),precondition:ge.and(Cu.notInPeekEditor,V.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}async _getLocationModel(e,t,n,o){return new Cf(this._references,y("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&y("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}};ii.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Je},{name:"position",description:"The position at which to start",constraint:J.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(i,e,t,n,o,r,s)=>{gi(Je.isUri(e)),gi(J.isIPosition(t)),gi(Array.isArray(n)),gi(typeof o>"u"||typeof o=="string"),gi(typeof s>"u"||typeof s=="boolean");let a=i.get(ei),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(p0(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let u=new class extends FBe{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!s,openToSide:!1},n,o);c.get(Re).invokeFunction(u.run.bind(u),l)})}});ii.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Je},{name:"position",description:"The position at which to start",constraint:J.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(i,e,t,n,o)=>{i.get(Ii).executeCommand("editor.action.goToLocations",e,t,n,o,void 0,!0)}});ii.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{gi(Je.isUri(e)),gi(J.isIPosition(t));let n=i.get(Me),o=i.get(ei);return o.openCodeEditor({resource:e},o.getFocusedCodeEditor()).then(r=>{if(!p0(r)||!r.hasModel())return;let s=NC.get(r);if(!s)return;let a=mo(c=>R3(n.referenceProvider,r.getModel(),J.lift(t),!1,!1,c).then(u=>new Cf(u,y("ref.title","References")))),l=new R(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});ii.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});async function Jyt(i,e,t,n){let o=i.get(Ss),r=i.get(ia),s=i.get(Ii),a=i.get(Re),l=i.get(_n);if(await n.item.resolve(Nt.None),!n.part.location)return;let c=n.part.location,u=[],d=new Set(Xr.getMenuItems(tt.EditorContext).map(f=>rE(f)?f.command.id:mD()));for(let f of R1.all())d.has(f.desc.id)&&u.push(new ta(f.desc.id,Kl.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{let p=await o.createModelReference(c.uri);try{let g=new d2(p.object.textEditorModel,R.getStartPosition(c.range)),A=n.item.anchor.range;await a.invokeFunction(f.runEditorCommand.bind(f),e,g,A)}finally{p.dispose()}}));if(n.part.command){let{command:f}=n.part;u.push(new yr),u.push(new ta(f.id,f.title,void 0,!0,async()=>{try{await s.executeCommand(f.id,...f.arguments??[])}catch(p){l.notify({severity:vE.Error,source:n.item.provider.displayName,message:p})}}))}let h=e.getOption(128);r.showContextMenu({domForShadowRoot:h?e.getDomNode()??void 0:void 0,getAnchor:()=>{let f=bn(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function Fde(i,e,t,n){let r=await i.get(Ss).createModelReference(n.uri);await t.invokeWithinContext(async s=>{let a=e.hasSideBySideModifier,l=s.get(Ze),c=Cu.inPeekEditor.getValue(l),u=!a&&t.getOption(89)&&!c;return new MC({openToSide:a,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new d2(r.object.textEditorModel,R.getStartPosition(n.range)),R.lift(n.range))}),r.dispose()}var OBe=D(()=>{Ye();il();sn();yU();Ue();dm();Rde();l2();go();to();Bt();Ed();ht();Ic()});function Gpi(i){return i.replace(/[ \t]/g,"\xA0")}var Qpi,F3,O3,PBe,Xyt,P3,BBe,h2,zBe=D(()=>{Ye();Wt();Gt();sn();Tt();de();Xl();gn();mn();sO();MN();ea();gm();Ue();ro();ol();bs();hm();Hi();dm();zU();gBe();OBe();to();Dc();ht();Ic();nr();io();Qpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},F3=function(i,e){return function(t,n){e(t,n,i)}},PBe=class i{constructor(){this._entries=new Jl(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let n=i._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},Xyt=At("IInlayHintsCache");oi(Xyt,PBe,1);P3=class{constructor(e,t){this.item=e,this.index=t}get part(){let e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}},BBe=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},h2=class{static{O3=this}static{this.ID="editor.contrib.InlayHints"}static{this._MAX_DECORATORS=1500}static{this._MAX_LABEL_LEN=43}static get(e){return e.getContribution(O3.ID)??void 0}constructor(e,t,n,o,r,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=o,this._commandService=r,this._notificationService=s,this._instaService=a,this._disposables=new se,this._sessionDisposables=new se,this._decorationsMetadata=new Map,this._ruleFactory=new rO(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(142)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(142);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if(e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(bx.getInstance().event(c=>{if(!this._editor.hasModel())return;let u=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(u!==this._activeRenderMode){this._activeRenderMode=u;let d=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(d);this._updateHintsDecorators([d.getFullModelRange()],h),s.schedule(0)}}))}let n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(He(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let o,r=new Set,s=new si(async()=>{let a=Date.now();o?.dispose(!0),o=new Mi;let l=t.onWillDispose(()=>o?.cancel());try{let c=o.token,u=await HU.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){u.dispose();return}for(let d of u.provider)typeof d.onDidChangeInlayHints=="function"&&!r.has(d)&&(r.add(d),this._sessionDisposables.add(d.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(u),this._updateHintsDecorators(u.ranges,u.items),this._cacheHintsForFastRestore(t)}catch(c){ft(c)}finally{o.dispose(),l.dispose()}},this._debounceInfo.get(t));this._sessionDisposables.add(s),this._sessionDisposables.add(He(()=>o?.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{o?.cancel();let l=Math.max(s.delay,1250);s.schedule(l)})),this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let e=new se,t=e.add(new N1(this._editor)),n=new se;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(o=>{let[r]=o,s=this._getInlayHintLabelPart(r),a=this._editor.getModel();if(!s||!a){n.clear();return}let l=new Mi;n.add(He(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new BBe(s,r.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,u=new R(c,1,c,a.getLineMaxColumn(c)),d=this._getInlineHintsForRange(u);this._updateHintsDecorators([u],d),n.add(He(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([u],d)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(async o=>{let r=this._getInlayHintLabelPart(o);if(r){let s=r.part;s.location?this._instaService.invokeFunction(Fde,o,this._editor,s.location):eJ.is(s.command)&&await this._invokeCommand(s.command,r.item)}})),e}_getInlineHintsForRange(e){let t=new Set;for(let n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(async t=>{if(t.event.detail!==2)return;let n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),await n.item.resolve(Nt.None),Kr(n.item.hint.textEdits))){let o=n.item.hint.textEdits.map(r=>kn.replace(R.lift(r.range),r.text));this._editor.executeEdits("inlayHint.default",o),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!To(e.event.target))return;let t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(Jyt,this._editor,e.event.target,t)})}_getInlayHintLabelPart(e){if(e.target.type!==6)return;let t=e.target.detail.injectedText?.options;if(t instanceof p1&&t?.attachedData instanceof P3)return t.attachedData}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(n){this._notificationService.notify({severity:vE.Error,source:t.provider.displayName,message:n})}}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[n,o]of this._decorationsMetadata){if(t.has(o.item))continue;let r=e.getDecorationRange(n);if(r){let s=new VU(r,o.item.anchor.direction),a=o.item.with({anchor:s});t.set(o.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),o=[];for(let r of n.sort(R.compareRangesUsingStarts)){let s=t.validateRange(new R(r.startLineNumber-30,r.startColumn,r.endLineNumber+30,r.endColumn));o.length===0||!R.areIntersectingOrTouching(o[o.length-1],s)?o.push(s):o[o.length-1]=R.plusRange(o[o.length-1],s)}return o}_updateHintsDecorators(e,t){let n=[],o=(p,g,A,v,w)=>{let C={content:A,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:g.className,cursorStops:v,attachedData:w};n.push({item:p,classNameRef:g,decoration:{range:p.anchor.range,options:{description:"InlayHint",showIfCollapsed:p.anchor.range.isEmpty(),collapseOnReplaceEdit:!p.anchor.range.isEmpty(),stickiness:0,[p.anchor.direction]:this._activeRenderMode===0?C:void 0}}})},r=(p,g)=>{let A=this._ruleFactory.createClassNameRef({width:`${s/3|0}px`,display:"inline-block"});o(p,A,"\u200A",g?af.Right:af.None)},{fontSize:s,fontFamily:a,padding:l,isUniform:c}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,a);let d={line:0,totalLen:0};for(let p of t){if(d.line!==p.anchor.range.startLineNumber&&(d={line:p.anchor.range.startLineNumber,totalLen:0}),d.totalLen>O3._MAX_LABEL_LEN)continue;p.hint.paddingLeft&&r(p,!1);let g=typeof p.hint.label=="string"?[{label:p.hint.label}]:p.hint.label;for(let A=0;A0&&(E=E.slice(0,-T)+"\u2026",I=!0),o(p,this._ruleFactory.createClassNameRef(_),Gpi(E),C&&!p.hint.paddingRight?af.Right:af.None,new P3(p,A)),I)break}if(p.hint.paddingRight&&r(p,!0),n.length>O3._MAX_DECORATORS)break}let h=[];for(let[p,g]of this._decorationsMetadata){let A=this._editor.getModel()?.getDecorationRange(p);A&&e.some(v=>v.containsRange(A))&&(h.push(p),g.classNameRef.dispose(),this._decorationsMetadata.delete(p))}let f=yf.capture(this._editor);this._editor.changeDecorations(p=>{let g=p.deltaDecorations(h,n.map(A=>A.decoration));for(let A=0;An)&&(r=n);let s=e.fontFamily||o;return{fontSize:r,fontFamily:s,padding:t,isUniform:!t&&s===o&&r===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};h2=O3=Qpi([F3(1,Me),F3(2,Aa),F3(3,Xyt),F3(4,Ii),F3(5,_n),F3(6,Re)],h2);ii.registerCommand("_executeInlayHintProvider",async(i,...e)=>{let[t,n]=e;gi(Je.isUri(t)),gi(R.isIRange(n));let{inlayHintsProvider:o}=i.get(Me),r=await i.get(Ss).createModelReference(t);try{let s=await HU.create(o,r.object.textEditorModel,[R.lift(n)],Nt.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{r.dispose()}})});var qpi,TD,Ode,B3,VBe=D(()=>{Gt();Td();kt();bs();Xg();Il();dm();hBe();PU();zBe();ao();Dd();Hi();Be();wi();gBe();Wt();Xo();zx();to();qpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},TD=function(i,e){return function(t,n){e(t,n,i)}},Ode=class extends CD{constructor(e,t,n,o){super(10,t,e.item.anchor.range,n,o,!0),this.part=e}},B3=class extends ED{constructor(e,t,n,o,r,s,a,l,c){super(e,t,n,s,l,o,r,c),this._resolverService=a,this.hoverOrdinal=6}suggestHoverAnchor(e){if(!h2.get(this._editor)||e.target.type!==6)return null;let n=e.target.detail.injectedText?.options;return n instanceof p1&&n.attachedData instanceof P3?new Ode(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof Ode?new Wu(async o=>{let{part:r}=e;if(await r.item.resolve(n),n.isCancellationRequested)return;let s;typeof r.item.hint.tooltip=="string"?s=new $r().appendText(r.item.hint.tooltip):r.item.hint.tooltip&&(s=r.item.hint.tooltip),s&&o.emitOne(new xf(this,e.range,[s],!1,0)),Kr(r.item.hint.textEdits)&&o.emitOne(new xf(this,e.range,[new $r().appendText(y("hint.dbl","Double-click to insert"))],!1,10001));let a;if(typeof r.part.tooltip=="string"?a=new $r().appendText(r.part.tooltip):r.part.tooltip&&(a=r.part.tooltip),a&&o.emitOne(new xf(this,e.range,[a],!1,1)),r.part.location||r.part.command){let c,d=this._editor.getOption(78)==="altKey"?jt?y("links.navigate.kb.meta.mac","cmd + click"):y("links.navigate.kb.meta","ctrl + click"):jt?y("links.navigate.kb.alt.mac","option + click"):y("links.navigate.kb.alt","alt + click");r.part.location&&r.part.command?c=new $r().appendText(y("hint.defAndCommand","Go to Definition ({0}), right click for more",d)):r.part.location?c=new $r().appendText(y("hint.def","Go to Definition ({0})",d)):r.part.command&&(c=new $r(`[${y("hint.cmd","Execute Command")}](${Tyt(r.part.command)} "${r.part.command.title}") (${d})`,{isTrusted:!0})),c&&o.emitOne(new xf(this,e.range,[c],!1,1e4))}let l=await this._resolveInlayHintLabelPartHover(r,n);for await(let c of l)o.emitOne(c)}):Wu.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return Wu.EMPTY;let{uri:n,range:o}=e.part.location,r=await this._resolverService.createModelReference(n);try{let s=r.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?OU(this._languageFeaturesService.hoverProvider,s,new J(o.startLineNumber,o.startColumn),t).filter(a=>!Wx(a.hover.contents)).map(a=>new xf(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Wu.EMPTY}finally{r.dispose()}}};B3=qpi([TD(1,on),TD(2,Qr),TD(3,Xt),TD(4,dh),TD(5,Et),TD(6,Ss),TD(7,Me),TD(8,Ii)],B3)});var Pde,HBe,WBe,Zyt=D(()=>{Xg();de();uBe();bs();kt();Ue();Ye();PU();Kue();VBe();Tt();Pde=class i extends H{constructor(e,t,n,o,r,s){super();let a=t.anchor,l=t.hoverParts;this._renderedHoverParts=this._register(new WBe(e,n,l,s,r));let{showAtPosition:c,showAtSecondaryPosition:u}=i.computeHoverPositions(e,a.range,l);this.shouldAppearBeforeContent=l.some(d=>d.isBeforeContent),this.showAtPosition=c,this.showAtSecondaryPosition=u,this.initialMousePosX=a.initialMousePosX,this.initialMousePosY=a.initialMousePosY,this.shouldFocus=o.shouldFocus,this.source=o.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,t,n){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,n)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,n){let o=1;if(e.hasModel()){let u=e._getViewModel(),d=u.coordinatesConverter,h=d.convertModelRangeToViewRange(t),f=u.getLineMinColumn(h.startLineNumber),p=new J(h.startLineNumber,f);o=d.convertViewPositionToModelPosition(p).column}let r=t.startLineNumber,s=t.startColumn,a;for(let u of n){let d=u.range,h=d.startLineNumber===r,f=d.endLineNumber===r;if(h&&f){let g=d.startColumn,A=Math.min(s,g);s=Math.max(A,o)}u.forceShowAtRange&&(a=d)}let l,c;if(a){let u=a.getStartPosition();l=u,c=u}else l=t.getStartPosition(),c=new J(r,s);return{showAtPosition:l,showAtSecondaryPosition:c}}},HBe=class{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}},WBe=class i extends H{static{this._DECORATION_OPTIONS=Ot.register({description:"content-hover-highlight",className:"hoverHighlight"})}constructor(e,t,n,o,r){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=r,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,n,r,o)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,n)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(t.length===0)return H.None;let n=t[0].range;for(let r of t){let s=r.range;n=R.plusRange(n,s)}let o=e.createDecorationsCollection();return o.set([{range:n,options:i._DECORATION_OPTIONS}]),He(()=>{o.clear()})}_renderParts(e,t,n,o){let r=new E3(o),s={fragment:this._fragment,statusBar:r,...n},a=new se;for(let c of e){let u=this._renderHoverPartsForParticipant(t,c,s);a.add(u);for(let d of u.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:c,hoverPart:d.hoverPart,hoverElement:d.hoverElement})}let l=this._renderStatusBar(this._fragment,r);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),He(()=>{a.dispose()})}_renderHoverPartsForParticipant(e,t,n){let o=e.filter(s=>s.owner===t);return o.length>0?t.renderHoverParts(n,o):new Tm([])}_renderStatusBar(e,t){if(t.hasContent)return new HBe(e,t)}_registerListenersOnRenderedParts(){let e=new se;return this._renderedParts.forEach((t,n)=>{let o=t.hoverElement;o.tabIndex=0,e.add(ce(o,Te.FOCUS_IN,r=>{r.stopPropagation(),this._focusedHoverPartIndex=n})),e.add(ce(o,Te.FOCUS_OUT,r=>{r.stopPropagation(),this._focusedHoverPartIndex=-1}))}),e}_updateMarkdownAndColorParticipantInfo(e){let t=e.find(n=>n instanceof ED&&!(n instanceof B3));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find(n=>n instanceof o2)}async updateHoverVerbosityLevel(e,t,n){if(!this._markdownHoverParticipant)return;let o=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,t);if(o===void 0)return;let r=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,o,n);r&&(this._renderedParts[t]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:r.hoverPart,hoverElement:r.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){let n=this._renderedParts[t];if(!n||n.type!=="hoverPart"||!(n.participant===e))return;let r=this._renderedParts.findIndex(s=>s.type==="hoverPart"&&s.participant===e);if(r===-1)throw new fi;return t-r}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}}});var Ypi,$yt,Bde,e1t=D(()=>{Ye();de();ro();lBe();Xg();ht();Xo();yyt();wyt();xyt();et();Zyt();RU();Ypi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},$yt=function(i,e){return function(t,n){e(t,n,i)}},Bde=class extends H{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._onContentsChanged=this._register(new q),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(lde,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new cde(this._editor,this._participants),this._hoverOperation=this._register(new S3(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){let e=[];for(let t of Jg.getAll()){let n=this._instantiationService.createInstance(t,this._editor);e.push(n)}return e.sort((t,n)=>t.hoverOrdinal-n.hoverOrdinal),this._register(this._contentHoverWidget.onDidResize(()=>{this._participants.forEach(t=>t.handleResize?.())})),e}_registerListeners(){this._register(this._hoverOperation.onResult(t=>{if(!this._computer.anchor)return;let n=t.hasLoadingMessage?this._addLoadingMessage(t.value):t.value;this._withResult(new FU(this._computer.anchor,n,t.isComplete))}));let e=this._contentHoverWidget.getDomNode();this._register(un(e,"keydown",t=>{t.equals(9)&&this.hide()})),this._register(un(e,"mouseleave",t=>{this._onMouseLeave(t)})),this._register(Gn.onDidChange(()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,t,n,o,r){if(!(this._contentHoverWidget.position&&this._currentResult))return e?(this._startHoverOperationIfNecessary(e,t,n,o,!1),!0):!1;let a=this._editor.getOption(60).sticky,l=r&&this._contentHoverWidget.isMouseGettingCloser(r.event.posx,r.event.posy);return a&&l?(e&&this._startHoverOperationIfNecessary(e,t,n,o,!0),!0):e?this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,o,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,o,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,o,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=o,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_setCurrentResult(e){let t=e;if(this._currentResult===t)return;t&&t.hoverParts.length===0&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(let t of this._participants){if(!t.createLoadingMessage)continue;let n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}return e}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;let o=e.hoverParts.length===0,r=this._computer.insistOnKeepingHoverVisible;o&&r||this._setCurrentResult(e)}_showHover(e){let t=this._getHoverContext();this._renderedContentHover=new Pde(this._editor,e,this._participants,this._computer,t,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},setMinimumDimensions:o=>{this._contentHoverWidget.setMinimumDimensions(o)}}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;let n=this._findHoverAnchorCandidates(e);if(!(n.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);let r=n[0];return this._startShowingOrUpdateHover(r,0,0,!1,e)}_findHoverAnchorCandidates(e){let t=[];for(let o of this._participants){if(!o.suggestHoverAnchor)continue;let r=o.suggestHoverAnchor(e);r&&t.push(r)}let n=e.target;switch(n.type){case 6:{t.push(new C3(0,n.range,e.event.posx,e.event.posy));break}case 7:{let o=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;if(!(!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-o.priority),t}_onMouseLeave(e){let t=this._editor.getDomNode();(!t||!_D(t,e.x,e.y))&&this.hide()}startShowingAtRange(e,t,n,o){this._startShowingOrUpdateHover(new C3(0,e,void 0,void 0),t,n,o,null)}async updateHoverVerbosityLevel(e,t,n){this._renderedContentHover?.updateHoverVerbosityLevel(e,t,n)}focusedHoverPartIndex(){return this._renderedContentHover?.focusedHoverPartIndex??-1}containsNode(e){return e?this._contentHoverWidget.getDomNode().contains(e):!1}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};Bde=Ypi([$yt(1,Re),$yt(2,Xt)],Bde)});var qU=D(()=>{});var Kpi,t1t,UBe,zde,Rc,Vde=D(()=>{Xue();de();ht();ode();Xo();Gt();RU();e1t();qU();et();Kpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},t1t=function(i,e){return function(t,n){e(t,n,i)}},zde=!1,Rc=class extends H{static{UBe=this}static{this.ID="editor.contrib.contentHover"}constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._onHoverContentsChanged=this._register(new q),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new se,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new si(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(UBe.ID)}_hookListeners(){let e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._shouldNotHideCurrentHoverWidget(e)&&this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){let t=this._contentWidget?.getDomNode();return t?_D(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e))||zde||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,n=(s,a)=>{let l=this._isMouseOnContentHoverWidget(s);return a&&l},o=s=>{let a=this._isMouseOnContentHoverWidget(s),l=this._contentWidget?.isColorPickerVisible??!1;return a&&l},r=(s,a)=>(a&&this._contentWidget?.containsNode(s.event.browserEvent.view?.document.activeElement)&&!s.event.browserEvent.view?.getSelection()?.isCollapsed)??!1;return n(e,t)||o(e)||r(e,t)}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,this._contentWidget?.isFocused||this._contentWidget?.isResizing))return;let t=this._hoverSettings.sticky;if(t&&this._contentWidget?.isVisibleFromKeyboard)return;if(this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}let o=this._hoverSettings.hidingDelay;if(this._contentWidget?.isVisible&&t&&o>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(o);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;let n=e.target.element?.classList.contains("colorpicker-color-decoration"),o=this._editor.getOption(149),r=this._hoverSettings.enabled,s=this._hoverState.activatedByDecoratorClick;if(n&&(o==="click"&&!s||o==="hover"&&!r&&!zde||o==="clickAndHover"&&!r&&!s)||!n&&!r&&!s){this._hideWidgets();return}this._tryShowHoverWidget(e)||zde||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateContentWidget().showsOrWillShow(e)}_onKeyDown(e){if(!this._editor.hasModel())return;let t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=t.kind===1||t.kind===2&&(t.commandId===Jue||t.commandId===r2||t.commandId===s2)&&this._contentWidget?.isVisible;e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||n||this._hideWidgets()}_hideWidgets(){zde||this._hoverState.mouseDown&&this._contentWidget?.isColorPickerVisible||TC.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Bde,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}showContentHover(e,t,n,o,r=!1){this._hoverState.activatedByDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,o)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,n){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,n)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}};Rc=UBe=Kpi([t1t(1,Re),t1t(2,Xt)],Rc)});var Hde,i1t=D(()=>{de();Jt();Ue();qPe();Kue();Vde();Xg();Hde=class extends H{static{this.ID="editor.contrib.colorContribution"}constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=this._editor.getOption(149);if(t!=="click"&&t!=="clickAndHover")return;let n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==GPe||!n.range)return;let o=this._editor.getContribution(Rc.ID);if(o&&!o.isColorPickerVisible){let r=new R(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);o.showContentHover(r,1,0,!1,!0)}}};St(Hde.ID,Hde,2);Jg.register(o2)});var o1t,z3,jBe,QBe,kD,n1t,Jpi,GBe,qBe,r1t=D(()=>{de();Kue();ht();uBe();Xo();et();Hi();Jt();An();Bt();OPe();Ye();Que();WA();o1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},z3=function(i,e){return function(t,n){e(t,n,i)}},kD=class extends H{static{jBe=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(e,t,n){super(),this._editor=e,this._instantiationService=n,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=V.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=V.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(GBe,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(jBe.ID)}};kD=jBe=o1t([z3(1,Ze),z3(2,Re)],kD);St(kD.ID,kD,1);n1t=8,Jpi=22,GBe=class extends H{static{QBe=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(e,t,n,o,r,s,a){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._keybindingService=r,this._languageFeaturesService=s,this._editorWorkerService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new q),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=o.createInstance(_3,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;let l=this._editor.getSelection(),c=l?{startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},u=this._register(iu(this._body));this._register(u.onDidBlur(d=>{this.hide()})),this._register(u.onDidFocus(d=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(d=>{let h=d.target.element?.classList;h&&h.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(d=>{this._render(d.value,d.foundInEditor)})),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return QBe.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){let t=await this._computeAsync(e);t&&this._onResult.fire(new qBe(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;let t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=await this._standaloneColorPickerParticipant.createColorHover(t,new i2(this._editorWorkerService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null}_render(e,t){let n=document.createDocumentFragment(),o=this._register(new E3(this._keybindingService)),r={fragment:n,statusBar:o,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;let s=this._standaloneColorPickerParticipant.renderHoverParts(r,[e]);if(!s)return;this._register(s.disposables);let a=s.colorPicker;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),a.layout();let l=a.body,c=l.saturationBox.domNode.clientWidth,u=l.domNode.clientWidth-c-Jpi-n1t,d=a.body.enterButton;d?.onClicked(()=>{this.updateEditor(),this.hide()});let h=a.header,f=h.pickedColorNode;f.style.width=c+n1t+"px";let p=h.originalColorNode;p.style.width=u+"px",a.header.closeButton?.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};GBe=QBe=o1t([z3(3,Re),z3(4,Xt),z3(5,Me),z3(6,wa)],GBe);qBe=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var YBe,KBe,JBe,s1t=D(()=>{Jt();Be();r1t();An();go();Que();YBe=class extends uh{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...Ft("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:y({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:tt.CommandPalette}],metadata:{description:Ft("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){kD.get(t)?.showOrFocus()}},KBe=class extends Pe{constructor(){super({id:"editor.action.hideColorPicker",label:y({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:V.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:Ft("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,t){kD.get(t)?.hide()}},JBe=class extends Pe{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:y({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:V.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:Ft("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){kD.get(t)?.insertColor()}};Ce(KBe);Ce(JBe);Hn(YBe)});var RC,XBe=D(()=>{gm();kt();Ue();Qn();RC=class i{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;let o=t.length,r=e.length;if(n+o>r)return!1;for(let s=0;s=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,o,r,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,u=e.endColumn,d=r.getLineContent(a),h=r.getLineContent(c),f=d.lastIndexOf(t,l-1+t.length),p=h.indexOf(n,u-1-n.length);if(f!==-1&&p!==-1)if(a===c)d.substring(f+t.length,p).indexOf(n)>=0&&(f=-1,p=-1);else{let A=d.substring(f+t.length),v=h.substring(0,p);(A.indexOf(n)>=0||v.indexOf(n)>=0)&&(f=-1,p=-1)}let g;f!==-1&&p!==-1?(o&&f+t.length0&&h.charCodeAt(p-1)===32&&(n=" "+n,p-=1),g=i._createRemoveBlockCommentOperations(new R(a,f+t.length+1,c,p+1),t,n)):(g=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(let A of g)s.addTrackedEditOperation(A.range,A.text)}static _createRemoveBlockCommentOperations(e,t,n){let o=[];return R.isEmpty(e)?o.push(kn.delete(new R(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(o.push(kn.delete(new R(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),o.push(kn.delete(new R(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),o}static _createAddBlockCommentOperations(e,t,n,o){let r=[];return R.isEmpty(e)?r.push(kn.replace(new R(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(kn.insert(new J(e.startLineNumber,e.startColumn),t+(o?" ":""))),r.push(kn.insert(new J(e.endLineNumber,e.endColumn),(o?" ":"")+n))),r}getEditOperations(e,t){let n=this._selection.startLineNumber,o=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let r=e.getLanguageIdAtPosition(n,o),s=this.languageConfigurationService.getLanguageConfiguration(r).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let o=n[0],r=n[1];return new qe(o.range.endLineNumber,o.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{let o=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new qe(o.endLineNumber,o.endColumn+r,o.endLineNumber,o.endColumn+r)}}}});var Wde,a1t=D(()=>{Rt();gm();kt();Ue();Qn();XBe();Wde=class i{constructor(e,t,n,o,r,s,a){this.languageConfigurationService=e,this._selection=t,this._indentSize=n,this._type=o,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,o){e.tokenization.tokenizeIfCheap(t);let r=e.getLanguageIdAtPosition(t,1),s=o.getLanguageConfiguration(r).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,u=n-t+1;cr?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var YU,ZBe,$Be,e3e,t3e,l1t=D(()=>{Bp();Jt();Ue();An();Rs();XBe();a1t();Be();go();YU=class extends Pe{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(Gi);if(!t.hasModel())return;let o=t.getModel(),r=[],s=o.getOptions(),a=t.getOption(23),l=t.getSelections().map((u,d)=>({selection:u,index:d,ignoreFirstLine:!1}));l.sort((u,d)=>R.compareRangesUsingStarts(u.selection,d.selection));let c=l[0];for(let u=1;u{Ye();BL();il();de();wi();Jt();An();Be();go();Bt();Ed();Xo();ao();sP();Xpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},f2=function(i,e){return function(t,n){e(t,n,i)}},p2=class{static{i3e=this}static{this.ID="editor.contrib.contextmenu"}static get(e){return e.getContribution(i3e.ID)}constructor(e,t,n,o,r,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=o,this._keybindingService=r,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new se,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let u=this._contextViewService.getContextViewElement(),d=c.srcElement;d.shadowRoot&&SA(u)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(24)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let o of this._editor.getSelections())if(o.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(24)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],o=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(let r of o){let[,s]=r,a=0;for(let l of s)if(l instanceof e0){let c=this._getMenuActions(e,l.item.submenu);c.length>0&&(n.push(new Tg(l.id,l.label,c)),a++)}else n.push(l),a++;a&&n.push(new yr)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let o=t;if(!o){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=bn(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;o={x:l,y:c}}let r=this._editor.getOption(128)&&!Ou;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>o,getActions:()=>e,getActionViewItem:s=>{let a=this._keybindingFor(s);if(a)return new Vg(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});let l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new Vg(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||kut(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(73),n=0,o=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run}),r=(c,u)=>new Tg(`menu-action-${++n}`,c,u,void 0),s=(c,u,d,h,f)=>{if(!u)return o({label:c,enabled:u,run:()=>{}});let p=A=>()=>{this._configurationService.updateValue(d,A)},g=[];for(let A of f)g.push(o({label:A.label,checked:h===A.value,run:p(A.value)}));return r(c,g)},a=[];a.push(o({label:y("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new yr),a.push(o({label:y("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(y("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:y("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:y("context.minimap.size.fill","Fill"),value:"fill"},{label:y("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(y("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:y("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:y("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(128)&&!Ou;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};p2=i3e=Xpi([f2(1,ia),f2(2,hh),f2(3,Ze),f2(4,Xt),f2(5,nl),f2(6,Et),f2(7,OA)],p2);n3e=class extends Pe{constructor(){super({id:"editor.action.showContextMenu",label:y("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:1092,weight:100}})}run(e,t){p2.get(t)?.showContextMenu()}};St(p2.ID,p2,2);Ce(n3e)});var KU,JU,V3,r3e,s3e,c1t=D(()=>{de();Jt();An();Be();KU=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let o=0;o{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;let n=new KU(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new JU(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 JU(new KU(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 JU(new KU(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}},r3e=class extends Pe{constructor(){super({id:"cursorUndo",label:y("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:2099,weight:100}})}run(e,t,n){V3.get(t)?.cursorUndo()}},s3e=class extends Pe{constructor(){super({id:"cursorRedo",label:y("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){V3.get(t)?.cursorRedo()}};St(V3.ID,V3,0);Ce(r3e);Ce(s3e)});var u1t=D(()=>{});var Ude,d1t=D(()=>{Ue();Qn();Ude=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new R(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 qe(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 qe(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.lineNumber{de();wi();u1t();Jt();kt();Ue();Qn();bs();d1t();jde=class i extends H{static{this.ID="editor.contrib.dragAndDrop"}static{this.TRIGGER_KEY_VALUE=jt?6:5}constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._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(35)||this._editor.getOption(22)||(H3(e)&&(this._modifierPressed=!0),this._mouseDown&&H3(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(H3(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.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){let t=e.target;if(this._dragSelection===null){let o=(this._editor.getSelections()||[]).filter(r=>t.position&&r.containsPosition(t.position));if(o.length===1)this._dragSelection=o[0];else return}H3(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){let t=new J(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let o=this._editor.getSelection();if(o){let{selectionStartLineNumber:r,selectionStartColumn:s}=o;n=[new qe(r,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(o=>o.containsPosition(t)?new qe(t.lineNumber,t.column,t.lineNumber,t.column):o);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(H3(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new Ude(this._dragSelection,t,H3(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=Ot.register({description:"dnd-target",className:"dnd-target"})}showAt(e){this._dndDecorationIds.set([{range:new R(e.lineNumber,e.column,e.lineNumber,e.column),options:i._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()}};St(jde.ID,jde,2)});var p1t=D(()=>{g0();Jt();An();eD();cPe();mue();Be();St(iv.ID,iv,0);u0(pue);Qe(new class extends Eo{constructor(){super({id:lPe,precondition:Cue,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e){return iv.get(e)?.changePasteType()}});Qe(new class extends Eo{constructor(){super({id:"editor.hidePasteWidget",precondition:Cue,kbOpts:{weight:100,primary:9}})}runEditorCommand(i,e){iv.get(e)?.clearWidgets()}});Ce(class f1t extends Pe{static{this.argsSchema={type:"object",properties:{kind:{type:"string",description:y("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}}}constructor(){super({id:"editor.action.pasteAs",label:y("pasteAs","Paste As..."),alias:"Paste As...",precondition:V.writable,metadata:{description:"Paste as",args:[{name:"args",schema:f1t.argsSchema}]}})}run(e,t,n){let o=typeof n?.kind=="string"?n.kind:void 0;return!o&&n&&(o=typeof n.id=="string"?n.id:void 0),iv.get(t)?.pasteAs(o?new qn(o):void 0)}});Ce(class extends Pe{constructor(){super({id:"editor.action.pasteAsText",label:y("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:V.writable})}run(i,e){return iv.get(e)?.pasteAs({providerId:EC.id})}})});var Qde,XU,a3e=D(()=>{Qde=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){let t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},XU=class{constructor(e){this.identifier=e}}});var l3e,m1t=D(()=>{Dc();ht();a3e();l3e=At("treeViewsDndService");oi(l3e,Qde,1)});var Zpi,Gde,c3e,u3e,d3e,qde,m2,g1t=D(()=>{Wt();Gt();xU();g0();de();JOe();Ue();Hi();a3e();m1t();SC();yue();Be();ao();Bt();YOe();ht();vue();sPe();Zpi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Gde=function(i,e){return function(t,n){e(t,n,i)}},u3e="editor.experimental.dropIntoEditor.defaultProvider",d3e="editor.changeDropType",qde=new ze("dropWidgetVisible",!1,y("dropWidgetVisible","Whether the drop widget is showing")),m2=class extends H{static{c3e=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(e){return e.getContribution(c3e.ID)}constructor(e,t,n,o,r){super(),this._configService=n,this._languageFeaturesService=o,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=cue.getInstance(),this._dropProgressManager=this._register(t.createInstance(h3,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(g3,"dropIntoEditor",e,qde,{id:d3e,label:y("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,n){if(!n.dataTransfer||!e.hasModel())return;this._currentOperation?.cancel(),e.focus(),e.setPosition(t);let o=mo(async r=>{let s=new se,a=s.add(new Cp(e,1,void 0,r));try{let l=await this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;let c=e.getModel();if(!c)return;let u=this._languageFeaturesService.documentDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(f=>l.matches(f)):!0),d=s.add(await this.getDropEdits(u,c,t,l,a));if(a.token.isCancellationRequested)return;if(d.edits.length){let h=this.getInitialActiveEditIndex(c,d.edits),f=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([R.fromPositions(t)],{activeEditIndex:h,allEdits:d.edits},f,async p=>p,r)}}finally{s.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(t,y("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o,{cancel:()=>o.cancel()}),this._currentOperation=o}async getDropEdits(e,t,n,o,r){let s=new se,a=await hy(Promise.all(e.map(async c=>{try{let u=await c.provideDocumentDropEdits(t,n,o,r.token);return u&&s.add(u),u?.edits.map(d=>({...d,providerId:c.id}))}catch(u){console.error(u)}})),r.token),l=Sl(a??[]).flat();return{edits:Aue(l),dispose:()=>s.dispose()}}getInitialActiveEditIndex(e,t){let n=this._configService.getValue(u3e,{resource:e.uri});for(let[o,r]of Object.entries(n)){let s=new qn(r),a=t.findIndex(l=>s.value===l.providerId&&l.handledMimeType&&lue(o,[l.handledMimeType]));if(a>=0)return a}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new u3;let t=uue(e.dataTransfer);if(this.treeItemsTransfer.hasData(XU.prototype)){let n=this.treeItemsTransfer.getData(XU.prototype);if(Array.isArray(n))for(let o of n){let r=await this._treeViewsDragAndDropService.removeDragOperationTransfer(o.identifier);if(r)for(let[s,a]of r)t.replace(s,a)}}return t}};m2=c3e=Zpi([Gde(1,Re),Gde(2,Et),Gde(3,Me),Gde(4,l3e)],m2)});var b1t=D(()=>{Jt();qie();eD();mue();Be();Dy();fa();g1t();St(m2.ID,m2,2);u0(fue);Qe(new class extends Eo{constructor(){super({id:d3e,precondition:qde,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){m2.get(e)?.changeDropType()}});Qe(new class extends Eo{constructor(){super({id:"editor.hideDropWidget",precondition:qde,kbOpts:{weight:100,primary:9}})}runEditorCommand(i,e,t){m2.get(e)?.clearWidgets()}});Qi.as(Tc.Configuration).registerConfiguration({...IL,properties:{[u3e]:{type:"object",scope:5,description:y("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})});var Yde,A1t=D(()=>{Ue();ol();bs();nr();io();Yde=class i{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){let 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){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e{if(this._highlightedDecorationId!==null&&(o.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,o.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(o.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){let s=r.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);r=new R(r.startLineNumber,r.startColumn,s,a)}this._rangeHighlightDecorationId=o.addDecoration(r,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let o=i._FIND_MATCH_DECORATION,r=[];if(e.length>1e3){o=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/c)),d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,p=e.length;f=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(r.push({range:new R(d,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,h=g.endLineNumber)}r.push({range:new R(d,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;an.removeDecoration(a)),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],o=this._editor.getModel().getDecorationRange(n);if(!(!o||o.endLineNumber>e.lineNumber)){if(o.endLineNumbere.column))return o}}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.startColumn{Ue();Kde=class{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let n=[];for(let s=0;sR.compareRangesUsingStarts(s.range,a.range));let o=[],r=n[0];for(let s=1;s0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function y1t(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function w1t(i,e,t){let n=e.split(t),o=i[0].split(t),r="";return n.forEach((s,a)=>{r+=h3e([o[a]],s)+t}),r.slice(0,-1)}var x1t=D(()=>{Rt()});function C1t(i){if(!i||i.length===0)return new U3(null);let e=[],t=new p3e(i);for(let n=0,o=i.length;n=o)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` +`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(r===36){if(n++,n>=o)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1{x1t();Jde=class{constructor(e){this.staticValue=e,this.kind=0}},f3e=class{constructor(e){this.pieces=e,this.kind=1}},U3=class i{static fromStaticValue(e){return new i([W3.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new Jde(""):e.length===1&&e[0].staticValue!==null?this._state=new Jde(e[0].staticValue):this._state=new f3e(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?h3e(e,this._state.staticValue):this._state.staticValue;let n="";for(let o=0,r=this._state.pieces.length;o0){let l=[],c=s.caseOps.length,u=0;for(let d=0,h=a.length;d=c){l.push(a.slice(d));break}switch(s.caseOps[u]){case"U":l.push(a[d].toUpperCase());break;case"u":l.push(a[d].toUpperCase()),u++;break;case"L":l.push(a[d].toLowerCase());break;case"l":l.push(a[d].toLowerCase()),u++;break;default:l.push(a[d])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e{lp();Gt();de();bN();kt();Ue();Qn();wV();A1t();v1t();_1t();Bt();O1=new ze("findWidgetVisible",!1),clo=O1.toNegated(),j3=new ze("findInputFocussed",!1),ZU=new ze("replaceInputFocussed",!1),$U={primary:545,mac:{primary:2593}},ej={primary:565,mac:{primary:2613}},tj={primary:560,mac:{primary:2608}},ij={primary:554,mac:{primary:2602}},nj={primary:558,mac:{primary:2606}},No={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},F1=19999,$pi=240,Xde=class i{constructor(e,t){this._toDispose=new se,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new ha,this._decorations=new Yde(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new si(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Oi(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},$pi)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t<"u"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new R(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let o=this._findMatches(n,!1,F1);this._decorations.set(o,n);let r=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(r);if(s===0&&o.length>0){let a=mE(o.map(l=>l.range),l=>R.compareRangesUsingStarts(l,r)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:o}=e,r=this._editor.getModel();return t||o===1?(n===1?n=r.getLineCount():n--,o=r.getLineMaxColumn(n)):o--,new J(n,o)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let u=this._decorations.matchAfterPosition(e);u&&this._setCurrentFindMatch(u);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:o}=e,r=this._editor.getModel();return t||o===r.getLineMaxColumn(n)?(n===r.getLineCount()?n=1:n++,o=1):o++,new J(n,o)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()i._getSearchRange(this._editor.getModel(),r));return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=F1?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new MA(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let d="mu";n.ignoreCase&&(d+="i"),n.global&&(d+="g"),n=new RegExp(n.source,d)}let o=this._editor.getModel(),r=o.getValue(1),s=o.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=r.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=r.replace(n,a.buildReplaceString(null,c));let u=new sD(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),o=[];for(let s=0,a=n.length;ss.range),o);this._executeEditorCommand("replaceAll",r)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(r=>new qe(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn)),o=this._editor.getSelection();for(let r=0,s=n.length;r{});var Zde,E1t=D(()=>{Ye();S1t();BNe();Lg();Gt();oj();nr();ic();Zde=class i extends Os{static{this.ID="editor.contrib.findOptionsWidget"}constructor(e,t,n){super(),this._hideSoon=this._register(new si(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let o={inputActiveOptionBorder:it(BI),inputActiveOptionForeground:it(zI),inputActiveOptionBackground:it(wx)},r=this._register(a0());this.caseSensitive=this._register(new qP({appendTitle:this._keybindingLabelFor(No.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:r,...o})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new YP({appendTitle:this._keybindingLabelFor(No.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:r,...o})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new KP({appendTitle:this._keybindingLabelFor(No.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:r,...o})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(s=>{let a=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(ce(this._domNode,Te.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(ce(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}});function $de(i,e){return i===1?!0:i===2?!1:e}var ehe,D1t=D(()=>{et();de();Ue();oj();ehe=class extends H{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return $de(this._isRegexOverride,this._isRegex)}get wholeWord(){return $de(this._wholeWordOverride,this._wholeWord)}get matchCase(){return $de(this._matchCaseOverride,this._matchCase)}get preserveCase(){return $de(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new q),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let o={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},r=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,o.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,o.matchesCount=!0,r=!0),typeof n<"u"&&(R.equalsRange(this._currentMatch,n)||(this._currentMatch=n,o.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(o)}change(e,t,n=!0){let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},r=!1,s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,r=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,r=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,r=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,r=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(e.searchScope?.every(u=>this._searchScope?.some(d=>!R.equalsRange(d,u)))||(this._searchScope=e.searchScope,o.searchScope=!0,r=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,r=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,r=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,r=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,s!==this.isRegex&&(r=!0,o.isRegex=!0),a!==this.wholeWord&&(r=!0,o.wholeWord=!0),l!==this.matchCase&&(r=!0,o.matchCase=!0),c!==this.preserveCase&&(r=!0,o.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=F1}}});var T1t=D(()=>{});var emi,tmi,m3e,the,k1t=D(()=>{Ye();GP();pre();Lg();oo();et();VNe();Be();ic();emi=y("defaultLabel","input"),tmi=y("label.preserveCaseToggle","Preserve Case"),m3e=class extends Ug{constructor(e){super({icon:De.preserveCase,title:tmi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Mr("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},the=class extends Os{constructor(e,t,n,o){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new q),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new q),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new q),this._onInput=this._register(new q),this._onKeyUp=this._register(new q),this._onPreserveCaseKeyDown=this._register(new q),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=o.placeholder||"",this.validation=o.validation,this.label=o.label||emi;let r=o.appendPreserveCaseLabel||"",s=o.history||[],a=!!o.flexibleHeight,l=!!o.flexibleWidth,c=o.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new JP(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:o.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:o.inputBoxStyles})),this.preserveCase=this._register(new m3e({appendTitle:r,isChecked:!1,...o.toggleStyles})),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let u=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let p=-1;h.equals(17)?p=(f+1)%u.length:h.equals(15)&&(f===0?p=u.length-1:p=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):p>=0&&u[p].focus(),mi.stop(h,!0)}}});let d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}});function R1t(i,e){if(ihe.includes(e))throw new Error("Cannot register the same widget multiple times");ihe.push(e);let t=new se,n=new ze(g3e,!1).bindTo(i),o=new ze(N1t,!0).bindTo(i),r=new ze(M1t,!0).bindTo(i),s=()=>{n.set(!0),rj=e},a=()=>{n.set(!1),rj===e&&(rj=void 0)};return II(e.element)&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(He(()=>{ihe.splice(ihe.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:r,dispose(){t.dispose()}}}var I1t,L1t,rhe,g3e,N1t,M1t,rj,ihe,nhe,ohe,b3e=D(()=>{mre();k1t();Bt();Tx();Be();de();Ye();I1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},L1t=function(i,e){return function(t,n){e(t,n,i)}},rhe=new ze("suggestWidgetVisible",!1,y("suggestWidgetVisible","Whether suggestion are visible")),g3e="historyNavigationWidgetFocus",N1t="historyNavigationForwardsEnabled",M1t="historyNavigationBackwardsEnabled",ihe=[];nhe=class extends ZL{constructor(e,t,n,o){super(e,t,n);let r=this._register(o.createScoped(this.inputBox.element));this._register(R1t(r,this.inputBox))}};nhe=I1t([L1t(3,Ze)],nhe);ohe=class extends the{constructor(e,t,n,o,r=!1){super(e,t,r,n);let s=this._register(o.createScoped(this.inputBox.element));this._register(R1t(s,this.inputBox))}};ohe=I1t([L1t(3,Ze)],ohe);Oa.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ge.and(ge.has(g3e),ge.equals(M1t,!0),ge.not("isComposing"),rhe.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{rj?.showPreviousValue()}});Oa.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ge.and(ge.has(g3e),ge.equals(N1t,!0),ge.not("isComposing"),rhe.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{rj?.showNextValue()}})});function A3e(i){return i.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()==="Up"&&i.lookupKeybinding("history.showNext")?.getElectronAccelerator()==="Down"}var F1t=D(()=>{});function H1t(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function W1t(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd{Ye();Zl();GP();$P();Lg();Gt();oo();Tt();de();wi();Rt();T1t();Ue();oj();Be();b3e();F1t();nr();Ap();io();ko();Jb();gn();i1();ic();O1t=Ln("find-collapsed",De.chevronRight,y("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),P1t=Ln("find-expanded",De.chevronDown,y("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),imi=Ln("find-selection",De.selection,y("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),nmi=Ln("find-replace",De.replace,y("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),omi=Ln("find-replace-all",De.replaceAll,y("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),rmi=Ln("find-previous-match",De.arrowUp,y("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),smi=Ln("find-next-match",De.arrowDown,y("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),ami=y("label.findDialog","Find / Replace"),lmi=y("label.find","Find"),cmi=y("placeholder.find","Find"),umi=y("label.previousMatchButton","Previous Match"),dmi=y("label.nextMatchButton","Next Match"),hmi=y("label.toggleSelectionFind","Find in Selection"),fmi=y("label.closeButton","Close"),pmi=y("label.replace","Replace"),mmi=y("placeholder.replace","Replace"),gmi=y("label.replaceButton","Replace"),bmi=y("label.replaceAllButton","Replace All"),Ami=y("label.toggleReplaceButton","Toggle Replace"),vmi=y("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",F1),ymi=y("label.matchesLocation","{0} of {1}"),B1t=y("label.noResults","No results"),P1=419,wmi=275,xmi=wmi-54,sj=69,Cmi=33,z1t="ctrlEnterReplaceAll.windows.donotask",V1t=jt?256:2048,aj=class{constructor(e){this.afterLineNumber=e,this.heightInPx=Cmi,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};she=class i extends Os{static{this.ID="editor.contrib.findWidget"}constructor(e,t,n,o,r,s,a,l,c,u){super(),this._hoverService=u,this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=n,this._contextViewProvider=o,this._keybindingService=r,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(z1t,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new da(500),this._register(He(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(146)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(41)){let h=this._codeEditor.getOption(41).loop;this._state.change({loop:h},!1);let f=this._codeEditor.getOption(41).addExtraSpaceOnTop;f&&!this._viewZone&&(this._viewZone=new aj(0),this._showViewZone()),!f&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){let d=await this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}})),this._findInputFocused=j3.bindTo(s),this._findFocusTracker=this._register(iu(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=ZU.bindTo(s),this._replaceFocusTracker=this._register(iu(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new aj(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(92)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Cc(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,ft)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=sj+"px",this._state.matchesCount>=F1?this._matchesCount.title=vmi:this._matchesCount.title="",this._matchesCount.firstChild?.remove();let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=F1&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=gg(ymi,n,t)}else e=B1t;this._matchesCount.appendChild(document.createTextNode(e)),ms(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),sj=Math.max(sj,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===B1t)return n===""?y("ariaSearchNoResultEmpty","{0} found",e):y("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let o=y("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${o}`:o}return y("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let o=bn(n),r=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=o.left+(r?r.left:0),a=r?r.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);let l=M$(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());o.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(o=>{n.heightInPx=this._getHeight(),this._viewZoneId=o.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new aj(0));let n=this._viewZone;this._codeEditor.changeViewZones(o=>{if(this._viewZoneId!==void 0){let r=this._getHeight();if(r===n.heightInPx)return;let s=r-n.heightInPx;n.heightInPx=r,o.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let r=this._getHeight();if(r-=this._codeEditor.getOption(84).top,r<=0)return;n.heightInPx=r,this._viewZoneId=o.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,o=e.minimap.minimapWidth,r=!1,s=!1,a=!1;if(this._resized&&Cc(this._domNode)>P1){this._domNode.style.maxWidth=`${n-28-o-15}px`,this._replaceInput.width=Cc(this._findInput.domNode);return}if(P1+28+o>=n&&(s=!0),P1+28+o-sj>=n&&(a=!0),P1+28+o-sj>=n+50&&(r=!0),this._domNode.classList.toggle("collapsed-find-widget",r),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!r&&(this._domNode.style.maxWidth=`${n-28-o-15}px`),this._findInput.layout({collapsedFindWidget:r,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=Cc(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!R.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(V1t|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return H1t(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return W1t(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(V1t|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Fo&&Bh&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(y("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(z1t,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return H1t(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return W1t(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new nhe(null,this._contextViewProvider,{width:xmi,label:lmi,placeholder:cmi,appendCaseSensitiveLabel:this._keybindingLabelFor(No.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(No.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(No.ToggleRegexCommand),validation:u=>{if(u.length===0||!this._findInput.getRegex())return null;try{return new RegExp(u,"gu"),null}catch(d){return{content:d.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>A3e(this._keybindingService),inputBoxStyles:SP,toggleStyles:_P},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(u=>this._onFindInputKeyDown(u))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(u=>{u.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),u.preventDefault())})),this._register(this._findInput.onRegexKeyDown(u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),u.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(u=>{this._tryUpdateHeight()&&this._showViewZone()})),Cr&&this._register(this._findInput.onMouseDown(u=>this._onFindInputMouseDown(u))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();let n=this._register(a0());this._prevBtn=this._register(new ID({label:umi+this._keybindingLabelFor(No.PreviousMatchFindAction),icon:rmi,hoverDelegate:n,onTrigger:()=>{Sb(this._codeEditor.getAction(No.PreviousMatchFindAction)).run().then(void 0,ft)}},this._hoverService)),this._nextBtn=this._register(new ID({label:dmi+this._keybindingLabelFor(No.NextMatchFindAction),icon:smi,hoverDelegate:n,onTrigger:()=>{Sb(this._codeEditor.getAction(No.NextMatchFindAction)).run().then(void 0,ft)}},this._hoverService));let o=document.createElement("div");o.className="find-part",o.appendChild(this._findInput.domNode);let r=document.createElement("div");r.className="find-actions",o.appendChild(r),r.appendChild(this._matchesCount),r.appendChild(this._prevBtn.domNode),r.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Ug({icon:imi,title:hmi+this._keybindingLabelFor(No.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:n,inputActiveOptionBackground:it(wx),inputActiveOptionBorder:it(BI),inputActiveOptionForeground:it(zI)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let u=this._codeEditor.getSelections();u=u.map(d=>(d.endColumn===1&&d.endLineNumber>d.startLineNumber&&(d=d.setEndPosition(d.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(d.endLineNumber-1))),d.isEmpty()?null:d)).filter(d=>!!d),u.length&&this._state.change({searchScope:u},!0)}}else this._state.change({searchScope:null},!0)})),r.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new ID({label:fmi+this._keybindingLabelFor(No.CloseFindWidgetCommand),icon:cse,hoverDelegate:n,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),u.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new ohe(null,void 0,{label:pmi,placeholder:mmi,appendPreserveCaseLabel:this._keybindingLabelFor(No.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>A3e(this._keybindingService),inputBoxStyles:SP,toggleStyles:_P},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(u=>this._onReplaceInputKeyDown(u))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(u=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(u=>{u.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),u.preventDefault())}));let s=this._register(a0());this._replaceBtn=this._register(new ID({label:gmi+this._keybindingLabelFor(No.ReplaceOneAction),icon:nmi,hoverDelegate:s,onTrigger:()=>{this._controller.replace()},onKeyDown:u=>{u.equals(1026)&&(this._closeBtn.focus(),u.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new ID({label:bmi+this._keybindingLabelFor(No.ReplaceAllAction),icon:omi,hoverDelegate:s,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));let a=document.createElement("div");a.className="replace-part",a.appendChild(this._replaceInput.domNode);let l=document.createElement("div");l.className="replace-actions",a.appendChild(l),l.appendChild(this._replaceBtn.domNode),l.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new ID({label:Ami,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Cc(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=ami,this._domNode.role="dialog",this._domNode.style.width=`${P1}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(o),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(a),this._resizeSash=this._register(new bf(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let c=P1;this._register(this._resizeSash.onDidStart(()=>{c=Cc(this._domNode)})),this._register(this._resizeSash.onDidChange(u=>{this._resized=!0;let d=c+u.startX-u.currentX;if(dh||(this._domNode.style.width=`${d}px`,this._isReplaceVisible&&(this._replaceInput.width=Cc(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let u=Cc(this._domNode);if(u{this._opts.onTrigger(),o.preventDefault()}),this.onkeydown(this._domNode,o=>{if(o.equals(10)||o.equals(3)){this._opts.onTrigger(),o.preventDefault();return}this._opts.onKeyDown?.(o)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ut.asClassNameArray(O1t)),this._domNode.classList.add(...ut.asClassNameArray(P1t))):(this._domNode.classList.remove(...ut.asClassNameArray(P1t)),this._domNode.classList.add(...ut.asClassNameArray(O1t)))}};ba((i,e)=>{let t=i.getColor(qb);t&&e.addRule(`.monaco-editor .findMatch { border: 1px ${ju(i.type)?"dotted":"solid"} ${t}; box-sizing: border-box; }`);let n=i.getColor(Yot);n&&e.addRule(`.monaco-editor .findScope { border: 1px ${ju(i.type)?"dashed":"solid"} ${n}; }`);let o=i.getColor(ki);o&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${o}; }`);let r=i.getColor(Got);r&&e.addRule(`.monaco-editor .findMatchInline { color: ${r}; }`);let s=i.getColor(qot);s&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${s}; }`)})});function y3e(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let o=i.getConfiguredWordAtPosition(n.getStartPosition());if(o&&t===!1)return o.word}else if(i.getModel().getValueLengthInRange(n)<_mi)return i.getModel().getValueInRange(n)}return null}var j1t,$g,v3e,_mi,xh,w3e,Smi,Emi,x3e,C3e,ahe,_3e,S3e,E3e,lhe,D3e,T3e,Dmi,ov,k3e=D(()=>{Gt();de();Rt();Jt();Am();An();ol();oj();E1t();D1t();U1t();Be();go();cC();Bt();Ed();Xo();Ic();gf();VA();io();zx();j1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},$g=function(i,e){return function(t,n){e(t,n,i)}},_mi=524288;xh=class extends H{static{v3e=this}static{this.ID="editor.contrib.findController"}get editor(){return this._editor}static get(e){return e.getContribution(v3e.ID)}constructor(e,t,n,o,r,s){super(),this._editor=e,this._findWidgetVisible=O1.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=o,this._notificationService=r,this._hoverService=s,this._updateHistoryDelayer=new da(500),this._state=this._register(new ehe),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(a=>this._onStateChanged(a))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let a=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),a&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!j3.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=$a(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;let n={...t,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){let o=y3e(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);o&&(this._state.isRegex?n.searchString=$a(o):n.searchString=o)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let o=y3e(this._editor,e.seedSearchStringFromSelection);o&&(n.searchString=o)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let o=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;o&&(n.searchString=o)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let o=this._editor.getSelections();o.some(r=>!r.isEmpty())&&(n.searchScope=o)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Xde(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(y("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};xh=v3e=j1t([$g(1,Ze),$g(2,oc),$g(3,Ah),$g(4,_n),$g(5,dh)],xh);w3e=class extends xh{constructor(e,t,n,o,r,s,a,l,c){super(e,n,a,l,s,c),this._contextViewService=t,this._keybindingService=o,this._themeService=r,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();let n=this._editor.getSelection(),o=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!n&&n.startLineNumber!==n.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,await super._start(e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new she(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new Zde(this._editor,this._state,this._keybindingService))}};w3e=j1t([$g(1,hh),$g(2,Ze),$g(3,Xt),$g(4,Wn),$g(5,_n),$g(6,oc),$g(7,Ah),$g(8,dh)],w3e);Smi=eTe(new cV({id:No.StartFindAction,label:y("startFindAction","Find"),alias:"Find",precondition:ge.or(V.focus,ge.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:tt.MenubarEditMenu,group:"3_find",title:y({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Smi.addImplementation(0,(i,e,t)=>{let n=xh.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});Emi={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]},x3e=class extends Pe{constructor(){super({id:No.StartFindWithArgs,label:y("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:Emi})}async run(e,t,n){let o=xh.get(t);if(o){let r=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};await o.start({forceRevealReplace:!1,seedSearchStringFromSelection:o.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:n?.findInSelection||!1,loop:t.getOption(41).loop},r),o.setGlobalBufferTerm(o.getState().searchString)}}},C3e=class extends Pe{constructor(){super({id:No.StartFindWithSelection,label:y("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){let n=xh.get(t);n&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),n.setGlobalBufferTerm(n.getState().searchString))}},ahe=class extends Pe{async run(e,t){let n=xh.get(t);n&&!this._run(n)&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))}},_3e=class extends ahe{constructor(){super({id:No.NextMatchFindAction,label:y("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:V.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ge.and(V.focus,j3),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},S3e=class extends ahe{constructor(){super({id:No.PreviousMatchFindAction,label:y("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:V.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ge.and(V.focus,j3),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},E3e=class extends Pe{constructor(){super({id:No.GoToMatchFindAction,label:y("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:O1}),this._highlightDecorations=[]}run(e,t,n){let o=xh.get(t);if(!o)return;let r=o.getState().matchesCount;if(r<1){e.get(_n).notify({severity:vE.Warning,message:y("findMatchAction.noResults","No matches. Try searching for something else.")});return}let s=e.get(Pa),a=new se,l=a.add(s.createInputBox());l.placeholder=y("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",r);let c=d=>{let h=parseInt(d);if(isNaN(h))return;let f=o.getState().matchesCount;if(h>0&&h<=f)return h-1;if(h<0&&h>=-f)return f+h},u=d=>{let h=c(d);if(typeof h=="number"){l.validationMessage=void 0,o.goToMatch(h);let f=o.getState().currentMatch;f&&this.addDecorations(t,f)}else l.validationMessage=y("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",o.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue(d=>{u(d)})),a.add(l.onDidAccept(()=>{let d=c(l.value);typeof d=="number"?(o.goToMatch(d),l.hide()):l.validationMessage=y("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",o.getState().matchesCount)})),a.add(l.onDidHide(()=>{this.clearDecorations(t),a.dispose()})),l.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Io(toe),position:kc.Full}}}])})}},lhe=class extends Pe{async run(e,t){let n=xh.get(t);if(!n)return;let o=y3e(t,"single",!1);o&&n.setSearchString(o),this._run(n)||(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))}},D3e=class extends lhe{constructor(){super({id:No.NextSelectionMatchFindAction,label:y("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},T3e=class extends lhe{constructor(){super({id:No.PreviousSelectionMatchFindAction,label:y("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},Dmi=eTe(new cV({id:No.StartFindReplaceAction,label:y("startReplace","Replace"),alias:"Replace",precondition:ge.or(V.focus,ge.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:tt.MenubarEditMenu,group:"3_find",title:y({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Dmi.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(92))return!1;let n=xh.get(e);if(!n)return!1;let o=e.getSelection(),r=n.isFindInputFocused(),s=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!r,a=r||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});St(xh.ID,w3e,0);Ce(x3e);Ce(C3e);Ce(_3e);Ce(S3e);Ce(E3e);Ce(D3e);Ce(T3e);ov=Eo.bindToContribution(xh.get);Qe(new ov({id:No.CloseFindWidgetCommand,precondition:O1,handler:i=>i.closeFindWidget(),kbOpts:{weight:105,kbExpr:ge.and(V.focus,ge.not("isComposing")),primary:9,secondary:[1033]}}));Qe(new ov({id:No.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:V.focus,primary:$U.primary,mac:$U.mac,win:$U.win,linux:$U.linux}}));Qe(new ov({id:No.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:105,kbExpr:V.focus,primary:ej.primary,mac:ej.mac,win:ej.win,linux:ej.linux}}));Qe(new ov({id:No.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:105,kbExpr:V.focus,primary:tj.primary,mac:tj.mac,win:tj.win,linux:tj.linux}}));Qe(new ov({id:No.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:105,kbExpr:V.focus,primary:ij.primary,mac:ij.mac,win:ij.win,linux:ij.linux}}));Qe(new ov({id:No.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:105,kbExpr:V.focus,primary:nj.primary,mac:nj.mac,win:nj.win,linux:nj.linux}}));Qe(new ov({id:No.ReplaceOneAction,precondition:O1,handler:i=>i.replace(),kbOpts:{weight:105,kbExpr:V.focus,primary:3094}}));Qe(new ov({id:No.ReplaceOneAction,precondition:O1,handler:i=>i.replace(),kbOpts:{weight:105,kbExpr:ge.and(V.focus,ZU),primary:3}}));Qe(new ov({id:No.ReplaceAllAction,precondition:O1,handler:i=>i.replaceAll(),kbOpts:{weight:105,kbExpr:V.focus,primary:2563}}));Qe(new ov({id:No.ReplaceAllAction,precondition:O1,handler:i=>i.replaceAll(),kbOpts:{weight:105,kbExpr:ge.and(V.focus,ZU),primary:void 0,mac:{primary:2051}}}));Qe(new ov({id:No.SelectAllMatchesAction,precondition:O1,handler:i=>i.selectAllMatches(),kbOpts:{weight:105,kbExpr:V.focus,primary:515}}))});var Q1t=D(()=>{});var Tmi,G1t,eb,q1t,lj,Md,I3e,cj=D(()=>{Tmi={0:" ",1:"u",2:"r"},G1t=65535,eb=16777215,q1t=4278190080,lj=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1<G1t)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new lj(e.length),this._userDefinedStates=new lj(e.length),this._recoveredStates=new lj(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,o)=>{let r=e[e.length-1];return this.getStartLineNumber(r)<=n&&this.getEndLineNumber(r)>=o};for(let n=0,o=this._startIndexes.length;neb||s>eb)throw new Error("startLineNumber or endLineNumber must not exceed "+eb);for(;e.length>0&&!t(r,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=r+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&eb}getEndLineNumber(e){return this._endIndexes[e]&eb}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let o=0;o>>24)+((this._endIndexes[e]&q1t)>>>16);return t===G1t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;tArray.isArray(A)?(w=>ww=d.startLineNumber))u&&u.startLineNumber===d.startLineNumber?(d.source===1?A=d:(A=u,A.isCollapsed=d.isCollapsed&&(u.endLineNumber===d.endLineNumber||!o?.startsInside(u.startLineNumber+1,u.endLineNumber+1)),A.source=0),u=s(++l)):(A=d,d.isCollapsed&&d.source===0&&(A.source=2)),d=a(++c);else{let v=c,w=d;for(;;){if(!w||w.startLineNumber>u.endLineNumber){A=u;break}if(w.source===1&&w.endLineNumber>u.endLineNumber)break;w=a(++v)}u=s(++l)}if(A){for(;f&&f.endLineNumberA.startLineNumber&&A.startLineNumber>p&&A.endLineNumber<=n&&(!f||f.endLineNumber>=A.endLineNumber)&&(g.push(A),p=A.startLineNumber,f&&h.push(f),f=A)}}return g}},I3e=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}});function uj(i,e,t){let n=[];for(let o of t){let r=i.getRegionAtLine(o);if(r){let s=!r.isCollapsed;if(n.push(r),e>1){let a=i.getRegionsInside(r,(l,c)=>l.isCollapsed!==s&&c0)for(let r of n){let s=i.getRegionAtLine(r);if(s&&(s.isCollapsed!==e&&o.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&cs.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);o.push(...s)}i.toggleCollapseState(o)}function Y1t(i,e,t){let n=[];for(let o of t){let r=i.getAllRegionsAtLine(o,s=>s.isCollapsed!==e);r.length>0&&n.push(r[0])}i.toggleCollapseState(n)}function K1t(i,e,t,n){let o=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),r=i.getRegionsInside(null,o);i.toggleCollapseState(r)}function N3e(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let o=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,r=i.getRegionsInside(null,o);i.toggleCollapseState(r)}function uhe(i,e,t){let n=i.textModel,o=i.regions,r=[];for(let s=o.length-1;s>=0;s--)if(t!==o.isCollapsed(s)){let a=o.getStartLineNumber(s);e.test(n.getLineContent(a))&&r.push(o.toRegion(s))}i.toggleCollapseState(r)}function dhe(i,e,t){let n=i.regions,o=[];for(let r=n.length-1;r>=0;r--)t!==n.isCollapsed(r)&&e===n.getType(r)&&o.push(n.toRegion(r));i.toggleCollapseState(o)}function J1t(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let o=n.parentIndex;o!==-1?t=e.regions.getStartLineNumber(o):t=null}return t}function X1t(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,o=0;for(n!==-1&&(o=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=o)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function Z1t(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,o=0;if(n!==-1)o=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;o=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=o)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex{et();cj();VS();che=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new q,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new Md(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,o)=>n.regionIndex-o.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let o=0,r=-1,s=-1,a=l=>{for(;os&&(s=c),o++}};for(let l of e){let c=l.regionIndex,u=this._editorDecorationIds[c];if(u&&!t[u]){t[u]=!0,a(c);let d=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,d),r=Math.max(r,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=o=>{for(let r of e)if(!(r.startLineNumber>o.endLineNumber||o.startLineNumber>r.endLineNumber))return!0;return!1};for(let o=0;on&&(n=a)}this._decorationProvider.changeDecorations(o=>this._editorDecorationIds=o.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){let t=[];for(let n=0,o=this._regions.length;n=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;let t=[],n=this._textModel.getLineCount();for(let r of e){if(r.startLineNumber>=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>n)continue;let s=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);(!r.checksum||s===r.checksum)&&t.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,type:void 0,isCollapsed:r.isCollapsed??!0,source:r.source??0})}let o=Md.sanitizeAndMerge(this._regions,t,n);this.updatePost(Md.fromFoldRanges(o))}_getLinesChecksum(e,t){return zS(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let o=this._regions.findRange(e),r=1;for(;o>=0;){let s=this._regions.toRegion(o);(!t||t(s,r))&&n.push(s),r++,o=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],o=e?e.regionIndex+1:0,r=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=o,l=this._regions.length;a0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=o,a=this._regions.length;s=e.startLineNumber&&i<=e.endLineNumber}function $1t(i,e){let t=mE(i,n=>e=0&&i[t].endLineNumber>=e?i[t]:null}var hhe,ewt=D(()=>{lp();et();Ue();vL();hhe=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new q,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||fm(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,o=0,r=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n0}isHidden(e){return $1t(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,o=null,r=s=>((!o||!kmi(s,o))&&(o=$1t(this._hiddenRanges,s)),o?o.startLineNumber-1:null);for(let s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function Mmi(i,e,t,n=Nmi){let o=i.getOptions().tabSize,r=new R3e(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let u=i.getLineContent(c),d=jL(u,o),h=a[a.length-1];if(d===-1){e&&(h.endAbove=c);continue}let f;if(s&&(f=u.match(s)))if(f[1]){let p=a.length-1;for(;p>0&&a[p].indent!==-2;)p--;if(p>0){a.length=p+1,h=a[p],r.insertFirst(c,h.line,d),h.line=c,h.indent=d,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>d){do a.pop(),h=a[a.length-1];while(h.indent>d);let p=h.endAbove-1;p-c>=1&&r.insertFirst(c,p,d)}h.indent===d?h.endAbove=c:a.push({indent:d,endAbove:c,line:c})}return r.toIndentRanges(i)}var Imi,Lmi,b2,R3e,Nmi,F3e=D(()=>{Doe();cj();Imi=5e3,Lmi="indent",b2=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Lmi}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,o=t&&t.markers;return Promise.resolve(Mmi(this.editorModel,n,o,this.foldingRangesLimit))}},R3e=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>eb||t>eb)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),o=new Uint32Array(this._length);for(let r=this._length-1,s=0;r>=0;r--,s++)n[s]=this._startIndexes[r],o[s]=this._endIndexes[r];return new Md(n,o)}else{this._foldingRangesLimit.update(this._length,t);let n=0,o=this._indentOccurrences.length;for(let l=0;lt){o=l;break}n+=c}}let r=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let u=this._startIndexes[l],d=e.getLineContent(u),h=jL(d,r);(h{}}});var Rmi,dj,hj,twt,iwt,O3e,Q3,fhe,phe,P3e=D(()=>{oo();bs();Be();nr();Ap();io();ko();Rmi=j("editor.foldBackground",{light:ai(yx,.3),dark:ai(yx,.3),hcDark:null,hcLight:null},y("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);j("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},y("collapsedTextColor","Color of the collapsed text after the first line of a folded range."));j("editorGutter.foldingControlForeground",FI,y("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));dj=Ln("folding-expanded",De.chevronDown,y("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),hj=Ln("folding-collapsed",De.chevronRight,y("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),twt=Ln("folding-manual-collapsed",hj,y("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),iwt=Ln("folding-manual-expanded",dj,y("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),O3e={color:Io(Rmi),position:1},Q3=y("linesCollapsed","Click to expand the range."),fhe=y("linesExpanded","Click to collapse the range."),phe=class i{static{this.COLLAPSED_VISUAL_DECORATION=Ot.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Q3,firstLineDecorationClassName:ut.asClassName(hj)})}static{this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ot.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:O3e,isWholeLine:!0,linesDecorationsTooltip:Q3,firstLineDecorationClassName:ut.asClassName(hj)})}static{this.MANUALLY_COLLAPSED_VISUAL_DECORATION=Ot.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Q3,firstLineDecorationClassName:ut.asClassName(twt)})}static{this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ot.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:O3e,isWholeLine:!0,linesDecorationsTooltip:Q3,firstLineDecorationClassName:ut.asClassName(twt)})}static{this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Ot.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Q3})}static{this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Ot.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:O3e,isWholeLine:!0,linesDecorationsTooltip:Q3})}static{this.EXPANDED_VISUAL_DECORATION=Ot.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ut.asClassName(dj),linesDecorationsTooltip:fhe})}static{this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ot.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ut.asClassName(dj),linesDecorationsTooltip:fhe})}static{this.MANUALLY_EXPANDED_VISUAL_DECORATION=Ot.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ut.asClassName(iwt),linesDecorationsTooltip:fhe})}static{this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ot.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:ut.asClassName(iwt),linesDecorationsTooltip:fhe})}static{this.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Ot.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0})}static{this.HIDDEN_RANGE_DECORATION=Ot.register({description:"folding-hidden-range-decoration",stickiness:1})}constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}});function Pmi(i,e,t){let n=null,o=i.map((r,s)=>Promise.resolve(r.provideFoldingRanges(e,Fmi,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},ln));return Promise.all(o).then(r=>n)}function Bmi(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new B3e(e),o,r=[];for(let s of t)if(!o)o=s,n.add(s.start,s.end,s.kind&&s.kind.value,r.length);else if(s.start>o.start)if(s.end<=o.end)r.push(o),o=s,n.add(s.start,s.end,s.kind&&s.kind.value,r.length);else{if(s.start>o.end){do o=r.pop();while(o&&s.start>o.end);o&&r.push(o),o=s}n.add(s.start,s.end,s.kind&&s.kind.value,r.length)}return n.toIndentRanges()}var Fmi,Omi,A2,B3e,z3e=D(()=>{Tt();de();cj();Fmi={},Omi="syntax",A2=class{constructor(e,t,n,o,r){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=o,this.fallbackRangeProvider=r,this.id=Omi,this.disposables=new se,r&&this.disposables.add(r);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return Pmi(this.providers,this.editorModel,e).then(t=>t?Bmi(t,this.foldingRangesLimit):this.fallbackRangeProvider?.compute(e)??null)}dispose(){this.disposables.dispose()}};B3e=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,o){if(e>eb||t>eb)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=o,this._types[r]=n,this._length++,o<30&&(this._nestingLevelCounts[o]=(this._nestingLevelCounts[o]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let o=0;oe){n=a;break}t+=l}}let o=new Uint32Array(e),r=new Uint32Array(e),s=[];for(let a=0,l=0;a!1}:{startsInside(e,t){for(let n of i){let o=n.startLineNumber;if(o>=e&&o<=t)return!0}return!1}}}function nwt(i){if(!Xa(i)){if(!zr(i))return!1;let e=i;if(!Xa(e.levels)&&!Vp(e.levels)||!Xa(e.direction)&&!Na(e.direction)||!Xa(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(Vp)))return!1}return!0}var zmi,fj,pj,_u,B1,mj,Fc,V3e,H3e,W3e,U3e,j3e,Q3e,G3e,q3e,Y3e,K3e,J3e,X3e,Z3e,mhe,$3e,e4e,t4e,i4e,n4e,ghe=D(()=>{Gt();sn();Tt();Bp();de();Rt();gn();Q1t();MN();Jt();An();ro();Rs();M3e();ewt();F3e();Be();Bt();P3e();cj();z3e();Ic();hm();cd();Hi();et();to();mn();su();ao();zmi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},fj=function(i,e){return function(t,n){e(t,n,i)}},_u=new ze("foldingEnabled",!1),B1=class extends H{static{pj=this}static{this.ID="editor.contrib.folding"}static get(e){return e.getContribution(pj.ID)}static getFoldingRangeProviders(e,t){let n=e.foldingRangeProvider.ordered(t);return pj._foldingRangeSelector?.(n,t)??n}constructor(e,t,n,o,r,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new se),this.editor=e,this._foldingLimitReporter=new mj(e);let a=this.editor.getOptions();this._isEnabled=a.get(43),this._useFoldingProviders=a.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(46),this.updateDebounceInfo=r.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new phe(e),this.foldingDecorationProvider.showFoldingControls=a.get(111),this.foldingDecorationProvider.showFoldingHighlights=a.get(45),this.foldingEnabled=_u.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(47)&&this.onModelChanged(),l.hasChanged(111)||l.hasChanged(45)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(111),this.foldingDecorationProvider.showFoldingHighlights=c.get(45),this.triggerFoldingModelChanged()}l.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),l.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new che(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new hhe(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new da(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new si(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new b2(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=pj.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new A2(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new xo,n=this.getRangeProvider(e.textModel),o=this.foldingRegionPromise=mo(r=>n.compute(r));return o.then(r=>{if(r&&o===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let c=r.setCollapsedAllOfType(Vv.Imports.value,!0);c&&(s=yf.capture(this.editor),this._currentModelHasFoldedImports=c)}let a=this.editor.getSelections();e.update(r,Vmi(a)),s?.restore(this.editor);let l=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=l)}return e})}).then(void 0,e=>(ft(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let o=[];for(let r of n){let s=r.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&o.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}o.length&&(t.toggleCollapseState(o),this.reveal(n[0].getPosition()))}}}).then(void 0,ft)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let o=e.target.detail,r=e.target.element.offsetLeft;if(o.offsetX-r<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let o=this.editor.getModel();if(o&&t.startColumn===o.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,o=this.mouseDownInfo.iconClicked,r=e.target.range;if(!r||r.startLineNumber!==n)return;if(o){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||r.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(o||a){let l=e.event.altKey,c=[];if(l){let u=h=>!h.containedBy(s)&&!s.containedBy(h),d=t.getRegionsInside(null,u);for(let h of d)h.isCollapsed&&c.push(h);c.length===0&&(c=d)}else{let u=e.event.middleButton||e.event.shiftKey;if(u)for(let d of t.getRegionsInside(s))d.isCollapsed===a&&c.push(d);(a||!u||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};B1=pj=zmi([fj(1,Ze),fj(2,Gi),fj(3,_n),fj(4,Aa),fj(5,Me)],B1);mj=class{constructor(e){this.editor=e,this._onDidChange=new q,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Fc=class extends Pe{runEditorCommand(e,t,n){let o=e.get(Gi),r=B1.get(t);if(!r)return;let s=r.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(r,a,t,n,o);let l=t.getSelection();l&&r.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};V3e=class extends Fc{constructor(){super({id:"editor.unfold",label:y("unfoldAction.label","Unfold"),alias:"Unfold",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. - `,constraint:Jxt,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=r&&r.levels||1,s=this.getLineNumbers(r,n);r&&r.direction==="up"?l3e(t,!1,o,s):ON(t,!1,o,s)}},v3e=class extends kc{constructor(){super({id:"editor.unfoldRecursively",label:y("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2142),weight:100}})}invoke(e,t,n,r){ON(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},A3e=class extends kc{constructor(){super({id:"editor.fold",label:y("foldAction.label","Fold"),alias:"Fold",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: + `,constraint:nwt,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,o){let r=o&&o.levels||1,s=this.getLineNumbers(o,n);o&&o.direction==="up"?L3e(t,!1,r,s):g2(t,!1,r,s)}},H3e=class extends Fc{constructor(){super({id:"editor.unfoldRecursively",label:y("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2142),weight:100}})}invoke(e,t,n,o){g2(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},W3e=class extends Fc{constructor(){super({id:"editor.fold",label:y("foldAction.label","Fold"),alias:"Fold",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to fold. * 'direction': If 'up', folds given number of levels up otherwise folds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `,constraint:Jxt,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=this.getLineNumbers(r,n),s=r&&r.levels,a=r&&r.direction;typeof s!="number"&&typeof a!="string"?Hxt(t,!0,o):a==="up"?l3e(t,!0,s||1,o):ON(t,!0,s||1,o)}},y3e=class extends kc{constructor(){super({id:"editor.toggleFold",label:y("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2090),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);NW(t,1,r)}},w3e=class extends kc{constructor(){super({id:"editor.foldRecursively",label:y("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2140),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);ON(t,!0,Number.MAX_VALUE,r)}},x3e=class extends kc{constructor(){super({id:"editor.toggleFoldRecursively",label:y("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,3114),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);NW(t,Number.MAX_VALUE,r)}},C3e=class extends kc{constructor(){super({id:"editor.foldAllBlockComments",label:y("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2138),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())Uue(t,yA.Comment.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+Ja(a.blockCommentStartToken));Wue(t,l,!0)}}}},_3e=class extends kc{constructor(){super({id:"editor.foldAllMarkerRegions",label:y("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2077),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())Uue(t,yA.Region.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);Wue(t,l,!0)}}}},S3e=class extends kc{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:y("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2078),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())Uue(t,yA.Region.value,!1);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);Wue(t,l,!1)}}}},E3e=class extends kc{constructor(){super({id:"editor.foldAllExcept",label:y("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2136),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);c3e(t,!0,r)}},D3e=class extends kc{constructor(){super({id:"editor.unfoldAllExcept",label:y("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2134),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);c3e(t,!1,r)}},T3e=class extends kc{constructor(){super({id:"editor.foldAll",label:y("foldAllAction.label","Fold All"),alias:"Fold All",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2069),weight:100}})}invoke(e,t,n){ON(t,!0)}},k3e=class extends kc{constructor(){super({id:"editor.unfoldAll",label:y("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2088),weight:100}})}invoke(e,t,n){ON(t,!1)}},que=class i extends kc{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=e=>i.ID_PREFIX+e}getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){Wxt(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}},I3e=class extends kc{constructor(){super({id:"editor.gotoParentFold",label:y("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Uxt(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},L3e=class extends kc{constructor(){super({id:"editor.gotoPreviousFold",label:y("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=jxt(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},N3e=class extends kc{constructor(){super({id:"editor.gotoNextFold",label:y("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Qxt(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},M3e=class extends kc{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:y("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2135),weight:100}})}invoke(e,t,n){let r=[],o=n.getSelections();if(o){for(let s of o){let a=s.endLineNumber;s.endColumn===1&&--a,a>s.startLineNumber&&(r.push({startLineNumber:s.startLineNumber,endLineNumber:a,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:s.startLineNumber,startColumn:1,endLineNumber:s.startLineNumber,endColumn:1}))}if(r.length>0){r.sort((a,l)=>a.startLineNumber-l.startLineNumber);let s=_d.sanitizeAndMerge(t.regions,r,n.getModel()?.getLineCount());t.updatePost(_d.fromFoldRanges(s))}}}},R3e=class extends kc{constructor(){super({id:"editor.removeManualFoldingRanges",label:y("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2137),weight:100}})}invoke(e,t,n){let r=n.getSelections();if(r){let o=[];for(let s of r){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Tt(y1.ID,y1,0);xe(b3e);xe(v3e);xe(A3e);xe(w3e);xe(x3e);xe(T3e);xe(k3e);xe(C3e);xe(_3e);xe(S3e);xe(E3e);xe(D3e);xe(y3e);xe(I3e);xe(L3e);xe(N3e);xe(M3e);xe(R3e);for(let i=1;i<=7;i++)Zlt(new que({id:que.ID(i),label:y("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:gu,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2048|21+i),weight:100}}));ci.registerCommand("_executeFoldingRangeProvider",async function(i,...e){let[t]=e;if(!(t instanceof Xe))throw dc();let n=i.get(Le),r=i.get(an).getModel(t);if(!r)throw dc();let o=i.get(kt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(qi),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,p)=>{}},c=new PN(r,s,l),u=c;if(a!=="indentation"){let f=y1.getFoldingRangeProviders(n,r);f.length&&(u=new BN(r,f,()=>{},l,c))}let d=await u.compute(Ft.None),h=[];try{if(d)for(let f=0;f{ii();NF();Oe();F3e=class extends Fe{constructor(){super({id:"editor.action.fontZoomIn",label:y("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,t){hd.setZoomLevel(hd.getZoomLevel()+1)}},O3e=class extends Fe{constructor(){super({id:"editor.action.fontZoomOut",label:y("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,t){hd.setZoomLevel(hd.getZoomLevel()-1)}},P3e=class extends Fe{constructor(){super({id:"editor.action.fontZoomReset",label:y("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,t){hd.setZoomLevel(0)}};xe(F3e);xe(O3e);xe(P3e)});var Zxt,BW,Kue,Jue,B3e,z3e,$xt=D(()=>{Qt();sn();Lt();Ep();ae();ii();fs();kI();We();vn();xv();Ui();jFe();HFe();Oe();kE();Xn();Wt();ht();Qb();Zxt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},BW=function(i,e){return function(t,n){e(t,n,i)}},Kue=class{static{this.ID="editor.contrib.autoFormat"}constructor(e,t,n,r){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._accessibilitySignalService=r,this._disposables=new te,this._sessionDisposables=new te,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(o=>{o.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new lx;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new Bi,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a{r.token.isCancellationRequested||Jo(s)&&(this._accessibilitySignalService.playSignal(Qu.format,{userGesture:!1}),lN.execute(this._editor,s,!0))}).finally(()=>{o.dispose()})}};Kue=Zxt([BW(1,Le),BW(2,pa),BW(3,ap)],Kue);Jue=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new te,this._callOnModel=new te,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(WFe,this.editor,e,2,Zf.None,Ft.None,!1).catch(pt))}};Jue=Zxt([BW(1,Le),BW(2,Ne)],Jue);B3e=class extends Fe{constructor(){super({id:"editor.action.formatDocument",label:y("formatDocument.label","Format Document"),alias:"Format Document",precondition:me.and(V.notInCompositeEditor,V.writable,V.hasDocumentFormattingProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){let n=e.get(Ne);await e.get($f).showWhile(n.invokeFunction(Kvt,t,1,Zf.None,Ft.None,!0),250)}}},z3e=class extends Fe{constructor(){super({id:"editor.action.formatSelection",label:y("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:me.and(V.writable,V.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2084),weight:100},contextMenuOpts:{when:V.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;let n=e.get(Ne),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new N(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);await e.get($f).showWhile(n.invokeFunction(WFe,t,o,1,Zf.None,Ft.None,!0),250)}};Tt(Kue.ID,Kue,2);Tt(Jue.ID,Jue,2);xe(B3e);xe(z3e);ci.registerCommand("editor.action.format",async i=>{let e=i.get(ai).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(Oi);e.getSelection().isEmpty()?await t.executeCommand("editor.action.formatDocument"):await t.executeCommand("editor.action.formatSelection")})});var qCi,V3e,aD,e3,zW,VW,uC,H3e,t3=D(()=>{Qt();sn();Lt();td();ql();Nt();We();Kp();ht();wc();Zc();ae();Ui();qCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V3e=function(i,e){return function(t,n){e(t,n,i)}},aD=class{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let r=n;for(let o=0;t.children.get(r)!==void 0;o++)r=`${n}_${o}`;return r}static empty(e){return e.children.size===0}},e3=class extends aD{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},zW=class extends aD{constructor(e,t,n,r){super(),this.id=e,this.parent=t,this.label=n,this.order=r,this.children=new Map}},VW=class i extends aD{static create(e,t,n){let r=new Bi(n),o=new i(t.uri),s=e.ordered(t),a=s.map((c,u)=>{let d=aD.findId(`provider_${u}`,o),h=new zW(d,o,c.displayName??"Unknown Outline Provider",u);return Promise.resolve(c.provideDocumentSymbols(t,r.token)).then(f=>{for(let p of f||[])i._makeOutlineElement(p,h);return h},f=>(ln(f),h)).then(f=>{aD.empty(f)?f.remove():o._groups.set(d,f)})}),l=e.onDidChange(()=>{let c=e.ordered(t);Zi(c,s)||r.cancel()});return Promise.all(a).then(()=>r.token.isCancellationRequested&&!n.isCancellationRequested?i.create(e,t,n):o._compact()).finally(()=>{r.dispose(),l.dispose(),r.dispose()})}static _makeOutlineElement(e,t){let n=aD.findId(e,t),r=new e3(n,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,r);t.children.set(r.id,r)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(let[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=bi.first(this._groups.values());for(let[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof e3?e.push(t.symbol):e.push(...bi.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>N.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,r)=>K.compare(N.getStartPosition(n.range),N.getStartPosition(r.range))||K.compare(N.getEndPosition(r.range),N.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(let r of t)e.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||n,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&i._flattenDocumentSymbols(e,r.children,r.name)}},uC=vt("IOutlineModelService"),H3e=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new te,this._cache=new Gl(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(r=>{this._cache.delete(r.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){let n=this._languageFeaturesService.documentSymbolProvider,r=n.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Zi(o.provider,r)){let a=new Bi;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:VW.create(n,e,a.token),model:void 0},this._cache.set(e.id,o);let l=Date.now();o.promise.then(c=>{o.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;let s=t.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return await o.promise}finally{s.dispose()}}};H3e=qCi([V3e(0,Le),V3e(1,da),V3e(2,an)],H3e);ui(uC,H3e,1)});var eCt=D(()=>{sn();gn();mn();Yp();t3();Xn();ci.registerCommand("_executeDocumentSymbolProvider",async function(i,...e){let[t]=e;yi(Xe.isUri(t));let n=i.get(uC),o=await i.get(xs).createModelReference(t);try{return(await n.getOrCreate(o.object.textEditorModel,Ft.None)).getTopLevelSymbols()}finally{o.dispose()}})});var Sd,Xue=D(()=>{Tn();Pt();zb();Wt();ae();Oe();Sd=class i extends W{static{this.inlineSuggestionVisible=new Pe("inlineSuggestionVisible",!1,y("inlineSuggestionVisible","Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new Pe("inlineSuggestionHasIndentation",!1,y("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new Pe("inlineSuggestionHasIndentationLessThanTabSize",!0,y("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new Pe("inlineSuggestionSuppressSuggestions",void 0,y("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))}constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=i.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=i.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=i.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=i.suppressSuggestions.bindTo(this.contextKeyService),this._register(_t(n=>{let o=this.model.read(n)?.state.read(n),s=!!o?.inlineCompletion&&o?.primaryGhostText!==void 0&&!o?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(s),o?.primaryGhostText&&o?.inlineCompletion&&this.suppressSuggestions.set(o.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(_t(n=>{let r=this.model.read(n),o=!1,s=!0,a=r?.primaryGhostText.read(n);if(r?.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],u=c[0],d=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=d){let f=Vo(u);f===-1&&(f=u.length-1),o=f>0;let p=r.textModel.getOptions().tabSize;s=to.visibleColumnFromColumn(u,f+1,p){t.setStyle(i.read(n))})),e}var iCt=D(()=>{Ye();ae();Tn()});var nCt=D(()=>{});function W3e(i,e){return Zi(i,e,U3e)}function U3e(i,e){return i===e?!0:!i||!e?!1:i instanceof w1&&e instanceof w1||i instanceof i3&&e instanceof i3?i.equals(e):!1}var w1,lD,i3,HW=D(()=>{Qt();Pt();Nt();We();hy();w1=class{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,n)=>t.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return new GS([...this.parts.map(o=>new Wu(N.fromPositions(new K(1,o.column)),o.lines.join(` -`)))]).applyToString(n).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},lD=class{constructor(e,t,n){this.column=e,this.text=t,this.preview=n,this.lines=Pu(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,n)=>t===e.lines[n])}},i3=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.text=n,this.additionalReservedLineCount=r,this.parts=[new lD(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=Pu(this.text)}renderForScreenReader(e){return this.newLines.join(` -`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,n)=>t===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}});function rCt(){return YCi}function Zue(i,e){let t=new te,n=i.createDecorationsCollection();return t.add(My({debugName:()=>`Apply decorations from ${e.debugName}`},r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function oCt(i,e){return new K(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function j3e(i,e){return new K(i.lineNumber-e.lineNumber+1,i.lineNumber-e.lineNumber===0?i.column-e.column+1:i.column)}var YCi,n3,WW=D(()=>{Lt();ae();Tn();Nt();We();YCi=[];n3=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new vi(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new N(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}});function XCi(i,e,t,n,r){let o=n.get(33),s=n.get(118),a="none",l=n.get(95),c=n.get(51),u=n.get(50),d=n.get(67),h=new jp(1e4);h.appendString('
    ');for(let g=0,v=t.length;g');let C=ZA(w),_=rv(w),E=To.createEmpty(w,r);ex(new Wh(u.isMonospace&&!o,u.canUseHalfwidthRightwardsArrow,w,!1,C,_,0,E,A.decorations,e,0,u.spaceWidth,u.middotWidth,u.wsmiddotWidth,s,a,l,c!==fg.OFF,null),h),h.appendString("
    ")}h.appendString(""),mo(i,u);let f=h.build(),p=aCt?aCt.createHTML(f):f;i.innerHTML=p}var KCi,JCi,sCt,$ue,Q3e,aCt,lCt=D(()=>{ay();et();ae();Tn();Pt();nCt();qp();Ks();Nt();We();$w();Sl();tl();wg();aI();ES();HW();WW();KCi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},JCi=function(i,e){return function(t,n){e(t,n,i)}},sCt="ghost-text",$ue=class extends W{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Gt(this,!1),this.currentTextModel=zi(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=st(this,r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=s instanceof i3?s.columnRange:void 0,l=[],c=[];function u(g,v){if(c.length>0){let A=c[c.length-1];v&&A.decorations.push(new Jc(A.content.length+1,A.content.length+1+g[0].length,v,0)),A.content+=g[0],g=g.slice(1)}for(let A of g)c.push({content:A,decorations:v?[new Jc(1,A.length+1,v,0)]:[]})}let d=o.getLineContent(s.lineNumber),h,f=0;for(let g of s.parts){let v=g.lines;h===void 0?(l.push({column:g.column,text:v[0],preview:g.preview}),v=v.slice(1)):u([d.substring(f,g.column-1)],void 0),v.length>0&&(u(v,sCt),h===void 0&&g.column<=d.length&&(h=g.column)),f=g.column-1}h!==void 0&&u([d.substring(f)],void 0);let p=h!==void 0?new n3(h,d.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:p,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=st(this,r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of o.inlineTexts)s.push({range:N.fromPositions(new K(o.lineNumber,a.column)),options:{description:sCt,after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Yh.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new Q3e(this.editor,this.languageService.languageIdCodec,st(r=>{let o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(Ve(()=>{this.isDisposed.set(!0,void 0)})),this._register(Zue(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};$ue=KCi([JCi(2,rn)],$ue);Q3e=class extends W{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=bs("editorOptionChanged",Se.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(33)||r.hasChanged(118)||r.hasChanged(100)||r.hasChanged(95)||r.hasChanged(51)||r.hasChanged(50)||r.hasChanged(67))),this._register(_t(r=>{let o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let r=this.editor.getModel();if(!r)return;let{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");XCi(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};aCt=fd("editorGhostText",{createHTML:i=>i})});function cCt(i,e){let t=new VO,n=new WO(t,c=>e.getLanguageConfiguration(c)),r=new HO(new G3e([i]),n),o=sV(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,u){if(c.kind===2)if(l(c.openingBracket,u),u=Fr(u,c.openingBracket.length),c.child&&(l(c.child,u),u=Fr(u,c.child.length)),c.closingBracket)l(c.closingBracket,u),u=Fr(u,c.closingBracket.length);else{let h=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(u,Fr(u,c.length));else if(c.kind===4)for(let d of c.children)l(d,u),u=Fr(u,d.length)}}return l(o,Tl),s}var G3e,uCt=D(()=>{hLe();Hy();bLe();cL();Kie();G3e=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}});async function ede(i,e,t,n,r=Ft.None,o){let s=e instanceof K?ZCi(e,t):e,a=i.all(t),l=new HS;for(let A of a)A.groupId&&l.add(A.groupId,A);function c(A){if(!A.yieldsToGroupIds)return[];let w=[];for(let C of A.yieldsToGroupIds||[]){let _=l.get(C);for(let E of _)w.push(E)}return w}let u=new Map,d=new Set;function h(A,w){if(w=[...w,A],d.has(A))return w;d.add(A);try{let C=c(A);for(let _ of C){let E=h(_,w);if(E)return E}}finally{d.delete(A)}}function f(A){let w=u.get(A);if(w)return w;let C=h(A,[]);C&&ln(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${C.map(E=>E.toString?E.toString():""+E).join(" -> ")}`));let _=new Pp;return u.set(A,_.p),(async()=>{if(!C){let E=c(A);for(let I of E){let T=await f(I);if(T&&T.items.length>0)return}}try{return e instanceof K?await A.provideInlineCompletions(t,e,n,r):await A.provideInlineEdits?.(t,e,n,r)}catch(E){ln(E);return}})().then(E=>_.complete(E),E=>_.error(E)),_.p}let p=await Promise.all(a.map(async A=>({provider:A,completions:await f(A)}))),g=new Map,v=[];for(let A of p){let w=A.completions;if(!w)continue;let C=new Y3e(w,A.provider);v.push(C);for(let _ of w.items){let E=K3e.from(_,C,s,t,o);g.set(E.hash(),E)}}return new q3e(Array.from(g.values()),new Set(g.keys()),v)}function ZCi(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new N(i.lineNumber,t.startColumn,i.lineNumber,n):N.fromPositions(i,i.with(void 0,n))}function dCt(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,a=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i)?.sliceAndInflate(e.column-1,o.length,0);return a?cCt(a,n):i}var q3e,Y3e,K3e,J3e=D(()=>{Mb();Jt();sn();ql();Lt();Nt();We();uCt();hy();WW();qE();q3e=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},Y3e=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},K3e=class i{static from(e,t,n,r,o){let s,a,l=e.range?N.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=dCt(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new N(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=dCt(e.insertText.snippet,l.getStartPosition(),r,o);let d=e.insertText.snippet.length-c;d!==0&&(l=new N(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+d))}let u=new hp().parse(e.insertText.snippet);u.children.length===1&&u.children[0]instanceof du?(s=u.children[0].value,a=void 0):(s=u.toString(),a={snippet:e.insertText.snippet,range:l})}else vS(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||rCt(),e,t)}constructor(e,t,n,r,o,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` -`),r=e.replace(/\r\n|\r/g,` -`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new Wu(this.range,this.insertText)}}});function x1(i,e,t){let n=t?i.range.intersectRanges(t):i.range;if(!n)return i;let r=e.getValueInRange(n,1),o=Uf(r,i.text),s=$c.ofText(r.substring(0,o)).addToPosition(i.range.getStartPosition()),a=i.text.substring(o),l=N.fromPositions(s,i.range.getEndPosition());return new Wu(l,a)}function ide(i,e){return i.text.startsWith(e.text)&&$Ci(i.range,e.range)}function X3e(i,e,t,n,r=0){let o=x1(i,e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=wn(s).length;if(o.range.startColumn-1<=a){let p=wn(o.text).length,g=s.substring(o.range.startColumn-1,a),[v,A]=[o.range.getStartPosition(),o.range.getEndPosition()],w=v.column+g.length<=A.column?v.delta(0,g.length):A,C=N.fromPositions(w,A),_=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(p);o=new Wu(C,_)}let c=e.getValueInRange(o.range),u=e_i(c,o.text);if(!u)return;let d=o.range.startLineNumber,h=new Array;if(t==="prefix"){let p=u.filter(g=>g.originalLength===0);if(p.length>1||p.length===1&&p[0].originalStart!==c.length)return}let f=o.text.length-r;for(let p of u){let g=o.range.startColumn+p.originalStart+p.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&g0)return;if(p.modifiedLength===0)continue;let v=p.modifiedStart+p.modifiedLength,A=Math.max(p.modifiedStart,Math.min(v,f)),w=o.text.substring(p.modifiedStart,A),C=o.text.substring(A,Math.max(p.modifiedStart,v));w.length>0&&h.push(new lD(g,w,!1)),C.length>0&&h.push(new lD(g,C,!0))}return new w1(d,h)}function $Ci(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function e_i(i,e){if(tde?.originalValue===i&&tde?.newValue===e)return tde?.changes;{let t=fCt(i,e,!0);if(t){let n=hCt(t);if(n>0){let r=fCt(i,e,!1);r&&hCt(r)5e3||e.length>5e3)return;function n(c){let u=0;for(let d=0,h=c.length;du&&(u=f)}return u}let r=Math.max(n(i),n(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let u=0,d=0,h=new Int32Array(c.length);for(let f=0,p=c.length;fa},{getElements:()=>l}).ComputeDiff(!1).changes}var tde,nde=D(()=>{z7();Pt();We();dx();hy();HW()});function i_i(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}var t_i,pCt,rde,$3e,e4e,t4e,ode,Z3e,mCt=D(()=>{sn();ky();yg();ae();Tn();We();hy();dx();tr();ks();Ui();J3e();nde();t_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pCt=function(i,e){return function(t,n){e(t,n,i)}},rde=class extends W{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new On),this.inlineCompletions=Ly("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Ly("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){let r=new $3e(e,t,this.textModel.getVersionId()),o=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(r))return this._updateOperation.value.promise;if(o.get()?.request.satisfies(r))return Promise.resolve(!0);let s=!!this._updateOperation.value;this._updateOperation.clear();let a=new Bi,l=(async()=>{if((s||t.triggerKind===Lf.Automatic)&&await i_i(this._debounceValue.get(this.textModel),a.token),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==r.versionId)return!1;let d=new Date,h=await ede(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==r.versionId)return!1;let f=new Date;this._debounceValue.update(this.textModel,f.getTime()-d.getTime());let p=new t4e(h,r,this.textModel,this.versionId);if(n){let g=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!h.has(g)&&p.prepend(n.inlineCompletion,g.range,!0)}return this._updateOperation.clear(),fn(g=>{o.set(p,g)}),!0})(),c=new e4e(r,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};rde=t_i([pCt(3,Le),pCt(4,qi)],rde);$3e=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&Oz(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,Iht())&&(e.context.triggerKind===Lf.Automatic||this.context.triggerKind===Lf.Explicit)&&this.versionId===e.versionId}},e4e=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},t4e=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=n,this._versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[];let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new ode(s,o[a],this._textModel,this._versionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new ode(e,r,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}},ode=class{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this._textModel=n,this._modelVersion=r,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=Jl({owner:this,equalsFn:N.equalsRange},o=>(this._modelVersion.read(o),this._textModel.getDecorationRange(this.decorationId)))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??Z3e)}toSingleTextEdit(e){return new Wu(this._updatedRange.read(e)??Z3e,this.inlineCompletion.insertText)}isVisible(e,t,n){let r=x1(this._toFilterTextReplacement(n),e),o=this._updatedRange.read(n);if(!o||!this.inlineCompletion.range.getStartPosition().equals(o.getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let s=e.getValueInRange(r.range,1),a=r.text,l=Math.max(0,t.column-r.range.startColumn),c=a.substring(0,l),u=a.substring(l),d=s.substring(0,l),h=s.substring(l),f=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=f&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),c=c.trimStart(),c.length===0&&(u=u.trimStart())),c.startsWith(d)&&!!Dke(h,u)}canBeReused(e,t){let n=this._updatedRange.read(void 0);return!!n&&n.containsPosition(t)&&this.isVisible(e,t,void 0)&&$c.ofRange(n).isGreaterThanOrEqualTo($c.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){return new Wu(this._updatedRange.read(e)??Z3e,this.inlineCompletion.filterText)}},Z3e=new N(1,1,1,1)});function gCt(){return r3}async function UW(i,e,t,n=zN.default,r={triggerKind:0},o=Ft.None){let s=new Ar;t=t.clone();let a=e.getWordAtPosition(t),l=a?new N(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):N.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},u=[],d=new te,h=[],f=!1,p=(v,A,w)=>{let C=!1;if(!A)return C;for(let _ of A.suggestions)if(!n.kindFilter.has(_.kind)){if(!n.showDeprecated&&_?.tags?.includes(1))continue;_.range||(_.range=c),_.sortText||(_.sortText=typeof _.label=="string"?_.label:_.label.label),!f&&_.insertTextRules&&_.insertTextRules&4&&(f=hp.guessNeedsClipboard(_.insertText)),u.push(new i4e(t,_,A,v)),C=!0}return y_(A)&&d.add(A),h.push({providerName:v._debugDisplayName??"unknown_provider",elapsedProvider:A.duration??-1,elapsedOverall:w.elapsed()}),C},g=(async()=>{if(!r3||n.kindFilter.has(27))return;let v=n.providerItemsToReuse.get(r3);if(v){v.forEach(C=>u.push(C));return}if(n.providerFilter.size>0&&!n.providerFilter.has(r3))return;let A=new Ar,w=await r3.provideCompletionItems(e,t,r,o);p(r3,w,A)})();for(let v of i.orderedGroups(e)){let A=!1;if(await Promise.all(v.map(async w=>{if(n.providerItemsToReuse.has(w)){let C=n.providerItemsToReuse.get(w);C.forEach(_=>u.push(_)),A=A||C.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(w)))try{let C=new Ar,_=await w.provideCompletionItems(e,t,r,o);A=p(w,_,C)||A}catch(C){ln(C)}})),A||o.isCancellationRequested)break}return await g,o.isCancellationRequested?(d.dispose(),Promise.reject(new Hc)):new n4e(u.sort(o_i(n.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},d)}function r4e(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLowe.sortTextLow)return 1}return i.textLabele.textLabel?1:i.completion.kind-e.completion.kind}function n_i(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return r4e(i,e)}function r_i(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return r4e(i,e)}function o_i(i){return sde.get(i)}function bCt(i,e){i.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(e),void 0,!0)}var ki,_1,i4e,zN,r3,n4e,sde,C1,VN=D(()=>{sn();Lt();yg();ae();id();gn();mn();Nt();We();Yp();qE();Oe();fr();Xn();Wt();Ui();YBe();ki={Visible:Pue,HasFocusedSuggestion:new Pe("suggestWidgetHasFocusedSuggestion",!1,y("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Pe("suggestWidgetDetailsVisible",!1,y("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Pe("suggestWidgetMultipleSuggestions",!1,y("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Pe("suggestionMakesTextEdit",!0,y("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Pe("acceptSuggestionOnEnter",!0,y("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Pe("suggestionHasInsertAndReplaceRange",!1,y("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Pe("suggestionInsertMode",void 0,{type:"string",description:y("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Pe("suggestionCanResolve",!1,y("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},_1=new tt("suggestWidgetStatusBar"),i4e=class{constructor(e,t,n,r){this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=Jh.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,N.isIRange(t.range)?(this.editStart=new K(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new K(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new K(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||N.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new K(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new K(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new K(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||N.spansMultipleLines(t.range.insert)||N.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new Ar(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(r=>{Object.assign(this.completion,r),this._resolveDuration=n.elapsed()},r=>{ja(r)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache}},zN=class i{static{this.default=new i}constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};n4e=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};sde=new Map;sde.set(0,n_i);sde.set(2,r_i);sde.set(1,r4e);ci.registerCommand("_executeCompletionItemProvider",async(i,...e)=>{let[t,n,r,o]=e;yi(Xe.isUri(t)),yi(K.isIPosition(n)),yi(typeof r=="string"||!r),yi(typeof o=="number"||!o);let{completionProvider:s}=i.get(Le),a=await i.get(xs).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],u=a.object.textEditorModel.validatePosition(n),d=await UW(s,a.object.textEditorModel,u,void 0,{triggerCharacter:r??void 0,triggerKind:r?1:0});for(let h of d.items)c.length<(o??0)&&c.push(h.resolve(Ft.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return await Promise.all(c),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}});C1=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}});var vCt=D(()=>{});function o4e(i,e=Nr){return Rut(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var ACt=D(()=>{Uee();Si()});var s_i,a_i,tdr,jW,QW,GW,qW,YW,KW,JW,XW,yCt=D(()=>{ACt();H0();Ec();Pt();WH();ks();qE();Oe();pO();s_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},a_i=function(i,e){return function(t,n){e(t,n,i)}},tdr=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),jW=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},QW=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=wn(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof du&&(a=wn(Pu(c.value).pop())),!0));let l=Uf(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,u,d)=>`${u}${a.substr(l)}${d}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},GW=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return ub(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=ub(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return gY(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(sE(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},qW=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!$X(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},YW=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};YW=s_i([a_i(2,qi)],YW);KW=class i{constructor(){this._date=new Date}static{this.dayNames=[y("Sunday","Sunday"),y("Monday","Monday"),y("Tuesday","Tuesday"),y("Wednesday","Wednesday"),y("Thursday","Thursday"),y("Friday","Friday"),y("Saturday","Saturday")]}static{this.dayNamesShort=[y("SundayShort","Sun"),y("MondayShort","Mon"),y("TuesdayShort","Tue"),y("WednesdayShort","Wed"),y("ThursdayShort","Thu"),y("FridayShort","Fri"),y("SaturdayShort","Sat")]}static{this.monthNames=[y("January","January"),y("February","February"),y("March","March"),y("April","April"),y("May","May"),y("June","June"),y("July","July"),y("August","August"),y("September","September"),y("October","October"),y("November","November"),y("December","December")]}static{this.monthNamesShort=[y("JanuaryShort","Jan"),y("FebruaryShort","Feb"),y("MarchShort","Mar"),y("AprilShort","Apr"),y("MayShort","May"),y("JuneShort","Jun"),y("JulyShort","Jul"),y("AugustShort","Aug"),y("SeptemberShort","Sep"),y("OctoberShort","Oct"),y("NovemberShort","Nov"),y("DecemberShort","Dec")]}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}},JW=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=wht(this._workspaceService.getWorkspace());if(!yht(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(Ote(e))return ub(e.uri.path);let t=ub(e.configPath.path);return t.endsWith(Pte)&&(t=t.substr(0,t.length-Pte.length-1)),t}_resoveWorkspacePath(e){if(Ote(e))return o4e(e.uri.fsPath);let t=ub(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?o4e(n):"/"}},XW=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return QE()}}});var l_i,c_i,zv,ade,wCt,o3,s4e=D(()=>{Qt();ae();Pt();vCt();$p();We();Hn();ks();vs();hO();pO();qE();yCt();l_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c_i=function(i,e){return function(t,n){e(t,n,i)}},ade=class i{static{this._decor={active:zt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:zt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:zt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:zt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=_Ee(t.placeholders,cm.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=N.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let u=1;u0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new qe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let u of this._snippet.enclosingPlaceholders(a)){let d=this._placeholderDecorations.get(u);r.changeDecorationOptions(d,u.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(u)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof cm){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof fN,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),u=o._snippet.fullLen(l),d=N.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+u)),h=n.addDecoration(d,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=_Ee(this._snippet.placeholders,cm.compareByIndex)})}},wCt={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},o3=zv=class{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=wn(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof du)||c.parent instanceof fN||o&&!o.has(c))return!0;let u=c.value.split(/\r\n|\r|\n/);if(n){let h=r.offset(c);if(h===0)u[0]=e.normalizeIndentation(u[0]);else{l=l??r.toString();let f=l.charCodeAt(h-1);(f===10||f===13)&&(u[0]=e.normalizeIndentation(a+u[0]))}for(let f=1;f_.get(gv)),p=e.invokeWithinContext(_=>new GW(_.get(mv),h)),g=()=>a,v=h.getValueInRange(zv.adjustSelection(h,e.getSelection(),n,0)),A=h.getValueInRange(zv.adjustSelection(h,e.getSelection(),0,r)),w=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),C=e.getSelections().map((_,E)=>({selection:_,idx:E})).sort((_,E)=>N.compareRangesUsingStarts(_.selection,E.selection));for(let{selection:_,idx:E}of C){let I=zv.adjustSelection(h,_,n,0),T=zv.adjustSelection(h,_,0,r);v!==h.getValueInRange(I)&&(I=_),A!==h.getValueInRange(T)&&(T=_);let L=_.setStartPosition(I.startLineNumber,I.startColumn).setEndPosition(T.endLineNumber,T.endColumn),M=new hp().parse(t,!0,o),z=L.getStartPosition(),H=zv.adjustWhitespace(h,z,s||E>0&&w!==h.getLineFirstNonWhitespaceColumn(_.positionLineNumber),M);M.resolveVariables(new jW([p,new qW(g,E,C.length,e.getOption(79)==="spread"),new QW(h,_,E,l),new YW(h,_,c),new KW,new JW(f),new XW])),u[E]=Dn.replace(L,M.toString()),u[E].identifier={major:E,minor:0},u[E]._isTracked=!0,d[E]=new ade(e,M,H)}return{edits:u,snippets:d}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),u=new hp,d=new AB,h=new jW([e.invokeWithinContext(p=>new GW(p.get(mv),c)),new qW(()=>o,0,e.getSelections().length,e.getOption(79)==="spread"),new QW(c,e.getSelection(),0,s),new YW(c,e.getSelection(),a),new KW,new JW(e.invokeWithinContext(p=>p.get(gv))),new XW]);t=t.sort((p,g)=>N.compareRangesUsingStarts(p.range,g.range));let f=0;for(let p=0;p0){let E=t[p-1].range,I=N.fromPositions(E.getEndPosition(),g.getStartPosition()),T=new du(c.getValueInRange(I));d.appendChild(T),f+=T.value.length}let A=u.parseFragment(v,d);zv.adjustWhitespace(c,g.getStartPosition(),!0,d,new Set(A)),d.resolveVariables(h);let w=d.toString(),C=w.slice(f);f=w.length;let _=Dn.replace(g,C);_.identifier={major:p,minor:0},_._isTracked=!0,l.push(_)}return u.ensureFinalTabstop(d,n,!0),{edits:l,snippets:[new ade(e,d,"")]}}constructor(e,t,n=wCt,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){Vi(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?zv.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):zv.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;oqe.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=wCt){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=zv.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;lqe.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length{o.push(...r.get(s))})}e.sort(N.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(N.compareRangesUsingStarts);for(let o=0;o0}};o3=zv=l_i([c_i(3,qi)],o3)});var u_i,lde,s3,xCt,bu,cde,ZW=D(()=>{ae();gn();ii();Nt();vn();ks();Ui();VN();Oe();Wt();th();s4e();u_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lde=function(i,e){return function(t,n){e(t,n,i)}},xCt={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},bu=class{static{s3=this}static{this.ID="snippetController2"}static get(e){return e.getContribution(s3.ID)}static{this.InSnippetMode=new Pe("inSnippetMode",!1,y("inSnippetMode","Whether the editor in current in snippet mode"))}static{this.HasNextTabstop=new Pe("hasNextTabstop",!1,y("hasNextTabstop","Whether there is a next tab stop when in snippet mode"))}static{this.HasPrevTabstop=new Pe("hasPrevTabstop",!1,y("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"))}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new te,this._modelVersionId=-1,this._inSnippet=s3.InSnippetMode.bindTo(r),this._hasNextTabstop=s3.HasNextTabstop.bindTo(r),this._hasPrevTabstop=s3.HasPrevTabstop.bindTo(r)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?xCt:{...xCt,...t})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(yi(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new o3(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){let n={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(c,u)=>{if(!this._session||c!==this._editor.getModel()||!K.equals(this._editor.getPosition(),u))return;let{activeChoice:d}=this._session;if(!d||d.choice.options.length===0)return;let h=c.getValueInRange(d.range),f=!!d.choice.options.find(g=>g.value===h),p=[];for(let g=0;g{o?.dispose(),s=!1},l=()=>{s||(o=this._languageFeaturesService.completionProvider.register({language:r.getLanguageId(),pattern:r.uri.fsPath,scheme:r.uri.scheme,exclusive:!0},n),this._snippetListener.add(o),s=!0)};this._choiceCompletions={provider:n,enable:l,disable:a}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletions){this._choiceCompletions?.disable(),this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{bCt(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};bu=s3=u_i([lde(1,no),lde(2,Le),lde(3,Ze),lde(4,qi)],bu);Tt(bu.ID,bu,4);cde=Sr.bindToContribution(bu.get);Qe(new cde({id:"jumpToNextSnippetPlaceholder",precondition:me.and(bu.InSnippetMode,bu.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:130,kbExpr:V.textInputFocus,primary:2}}));Qe(new cde({id:"jumpToPrevSnippetPlaceholder",precondition:me.and(bu.InSnippetMode,bu.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:130,kbExpr:V.textInputFocus,primary:1026}}));Qe(new cde({id:"leaveSnippet",precondition:bu.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:130,kbExpr:V.textInputFocus,primary:9,secondary:[1033]}}));Qe(new cde({id:"acceptSnippet",precondition:bu.InSnippetMode,handler:i=>i.finish()}))});function l4e(i,e,t){if(e.length===1)return[];let n=e[0],r=e.slice(1),o=t.range.getStartPosition(),s=t.range.getEndPosition(),a=i.getValueInRange(N.fromPositions(n,s)),l=j3e(n,o);if(l.lineNumber<1)return pt(new vi(`positionWithinTextEdit line number should be bigger than 0. - Invalid subtraction between ${n.toString()} and ${o.toString()}`)),[];let c=h_i(t.text,l);return r.map(u=>{let d=oCt(j3e(u,o),s),h=i.getValueInRange(N.fromPositions(u,d)),f=Uf(a,h),p=N.fromPositions(u,u.delta(0,f));return new Wu(p,c)})}function h_i(i,e){let t="",n=Kot(i);for(let r=e.lineNumber-1;ro.range,N.compareRangesUsingStarts)),n=new GS(e.apply(i)).getNewRanges();return e.inverse().apply(n).map(o=>o.getEndPosition())}var d_i,a4e,ude,dC,_Ct=D(()=>{Qt();Jf();ky();Lt();ae();Tn();Pt();gn();$p();Nt();We();Hn();hy();dx();tr();ks();HW();mCt();nde();WW();ZW();Xn();ht();d_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},a4e=function(i,e){return function(t,n){e(t,n,i)}},ude=class extends W{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,n,r,o,s,a,l,c,u,d,h){super(),this.textModel=e,this.selectedSuggestItem=t,this._textModelVersionId=n,this._positions=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=u,this._commandService=d,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(rde,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=Gt(this,!1),this._forceUpdateExplicitlySignal=Cg(this),this._selectedInlineCompletionId=Gt(this,void 0),this._primaryPosition=st(this,p=>this._positions.read(p)[0]??new K(1,1)),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([dC.Redo,dC.Undo,dC.AcceptWord]),this._fetchInlineCompletionsPromise=Vz({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Lf.Automatic}),handleChange:(p,g)=>(p.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(p.change))?g.preserveCurrentCompletion=!0:p.didChange(this._forceUpdateExplicitlySignal)&&(g.inlineCompletionTriggerKind=Lf.Explicit),!0)},(p,g)=>{if(this._forceUpdateExplicitlySignal.read(p),!(this._enabled.read(p)&&this.selectedSuggestItem.read(p)||this._isActive.read(p))){this._source.cancelUpdate();return}this._textModelVersionId.read(p);let A=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(p);if(A&&!w){let T=this._source.inlineCompletions.get();fn(L=>{(!T||A.request.versionId>T.request.versionId)&&this._source.inlineCompletions.set(A.clone(),L),this._source.clearSuggestWidgetInlineCompletions(L)})}let C=this._primaryPosition.read(p),_={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:w?.toSelectedSuggestionInfo()},E=this.selectedInlineCompletion.get(),I=g.preserveCurrentCompletion||E?.forwardStable?E:void 0;return this._source.fetch(C,_,I)}),this._filteredInlineCompletionItems=Jl({owner:this,equalsFn:$I()},p=>{let g=this._source.inlineCompletions.read(p);if(!g)return[];let v=this._primaryPosition.read(p);return g.inlineCompletions.filter(w=>w.isVisible(this.textModel,v,p))}),this.selectedInlineCompletionIndex=st(this,p=>{let g=this._selectedInlineCompletionId.read(p),v=this._filteredInlineCompletionItems.read(p),A=this._selectedInlineCompletionId===void 0?-1:v.findIndex(w=>w.semanticId===g);return A===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):A}),this.selectedInlineCompletion=st(this,p=>{let g=this._filteredInlineCompletionItems.read(p),v=this.selectedInlineCompletionIndex.read(p);return g[v]}),this.activeCommands=Jl({owner:this,equalsFn:$I()},p=>this.selectedInlineCompletion.read(p)?.inlineCompletion.source.inlineCompletions.commands??[]),this.lastTriggerKind=this._source.inlineCompletions.map(this,p=>p?.request.context.triggerKind),this.inlineCompletionsCount=st(this,p=>{if(this.lastTriggerKind.read(p)===Lf.Explicit)return this._filteredInlineCompletionItems.read(p).length}),this.state=Jl({owner:this,equalsFn:(p,g)=>!p||!g?p===g:W3e(p.ghostTexts,g.ghostTexts)&&p.inlineCompletion===g.inlineCompletion&&p.suggestItem===g.suggestItem},p=>{let g=this.textModel,v=this.selectedSuggestItem.read(p);if(v){let A=x1(v.toSingleTextEdit(),g),w=this._computeAugmentation(A,p);if(!this._suggestPreviewEnabled.read(p)&&!w)return;let _=w?.edit??A,E=w?w.edit.text.length-A.text.length:0,I=this._suggestPreviewMode.read(p),T=this._positions.read(p),L=[_,...l4e(this.textModel,T,_)],M=L.map((H,B)=>X3e(H,g,I,T[B],E)).filter(If),z=M[0]??new w1(_.range.endLineNumber,[]);return{edits:L,primaryGhostText:z,ghostTexts:M,inlineCompletion:w?.completion,suggestItem:v}}else{if(!this._isActive.read(p))return;let A=this.selectedInlineCompletion.read(p);if(!A)return;let w=A.toSingleTextEdit(p),C=this._inlineSuggestMode.read(p),_=this._positions.read(p),E=[w,...l4e(this.textModel,_,w)],I=E.map((T,L)=>X3e(T,g,C,_[L],0)).filter(If);return I[0]?{edits:E,primaryGhostText:I[0],ghostTexts:I,inlineCompletion:A,suggestItem:void 0}:void 0}}),this.ghostTexts=Jl({owner:this,equalsFn:W3e},p=>{let g=this.state.read(p);if(g)return g.ghostTexts}),this.primaryGhostText=Jl({owner:this,equalsFn:U3e},p=>{let g=this.state.read(p);if(g)return g?.primaryGhostText}),this._register(qb(this._fetchInlineCompletionsPromise));let f;this._register(_t(p=>{let v=this.state.read(p)?.inlineCompletion;if(v?.semanticId!==f?.semanticId&&(f=v,v)){let A=v.inlineCompletion,w=A.source;w.provider.handleItemDidShow?.(w.inlineCompletions,A.sourceInlineCompletion,A.insertText)}}))}_getReason(e){return e?.isUndoing?dC.Undo:e?.isRedoing?dC.Redo:this.isAcceptingPartially?dC.AcceptWord:dC.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){xg(e,t=>{this._isActive.set(!0,t),this._forceUpdateExplicitlySignal.trigger(t)}),await this._fetchInlineCompletionsPromise.get()}stop(e){xg(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentation(e,t){let n=this.textModel,r=this._source.suggestWidgetInlineCompletions.read(t),o=r?r.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(If);return Bct(o,a=>{let l=a.toSingleTextEdit(t);return l=x1(l,n,N.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),ide(l,e)?{completion:a,edit:l}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new vi;let t=this.state.get();if(!t||t.primaryGhostText.isEmpty()||!t.inlineCompletion)return;let n=t.inlineCompletion.toInlineCompletion(void 0);if(n.command&&n.source.addRef(),e.pushUndoStop(),n.snippetInfo)e.executeEdits("inlineSuggestion.accept",[Dn.replace(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),bu.get(e)?.insert(n.snippetInfo.snippet,{undoStopBefore:!1});else{let r=t.edits,o=CCt(r).map(s=>qe.fromPositions(s));e.executeEdits("inlineSuggestion.accept",[...r.map(s=>Dn.replace(s.range,s.text)),...n.additionalTextEdits]),e.setSelections(o,"inlineCompletionAccept")}this.stop(),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,ln),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let u=/\s+/g.exec(n);return u&&u.index!==void 0&&u.index+u[0].length{let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length},1)}async _acceptNext(e,t,n){if(e.getModel()!==this.textModel)throw new vi;let r=this.state.get();if(!r||r.primaryGhostText.isEmpty()||!r.inlineCompletion)return;let o=r.primaryGhostText,s=r.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText){await this.accept(e);return}let a=o.parts[0],l=new K(o.lineNumber,a.column),c=a.text,u=t(l,c);if(u===c.length&&o.parts.length===1){this.accept(e);return}let d=c.substring(0,u),h=this._positions.get(),f=h[0];s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();let p=N.fromPositions(f,l),g=e.getModel().getValueInRange(p)+d,v=new Wu(p,g),A=[v,...l4e(this.textModel,h,v)],w=CCt(A).map(C=>qe.fromPositions(C));e.executeEdits("inlineSuggestion.accept",A.map(C=>Dn.replace(C.range,C.text))),e.setSelections(w,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){let p=N.fromPositions(s.range.getStartPosition(),$c.ofText(d).addToPosition(l)),g=e.getModel().getValueInRange(p,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,g.length,{kind:n})}}finally{s.source.removeRef()}}handleSuggestAccepted(e){let t=x1(e.toSingleTextEdit(),this.textModel),n=this._computeAugmentation(t,void 0);if(!n)return;let r=n.completion.inlineCompletion;r.source.provider.handlePartialAccept?.(r.source.inlineCompletions,r.sourceInlineCompletion,t.text.length,{kind:2})}};ude=d_i([a4e(9,Ne),a4e(10,Oi),a4e(11,qi)],ude);(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(dC||(dC={}))});var f_i,SCt,$W,eU,dde,c4e,u4e,d4e,a3,h4e=D(()=>{Jt();ae();ql();Rte();tr();nr();wc();ht();yv();f_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},SCt=function(i,e){return function(t,n){e(t,n,i)}},eU=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let r=n[0].score[0];for(let o=0;ol&&d.type===n[c].completion.kind&&d.insertText===n[c].completion.insertText&&(l=d.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,r]of e)r.touch=t,r.type=typeof r.type=="number"?r.type:YT.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},u4e=class extends eU{constructor(){super("recentlyUsedByPrefix"),this._trie=ZI.forStrings(),this._seq=0}memorize(e,t,n){let{word:r}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:r}=e.getWordUntilPosition(t);if(!r)return super.select(e,t,n);let o=`${e.getLanguageId()}/${r}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;ae.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:YT.fromString(n.type),this._trie.set(t,n)}}},d4e=class{static{$W=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",u4e],["recentlyUsed",c4e],["first",dde]])}static{this._storagePrefix="suggest/memories"}constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new te,this._persistSoon=new di(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===mE.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){let n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==n){this._saveState();let r=$W._strategyCtors.get(n)||dde;this._strategy=new r;try{let s=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,a=this._storageService.get(`${$W._storagePrefix}/${n}`,s);a&&this._strategy.fromJSON(JSON.parse(a))}catch{}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${$W._storagePrefix}/${this._strategy.name}`,n,t,1)}}};d4e=$W=f_i([SCt(0,ec),SCt(1,kt)],d4e);a3=vt("ISuggestMemories");ui(a3,d4e,1)});var p_i,m_i,f4e,tU,ECt=D(()=>{Wt();p_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},m_i=function(i,e){return function(t,n){e(t,n,i)}},tU=class{static{f4e=this}static{this.AtEnd=new Pe("atEndOfWord",!1)}constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=f4e.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(124)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(124)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),r=this._editor.getSelection(),o=n.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};tU=f4e=p_i([m_i(1,Ze)],tU)});var g_i,b_i,iU,HN,DCt=D(()=>{Wt();g_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},b_i=function(i,e){return function(t,n){e(t,n,i)}},HN=class{static{iU=this}static{this.OtherSuggestions=new Pe("hasOtherSuggestions",!1)}constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=iU.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(iU._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let r=n;for(let o=t.items.length;o>0&&(r=(r+t.items.length+(e?1:-1))%t.items.length,!(r===n||!t.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=iU._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};HN=iU=g_i([b_i(1,Ze)],HN)});var hde,TCt=D(()=>{Qt();ae();kI();hde=class{constructor(e,t,n,r){this._disposables=new te,this._disposables.add(n.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(o=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!Jo(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new lx;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var l3,p4e=D(()=>{Sp();Nt();We();l3=class i{async provideSelectionRanges(e,t){let n=[];for(let r of t){let o=[];n.push(o);let s=new Map;await new Promise(a=>i._bracketsRightYield(a,0,e,r,s)),await new Promise(a=>i._bracketsLeftYield(a,0,e,r,s,o))}return n}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(e,t,n,r,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!r){e();break}let l=n.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,r,o));break}if(l.bracketInfo.isOpeningBracket){let u=l.bracketInfo.bracketText,d=s.has(u)?s.get(u):0;s.set(u,d+1)}else{let u=l.bracketInfo.getOpeningBrackets()[0].bracketText,d=s.has(u)?s.get(u):0;if(d-=1,s.set(u,Math.max(0,d)),d<0){let h=o.get(u);h||(h=new Ro,o.set(u,h)),h.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,r,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!r){e();break}let c=n.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,r,o,s));break}if(c.bracketInfo.isOpeningBracket){let d=c.bracketInfo.bracketText,h=a.has(d)?a.get(d):0;if(h-=1,a.set(d,Math.max(0,h)),h<0){let f=o.get(d);if(f){let p=f.shift();f.size===0&&o.delete(d);let g=N.fromPositions(c.range.getEndPosition(),p.getStartPosition()),v=N.fromPositions(c.range.getStartPosition(),p.getEndPosition());s.push({range:g}),s.push({range:v}),i._addBracketLeading(n,v,s)}}}else{let d=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(d)?a.get(d):0;a.set(d,h+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let r=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==t.startColumn&&(n.push({range:N.fromPositions(new K(r,o),t.getEndPosition())}),n.push({range:N.fromPositions(new K(r,1),t.getEndPosition())}));let s=r-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:N.fromPositions(new K(s,a),t.getEndPosition())}),n.push({range:N.fromPositions(new K(s,1),t.getEndPosition())}))}}}});var c3,m4e=D(()=>{Qt();We();p4e();c3=class i{static{this.None=new class extends i{distance(){return 0}}}static async create(e,t){if(!t.getOption(119).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),r=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[o]=await new l3().provideSelectionRanges(n,[r]);if(o.length===0)return i.None;let s=await e.computeWordRanges(n.uri,o[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(r);return delete s[a.word],new class extends i{distance(l,c){if(!r.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let u=typeof c.label=="string"?c.label:c.label.label,d=s[u];if(t$(d))return 2<<20;let h=ix(d,N.fromPositions(l),N.compareRangesUsingStarts),f=h>=0?d[h]:d[Math.max(0,~h-1)],p=o.length;for(let g of o){if(!N.containsRange(g.range,f))break;p-=1}return p}}}}});var nU,u3,g4e=D(()=>{Qt();yg();Pt();nU=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},u3=class i{constructor(e,t,n,r,o,s,a=WI.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,r="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?Cy:Sdt;for(let c=0;c=f)u.score=Jh.Default;else if(typeof u.completion.filterText=="string"){let g=l(r,o,p,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;Q9(u.completion.filterText,u.textLabel)===0?u.score=g:(u.score=xdt(r,o,p,u.textLabel,u.labelLow,0),u.score[0]=g[0])}else{let g=l(r,o,p,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;u.score=g}}u.idx=c,u.distance=this._wordDistance.distance(u.position,u.completion),a.push(u),e.push(u.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?ZZ(e.length-.85,e,(c,u)=>c-u):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}}});function A_i(i,e,t){if(!e.getContextKeyValue(Sd.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(Sd.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(62).suppressSuggestions}function y_i(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(Sd.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(62).suppressSuggestions}var v_i,cD,b4e,hC,d3,v4e=D(()=>{Jt();sn();Lt();et();ae();Pt();Hn();xv();m4e();Bx();nr();Wt();th();eh();g4e();VN();Ui();yg();gn();Xue();ZW();Ree();v_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},cD=function(i,e){return function(t,n){e(t,n,i)}},hC=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let r=t.getWordAtPosition(n);return!(!r||r.endColumn!==n.column&&r.startColumn+1!==n.column||!isNaN(Number(r.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}};d3=b4e=class{constructor(e,t,n,r,o,s,a,l,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new te,this._triggerCharacterListener=new te,this._triggerQuickSuggest=new oa,this._triggerState=void 0,this._completionDisposables=new te,this._onDidCancel=new G,this._onDidTrigger=new G,this._onDidSuggest=new G,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new qe(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let u=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{u=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{u=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{u||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!u&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Vi(this._triggerCharacterListener),Vi([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let r of n.triggerCharacters||[]){let o=e.get(r);if(!o){o=new Set;let s=gCt();s&&o.add(s),e.set(r,o)}o.add(n)}let t=n=>{if(!y_i(this._editor,this._contextKeyService,this._configurationService)||hC.shouldAutoTrigger(this._editor))return;if(!n){let s=this._editor.getPosition();n=this._editor.getModel().getLineContent(s.lineNumber).substr(0,s.column-1)}let r="";XA(n.charCodeAt(n.length-1))?xo(n.charCodeAt(n.length-2))&&(r=n.substr(n.length-2)):r=n.charAt(n.length-1);let o=e.get(r);if(o){let s=new Map;if(this._completionModel)for(let[a,l]of this._completionModel.getItemsByProvider())o.has(a)||s.set(a,l);this.trigger({auto:!0,triggerKind:1,triggerCharacter:r,retrigger:!!this._completionModel,clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:o,providerItemsToReuse:s}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){C1.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&bu.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!hC.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let e=this._editor.getModel(),t=this._editor.getPosition(),n=this._editor.getOption(90);if(!C1.isAllOff(n)){if(!C1.isAllOn(n)){e.tokenization.tokenizeIfCheap(t.lineNumber);let r=e.tokenization.getLineTokens(t.lineNumber),o=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(C1.valueFor(n,o)!=="on")return}A_i(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}},this._editor.getOption(91)))}_refilterCompletionItems(){yi(this._editor.hasModel()),yi(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new hC(e,t,{...this._triggerState,refilter:!0});this._onNewContext(n)}trigger(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=new hC(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=n;let r={triggerKind:e.triggerKind??0};e.triggerCharacter&&(r={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Bi;let o=this._editor.getOption(113),s=1;switch(o){case"top":s=0;break;case"bottom":s=2;break}let{itemKind:a,showDeprecated:l}=b4e.createSuggestFilter(this._editor),c=new zN(s,e.completionOptions?.kindFilter??a,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,l),u=c3.create(this._editorWorkerService,this._editor),d=UW(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),c,r,this._requestToken.token);Promise.all([d,u]).then(async([h,f])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let p=e?.clipboardText;if(!p&&h.needsClipboard&&(p=await this._clipboardService.readText()),this._triggerState===void 0)return;let g=this._editor.getModel(),v=new hC(g,this._editor.getPosition(),e),A={...WI.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new u3(h.items,this._context.column,{leadingLineContent:v.leadingLineContent,characterCountDelta:v.column-this._context.column},f,this._editor.getOption(119),this._editor.getOption(113),A,p),this._completionDisposables.add(h.disposable),this._onNewContext(v),this._reportDurationsTelemetry(h.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(let w of h.items)w.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${w.provider._debugDisplayName}`,w.completion)}).catch(pt)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){let t=new Set;e.getOption(113)==="none"&&t.add(27);let r=e.getOption(119);return r.showMethods||t.add(0),r.showFunctions||t.add(1),r.showConstructors||t.add(2),r.showFields||t.add(3),r.showVariables||t.add(4),r.showClasses||t.add(5),r.showStructs||t.add(6),r.showInterfaces||t.add(7),r.showModules||t.add(8),r.showProperties||t.add(9),r.showEvents||t.add(10),r.showOperators||t.add(11),r.showUnits||t.add(12),r.showValues||t.add(13),r.showConstants||t.add(14),r.showEnums||t.add(15),r.showEnumMembers||t.add(16),r.showKeywords||t.add(17),r.showWords||t.add(18),r.showColors||t.add(19),r.showFiles||t.add(20),r.showReferences||t.add(21),r.showColors||t.add(22),r.showFolders||t.add(23),r.showTypeParameters||t.add(24),r.showSnippets||t.add(27),r.showUsers||t.add(25),r.showIssues||t.add(26),{itemKind:t,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(wn(e.leadingLineContent)!==wn(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(hC.shouldAutoTrigger(this._editor)&&this._context){let n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,n=new Set;for(let[r,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?n.add(r):t.set(r,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let r=hC.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(r&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};d3=b4e=v_i([cD(1,pa),cD(2,uh),cD(3,io),cD(4,no),cD(5,Ze),cD(6,kt),cD(7,Le),cD(8,ZF)],d3)});var fde,kCt=D(()=>{ae();fde=class i{static{this._maxSelectionLength=51200}constructor(e,t){this._disposables=new te,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let n=e.getSelections(),r=n.length,o=!1;for(let a=0;ai._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e{});var w_i,A4e,pde,LCt=D(()=>{Ye();Dg();ae();Ex();fr();Wt();ht();w_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},A4e=function(i,e){return function(t,n){e(t,n,i)}},pde=class{constructor(e,t,n,r,o){this._menuId=t,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new te,this.element=be(e,we(".suggest-status-bar"));let s=(a=>a instanceof Ql?n.createInstance(vie,a,{useComma:!0}):void 0);this._leftActions=new Ns(this.element,{actionViewItemProvider:s}),this._rightActions=new Ns(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){let e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{let n=[],r=[];for(let[o,s]of e.getActions())o==="left"?n.push(...s):r.push(...s);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};pde=w_i([A4e(2,Ne),A4e(3,el),A4e(4,Ze)],pde)});function rU(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var x_i,C_i,mde,gde,y4e=D(()=>{Ye();Ag();er();Dr();et();Ad();ae();vx();Pce();Oe();ht();x_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},C_i=function(i,e){return function(t,n){e(t,n,i)}};mde=class{constructor(e,t){this._editor=e,this._onDidClose=new G,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new G,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new te,this._renderDisposeable=new te,this._borderWidth=1,this._size=new hn(330,0),this.domNode=we(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Zh,{editor:e}),this._body=we(".body"),this._scrollbar=new Ub(this._body,{alwaysConsumeMouseWheel:!0}),be(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=be(this._body,we(".header")),this._close=be(this._header,we("span"+ut.asCSSSelector(Ee.close))),this._close.title=y("details.close","Close"),this._type=be(this._header,we("p.type")),this._docs=be(this._body,we("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(50),n=t.getMassagedFontFamily(),r=e.get(120)||t.fontSize,o=e.get(121)||t.lineHeight,s=t.fontWeight,a=`${r}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=y("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:n,documentation:r}=e.completion;if(t){let o="";o+=`score: ${e.score[0]} -`,o+=`prefix: ${e.word??"(no prefix)"} -`,o+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} -`,o+=`distance: ${e.distance} (localityBonus-setting) -`,o+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} -`,o+=`commit_chars: ${e.completion.commitCharacters?.join("")} -`,r=new es().appendCodeblock("empty",o),n=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!rU(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),n){let o=n.length>1e5?`${n.substr(0,1e5)}\u2026`:n;this._type.textContent=o,this._type.title=o,Ul(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(o))}else _o(this._type),this._type.title="",Al(this._type),this.domNode.classList.add("no-type");if(_o(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),_o(this._docs);let o=this._markdownRenderer.render(r);this._docs.appendChild(o.element),this._renderDisposeable.add(o),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=o=>{o.preventDefault(),o.stopPropagation()},this._close.onclick=o=>{o.preventDefault(),o.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){let n=new hn(e,t);hn.equals(n,this._size)||(this._size=n,sst(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};mde=x_i([C_i(1,Ne)],mde);gde=class{constructor(e,t){this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new te,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new tD,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,r,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&r){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=r.width-a.dimension.width,l=!0),a.north&&(o=r.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+o,left:n.left+s})}a.done&&(n=void 0,r=void 0,o=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){let n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,n){let r=zh(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),s=new hn(220,2*o.lineHeight),a=e.top,l=(function(){let E=r.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),I=-o.borderWidth+e.left+e.width,T=new hn(E,r.height-e.top-o.borderHeight-o.verticalPadding),L=T.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:I,fit:E-t.width,maxSizeTop:T,maxSizeBottom:L,minSize:s.with(Math.min(E,s.width))}})(),c=(function(){let E=e.left-o.borderWidth-o.horizontalPadding,I=Math.max(o.horizontalPadding,e.left-t.width-o.borderWidth),T=new hn(E,r.height-e.top-o.borderHeight-o.verticalPadding),L=T.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:I,fit:E-t.width,maxSizeTop:T,maxSizeBottom:L,minSize:s.with(Math.min(E,s.width))}})(),u=(function(){let E=e.left,I=-o.borderWidth+e.top+e.height,T=new hn(e.width-o.borderHeight,r.height-e.top-e.height-o.verticalPadding);return{top:I,left:E,fit:T.height-t.height,maxSizeBottom:T,maxSizeTop:T,minSize:s.with(T.width)}})(),d=[l,c,u],h=d.find(E=>E.fit>=0)??d.sort((E,I)=>I.fit-E.fit)[0],f=e.top+e.height-o.borderHeight,p,g=t.height,v=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);g>v&&(g=v);let A;n?g<=h.maxSizeTop.height?(p=!0,A=h.maxSizeTop):(p=!1,A=h.maxSizeBottom):g<=h.maxSizeBottom.height?(p=!1,A=h.maxSizeBottom):(p=!0,A=h.maxSizeTop);let{top:w,left:C}=h;!p&&g>e.height&&(w=f-g);let _=this._editor.getDomNode();if(_){let E=_.getBoundingClientRect();w-=E.top,C-=E.left}this._applyTopLeft({left:C,top:w}),this._resizable.enableSashes(!p,h===l,p,h!==l),this._resizable.minSize=h.minSize,this._resizable.maxSize=A,this._resizable.layout(g,Math.min(A.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}});var o0,w4e=D(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(o0||(o0={}))});function oU(i,e,t,n,r){if(ut.isThemeIcon(r))return[`codicon-${r.id}`,"predefined-file-icon"];if(Xe.isUri(r))return[];let o=n===o0.ROOT_FOLDER?["rootfolder-icon"]:n===o0.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===jt.data)s=_y.parseMetaData(t).get(_y.META_DATA_LABEL);else{let a=t.path.match(__i);a?(s=bde(a[2].toLowerCase()),a[1]&&o.push(`${bde(a[1].toLowerCase())}-name-dir-icon`)):s=bde(t.authority.toLowerCase())}if(n===o0.ROOT_FOLDER)o.push(`${s}-root-name-folder-icon`);else if(n===o0.FOLDER)o.push(`${s}-name-folder-icon`);else{if(s){if(o.push(`${s}-name-file-icon`),o.push("name-file-icon"),s.length<=255){let l=s.split(".");for(let c=1;c{bl();Ec();mn();Yf();w4e();Dr();__i=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function _4e(i){return`suggest-aria-id:${i}`}function C4e(i){return i.replace(/\r\n|\r|\n/g,"")}var E_i,x4e,D_i,T_i,vde,MCt=D(()=>{Ye();kre();er();Dr();et();yg();ae();mn();tr();NCt();Zc();Sl();Oe();w4e();sp();Zn();y4e();E_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},x4e=function(i,e){return function(t,n){e(t,n,i)}};D_i=kn("suggest-more-info",Ee.chevronRight,y("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),T_i=new class sU{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${sU._regexRelaxed.source}$`,"i")}extract(e,t){if(e.textLabel.match(sU._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(sU._regexStrict))return t[0]=e.completion.detail,!0;if(e.completion.documentation){let n=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,r=sU._regexRelaxed.exec(n);if(r&&(r.index===0||r.index+r[0].length===n.length))return t[0]=r[0],!0}return!1}},vde=class{constructor(e,t,n,r){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=r,this._onDidToggleDetails=new G,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new te,n=e;n.classList.add("show-file-icons");let r=be(e,we(".icon")),o=be(r,we("span.colorspan")),s=be(e,we(".contents")),a=be(s,we(".main")),l=be(a,we(".icon-label.codicon")),c=be(a,we("span.left")),u=be(a,we("span.right")),d=new Ox(c,{supportHighlights:!0,supportIcons:!0});t.add(d);let h=be(c,we("span.signature-label")),f=be(c,we("span.qualifier-label")),p=be(u,we("span.details-label")),g=be(u,we("span.readMore"+ut.asCSSSelector(D_i)));return g.title=y("readMore","Read More"),{root:n,left:c,right:u,icon:r,colorspan:o,iconLabel:d,iconContainer:l,parametersLabel:h,qualifierLabel:f,detailsLabel:p,readMore:g,disposables:t,configureFont:()=>{let A=this._editor.getOptions(),w=A.get(50),C=w.getMassagedFontFamily(),_=w.fontFeatureSettings,E=A.get(120)||w.fontSize,I=A.get(121)||w.lineHeight,T=w.fontWeight,L=w.letterSpacing,M=`${E}px`,z=`${I}px`,H=`${L}px`;n.style.fontSize=M,n.style.fontWeight=T,n.style.letterSpacing=H,a.style.fontFamily=C,a.style.fontFeatureSettings=_,a.style.lineHeight=z,r.style.height=z,r.style.width=z,g.style.height=z,g.style.width=z}}}renderElement(e,t,n){n.configureFont();let{completion:r}=e;n.root.id=_4e(t),n.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:oE(e.score)},s=[];if(r.kind===19&&T_i.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(r.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";let a=oU(this._modelService,this._languageService,Xe.from({scheme:"fake",path:e.textLabel}),o0.FILE),l=oU(this._modelService,this._languageService,Xe.from({scheme:"fake",path:r.detail}),o0.FILE);o.extraClasses=a.length>l.length?a:l}else r.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",o.extraClasses=[oU(this._modelService,this._languageService,Xe.from({scheme:"fake",path:e.textLabel}),o0.FOLDER),oU(this._modelService,this._languageService,Xe.from({scheme:"fake",path:r.detail}),o0.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...ut.asClassNameArray(YT.toIcon(r.kind))));r.tags&&r.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,o),typeof r.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=C4e(r.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=C4e(r.label.detail||""),n.detailsLabel.textContent=C4e(r.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?Ul(n.detailsLabel):Al(n.detailsLabel),rU(e)?(n.right.classList.add("can-expand-details"),Ul(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Al(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};vde=E_i([x4e(1,an),x4e(2,rn),x4e(3,Bn)],vde)});var k_i,Ade,h3,I_i,L_i,S4e,yde,E4e,RCt=D(()=>{Ye();JH();_x();Jt();Lt();et();ae();PI();Pt();ICt();oC();LCt();lce();Oe();Wt();ht();yv();eo();Pb();Zn();Pce();VN();y4e();MCt();By();Yl();k_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ade=function(i,e){return function(t,n){e(t,n,i)}};j("editorSuggestWidget.background",Kc,y("editorSuggestWidgetBackground","Background color of the suggest widget."));j("editorSuggestWidget.border",n7,y("editorSuggestWidgetBorder","Border color of the suggest widget."));I_i=j("editorSuggestWidget.foreground",Wp,y("editorSuggestWidgetForeground","Foreground color of the suggest widget."));j("editorSuggestWidget.selectedForeground",Xw,y("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));j("editorSuggestWidget.selectedIconForeground",hF,y("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));L_i=j("editorSuggestWidget.selectedBackground",Zw,y("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));j("editorSuggestWidget.highlightForeground",CS,y("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));j("editorSuggestWidget.focusHighlightForeground",Yat,y("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));j("editorSuggestWidgetStatus.foreground",hi(I_i,.5),y("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));S4e=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof pu}`}restore(){let e=this._service.get(this._key,0)??"";try{let t=JSON.parse(e);if(hn.is(t))return hn.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},yde=class{static{h3=this}static{this.LOADING_MESSAGE=y("suggestWidget.loading","Loading...")}static{this.NO_SUGGESTIONS_MESSAGE=y("suggestWidget.noSuggestions","No suggestions.")}constructor(e,t,n,r,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new On,this._pendingShowDetails=new On,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new oa,this._disposables=new te,this._onDidSelect=new Fm,this._onDidFocus=new Fm,this._onDidHide=new G,this._onDidShow=new G,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new G,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new tD,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new E4e(this,e),this._persistedSize=new S4e(t,e);class s{constructor(f,p,g=!1,v=!1){this.persistedSize=f,this.currentSize=p,this.persistHeight=g,this.persistWidth=v}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){let{itemHeight:f,defaultSize:p}=this.getLayoutInfo(),g=Math.round(f/2),{width:v,height:A}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-A)<=g)&&(A=a.persistedSize?.height??p.height),(!a.persistWidth||Math.abs(a.currentSize.width-v)<=g)&&(v=a.persistedSize?.width??p.width),this._persistedSize.store(new hn(v,A))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=be(this.element.domNode,we(".message")),this._listElement=be(this.element.domNode,we(".tree"));let l=this._disposables.add(o.createInstance(mde,this.editor));l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new gde(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();let u=o.createInstance(vde,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails(()=>this.toggleDetails())),this._list=new il("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>y("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let f=h.textLabel;if(typeof h.completion.label!="string"){let{detail:A,description:w}=h.completion.label;A&&w?f=y("label.full","{0} {1}, {2}",f,A,w):A?f=y("label.detail","{0} {1}",f,A):w&&(f=y("label.desc","{0}, {1}",f,w))}if(!h.isResolved||!this._isDetailsVisible())return f;let{documentation:p,detail:g}=h.completion,v=ig("{0}{1}",g||"",p?typeof p=="string"?p:p.value:"");return y("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",f,v)}}}),this._list.style(wv({listInactiveFocusBackground:L_i,listInactiveFocusOutline:Jn})),this._status=o.createInstance(pde,this.element.domNode,_1);let d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);d(),this._disposables.add(r.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(119)&&(d(),c()),this._completionModel&&(h.hasChanged(50)||h.hasChanged(120)||h.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=ki.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=ki.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=ki.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=ki.HasFocusedSuggestion.bindTo(n),this._disposables.add(cn(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){let n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=Bu(e.type)?2:1}_onListFocus(e){if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);let t=e.elements[0],n=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(n),this._currentSuggestionDetails=hr(async r=>{let o=Bp(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),s=r.onCancellationRequested(()=>o.dispose());try{return await t.resolve(r)}finally{o.dispose(),s.dispose()}}),this._currentSuggestionDetails.then(()=>{n>=this._list.length||t!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[t]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:_4e(n)}))}).catch(pt)),this._onDidFocus.fire({item:t,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Al(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=h3.LOADING_MESSAGE,Al(this._listElement,this._status.element),Ul(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,yd(h3.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=h3.NO_SUGGESTIONS_MESSAGE,Al(this._listElement,this._status.element),Ul(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,yd(h3.NO_SUGGESTIONS_MESSAGE);break;case 3:Al(this._messageElement),Ul(this._listElement,this._status.element),this._show();break;case 4:Al(this._messageElement),Ul(this._listElement,this._status.element),this._show();break;case 5:Al(this._messageElement),Ul(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Bp(()=>this._setState(1),t)))}showSuggestions(e,t,n,r,o){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}let s=this._completionModel.items.length,a=s===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),a){this._setState(r?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=eF(rt(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(rU(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=eF(rt(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();let e=this._persistedSize.restore(),t=Math.ceil(this.getLayoutInfo().itemHeight*4.3);e&&e.heights&&(o=s);let a=this._completionModel?this._completionModel.stats.pLabelLen*n.typicalHalfwidthCharacterWidth:o,l=n.statusBarHeight+this._list.contentHeight+n.borderHeight,c=n.itemHeight+n.statusBarHeight,u=bn(this.editor.getDomNode()),d=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),h=u.top+d.top+d.height,f=Math.min(t.height-h-n.verticalPadding,l),p=u.top+d.top-n.verticalPadding,g=Math.min(p,l),v=Math.min(Math.max(g,f)+n.borderHeight,l);r===this._cappedHeight?.capped&&(r=this._cappedHeight.wanted),rv&&(r=v),r>f||this._forceRenderingAbove&&p>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=g):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=f),this.element.preferredSize=new hn(a,n.defaultSize.height),this.element.maxSize=new hn(s,v),this.element.minSize=new hn(220,c),this._cappedHeight=r===l?{wanted:this._cappedHeight?.wanted??e.height,capped:r}:void 0}this._resize(o,r)}_resize(e,t){let{width:n,height:r}=this.element.maxSize;e=Math.min(n,e),t=Math.min(r,t);let{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=`${t-o}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,this._contentWidget.getPosition()?.preference[0]===2)}getLayoutInfo(){let e=this.editor.getOption(50),t=El(this.editor.getOption(121)||e.lineHeight,8,1e3),n=!this.editor.getOption(119).showStatusBar||this._state===2||this._state===1?0:t,r=this._details.widget.borderWidth,o=2*r;return{itemHeight:t,statusBarHeight:n,borderWidth:r,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new hn(430,n+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};yde=h3=k_i([Ade(1,ec),Ade(2,Ze),Ade(3,Bn),Ade(4,Ne)],yde);E4e=class{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){let{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:r}=this._widget.getLayoutInfo();return new hn(t+2*n+r,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}});var N_i,f3,D4e,M_i,T4e,hm,k4e,wde,fm,mh,xde=D(()=>{Yl();Qt();sn();Lt();et();Wk();ae();Si();id();gn();$L();ii();$p();Nt();We();vn();ZW();qE();h4e();ECt();Oe();Xn();Wt();ht();th();VN();DCt();TCt();v4e();kCt();RCt();eh();Ec();gS();Ye();vs();N_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},f3=function(i,e){return function(t,n){e(t,n,i)}},M_i=!1,T4e=class{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=zt.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){let r=e.getOffsetAt(t),o=e.getPositionAt(r+1);e.changeDecorations(s=>{this._marker&&s.removeDecoration(this._marker),this._marker=s.addDecoration(N.fromPositions(t,o),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){let t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}},hm=class{static{D4e=this}static{this.ID="editor.contrib.suggestController"}static get(e){return e.getContribution(D4e.ID)}constructor(e,t,n,r,o,s,a){this._memoryService=t,this._commandService=n,this._contextKeyService=r,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new On,this._toDispose=new te,this._selectors=new k4e(d=>d.priority),this._onWillInsertSuggestItem=new G,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(d3,this.editor),this._selectors.register({priority:0,select:(d,h,f)=>this._memoryService.select(d,h,f)});let l=ki.InsertMode.bindTo(r);l.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(119).insertMode))),this.widget=this._toDispose.add(new $R(rt(e.getDomNode()),()=>{let d=this._instantiationService.createInstance(yde,this.editor);this._toDispose.add(d),this._toDispose.add(d.onDidSelect(v=>this._insertSuggestion(v,0),this));let h=new hde(this.editor,d,this.model,v=>this._insertSuggestion(v,2));this._toDispose.add(h);let f=ki.MakesTextEdit.bindTo(this._contextKeyService),p=ki.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=ki.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Ve(()=>{f.reset(),p.reset(),g.reset()})),this._toDispose.add(d.onDidFocus(({item:v})=>{let A=this.editor.getPosition(),w=v.editStart.column,C=A.column,_=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!v.completion.additionalTextEdits&&!(v.completion.insertTextRules&4)&&C-w===v.completion.insertText.length&&(_=this.editor.getModel().getValueInRange({startLineNumber:A.lineNumber,startColumn:w,endLineNumber:A.lineNumber,endColumn:C})!==v.completion.insertText),f.set(_),p.set(!K.equals(v.editInsertEnd,v.editReplaceEnd)),g.set(!!v.provider.resolveCompletionItem||!!v.completion.documentation||v.completion.detail!==v.completion.label)})),this._toDispose.add(d.onDetailsKeyDown(v=>{if(v.toKeyCodeChord().equals(new $m(!0,!1,!1,!1,33))||qt&&v.toKeyCodeChord().equals(new $m(!1,!1,!1,!0,33))){v.stopPropagation();return}v.toKeyCodeChord().isModifierKey()||this.editor.focus()})),d})),this._overtypingCapturer=this._toDispose.add(new $R(rt(e.getDomNode()),()=>this._toDispose.add(new fde(this.editor,this.model)))),this._alternatives=this._toDispose.add(new $R(rt(e.getDomNode()),()=>this._toDispose.add(new HN(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(tU,e)),this._toDispose.add(this.model.onDidTrigger(d=>{this.widget.value.showTriggered(d.auto,d.shy?250:50),this._lineSuffix.value=new T4e(this.editor.getModel(),d.position)})),this._toDispose.add(this.model.onDidSuggest(d=>{if(d.triggerOptions.shy)return;let h=-1;for(let p of this._selectors.itemsOrderedByPriorityDesc)if(h=p.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items),h!==-1)break;if(h===-1&&(h=0),this.model.state===0)return;let f=!1;if(d.triggerOptions.auto){let p=this.editor.getOption(119);p.selectionMode==="never"||p.selectionMode==="always"?f=p.selectionMode==="never":p.selectionMode==="whenTriggerCharacter"?f=d.triggerOptions.triggerKind!==1:p.selectionMode==="whenQuickSuggestion"&&(f=d.triggerOptions.triggerKind===1&&!d.triggerOptions.refilter)}this.widget.value.showSuggestions(d.completionModel,h,d.isFrozen,d.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(d=>{d.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{M_i||(this.model.cancel(),this.model.clear())}));let c=ki.AcceptSuggestionsOnEnter.bindTo(r),u=()=>{let d=this.editor.getOption(1);c.set(d==="on"||d==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>u())),u()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;let n=bu.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});let r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new Bi;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));this._memoryService.memorize(r,this.editor.getPosition(),s);let u=s.isResolved,d=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let p=lf.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(g=>{let v=N.lift(g.range);if(v.startLineNumber===s.position.lineNumber&&v.startColumn>s.position.column){let A=this.editor.getPosition().column-s.position.column,w=A,C=N.spansMultipleLines(v)?0:A;v=new N(v.startLineNumber,v.startColumn+w,v.endLineNumber,v.endColumn+C)}return Dn.replaceMove(v,g.text)})),p.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){let p=new Ar,g,v=r.onDidChangeContent(_=>{if(_.isFlush){l.cancel(),v.dispose();return}for(let E of _.changes){let I=N.getEndPosition(E.range);(!g||K.isBefore(I,g))&&(g=I)}}),A=t;t|=2;let w=!1,C=this.editor.onWillType(()=>{C.dispose(),w=!0,A&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(g&&s.completion.additionalTextEdits.some(E=>K.isBefore(g,N.getStartPosition(E.range))))return!1;w&&this.editor.pushUndoStop();let _=lf.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(E=>Dn.replaceMove(N.lift(E.range),E.text))),_.restoreRelativeVerticalPositionOfCursor(this.editor),(w||!(A&2))&&this.editor.pushUndoStop(),!0}).then(_=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",p.elapsed(),_),h=_===!0?1:_===!1?0:-2}).finally(()=>{v.dispose(),C.dispose()}))}let{insertText:f}=s.completion;if(s.completion.insertTextRules&4||(f=hp.escape(f)),this.model.cancel(),n.insert(f,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===wde.id)this.model.trigger({auto:!0,retrigger:!0});else{let p=new Ar;a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(g=>{s.completion.extensionId?ln(g):pt(g)}).finally(()=>{d=p.elapsed()}))}t&4&&this._alternatives.value.set(e,p=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(p,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,r,u,d,h,e.index,e.model.items),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n,r,o,s,a){if(Math.floor(Math.random()*100)===0)return;let l=new Map;for(let h=0;h1?c[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:mS(Sc(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Ndt(t.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:r,additionalEditsAsync:o,index:s,firstIndex:d})}getOverwriteInfo(e,t){yi(this.editor.hasModel());let n=this.editor.getOption(119).insertMode==="replace";t&&(n=!n);let r=e.position.column-e.editStart.column,o=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:r+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(Jo(e.completion.additionalTextEdits)){let t=y("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);gs(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;let t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},r=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;let s=this.editor.getPosition(),a=o.editStart.column,l=s.column;return l-a!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==o.completion.insertText};Se.once(this.model.onDidTrigger)(o=>{let s=[];Se.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Vi(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Vi(s),a.items.length===0){n();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!r(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){let n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};hm=D4e=N_i([f3(1,a3),f3(2,Oi),f3(3,Ze),f3(4,Ne),f3(5,no),f3(6,io)],hm);k4e=class{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},wde=class i extends Fe{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:i.id,label:y("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:me.and(V.writable,V.hasCompletionItemProvider,ki.Visible.toNegated()),kbOpts:{kbExpr:V.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let r=hm.get(t);if(!r)return;let o;n&&typeof n=="object"&&n.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};Tt(hm.ID,hm,2);xe(wde);fm=190,mh=Sr.bindToContribution(hm.get);Qe(new mh({id:"acceptSelectedSuggestion",precondition:me.and(ki.Visible,ki.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:me.and(ki.Visible,V.textInputFocus),weight:fm},{primary:3,kbExpr:me.and(ki.Visible,V.textInputFocus,ki.AcceptSuggestionsOnEnter,ki.MakesTextEdit),weight:fm}],menuOpts:[{menuId:_1,title:y("accept.insert","Insert"),group:"left",order:1,when:ki.HasInsertAndReplaceRange.toNegated()},{menuId:_1,title:y("accept.insert","Insert"),group:"left",order:1,when:me.and(ki.HasInsertAndReplaceRange,ki.InsertMode.isEqualTo("insert"))},{menuId:_1,title:y("accept.replace","Replace"),group:"left",order:1,when:me.and(ki.HasInsertAndReplaceRange,ki.InsertMode.isEqualTo("replace"))}]}));Qe(new mh({id:"acceptAlternativeSelectedSuggestion",precondition:me.and(ki.Visible,V.textInputFocus,ki.HasFocusedSuggestion),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:_1,group:"left",order:2,when:me.and(ki.HasInsertAndReplaceRange,ki.InsertMode.isEqualTo("insert")),title:y("accept.replace","Replace")},{menuId:_1,group:"left",order:2,when:me.and(ki.HasInsertAndReplaceRange,ki.InsertMode.isEqualTo("replace")),title:y("accept.insert","Insert")}]}));ci.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");Qe(new mh({id:"hideSuggestWidget",precondition:ki.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:9,secondary:[1033]}}));Qe(new mh({id:"selectNextSuggestion",precondition:me.and(ki.Visible,me.or(ki.MultipleSuggestions,ki.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));Qe(new mh({id:"selectNextPageSuggestion",precondition:me.and(ki.Visible,me.or(ki.MultipleSuggestions,ki.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:12,secondary:[2060]}}));Qe(new mh({id:"selectLastSuggestion",precondition:me.and(ki.Visible,me.or(ki.MultipleSuggestions,ki.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));Qe(new mh({id:"selectPrevSuggestion",precondition:me.and(ki.Visible,me.or(ki.MultipleSuggestions,ki.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));Qe(new mh({id:"selectPrevPageSuggestion",precondition:me.and(ki.Visible,me.or(ki.MultipleSuggestions,ki.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:11,secondary:[2059]}}));Qe(new mh({id:"selectFirstSuggestion",precondition:me.and(ki.Visible,me.or(ki.MultipleSuggestions,ki.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));Qe(new mh({id:"focusSuggestion",precondition:me.and(ki.Visible,ki.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));Qe(new mh({id:"focusAndAcceptSuggestion",precondition:me.and(ki.Visible,ki.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));Qe(new mh({id:"toggleSuggestionDetails",precondition:me.and(ki.Visible,ki.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:_1,group:"right",order:1,when:me.and(ki.DetailsVisible,ki.CanResolve),title:y("detail.more","Show Less")},{menuId:_1,group:"right",order:1,when:me.and(ki.DetailsVisible.toNegated(),ki.CanResolve),title:y("detail.less","Show More")}]}));Qe(new mh({id:"toggleExplainMode",precondition:ki.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));Qe(new mh({id:"toggleSuggestionFocus",precondition:ki.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:2570,mac:{primary:778}}}));Qe(new mh({id:"insertBestCompletion",precondition:me.and(V.textInputFocus,me.equals("config.editor.tabCompletion","on"),tU.AtEnd,ki.Visible.toNegated(),HN.OtherSuggestions.toNegated(),bu.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(Fo(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:fm,primary:2}}));Qe(new mh({id:"insertNextSuggestion",precondition:me.and(V.textInputFocus,me.equals("config.editor.tabCompletion","on"),HN.OtherSuggestions,ki.Visible.toNegated(),bu.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:2}}));Qe(new mh({id:"insertPrevSuggestion",precondition:me.and(V.textInputFocus,me.equals("config.editor.tabCompletion","on"),HN.OtherSuggestions,ki.Visible.toNegated(),bu.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:fm,kbExpr:V.textInputFocus,primary:1026}}));xe(class extends Fe{constructor(){super({id:"editor.action.resetSuggestSize",label:y("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){hm.get(e)?.resetWidgetSize()}})});function R_i(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var Cde,aU,FCt=D(()=>{Qt();Jf();et();ae();Nt();We();hy();tr();nde();qE();s4e();xde();Cde=class extends W{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new G),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown(o=>{o.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(o=>{o.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let r=hm.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(a,l,c)=>{let u=this.editor.getModel();if(!u)return-1;let d=this.suggestControllerPreselector(),h=d?x1(d,u):void 0;if(!h)return-1;let f=K.lift(l),p=c.map((v,A)=>{let w=aU.fromSuggestion(r,u,f,v,this.isShiftKeyPressed),C=x1(w.toSingleTextEdit(),u),_=ide(h,C);return{index:A,valid:_,prefixLength:C.text.length,suggestItem:v}}).filter(v=>v&&v.valid&&v.prefixLength>0),g=Q7(p,aa(v=>v.prefixLength,ud));return g?g.index:-1}}));let o=!1,s=()=>{o||(o=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Se.once(r.model.onDidTrigger)(a=>{s()})),this._register(r.onWillInsertSuggestItem(a=>{let l=this.editor.getPosition(),c=this.editor.getModel();if(!l||!c)return;let u=aU.fromSuggestion(r,c,l,a.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!R_i(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){let e=hm.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),r=this.editor.getModel();if(!(!t||!n||!r))return aU.fromSuggestion(e,r,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){hm.get(this.editor)?.stopForceRenderingAbove()}forceRenderingAbove(){hm.get(this.editor)?.forceRenderingAbove()}},aU=class i{static fromSuggestion(e,t,n,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){let c=new hp().parse(s);c.children.length<100&&o3.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(r,o);return new i(N.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),s,r.completion.kind,a)}constructor(e,t,n,r){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new zM(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Wu(this.range,this.insertText)}}});function O_i(i,e){let t=Gt("result",[]),n=[];return e.add(_t(r=>{let o=i.read(r);fn(s=>{if(o.length!==n.length){n.length=o.length;for(let a=0;aa.set(o[l],s))})})),t}var F_i,fC,I4e,hf,_de=D(()=>{iCt();Yl();Jt();sn();ae();Tn();$h();Hz();gn();uH();$x();Nt();Kp();Ui();Mce();lCt();Xue();Oce();_Ct();FCt();Oe();oh();kE();Xn();nr();Wt();ht();Yr();F_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fC=function(i,e){return function(t,n){e(t,n,i)}},hf=class extends W{static{I4e=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(e){return e.getContribution(I4e.ID)}constructor(e,t,n,r,o,s,a,l,c,u){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=n,this._configurationService=r,this._commandService=o,this._debounceService=s,this._languageFeaturesService=a,this._accessibilitySignalService=l,this._keybindingService=c,this._accessibilityService=u,this._editorObs=Il(this.editor),this._positions=st(this,h=>this._editorObs.selections.read(h)?.map(f=>f.getEndPosition())??[new K(1,1)]),this._suggestWidgetAdaptor=this._register(new Cde(this.editor,()=>(this._editorObs.forceUpdate(),this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0)),h=>this._editorObs.forceUpdate(f=>{this.model.get()?.handleSuggestAccepted(h)}))),this._suggestWidgetSelectedItem=zi(this,h=>this._suggestWidgetAdaptor.onDidSelectedItemChange(()=>{this._editorObs.forceUpdate(f=>h(void 0))}),()=>this._suggestWidgetAdaptor.selectedItem),this._enabledInConfig=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._isScreenReaderEnabled=zi(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=zi(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=st(this,h=>this._enabledInConfig.read(h)&&(!this._isScreenReaderEnabled.read(h)||!this._editorDictationInProgress.read(h))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=fa(this,h=>{if(this._editorObs.isReadonly.read(h))return;let f=this._editorObs.model.read(h);return f?this._instantiationService.createInstance(ude,f,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,zi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).preview),zi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).previewMode),zi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).mode),this._enabled):void 0}).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=st(this,h=>this.model.read(h)?.ghostTexts.read(h)??[]),this._stablizedGhostTexts=O_i(this._ghostTexts,this._store),this._ghostTextWidgets=Uht(this,this._stablizedGhostTexts,(h,f)=>f.add(this._instantiationService.createInstance($ue,this.editor,{ghostText:h,minReservedLineCount:Xl(0),targetTextModel:this.model.map(p=>p?.textModel)}))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=Cg(this),this._fontFamily=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).fontFamily),this._register(new Sd(this._contextKeyService,this.model)),this._register(tle(this._editorObs.onDidType,(h,f)=>{this._enabled.get()&&this.model.get()?.trigger()})),this._register(this._commandService.onDidExecuteCommand(h=>{new Set([PE.Tab.id,PE.DeleteLeft.id,PE.DeleteRight.id,Ice,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate(p=>{this.model.get()?.trigger(p)})})),this._register(tle(this._editorObs.selections,(h,f)=>{f.some(p=>p.reason===3||p.source==="api")&&this.model.get()?.stop()})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||nC.dropDownVisible||fn(h=>{this.model.get()?.stop(h)})})),this._register(_t(h=>{let f=this.model.read(h)?.state.read(h);f?.suggestItem?f.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(Ve(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));let d=Fy(this,(h,f)=>{let g=this.model.read(h)?.state.read(h);return this._suggestWidgetSelectedItem.get()?f:g?.inlineCompletion?.semanticId});this._register(bvt(st(h=>(this._playAccessibilitySignal.read(h),d.read(h),{})),async(h,f,p)=>{let g=this.model.get(),v=g?.state.get();if(!v||!g)return;let A=g.textModel.getLineContent(v.primaryGhostText.lineNumber);await Jd(50,O5(p)),await Uz(this._suggestWidgetSelectedItem,Ga,()=>!1,O5(p)),await this._accessibilitySignalService.playSignal(Qu.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(v.primaryGhostText.renderForScreenReader(A))})),this._register(new Fce(this.editor,this.model,this._instantiationService)),this._register(tCt(st(h=>{let f=this._fontFamily.read(h);return f===""||f==="default"?"":` + `,constraint:nwt,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,o){let r=this.getLineNumbers(o,n),s=o&&o.levels,a=o&&o.direction;typeof s!="number"&&typeof a!="string"?Y1t(t,!0,r):a==="up"?L3e(t,!0,s||1,r):g2(t,!0,s||1,r)}},U3e=class extends Fc{constructor(){super({id:"editor.toggleFold",label:y("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2090),weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);uj(t,1,o)}},j3e=class extends Fc{constructor(){super({id:"editor.foldRecursively",label:y("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2140),weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);g2(t,!0,Number.MAX_VALUE,o)}},Q3e=class extends Fc{constructor(){super({id:"editor.toggleFoldRecursively",label:y("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,3114),weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);uj(t,Number.MAX_VALUE,o)}},G3e=class extends Fc{constructor(){super({id:"editor.foldAllBlockComments",label:y("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2138),weight:100}})}invoke(e,t,n,o,r){if(t.regions.hasTypes())dhe(t,Vv.Comment.value,!0);else{let s=n.getModel();if(!s)return;let a=r.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+$a(a.blockCommentStartToken));uhe(t,l,!0)}}}},q3e=class extends Fc{constructor(){super({id:"editor.foldAllMarkerRegions",label:y("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2077),weight:100}})}invoke(e,t,n,o,r){if(t.regions.hasTypes())dhe(t,Vv.Region.value,!0);else{let s=n.getModel();if(!s)return;let a=r.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);uhe(t,l,!0)}}}},Y3e=class extends Fc{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:y("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2078),weight:100}})}invoke(e,t,n,o,r){if(t.regions.hasTypes())dhe(t,Vv.Region.value,!1);else{let s=n.getModel();if(!s)return;let a=r.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);uhe(t,l,!1)}}}},K3e=class extends Fc{constructor(){super({id:"editor.foldAllExcept",label:y("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2136),weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);N3e(t,!0,o)}},J3e=class extends Fc{constructor(){super({id:"editor.unfoldAllExcept",label:y("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2134),weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);N3e(t,!1,o)}},X3e=class extends Fc{constructor(){super({id:"editor.foldAll",label:y("foldAllAction.label","Fold All"),alias:"Fold All",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2069),weight:100}})}invoke(e,t,n){g2(t,!0)}},Z3e=class extends Fc{constructor(){super({id:"editor.unfoldAll",label:y("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2088),weight:100}})}invoke(e,t,n){g2(t,!1)}},mhe=class i extends Fc{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=e=>i.ID_PREFIX+e}getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){K1t(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}},$3e=class extends Fc{constructor(){super({id:"editor.gotoParentFold",label:y("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);if(o.length>0){let r=J1t(o[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}},e4e=class extends Fc{constructor(){super({id:"editor.gotoPreviousFold",label:y("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);if(o.length>0){let r=X1t(o[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}},t4e=class extends Fc{constructor(){super({id:"editor.gotoNextFold",label:y("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,weight:100}})}invoke(e,t,n){let o=this.getSelectedLines(n);if(o.length>0){let r=Z1t(o[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}},i4e=class extends Fc{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:y("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2135),weight:100}})}invoke(e,t,n){let o=[],r=n.getSelections();if(r){for(let s of r){let a=s.endLineNumber;s.endColumn===1&&--a,a>s.startLineNumber&&(o.push({startLineNumber:s.startLineNumber,endLineNumber:a,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:s.startLineNumber,startColumn:1,endLineNumber:s.startLineNumber,endColumn:1}))}if(o.length>0){o.sort((a,l)=>a.startLineNumber-l.startLineNumber);let s=Md.sanitizeAndMerge(t.regions,o,n.getModel()?.getLineCount());t.updatePost(Md.fromFoldRanges(s))}}}},n4e=class extends Fc{constructor(){super({id:"editor.removeManualFoldingRanges",label:y("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2137),weight:100}})}invoke(e,t,n){let o=n.getSelections();if(o){let r=[];for(let s of o){let{startLineNumber:a,endLineNumber:l}=s;r.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(r),e.triggerFoldingModelChanged()}}};St(B1.ID,B1,0);Ce(V3e);Ce(H3e);Ce(W3e);Ce(j3e);Ce(Q3e);Ce(X3e);Ce(Z3e);Ce(G3e);Ce(q3e);Ce(Y3e);Ce(K3e);Ce(J3e);Ce(U3e);Ce($3e);Ce(e4e);Ce(t4e);Ce(i4e);Ce(n4e);for(let i=1;i<=7;i++)rat(new mhe({id:mhe.ID(i),label:y("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:_u,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2048|21+i),weight:100}}));ii.registerCommand("_executeFoldingRangeProvider",async function(i,...e){let[t]=e;if(!(t instanceof Je))throw mc();let n=i.get(Me),o=i.get(an).getModel(t);if(!o)throw mc();let r=i.get(Et);if(!r.getValue("editor.folding",{resource:t}))return[];let s=i.get(Gi),a=r.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return r.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,p)=>{}},c=new b2(o,s,l),u=c;if(a!=="indentation"){let f=B1.getFoldingRangeProviders(n,o);f.length&&(u=new A2(o,f,()=>{},l,c))}let d=await u.compute(Nt.None),h=[];try{if(d)for(let f=0;f{Jt();_O();Be();o4e=class extends Pe{constructor(){super({id:"editor.action.fontZoomIn",label:y("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,t){wd.setZoomLevel(wd.getZoomLevel()+1)}},r4e=class extends Pe{constructor(){super({id:"editor.action.fontZoomOut",label:y("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,t){wd.setZoomLevel(wd.getZoomLevel()-1)}},s4e=class extends Pe{constructor(){super({id:"editor.action.fontZoomReset",label:y("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,t){wd.setZoomLevel(0)}};Ce(o4e);Ce(r4e);Ce(s4e)});var rwt,gj,bhe,Ahe,a4e,l4e,swt=D(()=>{Wt();sn();Tt();Bp();de();Jt();hs();cL();Ue();An();WA();Hi();fOe();uOe();Be();$E();to();Bt();ht();o0();rwt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},gj=function(i,e){return function(t,n){e(t,n,i)}},bhe=class{static{this.ID="editor.contrib.autoFormat"}constructor(e,t,n,o){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._accessibilitySignalService=o,this._disposables=new se,this._sessionDisposables=new se,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new Mx;for(let o of t.autoFormatTriggerCharacters)n.add(o.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(o=>{let r=o.charCodeAt(o.length-1);n.has(r)&&this._trigger(String.fromCharCode(r))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),o=new Mi,r=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){o.cancel(),r.dispose();return}for(let a=0,l=s.changes.length;a{o.token.isCancellationRequested||Kr(s)&&(this._accessibilitySignalService.playSignal(Xu.format,{userGesture:!1}),WN.execute(this._editor,s,!0))}).finally(()=>{r.dispose()})}};bhe=rwt([gj(1,Me),gj(2,wa),gj(3,vp)],bhe);Ahe=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new se,this._callOnModel=new se,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(dOe,this.editor,e,2,up.None,Nt.None,!1).catch(ft))}};Ahe=rwt([gj(1,Me),gj(2,Re)],Ahe);a4e=class extends Pe{constructor(){super({id:"editor.action.formatDocument",label:y("formatDocument.label","Format Document"),alias:"Format Document",precondition:ge.and(V.notInCompositeEditor,V.writable,V.hasDocumentFormattingProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){let n=e.get(Re);await e.get(dp).showWhile(n.invokeFunction(i0t,t,1,up.None,Nt.None,!0),250)}}},l4e=class extends Pe{constructor(){super({id:"editor.action.formatSelection",label:y("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ge.and(V.writable,V.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2084),weight:100},contextMenuOpts:{when:V.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;let n=e.get(Re),o=t.getModel(),r=t.getSelections().map(a=>a.isEmpty()?new R(a.startLineNumber,1,a.startLineNumber,o.getLineMaxColumn(a.startLineNumber)):a);await e.get(dp).showWhile(n.invokeFunction(dOe,t,r,1,up.None,Nt.None,!0),250)}};St(bhe.ID,bhe,2);St(Ahe.ID,Ahe,2);Ce(a4e);Ce(l4e);ii.registerCommand("editor.action.format",async i=>{let e=i.get(ei).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(Ii);e.getSelection().isEmpty()?await t.executeCommand("editor.action.formatDocument"):await t.executeCommand("editor.action.formatSelection")})});var Hmi,c4e,LD,G3,bj,Aj,FC,u4e,q3=D(()=>{Wt();sn();Tt();ld();Xl();kt();Ue();hm();ht();Dc();su();de();Hi();Hmi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},c4e=function(i,e){return function(t,n){e(t,n,i)}},LD=class{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let o=n;for(let r=0;t.children.get(o)!==void 0;r++)o=`${n}_${r}`;return o}static empty(e){return e.children.size===0}},G3=class extends LD{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},bj=class extends LD{constructor(e,t,n,o){super(),this.id=e,this.parent=t,this.label=n,this.order=o,this.children=new Map}},Aj=class i extends LD{static create(e,t,n){let o=new Mi(n),r=new i(t.uri),s=e.ordered(t),a=s.map((c,u)=>{let d=LD.findId(`provider_${u}`,r),h=new bj(d,r,c.displayName??"Unknown Outline Provider",u);return Promise.resolve(c.provideDocumentSymbols(t,o.token)).then(f=>{for(let p of f||[])i._makeOutlineElement(p,h);return h},f=>(ln(f),h)).then(f=>{LD.empty(f)?f.remove():r._groups.set(d,f)})}),l=e.onDidChange(()=>{let c=e.ordered(t);Zi(c,s)||o.cancel()});return Promise.all(a).then(()=>o.token.isCancellationRequested&&!n.isCancellationRequested?i.create(e,t,n):r._compact()).finally(()=>{o.dispose(),l.dispose(),o.dispose()})}static _makeOutlineElement(e,t){let n=LD.findId(e,t),o=new G3(n,t,e);if(e.children)for(let r of e.children)i._makeOutlineElement(r,o);t.children.set(o.id,o)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(let[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=hi.first(this._groups.values());for(let[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof G3?e.push(t.symbol):e.push(...hi.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>R.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,o)=>J.compare(R.getStartPosition(n.range),R.getStartPosition(o.range))||J.compare(R.getEndPosition(o.range),R.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(let o of t)e.push({kind:o.kind,tags:o.tags,name:o.name,detail:o.detail,containerName:o.containerName||n,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&i._flattenDocumentSymbols(e,o.children,o.name)}},FC=At("IOutlineModelService"),u4e=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new se,this._cache=new Jl(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(o=>{this._cache.delete(o.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){let n=this._languageFeaturesService.documentSymbolProvider,o=n.ordered(e),r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!Zi(r.provider,o)){let a=new Mi;r={versionId:e.getVersionId(),provider:o,promiseCnt:0,source:a,promise:Aj.create(n,e,a.token),model:void 0},this._cache.set(e.id,r);let l=Date.now();r.promise.then(c=>{r.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(r.model)return r.model;r.promiseCnt+=1;let s=t.onCancellationRequested(()=>{--r.promiseCnt===0&&(r.source.cancel(),this._cache.delete(e.id))});try{return await r.promise}finally{s.dispose()}}};u4e=Hmi([c4e(0,Me),c4e(1,Aa),c4e(2,an)],u4e);oi(FC,u4e,1)});var awt=D(()=>{sn();gn();mn();dm();q3();to();ii.registerCommand("_executeDocumentSymbolProvider",async function(i,...e){let[t]=e;gi(Je.isUri(t));let n=i.get(FC),r=await i.get(Ss).createModelReference(t);try{return(await n.getOrCreate(r.object.textEditorModel,Nt.None)).getTopLevelSymbols()}finally{r.dispose()}})});var Rd,vhe=D(()=>{In();Rt();Zb();Bt();de();Be();Rd=class i extends H{static{this.inlineSuggestionVisible=new ze("inlineSuggestionVisible",!1,y("inlineSuggestionVisible","Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new ze("inlineSuggestionHasIndentation",!1,y("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new ze("inlineSuggestionHasIndentationLessThanTabSize",!0,y("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new ze("inlineSuggestionSuppressSuggestions",void 0,y("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))}constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=i.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=i.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=i.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=i.suppressSuggestions.bindTo(this.contextKeyService),this._register(Ct(n=>{let r=this.model.read(n)?.state.read(n),s=!!r?.inlineCompletion&&r?.primaryGhostText!==void 0&&!r?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(s),r?.primaryGhostText&&r?.inlineCompletion&&this.suppressSuggestions.set(r.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(Ct(n=>{let o=this.model.read(n),r=!1,s=!0,a=o?.primaryGhostText.read(n);if(o?.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],u=c[0],d=o.textModel.getLineIndentColumn(a.lineNumber);if(l<=d){let f=Hr(u);f===-1&&(f=u.length-1),r=f>0;let p=o.textModel.getOptions().tabSize;s=or.visibleColumnFromColumn(u,f+1,p){t.setStyle(i.read(n))})),e}var cwt=D(()=>{Ye();de();In()});var uwt=D(()=>{});function d4e(i,e){return Zi(i,e,h4e)}function h4e(i,e){return i===e?!0:!i||!e?!1:i instanceof z1&&e instanceof z1||i instanceof Y3&&e instanceof Y3?i.equals(e):!1}var z1,ND,Y3,vj=D(()=>{Wt();Rt();kt();Ue();Iy();z1=class{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,n)=>t.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return new gE([...this.parts.map(r=>new Yu(R.fromPositions(new J(1,r.column)),r.lines.join(` +`)))]).applyToString(n).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},ND=class{constructor(e,t,n){this.column=e,this.text=t,this.preview=n,this.lines=Uu(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,n)=>t===e.lines[n])}},Y3=class{constructor(e,t,n,o=0){this.lineNumber=e,this.columnRange=t,this.text=n,this.additionalReservedLineCount=o,this.parts=[new ND(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=Uu(this.text)}renderForScreenReader(e){return this.newLines.join(` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,n)=>t===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}});function dwt(){return Wmi}function yhe(i,e){let t=new se,n=i.createDecorationsCollection();return t.add(Xy({debugName:()=>`Apply decorations from ${e.debugName}`},o=>{let r=e.read(o);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function hwt(i,e){return new J(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function f4e(i,e){return new J(i.lineNumber-e.lineNumber+1,i.lineNumber-e.lineNumber===0?i.column-e.column+1:i.column)}var Wmi,K3,yj=D(()=>{Tt();de();In();kt();Ue();Wmi=[];K3=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new fi(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new R(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}});function Qmi(i,e,t,n,o){let r=n.get(33),s=n.get(118),a="none",l=n.get(95),c=n.get(51),u=n.get(50),d=n.get(67),h=new am(1e4);h.appendString('
    ');for(let g=0,A=t.length;g');let C=gy(w),_=_A(w),E=Nr.createEmpty(w,o);Sx(new ef(u.isMonospace&&!r,u.canUseHalfwidthRightwardsArrow,w,!1,C,_,0,E,v.decorations,e,0,u.spaceWidth,u.middotWidth,u.wsmiddotWidth,s,a,l,c!==Dg.OFF,null),h),h.appendString("
    ")}h.appendString(""),vr(i,u);let f=h.build(),p=pwt?pwt.createHTML(f):f;i.innerHTML=p}var Umi,jmi,fwt,whe,p4e,pwt,mwt=D(()=>{Sy();et();de();In();Rt();uwt();um();ea();kt();Ue();_x();Il();ol();Fg();HI();JS();vj();yj();Umi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},jmi=function(i,e){return function(t,n){e(t,n,i)}},fwt="ghost-text",whe=class extends H{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Ut(this,!1),this.currentTextModel=Ri(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=at(this,o=>{if(this.isDisposed.read(o))return;let r=this.currentTextModel.read(o);if(r!==this.model.targetTextModel.read(o))return;let s=this.model.ghostText.read(o);if(!s)return;let a=s instanceof Y3?s.columnRange:void 0,l=[],c=[];function u(g,A){if(c.length>0){let v=c[c.length-1];A&&v.decorations.push(new ou(v.content.length+1,v.content.length+1+g[0].length,A,0)),v.content+=g[0],g=g.slice(1)}for(let v of g)c.push({content:v,decorations:A?[new ou(1,v.length+1,A,0)]:[]})}let d=r.getLineContent(s.lineNumber),h,f=0;for(let g of s.parts){let A=g.lines;h===void 0?(l.push({column:g.column,text:A[0],preview:g.preview}),A=A.slice(1)):u([d.substring(f,g.column-1)],void 0),A.length>0&&(u(A,fwt),h===void 0&&g.column<=d.length&&(h=g.column)),f=g.column-1}h!==void 0&&u([d.substring(f)],void 0);let p=h!==void 0?new K3(h,d.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:p,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(o),targetTextModel:r}}),this.decorations=at(this,o=>{let r=this.uiState.read(o);if(!r)return[];let s=[];r.replacedRange&&s.push({range:r.replacedRange.toRange(r.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),r.hiddenRange&&s.push({range:r.hiddenRange.toRange(r.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of r.inlineTexts)s.push({range:R.fromPositions(new J(r.lineNumber,a.column)),options:{description:fwt,after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:af.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new p4e(this.editor,this.languageService.languageIdCodec,at(o=>{let r=this.uiState.read(o);return r?{lineNumber:r.lineNumber,additionalLines:r.additionalLines,minReservedLineCount:r.additionalReservedLineCount,targetTextModel:r.targetTextModel}:void 0}))),this._register(He(()=>{this.isDisposed.set(!0,void 0)})),this._register(yhe(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};whe=Umi([jmi(2,on)],whe);p4e=class extends H{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=gs("editorOptionChanged",Ee.filter(this.editor.onDidChangeConfiguration,o=>o.hasChanged(33)||o.hasChanged(118)||o.hasChanged(100)||o.hasChanged(95)||o.hasChanged(51)||o.hasChanged(50)||o.hasChanged(67))),this._register(Ct(o=>{let r=this.lines.read(o);this.editorOptionsChanged.read(o),r?this.updateLines(r.lineNumber,r.additionalLines,r.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let o=this.editor.getModel();if(!o)return;let{tabSize:r}=o.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");Qmi(l,r,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};pwt=xd("editorGhostText",{createHTML:i=>i})});function gwt(i,e){let t=new NP,n=new RP(t,c=>e.getLanguageConfiguration(c)),o=new MP(new m4e([i]),n),r=BH(o,[],void 0,!0),s="",a=i.getLineContent();function l(c,u){if(c.kind===2)if(l(c.openingBracket,u),u=zo(u,c.openingBracket.length),c.child&&(l(c.child,u),u=zo(u,c.child.length)),c.closingBracket)l(c.closingBracket,u),u=zo(u,c.closingBracket.length);else{let h=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(u,zo(u,c.length));else if(c.kind===4)for(let d of c.children)l(d,u),u=zo(u,d.length)}}return l(r,Ml),s}var m4e,bwt=D(()=>{FLe();r1();VLe();UL();boe();m4e=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}});async function xhe(i,e,t,n,o=Nt.None,r){let s=e instanceof J?Gmi(e,t):e,a=i.all(t),l=new dE;for(let v of a)v.groupId&&l.add(v.groupId,v);function c(v){if(!v.yieldsToGroupIds)return[];let w=[];for(let C of v.yieldsToGroupIds||[]){let _=l.get(C);for(let E of _)w.push(E)}return w}let u=new Map,d=new Set;function h(v,w){if(w=[...w,v],d.has(v))return w;d.add(v);try{let C=c(v);for(let _ of C){let E=h(_,w);if(E)return E}}finally{d.delete(v)}}function f(v){let w=u.get(v);if(w)return w;let C=h(v,[]);C&&ln(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${C.map(E=>E.toString?E.toString():""+E).join(" -> ")}`));let _=new em;return u.set(v,_.p),(async()=>{if(!C){let E=c(v);for(let I of E){let T=await f(I);if(T&&T.items.length>0)return}}try{return e instanceof J?await v.provideInlineCompletions(t,e,n,o):await v.provideInlineEdits?.(t,e,n,o)}catch(E){ln(E);return}})().then(E=>_.complete(E),E=>_.error(E)),_.p}let p=await Promise.all(a.map(async v=>({provider:v,completions:await f(v)}))),g=new Map,A=[];for(let v of p){let w=v.completions;if(!w)continue;let C=new b4e(w,v.provider);A.push(C);for(let _ of w.items){let E=A4e.from(_,C,s,t,r);g.set(E.hash(),E)}}return new g4e(Array.from(g.values()),new Set(g.keys()),A)}function Gmi(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new R(i.lineNumber,t.startColumn,i.lineNumber,n):R.fromPositions(i,i.with(void 0,n))}function Awt(i,e,t,n){let r=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,a=t.tokenization.tokenizeLineWithEdit(e,r.length-(e.column-1),i)?.sliceAndInflate(e.column-1,r.length,0);return a?gwt(a,n):i}var g4e,b4e,A4e,v4e=D(()=>{Gb();Gt();sn();Xl();Tt();kt();Ue();bwt();Iy();yj();bD();g4e=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},b4e=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},A4e=class i{static from(e,t,n,o,r){let s,a,l=e.range?R.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,r&&e.completeBracketPairs){s=Awt(s,l.getStartPosition(),o,r);let c=s.length-e.insertText.length;c!==0&&(l=new R(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(r&&e.completeBracketPairs){e.insertText.snippet=Awt(e.insertText.snippet,l.getStartPosition(),o,r);let d=e.insertText.snippet.length-c;d!==0&&(l=new R(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+d))}let u=new _p().parse(e.insertText.snippet);u.children.length===1&&u.children[0]instanceof vu?(s=u.children[0].value,a=void 0):(s=u.toString(),a={snippet:e.insertText.snippet,range:l})}else WS(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||dwt(),e,t)}constructor(e,t,n,o,r,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=o,this.snippetInfo=r,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` +`),o=e.replace(/\r\n|\r/g,` +`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new Yu(this.range,this.insertText)}}});function V1(i,e,t){let n=t?i.range.intersectRanges(t):i.range;if(!n)return i;let o=e.getValueInRange(n,1),r=tp(o,i.text),s=au.ofText(o.substring(0,r)).addToPosition(i.range.getStartPosition()),a=i.text.substring(r),l=R.fromPositions(s,i.range.getEndPosition());return new Yu(l,a)}function _he(i,e){return i.text.startsWith(e.text)&&qmi(i.range,e.range)}function y4e(i,e,t,n,o=0){let r=V1(i,e);if(r.range.endLineNumber!==r.range.startLineNumber)return;let s=e.getLineContent(r.range.startLineNumber),a=wn(s).length;if(r.range.startColumn-1<=a){let p=wn(r.text).length,g=s.substring(r.range.startColumn-1,a),[A,v]=[r.range.getStartPosition(),r.range.getEndPosition()],w=A.column+g.length<=v.column?A.delta(0,g.length):v,C=R.fromPositions(w,v),_=r.text.startsWith(g)?r.text.substring(g.length):r.text.substring(p);r=new Yu(C,_)}let c=e.getValueInRange(r.range),u=Ymi(c,r.text);if(!u)return;let d=r.range.startLineNumber,h=new Array;if(t==="prefix"){let p=u.filter(g=>g.originalLength===0);if(p.length>1||p.length===1&&p[0].originalStart!==c.length)return}let f=r.text.length-o;for(let p of u){let g=r.range.startColumn+p.originalStart+p.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===r.range.startLineNumber&&g0)return;if(p.modifiedLength===0)continue;let A=p.modifiedStart+p.modifiedLength,v=Math.max(p.modifiedStart,Math.min(A,f)),w=r.text.substring(p.modifiedStart,v),C=r.text.substring(v,Math.max(p.modifiedStart,A));w.length>0&&h.push(new ND(g,w,!1)),C.length>0&&h.push(new ND(g,C,!0))}return new z1(d,h)}function qmi(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function Ymi(i,e){if(Che?.originalValue===i&&Che?.newValue===e)return Che?.changes;{let t=ywt(i,e,!0);if(t){let n=vwt(t);if(n>0){let o=ywt(i,e,!1);o&&vwt(o)5e3||e.length>5e3)return;function n(c){let u=0;for(let d=0,h=c.length;du&&(u=f)}return u}let o=Math.max(n(i),n(e));function r(c){if(c<0)throw new Error("unexpected");return o+c+1}function s(c){let u=0,d=0,h=new Int32Array(c.length);for(let f=0,p=c.length;fa},{getElements:()=>l}).ComputeDiff(!1).changes}var Che,She=D(()=>{bV();Rt();Ue();Ox();Iy();vj()});function Jmi(i,e){return new Promise(t=>{let n,o=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(o),n&&n.dispose(),t()}))})}var Kmi,wwt,Ehe,x4e,C4e,_4e,Dhe,w4e,xwt=D(()=>{sn();qy();Rg();de();In();Ue();Iy();Ox();ro();Rs();Hi();v4e();She();Kmi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},wwt=function(i,e){return function(t,n){e(t,n,i)}},Ehe=class extends H{constructor(e,t,n,o,r){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=o,this.languageConfigurationService=r,this._updateOperation=this._register(new Vn),this.inlineCompletions=Ky("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Ky("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){let o=new x4e(e,t,this.textModel.getVersionId()),r=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(o))return this._updateOperation.value.promise;if(r.get()?.request.satisfies(o))return Promise.resolve(!0);let s=!!this._updateOperation.value;this._updateOperation.clear();let a=new Mi,l=(async()=>{if((s||t.triggerKind===Wf.Automatic)&&await Jmi(this._debounceValue.get(this.textModel),a.token),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==o.versionId)return!1;let d=new Date,h=await xhe(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==o.versionId)return!1;let f=new Date;this._debounceValue.update(this.textModel,f.getTime()-d.getTime());let p=new _4e(h,o,this.textModel,this.versionId);if(n){let g=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!h.has(g)&&p.prepend(n.inlineCompletion,g.range,!0)}return this._updateOperation.clear(),fn(g=>{r.set(p,g)}),!0})(),c=new C4e(o,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};Ehe=Kmi([wwt(3,Me),wwt(4,Gi)],Ehe);x4e=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&pH(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,Put())&&(e.context.triggerKind===Wf.Automatic||this.context.triggerKind===Wf.Explicit)&&this.versionId===e.versionId}},C4e=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},_4e=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,o){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=n,this._versionId=o,this._refCount=1,this._prependedInlineCompletionItems=[];let r=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new Dhe(s,r[a],this._textModel,this._versionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let o=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new Dhe(e,o,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}},Dhe=class{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,t,n,o){this.inlineCompletion=e,this.decorationId=t,this._textModel=n,this._modelVersion=o,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=ec({owner:this,equalsFn:R.equalsRange},r=>(this._modelVersion.read(r),this._textModel.getDecorationRange(this.decorationId)))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??w4e)}toSingleTextEdit(e){return new Yu(this._updatedRange.read(e)??w4e,this.inlineCompletion.insertText)}isVisible(e,t,n){let o=V1(this._toFilterTextReplacement(n),e),r=this._updatedRange.read(n);if(!r||!this.inlineCompletion.range.getStartPosition().equals(r.getStartPosition())||t.lineNumber!==o.range.startLineNumber)return!1;let s=e.getValueInRange(o.range,1),a=o.text,l=Math.max(0,t.column-o.range.startColumn),c=a.substring(0,l),u=a.substring(l),d=s.substring(0,l),h=s.substring(l),f=e.getLineIndentColumn(o.range.startLineNumber);return o.range.startColumn<=f&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),c=c.trimStart(),c.length===0&&(u=u.trimStart())),c.startsWith(d)&&!!Jke(h,u)}canBeReused(e,t){let n=this._updatedRange.read(void 0);return!!n&&n.containsPosition(t)&&this.isVisible(e,t,void 0)&&au.ofRange(n).isGreaterThanOrEqualTo(au.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){return new Yu(this._updatedRange.read(e)??w4e,this.inlineCompletion.filterText)}},w4e=new R(1,1,1,1)});function Cwt(){return J3}async function wj(i,e,t,n=v2.default,o={triggerKind:0},r=Nt.None){let s=new xo;t=t.clone();let a=e.getWordAtPosition(t),l=a?new R(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):R.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},u=[],d=new se,h=[],f=!1,p=(A,v,w)=>{let C=!1;if(!v)return C;for(let _ of v.suggestions)if(!n.kindFilter.has(_.kind)){if(!n.showDeprecated&&_?.tags?.includes(1))continue;_.range||(_.range=c),_.sortText||(_.sortText=typeof _.label=="string"?_.label:_.label.label),!f&&_.insertTextRules&&_.insertTextRules&4&&(f=_p.guessNeedsClipboard(_.insertText)),u.push(new S4e(t,_,v,A)),C=!0}return j_(v)&&d.add(v),h.push({providerName:A._debugDisplayName??"unknown_provider",elapsedProvider:v.duration??-1,elapsedOverall:w.elapsed()}),C},g=(async()=>{if(!J3||n.kindFilter.has(27))return;let A=n.providerItemsToReuse.get(J3);if(A){A.forEach(C=>u.push(C));return}if(n.providerFilter.size>0&&!n.providerFilter.has(J3))return;let v=new xo,w=await J3.provideCompletionItems(e,t,o,r);p(J3,w,v)})();for(let A of i.orderedGroups(e)){let v=!1;if(await Promise.all(A.map(async w=>{if(n.providerItemsToReuse.has(w)){let C=n.providerItemsToReuse.get(w);C.forEach(_=>u.push(_)),v=v||C.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(w)))try{let C=new xo,_=await w.provideCompletionItems(e,t,o,r);v=p(w,_,C)||v}catch(C){ln(C)}})),v||r.isCancellationRequested)break}return await g,r.isCancellationRequested?(d.dispose(),Promise.reject(new qc)):new E4e(u.sort($mi(n.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},d)}function D4e(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLowe.sortTextLow)return 1}return i.textLabele.textLabel?1:i.completion.kind-e.completion.kind}function Xmi(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return D4e(i,e)}function Zmi(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return D4e(i,e)}function $mi(i){return The.get(i)}function _wt(i,e){i.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(e),void 0,!0)}var _i,W1,S4e,v2,J3,E4e,The,H1,y2=D(()=>{sn();Tt();Rg();de();cd();gn();mn();kt();Ue();dm();bD();Be();go();to();Bt();Hi();b3e();_i={Visible:rhe,HasFocusedSuggestion:new ze("suggestWidgetHasFocusedSuggestion",!1,y("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new ze("suggestWidgetDetailsVisible",!1,y("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new ze("suggestWidgetMultipleSuggestions",!1,y("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new ze("suggestionMakesTextEdit",!0,y("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new ze("acceptSuggestionOnEnter",!0,y("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new ze("suggestionHasInsertAndReplaceRange",!1,y("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new ze("suggestionInsertMode",void 0,{type:"string",description:y("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new ze("suggestionCanResolve",!1,y("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},W1=new tt("suggestWidgetStatusBar"),S4e=class{constructor(e,t,n,o){this.position=e,this.completion=t,this.container=n,this.provider=o,this.isInvalid=!1,this.score=cf.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,R.isIRange(t.range)?(this.editStart=new J(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new J(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new J(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||R.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new J(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new J(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new J(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||R.spansMultipleLines(t.range.insert)||R.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof o.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new xo(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(o=>{Object.assign(this.completion,o),this._resolveDuration=n.elapsed()},o=>{Ka(o)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache}},v2=class i{static{this.default=new i}constructor(e=2,t=new Set,n=new Set,o=new Map,r=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=o,this.showDeprecated=r}};E4e=class{constructor(e,t,n,o){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=o}};The=new Map;The.set(0,Xmi);The.set(2,Zmi);The.set(1,D4e);ii.registerCommand("_executeCompletionItemProvider",async(i,...e)=>{let[t,n,o,r]=e;gi(Je.isUri(t)),gi(J.isIPosition(n)),gi(typeof o=="string"||!o),gi(typeof r=="number"||!r);let{completionProvider:s}=i.get(Me),a=await i.get(Ss).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],u=a.object.textEditorModel.validatePosition(n),d=await wj(s,a.object.textEditorModel,u,void 0,{triggerCharacter:o??void 0,triggerKind:o?1:0});for(let h of d.items)c.length<(r??0)&&c.push(h.resolve(Nt.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return await Promise.all(c),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}});H1=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}});var Swt=D(()=>{});function T4e(i,e=Fo){return Hlt(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var Ewt=D(()=>{die();wi()});var egi,tgi,Bfo,xj,Cj,_j,Sj,Ej,Dj,Tj,kj,Dwt=D(()=>{Ewt();eA();Nc();Rt();yU();Rs();bD();Be();sP();egi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},tgi=function(i,e){return function(t,n){e(t,n,i)}},Bfo=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),xj=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},Cj=class{constructor(e,t,n,o){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=o}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,o=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let r=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);r&&(n=r.value,o=r.multiline)}if(n&&o&&e.snippet){let r=this._model.getLineContent(this._selection.startLineNumber),s=wn(r,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof vu&&(a=wn(Uu(c.value).pop())),!0));let l=tp(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,u,d)=>`${u}${a.substr(l)}${d}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},_j=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return _b(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=_b(this._model.uri.fsPath),o=n.lastIndexOf(".");return o<=0?n:n.slice(0,o)}else{if(t==="TM_DIRECTORY")return YK(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(IE(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},Sj=class{constructor(e,t,n,o){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=o}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(o=>!w$(o));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},Ej=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),o=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(o){if(t==="LINE_COMMENT")return o.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return o.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return o.blockCommentEndToken||void 0}}};Ej=egi([tgi(2,Gi)],Ej);Dj=class i{constructor(){this._date=new Date}static{this.dayNames=[y("Sunday","Sunday"),y("Monday","Monday"),y("Tuesday","Tuesday"),y("Wednesday","Wednesday"),y("Thursday","Thursday"),y("Friday","Friday"),y("Saturday","Saturday")]}static{this.dayNamesShort=[y("SundayShort","Sun"),y("MondayShort","Mon"),y("TuesdayShort","Tue"),y("WednesdayShort","Wed"),y("ThursdayShort","Thu"),y("FridayShort","Fri"),y("SaturdayShort","Sat")]}static{this.monthNames=[y("January","January"),y("February","February"),y("March","March"),y("April","April"),y("May","May"),y("June","June"),y("July","July"),y("August","August"),y("September","September"),y("October","October"),y("November","November"),y("December","December")]}static{this.monthNamesShort=[y("JanuaryShort","Jan"),y("FebruaryShort","Feb"),y("MarchShort","Mar"),y("AprilShort","Apr"),y("MayShort","May"),y("JuneShort","Jun"),y("JulyShort","Jul"),y("AugustShort","Aug"),y("SeptemberShort","Sep"),y("OctoberShort","Oct"),y("NovemberShort","Nov"),y("DecemberShort","Dec")]}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),o=n>0?"-":"+",r=Math.trunc(Math.abs(n/60)),s=r<10?"0"+r:r,a=Math.abs(n)-r*60,l=a<10?"0"+a:a;return o+s+":"+l}}},Tj=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=Tut(this._workspaceService.getWorkspace());if(!Dut(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(one(e))return _b(e.uri.path);let t=_b(e.configPath.path);return t.endsWith(rne)&&(t=t.substr(0,t.length-rne.length-1)),t}_resoveWorkspacePath(e){if(one(e))return T4e(e.uri.fsPath);let t=_b(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?T4e(n):"/"}},kj=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return mD()}}});var igi,ngi,rv,khe,Twt,X3,k4e=D(()=>{Wt();de();Rt();Swt();gm();Ue();Qn();Rs();bs();oP();sP();bD();Dwt();igi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ngi=function(i,e){return function(t,n){e(t,n,i)}},khe=class i{static{this._decor={active:Ot.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Ot.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Ot.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ot.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=qEe(t.placeholders,Em.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let o=this._snippet.offset(n),r=this._snippet.fullLen(n),s=R.fromPositions(e.getPositionAt(this._offset+o),e.getPositionAt(this._offset+o+r)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let o=[];for(let r of this._placeholderGroups[this._placeholderGroupsIdx])if(r.transform){let s=this._placeholderDecorations.get(r),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=r.transform.resolve(l).split(/\r\n|\r|\n/);for(let u=1;u0&&this._editor.executeEdits("snippet.placeholderTransform",o)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(o=>{let r=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new qe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),o.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),r.add(a);for(let u of this._snippet.enclosingPlaceholders(a)){let d=this._placeholderDecorations.get(u);o.changeDecorationOptions(d,u.isFinalTabstop?i._decor.activeFinal:i._decor.active),r.add(u)}}for(let[a,l]of this._placeholderDecorations)r.has(a)||o.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof Em){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let o of t){if(o.isFinalTabstop)break;n||(n=[],e.set(o.index,n));let r=this._placeholderDecorations.get(o),s=this._editor.getModel().getDecorationRange(r);if(!s){e.delete(o.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof qN,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let o of this._placeholderGroups[this._placeholderGroupsIdx]){let r=e.shift();console.assert(r._offset!==-1),console.assert(!r._placeholderDecorations);let s=r._snippet.placeholderInfo.last.index;for(let l of r._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=o.index+(s+1)/this._nestingLevel:l.index=o.index+l.index/this._nestingLevel;this._snippet.replace(o,r._snippet.children);let a=this._placeholderDecorations.get(o);n.removeDecoration(a),this._placeholderDecorations.delete(o);for(let l of r._snippet.placeholders){let c=r._snippet.offset(l),u=r._snippet.fullLen(l),d=R.fromPositions(t.getPositionAt(r._offset+c),t.getPositionAt(r._offset+c+u)),h=n.addDecoration(d,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=qEe(this._snippet.placeholders,Em.compareByIndex)})}},Twt={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},X3=rv=class{static adjustWhitespace(e,t,n,o,r){let s=e.getLineContent(t.lineNumber),a=wn(s,0,t.column-1),l;return o.walk(c=>{if(!(c instanceof vu)||c.parent instanceof qN||r&&!r.has(c))return!0;let u=c.value.split(/\r\n|\r|\n/);if(n){let h=o.offset(c);if(h===0)u[0]=e.normalizeIndentation(u[0]);else{l=l??o.toString();let f=l.charCodeAt(h-1);(f===10||f===13)&&(u[0]=e.normalizeIndentation(a+u[0]))}for(let f=1;f_.get(OA)),p=e.invokeWithinContext(_=>new _j(_.get(FA),h)),g=()=>a,A=h.getValueInRange(rv.adjustSelection(h,e.getSelection(),n,0)),v=h.getValueInRange(rv.adjustSelection(h,e.getSelection(),0,o)),w=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),C=e.getSelections().map((_,E)=>({selection:_,idx:E})).sort((_,E)=>R.compareRangesUsingStarts(_.selection,E.selection));for(let{selection:_,idx:E}of C){let I=rv.adjustSelection(h,_,n,0),T=rv.adjustSelection(h,_,0,o);A!==h.getValueInRange(I)&&(I=_),v!==h.getValueInRange(T)&&(T=_);let N=_.setStartPosition(I.startLineNumber,I.startColumn).setEndPosition(T.endLineNumber,T.endColumn),L=new _p().parse(t,!0,r),B=N.getStartPosition(),z=rv.adjustWhitespace(h,B,s||E>0&&w!==h.getLineFirstNonWhitespaceColumn(_.positionLineNumber),L);L.resolveVariables(new xj([p,new Sj(g,E,C.length,e.getOption(79)==="spread"),new Cj(h,_,E,l),new Ej(h,_,c),new Dj,new Tj(f),new kj])),u[E]=kn.replace(N,L.toString()),u[E].identifier={major:E,minor:0},u[E]._isTracked=!0,d[E]=new khe(e,L,z)}return{edits:u,snippets:d}}static createEditsAndSnippetsFromEdits(e,t,n,o,r,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),u=new _p,d=new d3,h=new xj([e.invokeWithinContext(p=>new _j(p.get(FA),c)),new Sj(()=>r,0,e.getSelections().length,e.getOption(79)==="spread"),new Cj(c,e.getSelection(),0,s),new Ej(c,e.getSelection(),a),new Dj,new Tj(e.invokeWithinContext(p=>p.get(OA))),new kj]);t=t.sort((p,g)=>R.compareRangesUsingStarts(p.range,g.range));let f=0;for(let p=0;p0){let E=t[p-1].range,I=R.fromPositions(E.getEndPosition(),g.getStartPosition()),T=new vu(c.getValueInRange(I));d.appendChild(T),f+=T.value.length}let v=u.parseFragment(A,d);rv.adjustWhitespace(c,g.getStartPosition(),!0,d,new Set(v)),d.resolveVariables(h);let w=d.toString(),C=w.slice(f);f=w.length;let _=kn.replace(g,C);_.identifier={major:p,minor:0},_._isTracked=!0,l.push(_)}return u.ensureFinalTabstop(d,n,!0),{edits:l,snippets:[new khe(e,d,"")]}}constructor(e,t,n=Twt,o){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=o,this._templateMerges=[],this._snippets=[]}dispose(){Oi(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?rv.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):rv.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let o=n.filter(r=>!!r.identifier);for(let r=0;rqe.fromPositions(r.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=Twt){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:o}=rv.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,r=>{let s=r.filter(l=>!!l.identifier);for(let l=0;lqe.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let o=n.move(e);t.push(...o)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length{r.push(...o.get(s))})}e.sort(R.compareRangesUsingStarts);for(let[n,o]of t){if(o.length!==e.length){t.delete(n);continue}o.sort(R.compareRangesUsingStarts);for(let r=0;r0}};X3=rv=igi([ngi(3,Gi)],X3)});var ogi,Ihe,Z3,kwt,Su,Lhe,Ij=D(()=>{de();gn();Jt();kt();An();Rs();Hi();y2();Be();Bt();ch();k4e();ogi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ihe=function(i,e){return function(t,n){e(t,n,i)}},kwt={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Su=class{static{Z3=this}static{this.ID="snippetController2"}static get(e){return e.getContribution(Z3.ID)}static{this.InSnippetMode=new ze("inSnippetMode",!1,y("inSnippetMode","Whether the editor in current in snippet mode"))}static{this.HasNextTabstop=new ze("hasNextTabstop",!1,y("hasNextTabstop","Whether there is a next tab stop when in snippet mode"))}static{this.HasPrevTabstop=new ze("hasPrevTabstop",!1,y("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"))}constructor(e,t,n,o,r){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=r,this._snippetListener=new se,this._modelVersionId=-1,this._inSnippet=Z3.InSnippetMode.bindTo(o),this._hasNextTabstop=Z3.HasNextTabstop.bindTo(o),this._hasPrevTabstop=Z3.HasPrevTabstop.bindTo(o)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?kwt:{...kwt,...t})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(gi(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new X3(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){let n={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(c,u)=>{if(!this._session||c!==this._editor.getModel()||!J.equals(this._editor.getPosition(),u))return;let{activeChoice:d}=this._session;if(!d||d.choice.options.length===0)return;let h=c.getValueInRange(d.range),f=!!d.choice.options.find(g=>g.value===h),p=[];for(let g=0;g{r?.dispose(),s=!1},l=()=>{s||(r=this._languageFeaturesService.completionProvider.register({language:o.getLanguageId(),pattern:o.uri.fsPath,scheme:o.uri.scheme,exclusive:!0},n),this._snippetListener.add(r),s=!0)};this._choiceCompletions={provider:n,enable:l,disable:a}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletions){this._choiceCompletions?.disable(),this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{_wt(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Su=Z3=ogi([Ihe(1,sr),Ihe(2,Me),Ihe(3,Ze),Ihe(4,Gi)],Su);St(Su.ID,Su,4);Lhe=Eo.bindToContribution(Su.get);Qe(new Lhe({id:"jumpToNextSnippetPlaceholder",precondition:ge.and(Su.InSnippetMode,Su.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:130,kbExpr:V.textInputFocus,primary:2}}));Qe(new Lhe({id:"jumpToPrevSnippetPlaceholder",precondition:ge.and(Su.InSnippetMode,Su.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:130,kbExpr:V.textInputFocus,primary:1026}}));Qe(new Lhe({id:"leaveSnippet",precondition:Su.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:130,kbExpr:V.textInputFocus,primary:9,secondary:[1033]}}));Qe(new Lhe({id:"acceptSnippet",precondition:Su.InSnippetMode,handler:i=>i.finish()}))});function L4e(i,e,t){if(e.length===1)return[];let n=e[0],o=e.slice(1),r=t.range.getStartPosition(),s=t.range.getEndPosition(),a=i.getValueInRange(R.fromPositions(n,s)),l=f4e(n,r);if(l.lineNumber<1)return ft(new fi(`positionWithinTextEdit line number should be bigger than 0. + Invalid subtraction between ${n.toString()} and ${r.toString()}`)),[];let c=sgi(t.text,l);return o.map(u=>{let d=hwt(f4e(u,r),s),h=i.getValueInRange(R.fromPositions(u,d)),f=tp(a,h),p=R.fromPositions(u,u.delta(0,f));return new Yu(p,c)})}function sgi(i,e){let t="",n=iot(i);for(let o=e.lineNumber-1;or.range,R.compareRangesUsingStarts)),n=new gE(e.apply(i)).getNewRanges();return e.inverse().apply(n).map(r=>r.getEndPosition())}var rgi,I4e,Nhe,OC,Lwt=D(()=>{Wt();lp();qy();Tt();de();In();Rt();gn();gm();kt();Ue();Qn();Iy();Ox();ro();Rs();vj();xwt();She();yj();Ij();to();ht();rgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},I4e=function(i,e){return function(t,n){e(t,n,i)}},Nhe=class extends H{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,n,o,r,s,a,l,c,u,d,h){super(),this.textModel=e,this.selectedSuggestItem=t,this._textModelVersionId=n,this._positions=o,this._debounceValue=r,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=u,this._commandService=d,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(Ehe,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=Ut(this,!1),this._forceUpdateExplicitlySignal=Pg(this),this._selectedInlineCompletionId=Ut(this,void 0),this._primaryPosition=at(this,p=>this._positions.read(p)[0]??new J(1,1)),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([OC.Redo,OC.Undo,OC.AcceptWord]),this._fetchInlineCompletionsPromise=AH({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Wf.Automatic}),handleChange:(p,g)=>(p.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(p.change))?g.preserveCurrentCompletion=!0:p.didChange(this._forceUpdateExplicitlySignal)&&(g.inlineCompletionTriggerKind=Wf.Explicit),!0)},(p,g)=>{if(this._forceUpdateExplicitlySignal.read(p),!(this._enabled.read(p)&&this.selectedSuggestItem.read(p)||this._isActive.read(p))){this._source.cancelUpdate();return}this._textModelVersionId.read(p);let v=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(p);if(v&&!w){let T=this._source.inlineCompletions.get();fn(N=>{(!T||v.request.versionId>T.request.versionId)&&this._source.inlineCompletions.set(v.clone(),N),this._source.clearSuggestWidgetInlineCompletions(N)})}let C=this._primaryPosition.read(p),_={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:w?.toSelectedSuggestionInfo()},E=this.selectedInlineCompletion.get(),I=g.preserveCurrentCompletion||E?.forwardStable?E:void 0;return this._source.fetch(C,_,I)}),this._filteredInlineCompletionItems=ec({owner:this,equalsFn:ML()},p=>{let g=this._source.inlineCompletions.read(p);if(!g)return[];let A=this._primaryPosition.read(p);return g.inlineCompletions.filter(w=>w.isVisible(this.textModel,A,p))}),this.selectedInlineCompletionIndex=at(this,p=>{let g=this._selectedInlineCompletionId.read(p),A=this._filteredInlineCompletionItems.read(p),v=this._selectedInlineCompletionId===void 0?-1:A.findIndex(w=>w.semanticId===g);return v===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):v}),this.selectedInlineCompletion=at(this,p=>{let g=this._filteredInlineCompletionItems.read(p),A=this.selectedInlineCompletionIndex.read(p);return g[A]}),this.activeCommands=ec({owner:this,equalsFn:ML()},p=>this.selectedInlineCompletion.read(p)?.inlineCompletion.source.inlineCompletions.commands??[]),this.lastTriggerKind=this._source.inlineCompletions.map(this,p=>p?.request.context.triggerKind),this.inlineCompletionsCount=at(this,p=>{if(this.lastTriggerKind.read(p)===Wf.Explicit)return this._filteredInlineCompletionItems.read(p).length}),this.state=ec({owner:this,equalsFn:(p,g)=>!p||!g?p===g:d4e(p.ghostTexts,g.ghostTexts)&&p.inlineCompletion===g.inlineCompletion&&p.suggestItem===g.suggestItem},p=>{let g=this.textModel,A=this.selectedSuggestItem.read(p);if(A){let v=V1(A.toSingleTextEdit(),g),w=this._computeAugmentation(v,p);if(!this._suggestPreviewEnabled.read(p)&&!w)return;let _=w?.edit??v,E=w?w.edit.text.length-v.text.length:0,I=this._suggestPreviewMode.read(p),T=this._positions.read(p),N=[_,...L4e(this.textModel,T,_)],L=N.map((z,Q)=>y4e(z,g,I,T[Q],E)).filter(Hf),B=L[0]??new z1(_.range.endLineNumber,[]);return{edits:N,primaryGhostText:B,ghostTexts:L,inlineCompletion:w?.completion,suggestItem:A}}else{if(!this._isActive.read(p))return;let v=this.selectedInlineCompletion.read(p);if(!v)return;let w=v.toSingleTextEdit(p),C=this._inlineSuggestMode.read(p),_=this._positions.read(p),E=[w,...L4e(this.textModel,_,w)],I=E.map((T,N)=>y4e(T,g,C,_[N],0)).filter(Hf);return I[0]?{edits:E,primaryGhostText:I[0],ghostTexts:I,inlineCompletion:v,suggestItem:void 0}:void 0}}),this.ghostTexts=ec({owner:this,equalsFn:d4e},p=>{let g=this.state.read(p);if(g)return g.ghostTexts}),this.primaryGhostText=ec({owner:this,equalsFn:h4e},p=>{let g=this.state.read(p);if(g)return g?.primaryGhostText}),this._register(s0(this._fetchInlineCompletionsPromise));let f;this._register(Ct(p=>{let A=this.state.read(p)?.inlineCompletion;if(A?.semanticId!==f?.semanticId&&(f=A,A)){let v=A.inlineCompletion,w=v.source;w.provider.handleItemDidShow?.(w.inlineCompletions,v.sourceInlineCompletion,v.insertText)}}))}_getReason(e){return e?.isUndoing?OC.Undo:e?.isRedoing?OC.Redo:this.isAcceptingPartially?OC.AcceptWord:OC.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){Og(e,t=>{this._isActive.set(!0,t),this._forceUpdateExplicitlySignal.trigger(t)}),await this._fetchInlineCompletionsPromise.get()}stop(e){Og(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentation(e,t){let n=this.textModel,o=this._source.suggestWidgetInlineCompletions.read(t),r=o?o.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(Hf);return Qat(r,a=>{let l=a.toSingleTextEdit(t);return l=V1(l,n,R.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),_he(l,e)?{completion:a,edit:l}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new fi;let t=this.state.get();if(!t||t.primaryGhostText.isEmpty()||!t.inlineCompletion)return;let n=t.inlineCompletion.toInlineCompletion(void 0);if(n.command&&n.source.addRef(),e.pushUndoStop(),n.snippetInfo)e.executeEdits("inlineSuggestion.accept",[kn.replace(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),Su.get(e)?.insert(n.snippetInfo.snippet,{undoStopBefore:!1});else{let o=t.edits,r=Iwt(o).map(s=>qe.fromPositions(s));e.executeEdits("inlineSuggestion.accept",[...o.map(s=>kn.replace(s.range,s.text)),...n.additionalTextEdits]),e.setSelections(r,"inlineCompletionAccept")}this.stop(),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,ln),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(t,n)=>{let o=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),r=this._languageConfigurationService.getLanguageConfiguration(o),s=new RegExp(r.wordDefinition.source,r.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let u=/\s+/g.exec(n);return u&&u.index!==void 0&&u.index+u[0].length{let o=n.match(/\n/);return o&&o.index!==void 0?o.index+1:n.length},1)}async _acceptNext(e,t,n){if(e.getModel()!==this.textModel)throw new fi;let o=this.state.get();if(!o||o.primaryGhostText.isEmpty()||!o.inlineCompletion)return;let r=o.primaryGhostText,s=o.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText){await this.accept(e);return}let a=r.parts[0],l=new J(r.lineNumber,a.column),c=a.text,u=t(l,c);if(u===c.length&&r.parts.length===1){this.accept(e);return}let d=c.substring(0,u),h=this._positions.get(),f=h[0];s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();let p=R.fromPositions(f,l),g=e.getModel().getValueInRange(p)+d,A=new Yu(p,g),v=[A,...L4e(this.textModel,h,A)],w=Iwt(v).map(C=>qe.fromPositions(C));e.executeEdits("inlineSuggestion.accept",v.map(C=>kn.replace(C.range,C.text))),e.setSelections(w,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){let p=R.fromPositions(s.range.getStartPosition(),au.ofText(d).addToPosition(l)),g=e.getModel().getValueInRange(p,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,g.length,{kind:n})}}finally{s.source.removeRef()}}handleSuggestAccepted(e){let t=V1(e.toSingleTextEdit(),this.textModel),n=this._computeAugmentation(t,void 0);if(!n)return;let o=n.completion.inlineCompletion;o.source.provider.handlePartialAccept?.(o.source.inlineCompletions,o.sourceInlineCompletion,t.text.length,{kind:2})}};Nhe=rgi([I4e(9,Re),I4e(10,Ii),I4e(11,Gi)],Nhe);(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(OC||(OC={}))});var agi,Nwt,Lj,Nj,Mhe,N4e,M4e,R4e,$3,F4e=D(()=>{Gt();de();Xl();ine();ro();ao();Dc();ht();VA();agi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Nwt=function(i,e){return function(t,n){e(t,n,i)}},Nj=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let o=n[0].score[0];for(let r=0;rl&&d.type===n[c].completion.kind&&d.insertText===n[c].completion.insertText&&(l=d.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,o]of e)o.touch=t,o.type=typeof o.type=="number"?o.type:Ak.fromString(o.type),this._cache.set(n,o);this._seq=this._cache.size}},M4e=class extends Nj{constructor(){super("recentlyUsedByPrefix"),this._trie=NL.forStrings(),this._seq=0}memorize(e,t,n){let{word:o}=e.getWordUntilPosition(t),r=`${e.getLanguageId()}/${o}`;this._trie.set(r,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:o}=e.getWordUntilPosition(t);if(!o)return super.select(e,t,n);let r=`${e.getLanguageId()}/${o}`,s=this._trie.get(r);if(s||(s=this._trie.findSubstr(r)),s)for(let a=0;ae.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:Ak.fromString(n.type),this._trie.set(t,n)}}},R4e=class{static{Lj=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",M4e],["recentlyUsed",N4e],["first",Mhe]])}static{this._storagePrefix="suggest/memories"}constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new se,this._persistSoon=new si(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===zE.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){let n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==n){this._saveState();let o=Lj._strategyCtors.get(n)||Mhe;this._strategy=new o;try{let s=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,a=this._storageService.get(`${Lj._storagePrefix}/${n}`,s);a&&this._strategy.fromJSON(JSON.parse(a))}catch{}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${Lj._storagePrefix}/${this._strategy.name}`,n,t,1)}}};R4e=Lj=agi([Nwt(0,oc),Nwt(1,Et)],R4e);$3=At("ISuggestMemories");oi($3,R4e,1)});var lgi,cgi,O4e,Mj,Mwt=D(()=>{Bt();lgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},cgi=function(i,e){return function(t,n){e(t,n,i)}},Mj=class{static{O4e=this}static{this.AtEnd=new ze("atEndOfWord",!1)}constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=O4e.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(124)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(124)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),o=this._editor.getSelection(),r=n.getWordAtPosition(o.getStartPosition());if(!r){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(r.endColumn===o.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Mj=O4e=lgi([cgi(1,Ze)],Mj)});var ugi,dgi,Rj,w2,Rwt=D(()=>{Bt();ugi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dgi=function(i,e){return function(t,n){e(t,n,i)}},w2=class{static{Rj=this}static{this.OtherSuggestions=new ze("hasOtherSuggestions",!1)}constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=Rj.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(Rj._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let o=n;for(let r=t.items.length;r>0&&(o=(o+t.items.length+(e?1:-1))%t.items.length,!(o===n||!t.items[o].completion.additionalTextEdits));r--);return o}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=Rj._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};w2=Rj=ugi([dgi(1,Ze)],w2)});var Rhe,Fwt=D(()=>{Wt();de();cL();Rhe=class{constructor(e,t,n,o){this._disposables=new se,this._disposables.add(n.onDidSuggest(r=>{r.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(r=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(r=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=r.charCodeAt(r.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&o(this._active.item)}}))}_onItem(e){if(!e||!Kr(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new Mx;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var e4,P4e=D(()=>{Pp();kt();Ue();e4=class i{async provideSelectionRanges(e,t){let n=[];for(let o of t){let r=[];n.push(r);let s=new Map;await new Promise(a=>i._bracketsRightYield(a,0,e,o,s)),await new Promise(a=>i._bracketsLeftYield(a,0,e,o,s,r))}return n}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(e,t,n,o,r){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!o){e();break}let l=n.bracketPairs.findNextBracket(o);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,o,r));break}if(l.bracketInfo.isOpeningBracket){let u=l.bracketInfo.bracketText,d=s.has(u)?s.get(u):0;s.set(u,d+1)}else{let u=l.bracketInfo.getOpeningBrackets()[0].bracketText,d=s.has(u)?s.get(u):0;if(d-=1,s.set(u,Math.max(0,d)),d<0){let h=r.get(u);h||(h=new Br,r.set(u,h)),h.push(l.range)}}o=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,o,r,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&r.size===0){e();break}if(!o){e();break}let c=n.bracketPairs.findPrevBracket(o);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,o,r,s));break}if(c.bracketInfo.isOpeningBracket){let d=c.bracketInfo.bracketText,h=a.has(d)?a.get(d):0;if(h-=1,a.set(d,Math.max(0,h)),h<0){let f=r.get(d);if(f){let p=f.shift();f.size===0&&r.delete(d);let g=R.fromPositions(c.range.getEndPosition(),p.getStartPosition()),A=R.fromPositions(c.range.getStartPosition(),p.getEndPosition());s.push({range:g}),s.push({range:A}),i._addBracketLeading(n,A,s)}}}else{let d=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(d)?a.get(d):0;a.set(d,h+1)}o=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let o=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(o);r!==0&&r!==t.startColumn&&(n.push({range:R.fromPositions(new J(o,r),t.getEndPosition())}),n.push({range:R.fromPositions(new J(o,1),t.getEndPosition())}));let s=o-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:R.fromPositions(new J(s,a),t.getEndPosition())}),n.push({range:R.fromPositions(new J(s,1),t.getEndPosition())}))}}}});var t4,B4e=D(()=>{Wt();Ue();P4e();t4=class i{static{this.None=new class extends i{distance(){return 0}}}static async create(e,t){if(!t.getOption(119).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),o=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[r]=await new e4().provideSelectionRanges(n,[o]);if(r.length===0)return i.None;let s=await e.computeWordRanges(n.uri,r[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(o);return delete s[a.word],new class extends i{distance(l,c){if(!o.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let u=typeof c.label=="string"?c.label:c.label.label,d=s[u];if(Cee(d))return 2<<20;let h=Dx(d,R.fromPositions(l),R.compareRangesUsingStarts),f=h>=0?d[h]:d[Math.max(0,~h-1)],p=r.length;for(let g of r){if(!R.containsRange(g.range,f))break;p-=1}return p}}}}});var Fj,i4,z4e=D(()=>{Wt();Rg();Rt();Fj=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},i4=class i{constructor(e,t,n,o,r,s,a=xL.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=o,this._options=r,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,o="",r="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?Hy:Nct;for(let c=0;c=f)u.score=cf.Default;else if(typeof u.completion.filterText=="string"){let g=l(o,r,p,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;Cz(u.completion.filterText,u.textLabel)===0?u.score=g:(u.score=kct(o,r,p,u.textLabel,u.labelLow,0),u.score[0]=g[0])}else{let g=l(o,r,p,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;u.score=g}}u.idx=c,u.distance=this._wordDistance.distance(u.position,u.completion),a.push(u),e.push(u.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?yee(e.length-.85,e,(c,u)=>c-u):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}}});function fgi(i,e,t){if(!e.getContextKeyValue(Rd.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(Rd.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(62).suppressSuggestions}function pgi(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(Rd.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(62).suppressSuggestions}var hgi,MD,V4e,PC,n4,H4e=D(()=>{Gt();sn();Tt();et();de();Rt();Qn();WA();B4e();cC();ao();Bt();ch();lh();z4e();y2();Hi();Rg();gn();vhe();Ij();iie();hgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},MD=function(i,e){return function(t,n){e(t,n,i)}},PC=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let o=t.getWordAtPosition(n);return!(!o||o.endColumn!==n.column&&o.startColumn+1!==n.column||!isNaN(Number(o.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}};n4=V4e=class{constructor(e,t,n,o,r,s,a,l,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=o,this._logService=r,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new se,this._triggerCharacterListener=new se,this._triggerQuickSuggest=new ha,this._triggerState=void 0,this._completionDisposables=new se,this._onDidCancel=new q,this._onDidTrigger=new q,this._onDidSuggest=new q,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new qe(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let u=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{u=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{u=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{u||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!u&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Oi(this._triggerCharacterListener),Oi([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let o of n.triggerCharacters||[]){let r=e.get(o);if(!r){r=new Set;let s=Cwt();s&&r.add(s),e.set(o,r)}r.add(n)}let t=n=>{if(!pgi(this._editor,this._contextKeyService,this._configurationService)||PC.shouldAutoTrigger(this._editor))return;if(!n){let s=this._editor.getPosition();n=this._editor.getModel().getLineContent(s.lineNumber).substr(0,s.column-1)}let o="";my(n.charCodeAt(n.length-1))?Er(n.charCodeAt(n.length-2))&&(o=n.substr(n.length-2)):o=n.charAt(n.length-1);let r=e.get(o);if(r){let s=new Map;if(this._completionModel)for(let[a,l]of this._completionModel.getItemsByProvider())r.has(a)||s.set(a,l);this.trigger({auto:!0,triggerKind:1,triggerCharacter:o,retrigger:!!this._completionModel,clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:r,providerItemsToReuse:s}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){H1.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&Su.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!PC.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let e=this._editor.getModel(),t=this._editor.getPosition(),n=this._editor.getOption(90);if(!H1.isAllOff(n)){if(!H1.isAllOn(n)){e.tokenization.tokenizeIfCheap(t.lineNumber);let o=e.tokenization.getLineTokens(t.lineNumber),r=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(H1.valueFor(n,r)!=="on")return}fgi(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}},this._editor.getOption(91)))}_refilterCompletionItems(){gi(this._editor.hasModel()),gi(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new PC(e,t,{...this._triggerState,refilter:!0});this._onNewContext(n)}trigger(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=new PC(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=n;let o={triggerKind:e.triggerKind??0};e.triggerCharacter&&(o={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Mi;let r=this._editor.getOption(113),s=1;switch(r){case"top":s=0;break;case"bottom":s=2;break}let{itemKind:a,showDeprecated:l}=V4e.createSuggestFilter(this._editor),c=new v2(s,e.completionOptions?.kindFilter??a,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,l),u=t4.create(this._editorWorkerService,this._editor),d=wj(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),c,o,this._requestToken.token);Promise.all([d,u]).then(async([h,f])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let p=e?.clipboardText;if(!p&&h.needsClipboard&&(p=await this._clipboardService.readText()),this._triggerState===void 0)return;let g=this._editor.getModel(),A=new PC(g,this._editor.getPosition(),e),v={...xL.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new i4(h.items,this._context.column,{leadingLineContent:A.leadingLineContent,characterCountDelta:A.column-this._context.column},f,this._editor.getOption(119),this._editor.getOption(113),v,p),this._completionDisposables.add(h.disposable),this._onNewContext(A),this._reportDurationsTelemetry(h.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(let w of h.items)w.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${w.provider._debugDisplayName}`,w.completion)}).catch(ft)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){let t=new Set;e.getOption(113)==="none"&&t.add(27);let o=e.getOption(119);return o.showMethods||t.add(0),o.showFunctions||t.add(1),o.showConstructors||t.add(2),o.showFields||t.add(3),o.showVariables||t.add(4),o.showClasses||t.add(5),o.showStructs||t.add(6),o.showInterfaces||t.add(7),o.showModules||t.add(8),o.showProperties||t.add(9),o.showEvents||t.add(10),o.showOperators||t.add(11),o.showUnits||t.add(12),o.showValues||t.add(13),o.showConstants||t.add(14),o.showEnums||t.add(15),o.showEnumMembers||t.add(16),o.showKeywords||t.add(17),o.showWords||t.add(18),o.showColors||t.add(19),o.showFiles||t.add(20),o.showReferences||t.add(21),o.showColors||t.add(22),o.showFolders||t.add(23),o.showTypeParameters||t.add(24),o.showSnippets||t.add(27),o.showUsers||t.add(25),o.showIssues||t.add(26),{itemKind:t,showDeprecated:o.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(wn(e.leadingLineContent)!==wn(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(PC.shouldAutoTrigger(this._editor)&&this._context){let n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,n=new Set;for(let[o,r]of this._completionModel.getItemsByProvider())r.length>0&&r[0].container.incomplete?n.add(o):t.set(o,r);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let o=PC.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(o&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};n4=V4e=hgi([MD(1,wa),MD(2,Ah),MD(3,rr),MD(4,sr),MD(5,Ze),MD(6,Et),MD(7,Me),MD(8,jO)],n4)});var Fhe,Owt=D(()=>{de();Fhe=class i{static{this._maxSelectionLength=51200}constructor(e,t){this._disposables=new se,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let n=e.getSelections(),o=n.length,r=!1;for(let a=0;ai._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e{});var mgi,W4e,Ohe,Bwt=D(()=>{Ye();Hg();de();Xx();go();Bt();ht();mgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},W4e=function(i,e){return function(t,n){e(t,n,i)}},Ohe=class{constructor(e,t,n,o,r){this._menuId=t,this._menuService=o,this._contextKeyService=r,this._menuDisposables=new se,this.element=Ae(e,xe(".suggest-status-bar"));let s=(a=>a instanceof Kl?n.createInstance(Vne,a,{useComma:!0}):void 0);this._leftActions=new Ps(this.element,{actionViewItemProvider:s}),this._rightActions=new Ps(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){let e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{let n=[],o=[];for(let[r,s]of e.getActions())r==="left"?n.push(...s):o.push(...s);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(o)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Ohe=mgi([W4e(2,Re),W4e(3,nl),W4e(4,Ze)],Ohe)});function Oj(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var ggi,bgi,Phe,Bhe,U4e=D(()=>{Ye();Mg();oo();ko();et();Td();de();Ux();rde();Be();ht();ggi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bgi=function(i,e){return function(t,n){e(t,n,i)}};Phe=class{constructor(e,t){this._editor=e,this._onDidClose=new q,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new q,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new se,this._renderDisposeable=new se,this._borderWidth=1,this._size=new hn(330,0),this.domNode=xe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(df,{editor:e}),this._body=xe(".body"),this._scrollbar=new i0(this._body,{alwaysConsumeMouseWheel:!0}),Ae(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Ae(this._body,xe(".header")),this._close=Ae(this._header,xe("span"+ut.asCSSSelector(De.close))),this._close.title=y("details.close","Close"),this._type=Ae(this._header,xe("p.type")),this._docs=Ae(this._body,xe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(50),n=t.getMassagedFontFamily(),o=e.get(120)||t.fontSize,r=e.get(121)||t.lineHeight,s=t.fontWeight,a=`${o}px`,l=`${r}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${r/o}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=y("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:n,documentation:o}=e.completion;if(t){let r="";r+=`score: ${e.score[0]} +`,r+=`prefix: ${e.word??"(no prefix)"} +`,r+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} +`,r+=`distance: ${e.distance} (localityBonus-setting) +`,r+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} +`,r+=`commit_chars: ${e.completion.commitCharacters?.join("")} +`,o=new $r().appendCodeblock("empty",r),n=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!Oj(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),n){let r=n.length>1e5?`${n.substr(0,1e5)}\u2026`:n;this._type.textContent=r,this._type.title=r,ql(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(r))}else Tr(this._type),this._type.title="",_l(this._type),this.domNode.classList.add("no-type");if(Tr(this._docs),typeof o=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),Tr(this._docs);let r=this._markdownRenderer.render(o);this._docs.appendChild(r.element),this._renderDisposeable.add(r),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=r=>{r.preventDefault(),r.stopPropagation()},this._close.onclick=r=>{r.preventDefault(),r.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){let n=new hn(e,t);hn.equals(n,this._size)||(this._size=n,fot(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Phe=ggi([bgi(1,Re)],Phe);Bhe=class{constructor(e,t){this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new se,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new SD,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,o,r=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,o=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&o){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=o.width-a.dimension.width,l=!0),a.north&&(r=o.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+r,left:n.left+s})}a.done&&(n=void 0,o=void 0,r=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){let n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,n){let o=Xh(this.getDomNode().ownerDocument.body),r=this.widget.getLayoutInfo(),s=new hn(220,2*r.lineHeight),a=e.top,l=(function(){let E=o.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),I=-r.borderWidth+e.left+e.width,T=new hn(E,o.height-e.top-r.borderHeight-r.verticalPadding),N=T.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:a,left:I,fit:E-t.width,maxSizeTop:T,maxSizeBottom:N,minSize:s.with(Math.min(E,s.width))}})(),c=(function(){let E=e.left-r.borderWidth-r.horizontalPadding,I=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),T=new hn(E,o.height-e.top-r.borderHeight-r.verticalPadding),N=T.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:a,left:I,fit:E-t.width,maxSizeTop:T,maxSizeBottom:N,minSize:s.with(Math.min(E,s.width))}})(),u=(function(){let E=e.left,I=-r.borderWidth+e.top+e.height,T=new hn(e.width-r.borderHeight,o.height-e.top-e.height-r.verticalPadding);return{top:I,left:E,fit:T.height-t.height,maxSizeBottom:T,maxSizeTop:T,minSize:s.with(T.width)}})(),d=[l,c,u],h=d.find(E=>E.fit>=0)??d.sort((E,I)=>I.fit-E.fit)[0],f=e.top+e.height-r.borderHeight,p,g=t.height,A=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);g>A&&(g=A);let v;n?g<=h.maxSizeTop.height?(p=!0,v=h.maxSizeTop):(p=!1,v=h.maxSizeBottom):g<=h.maxSizeBottom.height?(p=!1,v=h.maxSizeBottom):(p=!0,v=h.maxSizeTop);let{top:w,left:C}=h;!p&&g>e.height&&(w=f-g);let _=this._editor.getDomNode();if(_){let E=_.getBoundingClientRect();w-=E.top,C-=E.left}this._applyTopLeft({left:C,top:w}),this._resizable.enableSashes(!p,h===l,p,h!==l),this._resizable.minSize=h.minSize,this._resizable.maxSize=v,this._resizable.layout(g,Math.min(v.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}});var A0,j4e=D(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(A0||(A0={}))});function Pj(i,e,t,n,o){if(ut.isThemeIcon(o))return[`codicon-${o.id}`,"predefined-file-icon"];if(Je.isUri(o))return[];let r=n===A0.ROOT_FOLDER?["rootfolder-icon"]:n===A0.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===Vt.data)s=Wy.parseMetaData(t).get(Wy.META_DATA_LABEL);else{let a=t.path.match(Agi);a?(s=zhe(a[2].toLowerCase()),a[1]&&r.push(`${zhe(a[1].toLowerCase())}-name-dir-icon`)):s=zhe(t.authority.toLowerCase())}if(n===A0.ROOT_FOLDER)r.push(`${s}-root-name-folder-icon`);else if(n===A0.FOLDER)r.push(`${s}-name-folder-icon`);else{if(s){if(r.push(`${s}-name-file-icon`),r.push("name-file-icon"),s.length<=255){let l=s.split(".");for(let c=1;c{xl();Nc();mn();sp();j4e();ko();Agi=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function q4e(i){return`suggest-aria-id:${i}`}function G4e(i){return i.replace(/\r\n|\r|\n/g,"")}var ygi,Q4e,wgi,xgi,Vhe,Vwt=D(()=>{Ye();Xre();oo();ko();et();Rg();de();mn();ro();zwt();su();Il();Be();j4e();Ap();io();U4e();ygi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Q4e=function(i,e){return function(t,n){e(t,n,i)}};wgi=Ln("suggest-more-info",De.chevronRight,y("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),xgi=new class Bj{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${Bj._regexRelaxed.source}$`,"i")}extract(e,t){if(e.textLabel.match(Bj._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(Bj._regexStrict))return t[0]=e.completion.detail,!0;if(e.completion.documentation){let n=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,o=Bj._regexRelaxed.exec(n);if(o&&(o.index===0||o.index+o[0].length===n.length))return t[0]=o[0],!0}return!1}},Vhe=class{constructor(e,t,n,o){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=o,this._onDidToggleDetails=new q,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new se,n=e;n.classList.add("show-file-icons");let o=Ae(e,xe(".icon")),r=Ae(o,xe("span.colorspan")),s=Ae(e,xe(".contents")),a=Ae(s,xe(".main")),l=Ae(a,xe(".icon-label.codicon")),c=Ae(a,xe("span.left")),u=Ae(a,xe("span.right")),d=new aC(c,{supportHighlights:!0,supportIcons:!0});t.add(d);let h=Ae(c,xe("span.signature-label")),f=Ae(c,xe("span.qualifier-label")),p=Ae(u,xe("span.details-label")),g=Ae(u,xe("span.readMore"+ut.asCSSSelector(wgi)));return g.title=y("readMore","Read More"),{root:n,left:c,right:u,icon:o,colorspan:r,iconLabel:d,iconContainer:l,parametersLabel:h,qualifierLabel:f,detailsLabel:p,readMore:g,disposables:t,configureFont:()=>{let v=this._editor.getOptions(),w=v.get(50),C=w.getMassagedFontFamily(),_=w.fontFeatureSettings,E=v.get(120)||w.fontSize,I=v.get(121)||w.lineHeight,T=w.fontWeight,N=w.letterSpacing,L=`${E}px`,B=`${I}px`,z=`${N}px`;n.style.fontSize=L,n.style.fontWeight=T,n.style.letterSpacing=z,a.style.fontFamily=C,a.style.fontFeatureSettings=_,a.style.lineHeight=B,o.style.height=B,o.style.width=B,g.style.height=B,g.style.width=B}}}renderElement(e,t,n){n.configureFont();let{completion:o}=e;n.root.id=q4e(t),n.colorspan.style.backgroundColor="";let r={labelEscapeNewLines:!0,matches:kE(e.score)},s=[];if(o.kind===19&&xgi.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(o.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";let a=Pj(this._modelService,this._languageService,Je.from({scheme:"fake",path:e.textLabel}),A0.FILE),l=Pj(this._modelService,this._languageService,Je.from({scheme:"fake",path:o.detail}),A0.FILE);r.extraClasses=a.length>l.length?a:l}else o.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",r.extraClasses=[Pj(this._modelService,this._languageService,Je.from({scheme:"fake",path:e.textLabel}),A0.FOLDER),Pj(this._modelService,this._languageService,Je.from({scheme:"fake",path:o.detail}),A0.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...ut.asClassNameArray(Ak.toIcon(o.kind))));o.tags&&o.tags.indexOf(1)>=0&&(r.extraClasses=(r.extraClasses||[]).concat(["deprecated"]),r.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,r),typeof o.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=G4e(o.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=G4e(o.label.detail||""),n.detailsLabel.textContent=G4e(o.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?ql(n.detailsLabel):_l(n.detailsLabel),Oj(e)?(n.right.classList.add("can-expand-details"),ql(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),_l(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};Vhe=ygi([Q4e(1,an),Q4e(2,on),Q4e(3,Wn)],Vhe)});var Cgi,Hhe,o4,_gi,Sgi,Y4e,Whe,K4e,Hwt=D(()=>{Ye();TU();Kx();Gt();Tt();et();de();bL();Rt();Pwt();IC();Bwt();Iue();Be();Bt();ht();VA();nr();Jb();io();rde();y2();U4e();Vwt();i1();Zl();Cgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Hhe=function(i,e){return function(t,n){e(t,n,i)}};j("editorSuggestWidget.background",nu,y("editorSuggestWidgetBackground","Background color of the suggest widget."));j("editorSuggestWidget.border",Fz,y("editorSuggestWidgetBorder","Border color of the suggest widget."));_gi=j("editorSuggestWidget.foreground",rm,y("editorSuggestWidgetForeground","Foreground color of the suggest widget."));j("editorSuggestWidget.selectedForeground",xx,y("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));j("editorSuggestWidget.selectedIconForeground",oO,y("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));Sgi=j("editorSuggestWidget.selectedBackground",Cx,y("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));j("editorSuggestWidget.highlightForeground",qS,y("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));j("editorSuggestWidget.focusHighlightForeground",tst,y("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));j("editorSuggestWidgetStatus.foreground",ai(_gi,.5),y("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));Y4e=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof xu}`}restore(){let e=this._service.get(this._key,0)??"";try{let t=JSON.parse(e);if(hn.is(t))return hn.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},Whe=class{static{o4=this}static{this.LOADING_MESSAGE=y("suggestWidget.loading","Loading...")}static{this.NO_SUGGESTIONS_MESSAGE=y("suggestWidget.noSuggestions","No suggestions.")}constructor(e,t,n,o,r){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Vn,this._pendingShowDetails=new Vn,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new ha,this._disposables=new se,this._onDidSelect=new Jm,this._onDidFocus=new Jm,this._onDidHide=new q,this._onDidShow=new q,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new q,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new SD,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new K4e(this,e),this._persistedSize=new Y4e(t,e);class s{constructor(f,p,g=!1,A=!1){this.persistedSize=f,this.currentSize=p,this.persistHeight=g,this.persistWidth=A}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){let{itemHeight:f,defaultSize:p}=this.getLayoutInfo(),g=Math.round(f/2),{width:A,height:v}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-v)<=g)&&(v=a.persistedSize?.height??p.height),(!a.persistWidth||Math.abs(a.currentSize.width-A)<=g)&&(A=a.persistedSize?.width??p.width),this._persistedSize.store(new hn(A,v))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=Ae(this.element.domNode,xe(".message")),this._listElement=Ae(this.element.domNode,xe(".tree"));let l=this._disposables.add(r.createInstance(Phe,this.editor));l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Bhe(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();let u=r.createInstance(Vhe,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails(()=>this.toggleDetails())),this._list=new rl("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>y("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let f=h.textLabel;if(typeof h.completion.label!="string"){let{detail:v,description:w}=h.completion.label;v&&w?f=y("label.full","{0} {1}, {2}",f,v,w):v?f=y("label.detail","{0} {1}",f,v):w&&(f=y("label.desc","{0}, {1}",f,w))}if(!h.isResolved||!this._isDetailsVisible())return f;let{documentation:p,detail:g}=h.completion,A=gg("{0}{1}",g||"",p?typeof p=="string"?p:p.value:"");return y("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",f,A)}}}),this._list.style(HA({listInactiveFocusBackground:Sgi,listInactiveFocusOutline:eo})),this._status=r.createInstance(Ohe,this.element.domNode,W1);let d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);d(),this._disposables.add(o.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(o.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(119)&&(d(),c()),this._completionModel&&(h.hasChanged(50)||h.hasChanged(120)||h.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=_i.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=_i.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=_i.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=_i.HasFocusedSuggestion.bindTo(n),this._disposables.add(un(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){let n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=ju(e.type)?2:1}_onListFocus(e){if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);let t=e.elements[0],n=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(n),this._currentSuggestionDetails=mo(async o=>{let r=tm(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),s=o.onCancellationRequested(()=>r.dispose());try{return await t.resolve(o)}finally{r.dispose(),s.dispose()}}),this._currentSuggestionDetails.then(()=>{n>=this._list.length||t!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[t]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:q4e(n)}))}).catch(ft)),this._onDidFocus.fire({item:t,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:_l(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=o4.LOADING_MESSAGE,_l(this._listElement,this._status.element),ql(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,kd(o4.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=o4.NO_SUGGESTIONS_MESSAGE,_l(this._listElement,this._status.element),ql(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,kd(o4.NO_SUGGESTIONS_MESSAGE);break;case 3:_l(this._messageElement),ql(this._listElement,this._status.element),this._show();break;case 4:_l(this._messageElement),ql(this._listElement,this._status.element),this._show();break;case 5:_l(this._messageElement),ql(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=tm(()=>this._setState(1),t)))}showSuggestions(e,t,n,o,r){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}let s=this._completionModel.items.length,a=s===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),a){this._setState(o?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(r?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=GF(rt(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(Oj(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=GF(rt(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();let e=this._persistedSize.restore(),t=Math.ceil(this.getLayoutInfo().itemHeight*4.3);e&&e.heights&&(r=s);let a=this._completionModel?this._completionModel.stats.pLabelLen*n.typicalHalfwidthCharacterWidth:r,l=n.statusBarHeight+this._list.contentHeight+n.borderHeight,c=n.itemHeight+n.statusBarHeight,u=bn(this.editor.getDomNode()),d=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),h=u.top+d.top+d.height,f=Math.min(t.height-h-n.verticalPadding,l),p=u.top+d.top-n.verticalPadding,g=Math.min(p,l),A=Math.min(Math.max(g,f)+n.borderHeight,l);o===this._cappedHeight?.capped&&(o=this._cappedHeight.wanted),oA&&(o=A),o>f||this._forceRenderingAbove&&p>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),A=g):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),A=f),this.element.preferredSize=new hn(a,n.defaultSize.height),this.element.maxSize=new hn(s,A),this.element.minSize=new hn(220,c),this._cappedHeight=o===l?{wanted:this._cappedHeight?.wanted??e.height,capped:o}:void 0}this._resize(r,o)}_resize(e,t){let{width:n,height:o}=this.element.maxSize;e=Math.min(n,e),t=Math.min(o,t);let{statusBarHeight:r}=this.getLayoutInfo();this._list.layout(t-r,e),this._listElement.style.height=`${t-r}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,this._contentWidget.getPosition()?.preference[0]===2)}getLayoutInfo(){let e=this.editor.getOption(50),t=Ll(this.editor.getOption(121)||e.lineHeight,8,1e3),n=!this.editor.getOption(119).showStatusBar||this._state===2||this._state===1?0:t,o=this._details.widget.borderWidth,r=2*o;return{itemHeight:t,statusBarHeight:n,borderWidth:o,borderHeight:r,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new hn(430,n+12*t+r)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Whe=o4=Cgi([Hhe(1,oc),Hhe(2,Ze),Hhe(3,Wn),Hhe(4,Re)],Whe);K4e=class{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){let{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:o}=this._widget.getLayoutInfo();return new hn(t+2*n+o,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}});var Egi,r4,J4e,Dgi,X4e,km,Z4e,Uhe,Im,Ch,jhe=D(()=>{Zl();Wt();sn();Tt();et();xI();de();wi();cd();gn();MN();Jt();gm();kt();Ue();An();Ij();bD();F4e();Mwt();Be();to();Bt();ht();ch();y2();Rwt();Fwt();H4e();Owt();Hwt();lh();Nc();VS();Ye();bs();Egi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},r4=function(i,e){return function(t,n){e(t,n,i)}},Dgi=!1,X4e=class{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=Ot.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){let o=e.getOffsetAt(t),r=e.getPositionAt(o+1);e.changeDecorations(s=>{this._marker&&s.removeDecoration(this._marker),this._marker=s.addDecoration(R.fromPositions(t,r),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){let t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}},km=class{static{J4e=this}static{this.ID="editor.contrib.suggestController"}static get(e){return e.getContribution(J4e.ID)}constructor(e,t,n,o,r,s,a){this._memoryService=t,this._commandService=n,this._contextKeyService=o,this._instantiationService=r,this._logService=s,this._telemetryService=a,this._lineSuffix=new Vn,this._toDispose=new se,this._selectors=new Z4e(d=>d.priority),this._onWillInsertSuggestItem=new q,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=r.createInstance(n4,this.editor),this._selectors.register({priority:0,select:(d,h,f)=>this._memoryService.select(d,h,f)});let l=_i.InsertMode.bindTo(o);l.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(119).insertMode))),this.widget=this._toDispose.add(new QF(rt(e.getDomNode()),()=>{let d=this._instantiationService.createInstance(Whe,this.editor);this._toDispose.add(d),this._toDispose.add(d.onDidSelect(A=>this._insertSuggestion(A,0),this));let h=new Rhe(this.editor,d,this.model,A=>this._insertSuggestion(A,2));this._toDispose.add(h);let f=_i.MakesTextEdit.bindTo(this._contextKeyService),p=_i.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=_i.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(He(()=>{f.reset(),p.reset(),g.reset()})),this._toDispose.add(d.onDidFocus(({item:A})=>{let v=this.editor.getPosition(),w=A.editStart.column,C=v.column,_=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!A.completion.additionalTextEdits&&!(A.completion.insertTextRules&4)&&C-w===A.completion.insertText.length&&(_=this.editor.getModel().getValueInRange({startLineNumber:v.lineNumber,startColumn:w,endLineNumber:v.lineNumber,endColumn:C})!==A.completion.insertText),f.set(_),p.set(!J.equals(A.editInsertEnd,A.editReplaceEnd)),g.set(!!A.provider.resolveCompletionItem||!!A.completion.documentation||A.completion.detail!==A.completion.label)})),this._toDispose.add(d.onDetailsKeyDown(A=>{if(A.toKeyCodeChord().equals(new fg(!0,!1,!1,!1,33))||jt&&A.toKeyCodeChord().equals(new fg(!1,!1,!1,!0,33))){A.stopPropagation();return}A.toKeyCodeChord().isModifierKey()||this.editor.focus()})),d})),this._overtypingCapturer=this._toDispose.add(new QF(rt(e.getDomNode()),()=>this._toDispose.add(new Fhe(this.editor,this.model)))),this._alternatives=this._toDispose.add(new QF(rt(e.getDomNode()),()=>this._toDispose.add(new w2(this.editor,this._contextKeyService)))),this._toDispose.add(r.createInstance(Mj,e)),this._toDispose.add(this.model.onDidTrigger(d=>{this.widget.value.showTriggered(d.auto,d.shy?250:50),this._lineSuffix.value=new X4e(this.editor.getModel(),d.position)})),this._toDispose.add(this.model.onDidSuggest(d=>{if(d.triggerOptions.shy)return;let h=-1;for(let p of this._selectors.itemsOrderedByPriorityDesc)if(h=p.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items),h!==-1)break;if(h===-1&&(h=0),this.model.state===0)return;let f=!1;if(d.triggerOptions.auto){let p=this.editor.getOption(119);p.selectionMode==="never"||p.selectionMode==="always"?f=p.selectionMode==="never":p.selectionMode==="whenTriggerCharacter"?f=d.triggerOptions.triggerKind!==1:p.selectionMode==="whenQuickSuggestion"&&(f=d.triggerOptions.triggerKind===1&&!d.triggerOptions.refilter)}this.widget.value.showSuggestions(d.completionModel,h,d.isFrozen,d.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(d=>{d.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{Dgi||(this.model.cancel(),this.model.clear())}));let c=_i.AcceptSuggestionsOnEnter.bindTo(o),u=()=>{let d=this.editor.getOption(1);c.set(d==="on"||d==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>u())),u()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;let n=Su.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});let o=this.editor.getModel(),r=o.getAlternativeVersionId(),{item:s}=e,a=[],l=new Mi;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));this._memoryService.memorize(o,this.editor.getPosition(),s);let u=s.isResolved,d=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let p=yf.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(g=>{let A=R.lift(g.range);if(A.startLineNumber===s.position.lineNumber&&A.startColumn>s.position.column){let v=this.editor.getPosition().column-s.position.column,w=v,C=R.spansMultipleLines(A)?0:v;A=new R(A.startLineNumber,A.startColumn+w,A.endLineNumber,A.endColumn+C)}return kn.replaceMove(A,g.text)})),p.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){let p=new xo,g,A=o.onDidChangeContent(_=>{if(_.isFlush){l.cancel(),A.dispose();return}for(let E of _.changes){let I=R.getEndPosition(E.range);(!g||J.isBefore(I,g))&&(g=I)}}),v=t;t|=2;let w=!1,C=this.editor.onWillType(()=>{C.dispose(),w=!0,v&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(g&&s.completion.additionalTextEdits.some(E=>J.isBefore(g,R.getStartPosition(E.range))))return!1;w&&this.editor.pushUndoStop();let _=yf.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(E=>kn.replaceMove(R.lift(E.range),E.text))),_.restoreRelativeVerticalPositionOfCursor(this.editor),(w||!(v&2))&&this.editor.pushUndoStop(),!0}).then(_=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",p.elapsed(),_),h=_===!0?1:_===!1?0:-2}).finally(()=>{A.dispose(),C.dispose()}))}let{insertText:f}=s.completion;if(s.completion.insertTextRules&4||(f=_p.escape(f)),this.model.cancel(),n.insert(f,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===Uhe.id)this.model.trigger({auto:!0,retrigger:!0});else{let p=new xo;a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(g=>{s.completion.extensionId?ln(g):ft(g)}).finally(()=>{d=p.elapsed()}))}t&4&&this._alternatives.value.set(e,p=>{for(l.cancel();o.canUndo();){r!==o.getAlternativeVersionId()&&o.undo(),this._insertSuggestion(p,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,o,u,d,h,e.index,e.model.items),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n,o,r,s,a){if(Math.floor(Math.random()*100)===0)return;let l=new Map;for(let h=0;h1?c[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:zS(Lc(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:zct(t.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:o,additionalEditsAsync:r,index:s,firstIndex:d})}getOverwriteInfo(e,t){gi(this.editor.hasModel());let n=this.editor.getOption(119).insertMode==="replace";t&&(n=!n);let o=e.position.column-e.editStart.column,r=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:o+s,overwriteAfter:r+a}}_alertCompletionItem(e){if(Kr(e.completion.additionalTextEdits)){let t=y("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);ms(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;let t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},o=r=>{if(r.completion.insertTextRules&4||r.completion.additionalTextEdits)return!0;let s=this.editor.getPosition(),a=r.editStart.column,l=s.column;return l-a!==r.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==r.completion.insertText};Ee.once(this.model.onDidTrigger)(r=>{let s=[];Ee.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Oi(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Oi(s),a.items.length===0){n();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!o(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){let n=this.widget.value.getFocusedItem(),o=0;e&&(o|=4),t&&(o|=8),this._insertSuggestion(n,o)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};km=J4e=Egi([r4(1,$3),r4(2,Ii),r4(3,Ze),r4(4,Re),r4(5,sr),r4(6,rr)],km);Z4e=class{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},Uhe=class i extends Pe{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:i.id,label:y("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ge.and(V.writable,V.hasCompletionItemProvider,_i.Visible.toNegated()),kbOpts:{kbExpr:V.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let o=km.get(t);if(!o)return;let r;n&&typeof n=="object"&&n.auto===!0&&(r=!0),o.triggerSuggest(void 0,r,void 0)}};St(km.ID,km,2);Ce(Uhe);Im=190,Ch=Eo.bindToContribution(km.get);Qe(new Ch({id:"acceptSelectedSuggestion",precondition:ge.and(_i.Visible,_i.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ge.and(_i.Visible,V.textInputFocus),weight:Im},{primary:3,kbExpr:ge.and(_i.Visible,V.textInputFocus,_i.AcceptSuggestionsOnEnter,_i.MakesTextEdit),weight:Im}],menuOpts:[{menuId:W1,title:y("accept.insert","Insert"),group:"left",order:1,when:_i.HasInsertAndReplaceRange.toNegated()},{menuId:W1,title:y("accept.insert","Insert"),group:"left",order:1,when:ge.and(_i.HasInsertAndReplaceRange,_i.InsertMode.isEqualTo("insert"))},{menuId:W1,title:y("accept.replace","Replace"),group:"left",order:1,when:ge.and(_i.HasInsertAndReplaceRange,_i.InsertMode.isEqualTo("replace"))}]}));Qe(new Ch({id:"acceptAlternativeSelectedSuggestion",precondition:ge.and(_i.Visible,V.textInputFocus,_i.HasFocusedSuggestion),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:W1,group:"left",order:2,when:ge.and(_i.HasInsertAndReplaceRange,_i.InsertMode.isEqualTo("insert")),title:y("accept.replace","Replace")},{menuId:W1,group:"left",order:2,when:ge.and(_i.HasInsertAndReplaceRange,_i.InsertMode.isEqualTo("replace")),title:y("accept.insert","Insert")}]}));ii.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");Qe(new Ch({id:"hideSuggestWidget",precondition:_i.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:9,secondary:[1033]}}));Qe(new Ch({id:"selectNextSuggestion",precondition:ge.and(_i.Visible,ge.or(_i.MultipleSuggestions,_i.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));Qe(new Ch({id:"selectNextPageSuggestion",precondition:ge.and(_i.Visible,ge.or(_i.MultipleSuggestions,_i.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:12,secondary:[2060]}}));Qe(new Ch({id:"selectLastSuggestion",precondition:ge.and(_i.Visible,ge.or(_i.MultipleSuggestions,_i.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));Qe(new Ch({id:"selectPrevSuggestion",precondition:ge.and(_i.Visible,ge.or(_i.MultipleSuggestions,_i.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));Qe(new Ch({id:"selectPrevPageSuggestion",precondition:ge.and(_i.Visible,ge.or(_i.MultipleSuggestions,_i.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:11,secondary:[2059]}}));Qe(new Ch({id:"selectFirstSuggestion",precondition:ge.and(_i.Visible,ge.or(_i.MultipleSuggestions,_i.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));Qe(new Ch({id:"focusSuggestion",precondition:ge.and(_i.Visible,_i.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));Qe(new Ch({id:"focusAndAcceptSuggestion",precondition:ge.and(_i.Visible,_i.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));Qe(new Ch({id:"toggleSuggestionDetails",precondition:ge.and(_i.Visible,_i.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:W1,group:"right",order:1,when:ge.and(_i.DetailsVisible,_i.CanResolve),title:y("detail.more","Show Less")},{menuId:W1,group:"right",order:1,when:ge.and(_i.DetailsVisible.toNegated(),_i.CanResolve),title:y("detail.less","Show More")}]}));Qe(new Ch({id:"toggleExplainMode",precondition:_i.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));Qe(new Ch({id:"toggleSuggestionFocus",precondition:_i.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:2570,mac:{primary:778}}}));Qe(new Ch({id:"insertBestCompletion",precondition:ge.and(V.textInputFocus,ge.equals("config.editor.tabCompletion","on"),Mj.AtEnd,_i.Visible.toNegated(),w2.OtherSuggestions.toNegated(),Su.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(zr(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:Im,primary:2}}));Qe(new Ch({id:"insertNextSuggestion",precondition:ge.and(V.textInputFocus,ge.equals("config.editor.tabCompletion","on"),w2.OtherSuggestions,_i.Visible.toNegated(),Su.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:2}}));Qe(new Ch({id:"insertPrevSuggestion",precondition:ge.and(V.textInputFocus,ge.equals("config.editor.tabCompletion","on"),w2.OtherSuggestions,_i.Visible.toNegated(),Su.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:Im,kbExpr:V.textInputFocus,primary:1026}}));Ce(class extends Pe{constructor(){super({id:"editor.action.resetSuggestSize",label:y("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){km.get(e)?.resetWidgetSize()}})});function Tgi(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var Qhe,zj,Wwt=D(()=>{Wt();lp();et();de();kt();Ue();Iy();ro();She();bD();k4e();jhe();Qhe=class extends H{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new q),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown(r=>{r.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(r=>{r.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let o=km.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(a,l,c)=>{let u=this.editor.getModel();if(!u)return-1;let d=this.suggestControllerPreselector(),h=d?V1(d,u):void 0;if(!h)return-1;let f=J.lift(l),p=c.map((A,v)=>{let w=zj.fromSuggestion(o,u,f,A,this.isShiftKeyPressed),C=V1(w.toSingleTextEdit(),u),_=_he(h,C);return{index:v,valid:_,prefixLength:C.text.length,suggestItem:A}}).filter(A=>A&&A.valid&&A.prefixLength>0),g=CV(p,pa(A=>A.prefixLength,vd));return g?g.index:-1}}));let r=!1,s=()=>{r||(r=!0,this._register(o.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(o.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(o.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Ee.once(o.model.onDidTrigger)(a=>{s()})),this._register(o.onWillInsertSuggestItem(a=>{let l=this.editor.getPosition(),c=this.editor.getModel();if(!l||!c)return;let u=zj.fromSuggestion(o,c,l,a.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!Tgi(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){let e=km.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),o=this.editor.getModel();if(!(!t||!n||!o))return zj.fromSuggestion(e,o,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){km.get(this.editor)?.stopForceRenderingAbove()}forceRenderingAbove(){km.get(this.editor)?.forceRenderingAbove()}},zj=class i{static fromSuggestion(e,t,n,o,r){let{insertText:s}=o.completion,a=!1;if(o.completion.insertTextRules&4){let c=new _p().parse(s);c.children.length<100&&X3.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(o,r);return new i(R.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),s,o.completion.kind,a)}constructor(e,t,n,o){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=o}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new vR(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Yu(this.range,this.insertText)}}});function Igi(i,e){let t=Ut("result",[]),n=[];return e.add(Ct(o=>{let r=i.read(o);fn(s=>{if(r.length!==n.length){n.length=r.length;for(let a=0;aa.set(r[l],s))})})),t}var kgi,BC,$4e,_f,Ghe=D(()=>{cwt();Zl();Gt();sn();de();In();hf();vH();gn();WW();_C();kt();hm();Hi();tde();mwt();vhe();ode();Lwt();Wwt();Be();fh();$E();to();ao();Bt();ht();Xo();kgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},BC=function(i,e){return function(t,n){e(t,n,i)}},_f=class extends H{static{$4e=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(e){return e.getContribution($4e.ID)}constructor(e,t,n,o,r,s,a,l,c,u){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=n,this._configurationService=o,this._commandService=r,this._debounceService=s,this._languageFeaturesService=a,this._accessibilitySignalService=l,this._keybindingService=c,this._accessibilityService=u,this._editorObs=Fl(this.editor),this._positions=at(this,h=>this._editorObs.selections.read(h)?.map(f=>f.getEndPosition())??[new J(1,1)]),this._suggestWidgetAdaptor=this._register(new Qhe(this.editor,()=>(this._editorObs.forceUpdate(),this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0)),h=>this._editorObs.forceUpdate(f=>{this.model.get()?.handleSuggestAccepted(h)}))),this._suggestWidgetSelectedItem=Ri(this,h=>this._suggestWidgetAdaptor.onDidSelectedItemChange(()=>{this._editorObs.forceUpdate(f=>h(void 0))}),()=>this._suggestWidgetAdaptor.selectedItem),this._enabledInConfig=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._isScreenReaderEnabled=Ri(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=Ri(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=at(this,h=>this._enabledInConfig.read(h)&&(!this._isScreenReaderEnabled.read(h)||!this._editorDictationInProgress.read(h))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=ya(this,h=>{if(this._editorObs.isReadonly.read(h))return;let f=this._editorObs.model.read(h);return f?this._instantiationService.createInstance(Nhe,f,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,Ri(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).preview),Ri(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).previewMode),Ri(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).mode),this._enabled):void 0}).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=at(this,h=>this.model.read(h)?.ghostTexts.read(h)??[]),this._stablizedGhostTexts=Igi(this._ghostTexts,this._store),this._ghostTextWidgets=Jut(this,this._stablizedGhostTexts,(h,f)=>f.add(this._instantiationService.createInstance(whe,this.editor,{ghostText:h,minReservedLineCount:tc(0),targetTextModel:this.model.map(p=>p?.textModel)}))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=Pg(this),this._fontFamily=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).fontFamily),this._register(new Rd(this._contextKeyService,this.model)),this._register(Cce(this._editorObs.onDidType,(h,f)=>{this._enabled.get()&&this.model.get()?.trigger()})),this._register(this._commandService.onDidExecuteCommand(h=>{new Set([aD.Tab.id,aD.DeleteLeft.id,aD.DeleteRight.id,Zue,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate(p=>{this.model.get()?.trigger(p)})})),this._register(Cce(this._editorObs.selections,(h,f)=>{f.some(p=>p.reason===3||p.source==="api")&&this.model.get()?.stop()})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||TC.dropDownVisible||fn(h=>{this.model.get()?.stop(h)})})),this._register(Ct(h=>{let f=this.model.read(h)?.state.read(h);f?.suggestItem?f.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(He(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));let d=$y(this,(h,f)=>{let g=this.model.read(h)?.state.read(h);return this._suggestWidgetSelectedItem.get()?f:g?.inlineCompletion?.semanticId});this._register(_bt(at(h=>(this._playAccessibilitySignal.read(h),d.read(h),{})),async(h,f,p)=>{let g=this.model.get(),A=g?.state.get();if(!A||!g)return;let v=g.textModel.getLineContent(A.primaryGhostText.lineNumber);await oh(50,E6(p)),await wH(this._suggestWidgetSelectedItem,Xa,()=>!1,E6(p)),await this._accessibilitySignalService.playSignal(Xu.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(A.primaryGhostText.renderForScreenReader(v))})),this._register(new nde(this.editor,this.model,this._instantiationService)),this._register(lwt(at(h=>{let f=this._fontFamily.read(h);return f===""||f==="default"?"":` .monaco-editor .ghost-text-decoration, .monaco-editor .ghost-text-decoration-preview, .monaco-editor .ghost-text { font-family: ${f}; -}`}))),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){let t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView"),r;!t&&n&&this.editor.getOption(150)&&(r=y("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),gs(r?e+", "+r:e)}shouldShowHoverAt(e){let t=this.model.get()?.primaryGhostText.get();return t?t.parts.some(n=>e.containsPosition(new K(t.lineNumber,n.column))):!1}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}};hf=I4e=F_i([fC(1,Ne),fC(2,Ze),fC(3,kt),fC(4,Oi),fC(5,da),fC(6,Le),fC(7,ap),fC(8,ni),fC(9,Cs)],hf)});var Sde,Ede,Dde,Tde,kde,Ide,Lde,Nde,OCt=D(()=>{Tn();Gb();ii();vn();Mce();Xue();_de();VN();Oe();fr();nr();Wt();Sde=class i extends Fe{static{this.ID=Nce}constructor(){super({id:i.ID,label:y("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:me.and(V.writable,Sd.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){hf.get(t)?.model.get()?.next()}},Ede=class i extends Fe{static{this.ID=Lce}constructor(){super({id:i.ID,label:y("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:me.and(V.writable,Sd.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){hf.get(t)?.model.get()?.previous()}},Dde=class extends Fe{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:y("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:V.writable})}async run(e,t){let n=hf.get(t);await Kte(async r=>{await n?.model.get()?.triggerExplicitly(r),n?.playAccessibilitySignal(r)})}},Tde=class extends Fe{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:y("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:me.and(V.writable,Sd.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:me.and(V.writable,Sd.inlineSuggestionVisible)},menuOpts:[{menuId:tt.InlineSuggestionToolbar,title:y("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){let n=hf.get(t);await n?.model.get()?.acceptNextWord(n.editor)}},kde=class extends Fe{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:y("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:me.and(V.writable,Sd.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:tt.InlineSuggestionToolbar,title:y("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){let n=hf.get(t);await n?.model.get()?.acceptNextLine(n.editor)}},Ide=class extends Fe{constructor(){super({id:Ice,label:y("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Sd.inlineSuggestionVisible,menuOpts:[{menuId:tt.InlineSuggestionToolbar,title:y("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:me.and(Sd.inlineSuggestionVisible,V.tabMovesFocus.toNegated(),Sd.inlineSuggestionHasIndentationLessThanTabSize,ki.Visible.toNegated(),V.hoverFocused.toNegated())}})}async run(e,t){let n=hf.get(t);n&&(n.model.get()?.accept(n.editor),n.editor.focus())}},Lde=class i extends Fe{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:i.ID,label:y("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Sd.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){let n=hf.get(t);fn(r=>{n?.model.get()?.stop(r)})}},Nde=class i extends la{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:i.ID,title:y("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:tt.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:me.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){let n=e.get(kt),o=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",o)}}});var P_i,lU,L4e,Mde,PCt=D(()=>{Ye();Ad();ae();Tn();We();Sl();Pg();_de();Oce();vx();Oe();oh();ht();vd();eh();P_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lU=function(i,e){return function(t,n){e(t,n,i)}},L4e=class{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Mde=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=r,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=hf.get(this._editor);if(!t)return null;let n=e.target;if(n.type===8){let r=n.detail;if(t.shouldShowHoverAtViewZone(r.viewZoneId))return new $E(1e3,this,N.fromPositions(this._editor.getModel().validatePosition(r.positionBefore||r.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new $E(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new $E(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(62).showToolbar!=="onHover")return[];let n=hf.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new L4e(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new te,r=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&n.add(this.renderScreenReaderText(e,r));let o=r.controller.model.get(),s=this._instantiationService.createInstance(nC,this._editor,!1,Xl(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.activeCommands),a=s.getDomNode();e.fragment.appendChild(a),o.triggerExplicitly(),n.add(s);let l={hoverPart:r,hoverElement:a,dispose(){n.dispose()}};return new dm([l])}renderScreenReaderText(e,t){let n=new te,r=we,o=r("div.hover-row.markdown-hover"),s=be(o,r("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new Zh({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let u=y("inlineSuggestionFollows","Suggestion:"),d=n.add(a.render(new es().appendText(u).appendCodeblock("text",c)));s.replaceChildren(d.element)};return n.add(_t(c=>{let u=t.controller.model.read(c)?.primaryGhostText.read(c);if(u){let d=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(d))}else So(s)})),e.fragment.appendChild(o),n}};Mde=P_i([lU(1,rn),lU(2,jo),lU(3,Cs),lU(4,Ne),lU(5,io)],Mde)});var Rde,BCt=D(()=>{Rde=class{}});var p3,N4e=D(()=>{p3=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{let t=this._implementations.indexOf(e);t!==-1&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}}});var zCt=D(()=>{ii();Pg();OCt();PCt();BCt();_de();N4e();fr();Tt(hf.ID,hf,3);xe(Dde);xe(Sde);xe(Ede);xe(Tde);xe(kde);xe(Ide);xe(Lde);Pn(Nde);Og.register(Mde);p3.register(new Rde)});var VCt=D(()=>{});var B_i,M4e,cU,m3,R4e=D(()=>{Jt();Lt();Ad();ae();VCt();eC();ii();We();Sl();Yp();aW();TN();Oe();Wt();hue();aue();Ui();vs();B_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},M4e=function(i,e){return function(t,n){e(t,n,i)}},m3=class{static{cU=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new te,this.toUnhookForKeyboard=new te,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new p1(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a??void 0)})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{pt(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(cU.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(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}let n=e.target.position;this.startFindDefinition(n)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();let t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;let n=new oB(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=hr(s=>this.findDefinition(e,s));let r;try{r=await this.previousPromise}catch(s){pt(s);return}if(!r||!r.length||!n.validate(this.editor)){this.removeLinkDecorations();return}let o=r[0].originSelectionRange?N.lift(r[0].originSelectionRange):new N(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(r.length>1){let s=o;for(let{originSelectionRange:a}of r)a&&(s=N.plusRange(s,a));this.addDecoration(s,new es().appendText(y("multipleResults","Click to show {0} definitions.",r.length)))}else{let s=r[0];if(!s.uri)return;this.textModelResolverService.createModelReference(s.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}let{object:{textEditorModel:l}}=a,{startLineNumber:c}=s.range;if(c<1||c>l.getLineCount()){a.dispose();return}let u=this.getPreviewValue(l,c,s),d=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(o,u?new es().appendCodeblock(d||"",u):void 0),a.dispose()})}}getPreviewValue(e,t,n){let r=n.range;return r.endLineNumber-r.startLineNumber>=cU.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,n){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{let r=!t&&this.editor.getOption(89)&&!this.isInPeekEditor(n);return new lC({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(Ze);return mu.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};m3=cU=B_i([M4e(1,xs),M4e(2,rn),M4e(3,Le)],m3);Tt(m3.ID,m3,2)});var HCt,Fde,Ode,F4e,P4e,O4e,WCt=D(()=>{Qt();et();ae();Sp();Pt();mn();We();wc();ht();Vy();nr();HCt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Fde=function(i,e){return function(t,n){e(t,n,i)}},Ode=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},F4e=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new G,this.onDidChange=this._onDidChange.event,this._dispoables=new te,this._markers=[],this._nextIdx=-1,Xe.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=pS(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=N.compareRangesUsingStarts(a,l)||so.compare(a.severity,l.severity):c=so.compare(a.severity,l.severity)||N.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:Xe.isUri(e)?e:void 0,severities:so.Error|so.Warning|so.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),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(){let e=this._markers[this._nextIdx];return e&&new Ode(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=ix(this._markers,{resource:e.uri},(s,a)=>pS(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;sr.resource.toString()===e.toString());if(!(n<0)){for(;n{});var jCt=D(()=>{});var Pde,QCt=D(()=>{jCt();er();Dr();fx();(function(i){function e(t){switch(t){case qr.Ignore:return"severity-ignore "+ut.asClassName(Ee.info);case qr.Info:return ut.asClassName(Ee.info);case qr.Warning:return ut.asClassName(Ee.warning);case qr.Error:return ut.asClassName(Ee.error);default:return""}}i.className=e})(Pde||(Pde={}))});var z_i,g3,B4e,z4e,b3,GCt,qCt,YCt,V4e,V_i,Bde,H_i,H4e,W_i,U_i,KCt=D(()=>{Ye();Ag();Qt();Ho();et();ae();Ec();Pt();UCt();We();TN();Oe();Ex();fr();Wt();ht();hO();Vy();vd();QCt();eo();Zn();z_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},g3=function(i,e){return function(t,n){e(t,n,i)}},z4e=class{constructor(e,t,n,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new te,this._editor=t;let s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(cn(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new tO(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Vi(this._disposables)}update(e){let{source:t,message:n,relatedInformation:r,code:o}=e,s=(t?.length||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);let a=Pu(n);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);_o(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){let h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){let f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){let f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=we("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=p=>{this._openerService.open(o.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()};let f=be(this._codeLink,we("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(_o(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Jo(r)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(67)*.66)}px`,this._lines+=1;for(let f of r){let p=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,g.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(g,f);let v=document.createElement("span");v.innerText=f.message,p.appendChild(g),p.appendChild(v),this._lines+=1,h.appendChild(p)}}let c=this._editor.getOption(50),u=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:u,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 so.Error:t=y("Error","Error");break;case so.Warning:t=y("Warning","Warning");break;case so.Info:t=y("Info","Info");break;case so.Hint:t=y("Hint","Hint");break}let n=y("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(n=`${r.getLineContent(e.startLineNumber)}, ${n}`),n}},b3=class extends BB{static{B4e=this}static{this.TitleMenu=new tt("gotoErrorTitleMenu")}constructor(e,t,n,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=n,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new te,this._onDidSelectRelatedInformation=new G,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=so.Warning,this._backgroundColor=pe.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(U_i);let t=V4e,n=V_i;this._severity===so.Warning?(t=Bde,n=H_i):this._severity===so.Info&&(t=H4e,n=W_i);let r=e.getColor(t),o=e.getColor(n);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(Gce),secondaryHeadingColor:e.getColor(qce)})}_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(r=>this.editor.focus()));let t=[],n=this._menuService.getMenuActions(B4e.TitleMenu,this._contextKeyService);gE(n,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=be(e,we(""))}_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 z4e(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());let r=N.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=n>1?y("problems","{0} of {1} problems",t,n):y("change","{0} of {1} problem",t,n);this.setTitle(Sc(a.uri),l)}this._icon.className=`codicon ${Pde.className(so.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,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()}};b3=B4e=z_i([g3(1,Bn),g3(2,jo),g3(3,el),g3(4,Ne),g3(5,Ze),g3(6,mv)],b3);GCt=eI(nI,Rst),qCt=eI(Up,yS),YCt=eI(Hh,wS),V4e=j("editorMarkerNavigationError.background",{dark:GCt,light:GCt,hcDark:Fi,hcLight:Fi},y("editorMarkerNavigationError","Editor marker navigation widget error color.")),V_i=j("editorMarkerNavigationError.headerBackground",{dark:hi(V4e,.1),light:hi(V4e,.1),hcDark:null,hcLight:null},y("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Bde=j("editorMarkerNavigationWarning.background",{dark:qCt,light:qCt,hcDark:Fi,hcLight:Fi},y("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),H_i=j("editorMarkerNavigationWarning.headerBackground",{dark:hi(Bde,.1),light:hi(Bde,.1),hcDark:"#0C141F",hcLight:hi(Bde,.2)},y("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),H4e=j("editorMarkerNavigationInfo.background",{dark:YCt,light:YCt,hcDark:Fi,hcLight:Fi},y("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),W_i=j("editorMarkerNavigationInfo.headerBackground",{dark:hi(H4e,.1),light:hi(H4e,.1),hcDark:null,hcLight:null},y("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),U_i=j("editorMarkerNavigation.background",Vh,y("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var j_i,zde,uU,uD,v3,dU,W4e,U4e,j4e,JCt,Q_i,Q4e=D(()=>{er();ae();ii();fs();Nt();We();vn();WCt();Oe();fr();Wt();ht();sp();KCt();j_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zde=function(i,e){return function(t,n){e(t,n,i)}},uD=class{static{uU=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(uU.ID)}constructor(e,t,n,r,o){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new te,this._editor=e,this._widgetVisible=JCt.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(b3,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=>{(!this._model?.selected||!N.containsPosition(this._model?.selected.marker,n.position))&&this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let 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:N.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()){let t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new K(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){if(this._editor.hasModel()){let n=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(n.move(e,this._editor.getModel(),this._editor.getPosition()),!n.selected)return;if(n.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();let r=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);r&&(uU.get(r)?.close(),uU.get(r)?.nagivate(e,t))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}};uD=uU=j_i([zde(1,P4e),zde(2,Ze),zde(3,ai),zde(4,Ne)],uD);v3=class extends Fe{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&uD.get(t)?.nagivate(this._next,this._multiFile)}},dU=class i extends v3{static{this.ID="editor.action.marker.next"}static{this.LABEL=y("markerAction.next.label","Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:578,weight:100},menuOpts:{menuId:b3.TitleMenu,title:i.LABEL,icon:kn("marker-navigation-next",Ee.arrowDown,y("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}},W4e=class i extends v3{static{this.ID="editor.action.marker.prev"}static{this.LABEL=y("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:1602,weight:100},menuOpts:{menuId:b3.TitleMenu,title:i.LABEL,icon:kn("marker-navigation-previous",Ee.arrowUp,y("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}},U4e=class extends v3{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:y("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:V.focus,primary:66,weight:100},menuOpts:{menuId:tt.MenubarGoMenu,title:y({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},j4e=class extends v3{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:y("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:V.focus,primary:1090,weight:100},menuOpts:{menuId:tt.MenubarGoMenu,title:y({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Tt(uD.ID,uD,4);xe(dU);xe(W4e);xe(U4e);xe(j4e);JCt=new Pe("markersNavigationVisible",!1),Q_i=Sr.bindToContribution(uD.get);Qe(new Q_i({id:"closeMarkersNavigation",precondition:JCt,handler:i=>i.close(),kbOpts:{weight:150,kbExpr:V.focus,primary:9,secondary:[1033]}}))});var Vv,Vde,Hde,Wde,Ude,jde,Qde,Gde,qde,Yde,Kde,Jde,Xde,XCt=D(()=>{kce();Ep();ii();We();vn();R4e();vue();tr();Oe();mW();(function(i){i.NoAutoFocus="noAutoFocus",i.FocusIfVisible="focusIfVisible",i.AutoFocusImmediately="autoFocusImmediately"})(Vv||(Vv={}));Vde=class extends Fe{constructor(){super({id:Tce,label:y({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:Bt("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[Vv.NoAutoFocus,Vv.FocusIfVisible,Vv.AutoFocusImmediately],enumDescriptions:[y("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),y("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),y("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:Vv.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:Wr(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let r=Tc.get(t);if(!r)return;let o=n?.focus,s=Vv.FocusIfVisible;Object.values(Vv).includes(o)?s=o:typeof o=="boolean"&&o&&(s=Vv.AutoFocusImmediately);let a=c=>{let u=t.getPosition(),d=new N(u.lineNumber,u.column,u.lineNumber,u.column);r.showContentHover(d,1,1,c)},l=t.getOption(2)===2;r.isHoverVisible?s!==Vv.NoAutoFocus?r.focus():a(l):a(l||s===Vv.AutoFocusImmediately)}},Hde=class extends Fe{constructor(){super({id:Z1t,label:y({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:Bt("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,t){let n=Tc.get(t);if(!n)return;let r=t.getPosition();if(!r)return;let o=new N(r.lineNumber,r.column,r.lineNumber,r.column),s=m3.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{n.showContentHover(o,1,1,!0)})}},Wde=class extends Fe{constructor(){super({id:$1t,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:16,weight:100},metadata:{description:Bt("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.scrollUp()}},Ude=class extends Fe{constructor(){super({id:ewt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:18,weight:100},metadata:{description:Bt("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.scrollDown()}},jde=class extends Fe{constructor(){super({id:twt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:15,weight:100},metadata:{description:Bt("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.scrollLeft()}},Qde=class extends Fe{constructor(){super({id:iwt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:17,weight:100},metadata:{description:Bt("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.scrollRight()}},Gde=class extends Fe{constructor(){super({id:nwt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:Bt("pageUpHoverDescription","Page up the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.pageUp()}},qde=class extends Fe{constructor(){super({id:rwt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:Bt("pageDownHoverDescription","Page down the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.pageDown()}},Yde=class extends Fe{constructor(){super({id:owt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:Bt("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.goToTop()}},Kde=class extends Fe{constructor(){super({id:swt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:Bt("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,t){let n=Tc.get(t);n&&n.goToBottom()}},Jde=class extends Fe{constructor(){super({id:SN,label:awt,alias:"Increase Hover Verbosity Level",precondition:V.hoverVisible})}run(e,t,n){let r=Tc.get(t);if(!r)return;let o=n?.index!==void 0?n.index:r.focusedHoverPartIndex();r.updateHoverVerbosityLevel(Hd.Increase,o,n?.focus)}},Xde=class extends Fe{constructor(){super({id:EN,label:lwt,alias:"Decrease Hover Verbosity Level",precondition:V.hoverVisible})}run(e,t,n){let r=Tc.get(t);if(!r)return;let o=n?.index!==void 0?n.index:r.focusedHoverPartIndex();Tc.get(t)?.updateHoverVerbosityLevel(Hd.Decrease,o,n?.focus)}}});var G_i,G4e,s0,q4e,ZCt,Zde,$Ct=D(()=>{Ye();Qt();Jt();Lt();ae();Ec();We();Ui();Hie();gN();hce();KE();Q4e();Pg();Oe();Vy();vd();Qb();G_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},G4e=function(i,e){return function(t,n){e(t,n,i)}},s0=we,q4e=class{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}},ZCt={type:1,filter:{include:pr.QuickFix},triggerAction:fu.QuickFixHover},Zde=class{constructor(e,t,n,r){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[];for(let a of t){let l=a.range.startLineNumber===r?a.range.startColumn:1,c=a.range.endLineNumber===r?a.range.endColumn:o,u=this._markerDecorationsService.getMarker(n.uri,a);if(!u)continue;let d=new N(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new q4e(this,d,u))}return s}renderHoverParts(e,t){if(!t.length)return new dm([]);let n=new te,r=[];t.forEach(s=>{let a=this._renderMarkerHover(s);e.fragment.appendChild(a.hoverElement),r.push(a)});let o=t.length===1?t[0]:t.sort((s,a)=>so.compare(s.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,o,n),new dm(r)}_renderMarkerHover(e){let t=new te,n=s0("div.hover-row"),r=be(n,s0("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);let c=be(r,s0("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=s0("span");if(o){let g=be(d,s0("span"));g.innerText=o}let h=be(d,s0("a.code-link"));h.setAttribute("href",a.target.toString()),t.add(re(h,"click",g=>{this._openerService.open(a.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));let f=be(h,s0("span"));f.innerText=a.value;let p=be(r,d);p.style.opacity="0.6",p.style.paddingLeft="6px"}else{let d=be(r,s0("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Jo(l))for(let{message:d,resource:h,startLineNumber:f,startColumn:p}of l){let g=be(r,s0("div"));g.style.marginTop="8px";let v=be(g,s0("a"));v.innerText=`${Sc(h)}(${f}, ${p}): `,v.style.cursor="pointer",t.add(re(v,"click",w=>{if(w.stopPropagation(),w.preventDefault(),this._openerService){let C={selection:{startLineNumber:f,startColumn:p}};this._openerService.open(h,{fromUserGesture:!0,editorOptions:C}).catch(pt)}}));let A=be(g,s0("span"));A.innerText=d,this._editor.applyFontInfo(A)}return{hoverPart:e,hoverElement:n,dispose:()=>t.dispose()}}renderMarkerStatusbar(e,t,n){if(t.marker.severity===so.Error||t.marker.severity===so.Warning||t.marker.severity===so.Info){let r=uD.get(this._editor);r&&e.statusBar.addAction({label:y("view problem","View Problem"),commandId:dU.ID,run:()=>{e.hide(),r.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){let r=e.statusBar.append(s0("div"));this.recentMarkerCodeActionsInfo&&(Jz.makeKey(this.recentMarkerCodeActionsInfo.marker)===Jz.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=y("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?W.None:Bp(()=>r.textContent=y("checkingForQuickFixes","Checking for quick fixes..."),200,n);r.textContent||(r.textContent="\xA0");let s=this.getCodeActions(t.marker);n.add(Ve(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=y("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;n.add(Ve(()=>{l||a.dispose()})),e.statusBar.addAction({label:y("quick fixes","Quick Fix..."),commandId:EB,run:c=>{l=!0;let u=iC.get(this._editor),d=bn(c);e.hide(),u?.showCodeActions(ZCt,a,{x:d.left,y:d.top,width:d.width,height:d.height})}})},pt)}}getCodeActions(e){return hr(t=>XE(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new N(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),ZCt,Zf.None,t))}};Zde=G_i([G4e(1,OO),G4e(2,jo),G4e(3,Le)],Zde)});var $de,e_t=D(()=>{Qt();Ad();tl();$de=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=Hu.Center}computeSync(){let e=o=>({value:o}),t=this._editor.getLineDecorations(this._lineNumber),n=[],r=this._laneOrLine==="lineNo";if(!t)return n;for(let o of t){let s=o.options.glyphMargin?.position??Hu.Center;if(!r&&s!==this._laneOrLine)continue;let a=r?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;!a||bx(a)||n.push(..._F(a).map(e))}return n}}});var q_i,t_t,Y4e,i_t,ehe,n_t=D(()=>{Ye();ae();vx();Sl();zPe();vd();nO();e_t();iW();q_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},t_t=function(i,e){return function(t,n){e(t,n,i)}},i_t=we,ehe=class extends W{static{Y4e=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,n){super(),this._renderDisposeables=this._register(new te),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new tE),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Zh({editor:this._editor},t,n)),this._computer=new $de(this._editor),this._hoverOperation=this._register(new MB(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(50)&&this._updateFont()})),this._register(cn(this._hover.containerDomNode,"mouseleave",r=>{this._onMouseLeave(r)})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Y4e.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))}showsOrWillShow(e){let t=e.target;return t.type===2&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):t.type===3?(this._startShowingAt(t.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,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();let n=document.createDocumentFragment();for(let r of t){let o=i_t("div.hover-row.markdown-hover"),s=be(o,i_t("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),n.appendChild(o)}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));let t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(67),s=this._hover.containerDomNode.clientHeight,a=n-r-(s-o)/2,l=t.glyphMarginLeft+t.glyphMarginWidth+(this._computer.lane==="lineNo"?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${l}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}_onMouseLeave(e){let t=this._editor.getDomNode();(!t||!eD(t,e.x,e.y))&&this.hide()}};ehe=Y4e=q_i([t_t(1,rn),t_t(2,jo)],ehe)});var Y_i,K_i,K4e,hU,r_t=D(()=>{ae();ht();Jt();iW();mW();n_t();Y_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},K_i=function(i,e){return function(t,n){e(t,n,i)}},K4e=!1,hU=class extends W{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new te,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new di(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){let e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._isMouseOnMarginHoverWidget(e)&&this._hideWidgets()}_isMouseOnMarginHoverWidget(e){let t=this._glyphWidget?.getDomNode();return t?eD(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnMarginHoverWidget(e))||K4e||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,n=this._isMouseOnMarginHoverWidget(e);return t&&n}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||K4e||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&(e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||this._hideWidgets())}_hideWidgets(){K4e||this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(ehe,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};hU=Y_i([K_i(1,Ne)],hU)});var the,ihe,nhe,o_t=D(()=>{the=class{},ihe=class{},nhe=class{}});var s_t=D(()=>{XCt();ii();eo();Zn();Pg();oW();$Ct();vue();r_t();mW();N4e();o_t();Tt(Tc.ID,Tc,2);Tt(hU.ID,hU,2);xe(Vde);xe(Hde);xe(Wde);xe(Ude);xe(jde);xe(Qde);xe(Gde);xe(qde);xe(Yde);xe(Kde);xe(Jde);xe(Xde);Og.register(iD);Og.register(Zde);ua((i,e)=>{let t=i.getColor(LZ);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)}; }`))});p3.register(new the);p3.register(new ihe);p3.register(new nhe)});function gh(i,e){let t=0;for(let n=0;n{});function X4e(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let r=e.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;if(!r)return[];let o=new zL(i,r,e);for(n=Math.min(n,i.getLineCount());t<=n&&o.shouldIgnore(t);)t++;if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(g,v)=>(v=v||1,Cd.shiftIndent(g,g.length+v,s,a,l)),u=(g,v)=>(v=v||1,Cd.unshiftIndent(g,g.length+v,s,a,l)),d=[],h=i.getLineContent(t),f=wn(h),p=f;o.shouldIncrease(t)?(p=c(p),f=c(f)):o.shouldIndentNextLine(t)&&(p=c(p)),t++;for(let g=t;g<=n;g++){if(J_i(i,g))continue;let v=i.getLineContent(g),A=wn(v),w=p;o.shouldDecrease(g,w)&&(p=u(p),f=u(f)),A!==p&&d.push(Dn.replaceMove(new qe(g,1,g,A.length+1),PO(p,a,l))),!o.shouldIgnore(g)&&(o.shouldIncrease(g,w)?(f=c(f),p=f):o.shouldIndentNextLine(g,w)?p=c(p):p=f)}return d}function J_i(i,e){return i.tokenization.isCheapToTokenize(e)?i.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var l_t=D(()=>{Pt();DP();$p();Wie();Hn();Toe()});function $_i(i,e){let t=n=>Ydt(i,n)===2;return t(e.getStartPosition())||t(e.getEndPosition())}function c_t(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r="";for(let s=0;s{ae();Pt();ii();DP();We();vn();ks();Zc();J4e();Oe();rf();Roe();l_t();wg();X_i=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Z_i=function(i,e){return function(t,n){e(t,n,i)}},Z4e=class i extends Fe{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:i.ID,label:y("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:V.writable,metadata:{description:Bt("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new a8e(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}},$4e=class i extends Fe{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:i.ID,label:y("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:V.writable,metadata:{description:Bt("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new l8e(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}},fU=class extends Fe{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(Na),r=e.get(an),o=t.getModel();if(!o)return;let s=r.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),a=o.getOptions(),l=[1,2,3,4,5,6,7,8].map(u=>({id:u.toString(),label:u.toString(),description:u===s.tabSize&&u===a.tabSize?y("configuredTabSize","Configured Tab Size"):u===s.tabSize?y("defaultTabSize","Default Tab Size"):u===a.tabSize?y("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:y({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(u=>{if(u&&o&&!o.isDisposed()){let d=parseInt(u.label,10);this.displaySizeOnly?o.updateOptions({tabSize:d}):o.updateOptions({tabSize:d,indentSize:d,insertSpaces:this.insertSpaces})}})},50)}},e8e=class i extends fU{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:i.ID,label:y("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:Bt("indentUsingTabsDescription","Use indentation with tabs.")}})}},t8e=class i extends fU{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:i.ID,label:y("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:Bt("indentUsingSpacesDescription","Use indentation with spaces.")}})}},i8e=class i extends fU{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:i.ID,label:y("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:Bt("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}},n8e=class i extends Fe{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:i.ID,label:y("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:Bt("detectIndentationDescription","Detect the indentation from content.")}})}run(e,t){let n=e.get(an),r=t.getModel();if(!r)return;let o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}},r8e=class extends Fe{constructor(){super({id:"editor.action.reindentlines",label:y("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:V.writable,metadata:{description:Bt("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,t){let n=e.get(qi),r=t.getModel();if(!r)return;let o=X4e(r,n,1,r.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},o8e=class extends Fe{constructor(){super({id:"editor.action.reindentselectedlines",label:y("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:V.writable,metadata:{description:Bt("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,t){let n=e.get(qi),r=t.getModel();if(!r)return;let o=t.getSelections();if(o===null)return;let s=[];for(let a of o){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;let u=X4e(r,n,l,c);s.push(...u)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},s8e=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(let r of this._edits)t.addEditOperation(N.lift(r.range),r.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},rhe=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new te,this.callOnModel=new te,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;let n=this.editor.getModel();if(!n||this.rangeContainsOnlyWhitespaceCharacters(n,e)||$_i(n,e)||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let o=this.editor.getOption(12),{tabSize:s,indentSize:a,insertSpaces:l}=n.getOptions(),c=[],u={shiftIndent:p=>Cd.shiftIndent(p,p.length+1,s,a,l),unshiftIndent:p=>Cd.unshiftIndent(p,p.length+1,s,a,l)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(n,d)){d++;continue}break}if(d>e.endLineNumber)return;let h=n.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){let p=WL(o,n,n.getLanguageId(),d,u,this._languageConfigurationService);if(p!==null){let g=wn(h),v=gh(p,s),A=gh(g,s);if(v!==A){let w=WN(v,s,l);c.push({range:new N(d,1,d,g.length+1),text:w}),h=w+h.substring(g.length)}else{let w=Moe(n,d,this._languageConfigurationService);if(w===0||w===8)return}}}let f=d;for(;dn.tokenization.getLineTokens(v),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(v,A)=>n.getLanguageIdAtPosition(v,A)},getLineContent:v=>v===f?h:n.getLineContent(v)},n.getLanguageId(),d+1,u,this._languageConfigurationService);if(g!==null){let v=gh(g,s),A=gh(wn(n.getLineContent(d+1)),s);if(v!==A){let w=v-A;for(let C=d+1;C<=e.endLineNumber;C++){let _=n.getLineContent(C),E=wn(_),T=gh(E,s)+w,L=WN(T,s,l);L!==E&&c.push({range:new N(C,1,C,E.length+1),text:L})}}}}if(c.length>0){this.editor.pushUndoStop();let p=new s8e(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",p),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){let n=o=>o.trim().length===0,r=!0;if(t.startLineNumber===t.endLineNumber){let s=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);r=n(s)}else for(let o=t.startLineNumber;o<=t.endLineNumber;o++){let s=e.getLineContent(o);if(o===t.startLineNumber){let a=s.substring(t.startColumn-1);r=n(a)}else if(o===t.endLineNumber){let a=s.substring(0,t.endColumn-1);r=n(a)}else r=e.getLineFirstNonWhitespaceColumn(o)===0;if(!r)break}return r}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;let r=e.tokenization.getLineTokens(t);if(r.getCount()>0){let o=r.findTokenIndexAtOffset(n);if(o>=0&&r.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};rhe=X_i([Z_i(1,qi)],rhe);a8e=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),c_t(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},l8e=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),c_t(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Tt(rhe.ID,rhe,2);xe(Z4e);xe($4e);xe(e8e);xe(t8e);xe(i8e);xe(n8e);xe(r8e);xe(o8e)});var d_t=D(()=>{ii();Pg();gBe();bBe();Tt(NN.ID,NN,1);Og.register(GB)});var ohe,h_t=D(()=>{Hn();ohe=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new qe(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new qe(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var f_t=D(()=>{});var p_t=Ue(pU=>{Jt();Lt();eC();ii();We();Hn();vn();vs();xv();Oe();h_t();f_t();var eSi=pU&&pU.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tSi=pU&&pU.__param||function(i,e){return function(t,n){e(t,n,i)}},she,A3=class{static{she=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(she.ID)}static{this.DECORATION=zt.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();let n=this.editor.getSelection(),r=this.editor.getModel();if(!r||!n)return;let o=n;if(o.startLineNumber!==o.endLineNumber)return;let s=new oB(this.editor,5),a=r.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=hr(l=>this.editorWorkerService.navigateValueSet(a,o,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!s.validate(this.editor))return;let c=N.lift(l.range),u=l.range,d=l.value.length-(o.endColumn-o.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+l.value.length},d>1&&(o=new qe(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+d-1));let h=new ohe(c,o,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorations.set([{range:u,options:she.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=Jd(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(pt)}).catch(pt)):Promise.resolve(void 0)}};A3=she=eSi([tSi(1,pa)],A3);var c8e=class extends Fe{constructor(){super({id:"editor.action.inPlaceReplace.up",label:y("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=A3.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},u8e=class extends Fe{constructor(){super({id:"editor.action.inPlaceReplace.down",label:y("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=A3.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Tt(A3.ID,A3,4);xe(c8e);xe(u8e)});var d8e,m_t=D(()=>{ii();Soe();vn();Oe();d8e=class extends Fe{constructor(){super({id:"expandLineSelection",label:y("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:V.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;let r=t._getViewModel();r.model.pushStackElement(),r.setCursorStates(n.source,3,ma.expandLineSelection(r,r.getCursorStates())),r.revealAllCursors(n.source,!0)}};xe(d8e)});function iSi(i,e,t){e.sort((a,l)=>a.lineNumber===l.lineNumber?a.column-l.column:a.lineNumber-l.lineNumber);for(let a=e.length-2;a>=0;a--)e[a].lineNumber===e[a+1].lineNumber&&e.splice(a,1);let n=[],r=0,o=0,s=e.length;for(let a=1,l=i.getLineCount();a<=l;a++){let c=i.getLineContent(a),u=c.length+1,d=0;if(o{Pt();$p();We();ahe=class{constructor(e,t,n){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=n}getEditOperations(e,t){let n=iSi(e,this._cursors,this._trimInRegexesAndStrings);for(let r=0,o=n.length;r{We();Hn();mU=class{constructor(e,t,n){this._selection=e,this._isCopyingDown=t,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber{Pt();DP();We();Hn();OS();ks();J4e();Roe();koe();nSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rSi=function(i,e){return function(t,n){e(t,n,i)}},lhe=class{constructor(e,t,n,r){this._languageConfigurationService=r,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=()=>e.getLanguageId(),r=(d,h)=>e.getLanguageIdAtPosition(d,h),o=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===o){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumberw===s.startLineNumber?e.tokenization.getLineTokens(d):e.tokenization.getLineTokens(w),getLanguageId:n,getLanguageIdAtPosition:r},getLineContent:w=>w===s.startLineNumber?e.getLineContent(d):e.getLineContent(w)},A=WL(this._autoIndent,v,e.getLanguageIdAtPosition(d,1),s.startLineNumber,u,this._languageConfigurationService);if(A!==null){let w=wn(e.getLineContent(d)),C=gh(A,a),_=gh(w,a);C!==_&&(f=WN(C,a,c)+this.trimStart(h))}}t.addEditOperation(new N(s.startLineNumber,1,s.startLineNumber,1),f+` -`);let g=this.matchEnterRuleMovingDown(e,u,a,s.startLineNumber,d,f);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(e,t,s,a,c,g);else{let v={tokenization:{getLineTokens:w=>w===s.startLineNumber?e.tokenization.getLineTokens(d):w>=s.startLineNumber+1&&w<=s.endLineNumber+1?e.tokenization.getLineTokens(w-1):e.tokenization.getLineTokens(w),getLanguageId:n,getLanguageIdAtPosition:r},getLineContent:w=>w===s.startLineNumber?f:w>=s.startLineNumber+1&&w<=s.endLineNumber+1?e.getLineContent(w-1):e.getLineContent(w)},A=WL(this._autoIndent,v,e.getLanguageIdAtPosition(d,1),s.startLineNumber+1,u,this._languageConfigurationService);if(A!==null){let w=wn(e.getLineContent(s.startLineNumber)),C=gh(A,a),_=gh(w,a);if(C!==_){let E=C-_;this.getIndentEditsOfMovingBlock(e,t,s,a,c,E)}}}}else t.addEditOperation(new N(s.startLineNumber,1,s.startLineNumber,1),f+` -`)}else if(d=s.startLineNumber-1,h=e.getLineContent(d),t.addEditOperation(new N(d,1,d+1,1),null),t.addEditOperation(new N(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),` -`+h),this.shouldAutoIndent(e,s)){let f={tokenization:{getLineTokens:g=>g===d?e.tokenization.getLineTokens(s.startLineNumber):e.tokenization.getLineTokens(g),getLanguageId:n,getLanguageIdAtPosition:r},getLineContent:g=>g===d?e.getLineContent(s.startLineNumber):e.getLineContent(g)},p=this.matchEnterRule(e,u,a,s.startLineNumber,s.startLineNumber-2);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(e,t,s,a,c,p);else{let g=WL(this._autoIndent,f,e.getLanguageIdAtPosition(s.startLineNumber,1),d,u,this._languageConfigurationService);if(g!==null){let v=wn(e.getLineContent(s.startLineNumber)),A=gh(g,a),w=gh(v,a);if(A!==w){let C=A-w;this.getIndentEditsOfMovingBlock(e,t,s,a,c,C)}}}}}this._selectionId=t.trackSelection(s)}buildIndentConverter(e,t,n){return{shiftIndent:r=>Cd.shiftIndent(r,r.length+1,e,t,n),unshiftIndent:r=>Cd.unshiftIndent(r,r.length+1,e,t,n)}}parseEnterResult(e,t,n,r,o){if(o){let s=o.indentation;o.indentAction===$o.None||o.indentAction===$o.Indent?s=o.indentation+o.appendText:o.indentAction===$o.IndentOutdent?s=o.indentation:o.indentAction===$o.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(r);if(this.trimStart(a).indexOf(this.trimStart(s))>=0){let l=wn(e.getLineContent(r)),c=wn(s),u=Moe(e,r,this._languageConfigurationService);u!==null&&u&2&&(c=t.unshiftIndent(c));let d=gh(c,n),h=gh(l,n);return d-h}}return null}matchEnterRuleMovingDown(e,t,n,r,o,s){if(qc(s)>=0){let a=e.getLineMaxColumn(o),l=Qx(this._autoIndent,e,new N(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,l)}else{let a=r-1;for(;a>=1;){let u=e.getLineContent(a);if(qc(u)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=Qx(this._autoIndent,e,new N(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}}matchEnterRule(e,t,n,r,o,s){let a=o;for(;a>=1;){let u;if(a===o&&s!==void 0?u=s:u=e.getLineContent(a),qc(u)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=Qx(this._autoIndent,e,new N(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1),r=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==r||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,r,o,s){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){let l=e.getLineContent(a),c=wn(l),d=gh(c,r)+s,h=WN(d,r,o);h!==c&&(t.addEditOperation(new N(a,1,a,c.length+1),h),a===n.endLineNumber&&n.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=r)return null;let o=[];for(let a=n;a<=r;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(y3.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}function oSi(i,e,t){let n=A_t(i,e,t);return n?Dn.replace(new N(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(` -`)):null}var y3,y_t=D(()=>{$p();We();y3=class i{static{this._COLLATOR=null}static getCollator(){return i._COLLATOR||(i._COLLATOR=new Intl.Collator),i._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let n=oSi(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,n){if(e===null)return!1;let r=A_t(e,t,n);if(!r)return!1;for(let o=0,s=r.before.length;o{Ep();uH();ii();PL();g_t();Yoe();lH();$p();Nt();We();Hn();vn();b_t();v_t();y_t();Oe();fr();ks();nr();che=class extends Fe{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let n=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));n.sort((s,a)=>N.compareRangesUsingStarts(s.selection,a.selection));let r=n[0];for(let s=1;snew K(u.positionLineNumber,u.positionColumn)));let o=t.getSelection();if(o===null)return;let s=e.get(kt),a=t.getModel(),l=s.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:a?.getLanguageId(),resource:a?.uri}),c=new ahe(o,r,l);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop()}},w8e=class extends Fe{constructor(){super({id:"editor.action.deleteLines",label:y("lines.delete","Delete Line"),alias:"Delete Line",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=n.length;l1&&(d-=1,f=r.getLineMaxColumn(d)),s.push(Dn.replace(new qe(d,f,h,p),"")),a.push(new qe(d-o,u.positionColumn,d-o,u.positionColumn)),o+=u.endLineNumber-u.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(o=>{let s=o.endLineNumber;return o.startLineNumbero.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let n=[],r=t[0];for(let o=1;o=t[o].startLineNumber?r.endLineNumber=t[o].endLineNumber:(n.push(r),r=t[o]);return n.push(r),n}},x8e=class extends Fe{constructor(){super({id:"editor.action.indentLines",label:y("lines.indent","Indent Line"),alias:"Indent Line",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Lg.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},C8e=class extends Fe{constructor(){super({id:"editor.action.outdentLines",label:y("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:2140,weight:100}})}run(e,t){PE.Outdent.runEditorCommand(e,t,null)}},_8e=class extends Fe{constructor(){super({id:"editor.action.insertLineBefore",label:y("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Gx.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},S8e=class extends Fe{constructor(){super({id:"editor.action.insertLineAfter",label:y("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Gx.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},hhe=class extends Fe{run(e,t){if(!t.hasModel())return;let n=t.getSelection(),r=this._getRangesToDelete(t),o=[];for(let l=0,c=r.length-1;lDn.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},E8e=class extends hhe{constructor(){super({id:"deleteAllLeft",label:y("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,r=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new qe(l,s.startColumn,l,s.startColumn)}else a=new qe(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?n=a:r.push(a)}),n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let n=t,r=e.getModel();return r===null?[]:(n.sort(N.compareRangesUsingStarts),n=n.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:r.getLineLength(s)+1;return new N(s,a,o.startLineNumber,1)}else return new N(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new N(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),n)}},D8e=class extends hhe{constructor(){super({id:"deleteAllRight",label:y("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,r=[];for(let o=0,s=t.length,a=0;o{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new N(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new N(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(N.compareRangesUsingStarts),r}},T8e=class extends Fe{constructor(){super({id:"editor.action.joinLines",label:y("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getSelection();if(r===null)return;n.sort(N.compareRangesUsingStarts);let o=[],s=n.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(r.equalsSelection(h)&&(r=f),f):f.startLineNumber>h.endLineNumber+1?(o.push(h),f):new qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(o.push(h),f):new qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],u=r,d=0;for(let h=0,f=o.length;h=1){let z=!0;E===""&&(z=!1),z&&(E.charAt(E.length-1)===" "||E.charAt(E.length-1)===" ")&&(z=!1,E=E.replace(/[\s\uFEFF\xA0]+$/g," "));let H=L.substr(M-1);E+=(z?" ":"")+H,z?A=H.length+1:A=H.length}else A=0}let I=new N(g,v,w,C);if(!I.isEmpty()){let T;p.isEmpty()?(l.push(Dn.replace(I,E)),T=new qe(I.startLineNumber-d,E.length-A+1,g-d,E.length-A+1)):p.startLineNumber===p.endLineNumber?(l.push(Dn.replace(I,E)),T=new qe(p.startLineNumber-d,p.startColumn,p.endLineNumber-d,p.endColumn)):(l.push(Dn.replace(I,E)),T=new qe(p.startLineNumber-d,p.startColumn,p.startLineNumber-d,E.length-_)),N.intersectRanges(I,r)!==null?u=T:c.push(T)}d+=I.endLineNumber-I.startLineNumber}c.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},k8e=class extends Fe{constructor(){super({id:"editor.action.transpose",label:y("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:V.writable})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=[];for(let s=0,a=n.length;s=u){if(c.lineNumber===r.getLineCount())continue;let d=new N(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=r.getValueInRange(d).split("").reverse().join("");o.push(new Ms(new qe(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let d=new N(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=r.getValueInRange(d).split("").reverse().join("");o.push(new OE(d,h,new qe(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},pC=class extends Fe{run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=t.getOption(132),s=[];for(let a of n)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let u=new N(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),d=r.getValueInRange(u);s.push(Dn.replace(u,this._modifyText(d,o)))}else{let l=r.getValueInRange(a);s.push(Dn.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},I8e=class extends pC{constructor(){super({id:"editor.action.transformToUppercase",label:y("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:V.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},L8e=class extends pC{constructor(){super({id:"editor.action.transformToLowercase",label:y("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:V.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},Hv=class{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}},fhe=class i extends pC{static{this.titleBoundary=new Hv("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:y("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:V.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,r=>r.toLocaleUpperCase()):e}},gU=class i extends pC{static{this.caseBoundary=new Hv("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new Hv("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:y("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:V.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get();return!n||!r?e:e.replace(n,"$1_$2").replace(r,"$1_$2$3").toLocaleLowerCase()}},phe=class i extends pC{static{this.wordBoundary=new Hv("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:y("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:V.writable})}_modifyText(e,t){let n=i.wordBoundary.get();if(!n)return e;let r=e.split(n);return r.shift()+r.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}},mhe=class i extends pC{static{this.wordBoundary=new Hv("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new Hv("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:y("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:V.writable})}_modifyText(e,t){let n=i.wordBoundary.get(),r=i.wordBoundaryToMaintain.get();return!n||!r?e:e.split(r).map(a=>a.split(n)).flat().map(a=>a.substring(0,1).toLocaleUpperCase()+a.substring(1)).join("")}},ghe=class i extends pC{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}static{this.caseBoundary=new Hv("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new Hv("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new Hv("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:y("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:V.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get(),o=i.underscoreBoundary.get();return!n||!r||!o?e:e.replace(o,"$1-$3").replace(n,"$1-$2").replace(r,"$1-$2").toLocaleLowerCase()}};xe(h8e);xe(f8e);xe(p8e);xe(m8e);xe(g8e);xe(b8e);xe(v8e);xe(A8e);xe(y8e);xe(w8e);xe(x8e);xe(C8e);xe(_8e);xe(S8e);xe(E8e);xe(D8e);xe(T8e);xe(k8e);xe(I8e);xe(L8e);gU.caseBoundary.isSupported()&&gU.singleLetters.isSupported()&&xe(gU);phe.wordBoundary.isSupported()&&xe(phe);mhe.wordBoundary.isSupported()&&xe(mhe);fhe.titleBoundary.isSupported()&&xe(fhe);ghe.isSupported()&&xe(ghe)});var x_t=D(()=>{});function __t(i,e,t,n){let r=i.ordered(e);return P9(r.map(o=>async()=>{try{return await o.provideLinkedEditingRanges(e,t,n)}catch(s){ln(s);return}}),o=>!!o&&Jo(o?.ranges))}var sSi,bhe,vhe,C_t,aSi,w3,N8e,lSi,byr,S_t=D(()=>{Qt();Jt();sn();Ho();Lt();et();ae();Pt();mn();ii();fs();Nt();We();vn();vs();ks();Oe();Wt();Ui();eo();Kp();id();x_t();sSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},bhe=function(i,e){return function(t,n){e(t,n,i)}},C_t=new Pe("LinkedEditingInputVisible",!1),aSi="linked-editing-decoration",w3=class extends W{static{vhe=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=zt.register({description:"linked-editing",stickiness:0,className:aSi})}static get(e){return e.getContribution(vhe.ID)}constructor(e,t,n,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new te),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=C_t.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new te),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(70)||s.hasChanged(94))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(Se.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let r=new ra(this._debounceInformation.get(t)),o=()=>{this._rangeUpdateTriggerPromise=r.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},s=new ra(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let c=this._currentDecorations.getRange(0);if(c&&l.changes.every(u=>c.intersectRanges(u.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{r.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();let r=t.getValueInRange(n);if(this._currentWordPattern){let s=r.match(this._currentWordPattern);if((s?s[0].length:0)!==r.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s1){this.clearRanges();return}let n=this._editor.getModel(),r=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=r;let o=this._currentRequestCts=new Bi;try{let s=new Ar(!1),a=await __t(this._providers,n,t,o.token);if(this._debounceInformation.update(n,s.elapsed()),o!==this._currentRequestCts||(this._currentRequestCts=null,r!==n.getVersionId()))return;let l=[];a?.ranges&&(l=a.ranges),this._currentWordPattern=a?.wordPattern||this._languageWordPattern;let c=!1;for(let d=0,h=l.length;d({range:d,options:vhe.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(s){ja(s)||pt(s),(this._currentRequestCts===o||!this._currentRequestCts)&&this.clearRanges()}}};w3=vhe=sSi([bhe(1,Ze),bhe(2,Le),bhe(3,qi),bhe(4,da)],w3);N8e=class extends Fe{constructor(){super({id:"editor.action.linkedEditing",label:y("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:me.and(V.writable,V.hasRenameProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(ai),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return Xe.isUri(r)&&K.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},pt):super.runCommand(e,t)}run(e,t){let n=w3.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},lSi=Sr.bindToContribution(w3.get);Qe(new lSi({id:"cancelLinkedEditingInput",precondition:C_t,handler:i=>i.clearRanges(),kbOpts:{kbExpr:V.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));byr=j("editor.linkedEditingBackground",{dark:pe.fromHex("#f00").transparent(.3),light:pe.fromHex("#f00").transparent(.3),hcDark:pe.fromHex("#f00").transparent(.3),hcLight:pe.white},y("editorLinkedEditingBackground","Background color when the editor auto renames on type."));yc("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(Le);return __t(n,e,t,Ft.None)});Tt(w3.ID,w3,1);xe(N8e)});var E_t=D(()=>{});function R8e(i,e,t){let n=[],r=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(n[s]=[a,o])},ln));return Promise.all(r).then(()=>{let o=new Ahe(yl(n));return t.isCancellationRequested?(o.dispose(),new Ahe([])):o})}var M8e,Ahe,D_t=D(()=>{Qt();sn();Lt();ae();gn();mn();We();Zc();Xn();Ui();M8e=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}},Ahe=class i{constructor(e){this._disposables=new te;let t=[];for(let[n,r]of e){let o=n.links.map(s=>new M8e(s,r));t=i._union(t,o),y_(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n=[],r,o,s,a;for(r=0,s=0,o=e.length,a=t.length;r{let[t,n]=e;yi(t instanceof Xe),typeof n!="number"&&(n=0);let{linkProvider:r}=i.get(Le),o=i.get(an).getModel(t);if(!o)return[];let s=await R8e(r,o,Ft.None);if(!s)return[];for(let l=0;l{Jt();sn();Lt();Ad();ae();bl();Si();Ec();id();mn();E_t();ii();vs();Kp();Ui();aW();D_t();Oe();_c();vd();cSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},yhe=function(i,e){return function(t,n){e(t,n,i)}},bU=class extends W{static{F8e=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(F8e.ID)}constructor(e,t,n,r,o){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=r,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new di(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new p1(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;let e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=hr(t=>R8e(this.providers,e,t));try{let t=new Ar(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){pt(t)}finally{this.computePromise=null}}}updateDecorations(e){let t=this.editor.getOption(78)==="altKey",n=[],r=Object.keys(this.currentOccurrences);for(let s of r){let a=this.currentOccurrences[s];n.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(whe.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(n,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l{r.activate(o,n),this.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(78)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;let{link:r}=e;r.resolve(Ft.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===jt.file&&o.startsWith(`${jt.file}:`)){let a=Xe.parse(o);if(a.scheme===jt.file){let l=pv(a),c=null;l.startsWith("/./")||l.startsWith("\\.\\")?c=`.${l.substr(1)}`:(l.startsWith("//./")||l.startsWith("\\\\.\\"))&&(c=`.${l.substr(2)}`),c&&(o=Mdt(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(y("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(y("missing.url","Failed to open this link because its target is missing.")):pt(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;let t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(let n of t){let r=this.currentOccurrences[n.id];if(r)return r}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};bU=F8e=cSi([yhe(1,jo),yhe(2,Cn),yhe(3,Le),yhe(4,da)],bU);T_t={general:zt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:zt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},whe=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,n){let r={...n?T_t.active:T_t.general};return r.hoverMessage=uSi(e,t),r}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!1))}};O8e=class extends Fe{constructor(){super({id:"editor.action.openLink",label:y("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=bU.get(t);if(!n||!t.hasModel())return;let r=t.getSelections();for(let o of r){let s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}};Tt(bU.ID,bU,1);xe(O8e)});var xhe,I_t=D(()=>{ae();ii();xhe=class extends W{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let n=this._editor.getOption(118);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};Tt(xhe.ID,xhe,2)});var L_t=D(()=>{});function N_t(i){return i===D_.Write?gSi:i===D_.Text?bSi:ySi}function M_t(i){return i?ASi:vSi}var dSi,hSi,fSi,pSi,mSi,gSi,bSi,vSi,ASi,ySi,P8e=D(()=>{L_t();tl();vs();tr();Oe();eo();Zn();dSi=j("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},y("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);j("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},y("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);j("editor.wordHighlightTextBackground",dSi,y("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);hSi=j("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Jn,hcLight:Jn},y("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));j("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Jn,hcLight:Jn},y("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));j("editor.wordHighlightTextBorder",hSi,y("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));fSi=j("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",y("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),pSi=j("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",y("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),mSi=j("editorOverviewRuler.wordHighlightTextForeground",eEe,y("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),gSi=zt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Tr(pSi),position:Cc.Center},minimap:{color:Tr(s7),position:1}}),bSi=zt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Tr(mSi),position:Cc.Center},minimap:{color:Tr(s7),position:1}}),vSi=zt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Tr(eEe),position:Cc.Center},minimap:{color:Tr(s7),position:1}}),ASi=zt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),ySi=zt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Tr(fSi),position:Cc.Center},minimap:{color:Tr(s7),position:1}});ua((i,e)=>{let t=i.getColor(r7);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function hD(i,e){let t=e.filter(n=>!i.find(r=>r.equals(n)));if(t.length>=1){let n=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),r=t.length===1?y("cursorAdded","Cursor added: {0}",n):y("cursorsAdded","Cursors added: {0}",n);yd(r)}}function F_t(i,e,t){let n=R_t(i,e[0],!t);for(let r=1,o=e.length;r{Yl();Jt();Ep();ae();ii();Soe();We();Hn();vn();s3e();Oe();fr();Wt();Ui();P8e();ht();wSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xSi=function(i,e){return function(t,n){e(t,n,i)}};z8e=class extends Fe{constructor(){super({id:"editor.action.insertCursorAbove",label:y("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,ma.addCursorUp(o,s,r)),o.revealTopMostCursor(n.source),hD(s,o.getCursorStates())}},V8e=class extends Fe{constructor(){super({id:"editor.action.insertCursorBelow",label:y("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,ma.addCursorDown(o,s,r)),o.revealBottomMostCursor(n.source),hD(s,o.getCursorStates())}},H8e=class extends Fe{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:y("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let r=e.startLineNumber;r1&&n.push(new qe(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];r.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),hD(s,o.getCursorStates())}},W8e=class extends Fe{constructor(){super({id:"editor.action.addCursorsToBottom",label:y("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=t.getModel().getLineCount(),o=[];for(let l=n[0].startLineNumber;l<=r;l++)o.push(new qe(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),hD(a,s.getCursorStates())}},U8e=class extends Fe{constructor(){super({id:"editor.action.addCursorsToTop",label:y("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=[];for(let a=n[0].startLineNumber;a>=1;a--)r.push(new qe(a,n[0].startColumn,a,n[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();r.length>0&&t.setSelections(r),hD(s,o.getCursorStates())}},x3=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},Che=class i{static create(e,t){if(!e.hasModel())return null;let n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new i(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let r=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(r=!0,o=!0,s=!0):(o=n.wholeWord,s=n.matchCase);let l=e.getSelection(),c,u=null;if(l.isEmpty()){let d=e.getConfiguredWordAtPosition(l.getStartPosition());if(!d)return null;c=d.word,u=new qe(l.startLineNumber,d.startColumn,l.startLineNumber,d.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` -`);return new i(e,t,r,c,o,s,u)}constructor(e,t,n,r,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=r,this.wholeWord=o,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new x3(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new x3(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return n?new qe(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new x3(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new x3(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return n?new qe(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}},C3=class i extends W{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new te),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=Che.create(this._editor,e);if(!t)return;this._session=t;let n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(r=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(r=>{(r.matchCase||r.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){let e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new qe(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let r=e.getState().matchCase;if(!F_t(this._editor.getModel(),t,r)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l0&&n.isRegex){let r=this._editor.getModel();n.searchScope?t=r.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(132):null,!1,1073741824):t=r.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){let r=this._editor.getSelection();for(let o=0,s=t.length;onew qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}},dD=class extends Fe{run(e,t){let n=C3.get(t);if(!n)return;let r=t._getViewModel();if(r){let o=r.getCursorStates(),s=ph.get(t);if(s)this._run(n,s);else{let a=e.get(Ne).createInstance(ph,t);this._run(n,a),a.dispose()}hD(o,r.getCursorStates())}}},j8e=class extends dD{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:y("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:2082,weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},Q8e=class extends dD{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:y("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},G8e=class extends dD{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:y("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:Wr(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},q8e=class extends dD{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:y("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}},Y8e=class extends dD{constructor(){super({id:"editor.action.selectHighlights",label:y("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:3114,weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},K8e=class extends dD{constructor(){super({id:"editor.action.changeAll",label:y("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:me.and(V.writable,V.editorTextFocus),kbOpts:{kbExpr:V.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},J8e=class{constructor(e,t,n,r,o){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=r,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(N.compareRangesUsingStarts)),this._cachedFindMatches}},_he=class extends W{static{B8e=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new di(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(r=>{this._isEnabled=e.getOption(109)})),this._register(e.onDidChangeCursorSelection(r=>{this._isEnabled&&(r.selection.isEmpty()?r.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(r=>{this._setState(null)})),this._register(e.onDidChangeModelContent(r=>{this._isEnabled&&this.updateSoon.schedule()}));let n=ph.get(e);n&&this._register(n.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(B8e._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;let r=n.getSelection();if(r.startLineNumber!==r.endLineNumber)return null;let o=C3.get(n);if(!o)return null;let s=ph.get(n);if(!s)return null;let a=o.getSession(s);if(!a){let u=n.getSelections();if(u.length>1){let h=s.getState().matchCase;if(!F_t(n.getModel(),u,h))return null}a=Che.create(n,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;let l=s.getState(),c=l.matchCase;if(l.isRevealed){let u=l.searchString;c||(u=u.toLowerCase());let d=a.searchText;if(c||(d=d.toLowerCase()),u===d&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new J8e(n.getModel(),a.searchText,a.matchCase,a.wholeWord?n.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let n=this.state.findMatches(),r=this.editor.getSelections();r.sort(N.compareRangesUsingStarts);let o=[];for(let c=0,u=0,d=n.length,h=r.length;c=h)o.push(f),c++;else{let p=N.compareRangesUsingStarts(f,r[u]);p<0?((r[u].isEmpty()||!N.areIntersecting(f,r[u]))&&o.push(f),c++):(p>0||c++,u++)}}let s=this.editor.getOption(81)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(t)&&s,l=o.map(c=>({range:c,options:M_t(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}};_he=B8e=wSi([xSi(1,Le)],_he);X8e=class extends Fe{constructor(){super({id:"editor.action.focusNextCursor",label:y("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:y("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.shift();s&&(o.push(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),hD(o,r.getCursorStates()))}},Z8e=class extends Fe{constructor(){super({id:"editor.action.focusPreviousCursor",label:y("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:y("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.pop();s&&(o.unshift(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),hD(o,r.getCursorStates()))}};Tt(C3.ID,C3,4);Tt(_he.ID,_he,1);xe(z8e);xe(V8e);xe(H8e);xe(j8e);xe(Q8e);xe(G8e);xe(q8e);xe(Y8e);xe(K8e);xe(W8e);xe(U8e);xe(X8e);xe(Z8e)});var P_t,B_t,z_t,V_t,H_t=D(()=>{P_t="editor.action.inlineEdit.accept",B_t="editor.action.inlineEdit.reject",z_t="editor.action.inlineEdit.jumpTo",V_t="editor.action.inlineEdit.jumpBack"});var W_t=D(()=>{});var CSi,_Si,$8e,She,U_t=D(()=>{ae();Tn();W_t();Nt();We();Sl();tl();aI();WW();HE();CSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_Si=function(i,e){return function(t,n){e(t,n,i)}},$8e="inline-edit",She=class extends W{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Gt(this,!1),this.currentTextModel=zi(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=st(this,r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=this.model.range?.read(r);a&&a.startLineNumber===a.endLineNumber&&a.startColumn===a.endColumn&&(a=void 0);let l=(a?a.startLineNumber===a.endLineNumber:!0)&&s.parts.length===1&&s.parts[0].lines.length===1,c=s.parts.length===1&&s.parts[0].lines.every(w=>w.length===0),u=[],d=[];function h(w,C){if(d.length>0){let _=d[d.length-1];C&&_.decorations.push(new Jc(_.content.length+1,_.content.length+1+w[0].length,C,0)),_.content+=w[0],w=w.slice(1)}for(let _ of w)d.push({content:_,decorations:C?[new Jc(1,_.length+1,C,0)]:[]})}let f=o.getLineContent(s.lineNumber),p,g=0;if(!c&&(l||!a)){for(let w of s.parts){let C=w.lines;a&&!l&&(h(C,$8e),C=[]),p===void 0?(u.push({column:w.column,text:C[0],preview:w.preview}),C=C.slice(1)):h([f.substring(g,w.column-1)],void 0),C.length>0&&(h(C,$8e),p===void 0&&w.column<=f.length&&(p=w.column)),g=w.column-1}p!==void 0&&h([f.substring(g)],void 0)}let v=p!==void 0?new n3(p,f.length+1):void 0,A=l||!a?s.lineNumber:a.endLineNumber-1;return{inlineTexts:u,additionalLines:d,hiddenRange:v,lineNumber:A,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o,range:a,isSingleLine:l,isPureRemove:c}}),this.decorations=st(this,r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];if(o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),o.range){let a=[];if(o.isSingleLine)a.push(o.range);else if(!o.isPureRemove){let l=o.range.endLineNumber-o.range.startLineNumber;for(let c=0;c{this.isDisposed.set(!0,void 0)})),this._register(Zue(this.editor,this.decorations))}};She=CSi([_Si(2,rn)],She)});var j_t=D(()=>{});var n5e,S1,Ehe,Dhe,e5e,t5e,i5e,Q_t=D(()=>{Ye();BV();$a();Qt();ae();Tn();Si();j_t();Nt();Ex();TH();fr();Xn();Wt();bd();ht();Yr();eh();n5e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},S1=function(i,e){return function(t,n){e(t,n,i)}},Dhe=class extends W{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).showToolbar==="always"),this.sessionPosition=void 0,this.position=st(this,r=>{let o=this.model.read(r)?.model.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!o||o.parts.length===0)return this.sessionPosition=void 0,null;let s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);let a=new K(o.lineNumber,Math.min(s,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(ts((r,o)=>{if(!this.model.read(r)||!this.alwaysShowToolbar.read(r))return;let a=o.add(this.instantiationService.createInstance(e5e,this.editor,!0,this.position));e.addContentWidget(a),o.add(Ve(()=>e.removeContentWidget(a)))}))}};Dhe=n5e([S1(2,Ne)],Dhe);e5e=class extends W{static{Ehe=this}static{this._dropDownVisible=!1}static{this.id=0}constructor(e,t,n,r,o,s){super(),this.editor=e,this.withBorder=t,this._position=n,this._contextKeyService=o,this._menuService=s,this.id=`InlineEditHintsContentWidget${Ehe.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=pi("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[pi("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(tt.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(r.createInstance(i5e,this.nodes.toolBar,this.editor,tt.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:a=>a.startsWith("primary")},actionViewItemProvider:(a,l)=>{if(a instanceof Ql)return r.createInstance(t5e,a,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(a=>{Ehe._dropDownVisible=a})),this._register(_t(a=>{this._position.read(a),this.editor.layoutContentWidget(this)})),this._register(_t(a=>{let l=[];for(let[c,u]of this.inlineCompletionsActionsMenus.getActions())for(let d of u)d instanceof Ql&&l.push(d);l.length>0&&l.unshift(new go),this.toolBar.setAdditionalSecondaryActions(l)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};e5e=Ehe=n5e([S1(3,Ne),S1(4,Ze),S1(5,el)],e5e);t5e=class extends zy{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=pi("div.keybinding").root;this._register(new i1(t,Qa,{disableTitle:!0,...Lre})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}},i5e=class extends oN{constructor(e,t,n,r,o,s,a,l,c,u){super(e,{resetMenu:n,...r},o,s,a,l,c,u),this.editor=t,this.menuId=n,this.options2=r,this.menuService=o,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this._store.add(this.editor.onDidChangeCursorPosition(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){let e=[],t=[];gE(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setAdditionalSecondaryActions(e){Zi(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};i5e=n5e([S1(4,el),S1(5,Ze),S1(6,Xs),S1(7,ni),S1(8,Oi),S1(9,io)],i5e)});var G_t=D(()=>{});function*SSi(i,e,t=1){e===void 0&&([e,i]=[i,0]);for(let n=i;nn.replace(new RegExp("^"+e),"")),shift:t}}var q_t,The,vU,o5e,khe,s5e,Y_t=D(()=>{Ye();sn();ae();Tn();$h();mn();G_t();$x();oC();CH();HE();Nt();We();Yf();vs();Zc();ht();q_t=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},The=function(i,e){return function(t,n){e(t,n,i)}};khe=class extends W{static{vU=this}static{this._modelId=0}static _createUniqueUri(){return Xe.from({scheme:"inline-edit-widget",path:new Date().toString()+String(vU._modelId++)})}constructor(e,t,n,r,o){super(),this._editor=e,this._model=t,this._instantiationService=n,this._diffProviderFactoryService=r,this._modelService=o,this._position=st(this,s=>{let a=this._model.read(s);if(!a||a.text.length===0||a.range.startLineNumber===a.range.endLineNumber&&!(a.range.startColumn===a.range.endColumn&&a.range.startColumn===1))return null;let l=this._editor.getModel();if(!l)return null;let c=Array.from(SSi(a.range.startLineNumber,a.range.endLineNumber+1)),u=c.map(g=>l.getLineLastNonWhitespaceColumn(g)),d=Math.max(...u),h=c[u.indexOf(d)],f=new K(h,d);return{top:a.range.startLineNumber,left:f}}),this._text=st(this,s=>{let a=this._model.read(s);if(!a)return{text:"",shift:0};let l=r5e(a.text.split(` +}`}))),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){let t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView"),o;!t&&n&&this.editor.getOption(150)&&(o=y("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),ms(o?e+", "+o:e)}shouldShowHoverAt(e){let t=this.model.get()?.primaryGhostText.get();return t?t.parts.some(n=>e.containsPosition(new J(t.lineNumber,n.column))):!1}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}};_f=$4e=kgi([BC(1,Re),BC(2,Ze),BC(3,Et),BC(4,Ii),BC(5,Aa),BC(6,Me),BC(7,vp),BC(8,Xt),BC(9,Es)],_f)});var qhe,Yhe,Khe,Jhe,Xhe,Zhe,$he,efe,Uwt=D(()=>{In();r0();Jt();An();tde();vhe();Ghe();y2();Be();go();ao();Bt();qhe=class i extends Pe{static{this.ID=ede}constructor(){super({id:i.ID,label:y("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ge.and(V.writable,Rd.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){_f.get(t)?.model.get()?.next()}},Yhe=class i extends Pe{static{this.ID=$ue}constructor(){super({id:i.ID,label:y("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ge.and(V.writable,Rd.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){_f.get(t)?.model.get()?.previous()}},Khe=class extends Pe{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:y("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:V.writable})}async run(e,t){let n=_f.get(t);await bne(async o=>{await n?.model.get()?.triggerExplicitly(o),n?.playAccessibilitySignal(o)})}},Jhe=class extends Pe{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:y("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ge.and(V.writable,Rd.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ge.and(V.writable,Rd.inlineSuggestionVisible)},menuOpts:[{menuId:tt.InlineSuggestionToolbar,title:y("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){let n=_f.get(t);await n?.model.get()?.acceptNextWord(n.editor)}},Xhe=class extends Pe{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:y("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ge.and(V.writable,Rd.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:tt.InlineSuggestionToolbar,title:y("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){let n=_f.get(t);await n?.model.get()?.acceptNextLine(n.editor)}},Zhe=class extends Pe{constructor(){super({id:Zue,label:y("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Rd.inlineSuggestionVisible,menuOpts:[{menuId:tt.InlineSuggestionToolbar,title:y("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ge.and(Rd.inlineSuggestionVisible,V.tabMovesFocus.toNegated(),Rd.inlineSuggestionHasIndentationLessThanTabSize,_i.Visible.toNegated(),V.hoverFocused.toNegated())}})}async run(e,t){let n=_f.get(t);n&&(n.model.get()?.accept(n.editor),n.editor.focus())}},$he=class i extends Pe{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:i.ID,label:y("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Rd.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){let n=_f.get(t);fn(o=>{n?.model.get()?.stop(o)})}},efe=class i extends ma{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:i.ID,title:y("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:tt.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ge.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){let n=e.get(Et),r=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",r)}}});var Lgi,Vj,e8e,tfe,jwt=D(()=>{Ye();Td();de();In();Ue();Il();Xg();Ghe();ode();Ux();Be();fh();ht();Dd();lh();Lgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Vj=function(i,e){return function(t,n){e(t,n,i)}},e8e=class{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},tfe=class{constructor(e,t,n,o,r,s){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=o,this._instantiationService=r,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=_f.get(this._editor);if(!t)return null;let n=e.target;if(n.type===8){let o=n.detail;if(t.shouldShowHoverAtViewZone(o.viewZoneId))return new CD(1e3,this,R.fromPositions(this._editor.getModel().validatePosition(o.positionBefore||o.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new CD(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new CD(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(62).showToolbar!=="onHover")return[];let n=_f.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new e8e(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new se,o=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&n.add(this.renderScreenReaderText(e,o));let r=o.controller.model.get(),s=this._instantiationService.createInstance(TC,this._editor,!1,tc(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands),a=s.getDomNode();e.fragment.appendChild(a),r.triggerExplicitly(),n.add(s);let l={hoverPart:o,hoverElement:a,dispose(){n.dispose()}};return new Tm([l])}renderScreenReaderText(e,t){let n=new se,o=xe,r=o("div.hover-row.markdown-hover"),s=Ae(r,o("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new df({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let u=y("inlineSuggestionFollows","Suggestion:"),d=n.add(a.render(new $r().appendText(u).appendCodeblock("text",c)));s.replaceChildren(d.element)};return n.add(Ct(c=>{let u=t.controller.model.read(c)?.primaryGhostText.read(c);if(u){let d=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(d))}else kr(s)})),e.fragment.appendChild(r),n}};tfe=Lgi([Vj(1,on),Vj(2,Qr),Vj(3,Es),Vj(4,Re),Vj(5,rr)],tfe)});var ife,Qwt=D(()=>{ife=class{}});var s4,t8e=D(()=>{s4=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{let t=this._implementations.indexOf(e);t!==-1&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}}});var Gwt=D(()=>{Jt();Xg();Uwt();jwt();Qwt();Ghe();t8e();go();St(_f.ID,_f,3);Ce(Khe);Ce(qhe);Ce(Yhe);Ce(Jhe);Ce(Xhe);Ce(Zhe);Ce($he);Hn(efe);Jg.register(tfe);s4.register(new ife)});var qwt=D(()=>{});var Ngi,i8e,Hj,a4,n8e=D(()=>{Gt();Tt();Td();de();qwt();SC();Jt();Ue();Il();dm();zU();l2();Be();Bt();Rde();kde();Hi();bs();Ngi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},i8e=function(i,e){return function(t,n){e(t,n,i)}},a4=class{static{Hj=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,n,o){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=o,this.toUnhook=new se,this.toUnhookForKeyboard=new se,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let r=new N1(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a??void 0)})),this.toUnhook.add(r.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{ft(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Hj.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(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}let n=e.target.position;this.startFindDefinition(n)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();let t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;let n=new XB(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=mo(s=>this.findDefinition(e,s));let o;try{o=await this.previousPromise}catch(s){ft(s);return}if(!o||!o.length||!n.validate(this.editor)){this.removeLinkDecorations();return}let r=o[0].originSelectionRange?R.lift(o[0].originSelectionRange):new R(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(o.length>1){let s=r;for(let{originSelectionRange:a}of o)a&&(s=R.plusRange(s,a));this.addDecoration(s,new $r().appendText(y("multipleResults","Click to show {0} definitions.",o.length)))}else{let s=o[0];if(!s.uri)return;this.textModelResolverService.createModelReference(s.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}let{object:{textEditorModel:l}}=a,{startLineNumber:c}=s.range;if(c<1||c>l.getLineCount()){a.dispose();return}let u=this.getPreviewValue(l,c,s),d=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(r,u?new $r().appendCodeblock(d||"",u):void 0),a.dispose()})}}getPreviewValue(e,t,n){let o=n.range;return o.endLineNumber-o.startLineNumber>=Hj.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,o)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{let o=!t&&this.editor.getOption(89)&&!this.isInPeekEditor(n);return new MC({openToSide:t,openInPeek:o,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(Ze);return Cu.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};a4=Hj=Ngi([i8e(1,Ss),i8e(2,on),i8e(3,Me)],a4);St(a4.ID,a4,2)});var Ywt,nfe,ofe,o8e,s8e,r8e,Kwt=D(()=>{Wt();et();de();Pp();Rt();mn();Ue();Dc();ht();o1();ao();Ywt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},nfe=function(i,e){return function(t,n){e(t,n,i)}},ofe=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},o8e=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new q,this.onDidChange=this._onDidChange.event,this._dispoables=new se,this._markers=[],this._nextIdx=-1,Je.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let o=this._configService.getValue("problems.sortOrder"),r=(a,l)=>{let c=BS(a.resource.toString(),l.resource.toString());return c===0&&(o==="position"?c=R.compareRangesUsingStarts(a,l)||cr.compare(a.severity,l.severity):c=cr.compare(a.severity,l.severity)||R.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:Je.isUri(e)?e:void 0,severities:cr.Error|cr.Warning|cr.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(r)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),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(){let e=this._markers[this._nextIdx];return e&&new ofe(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let o=!1,r=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());r<0&&(r=Dx(this._markers,{resource:e.uri},(s,a)=>BS(s.resource.toString(),a.resource.toString())),r<0&&(r=~r));for(let s=r;so.resource.toString()===e.toString());if(!(n<0)){for(;n{});var Xwt=D(()=>{});var rfe,Zwt=D(()=>{Xwt();oo();ko();Bx();(function(i){function e(t){switch(t){case Jo.Ignore:return"severity-ignore "+ut.asClassName(De.info);case Jo.Info:return ut.asClassName(De.info);case Jo.Warning:return ut.asClassName(De.warning);case Jo.Error:return ut.asClassName(De.error);default:return""}}i.className=e})(rfe||(rfe={}))});var Mgi,l4,a8e,l8e,c4,$wt,ext,txt,c8e,Rgi,sfe,Fgi,u8e,Ogi,Pgi,ixt=D(()=>{Ye();Mg();Wt();Wr();et();de();Nc();Rt();Jwt();Ue();l2();Be();Xx();go();Bt();ht();oP();o1();Dd();Zwt();nr();io();Mgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},l4=function(i,e){return function(t,n){e(t,n,i)}},l8e=class{constructor(e,t,n,o,r){this._openerService=o,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new se,this._editor=t;let s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(un(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new qO(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Oi(this._disposables)}update(e){let{source:t,message:n,relatedInformation:o,code:r}=e,s=(t?.length||0)+2;r&&(typeof r=="string"?s+=r.length:s+=r.value.length);let a=Uu(n);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);Tr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||r){let h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){let f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(r)if(typeof r=="string"){let f=document.createElement("span");f.innerText=`(${r})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=xe("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=p=>{this._openerService.open(r.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()};let f=Ae(this._codeLink,xe("span"));f.innerText=r.value,h.appendChild(this._codeLink)}}if(Tr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Kr(o)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(67)*.66)}px`,this._lines+=1;for(let f of o){let p=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,g.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(g,f);let A=document.createElement("span");A.innerText=f.message,p.appendChild(g),p.appendChild(A),this._lines+=1,h.appendChild(p)}}let c=this._editor.getOption(50),u=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:u,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 cr.Error:t=y("Error","Error");break;case cr.Warning:t=y("Warning","Warning");break;case cr.Info:t=y("Info","Info");break;case cr.Hint:t=y("Hint","Hint");break}let n=y("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),o=this._editor.getModel();return o&&e.startLineNumber<=o.getLineCount()&&e.startLineNumber>=1&&(n=`${o.getLineContent(e.startLineNumber)}, ${n}`),n}},c4=class extends I3{static{a8e=this}static{this.TitleMenu=new tt("gotoErrorTitleMenu")}constructor(e,t,n,o,r,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=o,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new se,this._onDidSelectRelatedInformation=new q,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=cr.Warning,this._backgroundColor=me.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Pgi);let t=c8e,n=Rgi;this._severity===cr.Warning?(t=sfe,n=Fgi):this._severity===cr.Info&&(t=u8e,n=Ogi);let o=e.getColor(t),r=e.getColor(n);this.style({arrowColor:o,frameColor:o,headerBackgroundColor:r,primaryHeadingColor:e.getColor(pde),secondaryHeadingColor:e.getColor(mde)})}_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(o=>this.editor.focus()));let t=[],n=this._menuService.getMenuActions(a8e.TitleMenu,this._contextKeyService);VE(n,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=Ae(e,xe(""))}_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 l8e(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());let o=R.lift(e),r=this.editor.getPosition(),s=r&&o.containsPosition(r)?r:o.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=n>1?y("problems","{0} of {1} problems",t,n):y("change","{0} of {1} problem",t,n);this.setTitle(Lc(a.uri),l)}this._icon.className=`codicon ${rfe.className(cr.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,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()}};c4=a8e=Mgi([l4(1,Wn),l4(2,Qr),l4(3,nl),l4(4,Re),l4(5,Ze),l4(6,FA)],c4);$wt=RI(PI,Hot),ext=RI(sm,jS),txt=RI($h,QS),c8e=j("editorMarkerNavigationError.background",{dark:$wt,light:$wt,hcDark:ki,hcLight:ki},y("editorMarkerNavigationError","Editor marker navigation widget error color.")),Rgi=j("editorMarkerNavigationError.headerBackground",{dark:ai(c8e,.1),light:ai(c8e,.1),hcDark:null,hcLight:null},y("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),sfe=j("editorMarkerNavigationWarning.background",{dark:ext,light:ext,hcDark:ki,hcLight:ki},y("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Fgi=j("editorMarkerNavigationWarning.headerBackground",{dark:ai(sfe,.1),light:ai(sfe,.1),hcDark:"#0C141F",hcLight:ai(sfe,.2)},y("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),u8e=j("editorMarkerNavigationInfo.background",{dark:txt,light:txt,hcDark:ki,hcLight:ki},y("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Ogi=j("editorMarkerNavigationInfo.headerBackground",{dark:ai(u8e,.1),light:ai(u8e,.1),hcDark:null,hcLight:null},y("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Pgi=j("editorMarkerNavigation.background",Zh,y("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var Bgi,afe,Wj,RD,u4,Uj,d8e,h8e,f8e,nxt,zgi,p8e=D(()=>{oo();de();Jt();hs();kt();Ue();An();Kwt();Be();go();Bt();ht();Ap();ixt();Bgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},afe=function(i,e){return function(t,n){e(t,n,i)}},RD=class{static{Wj=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(Wj.ID)}constructor(e,t,n,o,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=o,this._instantiationService=r,this._sessionDispoables=new se,this._editor=e,this._widgetVisible=nxt.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(c4,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=>{(!this._model?.selected||!R.containsPosition(this._model?.selected.marker,n.position))&&this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let 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:R.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()){let t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new J(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){if(this._editor.hasModel()){let n=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(n.move(e,this._editor.getModel(),this._editor.getPosition()),!n.selected)return;if(n.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();let o=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);o&&(Wj.get(o)?.close(),Wj.get(o)?.nagivate(e,t))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}};RD=Wj=Bgi([afe(1,s8e),afe(2,Ze),afe(3,ei),afe(4,Re)],RD);u4=class extends Pe{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&RD.get(t)?.nagivate(this._next,this._multiFile)}},Uj=class i extends u4{static{this.ID="editor.action.marker.next"}static{this.LABEL=y("markerAction.next.label","Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:578,weight:100},menuOpts:{menuId:c4.TitleMenu,title:i.LABEL,icon:Ln("marker-navigation-next",De.arrowDown,y("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}},d8e=class i extends u4{static{this.ID="editor.action.marker.prev"}static{this.LABEL=y("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:1602,weight:100},menuOpts:{menuId:c4.TitleMenu,title:i.LABEL,icon:Ln("marker-navigation-previous",De.arrowUp,y("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}},h8e=class extends u4{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:y("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:V.focus,primary:66,weight:100},menuOpts:{menuId:tt.MenubarGoMenu,title:y({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},f8e=class extends u4{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:y("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:V.focus,primary:1090,weight:100},menuOpts:{menuId:tt.MenubarGoMenu,title:y({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};St(RD.ID,RD,4);Ce(Uj);Ce(d8e);Ce(h8e);Ce(f8e);nxt=new ze("markersNavigationVisible",!1),zgi=Eo.bindToContribution(RD.get);Qe(new zgi({id:"closeMarkersNavigation",precondition:nxt,handler:i=>i.close(),kbOpts:{weight:150,kbExpr:V.focus,primary:9,secondary:[1033]}}))});var sv,lfe,cfe,ufe,dfe,hfe,ffe,pfe,mfe,gfe,bfe,Afe,vfe,oxt=D(()=>{Xue();Bp();Jt();Ue();An();n8e();Vde();ro();Be();qU();(function(i){i.NoAutoFocus="noAutoFocus",i.FocusIfVisible="focusIfVisible",i.AutoFocusImmediately="autoFocusImmediately"})(sv||(sv={}));lfe=class extends Pe{constructor(){super({id:Jue,label:y({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:Ft("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[sv.NoAutoFocus,sv.FocusIfVisible,sv.AutoFocusImmediately],enumDescriptions:[y("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),y("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),y("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:sv.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:Qo(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let o=Rc.get(t);if(!o)return;let r=n?.focus,s=sv.FocusIfVisible;Object.values(sv).includes(r)?s=r:typeof r=="boolean"&&r&&(s=sv.AutoFocusImmediately);let a=c=>{let u=t.getPosition(),d=new R(u.lineNumber,u.column,u.lineNumber,u.column);o.showContentHover(d,1,1,c)},l=t.getOption(2)===2;o.isHoverVisible?s!==sv.NoAutoFocus?o.focus():a(l):a(l||s===sv.AutoFocusImmediately)}},cfe=class extends Pe{constructor(){super({id:ryt,label:y({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:Ft("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,t){let n=Rc.get(t);if(!n)return;let o=t.getPosition();if(!o)return;let r=new R(o.lineNumber,o.column,o.lineNumber,o.column),s=a4.get(t);if(!s)return;s.startFindDefinitionFromCursor(o).then(()=>{n.showContentHover(r,1,1,!0)})}},ufe=class extends Pe{constructor(){super({id:syt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:16,weight:100},metadata:{description:Ft("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.scrollUp()}},dfe=class extends Pe{constructor(){super({id:ayt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:18,weight:100},metadata:{description:Ft("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.scrollDown()}},hfe=class extends Pe{constructor(){super({id:lyt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:15,weight:100},metadata:{description:Ft("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.scrollLeft()}},ffe=class extends Pe{constructor(){super({id:cyt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:17,weight:100},metadata:{description:Ft("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.scrollRight()}},pfe=class extends Pe{constructor(){super({id:uyt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:Ft("pageUpHoverDescription","Page up the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.pageUp()}},mfe=class extends Pe{constructor(){super({id:dyt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:Ft("pageDownHoverDescription","Page down the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.pageDown()}},gfe=class extends Pe{constructor(){super({id:hyt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:Ft("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.goToTop()}},bfe=class extends Pe{constructor(){super({id:fyt,label:y({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:V.hoverFocused,kbOpts:{kbExpr:V.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:Ft("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,t){let n=Rc.get(t);n&&n.goToBottom()}},Afe=class extends Pe{constructor(){super({id:r2,label:pyt,alias:"Increase Hover Verbosity Level",precondition:V.hoverVisible})}run(e,t,n){let o=Rc.get(t);if(!o)return;let r=n?.index!==void 0?n.index:o.focusedHoverPartIndex();o.updateHoverVerbosityLevel(Jd.Increase,r,n?.focus)}},vfe=class extends Pe{constructor(){super({id:s2,label:myt,alias:"Decrease Hover Verbosity Level",precondition:V.hoverVisible})}run(e,t,n){let o=Rc.get(t);if(!o)return;let r=n?.index!==void 0?n.index:o.focusedHoverPartIndex();Rc.get(t)?.updateHoverVerbosityLevel(Jd.Decrease,r,n?.focus)}}});var Vgi,m8e,v0,g8e,rxt,yfe,sxt=D(()=>{Ye();Wt();Gt();Tt();de();Nc();Ue();Hi();coe();JN();Rue();vD();p8e();Xg();Be();o1();Dd();o0();Vgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},m8e=function(i,e){return function(t,n){e(t,n,i)}},v0=xe,g8e=class{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}},rxt={type:1,filter:{include:bo.QuickFix},triggerAction:wu.QuickFixHover},yfe=class{constructor(e,t,n,o){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=o,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let n=this._editor.getModel(),o=e.range.startLineNumber,r=n.getLineMaxColumn(o),s=[];for(let a of t){let l=a.range.startLineNumber===o?a.range.startColumn:1,c=a.range.endLineNumber===o?a.range.endColumn:r,u=this._markerDecorationsService.getMarker(n.uri,a);if(!u)continue;let d=new R(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new g8e(this,d,u))}return s}renderHoverParts(e,t){if(!t.length)return new Tm([]);let n=new se,o=[];t.forEach(s=>{let a=this._renderMarkerHover(s);e.fragment.appendChild(a.hoverElement),o.push(a)});let r=t.length===1?t[0]:t.sort((s,a)=>cr.compare(s.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,r,n),new Tm(o)}_renderMarkerHover(e){let t=new se,n=v0("div.hover-row"),o=Ae(n,v0("div.marker.hover-contents")),{source:r,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(o);let c=Ae(o,v0("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,r||a)if(a&&typeof a!="string"){let d=v0("span");if(r){let g=Ae(d,v0("span"));g.innerText=r}let h=Ae(d,v0("a.code-link"));h.setAttribute("href",a.target.toString()),t.add(ce(h,"click",g=>{this._openerService.open(a.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));let f=Ae(h,v0("span"));f.innerText=a.value;let p=Ae(o,d);p.style.opacity="0.6",p.style.paddingLeft="6px"}else{let d=Ae(o,v0("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=r&&a?`${r}(${a})`:r||`(${a})`}if(Kr(l))for(let{message:d,resource:h,startLineNumber:f,startColumn:p}of l){let g=Ae(o,v0("div"));g.style.marginTop="8px";let A=Ae(g,v0("a"));A.innerText=`${Lc(h)}(${f}, ${p}): `,A.style.cursor="pointer",t.add(ce(A,"click",w=>{if(w.stopPropagation(),w.preventDefault(),this._openerService){let C={selection:{startLineNumber:f,startColumn:p}};this._openerService.open(h,{fromUserGesture:!0,editorOptions:C}).catch(ft)}}));let v=Ae(g,v0("span"));v.innerText=d,this._editor.applyFontInfo(v)}return{hoverPart:e,hoverElement:n,dispose:()=>t.dispose()}}renderMarkerStatusbar(e,t,n){if(t.marker.severity===cr.Error||t.marker.severity===cr.Warning||t.marker.severity===cr.Info){let o=RD.get(this._editor);o&&e.statusBar.addAction({label:y("view problem","View Problem"),commandId:Uj.ID,run:()=>{e.hide(),o.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){let o=e.statusBar.append(v0("div"));this.recentMarkerCodeActionsInfo&&(TH.makeKey(this.recentMarkerCodeActionsInfo.marker)===TH.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(o.textContent=y("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?H.None:tm(()=>o.textContent=y("checkingForQuickFixes","Checking for quick fixes..."),200,n);o.textContent||(o.textContent="\xA0");let s=this.getCodeActions(t.marker);n.add(He(()=>s.cancel())),s.then(a=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),o.textContent=y("noQuickFixes","No quick fixes available");return}o.style.display="none";let l=!1;n.add(He(()=>{l||a.dispose()})),e.statusBar.addAction({label:y("quick fixes","Quick Fix..."),commandId:A3,run:c=>{l=!0;let u=DC.get(this._editor),d=bn(c);e.hide(),u?.showCodeActions(rxt,a,{x:d.left,y:d.top,width:d.width,height:d.height})}})},ft)}}getCodeActions(e){return mo(t=>wD(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new R(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),rxt,up.None,t))}};yfe=Vgi([m8e(1,TP),m8e(2,Qr),m8e(3,Me)],yfe)});var wfe,axt=D(()=>{Wt();Td();ol();wfe=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=qu.Center}computeSync(){let e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),n=[],o=this._laneOrLine==="lineNo";if(!t)return n;for(let r of t){let s=r.options.glyphMargin?.position??qu.Center;if(!o&&s!==this._laneOrLine)continue;let a=o?r.options.lineNumberHoverMessage:r.options.glyphMarginHoverMessage;!a||Wx(a)||n.push(...gO(a).map(e))}return n}}});var Hgi,lxt,b8e,cxt,xfe,uxt=D(()=>{Ye();de();Ux();Il();lBe();Dd();KO();axt();RU();Hgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},lxt=function(i,e){return function(t,n){e(t,n,i)}},cxt=xe,xfe=class extends H{static{b8e=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,n){super(),this._renderDisposeables=this._register(new se),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new SE),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new df({editor:this._editor},t,n)),this._computer=new wfe(this._editor),this._hoverOperation=this._register(new S3(this._editor,this._computer)),this._register(this._hoverOperation.onResult(o=>{this._withResult(o.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(50)&&this._updateFont()})),this._register(un(this._hover.containerDomNode,"mouseleave",o=>{this._onMouseLeave(o)})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return b8e.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))}showsOrWillShow(e){let t=e.target;return t.type===2&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):t.type===3?(this._startShowingAt(t.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,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();let n=document.createDocumentFragment();for(let o of t){let r=cxt("div.hover-row.markdown-hover"),s=Ae(r,cxt("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(o.value));s.appendChild(a.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));let t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),o=this._editor.getScrollTop(),r=this._editor.getOption(67),s=this._hover.containerDomNode.clientHeight,a=n-o-(s-r)/2,l=t.glyphMarginLeft+t.glyphMarginWidth+(this._computer.lane==="lineNo"?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${l}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}_onMouseLeave(e){let t=this._editor.getDomNode();(!t||!_D(t,e.x,e.y))&&this.hide()}};xfe=b8e=Hgi([lxt(1,on),lxt(2,Qr)],xfe)});var Wgi,Ugi,A8e,jj,dxt=D(()=>{de();ht();Gt();RU();qU();uxt();Wgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ugi=function(i,e){return function(t,n){e(t,n,i)}},A8e=!1,jj=class extends H{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new se,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new si(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){let e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._isMouseOnMarginHoverWidget(e)&&this._hideWidgets()}_isMouseOnMarginHoverWidget(e){let t=this._glyphWidget?.getDomNode();return t?_D(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnMarginHoverWidget(e))||A8e||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,n=this._isMouseOnMarginHoverWidget(e);return t&&n}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||A8e||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&(e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||this._hideWidgets())}_hideWidgets(){A8e||this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(xfe,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};jj=Wgi([Ugi(1,Re)],jj)});var Cfe,_fe,Sfe,hxt=D(()=>{Cfe=class{},_fe=class{},Sfe=class{}});var fxt=D(()=>{oxt();Jt();nr();io();Xg();PU();sxt();Vde();dxt();qU();t8e();hxt();St(Rc.ID,Rc,2);St(jj.ID,jj,2);Ce(lfe);Ce(cfe);Ce(ufe);Ce(dfe);Ce(hfe);Ce(ffe);Ce(pfe);Ce(mfe);Ce(gfe);Ce(bfe);Ce(Afe);Ce(vfe);Jg.register(ED);Jg.register(yfe);ba((i,e)=>{let t=i.getColor($$);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)}; }`))});s4.register(new Cfe);s4.register(new _fe);s4.register(new Sfe)});function _h(i,e){let t=0;for(let n=0;n{});function y8e(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;if(!o)return[];let r=new vN(i,o,e);for(n=Math.min(n,i.getLineCount());t<=n&&r.shouldIgnore(t);)t++;if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(g,A)=>(A=A||1,Nd.shiftIndent(g,g.length+A,s,a,l)),u=(g,A)=>(A=A||1,Nd.unshiftIndent(g,g.length+A,s,a,l)),d=[],h=i.getLineContent(t),f=wn(h),p=f;r.shouldIncrease(t)?(p=c(p),f=c(f)):r.shouldIndentNextLine(t)&&(p=c(p)),t++;for(let g=t;g<=n;g++){if(jgi(i,g))continue;let A=i.getLineContent(g),v=wn(A),w=p;r.shouldDecrease(g,w)&&(p=u(p),f=u(f)),v!==p&&d.push(kn.replaceMove(new qe(g,1,g,v.length+1),kP(p,a,l))),!r.shouldIgnore(g)&&(r.shouldIncrease(g,w)?(f=c(f),p=f):r.shouldIndentNextLine(g,w)?p=c(p):p=f)}return d}function jgi(i,e){return i.tokenization.isCheapToTokenize(e)?i.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var mxt=D(()=>{Rt();vB();gm();uoe();Qn();Jse()});function qgi(i,e){let t=n=>tut(i,n)===2;return t(e.getStartPosition())||t(e.getEndPosition())}function gxt(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let o="";for(let s=0;s{de();Rt();Jt();vB();Ue();An();Rs();su();v8e();Be();gf();iae();mxt();Fg();Qgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ggi=function(i,e){return function(t,n){e(t,n,i)}},w8e=class i extends Pe{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:i.ID,label:y("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:V.writable,metadata:{description:Ft("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,t){let n=t.getModel();if(!n)return;let o=n.getOptions(),r=t.getSelection();if(!r)return;let s=new I8e(r,o.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}},x8e=class i extends Pe{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:i.ID,label:y("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:V.writable,metadata:{description:Ft("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,t){let n=t.getModel();if(!n)return;let o=n.getOptions(),r=t.getSelection();if(!r)return;let s=new L8e(r,o.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}},Qj=class extends Pe{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(Pa),o=e.get(an),r=t.getModel();if(!r)return;let s=o.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget),a=r.getOptions(),l=[1,2,3,4,5,6,7,8].map(u=>({id:u.toString(),label:u.toString(),description:u===s.tabSize&&u===a.tabSize?y("configuredTabSize","Configured Tab Size"):u===s.tabSize?y("defaultTabSize","Default Tab Size"):u===a.tabSize?y("currentTabSize","Current Tab Size"):void 0})),c=Math.min(r.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:y({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(u=>{if(u&&r&&!r.isDisposed()){let d=parseInt(u.label,10);this.displaySizeOnly?r.updateOptions({tabSize:d}):r.updateOptions({tabSize:d,indentSize:d,insertSpaces:this.insertSpaces})}})},50)}},C8e=class i extends Qj{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:i.ID,label:y("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:Ft("indentUsingTabsDescription","Use indentation with tabs.")}})}},_8e=class i extends Qj{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:i.ID,label:y("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:Ft("indentUsingSpacesDescription","Use indentation with spaces.")}})}},S8e=class i extends Qj{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:i.ID,label:y("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:Ft("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}},E8e=class i extends Pe{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:i.ID,label:y("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:Ft("detectIndentationDescription","Detect the indentation from content.")}})}run(e,t){let n=e.get(an),o=t.getModel();if(!o)return;let r=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget);o.detectIndentation(r.insertSpaces,r.tabSize)}},D8e=class extends Pe{constructor(){super({id:"editor.action.reindentlines",label:y("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:V.writable,metadata:{description:Ft("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,t){let n=e.get(Gi),o=t.getModel();if(!o)return;let r=y8e(o,n,1,o.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}},T8e=class extends Pe{constructor(){super({id:"editor.action.reindentselectedlines",label:y("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:V.writable,metadata:{description:Ft("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,t){let n=e.get(Gi),o=t.getModel();if(!o)return;let r=t.getSelections();if(r===null)return;let s=[];for(let a of r){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;let u=y8e(o,n,l,c);s.push(...u)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},k8e=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(let o of this._edits)t.addEditOperation(R.lift(o.range),o.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},Efe=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new se,this.callOnModel=new se,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;let n=this.editor.getModel();if(!n||this.rangeContainsOnlyWhitespaceCharacters(n,e)||qgi(n,e)||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let r=this.editor.getOption(12),{tabSize:s,indentSize:a,insertSpaces:l}=n.getOptions(),c=[],u={shiftIndent:p=>Nd.shiftIndent(p,p.length+1,s,a,l),unshiftIndent:p=>Nd.unshiftIndent(p,p.length+1,s,a,l)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(n,d)){d++;continue}break}if(d>e.endLineNumber)return;let h=n.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){let p=xN(r,n,n.getLanguageId(),d,u,this._languageConfigurationService);if(p!==null){let g=wn(h),A=_h(p,s),v=_h(g,s);if(A!==v){let w=x2(A,s,l);c.push({range:new R(d,1,d,g.length+1),text:w}),h=w+h.substring(g.length)}else{let w=tae(n,d,this._languageConfigurationService);if(w===0||w===8)return}}}let f=d;for(;dn.tokenization.getLineTokens(A),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(A,v)=>n.getLanguageIdAtPosition(A,v)},getLineContent:A=>A===f?h:n.getLineContent(A)},n.getLanguageId(),d+1,u,this._languageConfigurationService);if(g!==null){let A=_h(g,s),v=_h(wn(n.getLineContent(d+1)),s);if(A!==v){let w=A-v;for(let C=d+1;C<=e.endLineNumber;C++){let _=n.getLineContent(C),E=wn(_),T=_h(E,s)+w,N=x2(T,s,l);N!==E&&c.push({range:new R(C,1,C,E.length+1),text:N})}}}}if(c.length>0){this.editor.pushUndoStop();let p=new k8e(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",p),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){let n=r=>r.trim().length===0,o=!0;if(t.startLineNumber===t.endLineNumber){let s=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);o=n(s)}else for(let r=t.startLineNumber;r<=t.endLineNumber;r++){let s=e.getLineContent(r);if(r===t.startLineNumber){let a=s.substring(t.startColumn-1);o=n(a)}else if(r===t.endLineNumber){let a=s.substring(0,t.endColumn-1);o=n(a)}else o=e.getLineFirstNonWhitespaceColumn(r)===0;if(!o)break}return o}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;let o=e.tokenization.getLineTokens(t);if(o.getCount()>0){let r=o.findTokenIndexAtOffset(n);if(r>=0&&o.getStandardTokenType(r)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Efe=Qgi([Ggi(1,Gi)],Efe);I8e=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),gxt(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},L8e=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),gxt(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};St(Efe.ID,Efe,2);Ce(w8e);Ce(x8e);Ce(C8e);Ce(_8e);Ce(S8e);Ce(E8e);Ce(D8e);Ce(T8e)});var Axt=D(()=>{Jt();Xg();zBe();VBe();St(h2.ID,h2,1);Jg.register(B3)});var Dfe,vxt=D(()=>{Qn();Dfe=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new qe(o.endLineNumber,Math.min(this._originalSelection.positionColumn,o.endColumn),o.endLineNumber,Math.min(this._originalSelection.positionColumn,o.endColumn)):new qe(o.endLineNumber,o.endColumn-this._text.length,o.endLineNumber,o.endColumn)}}});var yxt=D(()=>{});var wxt=la(Gj=>{Gt();Tt();SC();Jt();Ue();Qn();An();bs();WA();Be();vxt();yxt();var Ygi=Gj&&Gj.__decorate||function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Kgi=Gj&&Gj.__param||function(i,e){return function(t,n){e(t,n,i)}},Tfe,d4=class{static{Tfe=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(Tfe.ID)}static{this.DECORATION=Ot.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();let n=this.editor.getSelection(),o=this.editor.getModel();if(!o||!n)return;let r=n;if(r.startLineNumber!==r.endLineNumber)return;let s=new XB(this.editor,5),a=o.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=mo(l=>this.editorWorkerService.navigateValueSet(a,r,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!s.validate(this.editor))return;let c=R.lift(l.range),u=l.range,d=l.value.length-(r.endColumn-r.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+l.value.length},d>1&&(r=new qe(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn+d-1));let h=new Dfe(c,r,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorations.set([{range:u,options:Tfe.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=oh(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ft)}).catch(ft)):Promise.resolve(void 0)}};d4=Tfe=Ygi([Kgi(1,wa)],d4);var N8e=class extends Pe{constructor(){super({id:"editor.action.inPlaceReplace.up",label:y("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=d4.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},M8e=class extends Pe{constructor(){super({id:"editor.action.inPlaceReplace.down",label:y("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=d4.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};St(d4.ID,d4,4);Ce(N8e);Ce(M8e)});var R8e,xxt=D(()=>{Jt();qse();An();Be();R8e=class extends Pe{constructor(){super({id:"expandLineSelection",label:y("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:V.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;let o=t._getViewModel();o.model.pushStackElement(),o.setCursorStates(n.source,3,xa.expandLineSelection(o,o.getCursorStates())),o.revealAllCursors(n.source,!0)}};Ce(R8e)});function Jgi(i,e,t){e.sort((a,l)=>a.lineNumber===l.lineNumber?a.column-l.column:a.lineNumber-l.lineNumber);for(let a=e.length-2;a>=0;a--)e[a].lineNumber===e[a+1].lineNumber&&e.splice(a,1);let n=[],o=0,r=0,s=e.length;for(let a=1,l=i.getLineCount();a<=l;a++){let c=i.getLineContent(a),u=c.length+1,d=0;if(r{Rt();gm();Ue();kfe=class{constructor(e,t,n){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=n}getEditOperations(e,t){let n=Jgi(e,this._cursors,this._trimInRegexesAndStrings);for(let o=0,r=n.length;o{Ue();Qn();qj=class{constructor(e,t,n){this._selection=e,this._isCopyingDown=t,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber{Rt();vB();Ue();Qn();sE();Rs();v8e();iae();Xse();Xgi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Zgi=function(i,e){return function(t,n){e(t,n,i)}},Ife=class{constructor(e,t,n,o){this._languageConfigurationService=o,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=()=>e.getLanguageId(),o=(d,h)=>e.getLanguageIdAtPosition(d,h),r=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumberw===s.startLineNumber?e.tokenization.getLineTokens(d):e.tokenization.getLineTokens(w),getLanguageId:n,getLanguageIdAtPosition:o},getLineContent:w=>w===s.startLineNumber?e.getLineContent(d):e.getLineContent(w)},v=xN(this._autoIndent,A,e.getLanguageIdAtPosition(d,1),s.startLineNumber,u,this._languageConfigurationService);if(v!==null){let w=wn(e.getLineContent(d)),C=_h(v,a),_=_h(w,a);C!==_&&(f=x2(C,a,c)+this.trimStart(h))}}t.addEditOperation(new R(s.startLineNumber,1,s.startLineNumber,1),f+` +`);let g=this.matchEnterRuleMovingDown(e,u,a,s.startLineNumber,d,f);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(e,t,s,a,c,g);else{let A={tokenization:{getLineTokens:w=>w===s.startLineNumber?e.tokenization.getLineTokens(d):w>=s.startLineNumber+1&&w<=s.endLineNumber+1?e.tokenization.getLineTokens(w-1):e.tokenization.getLineTokens(w),getLanguageId:n,getLanguageIdAtPosition:o},getLineContent:w=>w===s.startLineNumber?f:w>=s.startLineNumber+1&&w<=s.endLineNumber+1?e.getLineContent(w-1):e.getLineContent(w)},v=xN(this._autoIndent,A,e.getLanguageIdAtPosition(d,1),s.startLineNumber+1,u,this._languageConfigurationService);if(v!==null){let w=wn(e.getLineContent(s.startLineNumber)),C=_h(v,a),_=_h(w,a);if(C!==_){let E=C-_;this.getIndentEditsOfMovingBlock(e,t,s,a,c,E)}}}}else t.addEditOperation(new R(s.startLineNumber,1,s.startLineNumber,1),f+` +`)}else if(d=s.startLineNumber-1,h=e.getLineContent(d),t.addEditOperation(new R(d,1,d+1,1),null),t.addEditOperation(new R(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),` +`+h),this.shouldAutoIndent(e,s)){let f={tokenization:{getLineTokens:g=>g===d?e.tokenization.getLineTokens(s.startLineNumber):e.tokenization.getLineTokens(g),getLanguageId:n,getLanguageIdAtPosition:o},getLineContent:g=>g===d?e.getLineContent(s.startLineNumber):e.getLineContent(g)},p=this.matchEnterRule(e,u,a,s.startLineNumber,s.startLineNumber-2);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(e,t,s,a,c,p);else{let g=xN(this._autoIndent,f,e.getLanguageIdAtPosition(s.startLineNumber,1),d,u,this._languageConfigurationService);if(g!==null){let A=wn(e.getLineContent(s.startLineNumber)),v=_h(g,a),w=_h(A,a);if(v!==w){let C=v-w;this.getIndentEditsOfMovingBlock(e,t,s,a,c,C)}}}}}this._selectionId=t.trackSelection(s)}buildIndentConverter(e,t,n){return{shiftIndent:o=>Nd.shiftIndent(o,o.length+1,e,t,n),unshiftIndent:o=>Nd.unshiftIndent(o,o.length+1,e,t,n)}}parseEnterResult(e,t,n,o,r){if(r){let s=r.indentation;r.indentAction===Zr.None||r.indentAction===Zr.Indent?s=r.indentation+r.appendText:r.indentAction===Zr.IndentOutdent?s=r.indentation:r.indentAction===Zr.Outdent&&(s=t.unshiftIndent(r.indentation)+r.appendText);let a=e.getLineContent(o);if(this.trimStart(a).indexOf(this.trimStart(s))>=0){let l=wn(e.getLineContent(o)),c=wn(s),u=tae(e,o,this._languageConfigurationService);u!==null&&u&2&&(c=t.unshiftIndent(c));let d=_h(c,n),h=_h(l,n);return d-h}}return null}matchEnterRuleMovingDown(e,t,n,o,r,s){if(tu(s)>=0){let a=e.getLineMaxColumn(r),l=gC(this._autoIndent,e,new R(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,o,l)}else{let a=o-1;for(;a>=1;){let u=e.getLineContent(a);if(tu(u)>=0)break;a--}if(a<1||o>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=gC(this._autoIndent,e,new R(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,o,c)}}matchEnterRule(e,t,n,o,r,s){let a=r;for(;a>=1;){let u;if(a===r&&s!==void 0?u=s:u=e.getLineContent(a),tu(u)>=0)break;a--}if(a<1||o>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=gC(this._autoIndent,e,new R(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,o,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1),o=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==o||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,o,r,s){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){let l=e.getLineContent(a),c=wn(l),d=_h(c,o)+s,h=x2(d,o,r);h!==c&&(t.addEditOperation(new R(a,1,a,c.length+1),h),a===n.endLineNumber&&n.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=o)return null;let r=[];for(let a=n;a<=o;a++)r.push(i.getLineContent(a));let s=r.slice(0);return s.sort(h4.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:o,before:r,after:s}}function $gi(i,e,t){let n=Ext(i,e,t);return n?kn.replace(new R(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(` +`)):null}var h4,Dxt=D(()=>{gm();Ue();h4=class i{static{this._COLLATOR=null}static getCollator(){return i._COLLATOR||(i._COLLATOR=new Intl.Collator),i._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let n=$gi(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,n){if(e===null)return!1;let o=Ext(e,t,n);if(!o)return!1;for(let r=0,s=o.before.length;r{Bp();WW();Jt();bN();Cxt();gae();VW();gm();kt();Ue();Qn();An();_xt();Sxt();Dxt();Be();go();Rs();ao();Lfe=class extends Pe{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let n=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));n.sort((s,a)=>R.compareRangesUsingStarts(s.selection,a.selection));let o=n[0];for(let s=1;snew J(u.positionLineNumber,u.positionColumn)));let r=t.getSelection();if(r===null)return;let s=e.get(Et),a=t.getModel(),l=s.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:a?.getLanguageId(),resource:a?.uri}),c=new kfe(r,o,l);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop()}},j8e=class extends Pe{constructor(){super({id:"editor.action.deleteLines",label:y("lines.delete","Delete Line"),alias:"Delete Line",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),o=t.getModel();if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return;let r=0,s=[],a=[];for(let l=0,c=n.length;l1&&(d-=1,f=o.getLineMaxColumn(d)),s.push(kn.replace(new qe(d,f,h,p),"")),a.push(new qe(d-r,u.positionColumn,d-r,u.positionColumn)),r+=u.endLineNumber-u.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(r=>{let s=r.endLineNumber;return r.startLineNumberr.startLineNumber===s.startLineNumber?r.endLineNumber-s.endLineNumber:r.startLineNumber-s.startLineNumber);let n=[],o=t[0];for(let r=1;r=t[r].startLineNumber?o.endLineNumber=t[r].endLineNumber:(n.push(o),o=t[r]);return n.push(o),n}},Q8e=class extends Pe{constructor(){super({id:"editor.action.indentLines",label:y("lines.indent","Indent Line"),alias:"Indent Line",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Qg.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},G8e=class extends Pe{constructor(){super({id:"editor.action.outdentLines",label:y("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:2140,weight:100}})}run(e,t){aD.Outdent.runEditorCommand(e,t,null)}},q8e=class extends Pe{constructor(){super({id:"editor.action.insertLineBefore",label:y("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,bC.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},Y8e=class extends Pe{constructor(){super({id:"editor.action.insertLineAfter",label:y("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,bC.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},Rfe=class extends Pe{run(e,t){if(!t.hasModel())return;let n=t.getSelection(),o=this._getRangesToDelete(t),r=[];for(let l=0,c=o.length-1;lkn.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},K8e=class extends Rfe{constructor(){super({id:"deleteAllLeft",label:y("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,o=[],r=0;return t.forEach(s=>{let a;if(s.endColumn===1&&r>0){let l=s.startLineNumber-r;a=new qe(l,s.startColumn,l,s.startColumn)}else a=new qe(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);r+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?n=a:o.push(a)}),n&&o.unshift(n),o}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let n=t,o=e.getModel();return o===null?[]:(n.sort(R.compareRangesUsingStarts),n=n.map(r=>{if(r.isEmpty())if(r.startColumn===1){let s=Math.max(1,r.startLineNumber-1),a=r.startLineNumber===1?1:o.getLineLength(s)+1;return new R(s,a,r.startLineNumber,1)}else return new R(r.startLineNumber,1,r.startLineNumber,r.startColumn);else return new R(r.startLineNumber,1,r.endLineNumber,r.endColumn)}),n)}},J8e=class extends Rfe{constructor(){super({id:"deleteAllRight",label:y("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,o=[];for(let r=0,s=t.length,a=0;r{if(r.isEmpty()){let s=t.getLineMaxColumn(r.startLineNumber);return r.startColumn===s?new R(r.startLineNumber,r.startColumn,r.startLineNumber+1,1):new R(r.startLineNumber,r.startColumn,r.startLineNumber,s)}return r});return o.sort(R.compareRangesUsingStarts),o}},X8e=class extends Pe{constructor(){super({id:"editor.action.joinLines",label:y("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:V.writable,kbOpts:{kbExpr:V.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(n===null)return;let o=t.getSelection();if(o===null)return;n.sort(R.compareRangesUsingStarts);let r=[],s=n.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(o.equalsSelection(h)&&(o=f),f):f.startLineNumber>h.endLineNumber+1?(r.push(h),f):new qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(r.push(h),f):new qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));r.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],u=o,d=0;for(let h=0,f=r.length;h=1){let B=!0;E===""&&(B=!1),B&&(E.charAt(E.length-1)===" "||E.charAt(E.length-1)===" ")&&(B=!1,E=E.replace(/[\s\uFEFF\xA0]+$/g," "));let z=N.substr(L-1);E+=(B?" ":"")+z,B?v=z.length+1:v=z.length}else v=0}let I=new R(g,A,w,C);if(!I.isEmpty()){let T;p.isEmpty()?(l.push(kn.replace(I,E)),T=new qe(I.startLineNumber-d,E.length-v+1,g-d,E.length-v+1)):p.startLineNumber===p.endLineNumber?(l.push(kn.replace(I,E)),T=new qe(p.startLineNumber-d,p.startColumn,p.endLineNumber-d,p.endColumn)):(l.push(kn.replace(I,E)),T=new qe(p.startLineNumber-d,p.startColumn,p.startLineNumber-d,E.length-_)),R.intersectRanges(I,o)!==null?u=T:c.push(T)}d+=I.endLineNumber-I.startLineNumber}c.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},Z8e=class extends Pe{constructor(){super({id:"editor.action.transpose",label:y("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:V.writable})}run(e,t){let n=t.getSelections();if(n===null)return;let o=t.getModel();if(o===null)return;let r=[];for(let s=0,a=n.length;s=u){if(c.lineNumber===o.getLineCount())continue;let d=new R(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=o.getValueInRange(d).split("").reverse().join("");r.push(new Bs(new qe(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let d=new R(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=o.getValueInRange(d).split("").reverse().join("");r.push(new sD(d,h,new qe(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},zC=class extends Pe{run(e,t){let n=t.getSelections();if(n===null)return;let o=t.getModel();if(o===null)return;let r=t.getOption(132),s=[];for(let a of n)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let u=new R(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),d=o.getValueInRange(u);s.push(kn.replace(u,this._modifyText(d,r)))}else{let l=o.getValueInRange(a);s.push(kn.replace(a,this._modifyText(l,r)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},$8e=class extends zC{constructor(){super({id:"editor.action.transformToUppercase",label:y("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:V.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},e5e=class extends zC{constructor(){super({id:"editor.action.transformToLowercase",label:y("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:V.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},av=class{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}},Ffe=class i extends zC{static{this.titleBoundary=new av("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:y("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:V.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,o=>o.toLocaleUpperCase()):e}},Yj=class i extends zC{static{this.caseBoundary=new av("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new av("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:y("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:V.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),o=i.singleLetters.get();return!n||!o?e:e.replace(n,"$1_$2").replace(o,"$1_$2$3").toLocaleLowerCase()}},Ofe=class i extends zC{static{this.wordBoundary=new av("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:y("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:V.writable})}_modifyText(e,t){let n=i.wordBoundary.get();if(!n)return e;let o=e.split(n);return o.shift()+o.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}},Pfe=class i extends zC{static{this.wordBoundary=new av("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new av("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:y("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:V.writable})}_modifyText(e,t){let n=i.wordBoundary.get(),o=i.wordBoundaryToMaintain.get();return!n||!o?e:e.split(o).map(a=>a.split(n)).flat().map(a=>a.substring(0,1).toLocaleUpperCase()+a.substring(1)).join("")}},Bfe=class i extends zC{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}static{this.caseBoundary=new av("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new av("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new av("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:y("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:V.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),o=i.singleLetters.get(),r=i.underscoreBoundary.get();return!n||!o||!r?e:e.replace(r,"$1-$3").replace(n,"$1-$2").replace(o,"$1-$2").toLocaleLowerCase()}};Ce(F8e);Ce(O8e);Ce(P8e);Ce(B8e);Ce(z8e);Ce(V8e);Ce(H8e);Ce(W8e);Ce(U8e);Ce(j8e);Ce(Q8e);Ce(G8e);Ce(q8e);Ce(Y8e);Ce(K8e);Ce(J8e);Ce(X8e);Ce(Z8e);Ce($8e);Ce(e5e);Yj.caseBoundary.isSupported()&&Yj.singleLetters.isSupported()&&Ce(Yj);Ofe.wordBoundary.isSupported()&&Ce(Ofe);Pfe.wordBoundary.isSupported()&&Ce(Pfe);Ffe.titleBoundary.isSupported()&&Ce(Ffe);Bfe.isSupported()&&Ce(Bfe)});var kxt=D(()=>{});function Lxt(i,e,t,n){let o=i.ordered(e);return mz(o.map(r=>async()=>{try{return await r.provideLinkedEditingRanges(e,t,n)}catch(s){ln(s);return}}),r=>!!r&&Kr(r?.ranges))}var ebi,zfe,Vfe,Ixt,tbi,f4,t5e,ibi,exo,Nxt=D(()=>{Wt();Gt();sn();Wr();Tt();et();de();Rt();mn();Jt();hs();kt();Ue();An();bs();Rs();Be();Bt();Hi();nr();hm();cd();kxt();ebi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},zfe=function(i,e){return function(t,n){e(t,n,i)}},Ixt=new ze("LinkedEditingInputVisible",!1),tbi="linked-editing-decoration",f4=class extends H{static{Vfe=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=Ot.register({description:"linked-editing",stickiness:0,className:tbi})}static get(e){return e.getContribution(Vfe.ID)}constructor(e,t,n,o,r){super(),this.languageConfigurationService=o,this._syncRangesToken=0,this._localToDispose=this._register(new se),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=Ixt.bindTo(t),this._debounceInformation=r.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new se),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(70)||s.hasChanged(94))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(Ee.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let o=new da(this._debounceInformation.get(t)),r=()=>{this._rangeUpdateTriggerPromise=o.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},s=new da(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{r()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let c=this._currentDecorations.getRange(0);if(c&&l.changes.every(u=>c.intersectRanges(u.range))){a(this._syncRangesToken);return}}r()})),this._localToDispose.add({dispose:()=>{o.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();let o=t.getValueInRange(n);if(this._currentWordPattern){let s=o.match(this._currentWordPattern);if((s?s[0].length:0)!==o.length)return this.clearRanges()}let r=[];for(let s=1,a=this._currentDecorations.length;s1){this.clearRanges();return}let n=this._editor.getModel(),o=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=o;let r=this._currentRequestCts=new Mi;try{let s=new xo(!1),a=await Lxt(this._providers,n,t,r.token);if(this._debounceInformation.update(n,s.elapsed()),r!==this._currentRequestCts||(this._currentRequestCts=null,o!==n.getVersionId()))return;let l=[];a?.ranges&&(l=a.ranges),this._currentWordPattern=a?.wordPattern||this._languageWordPattern;let c=!1;for(let d=0,h=l.length;d({range:d,options:Vfe.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(s){Ka(s)||ft(s),(this._currentRequestCts===r||!this._currentRequestCts)&&this.clearRanges()}}};f4=Vfe=ebi([zfe(1,Ze),zfe(2,Me),zfe(3,Gi),zfe(4,Aa)],f4);t5e=class extends Pe{constructor(){super({id:"editor.action.linkedEditing",label:y("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ge.and(V.writable,V.hasRenameProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(ei),[o,r]=Array.isArray(t)&&t||[void 0,void 0];return Je.isUri(o)&&J.isIPosition(r)?n.openCodeEditor({resource:o},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(r),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let n=f4.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},ibi=Eo.bindToContribution(f4.get);Qe(new ibi({id:"cancelLinkedEditingInput",precondition:Ixt,handler:i=>i.clearRanges(),kbOpts:{kbExpr:V.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));exo=j("editor.linkedEditingBackground",{dark:me.fromHex("#f00").transparent(.3),light:me.fromHex("#f00").transparent(.3),hcDark:me.fromHex("#f00").transparent(.3),hcLight:me.white},y("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Ec("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(Me);return Lxt(n,e,t,Nt.None)});St(f4.ID,f4,1);Ce(t5e)});var Mxt=D(()=>{});function n5e(i,e,t){let n=[],o=i.ordered(e).reverse().map((r,s)=>Promise.resolve(r.provideLinks(e,t)).then(a=>{a&&(n[s]=[a,r])},ln));return Promise.all(o).then(()=>{let r=new Hfe(Sl(n));return t.isCancellationRequested?(r.dispose(),new Hfe([])):r})}var i5e,Hfe,Rxt=D(()=>{Wt();sn();Tt();de();gn();mn();Ue();su();to();Hi();i5e=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}},Hfe=class i{constructor(e){this._disposables=new se;let t=[];for(let[n,o]of e){let r=n.links.map(s=>new i5e(s,o));t=i._union(t,r),j_(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n=[],o,r,s,a;for(o=0,s=0,r=e.length,a=t.length;o{let[t,n]=e;gi(t instanceof Je),typeof n!="number"&&(n=0);let{linkProvider:o}=i.get(Me),r=i.get(an).getModel(t);if(!r)return[];let s=await n5e(o,r,Nt.None);if(!s)return[];for(let l=0;l{Gt();sn();Tt();Td();de();xl();wi();Nc();cd();mn();Mxt();Jt();bs();hm();Hi();zU();Rxt();Be();Ic();Dd();nbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Wfe=function(i,e){return function(t,n){e(t,n,i)}},Kj=class extends H{static{o5e=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(o5e.ID)}constructor(e,t,n,o,r){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=o,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=r.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new si(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new N1(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;let e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=mo(t=>n5e(this.providers,e,t));try{let t=new xo(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){ft(t)}finally{this.computePromise=null}}}updateDecorations(e){let t=this.editor.getOption(78)==="altKey",n=[],o=Object.keys(this.currentOccurrences);for(let s of o){let a=this.currentOccurrences[s];n.push(a.decorationId)}let r=[];if(e)for(let s of e)r.push(Ufe.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(n,r);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l{o.activate(r,n),this.activeLinkDecorationId=o.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(78)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;let{link:o}=e;o.resolve(Nt.None).then(r=>{if(typeof r=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===Vt.file&&r.startsWith(`${Vt.file}:`)){let a=Je.parse(r);if(a.scheme===Vt.file){let l=RA(a),c=null;l.startsWith("/./")||l.startsWith("\\.\\")?c=`.${l.substr(1)}`:(l.startsWith("//./")||l.startsWith("\\\\.\\"))&&(c=`.${l.substr(2)}`),c&&(r=Vct(s,c))}}}return this.openerService.open(r,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},r=>{let s=r instanceof Error?r.message:r;s==="invalid"?this.notificationService.warn(y("invalid.url","Failed to open this link because it is not well-formed: {0}",o.url.toString())):s==="missing"?this.notificationService.warn(y("missing.url","Failed to open this link because its target is missing.")):ft(r)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;let t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(let n of t){let o=this.currentOccurrences[n.id];if(o)return o}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};Kj=o5e=nbi([Wfe(1,Qr),Wfe(2,_n),Wfe(3,Me),Wfe(4,Aa)],Kj);Fxt={general:Ot.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Ot.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},Ufe=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,n){let o={...n?Fxt.active:Fxt.general};return o.hoverMessage=obi(e,t),o}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!1))}};r5e=class extends Pe{constructor(){super({id:"editor.action.openLink",label:y("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=Kj.get(t);if(!n||!t.hasModel())return;let o=t.getSelections();for(let r of o){let s=n.getLinkOccurrence(r.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}};St(Kj.ID,Kj,1);Ce(r5e)});var jfe,Pxt=D(()=>{de();Jt();jfe=class extends H{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let n=this._editor.getOption(118);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};St(jfe.ID,jfe,2)});var Bxt=D(()=>{});function zxt(i){return i===X_.Write?ubi:i===X_.Text?dbi:pbi}function Vxt(i){return i?fbi:hbi}var rbi,sbi,abi,lbi,cbi,ubi,dbi,hbi,fbi,pbi,s5e=D(()=>{Bxt();ol();bs();ro();Be();nr();io();rbi=j("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},y("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);j("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},y("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);j("editor.wordHighlightTextBackground",rbi,y("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);sbi=j("editor.wordHighlightBorder",{light:null,dark:null,hcDark:eo,hcLight:eo},y("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));j("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:eo,hcLight:eo},y("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));j("editor.wordHighlightTextBorder",sbi,y("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));abi=j("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",y("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),lbi=j("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",y("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),cbi=j("editorOverviewRuler.wordHighlightTextForeground",CEe,y("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),ubi=Ot.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Io(lbi),position:kc.Center},minimap:{color:Io(Bz),position:1}}),dbi=Ot.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Io(cbi),position:kc.Center},minimap:{color:Io(Bz),position:1}}),hbi=Ot.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Io(CEe),position:kc.Center},minimap:{color:Io(Bz),position:1}}),fbi=Ot.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),pbi=Ot.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Io(abi),position:kc.Center},minimap:{color:Io(Bz),position:1}});ba((i,e)=>{let t=i.getColor(Oz);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function OD(i,e){let t=e.filter(n=>!i.find(o=>o.equals(n)));if(t.length>=1){let n=t.map(r=>`line ${r.viewState.position.lineNumber} column ${r.viewState.position.column}`).join(", "),o=t.length===1?y("cursorAdded","Cursor added: {0}",n):y("cursorsAdded","Cursors added: {0}",n);kd(o)}}function Wxt(i,e,t){let n=Hxt(i,e[0],!t);for(let o=1,r=e.length;o{Zl();Gt();Bp();de();Jt();qse();Ue();Qn();An();k3e();Be();go();Bt();Hi();s5e();ht();mbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},gbi=function(i,e){return function(t,n){e(t,n,i)}};l5e=class extends Pe{constructor(){super({id:"editor.action.insertCursorAbove",label:y("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let o=!0;n&&n.logicalLine===!1&&(o=!1);let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let s=r.getCursorStates();r.setCursorStates(n.source,3,xa.addCursorUp(r,s,o)),r.revealTopMostCursor(n.source),OD(s,r.getCursorStates())}},c5e=class extends Pe{constructor(){super({id:"editor.action.insertCursorBelow",label:y("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let o=!0;n&&n.logicalLine===!1&&(o=!1);let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let s=r.getCursorStates();r.setCursorStates(n.source,3,xa.addCursorDown(r,s,o)),r.revealBottomMostCursor(n.source),OD(s,r.getCursorStates())}},u5e=class extends Pe{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:y("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let o=e.startLineNumber;o1&&n.push(new qe(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let n=t.getModel(),o=t.getSelections(),r=t._getViewModel(),s=r.getCursorStates(),a=[];o.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),OD(s,r.getCursorStates())}},d5e=class extends Pe{constructor(){super({id:"editor.action.addCursorsToBottom",label:y("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),o=t.getModel().getLineCount(),r=[];for(let l=n[0].startLineNumber;l<=o;l++)r.push(new qe(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();r.length>0&&t.setSelections(r),OD(a,s.getCursorStates())}},h5e=class extends Pe{constructor(){super({id:"editor.action.addCursorsToTop",label:y("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),o=[];for(let a=n[0].startLineNumber;a>=1;a--)o.push(new qe(a,n[0].startColumn,a,n[0].endColumn));let r=t._getViewModel(),s=r.getCursorStates();o.length>0&&t.setSelections(o),OD(s,r.getCursorStates())}},p4=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},Qfe=class i{static create(e,t){if(!e.hasModel())return null;let n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new i(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let o=!1,r,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(o=!0,r=!0,s=!0):(r=n.wholeWord,s=n.matchCase);let l=e.getSelection(),c,u=null;if(l.isEmpty()){let d=e.getConfiguredWordAtPosition(l.getStartPosition());if(!d)return null;c=d.word,u=new qe(l.startLineNumber,d.startColumn,l.startLineNumber,d.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` +`);return new i(e,t,o,c,r,s,u)}constructor(e,t,n,o,r,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=o,this.wholeWord=r,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new p4(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new p4(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let o=this.currentMatch;return this.currentMatch=null,o}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return n?new qe(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new p4(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new p4(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let o=this.currentMatch;return this.currentMatch=null,o}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return n?new qe(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}},m4=class i extends H{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new se),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=Qfe.create(this._editor,e);if(!t)return;this._session=t;let n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(o=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(o=>{(o.matchCase||o.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){let e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new qe(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let o=e.getState().matchCase;if(!Wxt(this._editor.getModel(),t,o)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l0&&n.isRegex){let o=this._editor.getModel();n.searchScope?t=o.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(132):null,!1,1073741824):t=o.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){let o=this._editor.getSelection();for(let r=0,s=t.length;rnew qe(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn)))}}},FD=class extends Pe{run(e,t){let n=m4.get(t);if(!n)return;let o=t._getViewModel();if(o){let r=o.getCursorStates(),s=xh.get(t);if(s)this._run(n,s);else{let a=e.get(Re).createInstance(xh,t);this._run(n,a),a.dispose()}OD(r,o.getCursorStates())}}},f5e=class extends FD{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:y("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:2082,weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},p5e=class extends FD{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:y("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},m5e=class extends FD{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:y("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:Qo(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},g5e=class extends FD{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:y("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}},b5e=class extends FD{constructor(){super({id:"editor.action.selectHighlights",label:y("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:3114,weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"3_multi",title:y({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},A5e=class extends FD{constructor(){super({id:"editor.action.changeAll",label:y("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ge.and(V.writable,V.editorTextFocus),kbOpts:{kbExpr:V.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},v5e=class{constructor(e,t,n,o,r){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=o,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,r&&this._model===r._model&&this._searchText===r._searchText&&this._matchCase===r._matchCase&&this._wordSeparators===r._wordSeparators&&this._modelVersionId===r._modelVersionId&&(this._cachedFindMatches=r._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(R.compareRangesUsingStarts)),this._cachedFindMatches}},Gfe=class extends H{static{a5e=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new si(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(o=>{this._isEnabled=e.getOption(109)})),this._register(e.onDidChangeCursorSelection(o=>{this._isEnabled&&(o.selection.isEmpty()?o.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(o=>{this._setState(null)})),this._register(e.onDidChangeModelContent(o=>{this._isEnabled&&this.updateSoon.schedule()}));let n=xh.get(e);n&&this._register(n.getState().onFindReplaceStateChange(o=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(a5e._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;let o=n.getSelection();if(o.startLineNumber!==o.endLineNumber)return null;let r=m4.get(n);if(!r)return null;let s=xh.get(n);if(!s)return null;let a=r.getSession(s);if(!a){let u=n.getSelections();if(u.length>1){let h=s.getState().matchCase;if(!Wxt(n.getModel(),u,h))return null}a=Qfe.create(n,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;let l=s.getState(),c=l.matchCase;if(l.isRevealed){let u=l.searchString;c||(u=u.toLowerCase());let d=a.searchText;if(c||(d=d.toLowerCase()),u===d&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new v5e(n.getModel(),a.searchText,a.matchCase,a.wholeWord?n.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let n=this.state.findMatches(),o=this.editor.getSelections();o.sort(R.compareRangesUsingStarts);let r=[];for(let c=0,u=0,d=n.length,h=o.length;c=h)r.push(f),c++;else{let p=R.compareRangesUsingStarts(f,o[u]);p<0?((o[u].isEmpty()||!R.areIntersecting(f,o[u]))&&r.push(f),c++):(p>0||c++,u++)}}let s=this.editor.getOption(81)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(t)&&s,l=r.map(c=>({range:c,options:Vxt(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}};Gfe=a5e=mbi([gbi(1,Me)],Gfe);y5e=class extends Pe{constructor(){super({id:"editor.action.focusNextCursor",label:y("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:y("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let r=Array.from(o.getCursorStates()),s=r.shift();s&&(r.push(s),o.setCursorStates(n.source,3,r),o.revealPrimaryCursor(n.source,!0),OD(r,o.getCursorStates()))}},w5e=class extends Pe{constructor(){super({id:"editor.action.focusPreviousCursor",label:y("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:y("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let r=Array.from(o.getCursorStates()),s=r.pop();s&&(r.unshift(s),o.setCursorStates(n.source,3,r),o.revealPrimaryCursor(n.source,!0),OD(r,o.getCursorStates()))}};St(m4.ID,m4,4);St(Gfe.ID,Gfe,1);Ce(l5e);Ce(c5e);Ce(u5e);Ce(f5e);Ce(p5e);Ce(m5e);Ce(g5e);Ce(b5e);Ce(A5e);Ce(d5e);Ce(h5e);Ce(y5e);Ce(w5e)});var jxt,Qxt,Gxt,qxt,Yxt=D(()=>{jxt="editor.action.inlineEdit.accept",Qxt="editor.action.inlineEdit.reject",Gxt="editor.action.inlineEdit.jumpTo",qxt="editor.action.inlineEdit.jumpBack"});var Kxt=D(()=>{});var bbi,Abi,x5e,qfe,Jxt=D(()=>{de();In();Kxt();kt();Ue();Il();ol();HI();yj();dD();bbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Abi=function(i,e){return function(t,n){e(t,n,i)}},x5e="inline-edit",qfe=class extends H{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Ut(this,!1),this.currentTextModel=Ri(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=at(this,o=>{if(this.isDisposed.read(o))return;let r=this.currentTextModel.read(o);if(r!==this.model.targetTextModel.read(o))return;let s=this.model.ghostText.read(o);if(!s)return;let a=this.model.range?.read(o);a&&a.startLineNumber===a.endLineNumber&&a.startColumn===a.endColumn&&(a=void 0);let l=(a?a.startLineNumber===a.endLineNumber:!0)&&s.parts.length===1&&s.parts[0].lines.length===1,c=s.parts.length===1&&s.parts[0].lines.every(w=>w.length===0),u=[],d=[];function h(w,C){if(d.length>0){let _=d[d.length-1];C&&_.decorations.push(new ou(_.content.length+1,_.content.length+1+w[0].length,C,0)),_.content+=w[0],w=w.slice(1)}for(let _ of w)d.push({content:_,decorations:C?[new ou(1,_.length+1,C,0)]:[]})}let f=r.getLineContent(s.lineNumber),p,g=0;if(!c&&(l||!a)){for(let w of s.parts){let C=w.lines;a&&!l&&(h(C,x5e),C=[]),p===void 0?(u.push({column:w.column,text:C[0],preview:w.preview}),C=C.slice(1)):h([f.substring(g,w.column-1)],void 0),C.length>0&&(h(C,x5e),p===void 0&&w.column<=f.length&&(p=w.column)),g=w.column-1}p!==void 0&&h([f.substring(g)],void 0)}let A=p!==void 0?new K3(p,f.length+1):void 0,v=l||!a?s.lineNumber:a.endLineNumber-1;return{inlineTexts:u,additionalLines:d,hiddenRange:A,lineNumber:v,additionalReservedLineCount:this.model.minReservedLineCount.read(o),targetTextModel:r,range:a,isSingleLine:l,isPureRemove:c}}),this.decorations=at(this,o=>{let r=this.uiState.read(o);if(!r)return[];let s=[];if(r.hiddenRange&&s.push({range:r.hiddenRange.toRange(r.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),r.range){let a=[];if(r.isSingleLine)a.push(r.range);else if(!r.isPureRemove){let l=r.range.endLineNumber-r.range.startLineNumber;for(let c=0;c{this.isDisposed.set(!0,void 0)})),this._register(yhe(this.editor,this.decorations))}};qfe=bbi([Abi(2,on)],qfe)});var Xxt=D(()=>{});var E5e,U1,Yfe,Kfe,C5e,_5e,S5e,Zxt=D(()=>{Ye();gW();il();Wt();de();In();wi();Xxt();kt();Xx();sU();go();to();Bt();Ed();ht();Xo();lh();E5e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},U1=function(i,e){return function(t,n){e(t,n,i)}},Kfe=class extends H{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).showToolbar==="always"),this.sessionPosition=void 0,this.position=at(this,o=>{let r=this.model.read(o)?.model.ghostText.read(o);if(!this.alwaysShowToolbar.read(o)||!r||r.parts.length===0)return this.sessionPosition=void 0,null;let s=r.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==r.lineNumber&&(this.sessionPosition=void 0);let a=new J(r.lineNumber,Math.min(s,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(es((o,r)=>{if(!this.model.read(o)||!this.alwaysShowToolbar.read(o))return;let a=r.add(this.instantiationService.createInstance(C5e,this.editor,!0,this.position));e.addContentWidget(a),r.add(He(()=>e.removeContentWidget(a)))}))}};Kfe=E5e([U1(2,Re)],Kfe);C5e=class extends H{static{Yfe=this}static{this._dropDownVisible=!1}static{this.id=0}constructor(e,t,n,o,r,s){super(),this.editor=e,this.withBorder=t,this._position=n,this._contextKeyService=r,this._menuService=s,this.id=`InlineEditHintsContentWidget${Yfe.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=ci("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[ci("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(tt.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(o.createInstance(S5e,this.nodes.toolBar,this.editor,tt.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:a=>a.startsWith("primary")},actionViewItemProvider:(a,l)=>{if(a instanceof Kl)return o.createInstance(_5e,a,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(a=>{Yfe._dropDownVisible=a})),this._register(Ct(a=>{this._position.read(a),this.editor.layoutContentWidget(this)})),this._register(Ct(a=>{let l=[];for(let[c,u]of this.inlineCompletionsActionsMenus.getActions())for(let d of u)d instanceof Kl&&l.push(d);l.length>0&&l.unshift(new yr),this.toolBar.setAdditionalSecondaryActions(l)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};C5e=Yfe=E5e([U1(3,Re),U1(4,Ze),U1(5,nl)],C5e);_5e=class extends n1{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=ci("div.keybinding").root;this._register(new y1(t,Ja,{disableTitle:!0,...$re})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}},S5e=class extends zN{constructor(e,t,n,o,r,s,a,l,c,u){super(e,{resetMenu:n,...o},r,s,a,l,c,u),this.editor=t,this.menuId=n,this.options2=o,this.menuService=r,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this._store.add(this.editor.onDidChangeCursorPosition(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){let e=[],t=[];VE(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setAdditionalSecondaryActions(e){Zi(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};S5e=E5e([U1(4,nl),U1(5,Ze),U1(6,ia),U1(7,Xt),U1(8,Ii),U1(9,rr)],S5e)});var $xt=D(()=>{});function*vbi(i,e,t=1){e===void 0&&([e,i]=[i,0]);for(let n=i;nn.replace(new RegExp("^"+e),"")),shift:t}}var eCt,Jfe,Jj,T5e,Xfe,k5e,tCt=D(()=>{Ye();sn();de();In();hf();mn();$xt();_C();IC();tU();dD();kt();Ue();sp();bs();su();ht();eCt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Jfe=function(i,e){return function(t,n){e(t,n,i)}};Xfe=class extends H{static{Jj=this}static{this._modelId=0}static _createUniqueUri(){return Je.from({scheme:"inline-edit-widget",path:new Date().toString()+String(Jj._modelId++)})}constructor(e,t,n,o,r){super(),this._editor=e,this._model=t,this._instantiationService=n,this._diffProviderFactoryService=o,this._modelService=r,this._position=at(this,s=>{let a=this._model.read(s);if(!a||a.text.length===0||a.range.startLineNumber===a.range.endLineNumber&&!(a.range.startColumn===a.range.endColumn&&a.range.startColumn===1))return null;let l=this._editor.getModel();if(!l)return null;let c=Array.from(vbi(a.range.startLineNumber,a.range.endLineNumber+1)),u=c.map(g=>l.getLineLastNonWhitespaceColumn(g)),d=Math.max(...u),h=c[u.indexOf(d)],f=new J(h,d);return{top:a.range.startLineNumber,left:f}}),this._text=at(this,s=>{let a=this._model.read(s);if(!a)return{text:"",shift:0};let l=D5e(a.text.split(` `));return{text:l.text.join(` -`),shift:l.shift}}),this._originalModel=fa(()=>this._modelService.createModel("",null,vU._createUniqueUri())).keepObserved(this._store),this._modifiedModel=fa(()=>this._modelService.createModel("",null,vU._createUniqueUri())).keepObserved(this._store),this._diff=st(this,s=>this._diffPromise.read(s)?.promiseResult.read(s)?.data),this._diffPromise=st(this,s=>{let a=this._model.read(s);if(!a)return;let l=this._editor.getModel();if(!l)return;let c=r5e(l.getValueInRange(a.range).split(` +`),shift:l.shift}}),this._originalModel=ya(()=>this._modelService.createModel("",null,Jj._createUniqueUri())).keepObserved(this._store),this._modifiedModel=ya(()=>this._modelService.createModel("",null,Jj._createUniqueUri())).keepObserved(this._store),this._diff=at(this,s=>this._diffPromise.read(s)?.promiseResult.read(s)?.data),this._diffPromise=at(this,s=>{let a=this._model.read(s);if(!a)return;let l=this._editor.getModel();if(!l)return;let c=D5e(l.getValueInRange(a.range).split(` `)).text.join(` -`),u=r5e(a.text.split(` +`),u=D5e(a.text.split(` `)).text.join(` -`);this._originalModel.get().setValue(c),this._modifiedModel.get().setValue(u);let d=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return tL.fromFn(async()=>{let h=await d.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},Ft.None);if(!h.identical)return h.changes})}),this._register(ts((s,a)=>{if(!this._model.read(s)||this._position.get()===null)return;let c=a.add(this._instantiationService.createInstance(s5e,this._editor,this._position,this._text.map(u=>u.text),this._text.map(u=>u.shift),this._diff));e.addOverlayWidget(c),a.add(Ve(()=>e.removeOverlayWidget(c)))}))}};khe=vU=q_t([The(2,Ne),The(3,Zx),The(4,an)],khe);s5e=class extends W{static{o5e=this}static{this.id=0}constructor(e,t,n,r,o,s){super(),this._editor=e,this._position=t,this._text=n,this._shift=r,this._diff=o,this._instantiationService=s,this.id=`InlineEditSideBySideContentWidget${o5e.id++}`,this.allowEditorOverflow=!1,this._nodes=we("div.inlineEditSideBySide",void 0),this._scrollChanged=bs("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(pu,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=Il(this._previewEditor),this._editorObs=Il(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(ip,"",this._editor.getModel()?.getLanguageId()??ps,ip.DEFAULT_CREATION_OPTIONS,null)),this._setText=st(a=>{let l=this._text.read(a);l&&this._previewTextModel.setValue(l)}).recomputeInitiallyAndOnChange(this._store),this._decorations=st(this,a=>{this._setText.read(a);let l=this._position.read(a);if(!l)return{org:[],mod:[]};let c=this._diff.read(a);if(!c)return{org:[],mod:[]};let u=[],d=[];if(c.length===1&&c[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};let h=this._shift.get(),f=p=>new N(p.startLineNumber+l.top-1,p.startColumn+h,p.endLineNumber+l.top-1,p.endColumn+h);for(let p of c)if(p.original.isEmpty||u.push({range:f(p.original.toInclusiveRange()),options:Xx}),p.modified.isEmpty||d.push({range:p.modified.toInclusiveRange(),options:iN}),p.modified.isEmpty||p.original.isEmpty)p.original.isEmpty||u.push({range:f(p.original.toInclusiveRange()),options:YP}),p.modified.isEmpty||d.push({range:p.modified.toInclusiveRange(),options:GP});else for(let g of p.innerChanges||[])p.original.contains(g.originalRange.startLineNumber)&&u.push({range:f(g.originalRange),options:g.originalRange.isEmpty()?KP:Nv}),p.modified.contains(g.modifiedRange.startLineNumber)&&d.push({range:g.modifiedRange,options:g.modifiedRange.isEmpty()?qP:nN});return{org:u,mod:d}}),this._originalDecorations=st(this,a=>this._decorations.read(a).org),this._modifiedDecorations=st(this,a=>this._decorations.read(a).mod),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register(_t(a=>{let l=this._previewEditorObs.contentWidth.read(a),c=this._text.read(a).split(` -`).length-1,u=this._editor.getOption(67)*c;l<=0||this._previewEditor.layout({height:u,width:l})})),this._register(_t(a=>{this._position.read(a),this._editor.layoutOverlayWidget(this)})),this._register(_t(a=>{this._scrollChanged.read(a),this._position.read(a)&&this._editor.layoutOverlayWidget(this)}))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){let e=this._position.get();if(!e)return null;let t=this._editor.getLayoutInfo(),n=this._editor.getScrolledVisiblePosition(new K(e.top,1));if(!n)return null;let r=n.top-1,o=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column);return{preference:{left:t.contentLeft+o+10,top:r}}}};s5e=o5e=q_t([The(5,Ne)],s5e)});function DSi(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}var ESi,UN,AU,Gu,a5e=D(()=>{ae();Tn();$p();Nt();We();U_t();Wt();ht();tr();Ui();sn();HW();Xn();Q_t();Ye();nr();Lt();$h();Y_t();CH();Zc();ESi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},UN=function(i,e){return function(t,n){e(t,n,i)}},Gu=class extends W{static{AU=this}static{this.ID="editor.contrib.inlineEditController"}static{this.inlineEditVisibleKey="inlineEditVisible"}static{this.inlineEditVisibleContext=new Pe(this.inlineEditVisibleKey,!1)}static{this.cursorAtInlineEditKey="cursorAtInlineEdit"}static{this.cursorAtInlineEditContext=new Pe(this.cursorAtInlineEditKey,!1)}static get(e){return e.getContribution(AU.ID)}constructor(e,t,n,r,o,s,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.languageFeaturesService=r,this._commandService=o,this._configurationService=s,this._diffProviderFactoryService=a,this._modelService=l,this._isVisibleContext=AU.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=AU.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=Gt(this,void 0),this._currentWidget=fa(this._currentEdit,p=>{let g=this._currentEdit.read(p);if(!g)return;let v=g.range.endLineNumber,A=g.range.endColumn,w=g.text.endsWith(` -`)&&!(g.range.startLineNumber===g.range.endLineNumber&&g.range.startColumn===g.range.endColumn)?g.text.slice(0,-1):g.text,C=new w1(v,[new lD(A,w,!1)]),_=g.range.startLineNumber===g.range.endLineNumber&&C.parts.length===1&&C.parts[0].lines.length===1,E=g.text==="";return!_&&!E?void 0:this.instantiationService.createInstance(She,this.editor,{ghostText:Xl(C),minReservedLineCount:Xl(0),targetTextModel:Xl(this.editor.getModel()??void 0),range:Xl(g.range)})}),this._isAccepting=Gt(this,!1),this._enabled=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).enabled),this._fontFamily=zi(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).fontFamily);let c=bs("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register(_t(p=>{this._enabled.read(p)&&(c.read(p),!this._isAccepting.read(p)&&this.getInlineEdit(e,!0))}));let u=zi(this,e.onDidChangeCursorPosition,()=>e.getPosition());this._register(_t(p=>{if(!this._enabled.read(p))return;let g=u.read(p);g&&this.checkCursorPosition(g)})),this._register(_t(p=>{let g=this._currentEdit.read(p);if(this._isCursorAtInlineEditContext.set(!1),!g){this._isVisibleContext.set(!1);return}this._isVisibleContext.set(!0);let v=e.getPosition();v&&this.checkCursorPosition(v)}));let d=bs("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register(_t(async p=>{this._enabled.read(p)&&(d.read(p),!(this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur)&&(this._currentRequestCts?.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))}));let h=bs("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register(_t(p=>{this._enabled.read(p)&&(h.read(p),this.getInlineEdit(e,!0))}));let f=this._register(gZ());this._register(_t(p=>{let g=this._fontFamily.read(p);f.setStyle(g===""||g==="default"?"":` +`);this._originalModel.get().setValue(c),this._modifiedModel.get().setValue(u);let d=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return FL.fromFn(async()=>{let h=await d.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},Nt.None);if(!h.identical)return h.changes})}),this._register(es((s,a)=>{if(!this._model.read(s)||this._position.get()===null)return;let c=a.add(this._instantiationService.createInstance(k5e,this._editor,this._position,this._text.map(u=>u.text),this._text.map(u=>u.shift),this._diff));e.addOverlayWidget(c),a.add(He(()=>e.removeOverlayWidget(c)))}))}};Xfe=Jj=eCt([Jfe(2,Re),Jfe(3,CC),Jfe(4,an)],Xfe);k5e=class extends H{static{T5e=this}static{this.id=0}constructor(e,t,n,o,r,s){super(),this._editor=e,this._position=t,this._text=n,this._shift=o,this._diff=r,this._instantiationService=s,this.id=`InlineEditSideBySideContentWidget${T5e.id++}`,this.allowEditorOverflow=!1,this._nodes=xe("div.inlineEditSideBySide",void 0),this._scrollChanged=gs("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(xu,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=Fl(this._previewEditor),this._editorObs=Fl(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(pp,"",this._editor.getModel()?.getLanguageId()??fs,pp.DEFAULT_CREATION_OPTIONS,null)),this._setText=at(a=>{let l=this._text.read(a);l&&this._previewTextModel.setValue(l)}).recomputeInitiallyAndOnChange(this._store),this._decorations=at(this,a=>{this._setText.read(a);let l=this._position.read(a);if(!l)return{org:[],mod:[]};let c=this._diff.read(a);if(!c)return{org:[],mod:[]};let u=[],d=[];if(c.length===1&&c[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};let h=this._shift.get(),f=p=>new R(p.startLineNumber+l.top-1,p.startColumn+h,p.endLineNumber+l.top-1,p.endColumn+h);for(let p of c)if(p.original.isEmpty||u.push({range:f(p.original.toInclusiveRange()),options:xC}),p.modified.isEmpty||d.push({range:p.modified.toInclusiveRange(),options:ON}),p.modified.isEmpty||p.original.isEmpty)p.original.isEmpty||u.push({range:f(p.original.toInclusiveRange()),options:VB}),p.modified.isEmpty||d.push({range:p.modified.toInclusiveRange(),options:BB});else for(let g of p.innerChanges||[])p.original.contains(g.originalRange.startLineNumber)&&u.push({range:f(g.originalRange),options:g.originalRange.isEmpty()?HB:ZA}),p.modified.contains(g.modifiedRange.startLineNumber)&&d.push({range:g.modifiedRange,options:g.modifiedRange.isEmpty()?zB:PN});return{org:u,mod:d}}),this._originalDecorations=at(this,a=>this._decorations.read(a).org),this._modifiedDecorations=at(this,a=>this._decorations.read(a).mod),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register(Ct(a=>{let l=this._previewEditorObs.contentWidth.read(a),c=this._text.read(a).split(` +`).length-1,u=this._editor.getOption(67)*c;l<=0||this._previewEditor.layout({height:u,width:l})})),this._register(Ct(a=>{this._position.read(a),this._editor.layoutOverlayWidget(this)})),this._register(Ct(a=>{this._scrollChanged.read(a),this._position.read(a)&&this._editor.layoutOverlayWidget(this)}))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){let e=this._position.get();if(!e)return null;let t=this._editor.getLayoutInfo(),n=this._editor.getScrolledVisiblePosition(new J(e.top,1));if(!n)return null;let o=n.top-1,r=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column);return{preference:{left:t.contentLeft+r+10,top:o}}}};k5e=T5e=eCt([Jfe(5,Re)],k5e)});function wbi(i,e){return new Promise(t=>{let n,o=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(o),n&&n.dispose(),t()}))})}var ybi,C2,Xj,Zu,I5e=D(()=>{de();In();gm();kt();Ue();Jxt();Bt();ht();ro();Hi();sn();vj();to();Zxt();Ye();ao();Tt();hf();tCt();tU();su();ybi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},C2=function(i,e){return function(t,n){e(t,n,i)}},Zu=class extends H{static{Xj=this}static{this.ID="editor.contrib.inlineEditController"}static{this.inlineEditVisibleKey="inlineEditVisible"}static{this.inlineEditVisibleContext=new ze(this.inlineEditVisibleKey,!1)}static{this.cursorAtInlineEditKey="cursorAtInlineEdit"}static{this.cursorAtInlineEditContext=new ze(this.cursorAtInlineEditKey,!1)}static get(e){return e.getContribution(Xj.ID)}constructor(e,t,n,o,r,s,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.languageFeaturesService=o,this._commandService=r,this._configurationService=s,this._diffProviderFactoryService=a,this._modelService=l,this._isVisibleContext=Xj.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=Xj.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=Ut(this,void 0),this._currentWidget=ya(this._currentEdit,p=>{let g=this._currentEdit.read(p);if(!g)return;let A=g.range.endLineNumber,v=g.range.endColumn,w=g.text.endsWith(` +`)&&!(g.range.startLineNumber===g.range.endLineNumber&&g.range.startColumn===g.range.endColumn)?g.text.slice(0,-1):g.text,C=new z1(A,[new ND(v,w,!1)]),_=g.range.startLineNumber===g.range.endLineNumber&&C.parts.length===1&&C.parts[0].lines.length===1,E=g.text==="";return!_&&!E?void 0:this.instantiationService.createInstance(qfe,this.editor,{ghostText:tc(C),minReservedLineCount:tc(0),targetTextModel:tc(this.editor.getModel()??void 0),range:tc(g.range)})}),this._isAccepting=Ut(this,!1),this._enabled=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).enabled),this._fontFamily=Ri(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).fontFamily);let c=gs("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register(Ct(p=>{this._enabled.read(p)&&(c.read(p),!this._isAccepting.read(p)&&this.getInlineEdit(e,!0))}));let u=Ri(this,e.onDidChangeCursorPosition,()=>e.getPosition());this._register(Ct(p=>{if(!this._enabled.read(p))return;let g=u.read(p);g&&this.checkCursorPosition(g)})),this._register(Ct(p=>{let g=this._currentEdit.read(p);if(this._isCursorAtInlineEditContext.set(!1),!g){this._isVisibleContext.set(!1);return}this._isVisibleContext.set(!0);let A=e.getPosition();A&&this.checkCursorPosition(A)}));let d=gs("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register(Ct(async p=>{this._enabled.read(p)&&(d.read(p),!(this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur)&&(this._currentRequestCts?.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))}));let h=gs("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register(Ct(p=>{this._enabled.read(p)&&(h.read(p),this.getInlineEdit(e,!0))}));let f=this._register(B$());this._register(Ct(p=>{let g=this._fontFamily.read(p);f.setStyle(g===""||g==="default"?"":` .monaco-editor .inline-edit-decoration, .monaco-editor .inline-edit-decoration-preview, .monaco-editor .inline-edit { font-family: ${g}; -}`)})),this._register(new Dhe(this.editor,this._currentWidget,this.instantiationService)),this._register(new khe(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit){this._isCursorAtInlineEditContext.set(!1);return}let t=this._currentEdit.get();if(!t){this._isCursorAtInlineEditContext.set(!1);return}this._isCursorAtInlineEditContext.set(N.containsPosition(t.range,e))}validateInlineEdit(e,t){if(t.text.includes(` -`)&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){if(t.range.startColumn!==1)return!1;let r=t.range.endLineNumber,o=t.range.endColumn,s=e.getModel()?.getLineLength(r)??0;if(o!==s+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);let n=e.getModel();if(!n)return;let r=n.getVersionId(),o=this.languageFeaturesService.inlineEditProvider.all(n);if(o.length===0)return;let s=o[0];this._currentRequestCts=new Bi;let a=this._currentRequestCts.token,l=t?Y5.Automatic:Y5.Invoke;if(t&&await DSi(50,a),a.isCancellationRequested||n.isDisposed()||n.getVersionId()!==r)return;let u=await s.provideInlineEdit(n,{triggerKind:l},a);if(u&&!(a.isCancellationRequested||n.isDisposed()||n.getVersionId()!==r)&&this.validateInlineEdit(e,u))return u}async getInlineEdit(e,t){this._isCursorAtInlineEditContext.set(!1),await this.clear();let n=await this.fetchInlineEdit(e,t);n&&this._currentEdit.set(n,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);let e=this._currentEdit.get();if(!e)return;let t=e.text;e.text.startsWith(` -`)&&(t=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[Dn.replace(N.lift(e.range),t)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,ln),this.freeEdit(e),fn(n=>{this._currentEdit.set(void 0,n),this._isAccepting.set(!1,n)})}jumpToCurrent(){this._jumpBackPosition=this.editor.getSelection()?.getStartPosition();let e=this._currentEdit.get();if(!e)return;let t=K.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(t),this.editor.revealPositionInCenterIfOutsideViewport(t)}async clear(e=!0){let t=this._currentEdit.get();t&&t?.rejected&&e&&await this._commandService.executeCommand(t.rejected.id,...t.rejected.arguments||[]).then(void 0,ln),t&&this.freeEdit(t),this._currentEdit.set(void 0,void 0)}freeEdit(e){let t=this.editor.getModel();if(!t)return;let n=this.languageFeaturesService.inlineEditProvider.all(t);n.length!==0&&n[0].freeInlineEdit(e)}};Gu=AU=ESi([UN(1,Ne),UN(2,Ze),UN(3,Le),UN(4,Oi),UN(5,kt),UN(6,Zx),UN(7,an)],Gu)});var Ihe,Lhe,Nhe,Mhe,Rhe,K_t=D(()=>{ii();vn();H_t();a5e();fr();Wt();Ihe=class extends Fe{constructor(){super({id:P_t,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:me.and(V.writable,Gu.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:me.and(V.writable,Gu.inlineEditVisibleContext,Gu.cursorAtInlineEditContext)}],menuOpts:[{menuId:tt.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){await Gu.get(t)?.accept()}},Lhe=class extends Fe{constructor(){let e=me.and(V.writable,me.not(Gu.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){Gu.get(t)?.trigger()}},Nhe=class extends Fe{constructor(){let e=me.and(V.writable,Gu.inlineEditVisibleContext,me.not(Gu.cursorAtInlineEditKey));super({id:z_t,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:tt.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){Gu.get(t)?.jumpToCurrent()}},Mhe=class extends Fe{constructor(){let e=me.and(V.writable,Gu.cursorAtInlineEditContext);super({id:V_t,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:tt.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){Gu.get(t)?.jumpBack()}},Rhe=class extends Fe{constructor(){let e=me.and(V.writable,Gu.inlineEditVisibleContext);super({id:B_t,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:tt.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){await Gu.get(t)?.clear()}}});var J_t=D(()=>{ii();K_t();a5e();xe(Ihe);xe(Rhe);xe(Nhe);xe(Mhe);xe(Lhe);Tt(Gu.ID,Gu,3)});var X_t,Z_t,$_t,fD,eSt,l5e=D(()=>{Oe();Wt();X_t="editor.action.inlineEdits.accept",Z_t="editor.action.inlineEdits.showPrevious",$_t="editor.action.inlineEdits.showNext",fD=new Pe("inlineEditsVisible",!1,y("inlineEditsVisible","Whether an inline edit is visible")),eSt=new Pe("inlineEditsIsPinned",!1,y("isPinned","Whether an inline edit is visible"))});var tSt=D(()=>{});function TSi(i,e){return Fy(i,(t,n)=>n===!0?!0:e(t))}var jN,c5e=D(()=>{Ye();ky();ae();Tn();$h();$x();jN=class extends W{static{this.ID="editor.contrib.placeholderText"}constructor(e){super(),this._editor=e,this._editorObs=Il(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=Jl({owner:this,equalsFn:bO},t=>{let n=this._placeholderText.read(t);if(n&&this._editorObs.valueIsEmpty.read(t))return{placeholder:n}}),this._shouldViewBeAlive=TSi(this,t=>this._state.read(t)?.placeholder!==void 0),this._view=sh((t,n)=>{if(!this._shouldViewBeAlive.read(t))return;let r=pi("div.editorPlaceholder");n.add(_t(o=>{let s=this._state.read(o),a=s?.placeholder!==void 0;r.root.style.display=a?"block":"none",r.root.innerText=s?.placeholder??""})),n.add(_t(o=>{let s=this._editorObs.layoutInfo.read(o);r.root.style.left=`${s.contentLeft}px`,r.root.style.width=s.contentWidth-s.verticalScrollbarWidth+"px",r.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),n.add(_t(o=>{r.root.style.fontFamily=this._editorObs.getOption(49).read(o),r.root.style.fontSize=this._editorObs.getOption(52).read(o)+"px",r.root.style.lineHeight=this._editorObs.getOption(67).read(o)+"px"})),n.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:Xl(0),position:Xl(null),domNode:r.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}}});function LSi(i,e,t){return Ny(void 0,n=>e(i.read(n)),(n,r)=>i.set(t(n),r))}function NSi(i,e){let t=new te;return t.add(_t(n=>{let r=i.read(n);e.set(r,void 0)})),t.add(_t(n=>{let r=e.read(n);i.set(r,void 0)})),t}var kSi,ISi,Fhe,Ohe,_3,u5e,d5e=D(()=>{Ye();dRe();ae();Tn();$h();tSt();ii();$x();oC();HE();Ng();Yf();vs();FBe();c5e();xde();ht();kSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ISi=function(i,e){return function(t,n){e(t,n,i)}},Fhe=class{constructor(e,t,n){this.range=e,this.newLines=t,this.changes=n}},Ohe=class extends W{constructor(e,t,n,r){super(),this._editor=e,this._edit=t,this._userPrompt=n,this._instantiationService=r,this._editorObs=Il(this._editor),this._elements=pi("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[pi("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[pi("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),pi("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),pi("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),Zk("svg",{style:{overflow:"visible",pointerEvents:"none"}},[Zk("defs",[Zk("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[Zk("stop",{offset:"0%",class:"gradient-stop"}),Zk("stop",{offset:"100%",class:"gradient-stop"})])]),Zk("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(ip,"",ps,ip.DEFAULT_CREATION_OPTIONS,null)),this._setText=st(s=>{let a=this._edit.read(s);a&&this._previewTextModel.setValue(a.newLines.join(` -`))}).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(ip,"",ps,ip.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(pu,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:gse},{contributions:sy.getSomeEditorContributions([hm.ID,jN.ID,RN.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(pu,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=Il(this._previewEditor),this._decorations=st(this,s=>{this._setText.read(s);let a=this._edit.read(s)?.changes;if(!a)return[];let l=[],c=[];if(a.length===1&&a[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(let u of a)if(u.original.isEmpty||l.push({range:u.original.toInclusiveRange(),options:Xx}),u.modified.isEmpty||c.push({range:u.modified.toInclusiveRange(),options:iN}),u.modified.isEmpty||u.original.isEmpty)u.original.isEmpty||l.push({range:u.original.toInclusiveRange(),options:YP}),u.modified.isEmpty||c.push({range:u.modified.toInclusiveRange(),options:GP});else for(let d of u.innerChanges||[])u.original.contains(d.originalRange.startLineNumber)&&l.push({range:d.originalRange,options:d.originalRange.isEmpty()?KP:Nv}),u.modified.contains(d.modifiedRange.startLineNumber)&&c.push({range:d.modifiedRange,options:d.modifiedRange.isEmpty()?qP:nN});return c}),this._layout1=st(this,s=>{let a=this._editor.getModel(),l=this._edit.read(s);if(!l)return null;let c=l.range,u=0;for(let f=c.startLineNumber;f{let a=this._edit.read(s);if(!a)return null;let l=a.range,c=this._editorObs.scrollLeft.read(s),u=this._layout1.read(s).left+20-c,d=this._editor.getTopForLineNumber(l.startLineNumber)-this._editorObs.scrollTop.read(s),h=this._editor.getTopForLineNumber(l.endLineNumberExclusive)-this._editorObs.scrollTop.read(s),f=new _3(u,d),p=new _3(u,h),g=h-d,v=50,A=this._editor.getOption(67)*a.newLines.length,w=g-A,C=new _3(u+v,d+w/2),_=new _3(u+v,h-w/2);return{topCode:f,bottomCode:p,codeHeight:g,topEdit:C,bottomEdit:_,editHeight:A}});let o=st(this,s=>this._edit.read(s)!==void 0||this._userPrompt.read(s)!==void 0);this._register(up(this._elements.root,{display:st(this,s=>o.read(s)?"block":"none")})),this._register(Jx(this._editor.getDomNode(),this._elements.root)),this._register(Il(e).createOverlayWidget({domNode:this._elements.root,position:Xl(null),allowEditorOverflow:!1,minContentWidthInPx:st(s=>{let a=this._layout1.read(s)?.left;if(a===void 0)return 0;let l=this._previewEditorObs.contentWidth.read(s);return a+l})})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register(_t(s=>{let a=this._layout.read(s);if(!a)return;let{topCode:l,bottomCode:c,topEdit:u,bottomEdit:d,editHeight:h}=a,f=10,p=0,g=40,v=new u5e().moveTo(l).lineTo(l.deltaX(f)).curveTo(l.deltaX(f+g),u.deltaX(-g-p),u.deltaX(-p)).lineTo(u).lineTo(d).lineTo(d.deltaX(-p)).curveTo(d.deltaX(-g-p),c.deltaX(f+g),c.deltaX(f)).lineTo(c).build();this._elements.path.setAttribute("d",v),this._elements.editorContainer.style.top=`${u.y}px`,this._elements.editorContainer.style.left=`${u.x}px`,this._elements.editorContainer.style.height=`${h}px`;let A=this._previewEditorObs.contentWidth.read(s);this._previewEditor.layout({height:h,width:A})})),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(NSi(LSi(this._userPrompt,s=>s??"",s=>s),Il(this._promptEditor).value)),this._register(_t(s=>{let a=Il(this._promptEditor).isFocused.read(s);this._elements.root.classList.toggle("focused",a)}))}};Ohe=kSi([ISi(3,Ne)],Ohe);_3=class i{constructor(e,t){this.x=e,this.y=t}deltaX(e){return new i(this.x+e,this.y)}},u5e=class{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,t,n){return this._data+=`C ${e.x} ${e.y} ${t.x} ${t.y} ${n.x} ${n.y} `,this}build(){return this._data}}});var MSi,h5e,yU,Phe,f5e,p5e,iSt=D(()=>{Jt();sn();ky();Lt();ae();Tn();$h();mn();CH();md();tr();Ui();Zc();J3e();d5e();MSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},h5e=function(i,e){return function(t,n){e(t,n,i)}},Phe=class extends W{static{yU=this}static{this._modelId=0}static _createUniqueUri(){return Xe.from({scheme:"inline-edits",path:new Date().toString()+String(yU._modelId++)})}constructor(e,t,n,r,o,s,a){super(),this.textModel=e,this._textModelVersionId=t,this._selection=n,this._debounceValue=r,this.languageFeaturesService=o,this._diffProviderFactoryService=s,this._modelService=a,this._forceUpdateExplicitlySignal=Cg(this),this._selectedInlineCompletionId=Gt(this,void 0),this._isActive=Gt(this,!1),this._originalModel=fa(()=>this._modelService.createModel("",null,yU._createUniqueUri())).keepObserved(this._store),this._modifiedModel=fa(()=>this._modelService.createModel("",null,yU._createUniqueUri())).keepObserved(this._store),this._pinnedRange=new p5e(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map(l=>!!l),this.userPrompt=Gt(this,void 0),this.inlineEdit=st(this,l=>this._inlineEdit.read(l)?.promiseResult.read(l)?.data),this._inlineEdit=st(this,l=>{let c=this.selectedInlineEdit.read(l);if(!c)return;let u=c.inlineCompletion.range;if(c.inlineCompletion.insertText.trim()==="")return;let d=c.inlineCompletion.insertText.split(/\r\n|\r|\n/);function h(v){let A=v[0].match(/^\s*/)?.[0]??"";return v.map(w=>w.replace(new RegExp("^"+A),""))}d=h(d);let p=this.textModel.getValueInRange(u).split(/\r\n|\r|\n/);p=h(p),this._originalModel.get().setValue(p.join(` +}`)})),this._register(new Kfe(this.editor,this._currentWidget,this.instantiationService)),this._register(new Xfe(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit){this._isCursorAtInlineEditContext.set(!1);return}let t=this._currentEdit.get();if(!t){this._isCursorAtInlineEditContext.set(!1);return}this._isCursorAtInlineEditContext.set(R.containsPosition(t.range,e))}validateInlineEdit(e,t){if(t.text.includes(` +`)&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){if(t.range.startColumn!==1)return!1;let o=t.range.endLineNumber,r=t.range.endColumn,s=e.getModel()?.getLineLength(o)??0;if(r!==s+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);let n=e.getModel();if(!n)return;let o=n.getVersionId(),r=this.languageFeaturesService.inlineEditProvider.all(n);if(r.length===0)return;let s=r[0];this._currentRequestCts=new Mi;let a=this._currentRequestCts.token,l=t?B6.Automatic:B6.Invoke;if(t&&await wbi(50,a),a.isCancellationRequested||n.isDisposed()||n.getVersionId()!==o)return;let u=await s.provideInlineEdit(n,{triggerKind:l},a);if(u&&!(a.isCancellationRequested||n.isDisposed()||n.getVersionId()!==o)&&this.validateInlineEdit(e,u))return u}async getInlineEdit(e,t){this._isCursorAtInlineEditContext.set(!1),await this.clear();let n=await this.fetchInlineEdit(e,t);n&&this._currentEdit.set(n,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);let e=this._currentEdit.get();if(!e)return;let t=e.text;e.text.startsWith(` +`)&&(t=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[kn.replace(R.lift(e.range),t)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,ln),this.freeEdit(e),fn(n=>{this._currentEdit.set(void 0,n),this._isAccepting.set(!1,n)})}jumpToCurrent(){this._jumpBackPosition=this.editor.getSelection()?.getStartPosition();let e=this._currentEdit.get();if(!e)return;let t=J.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(t),this.editor.revealPositionInCenterIfOutsideViewport(t)}async clear(e=!0){let t=this._currentEdit.get();t&&t?.rejected&&e&&await this._commandService.executeCommand(t.rejected.id,...t.rejected.arguments||[]).then(void 0,ln),t&&this.freeEdit(t),this._currentEdit.set(void 0,void 0)}freeEdit(e){let t=this.editor.getModel();if(!t)return;let n=this.languageFeaturesService.inlineEditProvider.all(t);n.length!==0&&n[0].freeInlineEdit(e)}};Zu=Xj=ybi([C2(1,Re),C2(2,Ze),C2(3,Me),C2(4,Ii),C2(5,Et),C2(6,CC),C2(7,an)],Zu)});var Zfe,$fe,epe,tpe,ipe,iCt=D(()=>{Jt();An();Yxt();I5e();go();Bt();Zfe=class extends Pe{constructor(){super({id:jxt,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:ge.and(V.writable,Zu.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:ge.and(V.writable,Zu.inlineEditVisibleContext,Zu.cursorAtInlineEditContext)}],menuOpts:[{menuId:tt.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){await Zu.get(t)?.accept()}},$fe=class extends Pe{constructor(){let e=ge.and(V.writable,ge.not(Zu.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){Zu.get(t)?.trigger()}},epe=class extends Pe{constructor(){let e=ge.and(V.writable,Zu.inlineEditVisibleContext,ge.not(Zu.cursorAtInlineEditKey));super({id:Gxt,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:tt.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){Zu.get(t)?.jumpToCurrent()}},tpe=class extends Pe{constructor(){let e=ge.and(V.writable,Zu.cursorAtInlineEditContext);super({id:qxt,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:tt.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){Zu.get(t)?.jumpBack()}},ipe=class extends Pe{constructor(){let e=ge.and(V.writable,Zu.inlineEditVisibleContext);super({id:Qxt,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:tt.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){await Zu.get(t)?.clear()}}});var nCt=D(()=>{Jt();iCt();I5e();Ce(Zfe);Ce(ipe);Ce(epe);Ce(tpe);Ce($fe);St(Zu.ID,Zu,3)});var oCt,rCt,sCt,PD,aCt,L5e=D(()=>{Be();Bt();oCt="editor.action.inlineEdits.accept",rCt="editor.action.inlineEdits.showPrevious",sCt="editor.action.inlineEdits.showNext",PD=new ze("inlineEditsVisible",!1,y("inlineEditsVisible","Whether an inline edit is visible")),aCt=new ze("inlineEditsIsPinned",!1,y("isPinned","Whether an inline edit is visible"))});var lCt=D(()=>{});function xbi(i,e){return $y(i,(t,n)=>n===!0?!0:e(t))}var _2,N5e=D(()=>{Ye();qy();de();In();hf();_C();_2=class extends H{static{this.ID="editor.contrib.placeholderText"}constructor(e){super(),this._editor=e,this._editorObs=Fl(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=ec({owner:this,equalsFn:cP},t=>{let n=this._placeholderText.read(t);if(n&&this._editorObs.valueIsEmpty.read(t))return{placeholder:n}}),this._shouldViewBeAlive=xbi(this,t=>this._state.read(t)?.placeholder!==void 0),this._view=ph((t,n)=>{if(!this._shouldViewBeAlive.read(t))return;let o=ci("div.editorPlaceholder");n.add(Ct(r=>{let s=this._state.read(r),a=s?.placeholder!==void 0;o.root.style.display=a?"block":"none",o.root.innerText=s?.placeholder??""})),n.add(Ct(r=>{let s=this._editorObs.layoutInfo.read(r);o.root.style.left=`${s.contentLeft}px`,o.root.style.width=s.contentWidth-s.verticalScrollbarWidth+"px",o.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),n.add(Ct(r=>{o.root.style.fontFamily=this._editorObs.getOption(49).read(r),o.root.style.fontSize=this._editorObs.getOption(52).read(r)+"px",o.root.style.lineHeight=this._editorObs.getOption(67).read(r)+"px"})),n.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:tc(0),position:tc(null),domNode:o.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}}});function Sbi(i,e,t){return Jy(void 0,n=>e(i.read(n)),(n,o)=>i.set(t(n),o))}function Ebi(i,e){let t=new se;return t.add(Ct(n=>{let o=i.read(n);e.set(o,void 0)})),t.add(Ct(n=>{let o=e.read(n);i.set(o,void 0)})),t}var Cbi,_bi,npe,ope,g4,M5e,R5e=D(()=>{Ye();RRe();de();In();hf();lCt();Jt();_C();IC();dD();Gg();sp();bs();o3e();N5e();jhe();ht();Cbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},_bi=function(i,e){return function(t,n){e(t,n,i)}},npe=class{constructor(e,t,n){this.range=e,this.newLines=t,this.changes=n}},ope=class extends H{constructor(e,t,n,o){super(),this._editor=e,this._edit=t,this._userPrompt=n,this._instantiationService=o,this._editorObs=Fl(this._editor),this._elements=ci("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[ci("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[ci("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),ci("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),ci("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),NI("svg",{style:{overflow:"visible",pointerEvents:"none"}},[NI("defs",[NI("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[NI("stop",{offset:"0%",class:"gradient-stop"}),NI("stop",{offset:"100%",class:"gradient-stop"})])]),NI("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(pp,"",fs,pp.DEFAULT_CREATION_OPTIONS,null)),this._setText=at(s=>{let a=this._edit.read(s);a&&this._previewTextModel.setValue(a.newLines.join(` +`))}).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(pp,"",fs,pp.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(xu,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:Bae},{contributions:_y.getSomeEditorContributions([km.ID,_2.ID,p2.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(xu,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=Fl(this._previewEditor),this._decorations=at(this,s=>{this._setText.read(s);let a=this._edit.read(s)?.changes;if(!a)return[];let l=[],c=[];if(a.length===1&&a[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(let u of a)if(u.original.isEmpty||l.push({range:u.original.toInclusiveRange(),options:xC}),u.modified.isEmpty||c.push({range:u.modified.toInclusiveRange(),options:ON}),u.modified.isEmpty||u.original.isEmpty)u.original.isEmpty||l.push({range:u.original.toInclusiveRange(),options:VB}),u.modified.isEmpty||c.push({range:u.modified.toInclusiveRange(),options:BB});else for(let d of u.innerChanges||[])u.original.contains(d.originalRange.startLineNumber)&&l.push({range:d.originalRange,options:d.originalRange.isEmpty()?HB:ZA}),u.modified.contains(d.modifiedRange.startLineNumber)&&c.push({range:d.modifiedRange,options:d.modifiedRange.isEmpty()?zB:PN});return c}),this._layout1=at(this,s=>{let a=this._editor.getModel(),l=this._edit.read(s);if(!l)return null;let c=l.range,u=0;for(let f=c.startLineNumber;f{let a=this._edit.read(s);if(!a)return null;let l=a.range,c=this._editorObs.scrollLeft.read(s),u=this._layout1.read(s).left+20-c,d=this._editor.getTopForLineNumber(l.startLineNumber)-this._editorObs.scrollTop.read(s),h=this._editor.getTopForLineNumber(l.endLineNumberExclusive)-this._editorObs.scrollTop.read(s),f=new g4(u,d),p=new g4(u,h),g=h-d,A=50,v=this._editor.getOption(67)*a.newLines.length,w=g-v,C=new g4(u+A,d+w/2),_=new g4(u+A,h-w/2);return{topCode:f,bottomCode:p,codeHeight:g,topEdit:C,bottomEdit:_,editHeight:v}});let r=at(this,s=>this._edit.read(s)!==void 0||this._userPrompt.read(s)!==void 0);this._register(xp(this._elements.root,{display:at(this,s=>r.read(s)?"block":"none")})),this._register(wC(this._editor.getDomNode(),this._elements.root)),this._register(Fl(e).createOverlayWidget({domNode:this._elements.root,position:tc(null),allowEditorOverflow:!1,minContentWidthInPx:at(s=>{let a=this._layout1.read(s)?.left;if(a===void 0)return 0;let l=this._previewEditorObs.contentWidth.read(s);return a+l})})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register(Ct(s=>{let a=this._layout.read(s);if(!a)return;let{topCode:l,bottomCode:c,topEdit:u,bottomEdit:d,editHeight:h}=a,f=10,p=0,g=40,A=new M5e().moveTo(l).lineTo(l.deltaX(f)).curveTo(l.deltaX(f+g),u.deltaX(-g-p),u.deltaX(-p)).lineTo(u).lineTo(d).lineTo(d.deltaX(-p)).curveTo(d.deltaX(-g-p),c.deltaX(f+g),c.deltaX(f)).lineTo(c).build();this._elements.path.setAttribute("d",A),this._elements.editorContainer.style.top=`${u.y}px`,this._elements.editorContainer.style.left=`${u.x}px`,this._elements.editorContainer.style.height=`${h}px`;let v=this._previewEditorObs.contentWidth.read(s);this._previewEditor.layout({height:h,width:v})})),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(Ebi(Sbi(this._userPrompt,s=>s??"",s=>s),Fl(this._promptEditor).value)),this._register(Ct(s=>{let a=Fl(this._promptEditor).isFocused.read(s);this._elements.root.classList.toggle("focused",a)}))}};ope=Cbi([_bi(3,Re)],ope);g4=class i{constructor(e,t){this.x=e,this.y=t}deltaX(e){return new i(this.x+e,this.y)}},M5e=class{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,t,n){return this._data+=`C ${e.x} ${e.y} ${t.x} ${t.y} ${n.x} ${n.y} `,this}build(){return this._data}}});var Dbi,F5e,Zj,rpe,O5e,P5e,cCt=D(()=>{Gt();sn();qy();Tt();de();In();hf();mn();tU();_d();ro();Hi();su();v4e();R5e();Dbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},F5e=function(i,e){return function(t,n){e(t,n,i)}},rpe=class extends H{static{Zj=this}static{this._modelId=0}static _createUniqueUri(){return Je.from({scheme:"inline-edits",path:new Date().toString()+String(Zj._modelId++)})}constructor(e,t,n,o,r,s,a){super(),this.textModel=e,this._textModelVersionId=t,this._selection=n,this._debounceValue=o,this.languageFeaturesService=r,this._diffProviderFactoryService=s,this._modelService=a,this._forceUpdateExplicitlySignal=Pg(this),this._selectedInlineCompletionId=Ut(this,void 0),this._isActive=Ut(this,!1),this._originalModel=ya(()=>this._modelService.createModel("",null,Zj._createUniqueUri())).keepObserved(this._store),this._modifiedModel=ya(()=>this._modelService.createModel("",null,Zj._createUniqueUri())).keepObserved(this._store),this._pinnedRange=new P5e(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map(l=>!!l),this.userPrompt=Ut(this,void 0),this.inlineEdit=at(this,l=>this._inlineEdit.read(l)?.promiseResult.read(l)?.data),this._inlineEdit=at(this,l=>{let c=this.selectedInlineEdit.read(l);if(!c)return;let u=c.inlineCompletion.range;if(c.inlineCompletion.insertText.trim()==="")return;let d=c.inlineCompletion.insertText.split(/\r\n|\r|\n/);function h(A){let v=A[0].match(/^\s*/)?.[0]??"";return A.map(w=>w.replace(new RegExp("^"+v),""))}d=h(d);let p=this.textModel.getValueInRange(u).split(/\r\n|\r|\n/);p=h(p),this._originalModel.get().setValue(p.join(` `)),this._modifiedModel.get().setValue(d.join(` -`));let g=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return tL.fromFn(async()=>{let v=await g.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},Ft.None);if(!v.identical)return new Fhe(Yt.fromRangeInclusive(u),h(d),v.changes)})}),this._fetchStore=this._register(new te),this._inlineEditsFetchResult=Ly(this,void 0),this._inlineEdits=Jl({owner:this,equalsFn:bO},l=>this._inlineEditsFetchResult.read(l)?.completions.map(c=>new f5e(c))??[]),this._fetchInlineEditsPromise=Vz({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:Lf.Automatic}),handleChange:(l,c)=>(l.didChange(this._forceUpdateExplicitlySignal)&&(c.inlineCompletionTriggerKind=Lf.Explicit),!0)},async(l,c)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(l),this._textModelVersionId.read(l);function u(g,v){return v(g)}let d=this._pinnedRange.range.read(l)??u(this._selection.read(l),g=>g.isEmpty()?void 0:g);if(!d){this._inlineEditsFetchResult.set(void 0,void 0),this.userPrompt.set(void 0,void 0);return}let h={triggerKind:c.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(l)},f=O5(this._fetchStore);await Jd(200,f);let p=await ede(this.languageFeaturesService.inlineCompletionsProvider,d,this.textModel,h,f);f.isCancellationRequested||this._inlineEditsFetchResult.set(p,void 0)}),this._filteredInlineEditItems=Jl({owner:this,equalsFn:$I()},l=>this._inlineEdits.read(l)),this.selectedInlineCompletionIndex=st(this,l=>{let c=this._selectedInlineCompletionId.read(l),u=this._filteredInlineEditItems.read(l),d=this._selectedInlineCompletionId===void 0?-1:u.findIndex(h=>h.semanticId===c);return d===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):d}),this.selectedInlineEdit=st(this,l=>{let c=this._filteredInlineEditItems.read(l),u=this.selectedInlineCompletionIndex.read(l);return c[u]}),this._register(qb(this._fetchInlineEditsPromise))}async triggerExplicitly(e){xg(e,t=>{this._isActive.set(!0,t),this._forceUpdateExplicitlySignal.trigger(t)}),await this._fetchInlineEditsPromise.get()}stop(e){xg(e,t=>{this.userPrompt.set(void 0,t),this._isActive.set(!1,t),this._inlineEditsFetchResult.set(void 0,t),this._pinnedRange.setRange(void 0,t)})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();let t=this._filteredInlineEditItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new vi;let t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}};Phe=yU=MSi([h5e(4,Le),h5e(5,Zx),h5e(6,an)],Phe);f5e=class{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}},p5e=class extends W{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=Gt(this,[]),this.range=st(this,n=>{this._versionId.read(n);let r=this._decorations.read(n)[0];return r?this._textModel.getDecorationRange(r)??null:null}),this._register(Ve(()=>{this._textModel.deltaDecorations(this._decorations.get(),[])}))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}});function FSi(i){return Ny(void 0,e=>i(e).read(e),(e,t)=>{i(void 0).set(e,t)})}var RSi,wU,m5e,Wv,g5e=D(()=>{ae();Tn();$h();$x();XP();Hn();Kp();Ui();l5e();iSt();d5e();nr();Wt();ht();kFe();RSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wU=function(i,e){return function(t,n){e(t,n,i)}},Wv=class extends W{static{m5e=this}static{this.ID="editor.contrib.inlineEditsController"}static get(e){return e.getContribution(m5e.ID)}constructor(e,t,n,r,o,s){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=n,this._debounceService=r,this._languageFeaturesService=o,this._configurationService=s,this._enabled=Avt("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=Il(this.editor),this._selection=st(this,a=>this._editorObs.cursorSelection.read(a)??new qe(1,1,1,1)),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=fa(this,a=>{if(!this._enabled.read(a)||this._editorObs.isReadonly.read(a))return;let l=this._editorObs.model.read(a);return l?this._instantiationService.createInstance(lu(Phe,a),l,this._editorObs.versionId,this._selection,this._debounceValue):void 0}),this._hadInlineEdit=Fy(this,(a,l)=>l||this.model.read(a)?.inlineEdit.read(a)!==void 0),this._widget=fa(this,a=>{if(this._hadInlineEdit.read(a))return this._instantiationService.createInstance(lu(Ohe,a),this.editor,this.model.map((l,c)=>l?.inlineEdit.read(c)),FSi(l=>this.model.read(l)?.userPrompt??Gt("empty","")))}),this._register(Mg(fD,this._contextKeyService,a=>!!this.model.read(a)?.inlineEdit.read(a))),this._register(Mg(eSt,this._contextKeyService,a=>!!this.model.read(a)?.isPinned.read(a))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}};Wv=m5e=RSi([wU(1,Ne),wU(2,Ze),wU(3,da),wU(4,Le),wU(5,kt)],Wv)});function xU(i){return{label:i.value,alias:i.original}}var Bhe,zhe,Vhe,Hhe,Whe,nSt=D(()=>{er();Tn();Gb();ii();oC();vn();l5e();g5e();Oe();fr();Wt();Bhe=class i extends Fe{static{this.ID=$_t}constructor(){super({id:i.ID,...xU(Bt("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:me.and(V.writable,fD),kbOpts:{weight:100,primary:606}})}async run(e,t){Wv.get(t)?.model.get()?.next()}},zhe=class i extends Fe{static{this.ID=Z_t}constructor(){super({id:i.ID,...xU(Bt("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:me.and(V.writable,fD),kbOpts:{weight:100,primary:604}})}async run(e,t){Wv.get(t)?.model.get()?.previous()}},Vhe=class extends Fe{constructor(){super({id:"editor.action.inlineEdits.trigger",...xU(Bt("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:V.writable})}async run(e,t){let n=Wv.get(t);await Kte(async r=>{await n?.model.get()?.triggerExplicitly(r)})}},Hhe=class extends Fe{constructor(){super({id:X_t,...xU(Bt("action.inlineEdits.accept","Accept Inline Edit")),precondition:fD,menuOpts:{menuId:tt.InlineEditsActions,title:y("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:Ee.check},kbOpts:{primary:2058,weight:2e4,kbExpr:fD}})}async run(e,t){t instanceof pu&&(t=t.getParentEditor());let n=Wv.get(t);n&&(n.model.get()?.accept(n.editor),n.editor.focus())}},Whe=class i extends Fe{static{this.ID="editor.action.inlineEdits.hide"}constructor(){super({id:i.ID,...xU(Bt("action.inlineEdits.hide","Hide Inline Edit")),precondition:fD,kbOpts:{weight:100,primary:9}})}async run(e,t){let n=Wv.get(t);fn(r=>{n?.model.get()?.stop(r)})}}});var rSt=D(()=>{ii();nSt();g5e();Tt(Wv.ID,Wv,3);xe(Vhe);xe(Bhe);xe(zhe);xe(Hhe);xe(Whe)});async function b5e(i,e,t,n,r){let o=i.ordered(e);for(let s of o)try{let a=await s.provideSignatureHelp(e,t,r,n);if(a)return a}catch(a){ln(a)}}var mC,Uhe=D(()=>{sn();Lt();gn();mn();Nt();tr();Ui();Yp();Xn();Wt();mC={Visible:new Pe("parameterHintsVisible",!1),MultipleSignatures:new Pe("parameterHintsMultipleSignatures",!1)};ci.registerCommand("_executeSignatureHelpProvider",async(i,...e)=>{let[t,n,r]=e;yi(Xe.isUri(t)),yi(K.isIPosition(n)),yi(typeof r=="string"||!r);let o=i.get(Le),s=await i.get(xs).createModelReference(t);try{let a=await b5e(o.signatureHelpProvider,s.object.textEditorModel,K.lift(n),{triggerKind:Pm.Invoke,isRetrigger:!1,triggerCharacter:r},Ft.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}})});function OSi(i,e){switch(e.triggerKind){case Pm.Invoke:return e;case Pm.ContentChange:return i;case Pm.TriggerCharacter:default:return e}}var pD,jhe,oSt=D(()=>{Jt();Lt();et();ae();kI();tr();Uhe();(function(i){i.Default={type:0};class e{constructor(r,o){this.request=r,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(r){this.hints=r,this.type=1}}i.Active=t})(pD||(pD={}));jhe=class i extends W{static{this.DEFAULT_DELAY=120}constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new G),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=pD.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new On),this.triggerChars=new lx,this.retriggerChars=new lx,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new ra(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(r=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(r=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(r=>this.onCursorChange(r))),this._register(this.editor.onDidChangeModelContent(r=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(r=>this.onDidType(r))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=pD.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let n=this.editor.getModel();if(!n||!this.providers.has(n))return;let r=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(r),t).catch(pt)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(86).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,r=this.editor.getOption(86).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new pD.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){let t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let r=this._pendingTriggers.reduce(OSi);this._pendingTriggers=[];let o={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new pD.Pending(hr(l=>b5e(this.providers,s,a,o,l)),n);try{let l=await this.state.request;return e!==this.triggerId?(l?.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new pD.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=pD.Default),pt(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let n of t.signatureHelpTriggerCharacters||[])if(n.length){let r=n.charCodeAt(0);this.triggerChars.add(r),this.retriggerChars.add(r)}for(let n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:Pm.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Pm.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Pm.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}});var sSt=D(()=>{});var PSi,Qhe,v5e,pm,BSi,zSi,Ghe,aSt=D(()=>{Ye();Yl();Ag();er();et();ae();Pt();gn();sSt();Ks();Sl();vx();Uhe();Oe();Wt();vd();eo();sp();Dr();id();eh();PSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Qhe=function(i,e){return function(t,n){e(t,n,i)}},pm=we,BSi=kn("parameter-hints-next",Ee.chevronDown,y("parameterHintsNextIcon","Icon for show next parameter hint.")),zSi=kn("parameter-hints-previous",Ee.chevronUp,y("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ghe=class extends W{static{v5e=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,n,r,o,s){super(),this.editor=e,this.model=t,this.telemetryService=s,this.renderDisposeables=this._register(new te),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Zh({editor:e},o,r)),this.keyVisible=mC.Visible.bindTo(n),this.keyMultipleSignatures=mC.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=pm(".editor-widget.parameter-hints-widget"),t=be(e,pm(".phwrapper"));t.tabIndex=-1;let n=be(t,pm(".controls")),r=be(n,pm(".button"+ut.asCSSSelector(zSi))),o=be(n,pm(".overloads")),s=be(n,pm(".button"+ut.asCSSSelector(BSi)));this._register(re(r,"click",h=>{Ai.stop(h),this.previous()})),this._register(re(s,"click",h=>{Ai.stop(h),this.next()}));let a=pm(".body"),l=new Ub(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=be(a,pm(".signature")),u=be(a,pm(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:o,docs:u,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));let d=()=>{if(!this.domNodes)return;let h=this.editor.getOption(50),f=this.domNodes.element;f.style.fontSize=`${h.fontSize}px`,f.style.lineHeight=`${h.lineHeight/h.fontSize}`,f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",h.fontFamily),f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",_l.fontFamily)};d(),this._register(Se.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(f=>f.hasChanged(50)))(d)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;let t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let n=e.signatures[e.activeSignature];if(!n)return;let r=be(this.domNodes.signature,pm(".code")),o=n.parameters.length>0,s=n.activeParameter??e.activeParameter;if(o)this.renderParameters(r,n,s);else{let c=be(r,pm("span"));c.textContent=n.label}let a=n.parameters[s];if(a?.documentation){let c=pm("span.documentation");if(typeof a.documentation=="string")c.textContent=a.documentation;else{let u=this.renderMarkdownDocs(a.documentation);c.appendChild(u.element)}be(this.domNodes.docs,pm("p",{},c))}if(n.documentation!==void 0)if(typeof n.documentation=="string")be(this.domNodes.docs,pm("p",{},n.documentation));else{let c=this.renderMarkdownDocs(n.documentation);be(this.domNodes.docs,c.element)}let l=this.hasDocs(n,a);if(this.domNodes.signature.classList.toggle("has-docs",l),this.domNodes.docs.classList.toggle("empty",!l),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,a){let c="",u=n.parameters[s];Array.isArray(u.label)?c=n.label.substring(u.label[0],u.label[1]):c=u.label,u.documentation&&(c+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),n.documentation&&(c+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==c&&(gs(y("hint","{0}, hint",c)),this.announcedLabel=c)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=new Ar,n=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));n.element.classList.add("markdown-docs");let r=t.elapsed();return r>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:r}),n}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&db(t.documentation).length>0||t&&typeof t.documentation=="object"&&db(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&db(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&db(e.documentation.value).length>0)}renderParameters(e,t,n){let[r,o]=this.getParameterLabelOffsets(t,n),s=document.createElement("span");s.textContent=t.label.substring(0,r);let a=document.createElement("span");a.textContent=t.label.substring(r,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),be(e,s,a,l)}getParameterLabelOffsets(e,t){let n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){let r=new RegExp(`(\\W|^)${Ja(n.label)}(?=\\W|$)`,"g");r.test(e.label);let o=r.lastIndex-n.label.length;return o>=0?[o,r.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return v5e.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};Ghe=v5e=PSi([Qhe(2,Ze),Qhe(3,jo),Qhe(4,rn),Qhe(5,io)],Ghe);j("editorHoverWidget.highlightForeground",CS,y("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var VSi,lSt,A5e,S3,y5e,w5e,x5e,cSt=D(()=>{nv();ae();ii();vn();tr();Ui();oSt();Uhe();Oe();Wt();ht();aSt();VSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lSt=function(i,e){return function(t,n){e(t,n,i)}},S3=class extends W{static{A5e=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(A5e.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new jhe(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(r=>{r?(this.widget.value.show(),this.widget.value.render(r)):this.widget.rawValue?.hide()})),this.widget=new Ys(()=>this._register(t.createInstance(Ghe,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};S3=A5e=VSi([lSt(1,Ne),lSt(2,Le)],S3);y5e=class extends Fe{constructor(){super({id:"editor.action.triggerParameterHints",label:y("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:V.hasSignatureHelpProvider,kbOpts:{kbExpr:V.editorTextFocus,primary:3082,weight:100}})}run(e,t){S3.get(t)?.trigger({triggerKind:Pm.Invoke})}};Tt(S3.ID,S3,2);xe(y5e);w5e=175,x5e=Sr.bindToContribution(S3.get);Qe(new x5e({id:"closeParameterHints",precondition:mC.Visible,handler:i=>i.cancel(),kbOpts:{weight:w5e,kbExpr:V.focus,primary:9,secondary:[1033]}}));Qe(new x5e({id:"showPrevParameterHint",precondition:me.and(mC.Visible,mC.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:w5e,kbExpr:V.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));Qe(new x5e({id:"showNextParameterHint",precondition:me.and(mC.Visible,mC.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:w5e,kbExpr:V.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var uSt=D(()=>{});function USi(i,e){return class extends e{constructor(){super(...arguments),this._autorun=void 0}init(...n){this._autorun=ts((r,o)=>{let s=lu(i(),r);o.add(this.instantiationService.createInstance(s,...n))})}dispose(){this._autorun?.dispose()}}}function dSt(i){return JP()?USi(i,_5e):i()}var HSi,WSi,C5e,_5e,hSt=D(()=>{gFe();XP();Tn();ht();HSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},WSi=function(i,e){return function(t,n){e(t,n,i)}},C5e=class{constructor(e){this.instantiationService=e}init(...e){}};_5e=class extends C5e{constructor(e,t){super(t),this.init(e)}};_5e=HSi([WSi(1,Ne)],_5e)});var fSt=D(()=>{uSt();ii();tm();Oe();lg();c5e();hSt();Tt(jN.ID,dSt(()=>jN),0);j("editor.placeholder.foreground",Jft,y("placeholderForeground","Foreground color of the placeholder text in the editor."))});var pSt=D(()=>{});var jSi,qhe,QSi,QN,ASr,Yhe,S5e,E5e,CU,mSt=D(()=>{Ye();gc();Yl();_g();Zl();mx();_x();Qt();Jt();sn();er();et();ae();id();gn();pSt();qp();Nt();We();tr();Oe();Wt();Yr();th();By();eo();Zn();jSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qhe=function(i,e){return function(t,n){e(t,n,i)}},QSi=!1,QN=new Pe("renameInputVisible",!1,y("renameInputVisible","Whether the rename input widget is visible")),ASr=new Pe("renameInputFocused",!1,y("renameInputFocused","Whether the rename input widget is focused")),Yhe=class{constructor(e,t,n,r,o,s){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=r,this._logService=s,this.allowEditorOverflow=!0,this._disposables=new te,this._visibleContextKey=QN.bindTo(o),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new Ar,this._inputWithButton=new E5e,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new S5e(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;let t=e.getColor(ty),n=e.getColor(RZ);this._domNode.style.backgroundColor=String(e.getColor(Kc)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=n?`1px solid ${n}`:"",this._domNode.style.color=String(e.getColor(PZ)??"");let r=e.getColor(BZ);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(a7)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(a7)??""),this._inputWithButton.domNode.style.borderWidth=r?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=r?"solid":"none",this._inputWithButton.domNode.style.borderColor=r?.toString()??"none"}_updateFont(){if(this._domNode===void 0)return;yi(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);let e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;let e=zh(this.getDomNode().ownerDocument.body),t=bn(this._editor.getDomNode()),n=this._getTopForPosition();this._nPxAvailableAbove=n+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;let r=this._editor.getOption(67),{totalHeight:o}=CU.getLayoutInfo({lineHeight:r}),s=this._nPxAvailableBelow>o*6?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){let[e,t]=this._acceptKeybindings;return this._label.innerText=y({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;yi(this._renameCandidateListView),yi(this._nPxAvailableAbove!==void 0),yi(this._nPxAvailableBelow!==void 0);let t=og(this._inputWithButton.domNode),n=og(this._label),r;e===2?r=this._nPxAvailableBelow:r=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:r-n-t,width:bc(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,n,r,o){let{start:s,end:a}=this._getSelection(e,t);this._renameCts=o;let l=new te;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,r===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=r,this._requestRenameCandidates(t,!1),l.add(re(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),l.add(re(this._inputWithButton.button,De.KEY_DOWN,u=>{let d=new Wi(u);(d.equals(3)||d.equals(10))&&(d.stopPropagation(),d.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",n),this._position=new K(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",s.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),l.add(Ve(()=>{this._renameCts=void 0,o.dispose(!0)})),l.add(Ve(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),l.add(Ve(()=>this._candidates.clear()));let c=new Pp;return c.p.finally(()=>{l.dispose(),this._hide()}),this._currentCancelInput=u=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),c.complete(u),!0),this._currentAcceptInput=u=>{this._trace("invoking _currentAcceptInput"),yi(this._renameCandidateListView!==void 0);let d=this._renameCandidateListView.nCandidates,h,f,p=this._renameCandidateListView.focusedCandidate;if(p!==void 0?(this._trace("using new name from renameSuggestion"),h=p,f={k:"renameSuggestion"}):(this._trace("using new name from inputField"),h=this._inputWithButton.input.value,f=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),h===t||h.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),c.complete({newName:h,wantsPreview:n&&u,stats:{source:f,nRenameSuggestions:d,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},l.add(o.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),QSi||l.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),c.p}_requestRenameCandidates(e,t){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),yi(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new Bi;let n=t?JT.Invoke:JT.Automatic,r=this._requestRenameCandidatesOnce(n,this._renameCandidateProvidersCts.token);if(r.length===0){this._inputWithButton.setSparkleButton();return}t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(r,e,this._renameCts.token)}}_getSelection(e,t){yi(this._editor.hasModel());let n=this._editor.getSelection(),r=0,o=t.length;return!N.isEmpty(n)&&!N.spansMultipleLines(n)&&N.containsRange(e,n)&&(r=Math.max(0,n.startColumn-e.startColumn),o=Math.min(e.endColumn,n.endColumn)-e.startColumn),{start:r,end:o}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,n){let r=(...c)=>this._trace("_updateRenameCandidates",...c);r("start");let o=await YA(Promise.allSettled(e),n);if(this._inputWithButton.setSparkleButton(),o===void 0){r("returning early - received updateRenameCandidates results - undefined");return}let s=o.flatMap(c=>c.status==="fulfilled"&&If(c.value)?c.value:[]);r(`received updateRenameCandidates results - total (unfiltered) ${s.length} candidates.`);let a=Uh(s,c=>c.newSymbolName);r(`distinct candidates - ${a.length} candidates.`);let l=a.filter(({newSymbolName:c})=>c.trim().length>0&&c!==this._inputWithButton.input.value&&c!==t&&!this._candidates.has(c));if(r(`valid distinct candidates - ${s.length} candidates.`),l.forEach(c=>this._candidates.add(c.newSymbolName)),l.length<1){r("returning early - no valid distinct candidates");return}r("setting candidates"),this._renameCandidateListView.setCandidates(l),r("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){let e=this._editor.getVisibleRanges(),t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Yhe=jSi([qhe(2,Bn),qhe(3,ni),qhe(4,Ze),qhe(5,no)],Yhe);S5e=class i{constructor(e,t){this._disposables=new te,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=i._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus(n=>{n.elements.length===1&&t.onFocusChange(n.elements[0].newSymbolName)},this._disposables),this._listWidget.onDidChangeSelection(n=>{n.elements.length===1&&t.onSelectionChange()},this._disposables),this._disposables.add(this._listWidget.onDidBlur(n=>{this._listWidget.setFocus([])})),this._listWidget.style(wv({listInactiveFocusForeground:Xw,listInactiveFocusBackground:Zw}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);let t=this._pickListHeight(this._listWidget.length),n=this._pickListWidth(e);this._listWidget.layout(t,n),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${n}px`,yd(y("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;let e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;let t=this._listWidget.getFocusedElements()[0];if(t!==void 0)return t.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;let e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();let t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;let e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();let t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();let t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){let{totalHeight:e}=CU.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){let t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){let t=Math.ceil(Math.max(...e.map(r=>r.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,n){let r=new class{getTemplateId(s){return"candidate"}getHeight(s){return t}},o=new class{constructor(){this.templateId="candidate"}renderTemplate(s){return new CU(s,n)}renderElement(s,a,l){l.populate(s)}disposeTemplate(s){s.dispose()}};return new il("NewSymbolNameCandidates",e,r,[o],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}},E5e=class{constructor(){this._onDidInputChange=new G,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new te}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",y("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=y("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=y("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=$l().setupManagedHover(ko("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(re(this.input,De.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(re(this.input,De.KEY_DOWN,e=>{let t=new Wi(e);(t.keyCode===15||t.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(re(this.input,De.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(re(this.input,De.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(re(this.input,De.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return yi(this._inputNode),this._inputNode}get button(){return yi(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=yy(Ee.sparkle),_o(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=yy(Ee.primitiveSquare),_o(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}},CU=class i{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${i._PADDING}px`;let n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width=n.style.height=`${t.lineHeight*.8}px`,this._domNode.appendChild(n),this._icon=yy(Ee.sparkle),this._icon.style.display="none",n.appendChild(this._icon),this._label=document.createElement("div"),mo(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){let t=!!e.tags?.includes(wY.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+i._PADDING*2}}dispose(){}}});async function qSi(i,e,t,n){let r=new _U(e,t,i),o=await r.resolveRenameLocation(Ft.None);return o?.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(n,Ft.None)}var GSi,mD,D5e,_U,gD,T5e,k5e,gSt=D(()=>{Yl();Jt();sn();Lt();Ad();ae();gn();mn();ii();KI();fs();Nt();We();vn();tr();Ui();ez();eC();wB();Oe();fr();cy();Wt();ht();th();_c();Qb();sa();eh();mSt();GSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mD=function(i,e){return function(t,n){e(t,n,i)}},_U=class{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` -`):void 0}:{range:N.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` -`):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,n,r){let o=this._providers[t];if(!o)return{edits:[],rejectReason:n.join(` -`)};let s=await o.provideRenameEdits(this.model,this.position,e,r);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),r)}else return this._provideRenameEdits(e,t+1,n.concat(y("no result","No result.")),r);return s}};gD=class{static{D5e=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(D5e.ID)}constructor(e,t,n,r,o,s,a,l,c){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=r,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._telemetryService=c,this._disposableStore=new te,this._cts=new Bi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Yhe,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){let e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new Bi,!this.editor.hasModel()){e("editor has no model");return}let t=this.editor.getPosition(),n=new _U(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!n.hasProvider()){e("skeleton has no provider");return}let r=new dp(this.editor,5,void 0,this._cts.token),o;try{e("resolving rename location");let p=n.resolveRenameLocation(r.token);this._progressService.showWhile(p,250),o=await p,e("resolved rename location")}catch(p){p instanceof Hc?e("resolve rename location cancelled",JSON.stringify(p,null," ")):(e("resolve rename location failed",p instanceof Error?p:JSON.stringify(p,null," ")),(typeof p=="string"||Xh(p))&&hu.get(this.editor)?.showMessage(p||y("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t));return}finally{r.dispose()}if(!o){e("returning early - no loc");return}if(o.rejectReason){e(`returning early - rejected with reason: ${o.rejectReason}`,o.rejectReason),hu.get(this.editor)?.showMessage(o.rejectReason,t);return}if(r.token.isCancellationRequested){e("returning early - cts1 cancelled");return}let s=new dp(this.editor,5,o.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),c=await Promise.all(l.map(async p=>[p,await p.supportsAutomaticNewSymbolNamesTriggerKind??!1])),u=(p,g)=>{let v=c.slice();return p===JT.Automatic&&(v=v.filter(([A,w])=>w)),v.map(([A])=>A.provideNewSymbolNames(a,o.range,p,g))};e("creating rename input field and awaiting its result");let d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameWidget.getInput(o.range,o.text,d,l.length>0?u:void 0,s);if(e("received response from rename input field"),l.length>0&&this._reportTelemetry(l.length,a.getLanguageId(),h),typeof h=="boolean"){e(`returning early - rename input field response - ${h}`),h&&this.editor.focus(),s.dispose();return}this.editor.focus(),e("requesting rename edits");let f=YA(n.provideRenameEdits(h.newName,s.token),s.token).then(async p=>{if(!p){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(p.rejectReason){e(`returning early - rejected with reason: ${p.rejectReason}`),this._notificationService.info(p.rejectReason);return}this.editor.setSelection(N.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(p,{editor:this.editor,showPreview:h.wantsPreview,label:y("label","Renaming '{0}' to '{1}'",o?.text,h.newName),code:"undoredo.rename",quotableLabel:y("quotableLabel","Renaming {0} to {1}",o?.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{e("edits applied"),g.ariaSummary&&gs(y("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,h.newName,g.ariaSummary))}).catch(g=>{e(`error when applying edits ${JSON.stringify(g,null," ")}`),this._notificationService.error(y("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})},p=>{e("error when providing rename edits",JSON.stringify(p,null," ")),this._notificationService.error(y("rename.failed","Rename failed to compute edits")),this._logService.error(p)}).finally(()=>{s.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,n){let r=typeof n=="boolean"?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:n.stats.source.k,nRenameSuggestions:n.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:n.stats.timeBeforeFirstInputFieldEdit,wantsPreview:n.wantsPreview,nRenameSuggestionsInvocations:n.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:n.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",r)}};gD=D5e=GSi([mD(1,Ne),mD(2,Cn),mD(3,Dy),mD(4,$f),mD(5,no),mD(6,RI),mD(7,Le),mD(8,io)],gD);T5e=class extends Fe{constructor(){super({id:"editor.action.rename",label:y("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:me.and(V.writable,V.hasRenameProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(ai),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return Xe.isUri(r)&&K.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},pt):super.runCommand(e,t)}run(e,t){let n=e.get(no),r=gD.get(t);return r?(n.trace("[RenameAction] got controller, running..."),r.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}};Tt(gD.ID,gD,4);xe(T5e);k5e=Sr.bindToContribution(gD.get);Qe(new k5e({id:"acceptRenameInput",precondition:QN,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:me.and(V.focus,me.not("isComposing")),primary:3}}));Qe(new k5e({id:"acceptRenameInputWithPreview",precondition:me.and(QN,me.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:me.and(V.focus,me.not("isComposing")),primary:2051}}));Qe(new k5e({id:"cancelRenameInput",precondition:QN,handler:i=>i.cancelRenameInput(),kbOpts:{weight:199,kbExpr:V.focus,primary:9,secondary:[1033]}}));Pn(class extends la{constructor(){super({id:"focusNextRenameSuggestion",title:{...Bt("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:QN,keybinding:[{primary:18,weight:199}]})}run(e){let t=e.get(ai).getFocusedCodeEditor();if(!t)return;let n=gD.get(t);n&&n.focusNextRenameSuggestion()}});Pn(class extends la{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...Bt("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:QN,keybinding:[{primary:16,weight:199}]})}run(e){let t=e.get(ai).getFocusedCodeEditor();if(!t)return;let n=gD.get(t);n&&n.focusPreviousRenameSuggestion()}});yc("_executeDocumentRenameProvider",function(i,e,t,...n){let[r]=n;yi(typeof r=="string");let{renameProvider:o}=i.get(Le);return qSi(o,e,t,r)});yc("_executePrepareRename",async function(i,e,t){let{renameProvider:n}=i.get(Le),o=await new _U(e,t,n).resolveRenameLocation(Ft.None);if(o?.rejectReason)throw new Error(o.rejectReason);return o});Gi.as(xc.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:y("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function KSi(i){return{range:i.range,options:zt.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:i.hasSeparatorLine?2:1,sectionHeaderText:i.text}})}}var YSi,bSt,Khe,vSt=D(()=>{Jt();ae();ii();ks();vs();xv();YSi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},bSt=function(i,e){return function(t,n){e(t,n,i)}},Khe=class extends W{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,n){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(r=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(r=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(r=>{let o=this.editor.getModel()?.getLanguageId();o&&r.affects(o)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(r=>{this.options&&!r.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(r=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(r=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new di(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;let t=this.editor.getModel().getLanguageId();if(!t)return;let n=this.languageConfigurationService.getLanguageConfiguration(t).comments,r=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!n&&!r?.markers))return{foldingRules:r,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;let e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;let t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(n=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(n)})}updateDecorations(e){let t=this.editor.getModel();t&&(e=e.filter(o=>{if(!o.shouldBeInComments)return!0;let s=t.validateRange(o.range),a=t.tokenization.getLineTokens(s.startLineNumber),l=a.findTokenIndexAtOffset(s.startColumn-1),c=a.getStandardTokenType(l);return a.getLanguageId(l)===t.getLanguageId()&&c===1}));let n=Object.values(this.currentOccurrences).map(o=>o.decorationId),r=e.map(o=>KSi(o));this.editor.changeDecorations(o=>{let s=o.deltaDecorations(n,r);this.currentOccurrences={};for(let a=0,l=s.length;a{AF();Si()});function SU(i){return i&&!!i.data}function M5e(i){return i&&Array.isArray(i.edits)}function R5e(i,e){return i.has(e)}function $Si(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function F5e(i,e,t,n,r){let o=$Si(i,e),s=await Promise.all(o.map(async a=>{let l,c=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?n:null,r)}catch(u){c=u,l=null}return(!l||!SU(l)&&!M5e(l))&&(l=null),new L5e(a,l,c)}));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null}function eEi(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function ySt(i,e){return i.has(e)}function wSt(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function Jhe(i,e,t,n){let r=wSt(i,e),o=await Promise.all(r.map(async s=>{let a;try{a=await s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){ln(l),a=null}return(!a||!SU(a))&&(a=null),new N5e(s,a)}));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null}var L5e,N5e,O5e=D(()=>{sn();Lt();mn();Zc();Xn();gn();ASt();We();Ui();L5e=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};N5e=class{constructor(e,t){this.provider=e,this.tokens=t}};ci.registerCommand("_provideDocumentSemanticTokensLegend",async(i,...e)=>{let[t]=e;yi(t instanceof Xe);let n=i.get(an).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(Le),o=eEi(r,n);return o?o[0].getLegend():i.get(Oi).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});ci.registerCommand("_provideDocumentSemanticTokens",async(i,...e)=>{let[t]=e;yi(t instanceof Xe);let n=i.get(an).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(Le);if(!R5e(r,n))return i.get(Oi).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let o=await F5e(r,n,null,null,Ft.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!SU(a))return;let l=I5e({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l});ci.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(i,...e)=>{let[t,n]=e;yi(t instanceof Xe);let r=i.get(an).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(Le),s=wSt(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!N.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=await Jhe(o,r,N.lift(n),Ft.None);if(a)return a.provider.getLegend()});ci.registerCommand("_provideDocumentRangeSemanticTokens",async(i,...e)=>{let[t,n]=e;yi(t instanceof Xe),yi(N.isIRange(n));let r=i.get(an).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(Le),s=await Jhe(o,r,N.lift(n),Ft.None);if(!(!s||!s.tokens))return I5e({id:0,type:"full",data:s.tokens.data})})});function E3(i,e,t){let n=t.getValue(EU,{overrideIdentifier:i.getLanguageId(),resource:i.uri})?.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var EU,P5e=D(()=>{EU="editor.semanticHighlighting"});var xSt,E1,bD,B5e,z5e,V5e,CSt=D(()=>{ae();Lt();Zc();nr();Jt();sn();Zn();Hee();O5e();Kp();id();Ui();Wee();IE();P5e();xSt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},E1=function(i,e){return function(t,n){e(t,n,i)}},B5e=class extends W{constructor(e,t,n,r,o,s){super(),this._watchers=Object.create(null);let a=u=>{this._watchers[u.uri.toString()]=new z5e(u,e,n,o,s)},l=(u,d)=>{d.dispose(),delete this._watchers[u.uri.toString()]},c=()=>{for(let u of t.getModels()){let d=this._watchers[u.uri.toString()];E3(u,n,r)?d||a(u):d&&l(u,d)}};t.getModels().forEach(u=>{E3(u,n,r)&&a(u)}),this._register(t.onModelAdded(u=>{E3(u,n,r)&&a(u)})),this._register(t.onModelRemoved(u=>{let d=this._watchers[u.uri.toString()];d&&l(u,d)})),this._register(r.onDidChangeConfiguration(u=>{u.affectsConfiguration(EU)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};B5e=xSt([E1(0,VI),E1(1,an),E1(2,Bn),E1(3,kt),E1(4,da),E1(5,Le)],B5e);z5e=class extends W{static{bD=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,n,r,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:bD.REQUEST_MIN_DELAY,max:bD.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new di(()=>this._fetchDocumentSemanticTokensNow(),bD.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{Vi(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),Vi(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!R5e(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Bi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=F5e(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new Ar(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{let{provider:c,tokens:u}=l,d=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,u||null,d,o)}},l=>{l&&(ja(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||pt(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,r,o){o=Math.min(o,n.length-r,e.length-t);for(let s=0;s{(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(M5e(t)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:o.data};else{let a=0;for(let h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=o.data,c=new Uint32Array(l.length+a),u=l.length,d=c.length;for(let h=t.edits.length-1;h>=0;h--){let f=t.edits[h];if(f.start>l.length){n.warnInvalidEditStart(o.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let p=u-(f.start+f.deleteCount);p>0&&(bD._copy(l,u-p,c,d-p,p),d-=p),f.data&&(bD._copy(f.data,0,c,d-f.data.length,f.data.length),d-=f.data.length),u=f.start}u>0&&bD._copy(l,0,c,0,u),t={resultId:t.resultId,data:c}}}if(SU(t)){this._currentDocumentResponse=new V5e(e,t.resultId,t.data);let a=Vee(t,n,this._model.getLanguageId());if(r.length>0)for(let l of r)for(let c of a)for(let u of l.changes)c.applyEdit(u.range,u.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};z5e=bD=xSt([E1(1,VI),E1(2,Bn),E1(3,da),E1(4,Le)],z5e);V5e=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Xb(B5e)});var tEi,DU,Xhe,_St=D(()=>{Jt();ae();ii();O5e();P5e();Hee();nr();Zn();Kp();id();Ui();Wee();tEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},DU=function(i,e){return function(t,n){e(t,n,i)}},Xhe=class extends W{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,n,r,o,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=r,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new di(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(EU)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),r=hr(s=>Promise.resolve(Jhe(this._provider,e,t,s))),o=new Ar(!1);return r.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,Vee(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};Xhe=tEi([DU(1,VI),DU(2,Bn),DU(3,kt),DU(4,da),DU(5,Le)],Xhe);Tt(Xhe.ID,Xhe,1)});var Zhe,SSt=D(()=>{Pt();We();Zhe=class{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let n=[];for(let r of t){let o=[];n.push(o),this.selectSubwords&&this._addInWordRanges(o,e,r),this._addWordRanges(o,e,r),this._addWhitespaceLine(o,e,r),o.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let r=t.getWordAtPosition(n);if(!r)return;let{word:o,startColumn:s}=r,a=n.column-s,l=a,c=a,u=0;for(;l>=0;l--){let d=o.charCodeAt(l);if(l!==a&&(d===95||d===45))break;if(JA(d)&&ng(u))break;u=d}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new N(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}});async function ESt(i,e,t,n,r){let o=i.all(e).concat(new Zhe(n.selectSubwords));o.length===1&&o.unshift(new l3);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,r)).then(c=>{if(Jo(c)&&c.length===t.length)for(let u=0;u{if(l.length===0)return[];l.sort((h,f)=>K.isBefore(h.getStartPosition(),f.getStartPosition())?1:K.isBefore(f.getStartPosition(),h.getStartPosition())||K.isBefore(h.getEndPosition(),f.getEndPosition())?-1:K.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);let c=[],u;for(let h of l)(!u||N.containsRange(h,u)&&!N.equalsRange(h,u))&&(c.push(h),u=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let d=[c[0]];for(let h=1;h{Qt();sn();Lt();ii();Nt();We();Hn();vn();p4e();SSt();Oe();fr();Xn();Ui();Yp();gn();mn();iEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nEi=function(i,e){return function(t,n){e(t,n,i)}},W5e=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},TU=class{static{H5e=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(H5e.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await ESt(this._languageFeaturesService.selectionRangeProvider,n,t.map(o=>o.getPosition()),this._editor.getOption(114),Ft.None).then(o=>{if(!(!Jo(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Zi(this._editor.getSelections(),t,(s,a)=>s.equalsSelection(a)))){for(let s=0;sa.containsPosition(t[s].getStartPosition())&&a.containsPosition(t[s].getEndPosition())),o[s].unshift(t[s]);this._state=o.map(s=>new W5e(0,s)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(o=>o.mov(e));let r=this._state.map(o=>qe.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}}};TU=H5e=iEi([nEi(1,Le)],TU);$he=class extends Fe{constructor(e,t){super(t),this._forward=e}async run(e,t){let n=TU.get(t);n&&await n.run(this._forward)}},U5e=class extends $he{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:y("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"1_basic",title:y({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};ci.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");j5e=class extends $he{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:y("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"1_basic",title:y({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Tt(TU.ID,TU,4);xe(U5e);xe(j5e);ci.registerCommand("_executeSelectionRangeProvider",async function(i,...e){let[t,n]=e;yi(Xe.isUri(t));let r=i.get(Le).selectionRangeProvider,o=await i.get(xs).createModelReference(t);try{return ESt(r,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},Ft.None)}finally{o.dispose()}})});var TSt,kSt=D(()=>{Oe();TSt=Object.freeze({View:Bt("view","View"),Help:Bt("help","Help"),Test:Bt("test","Test"),File:Bt("file","File"),Preferences:Bt("preferences","Preferences"),Developer:Bt({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")})});var ISt=D(()=>{});var D3,LSt,Q5e,NSt,rEi,MSt,efe,G5e,q5e,RSt=D(()=>{Ye();ay();Qt();ae();Dr();ISt();l$();oC();Nt();$w();aI();ES();p3e();D3=class i{constructor(e,t,n,r=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=n,this.showEndForLine=r}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&Zi(this.startLineNumbers,e.startLineNumbers)&&Zi(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new i([],[],0)}},LSt=fd("stickyScrollViewLayer",{createHTML:i=>i}),Q5e="data-sticky-line-index",NSt="data-sticky-is-line",rEi="data-sticky-is-line-number",MSt="data-sticky-is-folding-icon",efe=class extends W{constructor(e){super(),this._editor=e,this._foldingIconStore=new te,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof pu),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);let t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&t(),n.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;let r=this._isWidgetHeightZero(e),o=r?void 0:e,s=r?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(o,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;let t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;let n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];return t===0}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(t!==void 0)return t;let n=this._previousState,r=e.startLineNumbers.findIndex(o=>!n.startLineNumbers.includes(o));return r===-1?0:r}_updateWidgetWidth(){let e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;ta.scrollWidth))+r.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(111)==="mouseover"&&(this._foldingIconStore.add(re(this._lineNumbersDomNode,De.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(re(this._lineNumbersDomNode,De.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,r){let o=this._editor._getViewModel();if(!o)return;let s=o.coordinatesConverter.convertModelPositionToViewPosition(new K(t,1)).lineNumber,a=o.getViewLineRenderingData(s),l=this._editor.getOption(68),c;try{c=Jc.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch{c=[]}let u=new Wh(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,c,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new jp(2e3),h=ex(u,d),f;LSt?f=LSt.createHTML(d.build()):f=d.build();let p=document.createElement("span");p.setAttribute(Q5e,String(e)),p.setAttribute(NSt,""),p.setAttribute("role","listitem"),p.tabIndex=0,p.className="sticky-line-content",p.classList.add(`stickyLine${t}`),p.style.lineHeight=`${this._lineHeight}px`,p.innerHTML=f;let g=document.createElement("span");g.setAttribute(Q5e,String(e)),g.setAttribute(rEi,""),g.className="sticky-line-number",g.style.lineHeight=`${this._lineHeight}px`;let v=r.contentLeft;g.style.width=`${v}px`;let A=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?A.innerText=t.toString():l.renderType===2&&(A.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),A.className="sticky-line-number-inner",A.style.lineHeight=`${this._lineHeight}px`,A.style.width=`${r.lineNumbersWidth}px`,A.style.paddingLeft=`${r.lineNumbersLeft}px`,g.appendChild(A);let w=this._renderFoldingIconForLine(n,t);w&&g.appendChild(w.domNode),this._editor.applyFontInfo(p),this._editor.applyFontInfo(A),g.style.lineHeight=`${this._lineHeight}px`,p.style.lineHeight=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`;let C=new G5e(e,t,p,g,w,h.characterMapping,p.scrollWidth);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){let t=e.index,n=e.lineDomNode,r=e.lineNumberDomNode,o=t===this._lineNumbers.length-1,s="0",a="1";n.style.zIndex=o?s:a,r.style.zIndex=o?s:a;let l=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,c=`${t*this._lineHeight}px`;return n.style.top=o?l:c,r.style.top=o?l:c,e}_renderFoldingIconForLine(e,t){let n=this._editor.getOption(111);if(!e||n==="never")return;let r=e.regions,o=r.findRange(t),s=r.getStartLineNumber(o);if(!(t===s))return;let l=r.isCollapsed(o),c=new q5e(l,s,r.getEndLineNumber(o),this._lineHeight);return c.setVisible(this._isOnGlyphMargin?!0:l||n==="always"),c.domNode.setAttribute(MSt,""),c}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;let t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;let n=a$(t.characterMapping,e,0);return new K(t.lineNumber,n)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){let t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){let t=this._getAttributeValue(e,Q5e);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,NSt)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,MSt)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){let n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}},G5e=class{constructor(e,t,n,r,o,s,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=r,this.foldingIcon=o,this.characterMapping=s,this.scrollWidth=a}},q5e=class{constructor(e,t,n,r){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=r,this.domNode=document.createElement("div"),this.domNode.style.width=`${r}px`,this.domNode.style.height=`${r}px`,this.domNode.className=ut.asClassName(e?RW:MW)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}});var gC,GN,kU,Y5e=D(()=>{gC=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},GN=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},kU=class{constructor(e,t,n,r){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=r}}});var rfe,LU,IU,vD,tfe,ife,K5e,nfe,J5e,X5e,FSt=D(()=>{ae();Ui();t3();Jt();Yue();g3e();h3e();ks();Lt();Y5e();td();ht();rfe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},LU=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(IU||(IU={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(vD||(vD={}));tfe=class extends W{constructor(e,t,n,r){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new ra(300)),this._updateOperation=this._register(new te),this._editor.getOption(116).defaultModel){case IU.OUTLINE_MODEL:this._modelProviders.push(new K5e(this._editor,r));case IU.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new X5e(this._editor,t,r));case IU.INDENTATION_MODEL:this._modelProviders.push(new J5e(this._editor,n));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(let t of this._modelProviders){let{statusPromise:n,modelPromise:r}=t.computeStickyModel(e);this._modelPromise=r;let o=await n;if(this._modelPromise!==r)return null;switch(o){case vD.CANCELED:return this._updateOperation.clear(),null;case vD.VALID:return t.stickyModel}}return null}).catch(t=>(pt(t),null))}};tfe=rfe([LU(2,Ne),LU(3,Le)],tfe);ife=class extends W{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,vD.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};let t=hr(n=>this.createModelFromProvider(n));return{statusPromise:t.then(n=>this.isModelValid(n)?e.isCancellationRequested?vD.CANCELED:(this._stickyModel=this.createStickyModel(e,n),vD.VALID):this._invalid()).then(void 0,n=>(pt(n),vD.CANCELED)),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}},K5e=class extends ife{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return VW.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){let{stickyOutlineElement:n,providerID:r}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),o=this._editor.getModel();return new kU(o.uri,o.getVersionId(),n,r)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(bi.first(e.children.values())instanceof zW){let a=bi.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,u;for(let[d,h]of e.children.entries()){let f=this._findSumOfRangesOfGroup(h);f>c&&(u=h,c=f,l=h.id)}t=l,n=u.children}}else n=e.children;let r=[],o=Array.from(n.values()).sort((a,l)=>{let c=new gC(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),u=new gC(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,u)});for(let a of o)r.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new GN(void 0,r,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())n.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));n.sort((o,s)=>this._comparator(o.range,s.range));let r=new gC(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new GN(r,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof e3?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};K5e=rfe([LU(1,Le)],K5e);nfe=class extends ife{constructor(e){super(e),this._foldingLimitReporter=new PW(e)}createStickyModel(e,t){let n=this._fromFoldingRegions(t),r=this._editor.getModel();return new kU(r.uri,r.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],r=new GN(void 0,[],void 0);for(let o=0;o0&&(this.provider=this._register(new BN(e.getModel(),r,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){return this.provider?.compute(e)??null}};X5e=rfe([LU(2,Le)],X5e)});var oEi,OSt,Z5e,ofe,PSt=D(()=>{ae();Ui();sn();Jt();Qt();et();ks();FSt();oEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},OSt=function(i,e){return function(t,n){e(t,n,i)}},Z5e=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},ofe=class extends W{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new G),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new te),this._updateSoon=this._register(new di(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(116)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(Ve(()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;let e=this._editor;e.hasModel()&&(this._stickyModelProvider=new tfe(e,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new Bi,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}let t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,r,o){if(t.children.length===0)return;let s=o,a=[];for(let u=0;uu-d)),c=this.updateIndex(ix(a,e.startLineNumber+r,(u,d)=>u-d));for(let u=l;u<=c;u++){let d=t.children[u];if(!d)return;if(d.range){let h=d.range.startLineNumber,f=d.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new Z5e(h,f-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,r+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,r,o)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);let n=this._editor._getViewModel()?.getHiddenAreas();if(n)for(let r of n)t=t.filter(o=>!(o.startLineNumber>=r.startLineNumber&&o.endLineNumber<=r.endLineNumber+1));return t}};ofe=oEi([OSt(1,Le),OSt(2,qi)],ofe)});var sEi,T3,$5e,Uv,e6e=D(()=>{ae();Ui();RSt();PSt();ht();bd();fr();Wt();vn();aW();We();aue();fBe();Nt();sn();ks();Kp();Ye();Y5e();Op();Yue();u3e();sEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},T3=function(i,e){return function(t,n){e(t,n,i)}},Uv=class extends W{static{$5e=this}static{this.ID="store.contrib.stickyScrollController"}constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=r,this._contextKeyService=a,this._sessionStore=new te,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new efe(this._editor),this._stickyLineCandidateProvider=new ofe(this._editor,n,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=D3.Empty,this._onDidResize(),this._readConfiguration();let l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(u=>{this._readConfigurationChange(u)})),this._register(re(l,De.CONTEXT_MENU,async u=>{this._onContextMenu(rt(l),u)})),this._stickyScrollFocusedContextKey=V.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=V.stickyScrollVisible.bindTo(this._contextKeyService);let c=this._register(Yc(l));this._register(c.onDidBlur(u=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(u=>{this.focus()})),this._registerMouseListeners(),this._register(re(l,De.MOUSE_DOWN,u=>{this._onMouseDown=!0}))}static get(e){return e.getContribution($5e.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new te,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(N.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){let e=this._register(new te),t=this._register(new p1(this._editor,{extractLineNumberFromMouseEvent:o=>{let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);return s?s.lineNumber:0}})),n=o=>{if(!this._editor.hasModel()||o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return null;let s=o.target.element;if(!s||s.innerText!==s.innerHTML)return null;let a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new N(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},r=this._stickyScrollWidget.getDomNode();this._register(cn(r,De.CLICK,o=>{if(o.ctrlKey||o.altKey||o.metaKey||!o.leftButton)return;if(o.shiftKey){let c=this._stickyScrollWidget.getLineIndexFromChildDomNode(o.target);if(c===null)return;let u=new K(this._endLineNumbers[c],1);this._revealLineInCenterIfOutsideViewport(u);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(o.target)){let c=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);this._toggleFoldingRegionForLine(c);return}if(!this._stickyScrollWidget.isInStickyLine(o.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(o.target);if(!l){let c=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);if(c===null)return;l=new K(c,1)}this._revealPosition(l)})),this._register(cn(r,De.MOUSE_MOVE,o=>{if(o.shiftKey){let s=this._stickyScrollWidget.getLineIndexFromChildDomNode(o.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(re(r,De.MOUSE_LEAVE,o=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([o,s])=>{let a=n(o);if(!a||!o.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}let{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;let u=new Bi;e.add(Ve(()=>u.dispose(!0)));let d;nD(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new K(l.startLineNumber,l.startColumn+1),!1,u.token).then((h=>{if(!u.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;let f=c;d!==f?(e.clear(),d=f,d.style.textDecoration="underline",e.add(Ve(()=>{d.style.textDecoration="none"}))):d||(d=f,d.style.textDecoration="underline",e.add(Ve(()=>{d.style.textDecoration="none"})))}else e.clear()}))})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async o=>{if(o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return;let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);s&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(fue,o,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){let n=new gl(e,t);this._contextMenuService.showContextMenu({menuId:tt.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;let t=this._stickyScrollWidget.getRenderedStickyLine(e),n=t?.foldingIcon;if(!n)return;NW(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;let r=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(r),this._renderStickyScroll(e)}_readConfiguration(){let e=this._editor.getOption(116);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let r of e.ranges)if(n>=r.fromLineNumber&&n<=r.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){let t=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e){let t=this._editor.getModel();if(!t||t.isTooLargeForTokenization()){this._resetState();return}let n=this._updateAndGetMinRebuildFromLine(e),r=this._stickyLineCandidateProvider.getVersionId();if(r===void 0||r===t.getVersionId())if(!this._focused)await this._updateState(n);else if(this._focusedStickyElementIndex===-1)await this._updateState(n),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{let s=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(n),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(s)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){let t=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await y1.get(this._editor)?.getFoldingModel()??void 0,this._widgetState=this.findScrollWidgetState();let t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=D3.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){let e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),n=this._editor.getScrollTop(),r=0,o=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){let l=new gC(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(let u of c){let d=u.startLineNumber,h=u.endLineNumber,f=u.nestingDepth;if(h-d>0){let p=(f-1)*e,g=f*e,v=this._editor.getBottomForLineNumber(d)-n,A=this._editor.getTopForLineNumber(h)-n,w=this._editor.getBottomForLineNumber(h)-n;if(p>A&&p<=w){o.push(d),s.push(h+1),r=w-g;break}else g>v&&g<=w&&(o.push(d),s.push(h+1));if(o.length===t)break}}}return this._endLineNumbers=s,new D3(o,s,r,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};Uv=$5e=sEi([T3(1,Xs),T3(2,Le),T3(3,Ne),T3(4,qi),T3(5,da),T3(6,Ze)],Uv)});var sfe,hfe,afe,lfe,cfe,ufe,dfe,BSt=D(()=>{ii();Oe();kSt();fr();nr();Wt();vn();e6e();sfe=class extends la{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...Bt("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:y({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:Bt("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:TSt.View,toggled:{condition:me.equals("config.editor.stickyScroll.enabled",!0),title:y("stickyScroll","Sticky Scroll"),mnemonicTitle:y({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:tt.CommandPalette},{id:tt.MenubarAppearanceMenu,group:"4_editor",order:3},{id:tt.StickyScrollContext}]})}async run(e){let t=e.get(kt),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)}},hfe=100,afe=class extends ih{constructor(){super({id:"editor.action.focusStickyScroll",title:{...Bt("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:y({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:me.and(me.has("config.editor.stickyScroll.enabled"),V.stickyScrollVisible),menu:[{id:tt.CommandPalette}]})}runEditorCommand(e,t){Uv.get(t)?.focus()}},lfe=class extends ih{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:Bt("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:hfe,primary:18}})}runEditorCommand(e,t){Uv.get(t)?.focusNext()}},cfe=class extends ih{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:Bt("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:hfe,primary:16}})}runEditorCommand(e,t){Uv.get(t)?.focusPrevious()}},ufe=class extends ih{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:Bt("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:hfe,primary:3}})}runEditorCommand(e,t){Uv.get(t)?.goToFocused()}},dfe=class extends ih{constructor(){super({id:"editor.action.selectEditor",title:Bt("selectEditor.title","Select Editor"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:hfe,primary:9}})}runEditorCommand(e,t){Uv.get(t)?.selectEditor()}}});var zSt=D(()=>{ii();BSt();e6e();fr();Tt(Uv.ID,Uv,1);Pn(sfe);Pn(afe);Pn(cfe);Pn(lfe);Pn(ufe);Pn(dfe)});var VSt,NU,t6e,i6e,n6e,HSt=D(()=>{sn();yg();td();ae();fs();We();IE();Ui();g4e();VN();h4e();v4e();m4e();Bx();VSt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NU=function(i,e){return function(t,n){e(t,n,i)}},t6e=class{constructor(e,t,n,r,o,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=r,this.command=o,this.completion=s}},i6e=class extends $q{constructor(e,t,n,r,o,s){super(o.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=r,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&a.resolve(Ft.None)}return e}};i6e=VSt([NU(5,a3)],i6e);n6e=class extends W{constructor(e,t,n,r){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=r,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,r){if(n.selectedSuggestionInfo)return;let o;for(let f of this._editorService.listCodeEditors())if(f.getModel()===e){o=f;break}if(!o)return;let s=o.getOption(90);if(C1.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(C1.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(t),u;if(c?.word||(u=this._getTriggerCharacterInfo(e,t)),!c?.word&&!u||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let d,h=e.getValueInRange(new N(t.lineNumber,1,t.lineNumber,t.column));if(!u&&this._lastResult?.canBeReused(e,t.lineNumber,c)){let f=new nU(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),d=this._lastResult}else{let f=await UW(this._languageFeatureService.completionProvider,e,t,new zN(void 0,d3.createSuggestFilter(o).itemKind,u?.providers),u&&{triggerKind:1,triggerCharacter:u.ch},r),p;f.needsClipboard&&(p=await this._clipboardService.readText());let g=new u3(f.items,t.column,new nU(h,0),c3.None,o.getOption(119),o.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},p);d=new i6e(e,t.lineNumber,c,g,f,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(Ft.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){let n=e.getValueInRange(N.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),r=new Set;for(let o of this._languageFeatureService.completionProvider.all(e))o.triggerCharacters?.includes(n)&&r.add(o);if(r.size!==0)return{providers:r,ch:n}}};n6e=VSt([NU(0,Le),NU(1,uh),NU(2,a3),NU(3,ai)],n6e);Xb(n6e)});var r6e,WSt=D(()=>{id();ii();Oe();r6e=class extends Fe{constructor(){super({id:"editor.action.forceRetokenize",label:y("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let r=new Ar;n.tokenization.forceTokenization(n.getLineCount()),r.stop(),console.log(`tokenization took ${r.elapsed()}`)}};xe(r6e)});var o6e,USt=D(()=>{Yl();hoe();Oe();fr();o6e=class i extends la{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:i.ID,title:Bt({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:Bt("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){let t=!Hx.getTabFocusMode();Hx.setTabFocusMode(t),t?gs(y("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):gs(y("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Pn(o6e)});var jSt=D(()=>{});var QSt=D(()=>{});var GSt=D(()=>{});var aEi,qSt,ffe,YSt=D(()=>{Ye();jb();gc();Xf();et();ae();vd();GSt();Zl();px();aEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qSt=function(i,e){return function(t,n){e(t,n,i)}},ffe=class extends W{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},r,o){super(),this._link=t,this._hoverService=r,this._enabled=!0,this.el=be(e,we("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=n.hoverDelegate??ko("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");let s=this._register(new wi(this.el,"click")),a=this._register(new wi(this.el,"keypress")),l=Se.chain(a.event,d=>d.map(h=>new Wi(h)).filter(h=>h.keyCode===3)),c=this._register(new wi(this.el,En.Tap)).event;this._register(Do.addTarget(this.el));let u=Se.any(s.event,l,c);this._register(u(d=>{this.enabled&&(Ai.stop(d,!0),n?.opener?n.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};ffe=aEi([qSt(3,nh),qSt(4,jo)],ffe)});var KSt,JSt,lEi,pfe,s6e,XSt=D(()=>{QSt();Ye();Dg();$a();ae();vx();ht();YSt();sp();Dr();KSt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},JSt=function(i,e){return function(t,n){e(t,n,i)}},lEi=26,pfe=class extends W{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(s6e))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,lEi)}};pfe=KSt([JSt(1,Ne)],pfe);s6e=class extends W{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Zh,{}),this.element=we("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=we("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){_o(this.element)}show(e){_o(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=be(this.element,we("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(we(`div${ut.asCSSSelector(e.icon)}`));let r=be(this.element,we("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=be(this.element,we("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(ffe,this.messageActionsContainer,{...s,tabIndex:-1},{}));let o=be(this.element,we("div.action-container"));this.actionBar=this._register(new Ns(o)),this.actionBar.push(this._register(new Js("banner.close","Close Banner",ut.asClassName(Hre),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};s6e=KSt([JSt(0,Ne)],s6e)});function uEi(i,e){return{nonBasicASCII:e.nonBasicASCII===Qf?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Qf?!i:e.includeComments,includeStrings:e.includeStrings===Qf?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}function d6e(i){return`U+${i.toString(16).padStart(4,"0")}`}function a6e(i){let e=`\`${d6e(i)}\``;return Hw.isInvisibleCharacter(i)||(e+=` "${`${dEi(i)}`}"`),e}function dEi(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function $St(i,e){return LI.computeUnicodeHighlightReason(i,e)}async function hEi(i,e){let t=i.getValue(Zd.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let r of e)n[String.fromCodePoint(r)]=!0;await i.updateValue(Zd.allowedCharacters,n,2)}async function fEi(i,e){let t=i.inspect(Zd.allowedLocales).user?.value,n;typeof t=="object"&&t?n=Object.assign({},t):n={};for(let r of e)n[r]=!0;await i.updateValue(Zd.allowedLocales,n,2)}function pEi(i){throw new Error(`Unexpected value: ${i}`)}var p6e,k3,cEi,MU,l6e,c6e,ZSt,u6e,mfe,h6e,f6e,qN,RU,FU,gfe,eEt=D(()=>{Jt();er();Ad();ae();Si();Pt();jSt();ii();Ks();vs();bTe();xv();Sl();ORe();Pg();oW();XSt();Oe();nr();ht();vd();rf();sp();dIe();p6e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},k3=function(i,e){return function(t,n){e(t,n,i)}},cEi=kn("extensions-warning-message",Ee.warning,y("warningIcon","Icon shown with a warning message in the extensions editor.")),MU=class extends W{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,n,r){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;let s=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount),a;if(o.nonBasicAsciiCharacterCount>=s)a={message:y("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new FU};else if(o.ambiguousCharacterCount>=s)a={message:y("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new qN};else if(o.invisibleCharacterCount>=s)a={message:y("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new RU};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:cEi,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(pfe,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(126),this._register(n.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=uEi(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?Rqe:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new l6e(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new c6e(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};MU=p6e([k3(1,pa),k3(2,Ute),k3(3,Ne)],MU);l6e=class extends W{constructor(e,t,n,r){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new di(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let r of t.ranges)n.push({range:r,options:mfe.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!xae(t,e))return null;let n=t.getValueInRange(e.range);return{reason:$St(n,this._options),inComment:Cae(t,e),inString:_ae(t,e)}}};l6e=p6e([k3(3,pa)],l6e);c6e=class extends W{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new di(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let r of e){let o=LI.computeUnicodeHighlights(this._model,this._options,r);for(let s of o.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||o.hasMore}if(!n.hasMore)for(let r of n.ranges)t.push({range:r,options:mfe.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return xae(t,e)?{reason:$St(n,this._options),inComment:Cae(t,e),inString:_ae(t,e)}:null}},ZSt=y("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options"),u6e=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=this._editor.getContribution(MU.ID);if(!r)return[];let o=[],s=new Set,a=300;for(let l of t){let c=r.getDecorationInfo(l);if(!c)continue;let d=n.getValueInRange(l.range).codePointAt(0),h=a6e(d),f;switch(c.reason.kind){case 0:{ZA(c.reason.confusableWith)?f=y("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,a6e(c.reason.confusableWith.codePointAt(0))):f=y("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,a6e(c.reason.confusableWith.codePointAt(0)));break}case 1:f=y("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=y("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let p={codePoint:d,reason:c.reason,inComment:c.inComment,inString:c.inString},g=y("unicodeHighlight.adjustSettings","Adjust settings"),v=`command:${gfe.ID}?${encodeURIComponent(JSON.stringify(p))}`,A=new es("",!0).appendMarkdown(f).appendText(" ").appendLink(v,g,ZSt);o.push(new uf(this,l.range,[A],!1,a++))}return o}renderHoverParts(e,t){return vwt(e,t,this._editor,this._languageService,this._openerService)}};u6e=p6e([k3(1,rn),k3(2,jo)],u6e);mfe=class i{constructor(){this.map=new Map}static{this.instance=new i}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,r=this.map.get(n);return r||(r=zt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,r)),r}},h6e=class extends Fe{constructor(){super({id:qN.ID,label:y("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,n){let r=e?.get(kt);r&&this.runAction(r)}async runAction(e){await e.updateValue(Zd.includeComments,!1,2)}},f6e=class extends Fe{constructor(){super({id:qN.ID,label:y("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,n){let r=e?.get(kt);r&&this.runAction(r)}async runAction(e){await e.updateValue(Zd.includeStrings,!1,2)}},qN=class i extends Fe{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,n){let r=e?.get(kt);r&&this.runAction(r)}async runAction(e){await e.updateValue(Zd.ambiguousCharacters,!1,2)}},RU=class i extends Fe{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,n){let r=e?.get(kt);r&&this.runAction(r)}async runAction(e){await e.updateValue(Zd.invisibleCharacters,!1,2)}},FU=class i extends Fe{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,n){let r=e?.get(kt);r&&this.runAction(r)}async runAction(e){await e.updateValue(Zd.nonBasicASCII,!1,2)}},gfe=class i extends Fe{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,n){let{codePoint:r,reason:o,inString:s,inComment:a}=n,l=String.fromCodePoint(r),c=e.get(Na),u=e.get(kt);function d(p){return Hw.isInvisibleCharacter(p)?y("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",d6e(p)):y("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${d6e(p)} "${l}"`)}let h=[];if(o.kind===0)for(let p of o.notAmbiguousInLocales)h.push({label:y("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',p),run:async()=>{fEi(u,[p])}});if(h.push({label:d(r),run:()=>hEi(u,[r])}),a){let p=new h6e;h.push({label:p.label,run:async()=>p.runAction(u)})}else if(s){let p=new f6e;h.push({label:p.label,run:async()=>p.runAction(u)})}if(o.kind===0){let p=new qN;h.push({label:p.label,run:async()=>p.runAction(u)})}else if(o.kind===1){let p=new RU;h.push({label:p.label,run:async()=>p.runAction(u)})}else if(o.kind===2){let p=new FU;h.push({label:p.label,run:async()=>p.runAction(u)})}else pEi(o);let f=await c.pick(h,{title:ZSt});f&&await f.run()}};xe(qN);xe(RU);xe(FU);xe(gfe);Tt(MU.ID,MU,1);Og.register(u6e)});function gEi(i,e,t){i.setModelProperty(e.uri,iEt,t)}function bEi(i,e){return i.getModelProperty(e.uri,iEt)}var mEi,tEt,iEt,bfe,nEt=D(()=>{ae();Ec();ii();fs();Oe();qF();mEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tEt=function(i,e){return function(t,n){e(t,n,i)}},iEt="ignoreUnusualLineTerminators";bfe=class extends W{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||bEi(this._codeEditorService,e)===!0||this._editor.getOption(92))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:y("unusualLineTerminators.title","Unusual Line Terminators"),message:y("unusualLineTerminators.message","Detected unusual line terminators"),detail:y("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Sc(e.uri)),primaryButton:y({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:y("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){gEi(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};bfe=mEi([tEt(1,gy),tEt(2,ai)],bfe);Tt(bfe.ID,bfe,1)});var vEi,AEi,vfe,Afe,rEt=D(()=>{uI();Ui();tr();ae();ql();vEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},AEi=function(i,e){return function(t,n){e(t,n,i)}},vfe=class{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,n){let r=[],o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return o?e.isDisposed()?void 0:e.findMatches(o.word,!0,!1,!0,SF,!1).map(a=>({range:a.range,kind:D_.Text})):Promise.resolve(r)}provideMultiDocumentHighlights(e,t,n,r){let o=new ms,s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!s)return Promise.resolve(o);for(let a of[e,...n]){if(a.isDisposed())continue;let c=a.findMatches(s.word,!0,!1,!0,SF,!1).map(u=>({range:u.range,kind:D_.Text}));c&&o.set(a.uri,c)}return o}},Afe=class extends W{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new vfe)),this._register(e.multiDocumentHighlightProvider.register("*",new vfe))}};Afe=vEi([AEi(0,Le)],Afe)});function sEt(i,e,t,n){let r=i.ordered(e);return P9(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,n)).then(void 0,ln)),o=>o!=null).then(o=>{if(o){let s=new ms;return s.set(e.uri,o),s}return new ms})}function yEi(i,e,t,n,r,o){let s=i.ordered(e);return P9(s.map(a=>()=>{let l=o.filter(c=>tee(c)).filter(c=>cz(a.selector,c.uri,c.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,r)).then(void 0,ln)}),a=>a!=null)}function wEi(i,e,t,n,r){return new g6e(e,t,r,i)}function xEi(i,e,t,n,r,o){return new b6e(e,t,r,i,o)}var oEt,yfe,Rs,m6e,x6e,wfe,g6e,b6e,v6e,AD,xfe,A6e,y6e,w6e,aEt=D(()=>{Oe();Yl();Jt();sn();Lt();ae();sB();ii();fs();We();vn();tl();Ui();P8e();Wt();bl();ql();lke();Ec();rEt();IE();oEt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},yfe=function(i,e){return function(t,n){e(t,n,i)}},x6e=new Pe("hasWordHighlights",!1);wfe=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=hr(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new N(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let r=t.startLineNumber,o=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,u=n.length;!l&&c=s&&(l=!0)}return l}cancel(){this.result.cancel()}},g6e=class extends wfe{constructor(e,t,n,r){super(e,t,n),this._providers=r}_compute(e,t,n,r){return sEt(this._providers,e,t.getPosition(),r).then(o=>o||new ms)}},b6e=class extends wfe{constructor(e,t,n,r,o){super(e,t,n),this._providers=r,this._otherModels=o}_compute(e,t,n,r){return yEi(this._providers,e,t.getPosition(),n,r,this._otherModels).then(o=>o||new ms)}};yc("_executeDocumentHighlights",async(i,e,t)=>{let n=i.get(Le);return(await sEt(n.documentHighlightProvider,e,t,Ft.None))?.get(e.uri)});v6e=class{static{Rs=this}static{this.storedDecorationIDs=new ms}static{this.query=null}constructor(e,t,n,r,o){this.toUnhook=new te,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new ms,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new ra(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=o,this._hasWordHighlights=x6e.bindTo(r),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(s=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(s)})})),this.toUnhook.add(e.onDidFocusEditorText(s=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(s=>{Gk(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(s=>{!s.newModelUrl&&s.oldModelUrl?this._stopSingular():Rs.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(s=>{let a=this.editor.getOption(81);if(this.occurrencesHighlight!==a)switch(this.occurrencesHighlight=a,a){case"off":this._stopAll();break;case"singleFile":this._stopAll(Rs.query?.modelInfo?.model);break;case"multiFile":Rs.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",a);break}})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,Rs.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(N.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);gs(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);gs(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=Rs.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Rs.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){let t=this.codeEditorService.listCodeEditors(),n=[];for(let r of t){if(!r.hasModel()||gx(r.getModel().uri,e?.uri))continue;let o=Rs.storedDecorationIDs.get(r.getModel().uri);if(!o)continue;r.removeDecorations(o),n.push(r.getModel().uri);let s=AD.get(r);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(let r of n)Rs.storedDecorationIDs.delete(r)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==jt.vscodeNotebookCell&&Rs.query?.modelInfo?.model.uri.scheme!==jt.vscodeNotebookCell?(Rs.query=null,this._run()):Rs.query?.modelInfo&&(Rs.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&this.editor.getModel()?.uri.scheme!==jt.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===jt.vscodeNotebookCell){let o=[],s=this.codeEditorService.listCodeEditors();for(let a of s){let l=a.getModel();l&&l!==e&&l.uri.scheme===jt.vscodeNotebookCell&&o.push(l)}return o}let n=[],r=this.codeEditorService.listCodeEditors();for(let o of r){if(!IH(o))continue;let s=o.getModel();s&&e===s.modified&&n.push(s.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(let o of r){let s=o.getModel();s&&s!==e&&n.push(s)}return n}_run(e){let t;if(this.editor.hasTextFocus()){let r=this.editor.getSelection();if(!r||r.startLineNumber!==r.endLineNumber){Rs.query=null,this._stopAll();return}let o=r.startColumn,s=r.endColumn,a=this._getWord();if(!a||a.startColumn>o||a.endColumn{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=s||[],this._beginRenderDecorations())},pt)}}computeWithModel(e,t,n,r){return r.length?xEi(this.multiDocumentProviders,e,t,n,this.editor.getOption(132),r):wEi(this.providers,e,t,n,this.editor.getOption(132))}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=this.codeEditorService.listCodeEditors();for(let t of e){let n=AD.get(t);if(!n)continue;let r=[],o=t.getModel()?.uri;if(o&&this.workerRequestValue.has(o)){let s=Rs.storedDecorationIDs.get(o),a=this.workerRequestValue.get(o);if(a)for(let c of a)c.range&&r.push({range:c.range,options:N_t(c.kind)});let l=[];t.changeDecorations(c=>{l=c.deltaDecorations(s??[],r)}),Rs.storedDecorationIDs=Rs.storedDecorationIDs.set(o,l),r.length>0&&(n.wordHighlighter?.decorations.set(r),n.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};v6e=Rs=oEt([yfe(4,ai)],v6e);AD=class extends W{static{m6e=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(m6e.ID)}constructor(e,t,n,r){super(),this._wordHighlighter=null;let o=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new v6e(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,r))};this._register(e.onDidChangeModel(s=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),o()})),o()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};AD=m6e=oEt([yfe(1,Ze),yfe(2,Le),yfe(3,ai)],AD);xfe=class extends Fe{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=AD.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},A6e=class extends xfe{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:y("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:x6e,kbOpts:{kbExpr:V.editorTextFocus,primary:65,weight:100}})}},y6e=class extends xfe{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:y("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:x6e,kbOpts:{kbExpr:V.editorTextFocus,primary:1089,weight:100}})}},w6e=class extends Fe{constructor(){super({id:"editor.action.wordHighlight.trigger",label:y("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let r=AD.get(t);r&&r.restoreViewState(!0)}};Tt(AD.ID,AD,0);xe(A6e);xe(y6e);xe(w6e);Xb(Afe)});var YN,D1,T1,C6e,_6e,S6e,E6e,D6e,T6e,k6e,I6e,L6e,N6e,M6e,R6e,F6e,O6e,P6e,B6e,KN,OU,PU,z6e,V6e,H6e,W6e,U6e,j6e,Q6e,G6e=D(()=>{ii();PL();Ks();lm();sH();BF();Nt();We();Hn();vn();ks();Oe();oh();Wt();pP();YN=class extends Sr{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let r=pd(t.getOption(132),t.getOption(131)),o=t.getModel(),s=t.getSelections(),a=s.length>1,l=s.map(c=>{let u=new K(c.positionLineNumber,c.positionColumn),d=this._move(r,o,u,this._wordNavigationType,a);return this._moveTo(c,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>Qi.fromModelSelection(c))),l.length===1){let c=new K(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(c,0)}}_moveTo(e,t,n){return n?new qe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new qe(t.lineNumber,t.column,t.lineNumber,t.column)}},D1=class extends YN{_move(e,t,n,r,o){return Ma.moveWordLeft(e,t,n,r,o)}},T1=class extends YN{_move(e,t,n,r,o){return Ma.moveWordRight(e,t,n,r)}},C6e=class extends D1{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},_6e=class extends D1{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},S6e=class extends D1{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:me.and(V.textInputFocus,me.and(GI,NV)?.negate()),primary:2063,mac:{primary:527},weight:100}})}},E6e=class extends D1{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},D6e=class extends D1{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},T6e=class extends D1{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:me.and(V.textInputFocus,me.and(GI,NV)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}},k6e=class extends D1{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,r,o){return super._move(pd(Qh.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,r,o)}},I6e=class extends D1{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,r,o){return super._move(pd(Qh.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,r,o)}},L6e=class extends T1{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},N6e=class extends T1{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:me.and(V.textInputFocus,me.and(GI,NV)?.negate()),primary:2065,mac:{primary:529},weight:100}})}},M6e=class extends T1{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},R6e=class extends T1{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},F6e=class extends T1{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:me.and(V.textInputFocus,me.and(GI,NV)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}},O6e=class extends T1{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},P6e=class extends T1{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,r,o){return super._move(pd(Qh.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,r,o)}},B6e=class extends T1{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,r,o){return super._move(pd(Qh.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,r,o)}},KN=class extends Sr{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let r=e.get(qi);if(!t.hasModel())return;let o=pd(t.getOption(132),t.getOption(131)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(11),u=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),h=a.map(f=>{let p=this._delete({wordSeparators:o,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:u,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Ms(p,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},OU=class extends KN{_delete(e,t){let n=Ma.deleteWordLeft(e,t);return n||new N(1,1,1,1)}},PU=class extends KN{_delete(e,t){let n=Ma.deleteWordRight(e,t);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new N(r,o,r,o)}},z6e=class extends OU{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:V.writable})}},V6e=class extends OU{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:V.writable})}},H6e=class extends OU{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},W6e=class extends PU{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:V.writable})}},U6e=class extends PU{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:V.writable})}},j6e=class extends PU{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},Q6e=class extends Fe{constructor(){super({id:"deleteInsideWord",precondition:V.writable,label:y("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let r=pd(t.getOption(132),t.getOption(131)),o=t.getModel(),a=t.getSelections().map(l=>{let c=Ma.deleteInsideWord(r,o,l);return new Ms(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};Qe(new C6e);Qe(new _6e);Qe(new S6e);Qe(new E6e);Qe(new D6e);Qe(new T6e);Qe(new L6e);Qe(new N6e);Qe(new M6e);Qe(new R6e);Qe(new F6e);Qe(new O6e);Qe(new k6e);Qe(new I6e);Qe(new P6e);Qe(new B6e);Qe(new z6e);Qe(new V6e);Qe(new H6e);Qe(new W6e);Qe(new U6e);Qe(new j6e);xe(Q6e)});var q6e,Y6e,Cfe,K6e,J6e,_fe,X6e,Z6e,lEt=D(()=>{ii();sH();We();vn();G6e();Xn();q6e=class extends KN{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=BL.deleteWordPartLeft(e);return n||new N(1,1,1,1)}},Y6e=class extends KN{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=BL.deleteWordPartRight(e);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new N(r,o,r,o)}},Cfe=class extends YN{_move(e,t,n,r,o){return BL.moveWordPartLeft(e,t,n,o)}},K6e=class extends Cfe{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};ci.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");J6e=class extends Cfe{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};ci.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");_fe=class extends YN{_move(e,t,n,r,o){return BL.moveWordPartRight(e,t,n)}},X6e=class extends _fe{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},Z6e=class extends _fe{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};Qe(new q6e);Qe(new Y6e);Qe(new K6e);Qe(new J6e);Qe(new X6e);Qe(new Z6e)});var Sfe,cEt=D(()=>{Ad();ae();ii();wB();Oe();Sfe=class extends W{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=hu.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(this.editor.isSimpleWidget?t=new es(y("editor.simple.readonly","Cannot edit in read-only input")):t=new es(y("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};Tt(Sfe.ID,Sfe,2)});var dEt=Ue(BU=>{Qt();Tn();EFe();Ng();Ui();t3();ae();et();var CEi=BU&&BU.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},uEt=BU&&BU.__param||function(i,e){return function(t,n){e(t,n,i)}},$6e=class extends W{constructor(e,t,n){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=n,this._currentModel=Gt(this,void 0);let r=bs("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=bs("_textModel.onDidChangeContent",Se.debounce(s=>this._textModel.onDidChangeContent(s),()=>{},100));this._register(ts(async(s,a)=>{r.read(s),o.read(s);let l=a.add(new Oae),c=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(c,void 0)}))}getBreadcrumbItems(e,t){let n=this._currentModel.read(t);if(!n)return[];let r=n.asListOfDocumentSymbols().filter(o=>e.contains(o.range.startLineNumber)&&!e.contains(o.range.endLineNumber));return r.sort(n$(aa(o=>o.range.endLineNumber-o.range.startLineNumber,ud))),r.map(o=>({name:o.name,kind:o.kind,startLineNumber:o.range.startLineNumber}))}};$6e=CEi([uEt(1,Le),uEt(2,uC)],$6e);nB.setBreadcrumbsSourceFactory((i,e)=>e.createInstance($6e,i))});var bNr,QNr,hEt=D(()=>{uH();wH();jyt();Gyt();Yyt();Jyt();Xyt();d1t();P1t();W1t();Kwt();$wt();txt();FBe();ixt();oxt();axt();uxt();s3e();Yue();Xxt();$xt();eCt();zCt();Zle();hue();R4e();Q4e();s_t();u_t();d_t();bNr=$(p_t());m_t();w_t();S_t();k_t();I_t();O_t();J_t();rSt();cSt();fSt();gSt();vSt();CSt();_St();DSt();ZW();zSt();xde();HSt();WSt();USt();eEt();nEt();aEt();G6e();lEt();cEt();QNr=$(dEt());Ty();JH()});var fEt=D(()=>{});var Efe,e9e,pEt=D(()=>{fEt();Ye();ae();ii();Si();Efe=class extends W{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,Tu&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(92);!this.widget&&e?this.widget=new e9e(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}},e9e=class i extends W{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(re(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(re(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};Tt(Efe.ID,Efe,3)});var mEt=D(()=>{});var bEt=Ue(VU=>{mEt();Ye();Ho();ae();ii();tr();BI();aO();Sl();kL();Ty();var _Ei=VU&&VU.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gEt=VU&&VU.__param||function(i,e){return function(t,n){e(t,n,i)}},t9e,zU=class extends W{static{t9e=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(t9e.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(Wn.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new n9e(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};zU=t9e=_Ei([gEt(1,ru),gEt(2,rn)],zU);var i9e=class extends Fe{constructor(){super({id:"editor.action.inspectTokens",label:Bte.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){zU.get(t)?.launch()}};function SEi(i){let e="";for(let t=0,n=i.length;tSy,tokenize:(r,o,s)=>sO(e,s),tokenizeEncoded:(r,o,s)=>cE(n,s)}}var n9e=class i extends W{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=EEi(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n{Oe();sa();ae();Yr();mL();rf();DEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vEt=function(i,e){return function(t,n){e(t,n,i)}},Dfe=class{static{HU=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Gi.as(Tg.Quickaccess)}provide(e){let t=new te;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let r=this.registry.getQuickAccessProvider(n.substr(HU.PREFIX.length));r&&r.prefix&&r.prefix!==HU.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==HU.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,r=n||"\u2026";return{prefix:n,label:r,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:y("helpPickAriaLabel","{0}, {1}",r,t.description),description:t.description}})}};Dfe=HU=DEi([vEt(0,Na),vEt(1,ni)],Dfe)});var yEt=D(()=>{sa();mL();Ty();AEt();Gi.as(Tg.Quickaccess).registerQuickAccessProvider({ctor:Dfe,prefix:"",helpEntries:[{description:zte.helpQuickAccessActionLabel}]})});var I3,r9e=D(()=>{b_();ae();sB();tl();tm();Zn();Yl();I3=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,n){let r=new te;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=r.add(new On);return o.value=this.doProvide(e,t,n),r.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),r}doProvide(e,t,n){let r=new te,o=this.activeTextEditorControl;if(o&&this.canProvideWithTextEditor(o)){let s={editor:o},a=wle(o);if(a){let l=o.saveViewState()??void 0;r.add(a.onDidChangeCursorPosition(()=>{l=o.saveViewState()??void 0})),s.restoreViewState=()=>{l&&o===this.activeTextEditorControl&&o.restoreViewState(l)},r.add(Tf(t.onCancellationRequested)(()=>s.restoreViewState?.()))}r.add(Ve(()=>this.clearDecorations(o))),r.add(this.provideWithTextEditor(s,e,t,n))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&yd(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){return IH(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Tr(Mie),position:Cc.Full}}}],[s,a]=n.deltaDecorations(r,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var Tfe,wEt=D(()=>{ae();sB();r9e();Oe();Tfe=class i extends I3{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=y("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,W.None}provideWithTextEditor(e,t,n){let r=e.editor,o=new te;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(r,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(r,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(r,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(r,l.lineNumber)){this.clearDecorations(r);return}let u=this.toRange(l.lineNumber,l.column);r.revealRangeInCenter(u,0),this.addDecorations(r,u)};s(),o.add(t.onDidChangeValue(()=>s()));let a=wle(r);return a&&a.getOptions().get(68).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(Ve(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?y("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):y("gotoLineLabel","Go to line {0}.",t);let r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?y("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):y("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let r=this.getModel(e);if(!r)return!1;let o={lineNumber:t,column:n};return r.validatePosition(o).equals(o)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}});var TEi,kEi,WU,kfe,xEt=D(()=>{wEt();sa();mL();fs();Ty();et();ii();vn();rf();TEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kEi=function(i,e){return function(t,n){e(t,n,i)}},WU=class extends Tfe{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Se.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};WU=TEi([kEi(0,ai)],WU);kfe=class i extends Fe{static{this.ID="editor.action.gotoLine"}constructor(){super({id:i.ID,label:Mz.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Na).quickAccess.show(WU.PREFIX)}};xe(kfe);Gi.as(Tg.Quickaccess).registerQuickAccessProvider({ctor:WU,prefix:WU.PREFIX,helpEntries:[{description:Mz.gotoLineActionLabel,commandId:kfe.ID}]})});function Lfe(i,e,t=0,n=0){let r=e;return r.values&&r.values.length>1?IEi(i,r.values,t,n):EEt(i,e,t,n)}function IEi(i,e,t,n){let r=0,o=[];for(let s of e){let[a,l]=EEt(i,s,t,n);if(typeof a!="number")return SEt;r+=a,o.push(...l)}return[r,LEi(o)]}function EEt(i,e,t,n){let r=Cy(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],oE(r)]:SEt}function LEi(i){let e=i.sort((r,o)=>r.start-o.start),t=[],n;for(let r of e)!n||!NEi(n,r)?(n=r,t.push(r)):(n.start=Math.min(n.start,r.start),n.end=Math.max(n.end,r.end));return t}function NEi(i,e){return!(i.end=0,s=CEt(i),a,l=i.split(DEt);if(l.length>1)for(let c of l){let u=CEt(c),{pathNormalized:d,normalized:h,normalizedLowercase:f}=_Et(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:f,expectContiguousMatch:u}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function _Et(i){let e;Nr?e=i.replace(/\//g,kf):e=i.replace(/\\/g,kf);let t=qot(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function o9e(i){return Array.isArray(i)?Ife(i.map(e=>e.original).join(DEt)):Ife(i.original)}var SEt,iMr,DEt,TEt=D(()=>{yg();H0();Si();Pt();SEt=[void 0,[]];iMr=Object.freeze({score:0});DEt=" "});var MEi,kEt,Nfe,yD,s9e,a9e,IEt=D(()=>{Jt();sn();er();Dr();TEt();ae();Pt();We();tr();t3();r9e();Oe();Ui();Jf();MEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kEt=function(i,e){return function(t,n){e(t,n,i)}},yD=class extends I3{static{Nfe=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,y("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),W.None}provideWithTextEditor(e,t,n,r){let o=e.editor,s=this.getModel(o);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,n,r):this.doProvideWithoutEditorSymbols(e,s,t,n):W.None}doProvideWithoutEditorSymbols(e,t,n,r){let o=new te;return this.provideLabelPick(n,y("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,o)||r.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,n,r)))(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new Pp,r=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(r.dispose(),n.complete(!0))}));return t.add(Ve(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,r,o){let s=e.editor,a=new te;a.add(n.onDidAccept(d=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:d.inBackground}),o?.handleAccept?.(h),d.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:d})=>{d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,r),c,u=async d=>{c?.dispose(!0),n.busy=!1,c=new Bi(r),n.busy=!0;try{let h=Ife(n.value.substr(Nfe.PREFIX.length).trim()),f=await this.doGetSymbolPicks(l,h,void 0,c.token,t);if(r.isCancellationRequested)return;if(f.length>0){if(n.items=f,d&&h.original.length===0){let p=cx(f,g=>!!(g.type!=="separator"&&g.range&&N.containsPosition(g.range.decoration,d)));p&&(n.activeItems=[p])}}else h.original.length>0?this.provideLabelPick(n,y("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,y("noSymbolResults","No editor symbols"))}finally{r.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>u(void 0))),u(s.getSelection()?.getPosition()),a.add(n.onDidChangeActive(()=>{let[d]=n.activeItems;d&&d.range&&(s.revealRangeInCenter(d.range.selection,0),this.addDecorations(s,d.range.decoration))})),a}async doGetSymbolPicks(e,t,n,r,o){let s=await e;if(r.isCancellationRequested)return[];let a=t.original.indexOf(Nfe.SCOPE_PREFIX)===0,l=a?1:0,c,u;t.values&&t.values.length>1?(c=o9e(t.values[0]),u=o9e(t.values.slice(1))):c=t;let d,h=this.options?.openSideBySideDirection?.();h&&(d=[{iconClass:h==="right"?ut.asClassName(Ee.splitHorizontal):ut.asClassName(Ee.splitVertical),tooltip:h==="right"?y("openToSide","Open to the Side"):y("openToBottom","Open to the Bottom")}]);let f=[];for(let v=0;vl){let H=!1;if(c!==t&&([I,T]=Lfe(C,{...t,values:void 0},l,_),typeof I=="number"&&(H=!0)),typeof I!="number"&&([I,T]=Lfe(C,c,l,_),typeof I!="number"))continue;if(!H&&u){if(E&&u.original.length>0&&([L,M]=Lfe(E,u)),typeof L!="number")continue;typeof I=="number"&&(I+=L)}}let z=A.tags&&A.tags.indexOf(1)>=0;f.push({index:v,kind:A.kind,score:I,label:C,ariaLabel:iYe(A.name,A.kind),description:E,highlights:z?void 0:{label:T,description:M},range:{selection:N.collapseToStart(A.selectionRange),decoration:A.range},uri:o.uri,symbolName:w,strikethrough:z,buttons:d})}let p=f.sort((v,A)=>a?this.compareByKindAndScore(v,A):this.compareByScore(v,A)),g=[];if(a){let C=function(){A&&typeof v=="number"&&w>0&&(A.label=ig(a9e[v]||s9e,w))},v,A,w=0;for(let _ of p)v!==_.kind?(C(),v=_.kind,w=1,A={type:"separator"},g.push(A)):w++,g.push(_);C()}else p.length>0&&(g=[{label:y("symbols","symbols ({0})",f.length),type:"separator"},...p]);return g}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){let n=a9e[e.kind]||s9e,r=a9e[t.kind]||s9e,o=n.localeCompare(r);return o===0?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){let n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}};yD=Nfe=MEi([kEt(0,Le),kEt(1,uC)],yD);s9e=y("property","properties ({0})"),a9e={5:y("method","methods ({0})"),11:y("function","functions ({0})"),8:y("_constructor","constructors ({0})"),12:y("variable","variables ({0})"),4:y("class","classes ({0})"),22:y("struct","structs ({0})"),23:y("event","events ({0})"),24:y("operator","operators ({0})"),10:y("interface","interfaces ({0})"),2:y("namespace","namespaces ({0})"),3:y("package","packages ({0})"),25:y("typeParameter","type parameters ({0})"),1:y("modules","modules ({0})"),6:y("property","properties ({0})"),9:y("enum","enumerations ({0})"),21:y("enumMember","enumeration members ({0})"),14:y("string","strings ({0})"),0:y("file","files ({0})"),17:y("array","arrays ({0})"),15:y("number","numbers ({0})"),16:y("boolean","booleans ({0})"),18:y("object","objects ({0})"),19:y("key","keys ({0})"),7:y("field","fields ({0})"),13:y("constant","constants ({0})")}});var REi,l9e,c9e,Mfe,LEt=D(()=>{JH();lce();IEt();sa();mL();fs();Ty();et();ii();vn();rf();t3();Ui();REi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},l9e=function(i,e){return function(t,n){e(t,n,i)}},c9e=class extends yD{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Se.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};c9e=REi([l9e(0,ai),l9e(1,Le),l9e(2,uC)],c9e);Mfe=class i extends Fe{static{this.ID="editor.action.quickOutline"}constructor(){super({id:i.ID,label:mO.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:V.hasDocumentSymbolProvider,kbOpts:{kbExpr:V.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Na).quickAccess.show(yD.PREFIX,{itemActivation:om.NONE})}};xe(Mfe);Gi.as(Tg.Quickaccess).registerQuickAccessProvider({ctor:c9e,prefix:yD.PREFIX,helpEntries:[{description:mO.quickOutlineActionLabel,prefix:yD.PREFIX,commandId:Mfe.ID},{description:mO.quickOutlineByCategoryActionLabel,prefix:yD.PREFIX_BY_CATEGORY}]})});function FEi(i){let e=new Map;for(let t of i)e.set(t,(e.get(t)??0)+1);return e}function NEt(i){let e=i.slice(0);e.sort((n,r)=>r.score-n.score);let t=e[0]?.score??0;if(t>0)for(let n of e)n.score/=t;return e}var Rfe,MEt=D(()=>{Rfe=class i{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let n=this.computeEmbedding(e),r=new Map,o=[];for(let[s,a]of this.documents){if(t.isCancellationRequested)return[];for(let l of a.chunks){let c=this.computeSimilarityScore(l,n,r);c>0&&o.push({key:s,score:c})}}return o}static termFrequencies(e){return FEi(i.splitTerms(e))}static*splitTerms(e){let t=n=>n.toLowerCase();for(let[n]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(n);let r=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(r.length>1)for(let o of r)o.length>2&&/\p{Letter}{3,}/gu.test(o)&&(yield t(o))}}updateDocuments(e){for(let{key:t}of e)this.deleteDocument(t);for(let t of e){let n=[];for(let r of t.textChunks){let o=i.termFrequencies(r);for(let s of o.keys())this.chunkOccurrences.set(s,(this.chunkOccurrences.get(s)??0)+1);n.push({text:r,tf:o})}this.chunkCount+=n.length,this.documents.set(t.key,{chunks:n})}return this}deleteDocument(e){let t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(let n of t.chunks)for(let r of n.tf.keys()){let o=this.chunkOccurrences.get(r);if(typeof o=="number"){let s=o-1;s<=0?this.chunkOccurrences.delete(r):this.chunkOccurrences.set(r,s)}}}}computeSimilarityScore(e,t,n){let r=0;for(let[o,s]of Object.entries(t)){let a=e.tf.get(o);if(!a)continue;let l=n.get(o);typeof l!="number"&&(l=this.computeIdf(o),n.set(o,l));let c=a*l;r+=c*s}return r}computeEmbedding(e){let t=i.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){let t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){let t=Object.create(null);for(let[n,r]of e){let o=this.computeIdf(n);o>0&&(t[n]=r*o)}return t}}});function u9e(i){return Array.isArray(i.items)}function REt(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var L3,Ffe,FEt=D(()=>{Jt();sn();ae();gn();(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(L3||(L3={}));Ffe=class extends W{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){let r=new te;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o,s=r.add(new On),a=async()=>{let c=s.value=new te;o?.dispose(!0),e.busy=!1,o=new Bi(t);let u=o.token,d=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(d=d.trim());let h=this._getPicks(d,c,u,n),f=(g,v)=>{let A,w;if(u9e(g)?(A=g.items,w=g.active):A=g,A.length===0){if(v)return!1;(d.length>0||e.hideInput)&&this.options?.noResultsPick&&(S_(this.options.noResultsPick)?A=[this.options.noResultsPick(d)]:A=[this.options.noResultsPick])}return e.items=A,w&&(e.activeItems=[w]),!0},p=async g=>{let v=!1,A=!1;await Promise.all([(async()=>{typeof g.mergeDelay=="number"&&(await Jd(g.mergeDelay),u.isCancellationRequested)||A||(v=f(g.picks,!0))})(),(async()=>{e.busy=!0;try{let w=await g.additionalPicks;if(u.isCancellationRequested)return;let C,_;u9e(g.picks)?(C=g.picks.items,_=g.picks.active):C=g.picks;let E,I;if(u9e(w)?(E=w.items,I=w.active):E=w,E.length>0||!v){let T;if(!_&&!I){let L=e.activeItems[0];L&&C.indexOf(L)!==-1&&(T=L)}f({items:[...C,...E],active:_||I||T})}}finally{u.isCancellationRequested||(e.busy=!1),A=!0}})()])};if(h!==null)if(REt(h))await p(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{let g=await h;if(u.isCancellationRequested)return;REt(g)?await p(g):f(g)}finally{u.isCancellationRequested||(e.busy=!1)}}};r.add(e.onDidChangeValue(()=>a())),a(),r.add(e.onDidAccept(c=>{if(n?.handleAccept){c.inBackground||e.hide(),n.handleAccept?.(e.activeItems[0]);return}let[u]=e.selectedItems;typeof u?.accept=="function"&&(c.inBackground||e.hide(),u.accept(e.keyMods,c))}));let l=async(c,u)=>{if(typeof u.trigger!="function")return;let d=u.buttons?.indexOf(c)??-1;if(d>=0){let h=u.trigger(d,e.keyMods),f=typeof h=="number"?h:await h;if(t.isCancellationRequested)return;switch(f){case L3.NO_ACTION:break;case L3.CLOSE_PICKER:e.hide();break;case L3.REFRESH_PICKER:a();break;case L3.REMOVE_ITEM:{let p=e.items.indexOf(u);if(p!==-1){let g=e.items.slice(),v=g.splice(p,1),A=e.activeItems.filter(C=>C!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=g,A&&(e.activeItems=A),e.keepScrollPosition=w}break}}}};return r.add(e.onDidTriggerItemButton(({button:c,item:u})=>l(c,u))),r.add(e.onDidTriggerSeparatorButton(({button:c,separator:u})=>l(c,u))),r}}});var OEt,wD,JN,Ra,Ofe,d9e,PEt=D(()=>{ROe();Lt();yg();b_();ae();ql();MEt();Oe();Xn();nr();qF();ht();Yr();th();FEt();yv();eh();OEt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wD=function(i,e){return function(t,n){e(t,n,i)}},Ofe=class extends Ffe{static{JN=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=lte(UI,Adt,Eke)}constructor(e,t,n,r,o,s){super(JN.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(d9e)),this.options=e}async _getPicks(e,t,n,r){let o=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];let s=Tf(()=>{let f=new Rfe;f.updateDocuments(o.map(g=>({key:g.commandId,textChunks:[this.getTfIdfChunk(g)]})));let p=f.calculateScores(e,n);return NEt(p).filter(g=>g.score>JN.TFIDF_THRESHOLD).slice(0,JN.TFIDF_MAX_RESULTS)}),a=[];for(let f of o){let p=JN.WORD_FILTER(e,f.label)??void 0,g=f.commandAlias?JN.WORD_FILTER(e,f.commandAlias)??void 0:void 0;if(p||g)f.highlights={label:p,detail:this.options.showAlias?g:void 0},a.push(f);else if(e===f.commandId)a.push(f);else if(e.length>=3){let v=s();if(n.isCancellationRequested)return[];let A=v.find(w=>w.key===f.commandId);A&&(f.tfIdfScore=A.score,a.push(f))}}let l=new Map;for(let f of a){let p=l.get(f.label);p?(f.description=f.commandId,p.description=p.commandId):l.set(f.label,f)}a.sort((f,p)=>{if(f.tfIdfScore&&p.tfIdfScore)return f.tfIdfScore===p.tfIdfScore?f.label.localeCompare(p.label):p.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(p.tfIdfScore)return-1;let g=this.commandsHistory.peek(f.commandId),v=this.commandsHistory.peek(p.commandId);if(g&&v)return g>v?-1:1;if(g)return-1;if(v)return 1;if(this.options.suggestedCommandIds){let A=this.options.suggestedCommandIds.has(f.commandId),w=this.options.suggestedCommandIds.has(p.commandId);if(A&&w)return 0;if(A)return-1;if(w)return 1}return f.label.localeCompare(p.label)});let c=[],u=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let f=0;f{let f=await this.getAdditionalCommandPicks(o,a,e,n);if(n.isCancellationRequested)return[];let p=f.map(g=>this.toCommandPick(g,r));return d&&p[0]?.type!=="separator"&&p.unshift({type:"separator",label:y("suggested","similar commands")}),p})()}:c}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),r=n?y("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(o){ja(o)||this.dialogService.error(y("canNotRun","Command '{0}' resulted in an error",e.label),xB(o))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let r=e;return t&&t!==e&&(r+=` - ${t}`),n&&n.value!==e&&(r+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),r}};Ofe=JN=OEt([wD(1,Ne),wD(2,ni),wD(3,Oi),wD(4,io),wD(5,gy)],Ofe);d9e=class extends W{static{Ra=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,n){super(),this.storageService=e,this.configurationService=t,this.logService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===mE.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Ra.getConfiguredCommandHistoryLength(this.configurationService),Ra.cache&&Ra.cache.limit!==this.configuredCommandsHistoryLength&&(Ra.cache.limit=this.configuredCommandsHistoryLength,Ra.hasChanges=!0))}load(){let e=this.storageService.get(Ra.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(r){this.logService.error(`[CommandsHistory] invalid data: ${r}`)}let n=Ra.cache=new Gl(this.configuredCommandsHistoryLength,1);if(t){let r;t.usesLRU?r=t.entries:r=t.entries.sort((o,s)=>o.value-s.value),r.forEach(o=>n.set(o.key,o.value))}Ra.counter=this.storageService.getNumber(Ra.PREF_KEY_COUNTER,0,Ra.counter)}push(e){Ra.cache&&(Ra.cache.set(e,Ra.counter++),Ra.hasChanges=!0)}peek(e){return Ra.cache?.peek(e)}saveState(){if(!Ra.cache||!Ra.hasChanges)return;let e={usesLRU:!0,entries:[]};Ra.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(Ra.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Ra.PREF_KEY_COUNTER,Ra.counter,0,0),Ra.hasChanges=!1}static getConfiguredCommandHistoryLength(e){let n=e.getValue().workbench?.commandPalette?.history;return typeof n=="number"?n:Ra.DEFAULT_COMMANDS_HISTORY_LENGTH}};d9e=Ra=OEt([wD(0,ec),wD(1,kt),wD(2,no)],d9e)});var Pfe,BEt=D(()=>{jI();WIe();PEt();Pfe=class extends Ofe{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions()){let r;n.metadata?.description&&(gft(n.metadata.description)?r=n.metadata.description:r={original:n.metadata.description,value:n.metadata.description}),t.push({commandId:n.id,commandAlias:n.alias,commandDescription:r,label:rO(n.label)||n.id})}return t}}});var OEi,N3,UU,Bfe,zEt=D(()=>{sa();mL();Ty();fs();BEt();ht();Yr();Xn();eh();qF();ii();vn();rf();OEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N3=function(i,e){return function(t,n){e(t,n,i)}},UU=class extends Pfe{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,n,r,o,s){super({showAlias:!1},e,n,r,o,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};UU=OEi([N3(0,Ne),N3(1,ai),N3(2,ni),N3(3,Oi),N3(4,io),N3(5,gy)],UU);Bfe=class i extends Fe{static{this.ID="editor.action.quickCommand"}constructor(){super({id:i.ID,label:Rz.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Na).quickAccess.show(UU.PREFIX)}};xe(Bfe);Gi.as(Tg.Quickaccess).registerQuickAccessProvider({ctor:UU,prefix:UU.PREFIX,helpEntries:[{description:Rz.quickCommandHelp,commandId:Bfe.ID}]})});var PEi,M3,h9e,VEt=D(()=>{ii();fs();rBe();nr();Wt();ht();_c();yv();PEi=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},M3=function(i,e){return function(t,n){e(t,n,i)}},h9e=class extends aC{constructor(e,t,n,r,o,s,a){super(!0,e,t,n,r,o,s,a)}};h9e=PEi([M3(1,Ze),M3(2,ai),M3(3,Cn),M3(4,Ne),M3(5,ec),M3(6,kt)],h9e);Tt(aC.ID,h9e,4)});var f9e,HEt=D(()=>{ii();kL();Ty();Pb();k2e();f9e=class extends Fe{constructor(){super({id:"editor.action.toggleHighContrast",label:Hte.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(ru),r=n.getColorTheme();Bu(r.type)?(n.setTheme(this._originalThemeName||(ny(r.type)?TL:r1)),this._originalThemeName=null):(n.setTheme(ny(r.type)?DE:TE),this._originalThemeName=r.themeName)}};xe(f9e)});var URr,WEt=D(()=>{hEt();pEt();URr=$(bEt());yEt();xEt();LEt();zEt();VEt();HEt();uN()});var UEt={};Ih(UEt,{CancellationTokenSource:()=>Jvt,Emitter:()=>_le,KeyCode:()=>Xvt,KeyMod:()=>Zvt,MarkerSeverity:()=>nAt,MarkerTag:()=>rAt,Position:()=>$vt,Range:()=>eAt,Selection:()=>tAt,SelectionDirection:()=>iAt,Token:()=>oAt,Uri:()=>Sle,editor:()=>Rg,languages:()=>Fg});var XN=D(()=>{fAt();uOe();WEt()});function qEt(i,e){if(!e)return new zfe({languageId:i,schemas:[],formattingOptions:p9e,modeConfiguration:jEt,diagnosticSettings:QEt,completionSettings:GEt});let{schemas:t,formattingOptions:n,modeConfiguration:r,diagnosticSettings:o,completionSettings:s}=e;return new zfe({languageId:i,schemas:t,formattingOptions:{...p9e,...n,prettierConfig:{...p9e.prettierConfig,...n?.prettierConfig}},modeConfiguration:{...jEt,...r},diagnosticSettings:{...QEt,...o},completionSettings:{...GEt,...s}})}var zfe,jEt,p9e,QEt,GEt,YEt=D(()=>{XN();zfe=class{_onDidChange=new _le;_formattingOptions;_modeConfiguration;_diagnosticSettings;_completionSettings;_schemas=null;_schemasById=Object.create(null);_languageId;_externalFragmentDefinitions;constructor({languageId:e,schemas:t,modeConfiguration:n,formattingOptions:r,diagnosticSettings:o,completionSettings:s}){this._languageId=e,t&&this.setSchemaConfig(t),this._modeConfiguration=n,this._completionSettings=s,this._diagnosticSettings=o,this._formattingOptions=r}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get schemas(){return this._schemas}schemasById(){return this._schemasById}get formattingOptions(){return this._formattingOptions}get diagnosticSettings(){return this._diagnosticSettings}get completionSettings(){return{...this._completionSettings,fillLeafsOnComplete:this._completionSettings.__experimental__fillLeafsOnComplete??this._completionSettings.fillLeafsOnComplete}}get externalFragmentDefinitions(){return this._externalFragmentDefinitions}setSchemaConfig(e){this._schemas=e,this._schemasById=e.reduce((t,n)=>(t[n.uri]=n,t),Object.create(null)),this._onDidChange.fire(this)}setExternalFragmentDefinitions(e){this._externalFragmentDefinitions=e}setModeConfiguration(e){this._modeConfiguration=e,this._onDidChange.fire(this)}setFormattingOptions(e){this._formattingOptions=e,this._onDidChange.fire(this)}setDiagnosticSettings(e){this._diagnosticSettings=e,this._onDidChange.fire(this)}setCompletionSettings(e){this._completionSettings=e,this._onDidChange.fire(this)}};jEt={documentFormattingEdits:!0,documentRangeFormattingEdits:!1,completionItems:!0,hovers:!0,documentSymbols:!1,tokens:!1,colors:!1,foldingRanges:!1,diagnostics:!0,selectionRanges:!1},p9e={prettierConfig:{tabWidth:2}},QEt={jsonDiagnosticSettings:{schemaValidation:"error"}},GEt={__experimental__fillLeafsOnComplete:!1}});var m9e=D(()=>{});var KEt,g9e,JEt,Vfe,jv,nc,Hfe,XEt,b9e,ZEt,$Et,eDt,tDt,v9e,iDt,nDt,rDt,Wfe,R3,F3,Ufe,ZN,oDt,A9e,y9e,w9e,x9e,C9e,sDt,aDt,lDt,_9e,cDt,uDt,S9e,$N,dDt,jfe,hDt,fDt,E9e,pDt,mDt,gDt,bDt,Qfe,vDt,ADt,yDt,wDt,xDt,CDt,_Dt,SDt,EDt,DDt,TDt,Gfe,kDt,D9e,IDt,LDt,NDt,MDt,RDt,FDt,ODt,PDt,BDt,zDt,VDt,HDt,T9e,k9e,WDt,I9e,UDt,jDt,QDt,GDt,qDt,YDt,KDt,L9e,Me,N9e=D(()=>{"use strict";(function(i){function e(t){return typeof t=="string"}i.is=e})(KEt||(KEt={}));(function(i){function e(t){return typeof t=="string"}i.is=e})(g9e||(g9e={}));(function(i){i.MIN_VALUE=-2147483648,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(JEt||(JEt={}));(function(i){i.MIN_VALUE=0,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(Vfe||(Vfe={}));(function(i){function e(n,r){return n===Number.MAX_VALUE&&(n=Vfe.MAX_VALUE),r===Number.MAX_VALUE&&(r=Vfe.MAX_VALUE),{line:n,character:r}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&Me.uinteger(r.line)&&Me.uinteger(r.character)}i.is=t})(jv||(jv={}));(function(i){function e(n,r,o,s){if(Me.uinteger(n)&&Me.uinteger(r)&&Me.uinteger(o)&&Me.uinteger(s))return{start:jv.create(n,r),end:jv.create(o,s)};if(jv.is(n)&&jv.is(r))return{start:n,end:r};throw new Error(`Range#create called with invalid arguments[${n}, ${r}, ${o}, ${s}]`)}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&jv.is(r.start)&&jv.is(r.end)}i.is=t})(nc||(nc={}));(function(i){function e(n,r){return{uri:n,range:r}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&nc.is(r.range)&&(Me.string(r.uri)||Me.undefined(r.uri))}i.is=t})(Hfe||(Hfe={}));(function(i){function e(n,r,o,s){return{targetUri:n,targetRange:r,targetSelectionRange:o,originSelectionRange:s}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&nc.is(r.targetRange)&&Me.string(r.targetUri)&&nc.is(r.targetSelectionRange)&&(nc.is(r.originSelectionRange)||Me.undefined(r.originSelectionRange))}i.is=t})(XEt||(XEt={}));(function(i){function e(n,r,o,s){return{red:n,green:r,blue:o,alpha:s}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&Me.numberRange(r.red,0,1)&&Me.numberRange(r.green,0,1)&&Me.numberRange(r.blue,0,1)&&Me.numberRange(r.alpha,0,1)}i.is=t})(b9e||(b9e={}));(function(i){function e(n,r){return{range:n,color:r}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&nc.is(r.range)&&b9e.is(r.color)}i.is=t})(ZEt||(ZEt={}));(function(i){function e(n,r,o){return{label:n,textEdit:r,additionalTextEdits:o}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&Me.string(r.label)&&(Me.undefined(r.textEdit)||F3.is(r))&&(Me.undefined(r.additionalTextEdits)||Me.typedArray(r.additionalTextEdits,F3.is))}i.is=t})($Et||($Et={}));(function(i){i.Comment="comment",i.Imports="imports",i.Region="region"})(eDt||(eDt={}));(function(i){function e(n,r,o,s,a,l){let c={startLine:n,endLine:r};return Me.defined(o)&&(c.startCharacter=o),Me.defined(s)&&(c.endCharacter=s),Me.defined(a)&&(c.kind=a),Me.defined(l)&&(c.collapsedText=l),c}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&Me.uinteger(r.startLine)&&Me.uinteger(r.startLine)&&(Me.undefined(r.startCharacter)||Me.uinteger(r.startCharacter))&&(Me.undefined(r.endCharacter)||Me.uinteger(r.endCharacter))&&(Me.undefined(r.kind)||Me.string(r.kind))}i.is=t})(tDt||(tDt={}));(function(i){function e(n,r){return{location:n,message:r}}i.create=e;function t(n){let r=n;return Me.defined(r)&&Hfe.is(r.location)&&Me.string(r.message)}i.is=t})(v9e||(v9e={}));(function(i){i.Error=1,i.Warning=2,i.Information=3,i.Hint=4})(iDt||(iDt={}));(function(i){i.Unnecessary=1,i.Deprecated=2})(nDt||(nDt={}));(function(i){function e(t){let n=t;return Me.objectLiteral(n)&&Me.string(n.href)}i.is=e})(rDt||(rDt={}));(function(i){function e(o,s,a,l,c,u){let d={range:o,message:s};return Me.defined(a)&&(d.severity=a),Me.defined(l)&&(d.code=l),Me.defined(c)&&(d.source=c),Me.defined(u)&&(d.relatedInformation=u),d}i.create=e;function t(o){var s;let a=o;return Me.defined(a)&&nc.is(a.range)&&(Me.string(a.message)||$N.is(a.message))&&(Me.number(a.severity)||Me.undefined(a.severity))&&(Me.integer(a.code)||Me.string(a.code)||Me.undefined(a.code))&&(Me.undefined(a.codeDescription)||Me.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(Me.string(a.source)||Me.undefined(a.source))&&(Me.undefined(a.relatedInformation)||Me.typedArray(a.relatedInformation,v9e.is))}i.is=t;function n(o){return Me.string(o.message)}i.is3_17=n;function r(o){if(Me.string(o.message))return o.message;if($N.is(o.message))return o.message.value;throw new Error(`Unknown message type ${typeof o.message}`)}i.getMessageString=r})(Wfe||(Wfe={}));(function(i){function e(n,r,...o){let s={title:n,command:r};return Me.defined(o)&&o.length>0&&(s.arguments=o),s}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.string(r.title)&&(r.tooltip===void 0||Me.string(r.tooltip))&&Me.string(r.command)}i.is=t})(R3||(R3={}));(function(i){function e(o,s){return{range:o,newText:s}}i.replace=e;function t(o,s){return{range:{start:o,end:o},newText:s}}i.insert=t;function n(o){return{range:o,newText:""}}i.del=n;function r(o){let s=o;return Me.objectLiteral(s)&&Me.string(s.newText)&&nc.is(s.range)}i.is=r})(F3||(F3={}));(function(i){function e(n,r,o){let s={label:n};return r!==void 0&&(s.needsConfirmation=r),o!==void 0&&(s.description=o),s}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&Me.string(r.label)&&(Me.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(Me.string(r.description)||r.description===void 0)}i.is=t})(Ufe||(Ufe={}));(function(i){function e(t){let n=t;return Me.string(n)}i.is=e})(ZN||(ZN={}));(function(i){function e(o,s,a){return{range:o,newText:s,annotationId:a}}i.replace=e;function t(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}i.insert=t;function n(o,s){return{range:o,newText:"",annotationId:s}}i.del=n;function r(o){let s=o;return F3.is(s)&&(Ufe.is(s.annotationId)||ZN.is(s.annotationId))}i.is=r})(oDt||(oDt={}));(function(i){function e(n,r){return{textDocument:n,edits:r}}i.create=e;function t(n){let r=n;return Me.defined(r)&&_9e.is(r.textDocument)&&Array.isArray(r.edits)}i.is=t})(A9e||(A9e={}));(function(i){function e(n,r,o){let s={kind:"create",uri:n};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}i.create=e;function t(n){let r=n;return r&&r.kind==="create"&&Me.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||Me.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||Me.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||ZN.is(r.annotationId))}i.is=t})(y9e||(y9e={}));(function(i){function e(n,r,o,s){let a={kind:"rename",oldUri:n,newUri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}i.create=e;function t(n){let r=n;return r&&r.kind==="rename"&&Me.string(r.oldUri)&&Me.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||Me.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||Me.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||ZN.is(r.annotationId))}i.is=t})(w9e||(w9e={}));(function(i){function e(n,r,o){let s={kind:"delete",uri:n};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}i.create=e;function t(n){let r=n;return r&&r.kind==="delete"&&Me.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||Me.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||Me.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||ZN.is(r.annotationId))}i.is=t})(x9e||(x9e={}));(function(i){function e(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(r=>Me.string(r.kind)?y9e.is(r)||w9e.is(r)||x9e.is(r):A9e.is(r)))}i.is=e})(C9e||(C9e={}));(function(i){function e(t){let n=t;return Me.objectLiteral(n)&&nc.is(n.range)&&I9e.isSnippet(n.snippet)&&(n.annotationId===void 0||Ufe.is(n.annotationId)||ZN.is(n.annotationId))}i.is=e})(sDt||(sDt={}));(function(i){function e(n){return{uri:n}}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.string(r.uri)}i.is=t})(aDt||(aDt={}));(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.string(r.uri)&&Me.integer(r.version)}i.is=t})(lDt||(lDt={}));(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.string(r.uri)&&(r.version===null||Me.integer(r.version))}i.is=t})(_9e||(_9e={}));(function(i){i.ABAP="abap",i.WindowsBat="bat",i.BibTeX="bibtex",i.Clojure="clojure",i.Coffeescript="coffeescript",i.C="c",i.CPP="cpp",i.CSharp="csharp",i.CSS="css",i.D="d",i.Delphi="pascal",i.Diff="diff",i.Dart="dart",i.Dockerfile="dockerfile",i.Elixir="elixir",i.Erlang="erlang",i.FSharp="fsharp",i.GitCommit="git-commit",i.GitRebase="git-rebase",i.Go="go",i.Groovy="groovy",i.Handlebars="handlebars",i.Haskell="haskell",i.HTML="html",i.Ini="ini",i.Java="java",i.JavaScript="javascript",i.JavaScriptReact="javascriptreact",i.JSON="json",i.LaTeX="latex",i.Less="less",i.Lua="lua",i.Makefile="makefile",i.Markdown="markdown",i.ObjectiveC="objective-c",i.ObjectiveCPP="objective-cpp",i.Pascal="pascal",i.Perl="perl",i.Perl6="perl6",i.PHP="php",i.Plaintext="plaintext",i.Powershell="powershell",i.Pug="jade",i.Python="python",i.R="r",i.Razor="razor",i.Ruby="ruby",i.Rust="rust",i.SCSS="scss",i.SASS="sass",i.Scala="scala",i.ShaderLab="shaderlab",i.ShellScript="shellscript",i.SQL="sql",i.Swift="swift",i.TypeScript="typescript",i.TypeScriptReact="typescriptreact",i.TeX="tex",i.VisualBasic="vb",i.XML="xml",i.XSL="xsl",i.YAML="yaml"})(cDt||(cDt={}));(function(i){function e(n,r,o,s){return{uri:n,languageId:r,version:o,text:s}}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.string(r.uri)&&Me.string(r.languageId)&&Me.integer(r.version)&&Me.string(r.text)}i.is=t})(uDt||(uDt={}));(function(i){i.PlainText="plaintext",i.Markdown="markdown";function e(t){let n=t;return n===i.PlainText||n===i.Markdown}i.is=e})(S9e||(S9e={}));(function(i){function e(t){let n=t;return Me.objectLiteral(t)&&S9e.is(n.kind)&&Me.string(n.value)}i.is=e})($N||($N={}));(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(dDt||(dDt={}));(function(i){i.PlainText=1,i.Snippet=2})(jfe||(jfe={}));(function(i){i.Deprecated=1})(hDt||(hDt={}));(function(i){function e(n,r,o){return{newText:n,insert:r,replace:o}}i.create=e;function t(n){let r=n;return r&&Me.string(r.newText)&&nc.is(r.insert)&&nc.is(r.replace)}i.is=t})(fDt||(fDt={}));(function(i){i.asIs=1,i.adjustIndentation=2})(E9e||(E9e={}));(function(i){i.Replace=1,i.Merge=2})(pDt||(pDt={}));(function(i){function e(t){let n=t;return n&&(Me.string(n.detail)||n.detail===void 0)&&(Me.string(n.description)||n.description===void 0)}i.is=e})(mDt||(mDt={}));(function(i){function e(t){return{label:t}}i.create=e})(gDt||(gDt={}));(function(i){function e(t,n){return{items:t||[],isIncomplete:!!n}}i.create=e})(bDt||(bDt={}));(function(i){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i.fromPlainText=e;function t(n){let r=n;return Me.string(r)||Me.objectLiteral(r)&&Me.string(r.language)&&Me.string(r.value)}i.is=t})(Qfe||(Qfe={}));(function(i){function e(t){let n=t;return!!n&&Me.objectLiteral(n)&&($N.is(n.contents)||Qfe.is(n.contents)||Me.typedArray(n.contents,Qfe.is))&&(t.range===void 0||nc.is(t.range))}i.is=e})(vDt||(vDt={}));(function(i){function e(t,n){return n?{label:t,documentation:n}:{label:t}}i.create=e})(ADt||(ADt={}));(function(i){function e(t,n,...r){let o={label:t};return Me.defined(n)&&(o.documentation=n),Me.defined(r)?o.parameters=r:o.parameters=[],o}i.create=e})(yDt||(yDt={}));(function(i){i.Text=1,i.Read=2,i.Write=3})(wDt||(wDt={}));(function(i){function e(t,n){let r={range:t};return Me.number(n)&&(r.kind=n),r}i.create=e})(xDt||(xDt={}));(function(i){i.File=1,i.Module=2,i.Namespace=3,i.Package=4,i.Class=5,i.Method=6,i.Property=7,i.Field=8,i.Constructor=9,i.Enum=10,i.Interface=11,i.Function=12,i.Variable=13,i.Constant=14,i.String=15,i.Number=16,i.Boolean=17,i.Array=18,i.Object=19,i.Key=20,i.Null=21,i.EnumMember=22,i.Struct=23,i.Event=24,i.Operator=25,i.TypeParameter=26})(CDt||(CDt={}));(function(i){i.Deprecated=1})(_Dt||(_Dt={}));(function(i){function e(t,n,r,o,s){let a={name:t,kind:n,location:{uri:o,range:r}};return s&&(a.containerName=s),a}i.create=e})(SDt||(SDt={}));(function(i){function e(t,n,r,o){return o!==void 0?{name:t,kind:n,location:{uri:r,range:o}}:{name:t,kind:n,location:{uri:r}}}i.create=e})(EDt||(EDt={}));(function(i){function e(n,r,o,s,a,l){let c={name:n,detail:r,kind:o,range:s,selectionRange:a};return l!==void 0&&(c.children=l),c}i.create=e;function t(n){let r=n;return r&&Me.string(r.name)&&Me.number(r.kind)&&nc.is(r.range)&&nc.is(r.selectionRange)&&(r.detail===void 0||Me.string(r.detail))&&(r.deprecated===void 0||Me.boolean(r.deprecated))&&(r.children===void 0||Array.isArray(r.children))&&(r.tags===void 0||Array.isArray(r.tags))}i.is=t})(DDt||(DDt={}));(function(i){i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorMove="refactor.move",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll",i.Notebook="notebook"})(TDt||(TDt={}));(function(i){i.Invoked=1,i.Automatic=2})(Gfe||(Gfe={}));(function(i){function e(n,r,o){let s={diagnostics:n};return r!=null&&(s.only=r),o!=null&&(s.triggerKind=o),s}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.typedArray(r.diagnostics,Wfe.is)&&(r.only===void 0||Me.typedArray(r.only,Me.string))&&(r.triggerKind===void 0||r.triggerKind===Gfe.Invoked||r.triggerKind===Gfe.Automatic)}i.is=t})(kDt||(kDt={}));(function(i){i.LLMGenerated=1;function e(t){return Me.defined(t)&&t===i.LLMGenerated}i.is=e})(D9e||(D9e={}));(function(i){function e(n,r,o){let s={title:n},a=!0;return typeof r=="string"?(a=!1,s.kind=r):R3.is(r)?s.command=r:s.edit=r,a&&o!==void 0&&(s.kind=o),s}i.create=e;function t(n){let r=n;return r&&Me.string(r.title)&&(r.diagnostics===void 0||Me.typedArray(r.diagnostics,Wfe.is))&&(r.kind===void 0||Me.string(r.kind))&&(r.edit!==void 0||r.command!==void 0)&&(r.command===void 0||R3.is(r.command))&&(r.isPreferred===void 0||Me.boolean(r.isPreferred))&&(r.edit===void 0||C9e.is(r.edit))&&(r.tags===void 0||Me.typedArray(r.tags,D9e.is))}i.is=t})(IDt||(IDt={}));(function(i){function e(n,r){let o={range:n};return Me.defined(r)&&(o.data=r),o}i.create=e;function t(n){let r=n;return Me.defined(r)&&nc.is(r.range)&&(Me.undefined(r.command)||R3.is(r.command))}i.is=t})(LDt||(LDt={}));(function(i){function e(n,r){return{tabSize:n,insertSpaces:r}}i.create=e;function t(n){let r=n;return Me.defined(r)&&Me.uinteger(r.tabSize)&&Me.boolean(r.insertSpaces)}i.is=t})(NDt||(NDt={}));(function(i){function e(n,r,o){return{range:n,target:r,data:o}}i.create=e;function t(n){let r=n;return Me.defined(r)&&nc.is(r.range)&&(Me.undefined(r.target)||Me.string(r.target))}i.is=t})(MDt||(MDt={}));(function(i){function e(n,r){return{range:n,parent:r}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&nc.is(r.range)&&(r.parent===void 0||i.is(r.parent))}i.is=t})(RDt||(RDt={}));(function(i){i.namespace="namespace",i.type="type",i.class="class",i.enum="enum",i.interface="interface",i.struct="struct",i.typeParameter="typeParameter",i.parameter="parameter",i.variable="variable",i.property="property",i.enumMember="enumMember",i.event="event",i.function="function",i.method="method",i.macro="macro",i.keyword="keyword",i.modifier="modifier",i.comment="comment",i.string="string",i.number="number",i.regexp="regexp",i.operator="operator",i.decorator="decorator",i.label="label"})(FDt||(FDt={}));(function(i){i.declaration="declaration",i.definition="definition",i.readonly="readonly",i.static="static",i.deprecated="deprecated",i.abstract="abstract",i.async="async",i.modification="modification",i.documentation="documentation",i.defaultLibrary="defaultLibrary"})(ODt||(ODt={}));(function(i){function e(t){let n=t;return Me.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i.is=e})(PDt||(PDt={}));(function(i){function e(n,r){return{range:n,text:r}}i.create=e;function t(n){let r=n;return r!=null&&nc.is(r.range)&&Me.string(r.text)}i.is=t})(BDt||(BDt={}));(function(i){function e(n,r,o){return{range:n,variableName:r,caseSensitiveLookup:o}}i.create=e;function t(n){let r=n;return r!=null&&nc.is(r.range)&&Me.boolean(r.caseSensitiveLookup)&&(Me.string(r.variableName)||r.variableName===void 0)}i.is=t})(zDt||(zDt={}));(function(i){function e(n,r){return{range:n,expression:r}}i.create=e;function t(n){let r=n;return r!=null&&nc.is(r.range)&&(Me.string(r.expression)||r.expression===void 0)}i.is=t})(VDt||(VDt={}));(function(i){function e(n,r){return{frameId:n,stoppedLocation:r}}i.create=e;function t(n){let r=n;return Me.defined(r)&&nc.is(n.stoppedLocation)}i.is=t})(HDt||(HDt={}));(function(i){i.Type=1,i.Parameter=2;function e(t){return t===1||t===2}i.is=e})(T9e||(T9e={}));(function(i){function e(n){return{value:n}}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&(r.tooltip===void 0||Me.string(r.tooltip)||$N.is(r.tooltip))&&(r.location===void 0||Hfe.is(r.location))&&(r.command===void 0||R3.is(r.command))}i.is=t})(k9e||(k9e={}));(function(i){function e(n,r,o){let s={position:n,label:r};return o!==void 0&&(s.kind=o),s}i.create=e;function t(n){let r=n;return Me.objectLiteral(r)&&jv.is(r.position)&&(Me.string(r.label)||Me.typedArray(r.label,k9e.is))&&(r.kind===void 0||T9e.is(r.kind))&&r.textEdits===void 0||Me.typedArray(r.textEdits,F3.is)&&(r.tooltip===void 0||Me.string(r.tooltip)||$N.is(r.tooltip))&&(r.paddingLeft===void 0||Me.boolean(r.paddingLeft))&&(r.paddingRight===void 0||Me.boolean(r.paddingRight))}i.is=t})(WDt||(WDt={}));(function(i){function e(n){return{kind:"snippet",value:n}}i.createSnippet=e;function t(n){let r=n;return Me.objectLiteral(r)&&r.kind==="snippet"&&Me.string(r.value)}i.isSnippet=t})(I9e||(I9e={}));(function(i){function e(t,n,r,o){return{insertText:t,filterText:n,range:r,command:o}}i.create=e})(UDt||(UDt={}));(function(i){function e(t){return{items:t}}i.create=e})(jDt||(jDt={}));(function(i){i.Invoked=1,i.Automatic=2})(QDt||(QDt={}));(function(i){function e(t,n){return{range:t,text:n}}i.create=e})(GDt||(GDt={}));(function(i){function e(t,n){return{triggerKind:t,selectedCompletionInfo:n}}i.create=e})(qDt||(qDt={}));(function(i){function e(t){let n=t;return Me.objectLiteral(n)&&g9e.is(n.uri)&&Me.string(n.name)}i.is=e})(YDt||(YDt={}));(function(i){function e(o,s,a,l){return new L9e(o,s,a,l)}i.create=e;function t(o){let s=o;return!!(Me.defined(s)&&Me.string(s.uri)&&(Me.undefined(s.languageId)||Me.string(s.languageId))&&Me.uinteger(s.lineCount)&&Me.func(s.getText)&&Me.func(s.positionAt)&&Me.func(s.offsetAt))}i.is=t;function n(o,s){let a=o.getText(),l=r(s,(u,d)=>{let h=u.range.start.line-d.range.start.line;return h===0?u.range.start.character-d.range.start.character:h}),c=a.length;for(let u=l.length-1;u>=0;u--){let d=l[u],h=o.offsetAt(d.range.start),f=o.offsetAt(d.range.end);if(f<=c)a=a.substring(0,h)+d.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}i.applyEdits=n;function r(o,s){if(o.length<=1)return o;let a=o.length/2|0,l=o.slice(0,a),c=o.slice(a);r(l,s),r(c,s);let u=0,d=0,h=0;for(;u0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return jv.create(0,e);for(;ne?r=s:n=s+1}let o=n-1;return jv.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1"u"}i.undefined=n;function r(f){return f===!0||f===!1}i.boolean=r;function o(f){return e.call(f)==="[object String]"}i.string=o;function s(f){return e.call(f)==="[object Number]"}i.number=s;function a(f,p,g){return e.call(f)==="[object Number]"&&p<=f&&f<=g}i.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}i.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}i.uinteger=c;function u(f){return e.call(f)==="[object Function]"}i.func=u;function d(f){return f!==null&&typeof f=="object"}i.objectLiteral=d;function h(f,p){return Array.isArray(f)&&f.every(p)}i.typedArray=h})(Me||(Me={}))});var bC,JDt=D(()=>{bC=class{constructor(e){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{let t=this._sourceText.charAt(this._pos);return this._pos++,t},this.eat=t=>{if(this._testNextCharacter(t))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=t=>{let n=this._testNextCharacter(t),r=!1;for(n&&(r=n,this._start=this._pos);n;)this._pos++,n=this._testNextCharacter(t),r=!0;return r},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=t=>{this._pos=t},this.match=(t,n=!0,r=!1)=>{let o=null,s=null;return typeof t=="string"?(s=new RegExp(t,r?"i":"g").test(this._sourceText.slice(this._pos,this._pos+t.length)),o=t):t instanceof RegExp&&(s=this._sourceText.slice(this._pos).match(t),o=s?.[0]),s!=null&&(typeof t=="string"||s instanceof Array&&this._sourceText.startsWith(s[0],this._pos))?(n&&(this._start=this._pos,o&&o.length&&(this._pos+=o.length)),s):!1},this.backUp=t=>{this._pos-=t},this.column=()=>this._pos,this.indentation=()=>{let t=this._sourceText.match(/\s*/),n=0;if(t&&t.length!==0){let r=t[0],o=0;for(;r.length>o;)r.charCodeAt(o)===9?n+=2:n++,o++}return n},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){let t=this._sourceText.charAt(this._pos),n=!1;return typeof e=="string"?n=t===e:n=e instanceof RegExp?e.test(t):e(t),n}}});function Fs(i){return{ofRule:i}}function uo(i,e){return{ofRule:i,isList:!0,separator:e}}function M9e(i,e){let t=i.match;return i.match=n=>{let r=!1;return t&&(r=t(n)),r&&e.every(o=>o.match&&!o.match(n))},i}function O3(i,e){return{style:e,match:t=>t.kind===i}}function jn(i,e){return{style:e||"punctuation",match:t=>t.kind==="Punctuation"&&t.value===i}}var R9e=D(()=>{});function bh(i){return{style:"keyword",match:e=>e.kind==="Name"&&e.value===i}}function ga(i){return{style:i,match:e=>e.kind==="Name",update(e,t){e.name=t.value}}}function BEi(i){return{style:i,match:e=>e.kind==="Name",update(e,t){var n;!((n=e.prevState)===null||n===void 0)&&n.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}}}var ff,qfe,Yfe,Kfe,F9e=D(()=>{R9e();ff=$(na()),qfe=i=>i===" "||i===" "||i===","||i===` -`||i==="\r"||i==="\uFEFF"||i==="\xA0",Yfe={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},Kfe={Document:[uo("Definition")],Definition(i){switch(i.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return ff.Kind.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[bh("query"),Fs(ga("def")),Fs("VariableDefinitions"),uo("Directive"),"SelectionSet"],Mutation:[bh("mutation"),Fs(ga("def")),Fs("VariableDefinitions"),uo("Directive"),"SelectionSet"],Subscription:[bh("subscription"),Fs(ga("def")),Fs("VariableDefinitions"),uo("Directive"),"SelectionSet"],VariableDefinitions:[jn("("),uo("VariableDefinition"),jn(")")],VariableDefinition:["Variable",jn(":"),"Type",Fs("DefaultValue")],Variable:[jn("$","variable"),ga("variable")],DefaultValue:[jn("="),"Value"],SelectionSet:[jn("{"),uo("Selection"),jn("}")],Selection(i,e){return i.value==="..."?e.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":e.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[ga("property"),jn(":"),ga("qualifier"),Fs("Arguments"),uo("Directive"),Fs("SelectionSet")],Field:[ga("property"),Fs("Arguments"),uo("Directive"),Fs("SelectionSet")],Arguments:[jn("("),uo("Argument"),jn(")")],Argument:[ga("attribute"),jn(":"),"Value"],FragmentSpread:[jn("..."),ga("def"),uo("Directive")],InlineFragment:[jn("..."),Fs("TypeCondition"),uo("Directive"),"SelectionSet"],FragmentDefinition:[bh("fragment"),Fs(M9e(ga("def"),[bh("on")])),"TypeCondition",uo("Directive"),"SelectionSet"],TypeCondition:[bh("on"),"NamedType"],Value(i){switch(i.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(i.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(i.value){case"true":case"false":return"BooleanValue"}return i.value==="null"?"NullValue":"EnumValue"}},NumberValue:[O3("Number","number")],StringValue:[{style:"string",match:i=>i.kind==="String",update(i,e){e.value.startsWith('"""')&&(i.inBlockstring=!e.value.slice(3).endsWith('"""'))}}],BooleanValue:[O3("Name","builtin")],NullValue:[O3("Name","keyword")],EnumValue:[ga("string-2")],ListValue:[jn("["),uo("Value"),jn("]")],ObjectValue:[jn("{"),uo("ObjectField"),jn("}")],ObjectField:[ga("attribute"),jn(":"),"Value"],Type(i){return i.value==="["?"ListType":"NonNullType"},ListType:[jn("["),"Type",jn("]"),Fs(jn("!"))],NonNullType:["NamedType",Fs(jn("!"))],NamedType:[BEi("atom")],Directive:[jn("@","meta"),ga("meta"),Fs("Arguments")],DirectiveDef:[bh("directive"),jn("@","meta"),ga("meta"),Fs("ArgumentsDef"),bh("on"),uo("DirectiveLocation",jn("|"))],InterfaceDef:[bh("interface"),ga("atom"),Fs("Implements"),uo("Directive"),Fs("FieldsDef")],Implements:[bh("implements"),uo("NamedType",jn("&"))],DirectiveLocation:[ga("string-2")],SchemaDef:[bh("schema"),uo("Directive"),jn("{"),uo("OperationTypeDef"),jn("}")],OperationTypeDef:[ga("keyword"),jn(":"),ga("atom")],ScalarDef:[bh("scalar"),ga("atom"),uo("Directive")],ObjectTypeDef:[bh("type"),ga("atom"),Fs("Implements"),uo("Directive"),Fs("FieldsDef")],FieldsDef:[jn("{"),uo("FieldDef"),jn("}")],FieldDef:[ga("property"),Fs("ArgumentsDef"),jn(":"),"Type",uo("Directive")],ArgumentsDef:[jn("("),uo("InputValueDef"),jn(")")],InputValueDef:[ga("attribute"),jn(":"),"Type",Fs("DefaultValue"),uo("Directive")],UnionDef:[bh("union"),ga("atom"),uo("Directive"),jn("="),uo("UnionMember",jn("|"))],UnionMember:["NamedType"],EnumDef:[bh("enum"),ga("atom"),uo("Directive"),Fs("EnumValuesDef")],EnumValuesDef:[jn("{"),uo("EnumValueDef"),jn("}")],EnumValueDef:[ga("string-2"),uo("Directive")],InputDef:[bh("input"),ga("atom"),uo("Directive"),Fs("InputFieldsDef")],InputFieldsDef:[jn("{"),uo("InputValueDef"),jn("}")],ExtendDef:[bh("extend"),"ExtensionDefinition"],ExtensionDefinition(i){switch(i.value){case"schema":return ff.Kind.SCHEMA_EXTENSION;case"scalar":return ff.Kind.SCALAR_TYPE_EXTENSION;case"type":return ff.Kind.OBJECT_TYPE_EXTENSION;case"interface":return ff.Kind.INTERFACE_TYPE_EXTENSION;case"union":return ff.Kind.UNION_TYPE_EXTENSION;case"enum":return ff.Kind.ENUM_TYPE_EXTENSION;case"input":return ff.Kind.INPUT_OBJECT_TYPE_EXTENSION}},[ff.Kind.SCHEMA_EXTENSION]:["SchemaDef"],[ff.Kind.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[ff.Kind.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[ff.Kind.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[ff.Kind.UNION_TYPE_EXTENSION]:["UnionDef"],[ff.Kind.ENUM_TYPE_EXTENSION]:["EnumDef"],[ff.Kind.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]}});function P3(i={eatWhitespace:e=>e.eatWhile(qfe),lexRules:Yfe,parseRules:Kfe,editorConfig:{}}){return{startState(){let e={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return jU(i.parseRules,e,$Dt.Kind.DOCUMENT),e},token(e,t){return zEi(e,t,i)}}}function zEi(i,e,t){var n;if(e.inBlockstring)return i.match(/.*"""/)?(e.inBlockstring=!1,"string"):(i.skipToEnd(),"string");let{lexRules:r,parseRules:o,eatWhitespace:s,editorConfig:a}=t;if(e.rule&&e.rule.length===0?B9e(e):e.needsAdvance&&(e.needsAdvance=!1,P9e(e,!0)),i.sol()){let u=a?.tabSize||2;e.indentLevel=Math.floor(i.indentation()/u)}if(s(i))return"ws";let l=HEi(r,i);if(!l)return i.match(/\S+/)||i.match(/\s/),jU(O9e,e,"Invalid"),"invalidchar";if(l.kind==="Comment")return jU(O9e,e,"Comment"),"comment";let c=XDt({},e);if(l.kind==="Punctuation"){if(/^[{([]/.test(l.value))e.indentLevel!==void 0&&(e.levels=(e.levels||[]).concat(e.indentLevel+1));else if(/^[})\]]/.test(l.value)){let u=e.levels=(e.levels||[]).slice(0,-1);e.indentLevel&&u.length>0&&u.at(-1){F9e();$Dt=$(na());O9e={Invalid:[],Comment:[]}});function z9e(i,e){let t=i.split(` -`),n=P3(),r=n.startState(),o="",s=new bC("");for(let a=0;a{if(!(u!==e.line||a.getCurrentPosition()+t{xD();Ll=$(na());(function(i){i.TYPE_SYSTEM="TYPE_SYSTEM",i.EXECUTABLE="EXECUTABLE",i.UNKNOWN="UNKNOWN"})(k1||(k1={}));WEi=[Ll.Kind.SCHEMA_DEFINITION,Ll.Kind.OPERATION_TYPE_DEFINITION,Ll.Kind.SCALAR_TYPE_DEFINITION,Ll.Kind.OBJECT_TYPE_DEFINITION,Ll.Kind.INTERFACE_TYPE_DEFINITION,Ll.Kind.UNION_TYPE_DEFINITION,Ll.Kind.ENUM_TYPE_DEFINITION,Ll.Kind.INPUT_OBJECT_TYPE_DEFINITION,Ll.Kind.DIRECTIVE_DEFINITION,Ll.Kind.SCHEMA_EXTENSION,Ll.Kind.SCALAR_TYPE_EXTENSION,Ll.Kind.OBJECT_TYPE_EXTENSION,Ll.Kind.INTERFACE_TYPE_EXTENSION,Ll.Kind.UNION_TYPE_EXTENSION,Ll.Kind.ENUM_TYPE_EXTENSION,Ll.Kind.INPUT_OBJECT_TYPE_EXTENSION],UEi=i=>{let e=k1.UNKNOWN;if(i)try{(0,Ll.visit)((0,Ll.parse)(i),{enter(t){if(t.kind==="Document"){e=k1.EXECUTABLE;return}return WEi.includes(t.kind)?(e=k1.TYPE_SYSTEM,Ll.BREAK):!1}})}catch{return e}return e}});function Jfe(i,e,t){return t===$s.SchemaMetaFieldDef.name&&i.getQueryType()===e?$s.SchemaMetaFieldDef:t===$s.TypeMetaFieldDef.name&&i.getQueryType()===e?$s.TypeMetaFieldDef:t===$s.TypeNameMetaFieldDef.name&&(0,$s.isCompositeType)(e)?$s.TypeNameMetaFieldDef:"getFields"in e?e.getFields()[t]:null}function jEi(i,e){let t=[],n=i;for(;n?.kind;)t.push(n),n=n.prevState;for(let r=t.length-1;r>=0;r--)e(t[r])}function QU(i,e){let t,n,r,o,s,a,l,c,u,d,h,f;return jEi(e,p=>{var g,v;switch(p.kind){case ba.QUERY:case"ShortQuery":h=i.getQueryType();break;case ba.MUTATION:h=i.getMutationType();break;case ba.SUBSCRIPTION:h=i.getSubscriptionType();break;case ba.INLINE_FRAGMENT:case ba.FRAGMENT_DEFINITION:p.type&&(h=i.getType(p.type));break;case ba.FIELD:case ba.ALIASED_FIELD:{!h||!p.name?s=null:(s=d?Jfe(i,d,p.name):null,h=s?s.type:null);break}case ba.SELECTION_SET:d=(0,$s.getNamedType)(h);break;case ba.DIRECTIVE:r=p.name?i.getDirective(p.name):null;break;case ba.INTERFACE_DEF:p.name&&(c=null,f=new $s.GraphQLInterfaceType({name:p.name,interfaces:[],fields:{}}));break;case ba.OBJECT_TYPE_DEF:p.name&&(f=null,c=new $s.GraphQLObjectType({name:p.name,interfaces:[],fields:{}}));break;case ba.ARGUMENTS:{if(p.prevState)switch(p.prevState.kind){case ba.FIELD:n=s&&s.args;break;case ba.DIRECTIVE:n=r&&r.args;break;case ba.ALIASED_FIELD:{let E=(g=p.prevState)===null||g===void 0?void 0:g.name;if(!E){n=null;break}let I=d?Jfe(i,d,E):null;if(!I){n=null;break}n=I.args;break}default:n=null;break}else n=null;break}case ba.ARGUMENT:if(n){for(let E=0;EE.value===p.name):null;break;case ba.LIST_VALUE:let w=(0,$s.getNullableType)(a);a=w instanceof $s.GraphQLList?w.ofType:null;break;case ba.OBJECT_VALUE:let C=(0,$s.getNamedType)(a);l=C instanceof $s.GraphQLInputObjectType?C:null,u=(v=l?.getFields())!==null&&v!==void 0?v:null;break;case ba.OBJECT_FIELD:let _=p.name&&u?u[p.name]:null;a=_?.type,s=_,h=s?s.type:null;break;case ba.NAMED_TYPE:p.name&&(h=i.getType(p.name));break}}),{argDef:t,argDefs:n,directiveDef:r,enumValue:o,fieldDef:s,inputObjectType:l,inputType:a,objectFieldDefs:u,parentType:d,type:h,interfaceDef:f,objectTypeDef:c}}var $s,nTt=D(()=>{$s=$(na());xD()});var rTt,QEi,ba,oTt=D(()=>{rTt=$(na()),QEi={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},ba=Object.assign(Object.assign({},rTt.Kind),QEi)});var xD=D(()=>{JDt();F9e();R9e();eTt();iTt();nTt();oTt()});var mr,H9e=D(()=>{N9e();xD();(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(mr||(mr={}))});var OFr,PFr,aTt=D(()=>{H9e();xD();m9e();N9e();OFr=[{label:"type",kind:mr.Function},{label:"interface",kind:mr.Function},{label:"union",kind:mr.Function},{label:"input",kind:mr.Function},{label:"scalar",kind:mr.Function},{label:"schema",kind:mr.Function}],PFr=[{label:"query",kind:mr.Function},{label:"mutation",kind:mr.Function},{label:"subscription",kind:mr.Function},{label:"fragment",kind:mr.Function},{label:"{",kind:mr.Constructor}]});var cTt=Ue((zFr,Xfe)=>{"use strict";function lTt(i,e){if(i!=null)return i;var t=new Error(e!==void 0?e:"Got unexpected "+i);throw t.framesToPop=1,t}Xfe.exports=lTt;Xfe.exports.default=lTt;Object.defineProperty(Xfe.exports,"__esModule",{value:!0})});var Zfe,W9e,$fe,uTt=D(()=>{Zfe=$(na()),W9e=$(cTt()),$fe=(i,e)=>{if(!e)return[];let t=new Map,n=new Set;(0,Zfe.visit)(i,{FragmentDefinition(s){t.set(s.name.value,!0)},FragmentSpread(s){n.has(s.name.value)||n.add(s.name.value)}});let r=new Set;for(let s of n)!t.has(s)&&e.has(s)&&r.add((0,W9e.default)(e.get(s)));let o=[];for(let s of r)(0,Zfe.visit)(s,{FragmentSpread(a){!n.has(a.name.value)&&e.get(a.name.value)&&(r.add((0,W9e.default)(e.get(a.name.value))),n.add(a.name.value))}}),t.has(s.name.value)||o.push(s);return o}});var dTt=D(()=>{});var hTt=D(()=>{});var e2,fTt=D(()=>{e2=class{constructor(e,t){this.lessThanOrEqualTo=n=>this.line{});function epe(i,e){let t=Object.create(null);for(let n of e.definitions)if(n.kind==="OperationDefinition"){let{variableDefinitions:r}=n;if(r)for(let{variable:o,type:s}of r){let a=(0,z3.typeFromAST)(i,s);a?t[o.name.value]=a:s.kind===z3.Kind.NAMED_TYPE&&s.name.value==="Float"&&(t[o.name.value]=z3.GraphQLFloat)}}return t}var z3,U9e=D(()=>{z3=$(na())});function j9e(i,e){let t=e?epe(e,i):void 0,n=[];return(0,tpe.visit)(i,{OperationDefinition(r){n.push(r)}}),{variableToType:t,operations:n}}function GU(i,e){if(e)try{let t=(0,tpe.parse)(e);return Object.assign(Object.assign({},j9e(t,i)),{documentAST:t})}catch{}}var tpe,mTt=D(()=>{tpe=$(na());U9e()});var qU=D(()=>{uTt();dTt();hTt();fTt();pTt();U9e();mTt()});var vTt=D(()=>{qU()});var YU,ZEi,ATt=D(()=>{xD();qU();YU={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},ZEi={[YU.Error]:1,[YU.Warning]:2,[YU.Information]:3,[YU.Hint]:4}});var yTt=D(()=>{qU()});var wTt=D(()=>{xD()});var xTt=D(()=>{m9e();aTt();vTt();ATt();yTt();wTt()});var KU=D(()=>{xTt();xD();H9e();qU()});function CTt(i){return new e2(i.lineNumber-1,i.column-1)}var JU,ipe,_Tt,npe=D(()=>{JU=$(na());KU();ZT();ipe=i=>"getModeId"in i?i.getModeId():i.getLanguageId();_Tt=i=>{let{schema:e,documentAST:t,introspectionJSON:n,introspectionJSONString:r,documentString:o,...s}=i;if(e)return{...s,documentString:(0,JU.printSchema)(e)};if(r)return{...s,introspectionJSONString:r};if(o)return{...s,documentString:o};if(n)return{...s,introspectionJSONString:JSON.stringify(n)};if(t){let a=(0,JU.buildASTSchema)(t,s.buildSchemaOptions);return{...s,documentString:(0,JU.printSchema)(a)}}throw new Error("No schema supplied")}});var tDi,rpe,STt=D(()=>{XN();npe();tDi=120*1e3,rpe=class{_defaults;_idleCheckInterval;_lastUsedTime=0;_configChangeListener;_worker=null;_client=null;constructor(e){this._defaults=e,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._configChangeListener=this._defaults.onDidChange(()=>{this._stopWorker()})}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>tDi&&this._stopWorker()}async _getClient(){if(this._lastUsedTime=Date.now(),!this._client&&!this._worker)try{let{languageId:e,formattingOptions:t,schemas:n,externalFragmentDefinitions:r,completionSettings:o}=this._defaults;this._worker=Rg.createWebWorker({moduleId:"monaco-graphql/esm/GraphQLWorker.js",label:e,createData:{languageId:e,formattingOptions:t,languageConfig:{schemas:n?.map(_Tt),externalFragmentDefinitions:r,fillLeafsOnComplete:o.__experimental__fillLeafsOnComplete}}}),this._client=this._worker.getProxy()}catch(e){console.error("error loading worker",e)}return this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return await this._worker.withSyncedResources(e),t}}});function iDi(i){return i in ETt?ETt[i]:va.Text}function nDi(i){return{range:i.range,kind:iDi(i.kind),label:i.label,insertText:i.insertText??i.label,insertTextRules:i.insertText?Fg.CompletionItemInsertTextRule.InsertAsSnippet:void 0,sortText:i.sortText,filterText:i.filterText,documentation:i.documentation,detail:i.detail,command:i.command}}var ope,va,ETt,spe,ape,lpe,DTt=D(()=>{XN();uN();KU();npe();ope=class{defaults;_worker;_disposables=[];_listener=Object.create(null);constructor(e,t){this.defaults=e,this._worker=t,this._worker=t;let n,r=s=>{let a=ipe(s);if(a!==this.defaults.languageId)return;let l=s.uri.toString(),c=e.diagnosticSettings.validateVariablesJSON?.[l];n=setTimeout(()=>{this._doValidate(s.uri,a,c)},400),this._listener[l]=s.onDidChangeContent(()=>{clearTimeout(n),n=setTimeout(()=>{this._doValidate(s.uri,a,c)},400)})},o=s=>{Rg.setModelMarkers(s,this.defaults.languageId,[]);let a=s.uri.toString(),l=this._listener[a];l&&(l.dispose(),delete this._listener[a])};this._disposables.push(Rg.onDidCreateModel(r),{dispose(){clearTimeout(n)}},Rg.onWillDisposeModel(s=>{o(s)}),Rg.onDidChangeModelLanguage(s=>{o(s.model),r(s.model)}),{dispose:()=>{for(let s of Object.values(this._listener))s.dispose()}},e.onDidChange(()=>{for(let s of Rg.getModels())ipe(s)===this.defaults.languageId&&(o(s),r(s))}));for(let s of Rg.getModels())ipe(s)===this.defaults.languageId&&r(s)}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[]}async _doValidate(e,t,n){let r=await this._worker(e);if(!r)return;let o=await r.doValidation(e.toString());if(Rg.setModelMarkers(Rg.getModel(e),t,o),n){if(await Promise.resolve().then(()=>(uOe(),Hyt)),!n.length)throw new Error("No variables URI strings provided to validate");let s=await r.doGetVariablesJSONSchema(e.toString());if(!s)return;let a=Sle.file(n[0].replace(".json","-schema.json")).toString(),l={uri:a,schema:s,fileMatch:n},c=Fg.json.jsonDefaults.diagnosticsOptions.schemas?.filter(u=>u.uri!==a)||[];Fg.json.jsonDefaults.setDiagnosticsOptions({schemaValidation:"error",validate:!0,...this.defaults.diagnosticSettings.jsonDiagnosticSettings,schemas:[...c,l],enableSchemaRequest:!1})}}},va=Fg.CompletionItemKind,ETt={[mr.Text]:va.Text,[mr.Method]:va.Method,[mr.Function]:va.Function,[mr.Constructor]:va.Constructor,[mr.Field]:va.Field,[mr.Variable]:va.Variable,[mr.Class]:va.Class,[mr.Interface]:va.Interface,[mr.Module]:va.Module,[mr.Property]:va.Property,[mr.Unit]:va.Unit,[mr.Value]:va.Value,[mr.Enum]:va.Enum,[mr.Keyword]:va.Keyword,[mr.Snippet]:va.Snippet,[mr.Color]:va.Color,[mr.File]:va.File,[mr.Reference]:va.Reference,[mr.Folder]:va.Folder,[mr.EnumMember]:va.EnumMember,[mr.Constant]:va.Constant,[mr.Struct]:va.Struct,[mr.Event]:va.Event,[mr.Operator]:va.Operator,[mr.TypeParameter]:va.TypeParameter};spe=class{_worker;constructor(e){this._worker=e,this._worker=e}get triggerCharacters(){return[":","$"," ","(","@"]}async provideCompletionItems(e,t,n,r){try{return{incomplete:!0,suggestions:(await(await this._worker(e.uri)).doComplete(e.uri.toString(),t)).map(nDi)}}catch(o){return console.error("Error fetching completion items",o),{suggestions:[]}}}},ape=class{_worker;constructor(e){this._worker=e,this._worker=e}async provideDocumentFormattingEdits(e,t,n){let o=await(await this._worker(e.uri)).doFormat(e.uri.toString());return o?[{range:e.getFullModelRange(),text:o}]:[]}},lpe=class{_worker;constructor(e){this._worker=e}async provideHover(e,t,n){let r=e.uri,s=await(await this._worker(e.uri)).doHover(r.toString(),t);return s?{range:s.range,contents:[{value:s.content}]}:{contents:[]}}dispose(){}}});var ITt={};Ih(ITt,{setupMode:()=>oDi});function oDi(i){let e=[],t=[],n=new rpe(i);e.push(n);let r=(...h)=>{try{return n.getLanguageServiceWorker(...h)}catch{throw new Error("Error fetching graphql language service worker")}};function o(){let{modeConfiguration:h,languageId:f}=i;h.documentFormattingEdits&&t.push(Fg.registerDocumentFormattingEditProvider(f,new ape(r)))}function s(h){let{modeConfiguration:f,languageId:p}=i;kTt(t),f.completionItems&&t.push(Fg.registerCompletionItemProvider(p,new spe(r))),f.diagnostics&&t.push(new ope(h,r)),f.hovers&&t.push(Fg.registerHoverProvider(p,new lpe(r))),o()}let{modeConfiguration:a,formattingOptions:l,diagnosticSettings:c,externalFragmentDefinitions:u,schemas:d}=i;return s(i),i.onDidChange(h=>{h.modeConfiguration!==a&&(a=h.modeConfiguration,s(h)),h.formattingOptions!==l&&(l=h.formattingOptions,o()),h.externalFragmentDefinitions!==u&&(u=h.externalFragmentDefinitions,s(h)),h.diagnosticSettings!==c&&(c=h.diagnosticSettings,s(h)),h.schemas!==d&&(d=h.schemas,s(h))}),e.push(TTt(t)),TTt(e)}function TTt(i){return{dispose:()=>kTt(i)}}function kTt(i){for(;i.length;)i.pop().dispose()}var LTt=D(()=>{XN();STt();DTt()});function NTt(i){return XU||(XU=qEt(G9e,i),Fg.graphql={api:XU},sDi().then(e=>e.setupMode(XU))),XU}function sDi(){return Promise.resolve().then(()=>(LTt(),ITt))}var G9e,XU,MTt=D(()=>{YEt();XN();G9e="graphql"});var RTt={};Ih(RTt,{LANGUAGE_ID:()=>G9e,initializeMode:()=>NTt});var FTt=D(()=>{MTt()});var zTt=Ue((aPr,BTt)=>{"use strict";BTt.exports=function(e){return typeof e=="object"?e===null:typeof e!="function"}});var K9e=Ue((lPr,VTt)=>{"use strict";VTt.exports=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}});var UTt=Ue((cPr,WTt)=>{"use strict";var lDi=K9e();function HTt(i){return lDi(i)===!0&&Object.prototype.toString.call(i)==="[object Object]"}WTt.exports=function(e){var t,n;return!(HTt(e)===!1||(t=e.constructor,typeof t!="function")||(n=t.prototype,HTt(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)}});var YTt=Ue((uPr,qTt)=>{"use strict";var{deleteProperty:cDi}=Reflect,uDi=zTt(),jTt=UTt(),QTt=i=>typeof i=="object"&&i!==null||typeof i=="function",dDi=i=>i==="__proto__"||i==="constructor"||i==="prototype",J9e=i=>{if(!uDi(i))throw new TypeError("Object keys must be strings or symbols");if(dDi(i))throw new Error(`Cannot set unsafe key: "${i}"`)},hDi=i=>Array.isArray(i)?i.flat().map(String).join(","):i,fDi=(i,e)=>{if(typeof i!="string"||!e)return i;let t=i+";";return e.arrays!==void 0&&(t+=`arrays=${e.arrays};`),e.separator!==void 0&&(t+=`separator=${e.separator};`),e.split!==void 0&&(t+=`split=${e.split};`),e.merge!==void 0&&(t+=`merge=${e.merge};`),e.preservePaths!==void 0&&(t+=`preservePaths=${e.preservePaths};`),t},pDi=(i,e,t)=>{let n=hDi(e?fDi(i,e):i);J9e(n);let r=t2.cache.get(n)||t();return t2.cache.set(n,r),r},mDi=(i,e={})=>{let t=e.separator||".",n=t==="/"?!1:e.preservePaths;if(typeof i=="string"&&n!==!1&&/\//.test(i))return[i];let r=[],o="",s=a=>{let l;a.trim()!==""&&Number.isInteger(l=Number(a))?r.push(l):r.push(a)};for(let a=0;ae&&typeof e.split=="function"?e.split(i):typeof i=="symbol"?[i]:Array.isArray(i)?i:pDi(i,e,()=>mDi(i,e)),gDi=(i,e,t,n)=>{if(J9e(e),t===void 0)cDi(i,e);else if(n&&n.merge){let r=n.merge==="function"?n.merge:Object.assign;r&&jTt(i[e])&&jTt(t)?i[e]=r(i[e],t):i[e]=t}else i[e]=t;return i},t2=(i,e,t,n)=>{if(!e||!QTt(i))return i;let r=GTt(e,n),o=i;for(let s=0;s{t2.cache=new Map};qTt.exports=t2});var $Tt=Ue((dPr,ZTt)=>{var XTt=K9e();ZTt.exports=function(i,e,t){if(XTt(t)||(t={default:t}),!JTt(i))return typeof t.default<"u"?t.default:i;typeof e=="number"&&(e=String(e));let n=Array.isArray(e),r=typeof e=="string",o=t.separator||".",s=t.joinChar||(typeof o=="string"?o:".");if(!r&&!n)return i;if(r&&e in i)return X9e(e,i,t)?i[e]:t.default;let a=n?e:bDi(e,o,t),l=a.length,c=0;do{let u=a[c];for(typeof u=="number"&&(u=String(u));u&&u.slice(-1)==="\\";)u=KTt([u.slice(0,-1),a[++c]||""],s,t);if(u in i){if(!X9e(u,i,t))return t.default;i=i[u]}else{let d=!1,h=c+1;for(;h{"use strict";var Tki=Te();function TIt(i){var e="https://react.dev/errors/"+i;if(1{"use strict";function IIt(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(IIt)}catch(i){console.error(i)}}IIt(),LIt.exports=kIt()});var U2t=Ue(ol=>{"use strict";function DVe(i,e){var t=i.length;i.push(e);e:for(;0>>1,r=i[n];if(0>>1;nAme(a,t))lAme(c,a)?(i[n]=c,i[l]=t,n=l):(i[n]=a,i[s]=t,n=s);else if(lAme(c,t))i[n]=c,i[l]=t,n=l;else break e}}return e}function Ame(i,e){var t=i.sortIndex-e.sortIndex;return t!==0?t:i.id-e.id}ol.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(R2t=performance,ol.unstable_now=function(){return R2t.now()}):(_Ve=Date,F2t=_Ve.now(),ol.unstable_now=function(){return _Ve.now()-F2t});var R2t,_Ve,F2t,IC=[],OD=[],FNi=1,b0=null,Af=3,TVe=!1,Lj=!1,Nj=!1,kVe=!1,B2t=typeof setTimeout=="function"?setTimeout:null,z2t=typeof clearTimeout=="function"?clearTimeout:null,O2t=typeof setImmediate<"u"?setImmediate:null;function yme(i){for(var e=B1(OD);e!==null;){if(e.callback===null)wme(OD);else if(e.startTime<=i)wme(OD),e.sortIndex=e.expirationTime,DVe(IC,e);else break;e=B1(OD)}}function IVe(i){if(Nj=!1,yme(i),!Lj)if(B1(IC)!==null)Lj=!0,g4||(g4=!0,m4());else{var e=B1(OD);e!==null&&LVe(IVe,e.startTime-i)}}var g4=!1,Mj=-1,V2t=5,H2t=-1;function W2t(){return kVe?!0:!(ol.unstable_now()-H2ti&&W2t());){var n=b0.callback;if(typeof n=="function"){b0.callback=null,Af=b0.priorityLevel;var r=n(b0.expirationTime<=i);if(i=ol.unstable_now(),typeof r=="function"){b0.callback=r,yme(i),e=!0;break t}b0===B1(IC)&&wme(IC),yme(i)}else wme(IC);b0=B1(IC)}if(b0!==null)e=!0;else{var o=B1(OD);o!==null&&LVe(IVe,o.startTime-i),e=!1}}break e}finally{b0=null,Af=t,TVe=!1}e=void 0}}finally{e?m4():g4=!1}}}var m4;typeof O2t=="function"?m4=function(){O2t(SVe)}:typeof MessageChannel<"u"?(EVe=new MessageChannel,P2t=EVe.port2,EVe.port1.onmessage=SVe,m4=function(){P2t.postMessage(null)}):m4=function(){B2t(SVe,0)};var EVe,P2t;function LVe(i,e){Mj=B2t(function(){i(ol.unstable_now())},e)}ol.unstable_IdlePriority=5;ol.unstable_ImmediatePriority=1;ol.unstable_LowPriority=4;ol.unstable_NormalPriority=3;ol.unstable_Profiling=null;ol.unstable_UserBlockingPriority=2;ol.unstable_cancelCallback=function(i){i.callback=null};ol.unstable_forceFrameRate=function(i){0>i||125n?(i.sortIndex=t,DVe(OD,i),B1(IC)===null&&i===B1(OD)&&(Nj?(z2t(Mj),Mj=-1):Nj=!0,LVe(IVe,t-n))):(i.sortIndex=r,DVe(IC,i),Lj||TVe||(Lj=!0,g4||(g4=!0,m4()))),i};ol.unstable_shouldYield=W2t;ol.unstable_wrapCallback=function(i){var e=Af;return function(){var t=Af;Af=e;try{return i.apply(this,arguments)}finally{Af=t}}}});var Q2t=Ue((U7r,j2t)=>{"use strict";j2t.exports=U2t()});var nPt=Ue(Gge=>{"use strict";var Yu=Q2t(),bRt=Te(),ONi=Kv();function mt(i){var e="https://react.dev/errors/"+i;if(1C4||(i.current=gHe[C4],gHe[C4]=null,C4--)}function wa(i,e){C4++,gHe[C4]=i.current,i.current=e}var W1=U1(null),oQ=U1(null),YD=U1(null),tge=U1(null);function ige(i,e){switch(wa(YD,e),wa(oQ,i),wa(W1,null),e.nodeType){case 9:case 11:i=(i=e.documentElement)&&(i=i.namespaceURI)?eRt(i):0;break;default:if(i=e.tagName,e=e.namespaceURI)e=eRt(e),i=UOt(e,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Fd(W1),wa(W1,i)}function H4(){Fd(W1),Fd(oQ),Fd(YD)}function bHe(i){i.memoizedState!==null&&wa(tge,i);var e=W1.current,t=UOt(e,i.type);e!==t&&(wa(oQ,i),wa(W1,t))}function nge(i){oQ.current===i&&(Fd(W1),Fd(oQ)),tge.current===i&&(Fd(tge),gQ._currentValue=T2)}var NVe,Y2t;function _2(i){if(NVe===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);NVe=e&&e[1]||"",Y2t=-1{let A=await g.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},Nt.None);if(!A.identical)return new npe(Qt.fromRangeInclusive(u),h(d),A.changes)})}),this._fetchStore=this._register(new se),this._inlineEditsFetchResult=Ky(this,void 0),this._inlineEdits=ec({owner:this,equalsFn:cP},l=>this._inlineEditsFetchResult.read(l)?.completions.map(c=>new O5e(c))??[]),this._fetchInlineEditsPromise=AH({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:Wf.Automatic}),handleChange:(l,c)=>(l.didChange(this._forceUpdateExplicitlySignal)&&(c.inlineCompletionTriggerKind=Wf.Explicit),!0)},async(l,c)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(l),this._textModelVersionId.read(l);function u(g,A){return A(g)}let d=this._pinnedRange.range.read(l)??u(this._selection.read(l),g=>g.isEmpty()?void 0:g);if(!d){this._inlineEditsFetchResult.set(void 0,void 0),this.userPrompt.set(void 0,void 0);return}let h={triggerKind:c.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(l)},f=E6(this._fetchStore);await oh(200,f);let p=await xhe(this.languageFeaturesService.inlineCompletionsProvider,d,this.textModel,h,f);f.isCancellationRequested||this._inlineEditsFetchResult.set(p,void 0)}),this._filteredInlineEditItems=ec({owner:this,equalsFn:ML()},l=>this._inlineEdits.read(l)),this.selectedInlineCompletionIndex=at(this,l=>{let c=this._selectedInlineCompletionId.read(l),u=this._filteredInlineEditItems.read(l),d=this._selectedInlineCompletionId===void 0?-1:u.findIndex(h=>h.semanticId===c);return d===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):d}),this.selectedInlineEdit=at(this,l=>{let c=this._filteredInlineEditItems.read(l),u=this.selectedInlineCompletionIndex.read(l);return c[u]}),this._register(s0(this._fetchInlineEditsPromise))}async triggerExplicitly(e){Og(e,t=>{this._isActive.set(!0,t),this._forceUpdateExplicitlySignal.trigger(t)}),await this._fetchInlineEditsPromise.get()}stop(e){Og(e,t=>{this.userPrompt.set(void 0,t),this._isActive.set(!1,t),this._inlineEditsFetchResult.set(void 0,t),this._pinnedRange.setRange(void 0,t)})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();let t=this._filteredInlineEditItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new fi;let t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}};rpe=Zj=Dbi([F5e(4,Me),F5e(5,CC),F5e(6,an)],rpe);O5e=class{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}},P5e=class extends H{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=Ut(this,[]),this.range=at(this,n=>{this._versionId.read(n);let o=this._decorations.read(n)[0];return o?this._textModel.getDecorationRange(o)??null:null}),this._register(He(()=>{this._textModel.deltaDecorations(this._decorations.get(),[])}))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}});function kbi(i){return Jy(void 0,e=>i(e).read(e),(e,t)=>{i(void 0).set(e,t)})}var Tbi,$j,B5e,lv,z5e=D(()=>{de();In();hf();_C();UB();Qn();hm();Hi();L5e();cCt();R5e();ao();Bt();ht();ZFe();Tbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},$j=function(i,e){return function(t,n){e(t,n,i)}},lv=class extends H{static{B5e=this}static{this.ID="editor.contrib.inlineEditsController"}static get(e){return e.getContribution(B5e.ID)}constructor(e,t,n,o,r,s){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=n,this._debounceService=o,this._languageFeaturesService=r,this._configurationService=s,this._enabled=Ebt("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=Fl(this.editor),this._selection=at(this,a=>this._editorObs.cursorSelection.read(a)??new qe(1,1,1,1)),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=ya(this,a=>{if(!this._enabled.read(a)||this._editorObs.isReadonly.read(a))return;let l=this._editorObs.model.read(a);return l?this._instantiationService.createInstance(gu(rpe,a),l,this._editorObs.versionId,this._selection,this._debounceValue):void 0}),this._hadInlineEdit=$y(this,(a,l)=>l||this.model.read(a)?.inlineEdit.read(a)!==void 0),this._widget=ya(this,a=>{if(this._hadInlineEdit.read(a))return this._instantiationService.createInstance(gu(ope,a),this.editor,this.model.map((l,c)=>l?.inlineEdit.read(c)),kbi(l=>this.model.read(l)?.userPrompt??Ut("empty","")))}),this._register(qg(PD,this._contextKeyService,a=>!!this.model.read(a)?.inlineEdit.read(a))),this._register(qg(aCt,this._contextKeyService,a=>!!this.model.read(a)?.isPinned.read(a))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}};lv=B5e=Tbi([$j(1,Re),$j(2,Ze),$j(3,Aa),$j(4,Me),$j(5,Et)],lv)});function eQ(i){return{label:i.value,alias:i.original}}var spe,ape,lpe,cpe,upe,uCt=D(()=>{oo();In();r0();Jt();IC();An();L5e();z5e();Be();go();Bt();spe=class i extends Pe{static{this.ID=sCt}constructor(){super({id:i.ID,...eQ(Ft("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:ge.and(V.writable,PD),kbOpts:{weight:100,primary:606}})}async run(e,t){lv.get(t)?.model.get()?.next()}},ape=class i extends Pe{static{this.ID=rCt}constructor(){super({id:i.ID,...eQ(Ft("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:ge.and(V.writable,PD),kbOpts:{weight:100,primary:604}})}async run(e,t){lv.get(t)?.model.get()?.previous()}},lpe=class extends Pe{constructor(){super({id:"editor.action.inlineEdits.trigger",...eQ(Ft("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:V.writable})}async run(e,t){let n=lv.get(t);await bne(async o=>{await n?.model.get()?.triggerExplicitly(o)})}},cpe=class extends Pe{constructor(){super({id:oCt,...eQ(Ft("action.inlineEdits.accept","Accept Inline Edit")),precondition:PD,menuOpts:{menuId:tt.InlineEditsActions,title:y("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:De.check},kbOpts:{primary:2058,weight:2e4,kbExpr:PD}})}async run(e,t){t instanceof xu&&(t=t.getParentEditor());let n=lv.get(t);n&&(n.model.get()?.accept(n.editor),n.editor.focus())}},upe=class i extends Pe{static{this.ID="editor.action.inlineEdits.hide"}constructor(){super({id:i.ID,...eQ(Ft("action.inlineEdits.hide","Hide Inline Edit")),precondition:PD,kbOpts:{weight:100,primary:9}})}async run(e,t){let n=lv.get(t);fn(o=>{n?.model.get()?.stop(o)})}}});var dCt=D(()=>{Jt();uCt();z5e();St(lv.ID,lv,3);Ce(lpe);Ce(spe);Ce(ape);Ce(cpe);Ce(upe)});async function V5e(i,e,t,n,o){let r=i.ordered(e);for(let s of r)try{let a=await s.provideSignatureHelp(e,t,o,n);if(a)return a}catch(a){ln(a)}}var VC,dpe=D(()=>{sn();Tt();gn();mn();kt();ro();Hi();dm();to();Bt();VC={Visible:new ze("parameterHintsVisible",!1),MultipleSignatures:new ze("parameterHintsMultipleSignatures",!1)};ii.registerCommand("_executeSignatureHelpProvider",async(i,...e)=>{let[t,n,o]=e;gi(Je.isUri(t)),gi(J.isIPosition(n)),gi(typeof o=="string"||!o);let r=i.get(Me),s=await i.get(Ss).createModelReference(t);try{let a=await V5e(r.signatureHelpProvider,s.object.textEditorModel,J.lift(n),{triggerKind:Zm.Invoke,isRetrigger:!1,triggerCharacter:o},Nt.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}})});function Ibi(i,e){switch(e.triggerKind){case Zm.Invoke:return e;case Zm.ContentChange:return i;case Zm.TriggerCharacter:default:return e}}var BD,hpe,hCt=D(()=>{Gt();Tt();et();de();cL();ro();dpe();(function(i){i.Default={type:0};class e{constructor(o,r){this.request=o,this.previouslyActiveHints=r,this.type=2}}i.Pending=e;class t{constructor(o){this.hints=o,this.type=1}}i.Active=t})(BD||(BD={}));hpe=class i extends H{static{this.DEFAULT_DELAY=120}constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new q),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=BD.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Vn),this.triggerChars=new Mx,this.retriggerChars=new Mx,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new da(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(o=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(o=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(o=>this.onCursorChange(o))),this._register(this.editor.onDidChangeModelContent(o=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(o=>this.onDidType(o))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=BD.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let n=this.editor.getModel();if(!n||!this.providers.has(n))return;let o=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(o),t).catch(ft)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,o=this.editor.getOption(86).cycle;if((e<2||n)&&!o){this.cancel();return}this.updateActiveSignature(n&&o?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,o=this.editor.getOption(86).cycle;if((e<2||n)&&!o){this.cancel();return}this.updateActiveSignature(n&&o?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new BD.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){let t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let o=this._pendingTriggers.reduce(Ibi);this._pendingTriggers=[];let r={triggerKind:o.triggerKind,triggerCharacter:o.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new BD.Pending(mo(l=>V5e(this.providers,s,a,r,l)),n);try{let l=await this.state.request;return e!==this.triggerId?(l?.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new BD.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=BD.Default),ft(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let n of t.signatureHelpTriggerCharacters||[])if(n.length){let o=n.charCodeAt(0);this.triggerChars.add(o),this.retriggerChars.add(o)}for(let n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:Zm.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Zm.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Zm.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}});var fCt=D(()=>{});var Lbi,fpe,H5e,Lm,Nbi,Mbi,ppe,pCt=D(()=>{Ye();Zl();Mg();oo();et();de();Rt();gn();fCt();ea();Il();Ux();dpe();Be();Bt();Dd();nr();Ap();ko();cd();lh();Lbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},fpe=function(i,e){return function(t,n){e(t,n,i)}},Lm=xe,Nbi=Ln("parameter-hints-next",De.chevronDown,y("parameterHintsNextIcon","Icon for show next parameter hint.")),Mbi=Ln("parameter-hints-previous",De.chevronUp,y("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),ppe=class extends H{static{H5e=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,n,o,r,s){super(),this.editor=e,this.model=t,this.telemetryService=s,this.renderDisposeables=this._register(new se),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new df({editor:e},r,o)),this.keyVisible=VC.Visible.bindTo(n),this.keyMultipleSignatures=VC.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=Lm(".editor-widget.parameter-hints-widget"),t=Ae(e,Lm(".phwrapper"));t.tabIndex=-1;let n=Ae(t,Lm(".controls")),o=Ae(n,Lm(".button"+ut.asCSSSelector(Mbi))),r=Ae(n,Lm(".overloads")),s=Ae(n,Lm(".button"+ut.asCSSSelector(Nbi)));this._register(ce(o,"click",h=>{mi.stop(h),this.previous()})),this._register(ce(s,"click",h=>{mi.stop(h),this.next()}));let a=Lm(".body"),l=new i0(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=Ae(a,Lm(".signature")),u=Ae(a,Lm(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:r,docs:u,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));let d=()=>{if(!this.domNodes)return;let h=this.editor.getOption(50),f=this.domNodes.element;f.style.fontSize=`${h.fontSize}px`,f.style.lineHeight=`${h.lineHeight/h.fontSize}`,f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",h.fontFamily),f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",kl.fontFamily)};d(),this._register(Ee.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(f=>f.hasChanged(50)))(d)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;let t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let n=e.signatures[e.activeSignature];if(!n)return;let o=Ae(this.domNodes.signature,Lm(".code")),r=n.parameters.length>0,s=n.activeParameter??e.activeParameter;if(r)this.renderParameters(o,n,s);else{let c=Ae(o,Lm("span"));c.textContent=n.label}let a=n.parameters[s];if(a?.documentation){let c=Lm("span.documentation");if(typeof a.documentation=="string")c.textContent=a.documentation;else{let u=this.renderMarkdownDocs(a.documentation);c.appendChild(u.element)}Ae(this.domNodes.docs,Lm("p",{},c))}if(n.documentation!==void 0)if(typeof n.documentation=="string")Ae(this.domNodes.docs,Lm("p",{},n.documentation));else{let c=this.renderMarkdownDocs(n.documentation);Ae(this.domNodes.docs,c.element)}let l=this.hasDocs(n,a);if(this.domNodes.signature.classList.toggle("has-docs",l),this.domNodes.docs.classList.toggle("empty",!l),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,a){let c="",u=n.parameters[s];Array.isArray(u.label)?c=n.label.substring(u.label[0],u.label[1]):c=u.label,u.documentation&&(c+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),n.documentation&&(c+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==c&&(ms(y("hint","{0}, hint",c)),this.announcedLabel=c)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=new xo,n=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));n.element.classList.add("markdown-docs");let o=t.elapsed();return o>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:o}),n}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Sb(t.documentation).length>0||t&&typeof t.documentation=="object"&&Sb(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Sb(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Sb(e.documentation.value).length>0)}renderParameters(e,t,n){let[o,r]=this.getParameterLabelOffsets(t,n),s=document.createElement("span");s.textContent=t.label.substring(0,o);let a=document.createElement("span");a.textContent=t.label.substring(o,r),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(r),Ae(e,s,a,l)}getParameterLabelOffsets(e,t){let n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){let o=new RegExp(`(\\W|^)${$a(n.label)}(?=\\W|$)`,"g");o.test(e.label);let r=o.lastIndex-n.label.length;return r>=0?[r,o.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return H5e.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};ppe=H5e=Lbi([fpe(2,Ze),fpe(3,Qr),fpe(4,on),fpe(5,rr)],ppe);j("editorHoverWidget.highlightForeground",qS,y("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var Rbi,mCt,W5e,b4,U5e,j5e,Q5e,gCt=D(()=>{CA();de();Jt();An();ro();Hi();hCt();dpe();Be();Bt();ht();pCt();Rbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},mCt=function(i,e){return function(t,n){e(t,n,i)}},b4=class extends H{static{W5e=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(W5e.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new hpe(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(o=>{o?(this.widget.value.show(),this.widget.value.render(o)):this.widget.rawValue?.hide()})),this.widget=new $s(()=>this._register(t.createInstance(ppe,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};b4=W5e=Rbi([mCt(1,Re),mCt(2,Me)],b4);U5e=class extends Pe{constructor(){super({id:"editor.action.triggerParameterHints",label:y("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:V.hasSignatureHelpProvider,kbOpts:{kbExpr:V.editorTextFocus,primary:3082,weight:100}})}run(e,t){b4.get(t)?.trigger({triggerKind:Zm.Invoke})}};St(b4.ID,b4,2);Ce(U5e);j5e=175,Q5e=Eo.bindToContribution(b4.get);Qe(new Q5e({id:"closeParameterHints",precondition:VC.Visible,handler:i=>i.cancel(),kbOpts:{weight:j5e,kbExpr:V.focus,primary:9,secondary:[1033]}}));Qe(new Q5e({id:"showPrevParameterHint",precondition:ge.and(VC.Visible,VC.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:j5e,kbExpr:V.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));Qe(new Q5e({id:"showNextParameterHint",precondition:ge.and(VC.Visible,VC.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:j5e,kbExpr:V.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var bCt=D(()=>{});function Pbi(i,e){return class extends e{constructor(){super(...arguments),this._autorun=void 0}init(...n){this._autorun=es((o,r)=>{let s=gu(i(),o);r.add(this.instantiationService.createInstance(s,...n))})}dispose(){this._autorun?.dispose()}}}function ACt(i){return WB()?Pbi(i,q5e):i()}var Fbi,Obi,G5e,q5e,vCt=D(()=>{zFe();UB();In();ht();Fbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Obi=function(i,e){return function(t,n){e(t,n,i)}},G5e=class{constructor(e){this.instantiationService=e}init(...e){}};q5e=class extends G5e{constructor(e,t){super(t),this.init(e)}};q5e=Fbi([Obi(1,Re)],q5e)});var yCt=D(()=>{bCt();Jt();Am();Be();xg();N5e();vCt();St(_2.ID,ACt(()=>_2),0);j("editor.placeholder.foreground",nht,y("placeholderForeground","Foreground color of the placeholder text in the editor."))});var wCt=D(()=>{});var Bbi,mpe,zbi,S2,iTo,gpe,Y5e,K5e,tQ,xCt=D(()=>{Ye();xc();Zl();Bg();ic();Vx();Kx();Wt();Gt();sn();oo();et();de();cd();gn();wCt();um();kt();Ue();ro();Be();Bt();Xo();ch();i1();nr();io();Bbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},mpe=function(i,e){return function(t,n){e(t,n,i)}},zbi=!1,S2=new ze("renameInputVisible",!1,y("renameInputVisible","Whether the rename input widget is visible")),iTo=new ze("renameInputFocused",!1,y("renameInputFocused","Whether the rename input widget is focused")),gpe=class{constructor(e,t,n,o,r,s){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=o,this._logService=s,this.allowEditorOverflow=!0,this._disposables=new se,this._visibleContextKey=S2.bindTo(r),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new xo,this._inputWithButton=new K5e,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new Y5e(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;let t=e.getColor(vy),n=e.getColor(iee);this._domNode.style.backgroundColor=String(e.getColor(nu)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=n?`1px solid ${n}`:"",this._domNode.style.color=String(e.getColor(ree)??"");let o=e.getColor(see);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(zz)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(zz)??""),this._inputWithButton.domNode.style.borderWidth=o?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=o?"solid":"none",this._inputWithButton.domNode.style.borderColor=o?.toString()??"none"}_updateFont(){if(this._domNode===void 0)return;gi(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);let e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;let e=Xh(this.getDomNode().ownerDocument.body),t=bn(this._editor.getDomNode()),n=this._getTopForPosition();this._nPxAvailableAbove=n+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;let o=this._editor.getOption(67),{totalHeight:r}=tQ.getLayoutInfo({lineHeight:o}),s=this._nPxAvailableBelow>r*6?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){let[e,t]=this._acceptKeybindings;return this._label.innerText=y({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;gi(this._renameCandidateListView),gi(this._nPxAvailableAbove!==void 0),gi(this._nPxAvailableBelow!==void 0);let t=vg(this._inputWithButton.domNode),n=vg(this._label),o;e===2?o=this._nPxAvailableBelow:o=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:o-n-t,width:Cc(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,n,o,r){let{start:s,end:a}=this._getSelection(e,t);this._renameCts=r;let l=new se;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,o===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=o,this._requestRenameCandidates(t,!1),l.add(ce(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),l.add(ce(this._inputWithButton.button,Te.KEY_DOWN,u=>{let d=new Vi(u);(d.equals(3)||d.equals(10))&&(d.stopPropagation(),d.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",n),this._position=new J(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",s.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),l.add(He(()=>{this._renameCts=void 0,r.dispose(!0)})),l.add(He(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),l.add(He(()=>this._candidates.clear()));let c=new em;return c.p.finally(()=>{l.dispose(),this._hide()}),this._currentCancelInput=u=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),c.complete(u),!0),this._currentAcceptInput=u=>{this._trace("invoking _currentAcceptInput"),gi(this._renameCandidateListView!==void 0);let d=this._renameCandidateListView.nCandidates,h,f,p=this._renameCandidateListView.focusedCandidate;if(p!==void 0?(this._trace("using new name from renameSuggestion"),h=p,f={k:"renameSuggestion"}):(this._trace("using new name from inputField"),h=this._inputWithButton.input.value,f=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),h===t||h.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),c.complete({newName:h,wantsPreview:n&&u,stats:{source:f,nRenameSuggestions:d,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},l.add(r.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),zbi||l.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),c.p}_requestRenameCandidates(e,t){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),gi(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new Mi;let n=t?yk.Invoke:yk.Automatic,o=this._requestRenameCandidatesOnce(n,this._renameCandidateProvidersCts.token);if(o.length===0){this._inputWithButton.setSparkleButton();return}t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(o,e,this._renameCts.token)}}_getSelection(e,t){gi(this._editor.hasModel());let n=this._editor.getSelection(),o=0,r=t.length;return!R.isEmpty(n)&&!R.spansMultipleLines(n)&&R.containsRange(e,n)&&(o=Math.max(0,n.startColumn-e.startColumn),r=Math.min(e.endColumn,n.endColumn)-e.startColumn),{start:o,end:r}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,n){let o=(...c)=>this._trace("_updateRenameCandidates",...c);o("start");let r=await hy(Promise.allSettled(e),n);if(this._inputWithButton.setSparkleButton(),r===void 0){o("returning early - received updateRenameCandidates results - undefined");return}let s=r.flatMap(c=>c.status==="fulfilled"&&Hf(c.value)?c.value:[]);o(`received updateRenameCandidates results - total (unfiltered) ${s.length} candidates.`);let a=tf(s,c=>c.newSymbolName);o(`distinct candidates - ${a.length} candidates.`);let l=a.filter(({newSymbolName:c})=>c.trim().length>0&&c!==this._inputWithButton.input.value&&c!==t&&!this._candidates.has(c));if(o(`valid distinct candidates - ${s.length} candidates.`),l.forEach(c=>this._candidates.add(c.newSymbolName)),l.length<1){o("returning early - no valid distinct candidates");return}o("setting candidates"),this._renameCandidateListView.setCandidates(l),o("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){let e=this._editor.getVisibleRanges(),t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};gpe=Bbi([mpe(2,Wn),mpe(3,Xt),mpe(4,Ze),mpe(5,sr)],gpe);Y5e=class i{constructor(e,t){this._disposables=new se,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=i._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus(n=>{n.elements.length===1&&t.onFocusChange(n.elements[0].newSymbolName)},this._disposables),this._listWidget.onDidChangeSelection(n=>{n.elements.length===1&&t.onSelectionChange()},this._disposables),this._disposables.add(this._listWidget.onDidBlur(n=>{this._listWidget.setFocus([])})),this._listWidget.style(HA({listInactiveFocusForeground:xx,listInactiveFocusBackground:Cx}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);let t=this._pickListHeight(this._listWidget.length),n=this._pickListWidth(e);this._listWidget.layout(t,n),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${n}px`,kd(y("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;let e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;let t=this._listWidget.getFocusedElements()[0];if(t!==void 0)return t.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;let e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();let t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;let e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();let t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();let t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){let{totalHeight:e}=tQ.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){let t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){let t=Math.ceil(Math.max(...e.map(o=>o.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,n){let o=new class{getTemplateId(s){return"candidate"}getHeight(s){return t}},r=new class{constructor(){this.templateId="candidate"}renderTemplate(s){return new tQ(s,n)}renderElement(s,a,l){l.populate(s)}disposeTemplate(s){s.dispose()}};return new rl("NewSymbolNameCandidates",e,o,[r],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}},K5e=class{constructor(){this._onDidInputChange=new q,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new se}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",y("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=y("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=y("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=nc().setupManagedHover(Mr("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(ce(this.input,Te.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(ce(this.input,Te.KEY_DOWN,e=>{let t=new Vi(e);(t.keyCode===15||t.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(ce(this.input,Te.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(ce(this.input,Te.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(ce(this.input,Te.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return gi(this._inputNode),this._inputNode}get button(){return gi(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=By(De.sparkle),Tr(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=By(De.primitiveSquare),Tr(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}},tQ=class i{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${i._PADDING}px`;let n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width=n.style.height=`${t.lineHeight*.8}px`,this._domNode.appendChild(n),this._icon=By(De.sparkle),this._icon.style.display="none",n.appendChild(this._icon),this._label=document.createElement("div"),vr(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){let t=!!e.tags?.includes($K.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+i._PADDING*2}}dispose(){}}});async function Hbi(i,e,t,n){let o=new iQ(e,t,i),r=await o.resolveRenameLocation(Nt.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,Nt.None)}var Vbi,zD,J5e,iQ,VD,X5e,Z5e,CCt=D(()=>{Zl();Gt();sn();Tt();Td();de();gn();mn();Jt();kL();hs();kt();Ue();An();ro();Hi();NV();SC();f3();Be();go();Dy();Bt();ht();ch();Ic();o0();fa();lh();xCt();Vbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},zD=function(i,e){return function(t,n){e(t,n,i)}},iQ=class{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` +`):void 0}:{range:R.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` +`):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,n,o){let r=this._providers[t];if(!r)return{edits:[],rejectReason:n.join(` +`)};let s=await r.provideRenameEdits(this.model,this.position,e,o);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),o)}else return this._provideRenameEdits(e,t+1,n.concat(y("no result","No result.")),o);return s}};VD=class{static{J5e=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(J5e.ID)}constructor(e,t,n,o,r,s,a,l,c){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=o,this._progressService=r,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._telemetryService=c,this._disposableStore=new se,this._cts=new Mi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(gpe,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){let e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new Mi,!this.editor.hasModel()){e("editor has no model");return}let t=this.editor.getPosition(),n=new iQ(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!n.hasProvider()){e("skeleton has no provider");return}let o=new Cp(this.editor,5,void 0,this._cts.token),r;try{e("resolving rename location");let p=n.resolveRenameLocation(o.token);this._progressService.showWhile(p,250),r=await p,e("resolved rename location")}catch(p){p instanceof qc?e("resolve rename location cancelled",JSON.stringify(p,null," ")):(e("resolve rename location failed",p instanceof Error?p:JSON.stringify(p,null," ")),(typeof p=="string"||uf(p))&&yu.get(this.editor)?.showMessage(p||y("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t));return}finally{o.dispose()}if(!r){e("returning early - no loc");return}if(r.rejectReason){e(`returning early - rejected with reason: ${r.rejectReason}`,r.rejectReason),yu.get(this.editor)?.showMessage(r.rejectReason,t);return}if(o.token.isCancellationRequested){e("returning early - cts1 cancelled");return}let s=new Cp(this.editor,5,r.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),c=await Promise.all(l.map(async p=>[p,await p.supportsAutomaticNewSymbolNamesTriggerKind??!1])),u=(p,g)=>{let A=c.slice();return p===yk.Automatic&&(A=A.filter(([v,w])=>w)),A.map(([v])=>v.provideNewSymbolNames(a,r.range,p,g))};e("creating rename input field and awaiting its result");let d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameWidget.getInput(r.range,r.text,d,l.length>0?u:void 0,s);if(e("received response from rename input field"),l.length>0&&this._reportTelemetry(l.length,a.getLanguageId(),h),typeof h=="boolean"){e(`returning early - rename input field response - ${h}`),h&&this.editor.focus(),s.dispose();return}this.editor.focus(),e("requesting rename edits");let f=hy(n.provideRenameEdits(h.newName,s.token),s.token).then(async p=>{if(!p){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(p.rejectReason){e(`returning early - rejected with reason: ${p.rejectReason}`),this._notificationService.info(p.rejectReason);return}this.editor.setSelection(R.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(p,{editor:this.editor,showPreview:h.wantsPreview,label:y("label","Renaming '{0}' to '{1}'",r?.text,h.newName),code:"undoredo.rename",quotableLabel:y("quotableLabel","Renaming {0} to {1}",r?.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{e("edits applied"),g.ariaSummary&&ms(y("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,h.newName,g.ariaSummary))}).catch(g=>{e(`error when applying edits ${JSON.stringify(g,null," ")}`),this._notificationService.error(y("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})},p=>{e("error when providing rename edits",JSON.stringify(p,null," ")),this._notificationService.error(y("rename.failed","Rename failed to compute edits")),this._logService.error(p)}).finally(()=>{s.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,n){let o=typeof n=="boolean"?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:n.stats.source.k,nRenameSuggestions:n.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:n.stats.timeBeforeFirstInputFieldEdit,wantsPreview:n.wantsPreview,nRenameSuggestionsInvocations:n.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:n.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",o)}};VD=J5e=Vbi([zD(1,Re),zD(2,_n),zD(3,Qy),zD(4,dp),zD(5,sr),zD(6,pL),zD(7,Me),zD(8,rr)],VD);X5e=class extends Pe{constructor(){super({id:"editor.action.rename",label:y("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ge.and(V.writable,V.hasRenameProvider),kbOpts:{kbExpr:V.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(ei),[o,r]=Array.isArray(t)&&t||[void 0,void 0];return Je.isUri(o)&&J.isIPosition(r)?n.openCodeEditor({resource:o},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(r),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let n=e.get(sr),o=VD.get(t);return o?(n.trace("[RenameAction] got controller, running..."),o.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}};St(VD.ID,VD,4);Ce(X5e);Z5e=Eo.bindToContribution(VD.get);Qe(new Z5e({id:"acceptRenameInput",precondition:S2,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:ge.and(V.focus,ge.not("isComposing")),primary:3}}));Qe(new Z5e({id:"acceptRenameInputWithPreview",precondition:ge.and(S2,ge.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:ge.and(V.focus,ge.not("isComposing")),primary:2051}}));Qe(new Z5e({id:"cancelRenameInput",precondition:S2,handler:i=>i.cancelRenameInput(),kbOpts:{weight:199,kbExpr:V.focus,primary:9,secondary:[1033]}}));Hn(class extends ma{constructor(){super({id:"focusNextRenameSuggestion",title:{...Ft("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:S2,keybinding:[{primary:18,weight:199}]})}run(e){let t=e.get(ei).getFocusedCodeEditor();if(!t)return;let n=VD.get(t);n&&n.focusNextRenameSuggestion()}});Hn(class extends ma{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...Ft("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:S2,keybinding:[{primary:16,weight:199}]})}run(e){let t=e.get(ei).getFocusedCodeEditor();if(!t)return;let n=VD.get(t);n&&n.focusPreviousRenameSuggestion()}});Ec("_executeDocumentRenameProvider",function(i,e,t,...n){let[o]=n;gi(typeof o=="string");let{renameProvider:r}=i.get(Me);return Hbi(r,e,t,o)});Ec("_executePrepareRename",async function(i,e,t){let{renameProvider:n}=i.get(Me),r=await new iQ(e,t,n).resolveRenameLocation(Nt.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r});Qi.as(Tc.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:y("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function Ubi(i){return{range:i.range,options:Ot.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:i.hasSeparatorLine?2:1,sectionHeaderText:i.text}})}}var Wbi,_Ct,bpe,SCt=D(()=>{Gt();de();Jt();Rs();bs();WA();Wbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},_Ct=function(i,e){return function(t,n){e(t,n,i)}},bpe=class extends H{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,n){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(o=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(o=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(o=>{let r=this.editor.getModel()?.getLanguageId();r&&o.affects(r)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(o=>{this.options&&!o.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(o=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(o=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new si(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;let t=this.editor.getModel().getLanguageId();if(!t)return;let n=this.languageConfigurationService.getLanguageConfiguration(t).comments,o=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!n&&!o?.markers))return{foldingRules:o,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;let e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;let t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(n=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(n)})}updateDecorations(e){let t=this.editor.getModel();t&&(e=e.filter(r=>{if(!r.shouldBeInComments)return!0;let s=t.validateRange(r.range),a=t.tokenization.getLineTokens(s.startLineNumber),l=a.findTokenIndexAtOffset(s.startColumn-1),c=a.getStandardTokenType(l);return a.getLanguageId(l)===t.getLanguageId()&&c===1}));let n=Object.values(this.currentOccurrences).map(r=>r.decorationId),o=e.map(r=>Ubi(r));this.editor.changeDecorations(r=>{let s=r.deltaDecorations(n,o);this.currentOccurrences={};for(let a=0,l=s.length;a{dO();wi()});function nQ(i){return i&&!!i.data}function i6e(i){return i&&Array.isArray(i.edits)}function n6e(i,e){return i.has(e)}function qbi(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function o6e(i,e,t,n,o){let r=qbi(i,e),s=await Promise.all(r.map(async a=>{let l,c=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?n:null,o)}catch(u){c=u,l=null}return(!l||!nQ(l)&&!i6e(l))&&(l=null),new e6e(a,l,c)}));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null}function Ybi(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function DCt(i,e){return i.has(e)}function TCt(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function Ape(i,e,t,n){let o=TCt(i,e),r=await Promise.all(o.map(async s=>{let a;try{a=await s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){ln(l),a=null}return(!a||!nQ(a))&&(a=null),new t6e(s,a)}));for(let s of r)if(s.tokens)return s;return r.length>0?r[0]:null}var e6e,t6e,r6e=D(()=>{sn();Tt();mn();su();to();gn();ECt();Ue();Hi();e6e=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};t6e=class{constructor(e,t){this.provider=e,this.tokens=t}};ii.registerCommand("_provideDocumentSemanticTokensLegend",async(i,...e)=>{let[t]=e;gi(t instanceof Je);let n=i.get(an).getModel(t);if(!n)return;let{documentSemanticTokensProvider:o}=i.get(Me),r=Ybi(o,n);return r?r[0].getLegend():i.get(Ii).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});ii.registerCommand("_provideDocumentSemanticTokens",async(i,...e)=>{let[t]=e;gi(t instanceof Je);let n=i.get(an).getModel(t);if(!n)return;let{documentSemanticTokensProvider:o}=i.get(Me);if(!n6e(o,n))return i.get(Ii).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let r=await o6e(o,n,null,null,Nt.None);if(!r)return;let{provider:s,tokens:a}=r;if(!a||!nQ(a))return;let l=$5e({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l});ii.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(i,...e)=>{let[t,n]=e;gi(t instanceof Je);let o=i.get(an).getModel(t);if(!o)return;let{documentRangeSemanticTokensProvider:r}=i.get(Me),s=TCt(r,o);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!R.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=await Ape(r,o,R.lift(n),Nt.None);if(a)return a.provider.getLegend()});ii.registerCommand("_provideDocumentRangeSemanticTokens",async(i,...e)=>{let[t,n]=e;gi(t instanceof Je),gi(R.isIRange(n));let o=i.get(an).getModel(t);if(!o)return;let{documentRangeSemanticTokensProvider:r}=i.get(Me),s=await Ape(r,o,R.lift(n),Nt.None);if(!(!s||!s.tokens))return $5e({id:0,type:"full",data:s.tokens.data})})});function A4(i,e,t){let n=t.getValue(oQ,{overrideIdentifier:i.getLanguageId(),resource:i.uri})?.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var oQ,s6e=D(()=>{oQ="editor.semanticHighlighting"});var kCt,j1,HD,a6e,l6e,c6e,ICt=D(()=>{de();Tt();su();ao();Gt();sn();io();cie();r6e();hm();cd();Hi();uie();eD();s6e();kCt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},j1=function(i,e){return function(t,n){e(t,n,i)}},a6e=class extends H{constructor(e,t,n,o,r,s){super(),this._watchers=Object.create(null);let a=u=>{this._watchers[u.uri.toString()]=new l6e(u,e,n,r,s)},l=(u,d)=>{d.dispose(),delete this._watchers[u.uri.toString()]},c=()=>{for(let u of t.getModels()){let d=this._watchers[u.uri.toString()];A4(u,n,o)?d||a(u):d&&l(u,d)}};t.getModels().forEach(u=>{A4(u,n,o)&&a(u)}),this._register(t.onModelAdded(u=>{A4(u,n,o)&&a(u)})),this._register(t.onModelRemoved(u=>{let d=this._watchers[u.uri.toString()];d&&l(u,d)})),this._register(o.onDidChangeConfiguration(u=>{u.affectsConfiguration(oQ)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};a6e=kCt([j1(0,yL),j1(1,an),j1(2,Wn),j1(3,Et),j1(4,Aa),j1(5,Me)],a6e);l6e=class extends H{static{HD=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,n,o,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:HD.REQUEST_MIN_DELAY,max:HD.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new si(()=>this._fetchDocumentSemanticTokensNow(),HD.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{Oi(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),Oi(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!n6e(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Mi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,o=o6e(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let r=[],s=this._model.onDidChangeContent(l=>{r.push(l)}),a=new xo(!1);o.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,r);else{let{provider:c,tokens:u}=l,d=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,u||null,d,r)}},l=>{l&&(Ka(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||ft(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,o,r){r=Math.min(r,n.length-o,e.length-t);for(let s=0;s{(o.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(i6e(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let a=0;for(let h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=r.data,c=new Uint32Array(l.length+a),u=l.length,d=c.length;for(let h=t.edits.length-1;h>=0;h--){let f=t.edits[h];if(f.start>l.length){n.warnInvalidEditStart(r.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let p=u-(f.start+f.deleteCount);p>0&&(HD._copy(l,u-p,c,d-p,p),d-=p),f.data&&(HD._copy(f.data,0,c,d-f.data.length,f.data.length),d-=f.data.length),u=f.start}u>0&&HD._copy(l,0,c,0,u),t={resultId:t.resultId,data:c}}}if(nQ(t)){this._currentDocumentResponse=new c6e(e,t.resultId,t.data);let a=lie(t,n,this._model.getLanguageId());if(o.length>0)for(let l of o)for(let c of a)for(let u of l.changes)c.applyEdit(u.range,u.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};l6e=HD=kCt([j1(1,yL),j1(2,Wn),j1(3,Aa),j1(4,Me)],l6e);c6e=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};u0(a6e)});var Kbi,rQ,vpe,LCt=D(()=>{Gt();de();Jt();r6e();s6e();cie();ao();io();hm();cd();Hi();uie();Kbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},rQ=function(i,e){return function(t,n){e(t,n,i)}},vpe=class extends H{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,n,o,r,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=o,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new si(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(oQ)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),o=mo(s=>Promise.resolve(Ape(this._provider,e,t,s))),r=new xo(!1);return o.then(s=>{if(this._debounceInformation.update(e,r.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,lie(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(o),()=>this._removeOutstandingRequest(o)),o}};vpe=Kbi([rQ(1,yL),rQ(2,Wn),rQ(3,Et),rQ(4,Aa),rQ(5,Me)],vpe);St(vpe.ID,vpe,1)});var ype,NCt=D(()=>{Rt();Ue();ype=class{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let n=[];for(let o of t){let r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,o),this._addWordRanges(r,e,o),this._addWhitespaceLine(r,e,o),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let o=t.getWordAtPosition(n);if(!o)return;let{word:r,startColumn:s}=o,a=n.column-s,l=a,c=a,u=0;for(;l>=0;l--){let d=r.charCodeAt(l);if(l!==a&&(d===95||d===45))break;if(py(d)&&bg(u))break;u=d}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new R(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}});async function MCt(i,e,t,n,o){let r=i.all(e).concat(new ype(n.selectSubwords));r.length===1&&r.unshift(new e4);let s=[],a=[];for(let l of r)s.push(Promise.resolve(l.provideSelectionRanges(e,t,o)).then(c=>{if(Kr(c)&&c.length===t.length)for(let u=0;u{if(l.length===0)return[];l.sort((h,f)=>J.isBefore(h.getStartPosition(),f.getStartPosition())?1:J.isBefore(f.getStartPosition(),h.getStartPosition())||J.isBefore(h.getEndPosition(),f.getEndPosition())?-1:J.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);let c=[],u;for(let h of l)(!u||R.containsRange(h,u)&&!R.equalsRange(h,u))&&(c.push(h),u=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let d=[c[0]];for(let h=1;h{Wt();sn();Tt();Jt();kt();Ue();Qn();An();P4e();NCt();Be();go();to();Hi();dm();gn();mn();Jbi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Xbi=function(i,e){return function(t,n){e(t,n,i)}},d6e=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},sQ=class{static{u6e=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(u6e.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await MCt(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(114),Nt.None).then(r=>{if(!(!Kr(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!Zi(this._editor.getSelections(),t,(s,a)=>s.equalsSelection(a)))){for(let s=0;sa.containsPosition(t[s].getStartPosition())&&a.containsPosition(t[s].getEndPosition())),r[s].unshift(t[s]);this._state=r.map(s=>new d6e(0,s)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(r=>r.mov(e));let o=this._state.map(r=>qe.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(o)}finally{this._ignoreSelection=!1}}};sQ=u6e=Jbi([Xbi(1,Me)],sQ);wpe=class extends Pe{constructor(e,t){super(t),this._forward=e}async run(e,t){let n=sQ.get(t);n&&await n.run(this._forward)}},h6e=class extends wpe{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:y("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"1_basic",title:y({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};ii.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");f6e=class extends wpe{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:y("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:tt.MenubarSelectionMenu,group:"1_basic",title:y({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};St(sQ.ID,sQ,4);Ce(h6e);Ce(f6e);ii.registerCommand("_executeSelectionRangeProvider",async function(i,...e){let[t,n]=e;gi(Je.isUri(t));let o=i.get(Me).selectionRangeProvider,r=await i.get(Ss).createModelReference(t);try{return MCt(o,r.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},Nt.None)}finally{r.dispose()}})});var FCt,OCt=D(()=>{Be();FCt=Object.freeze({View:Ft("view","View"),Help:Ft("help","Help"),Test:Ft("test","Test"),File:Ft("file","File"),Preferences:Ft("preferences","Preferences"),Developer:Ft({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")})});var PCt=D(()=>{});var v4,BCt,p6e,zCt,Zbi,VCt,xpe,m6e,g6e,HCt=D(()=>{Ye();Sy();Wt();de();ko();PCt();Iee();IC();kt();_x();HI();JS();P3e();v4=class i{constructor(e,t,n,o=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=n,this.showEndForLine=o}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&Zi(this.startLineNumbers,e.startLineNumbers)&&Zi(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new i([],[],0)}},BCt=xd("stickyScrollViewLayer",{createHTML:i=>i}),p6e="data-sticky-line-index",zCt="data-sticky-is-line",Zbi="data-sticky-is-line-number",VCt="data-sticky-is-folding-icon",xpe=class extends H{constructor(e){super(),this._editor=e,this._foldingIconStore=new se,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof xu),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);let t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&t(),n.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;let o=this._isWidgetHeightZero(e),r=o?void 0:e,s=o?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(r,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;let t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;let n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];return t===0}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(t!==void 0)return t;let n=this._previousState,o=e.startLineNumbers.findIndex(r=>!n.startLineNumbers.includes(r));return o===-1?0:o}_updateWidgetWidth(){let e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;ta.scrollWidth))+o.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(111)==="mouseover"&&(this._foldingIconStore.add(ce(this._lineNumbersDomNode,Te.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(ce(this._lineNumbersDomNode,Te.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,o){let r=this._editor._getViewModel();if(!r)return;let s=r.coordinatesConverter.convertModelPositionToViewPosition(new J(t,1)).lineNumber,a=r.getViewLineRenderingData(s),l=this._editor.getOption(68),c;try{c=ou.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch{c=[]}let u=new ef(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,c,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new am(2e3),h=Sx(u,d),f;BCt?f=BCt.createHTML(d.build()):f=d.build();let p=document.createElement("span");p.setAttribute(p6e,String(e)),p.setAttribute(zCt,""),p.setAttribute("role","listitem"),p.tabIndex=0,p.className="sticky-line-content",p.classList.add(`stickyLine${t}`),p.style.lineHeight=`${this._lineHeight}px`,p.innerHTML=f;let g=document.createElement("span");g.setAttribute(p6e,String(e)),g.setAttribute(Zbi,""),g.className="sticky-line-number",g.style.lineHeight=`${this._lineHeight}px`;let A=o.contentLeft;g.style.width=`${A}px`;let v=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?v.innerText=t.toString():l.renderType===2&&(v.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),v.className="sticky-line-number-inner",v.style.lineHeight=`${this._lineHeight}px`,v.style.width=`${o.lineNumbersWidth}px`,v.style.paddingLeft=`${o.lineNumbersLeft}px`,g.appendChild(v);let w=this._renderFoldingIconForLine(n,t);w&&g.appendChild(w.domNode),this._editor.applyFontInfo(p),this._editor.applyFontInfo(v),g.style.lineHeight=`${this._lineHeight}px`,p.style.lineHeight=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`;let C=new m6e(e,t,p,g,w,h.characterMapping,p.scrollWidth);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){let t=e.index,n=e.lineDomNode,o=e.lineNumberDomNode,r=t===this._lineNumbers.length-1,s="0",a="1";n.style.zIndex=r?s:a,o.style.zIndex=r?s:a;let l=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,c=`${t*this._lineHeight}px`;return n.style.top=r?l:c,o.style.top=r?l:c,e}_renderFoldingIconForLine(e,t){let n=this._editor.getOption(111);if(!e||n==="never")return;let o=e.regions,r=o.findRange(t),s=o.getStartLineNumber(r);if(!(t===s))return;let l=o.isCollapsed(r),c=new g6e(l,s,o.getEndLineNumber(r),this._lineHeight);return c.setVisible(this._isOnGlyphMargin?!0:l||n==="always"),c.domNode.setAttribute(VCt,""),c}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;let t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;let n=kee(t.characterMapping,e,0);return new J(t.lineNumber,n)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){let t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){let t=this._getAttributeValue(e,p6e);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,zCt)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,VCt)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){let n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}},m6e=class{constructor(e,t,n,o,r,s,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=o,this.foldingIcon=r,this.characterMapping=s,this.scrollWidth=a}},g6e=class{constructor(e,t,n,o){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=o,this.domNode=document.createElement("div"),this.domNode.style.width=`${o}px`,this.domNode.style.height=`${o}px`,this.domNode.className=ut.asClassName(e?hj:dj)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}});var HC,E2,aQ,b6e=D(()=>{HC=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},E2=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},aQ=class{constructor(e,t,n,o){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=o}}});var Epe,cQ,lQ,WD,Cpe,_pe,A6e,Spe,v6e,y6e,WCt=D(()=>{de();Hi();q3();Gt();ghe();z3e();F3e();Rs();Tt();b6e();ld();ht();Epe=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},cQ=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(lQ||(lQ={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(WD||(WD={}));Cpe=class extends H{constructor(e,t,n,o){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new da(300)),this._updateOperation=this._register(new se),this._editor.getOption(116).defaultModel){case lQ.OUTLINE_MODEL:this._modelProviders.push(new A6e(this._editor,o));case lQ.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new y6e(this._editor,t,o));case lQ.INDENTATION_MODEL:this._modelProviders.push(new v6e(this._editor,n));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(let t of this._modelProviders){let{statusPromise:n,modelPromise:o}=t.computeStickyModel(e);this._modelPromise=o;let r=await n;if(this._modelPromise!==o)return null;switch(r){case WD.CANCELED:return this._updateOperation.clear(),null;case WD.VALID:return t.stickyModel}}return null}).catch(t=>(ft(t),null))}};Cpe=Epe([cQ(2,Re),cQ(3,Me)],Cpe);_pe=class extends H{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,WD.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};let t=mo(n=>this.createModelFromProvider(n));return{statusPromise:t.then(n=>this.isModelValid(n)?e.isCancellationRequested?WD.CANCELED:(this._stickyModel=this.createStickyModel(e,n),WD.VALID):this._invalid()).then(void 0,n=>(ft(n),WD.CANCELED)),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}},A6e=class extends _pe{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return Aj.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){let{stickyOutlineElement:n,providerID:o}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),r=this._editor.getModel();return new aQ(r.uri,r.getVersionId(),n,o)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(hi.first(e.children.values())instanceof bj){let a=hi.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,u;for(let[d,h]of e.children.entries()){let f=this._findSumOfRangesOfGroup(h);f>c&&(u=h,c=f,l=h.id)}t=l,n=u.children}}else n=e.children;let o=[],r=Array.from(n.values()).sort((a,l)=>{let c=new HC(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),u=new HC(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,u)});for(let a of r)o.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new E2(void 0,o,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(let s of r.children.values())n.push(this._stickyModelFromOutlineElement(s,r.symbol.selectionRange.startLineNumber));n.sort((r,s)=>this._comparator(r.range,s.range));let o=new HC(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new E2(o,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof G3?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};A6e=Epe([cQ(1,Me)],A6e);Spe=class extends _pe{constructor(e){super(e),this._foldingLimitReporter=new mj(e)}createStickyModel(e,t){let n=this._fromFoldingRegions(t),o=this._editor.getModel();return new aQ(o.uri,o.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],o=new E2(void 0,[],void 0);for(let r=0;r0&&(this.provider=this._register(new A2(e.getModel(),o,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){return this.provider?.compute(e)??null}};y6e=Epe([cQ(2,Me)],y6e)});var $bi,UCt,w6e,Dpe,jCt=D(()=>{de();Hi();sn();Gt();Wt();et();Rs();WCt();$bi=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},UCt=function(i,e){return function(t,n){e(t,n,i)}},w6e=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},Dpe=class extends H{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new q),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new se),this._updateSoon=this._register(new si(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(116)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(He(()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;let e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Cpe(e,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new Mi,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}let t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,o,r){if(t.children.length===0)return;let s=r,a=[];for(let u=0;uu-d)),c=this.updateIndex(Dx(a,e.startLineNumber+o,(u,d)=>u-d));for(let u=l;u<=c;u++){let d=t.children[u];if(!d)return;if(d.range){let h=d.range.startLineNumber,f=d.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new w6e(h,f-1,o+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,o+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,o,r)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);let n=this._editor._getViewModel()?.getHiddenAreas();if(n)for(let o of n)t=t.filter(r=>!(r.startLineNumber>=o.startLineNumber&&r.endLineNumber<=o.endLineNumber+1));return t}};Dpe=$bi([UCt(1,Me),UCt(2,Gi)],Dpe)});var e0i,y4,x6e,cv,C6e=D(()=>{de();Hi();HCt();jCt();ht();Ed();go();Bt();An();zU();Ue();kde();OBe();kt();sn();Rs();hm();Ye();b6e();$p();ghe();M3e();e0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},y4=function(i,e){return function(t,n){e(t,n,i)}},cv=class extends H{static{x6e=this}static{this.ID="store.contrib.stickyScrollController"}constructor(e,t,n,o,r,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=o,this._contextKeyService=a,this._sessionStore=new se,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new xpe(this._editor),this._stickyLineCandidateProvider=new Dpe(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=v4.Empty,this._onDidResize(),this._readConfiguration();let l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(u=>{this._readConfigurationChange(u)})),this._register(ce(l,Te.CONTEXT_MENU,async u=>{this._onContextMenu(rt(l),u)})),this._stickyScrollFocusedContextKey=V.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=V.stickyScrollVisible.bindTo(this._contextKeyService);let c=this._register(iu(l));this._register(c.onDidBlur(u=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(u=>{this.focus()})),this._registerMouseListeners(),this._register(ce(l,Te.MOUSE_DOWN,u=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(x6e.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new se,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(R.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){let e=this._register(new se),t=this._register(new N1(this._editor,{extractLineNumberFromMouseEvent:r=>{let s=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return s?s.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;let s=r.target.element;if(!s||s.innerText!==s.innerHTML)return null;let a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new R(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},o=this._stickyScrollWidget.getDomNode();this._register(un(o,Te.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){let c=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(c===null)return;let u=new J(this._endLineNumbers[c],1);this._revealLineInCenterIfOutsideViewport(u);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){let c=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(c);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!l){let c=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(c===null)return;l=new J(c,1)}this._revealPosition(l)})),this._register(un(o,Te.MOUSE_MOVE,r=>{if(r.shiftKey){let s=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(ce(o,Te.MOUSE_LEAVE,r=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,s])=>{let a=n(r);if(!a||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}let{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;let u=new Mi;e.add(He(()=>u.dispose(!0)));let d;DD(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new J(l.startLineNumber,l.startColumn+1),!1,u.token).then((h=>{if(!u.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;let f=c;d!==f?(e.clear(),d=f,d.style.textDecoration="underline",e.add(He(()=>{d.style.textDecoration="none"}))):d||(d=f,d.style.textDecoration="underline",e.add(He(()=>{d.style.textDecoration="none"})))}else e.clear()}))})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async r=>{if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;let s=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);s&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(Fde,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){let n=new wl(e,t);this._contextMenuService.showContextMenu({menuId:tt.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;let t=this._stickyScrollWidget.getRenderedStickyLine(e),n=t?.foldingIcon;if(!n)return;uj(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;let o=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(o),this._renderStickyScroll(e)}_readConfiguration(){let e=this._editor.getOption(116);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let o of e.ranges)if(n>=o.fromLineNumber&&n<=o.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){let t=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e){let t=this._editor.getModel();if(!t||t.isTooLargeForTokenization()){this._resetState();return}let n=this._updateAndGetMinRebuildFromLine(e),o=this._stickyLineCandidateProvider.getVersionId();if(o===void 0||o===t.getVersionId())if(!this._focused)await this._updateState(n);else if(this._focusedStickyElementIndex===-1)await this._updateState(n),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{let s=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(n),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(s)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){let t=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await B1.get(this._editor)?.getFoldingModel()??void 0,this._widgetState=this.findScrollWidgetState();let t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=v4.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){let e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),n=this._editor.getScrollTop(),o=0,r=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){let l=new HC(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(let u of c){let d=u.startLineNumber,h=u.endLineNumber,f=u.nestingDepth;if(h-d>0){let p=(f-1)*e,g=f*e,A=this._editor.getBottomForLineNumber(d)-n,v=this._editor.getTopForLineNumber(h)-n,w=this._editor.getBottomForLineNumber(h)-n;if(p>v&&p<=w){r.push(d),s.push(h+1),o=w-g;break}else g>A&&g<=w&&(r.push(d),s.push(h+1));if(r.length===t)break}}}return this._endLineNumbers=s,new v4(r,s,o,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};cv=x6e=e0i([y4(1,ia),y4(2,Me),y4(3,Re),y4(4,Gi),y4(5,Aa),y4(6,Ze)],cv)});var Tpe,Rpe,kpe,Ipe,Lpe,Npe,Mpe,QCt=D(()=>{Jt();Be();OCt();go();ao();Bt();An();C6e();Tpe=class extends ma{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...Ft("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:y({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:Ft("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:FCt.View,toggled:{condition:ge.equals("config.editor.stickyScroll.enabled",!0),title:y("stickyScroll","Sticky Scroll"),mnemonicTitle:y({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:tt.CommandPalette},{id:tt.MenubarAppearanceMenu,group:"4_editor",order:3},{id:tt.StickyScrollContext}]})}async run(e){let t=e.get(Et),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)}},Rpe=100,kpe=class extends uh{constructor(){super({id:"editor.action.focusStickyScroll",title:{...Ft("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:y({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:ge.and(ge.has("config.editor.stickyScroll.enabled"),V.stickyScrollVisible),menu:[{id:tt.CommandPalette}]})}runEditorCommand(e,t){cv.get(t)?.focus()}},Ipe=class extends uh{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:Ft("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Rpe,primary:18}})}runEditorCommand(e,t){cv.get(t)?.focusNext()}},Lpe=class extends uh{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:Ft("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Rpe,primary:16}})}runEditorCommand(e,t){cv.get(t)?.focusPrevious()}},Npe=class extends uh{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:Ft("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Rpe,primary:3}})}runEditorCommand(e,t){cv.get(t)?.goToFocused()}},Mpe=class extends uh{constructor(){super({id:"editor.action.selectEditor",title:Ft("selectEditor.title","Select Editor"),precondition:V.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Rpe,primary:9}})}runEditorCommand(e,t){cv.get(t)?.selectEditor()}}});var GCt=D(()=>{Jt();QCt();C6e();go();St(cv.ID,cv,1);Hn(Tpe);Hn(kpe);Hn(Lpe);Hn(Ipe);Hn(Npe);Hn(Mpe)});var qCt,uQ,_6e,S6e,E6e,YCt=D(()=>{sn();Rg();ld();de();hs();Ue();eD();Hi();z4e();y2();F4e();H4e();B4e();cC();qCt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},uQ=function(i,e){return function(t,n){e(t,n,i)}},_6e=class{constructor(e,t,n,o,r,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=o,this.command=r,this.completion=s}},S6e=class extends LK{constructor(e,t,n,o,r,s){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=o,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&a.resolve(Nt.None)}return e}};S6e=qCt([uQ(5,$3)],S6e);E6e=class extends H{constructor(e,t,n,o){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=o,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,o){if(n.selectedSuggestionInfo)return;let r;for(let f of this._editorService.listCodeEditors())if(f.getModel()===e){r=f;break}if(!r)return;let s=r.getOption(90);if(H1.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(H1.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(t),u;if(c?.word||(u=this._getTriggerCharacterInfo(e,t)),!c?.word&&!u||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let d,h=e.getValueInRange(new R(t.lineNumber,1,t.lineNumber,t.column));if(!u&&this._lastResult?.canBeReused(e,t.lineNumber,c)){let f=new Fj(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),d=this._lastResult}else{let f=await wj(this._languageFeatureService.completionProvider,e,t,new v2(void 0,n4.createSuggestFilter(r).itemKind,u?.providers),u&&{triggerKind:1,triggerCharacter:u.ch},o),p;f.needsClipboard&&(p=await this._clipboardService.readText());let g=new i4(f.items,t.column,new Fj(h,0),t4.None,r.getOption(119),r.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},p);d=new S6e(e,t.lineNumber,c,g,f,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(Nt.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){let n=e.getValueInRange(R.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let r of this._languageFeatureService.completionProvider.all(e))r.triggerCharacters?.includes(n)&&o.add(r);if(o.size!==0)return{providers:o,ch:n}}};E6e=qCt([uQ(0,Me),uQ(1,Ah),uQ(2,$3),uQ(3,ei)],E6e);u0(E6e)});var D6e,KCt=D(()=>{cd();Jt();Be();D6e=class extends Pe{constructor(){super({id:"editor.action.forceRetokenize",label:y("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let o=new xo;n.tokenization.forceTokenization(n.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}};Ce(D6e)});var T6e,JCt=D(()=>{Zl();Rse();Be();go();T6e=class i extends ma{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:i.ID,title:Ft({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:Ft("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){let t=!hC.getTabFocusMode();hC.setTabFocusMode(t),t?ms(y("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):ms(y("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Hn(T6e)});var XCt=D(()=>{});var ZCt=D(()=>{});var $Ct=D(()=>{});var t0i,e_t,Fpe,t_t=D(()=>{Ye();n0();xc();cp();et();de();Dd();$Ct();ic();zx();t0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},e_t=function(i,e){return function(t,n){e(t,n,i)}},Fpe=class extends H{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},o,r){super(),this._link=t,this._hoverService=o,this._enabled=!0,this.el=Ae(e,xe("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=n.hoverDelegate??Mr("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");let s=this._register(new bi(this.el,"click")),a=this._register(new bi(this.el,"keypress")),l=Ee.chain(a.event,d=>d.map(h=>new Vi(h)).filter(h=>h.keyCode===3)),c=this._register(new bi(this.el,Tn.Tap)).event;this._register(Lr.addTarget(this.el));let u=Ee.any(s.event,l,c);this._register(u(d=>{this.enabled&&(mi.stop(d,!0),n?.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Fpe=t0i([e_t(3,dh),e_t(4,Qr)],Fpe)});var i_t,n_t,i0i,Ope,k6e,o_t=D(()=>{ZCt();Ye();Hg();il();de();Ux();ht();t_t();Ap();ko();i_t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},n_t=function(i,e){return function(t,n){e(t,n,i)}},i0i=26,Ope=class extends H{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(k6e))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,i0i)}};Ope=i_t([n_t(1,Re)],Ope);k6e=class extends H{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(df,{}),this.element=xe("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=xe("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Tr(this.element)}show(e){Tr(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=Ae(this.element,xe("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(xe(`div${ut.asCSSSelector(e.icon)}`));let o=Ae(this.element,xe("div.message-container"));if(o.setAttribute("aria-hidden","true"),o.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=Ae(this.element,xe("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(Fpe,this.messageActionsContainer,{...s,tabIndex:-1},{}));let r=Ae(this.element,xe("div.action-container"));this.actionBar=this._register(new Ps(r)),this.actionBar.push(this._register(new ta("banner.close","Close Banner",ut.asClassName(cse),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};k6e=i_t([n_t(0,Re)],k6e)});function o0i(i,e){return{nonBasicASCII:e.nonBasicASCII===np?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===np?!i:e.includeComments,includeStrings:e.includeStrings===np?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}function R6e(i){return`U+${i.toString(16).padStart(4,"0")}`}function I6e(i){let e=`\`${R6e(i)}\``;return hx.isInvisibleCharacter(i)||(e+=` "${`${r0i(i)}`}"`),e}function r0i(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function s_t(i,e){return dL.computeUnicodeHighlightReason(i,e)}async function s0i(i,e){let t=i.getValue(sh.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let o of e)n[String.fromCodePoint(o)]=!0;await i.updateValue(sh.allowedCharacters,n,2)}async function a0i(i,e){let t=i.inspect(sh.allowedLocales).user?.value,n;typeof t=="object"&&t?n=Object.assign({},t):n={};for(let o of e)n[o]=!0;await i.updateValue(sh.allowedLocales,n,2)}function l0i(i){throw new Error(`Unexpected value: ${i}`)}var P6e,w4,n0i,dQ,L6e,N6e,r_t,M6e,Ppe,F6e,O6e,D2,hQ,fQ,Bpe,a_t=D(()=>{Gt();oo();Td();de();wi();Rt();XCt();Jt();ea();bs();VTe();WA();Il();rFe();Xg();PU();o_t();Be();ao();ht();Dd();gf();Ap();RIe();P6e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},w4=function(i,e){return function(t,n){e(t,n,i)}},n0i=Ln("extensions-warning-message",De.warning,y("warningIcon","Icon shown with a warning message in the extensions editor.")),dQ=class extends H{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,n,o){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;let s=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount),a;if(r.nonBasicAsciiCharacterCount>=s)a={message:y("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new fQ};else if(r.ambiguousCharacterCount>=s)a={message:y("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new D2};else if(r.invisibleCharacterCount>=s)a={message:y("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new hQ};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:n0i,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(o.createInstance(Ope,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(126),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=o0i(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?oYe:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new L6e(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new N6e(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};dQ=P6e([w4(1,wa),w4(2,dne),w4(3,Re)],dQ);L6e=class extends H{constructor(e,t,n,o){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new si(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let o of t.ranges)n.push({range:o,options:Ppe.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!jle(t,e))return null;let n=t.getValueInRange(e.range);return{reason:s_t(n,this._options),inComment:Qle(t,e),inString:Gle(t,e)}}};L6e=P6e([w4(3,wa)],L6e);N6e=class extends H{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new si(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let o of e){let r=dL.computeUnicodeHighlights(this._model,this._options,o);for(let s of r.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(let o of n.ranges)t.push({range:o,options:Ppe.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return jle(t,e)?{reason:s_t(n,this._options),inComment:Qle(t,e),inString:Gle(t,e)}:null}},r_t=y("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options"),M6e=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),o=this._editor.getContribution(dQ.ID);if(!o)return[];let r=[],s=new Set,a=300;for(let l of t){let c=o.getDecorationInfo(l);if(!c)continue;let d=n.getValueInRange(l.range).codePointAt(0),h=I6e(d),f;switch(c.reason.kind){case 0:{gy(c.reason.confusableWith)?f=y("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,I6e(c.reason.confusableWith.codePointAt(0))):f=y("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,I6e(c.reason.confusableWith.codePointAt(0)));break}case 1:f=y("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=y("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let p={codePoint:d,reason:c.reason,inComment:c.inComment,inString:c.inString},g=y("unicodeHighlight.adjustSettings","Adjust settings"),A=`command:${Bpe.ID}?${encodeURIComponent(JSON.stringify(p))}`,v=new $r("",!0).appendMarkdown(f).appendText(" ").appendLink(A,g,r_t);r.push(new xf(this,l.range,[v],!1,a++))}return r}renderHoverParts(e,t){return Syt(e,t,this._editor,this._languageService,this._openerService)}};M6e=P6e([w4(1,on),w4(2,Qr)],M6e);Ppe=class i{constructor(){this.map=new Map}static{this.instance=new i}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,o=this.map.get(n);return o||(o=Ot.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,o)),o}},F6e=class extends Pe{constructor(){super({id:D2.ID,label:y("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,n){let o=e?.get(Et);o&&this.runAction(o)}async runAction(e){await e.updateValue(sh.includeComments,!1,2)}},O6e=class extends Pe{constructor(){super({id:D2.ID,label:y("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,n){let o=e?.get(Et);o&&this.runAction(o)}async runAction(e){await e.updateValue(sh.includeStrings,!1,2)}},D2=class i extends Pe{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,n){let o=e?.get(Et);o&&this.runAction(o)}async runAction(e){await e.updateValue(sh.ambiguousCharacters,!1,2)}},hQ=class i extends Pe{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,n){let o=e?.get(Et);o&&this.runAction(o)}async runAction(e){await e.updateValue(sh.invisibleCharacters,!1,2)}},fQ=class i extends Pe{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=y("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,n){let o=e?.get(Et);o&&this.runAction(o)}async runAction(e){await e.updateValue(sh.nonBasicASCII,!1,2)}},Bpe=class i extends Pe{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:i.ID,label:y("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,n){let{codePoint:o,reason:r,inString:s,inComment:a}=n,l=String.fromCodePoint(o),c=e.get(Pa),u=e.get(Et);function d(p){return hx.isInvisibleCharacter(p)?y("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",R6e(p)):y("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${R6e(p)} "${l}"`)}let h=[];if(r.kind===0)for(let p of r.notAmbiguousInLocales)h.push({label:y("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',p),run:async()=>{a0i(u,[p])}});if(h.push({label:d(o),run:()=>s0i(u,[o])}),a){let p=new F6e;h.push({label:p.label,run:async()=>p.runAction(u)})}else if(s){let p=new O6e;h.push({label:p.label,run:async()=>p.runAction(u)})}if(r.kind===0){let p=new D2;h.push({label:p.label,run:async()=>p.runAction(u)})}else if(r.kind===1){let p=new hQ;h.push({label:p.label,run:async()=>p.runAction(u)})}else if(r.kind===2){let p=new fQ;h.push({label:p.label,run:async()=>p.runAction(u)})}else l0i(r);let f=await c.pick(h,{title:r_t});f&&await f.run()}};Ce(D2);Ce(hQ);Ce(fQ);Ce(Bpe);St(dQ.ID,dQ,1);Jg.register(M6e)});function u0i(i,e,t){i.setModelProperty(e.uri,c_t,t)}function d0i(i,e){return i.getModelProperty(e.uri,c_t)}var c0i,l_t,c_t,zpe,u_t=D(()=>{de();Nc();Jt();hs();Be();zO();c0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},l_t=function(i,e){return function(t,n){e(t,n,i)}},c_t="ignoreUnusualLineTerminators";zpe=class extends H{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(o=>{o.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||d0i(this._codeEditorService,e)===!0||this._editor.getOption(92))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:y("unusualLineTerminators.title","Unusual Line Terminators"),message:y("unusualLineTerminators.message","Detected unusual line terminators"),detail:y("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Lc(e.uri)),primaryButton:y({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:y("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){u0i(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};zpe=c0i([l_t(1,Ry),l_t(2,ei)],zpe);St(zpe.ID,zpe,1)});var h0i,f0i,Vpe,Hpe,d_t=D(()=>{jI();Hi();ro();de();Xl();h0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},f0i=function(i,e){return function(t,n){e(t,n,i)}},Vpe=class{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,n){let o=[],r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return r?e.isDisposed()?void 0:e.findMatches(r.word,!0,!1,!0,bO,!1).map(a=>({range:a.range,kind:X_.Text})):Promise.resolve(o)}provideMultiDocumentHighlights(e,t,n,o){let r=new ps,s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!s)return Promise.resolve(r);for(let a of[e,...n]){if(a.isDisposed())continue;let c=a.findMatches(s.word,!0,!1,!0,bO,!1).map(u=>({range:u.range,kind:X_.Text}));c&&r.set(a.uri,c)}return r}},Hpe=class extends H{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new Vpe)),this._register(e.multiDocumentHighlightProvider.register("*",new Vpe))}};Hpe=h0i([f0i(0,Me)],Hpe)});function f_t(i,e,t,n){let o=i.ordered(e);return mz(o.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,ln)),r=>r!=null).then(r=>{if(r){let s=new ps;return s.set(e.uri,r),s}return new ps})}function p0i(i,e,t,n,o,r){let s=i.ordered(e);return mz(s.map(a=>()=>{let l=r.filter(c=>Cte(c)).filter(c=>HV(a.selector,c.uri,c.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,o)).then(void 0,ln)}),a=>a!=null)}function m0i(i,e,t,n,o){return new z6e(e,t,o,i)}function g0i(i,e,t,n,o,r){return new V6e(e,t,o,i,r)}var h_t,Wpe,zs,B6e,Q6e,Upe,z6e,V6e,H6e,UD,jpe,W6e,U6e,j6e,p_t=D(()=>{Be();Zl();Gt();sn();Tt();de();ZB();Jt();hs();Ue();An();ol();Hi();s5e();Bt();xl();Xl();Lke();Nc();d_t();eD();h_t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Wpe=function(i,e){return function(t,n){e(t,n,i)}},Q6e=new ze("hasWordHighlights",!1);Upe=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=mo(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new R(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let o=t.startLineNumber,r=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,u=n.length;!l&&c=s&&(l=!0)}return l}cancel(){this.result.cancel()}},z6e=class extends Upe{constructor(e,t,n,o){super(e,t,n),this._providers=o}_compute(e,t,n,o){return f_t(this._providers,e,t.getPosition(),o).then(r=>r||new ps)}},V6e=class extends Upe{constructor(e,t,n,o,r){super(e,t,n),this._providers=o,this._otherModels=r}_compute(e,t,n,o){return p0i(this._providers,e,t.getPosition(),n,o,this._otherModels).then(r=>r||new ps)}};Ec("_executeDocumentHighlights",async(i,e,t)=>{let n=i.get(Me);return(await f_t(n.documentHighlightProvider,e,t,Nt.None))?.get(e.uri)});H6e=class{static{zs=this}static{this.storedDecorationIDs=new ps}static{this.query=null}constructor(e,t,n,o,r){this.toUnhook=new se,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new ps,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new da(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=r,this._hasWordHighlights=Q6e.bindTo(o),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(s=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(s)})})),this.toUnhook.add(e.onDidFocusEditorText(s=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(s=>{EI(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(s=>{!s.newModelUrl&&s.oldModelUrl?this._stopSingular():zs.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(s=>{let a=this.editor.getOption(81);if(this.occurrencesHighlight!==a)switch(this.occurrencesHighlight=a,a){case"off":this._stopAll();break;case"singleFile":this._stopAll(zs.query?.modelInfo?.model);break;case"multiFile":zs.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",a);break}})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,zs.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(R.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,o=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o);let r=this._getWord();if(r){let s=this.editor.getModel().getLineContent(o.startLineNumber);ms(`${s}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,o=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o);let r=this._getWord();if(r){let s=this.editor.getModel().getLineContent(o.startLineNumber);ms(`${s}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=zs.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),zs.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){let t=this.codeEditorService.listCodeEditors(),n=[];for(let o of t){if(!o.hasModel()||Hx(o.getModel().uri,e?.uri))continue;let r=zs.storedDecorationIDs.get(o.getModel().uri);if(!r)continue;o.removeDecorations(r),n.push(o.getModel().uri);let s=UD.get(o);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(let o of n)zs.storedDecorationIDs.delete(o)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==Vt.vscodeNotebookCell&&zs.query?.modelInfo?.model.uri.scheme!==Vt.vscodeNotebookCell?(zs.query=null,this._run()):zs.query?.modelInfo&&(zs.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&this.editor.getModel()?.uri.scheme!==Vt.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Vt.vscodeNotebookCell){let r=[],s=this.codeEditorService.listCodeEditors();for(let a of s){let l=a.getModel();l&&l!==e&&l.uri.scheme===Vt.vscodeNotebookCell&&r.push(l)}return r}let n=[],o=this.codeEditorService.listCodeEditors();for(let r of o){if(!lU(r))continue;let s=r.getModel();s&&e===s.modified&&n.push(s.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(let r of o){let s=r.getModel();s&&s!==e&&n.push(s)}return n}_run(e){let t;if(this.editor.hasTextFocus()){let o=this.editor.getSelection();if(!o||o.startLineNumber!==o.endLineNumber){zs.query=null,this._stopAll();return}let r=o.startColumn,s=o.endColumn,a=this._getWord();if(!a||a.startColumn>r||a.endColumn{o===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=s||[],this._beginRenderDecorations())},ft)}}computeWithModel(e,t,n,o){return o.length?g0i(this.multiDocumentProviders,e,t,n,this.editor.getOption(132),o):m0i(this.providers,e,t,n,this.editor.getOption(132))}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=this.codeEditorService.listCodeEditors();for(let t of e){let n=UD.get(t);if(!n)continue;let o=[],r=t.getModel()?.uri;if(r&&this.workerRequestValue.has(r)){let s=zs.storedDecorationIDs.get(r),a=this.workerRequestValue.get(r);if(a)for(let c of a)c.range&&o.push({range:c.range,options:zxt(c.kind)});let l=[];t.changeDecorations(c=>{l=c.deltaDecorations(s??[],o)}),zs.storedDecorationIDs=zs.storedDecorationIDs.set(r,l),o.length>0&&(n.wordHighlighter?.decorations.set(o),n.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};H6e=zs=h_t([Wpe(4,ei)],H6e);UD=class extends H{static{B6e=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(B6e.ID)}constructor(e,t,n,o){super(),this._wordHighlighter=null;let r=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new H6e(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,o))};this._register(e.onDidChangeModel(s=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),r()})),r()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};UD=B6e=h_t([Wpe(1,Ze),Wpe(2,Me),Wpe(3,ei)],UD);jpe=class extends Pe{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=UD.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},W6e=class extends jpe{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:y("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Q6e,kbOpts:{kbExpr:V.editorTextFocus,primary:65,weight:100}})}},U6e=class extends jpe{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:y("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Q6e,kbOpts:{kbExpr:V.editorTextFocus,primary:1089,weight:100}})}},j6e=class extends Pe{constructor(){super({id:"editor.action.wordHighlight.trigger",label:y("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:V.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let o=UD.get(t);o&&o.restoreViewState(!0)}};St(UD.ID,UD,0);Ce(W6e);Ce(U6e);Ce(j6e);u0(Hpe)});var T2,Q1,G1,G6e,q6e,Y6e,K6e,J6e,X6e,Z6e,$6e,e9e,t9e,i9e,n9e,o9e,r9e,s9e,a9e,k2,pQ,mQ,l9e,c9e,u9e,d9e,h9e,f9e,p9e,m9e=D(()=>{Jt();bN();ea();Sm();BW();IO();kt();Ue();Qn();An();Rs();Be();fh();Bt();sB();T2=class extends Eo{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let o=Cd(t.getOption(132),t.getOption(131)),r=t.getModel(),s=t.getSelections(),a=s.length>1,l=s.map(c=>{let u=new J(c.positionLineNumber,c.positionColumn),d=this._move(o,r,u,this._wordNavigationType,a);return this._moveTo(c,d,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>ji.fromModelSelection(c))),l.length===1){let c=new J(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(c,0)}}_moveTo(e,t,n){return n?new qe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new qe(t.lineNumber,t.column,t.lineNumber,t.column)}},Q1=class extends T2{_move(e,t,n,o,r){return Ba.moveWordLeft(e,t,n,o,r)}},G1=class extends T2{_move(e,t,n,o,r){return Ba.moveWordRight(e,t,n,o)}},G6e=class extends Q1{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},q6e=class extends Q1{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},Y6e=class extends Q1{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ge.and(V.textInputFocus,ge.and(EL,uW)?.negate()),primary:2063,mac:{primary:527},weight:100}})}},K6e=class extends Q1{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},J6e=class extends Q1{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},X6e=class extends Q1{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ge.and(V.textInputFocus,ge.and(EL,uW)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}},Z6e=class extends Q1{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,o,r){return super._move(Cd(of.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,o,r)}},$6e=class extends Q1{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,o,r){return super._move(Cd(of.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,o,r)}},e9e=class extends G1{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},t9e=class extends G1{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ge.and(V.textInputFocus,ge.and(EL,uW)?.negate()),primary:2065,mac:{primary:529},weight:100}})}},i9e=class extends G1{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},n9e=class extends G1{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},o9e=class extends G1{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ge.and(V.textInputFocus,ge.and(EL,uW)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}},r9e=class extends G1{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},s9e=class extends G1{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,o,r){return super._move(Cd(of.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,o,r)}},a9e=class extends G1{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,o,r){return super._move(Cd(of.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,o,r)}},k2=class extends Eo{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let o=e.get(Gi);if(!t.hasModel())return;let r=Cd(t.getOption(132),t.getOption(131)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(11),u=o.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),h=a.map(f=>{let p=this._delete({wordSeparators:r,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:u,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Bs(p,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},pQ=class extends k2{_delete(e,t){let n=Ba.deleteWordLeft(e,t);return n||new R(1,1,1,1)}},mQ=class extends k2{_delete(e,t){let n=Ba.deleteWordRight(e,t);if(n)return n;let o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o);return new R(o,r,o,r)}},l9e=class extends pQ{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:V.writable})}},c9e=class extends pQ{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:V.writable})}},u9e=class extends pQ{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},d9e=class extends mQ{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:V.writable})}},h9e=class extends mQ{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:V.writable})}},f9e=class extends mQ{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},p9e=class extends Pe{constructor(){super({id:"deleteInsideWord",precondition:V.writable,label:y("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let o=Cd(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections().map(l=>{let c=Ba.deleteInsideWord(o,r,l);return new Bs(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};Qe(new G6e);Qe(new q6e);Qe(new Y6e);Qe(new K6e);Qe(new J6e);Qe(new X6e);Qe(new e9e);Qe(new t9e);Qe(new i9e);Qe(new n9e);Qe(new o9e);Qe(new r9e);Qe(new Z6e);Qe(new $6e);Qe(new s9e);Qe(new a9e);Qe(new l9e);Qe(new c9e);Qe(new u9e);Qe(new d9e);Qe(new h9e);Qe(new f9e);Ce(p9e)});var g9e,b9e,Qpe,A9e,v9e,Gpe,y9e,w9e,m_t=D(()=>{Jt();BW();Ue();An();m9e();to();g9e=class extends k2{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=AN.deleteWordPartLeft(e);return n||new R(1,1,1,1)}},b9e=class extends k2{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:V.writable,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=AN.deleteWordPartRight(e);if(n)return n;let o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o);return new R(o,r,o,r)}},Qpe=class extends T2{_move(e,t,n,o,r){return AN.moveWordPartLeft(e,t,n,r)}},A9e=class extends Qpe{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};ii.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");v9e=class extends Qpe{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};ii.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");Gpe=class extends T2{_move(e,t,n,o,r){return AN.moveWordPartRight(e,t,n)}},y9e=class extends Gpe{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},w9e=class extends Gpe{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:V.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};Qe(new g9e);Qe(new b9e);Qe(new A9e);Qe(new v9e);Qe(new y9e);Qe(new w9e)});var qpe,g_t=D(()=>{Td();de();Jt();f3();Be();qpe=class extends H{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=yu.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(this.editor.isSimpleWidget?t=new $r(y("editor.simple.readonly","Cannot edit in read-only input")):t=new $r(y("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};St(qpe.ID,qpe,2)});var A_t=la(gQ=>{Wt();In();KFe();Gg();Hi();q3();de();et();var b0i=gQ&&gQ.__decorate||function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},b_t=gQ&&gQ.__param||function(i,e){return function(t,n){e(t,n,i)}},x9e=class extends H{constructor(e,t,n){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=n,this._currentModel=Ut(this,void 0);let o=gs("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),r=gs("_textModel.onDidChangeContent",Ee.debounce(s=>this._textModel.onDidChangeContent(s),()=>{},100));this._register(es(async(s,a)=>{o.read(s),r.read(s);let l=a.add(new oce),c=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(c,void 0)}))}getBreadcrumbItems(e,t){let n=this._currentModel.read(t);if(!n)return[];let o=n.asListOfDocumentSymbols().filter(r=>e.contains(r.range.startLineNumber)&&!e.contains(r.range.endLineNumber));return o.sort(See(pa(r=>r.range.endLineNumber-r.range.startLineNumber,vd))),o.map(r=>({name:r.name,kind:r.kind,startLineNumber:r.range.startLineNumber}))}};x9e=b0i([b_t(1,Me),b_t(2,FC)],x9e);KB.setBreadcrumbsSourceFactory((i,e)=>e.createInstance(x9e,i))});var eRo,TRo,v_t=D(()=>{WW();$W();XAt();$At();tvt();nvt();ovt();Avt();jvt();Kvt();i1t();s1t();l1t();o3e();c1t();h1t();p1t();b1t();k3e();ghe();owt();swt();awt();Gwt();yue();Rde();n8e();p8e();fxt();bxt();Axt();eRo=ae(wxt());xxt();Txt();Nxt();Oxt();Pxt();Uxt();nCt();dCt();gCt();yCt();CCt();SCt();ICt();LCt();RCt();Ij();GCt();jhe();YCt();KCt();JCt();a_t();u_t();p_t();m9e();m_t();g_t();TRo=ae(A_t());Gy();TU()});var y_t=D(()=>{});var Ype,C9e,w_t=D(()=>{y_t();Ye();de();Jt();wi();Ype=class extends H{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,Ou&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(92);!this.widget&&e?this.widget=new C9e(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}},C9e=class i extends H{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(ce(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(ce(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};St(Ype.ID,Ype,3)});var x_t=D(()=>{});var __t=la(AQ=>{x_t();Ye();Wr();de();Jt();ro();AL();$O();Il();cN();Gy();var A0i=AQ&&AQ.__decorate||function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},C_t=AQ&&AQ.__param||function(i,e){return function(t,n){e(t,n,i)}},_9e,bQ=class extends H{static{_9e=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(_9e.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(o=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(o=>this.stop())),this._register(Gn.onDidChange(o=>this.stop())),this._register(this._editor.onKeyUp(o=>o.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new E9e(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};bQ=_9e=A0i([C_t(1,hu),C_t(2,on)],bQ);var S9e=class extends Pe{constructor(){super({id:"editor.action.inspectTokens",label:sne.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){bQ.get(t)?.launch()}};function v0i(i){let e="";for(let t=0,n=i.length;tUy,tokenize:(o,r,s)=>ZO(e,s),tokenizeEncoded:(o,r,s)=>ME(n,s)}}var E9e=class i extends H{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=y0i(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let o=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){o=l;break}let r=this._model.getLineContent(e.lineNumber),s="";if(n{Be();fa();de();Xo();KL();gf();w0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},S_t=function(i,e){return function(t,n){e(t,n,i)}},Kpe=class{static{vQ=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Qi.as(Wg.Quickaccess)}provide(e){let t=new se;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let o=this.registry.getQuickAccessProvider(n.substr(vQ.PREFIX.length));o&&o.prefix&&o.prefix!==vQ.PREFIX&&this.quickInputService.quickAccess.show(o.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==vQ.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,o=n||"\u2026";return{prefix:n,label:o,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:y("helpPickAriaLabel","{0}, {1}",o,t.description),description:t.description}})}};Kpe=vQ=w0i([S_t(0,Pa),S_t(1,Xt)],Kpe)});var D_t=D(()=>{fa();KL();Gy();E_t();Qi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:Kpe,prefix:"",helpEntries:[{description:ane.helpQuickAccessActionLabel}]})});var x4,D9e=D(()=>{H_();de();ZB();ol();Am();io();Zl();x4=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,n){let o=new se;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r=o.add(new Vn);return r.value=this.doProvide(e,t,n),o.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),o}doProvide(e,t,n){let o=new se,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let s={editor:r},a=Uce(r);if(a){let l=r.saveViewState()??void 0;o.add(a.onDidChangeCursorPosition(()=>{l=r.saveViewState()??void 0})),s.restoreViewState=()=>{l&&r===this.activeTextEditorControl&&r.restoreViewState(l)},o.add(zf(t.onCancellationRequested)(()=>s.restoreViewState?.()))}o.add(He(()=>this.clearDecorations(r))),o.add(this.provideWithTextEditor(s,e,t,n))}else o.add(this.provideWithoutTextEditor(e,t));return o}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&kd(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){return lU(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let o=[];this.rangeHighlightDecorationId&&(o.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),o.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Io(toe),position:kc.Full}}}],[s,a]=n.deltaDecorations(o,r);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var Jpe,T_t=D(()=>{de();ZB();D9e();Be();Jpe=class i extends x4{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=y("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,H.None}provideWithTextEditor(e,t,n){let o=e.editor,r=new se;r.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(o,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(o,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(o,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(o,l.lineNumber)){this.clearDecorations(o);return}let u=this.toRange(l.lineNumber,l.column);o.revealRangeInCenter(u,0),this.addDecorations(o,u)};s(),r.add(t.onDidChangeValue(()=>s()));let a=Uce(o);return a&&a.getOptions().get(68).renderType===2&&(a.updateOptions({lineNumbers:"on"}),r.add(He(()=>a.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),o=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:o+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?y("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):y("gotoLineLabel","Go to line {0}.",t);let o=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?y("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",o.lineNumber,o.column,r):y("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",o.lineNumber,o.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let o=this.getModel(e);if(!o)return!1;let r={lineNumber:t,column:n};return o.validatePosition(r).equals(r)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}});var x0i,C0i,yQ,Xpe,k_t=D(()=>{T_t();fa();KL();hs();Gy();et();Jt();An();gf();x0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},C0i=function(i,e){return function(t,n){e(t,n,i)}},yQ=class extends Jpe{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Ee.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};yQ=x0i([C0i(0,ei)],yQ);Xpe=class i extends Pe{static{this.ID="editor.action.gotoLine"}constructor(){super({id:i.ID,label:dH.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Pa).quickAccess.show(yQ.PREFIX)}};Ce(Xpe);Qi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:yQ,prefix:yQ.PREFIX,helpEntries:[{description:dH.gotoLineActionLabel,commandId:Xpe.ID}]})});function $pe(i,e,t=0,n=0){let o=e;return o.values&&o.values.length>1?_0i(i,o.values,t,n):M_t(i,e,t,n)}function _0i(i,e,t,n){let o=0,r=[];for(let s of e){let[a,l]=M_t(i,s,t,n);if(typeof a!="number")return N_t;o+=a,r.push(...l)}return[o,S0i(r)]}function M_t(i,e,t,n){let o=Hy(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],kE(o)]:N_t}function S0i(i){let e=i.sort((o,r)=>o.start-r.start),t=[],n;for(let o of e)!n||!E0i(n,o)?(n=o,t.push(o)):(n.start=Math.min(n.start,o.start),n.end=Math.max(n.end,o.end));return t}function E0i(i,e){return!(i.end=0,s=I_t(i),a,l=i.split(R_t);if(l.length>1)for(let c of l){let u=I_t(c),{pathNormalized:d,normalized:h,normalizedLowercase:f}=L_t(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:f,expectContiguousMatch:u}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:r,expectContiguousMatch:s}}function L_t(i){let e;Fo?e=i.replace(/\//g,Vf):e=i.replace(/\\/g,Vf);let t=eot(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function T9e(i){return Array.isArray(i)?Zpe(i.map(e=>e.original).join(R_t)):Zpe(i.original)}var N_t,zFo,R_t,F_t=D(()=>{Rg();eA();wi();Rt();N_t=[void 0,[]];zFo=Object.freeze({score:0});R_t=" "});var D0i,O_t,eme,jD,k9e,I9e,P_t=D(()=>{Gt();sn();oo();ko();F_t();de();Rt();Ue();ro();q3();D9e();Be();Hi();lp();D0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},O_t=function(i,e){return function(t,n){e(t,n,i)}},jD=class extends x4{static{eme=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,y("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),H.None}provideWithTextEditor(e,t,n,o){let r=e.editor,s=this.getModel(r);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,n,o):this.doProvideWithoutEditorSymbols(e,s,t,n):H.None}doProvideWithoutEditorSymbols(e,t,n,o){let r=new se;return this.provideLabelPick(n,y("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,r)||o.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,o)))(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new em,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),n.complete(!0))}));return t.add(He(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,o,r){let s=e.editor,a=new se;a.add(n.onDidAccept(d=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:d.inBackground}),r?.handleAccept?.(h),d.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:d})=>{d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,o),c,u=async d=>{c?.dispose(!0),n.busy=!1,c=new Mi(o),n.busy=!0;try{let h=Zpe(n.value.substr(eme.PREFIX.length).trim()),f=await this.doGetSymbolPicks(l,h,void 0,c.token,t);if(o.isCancellationRequested)return;if(f.length>0){if(n.items=f,d&&h.original.length===0){let p=Rx(f,g=>!!(g.type!=="separator"&&g.range&&R.containsPosition(g.range.decoration,d)));p&&(n.activeItems=[p])}}else h.original.length>0?this.provideLabelPick(n,y("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,y("noSymbolResults","No editor symbols"))}finally{o.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>u(void 0))),u(s.getSelection()?.getPosition()),a.add(n.onDidChangeActive(()=>{let[d]=n.activeItems;d&&d.range&&(s.revealRangeInCenter(d.range.selection,0),this.addDecorations(s,d.range.decoration))})),a}async doGetSymbolPicks(e,t,n,o,r){let s=await e;if(o.isCancellationRequested)return[];let a=t.original.indexOf(eme.SCOPE_PREFIX)===0,l=a?1:0,c,u;t.values&&t.values.length>1?(c=T9e(t.values[0]),u=T9e(t.values.slice(1))):c=t;let d,h=this.options?.openSideBySideDirection?.();h&&(d=[{iconClass:h==="right"?ut.asClassName(De.splitHorizontal):ut.asClassName(De.splitVertical),tooltip:h==="right"?y("openToSide","Open to the Side"):y("openToBottom","Open to the Bottom")}]);let f=[];for(let A=0;Al){let z=!1;if(c!==t&&([I,T]=$pe(C,{...t,values:void 0},l,_),typeof I=="number"&&(z=!0)),typeof I!="number"&&([I,T]=$pe(C,c,l,_),typeof I!="number"))continue;if(!z&&u){if(E&&u.original.length>0&&([N,L]=$pe(E,u)),typeof N!="number")continue;typeof I=="number"&&(I+=N)}}let B=v.tags&&v.tags.indexOf(1)>=0;f.push({index:A,kind:v.kind,score:I,label:C,ariaLabel:EYe(v.name,v.kind),description:E,highlights:B?void 0:{label:T,description:L},range:{selection:R.collapseToStart(v.selectionRange),decoration:v.range},uri:r.uri,symbolName:w,strikethrough:B,buttons:d})}let p=f.sort((A,v)=>a?this.compareByKindAndScore(A,v):this.compareByScore(A,v)),g=[];if(a){let C=function(){v&&typeof A=="number"&&w>0&&(v.label=gg(I9e[A]||k9e,w))},A,v,w=0;for(let _ of p)A!==_.kind?(C(),A=_.kind,w=1,v={type:"separator"},g.push(v)):w++,g.push(_);C()}else p.length>0&&(g=[{label:y("symbols","symbols ({0})",f.length),type:"separator"},...p]);return g}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){let n=I9e[e.kind]||k9e,o=I9e[t.kind]||k9e,r=n.localeCompare(o);return r===0?this.compareByScore(e,t):r}async getDocumentSymbols(e,t){let n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}};jD=eme=D0i([O_t(0,Me),O_t(1,FC)],jD);k9e=y("property","properties ({0})"),I9e={5:y("method","methods ({0})"),11:y("function","functions ({0})"),8:y("_constructor","constructors ({0})"),12:y("variable","variables ({0})"),4:y("class","classes ({0})"),22:y("struct","structs ({0})"),23:y("event","events ({0})"),24:y("operator","operators ({0})"),10:y("interface","interfaces ({0})"),2:y("namespace","namespaces ({0})"),3:y("package","packages ({0})"),25:y("typeParameter","type parameters ({0})"),1:y("modules","modules ({0})"),6:y("property","properties ({0})"),9:y("enum","enumerations ({0})"),21:y("enumMember","enumeration members ({0})"),14:y("string","strings ({0})"),0:y("file","files ({0})"),17:y("array","arrays ({0})"),15:y("number","numbers ({0})"),16:y("boolean","booleans ({0})"),18:y("object","objects ({0})"),19:y("key","keys ({0})"),7:y("field","fields ({0})"),13:y("constant","constants ({0})")}});var T0i,L9e,N9e,tme,B_t=D(()=>{TU();Iue();P_t();fa();KL();hs();Gy();et();Jt();An();gf();q3();Hi();T0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},L9e=function(i,e){return function(t,n){e(t,n,i)}},N9e=class extends jD{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Ee.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};N9e=T0i([L9e(0,ei),L9e(1,Me),L9e(2,FC)],N9e);tme=class i extends Pe{static{this.ID="editor.action.quickOutline"}constructor(){super({id:i.ID,label:aP.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:V.hasDocumentSymbolProvider,kbOpts:{kbExpr:V.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Pa).quickAccess.show(jD.PREFIX,{itemActivation:xm.NONE})}};Ce(tme);Qi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:N9e,prefix:jD.PREFIX,helpEntries:[{description:aP.quickOutlineActionLabel,prefix:jD.PREFIX,commandId:tme.ID},{description:aP.quickOutlineByCategoryActionLabel,prefix:jD.PREFIX_BY_CATEGORY}]})});function k0i(i){let e=new Map;for(let t of i)e.set(t,(e.get(t)??0)+1);return e}function z_t(i){let e=i.slice(0);e.sort((n,o)=>o.score-n.score);let t=e[0]?.score??0;if(t>0)for(let n of e)n.score/=t;return e}var ime,V_t=D(()=>{ime=class i{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let n=this.computeEmbedding(e),o=new Map,r=[];for(let[s,a]of this.documents){if(t.isCancellationRequested)return[];for(let l of a.chunks){let c=this.computeSimilarityScore(l,n,o);c>0&&r.push({key:s,score:c})}}return r}static termFrequencies(e){return k0i(i.splitTerms(e))}static*splitTerms(e){let t=n=>n.toLowerCase();for(let[n]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(n);let o=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(o.length>1)for(let r of o)r.length>2&&/\p{Letter}{3,}/gu.test(r)&&(yield t(r))}}updateDocuments(e){for(let{key:t}of e)this.deleteDocument(t);for(let t of e){let n=[];for(let o of t.textChunks){let r=i.termFrequencies(o);for(let s of r.keys())this.chunkOccurrences.set(s,(this.chunkOccurrences.get(s)??0)+1);n.push({text:o,tf:r})}this.chunkCount+=n.length,this.documents.set(t.key,{chunks:n})}return this}deleteDocument(e){let t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(let n of t.chunks)for(let o of n.tf.keys()){let r=this.chunkOccurrences.get(o);if(typeof r=="number"){let s=r-1;s<=0?this.chunkOccurrences.delete(o):this.chunkOccurrences.set(o,s)}}}}computeSimilarityScore(e,t,n){let o=0;for(let[r,s]of Object.entries(t)){let a=e.tf.get(r);if(!a)continue;let l=n.get(r);typeof l!="number"&&(l=this.computeIdf(r),n.set(r,l));let c=a*l;o+=c*s}return o}computeEmbedding(e){let t=i.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){let t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){let t=Object.create(null);for(let[n,o]of e){let r=this.computeIdf(n);r>0&&(t[n]=o*r)}return t}}});function M9e(i){return Array.isArray(i.items)}function H_t(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var C4,nme,W_t=D(()=>{Gt();sn();de();gn();(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(C4||(C4={}));nme=class extends H{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){let o=new se;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r,s=o.add(new Vn),a=async()=>{let c=s.value=new se;r?.dispose(!0),e.busy=!1,r=new Mi(t);let u=r.token,d=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(d=d.trim());let h=this._getPicks(d,c,u,n),f=(g,A)=>{let v,w;if(M9e(g)?(v=g.items,w=g.active):v=g,v.length===0){if(A)return!1;(d.length>0||e.hideInput)&&this.options?.noResultsPick&&(K_(this.options.noResultsPick)?v=[this.options.noResultsPick(d)]:v=[this.options.noResultsPick])}return e.items=v,w&&(e.activeItems=[w]),!0},p=async g=>{let A=!1,v=!1;await Promise.all([(async()=>{typeof g.mergeDelay=="number"&&(await oh(g.mergeDelay),u.isCancellationRequested)||v||(A=f(g.picks,!0))})(),(async()=>{e.busy=!0;try{let w=await g.additionalPicks;if(u.isCancellationRequested)return;let C,_;M9e(g.picks)?(C=g.picks.items,_=g.picks.active):C=g.picks;let E,I;if(M9e(w)?(E=w.items,I=w.active):E=w,E.length>0||!A){let T;if(!_&&!I){let N=e.activeItems[0];N&&C.indexOf(N)!==-1&&(T=N)}f({items:[...C,...E],active:_||I||T})}}finally{u.isCancellationRequested||(e.busy=!1),v=!0}})()])};if(h!==null)if(H_t(h))await p(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{let g=await h;if(u.isCancellationRequested)return;H_t(g)?await p(g):f(g)}finally{u.isCancellationRequested||(e.busy=!1)}}};o.add(e.onDidChangeValue(()=>a())),a(),o.add(e.onDidAccept(c=>{if(n?.handleAccept){c.inBackground||e.hide(),n.handleAccept?.(e.activeItems[0]);return}let[u]=e.selectedItems;typeof u?.accept=="function"&&(c.inBackground||e.hide(),u.accept(e.keyMods,c))}));let l=async(c,u)=>{if(typeof u.trigger!="function")return;let d=u.buttons?.indexOf(c)??-1;if(d>=0){let h=u.trigger(d,e.keyMods),f=typeof h=="number"?h:await h;if(t.isCancellationRequested)return;switch(f){case C4.NO_ACTION:break;case C4.CLOSE_PICKER:e.hide();break;case C4.REFRESH_PICKER:a();break;case C4.REMOVE_ITEM:{let p=e.items.indexOf(u);if(p!==-1){let g=e.items.slice(),A=g.splice(p,1),v=e.activeItems.filter(C=>C!==A[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=g,v&&(e.activeItems=v),e.keepScrollPosition=w}break}}}};return o.add(e.onDidTriggerItemButton(({button:c,item:u})=>l(c,u))),o.add(e.onDidTriggerSeparatorButton(({button:c,separator:u})=>l(c,u))),o}}});var U_t,QD,I2,za,ome,R9e,j_t=D(()=>{nPe();Tt();Rg();H_();de();Xl();V_t();Be();to();ao();zO();ht();Xo();ch();W_t();VA();lh();U_t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},QD=function(i,e){return function(t,n){e(t,n,i)}},ome=class extends nme{static{I2=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=Iie(CL,Ect,Kke)}constructor(e,t,n,o,r,s){super(I2.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=o,this.telemetryService=r,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(R9e)),this.options=e}async _getPicks(e,t,n,o){let r=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];let s=zf(()=>{let f=new ime;f.updateDocuments(r.map(g=>({key:g.commandId,textChunks:[this.getTfIdfChunk(g)]})));let p=f.calculateScores(e,n);return z_t(p).filter(g=>g.score>I2.TFIDF_THRESHOLD).slice(0,I2.TFIDF_MAX_RESULTS)}),a=[];for(let f of r){let p=I2.WORD_FILTER(e,f.label)??void 0,g=f.commandAlias?I2.WORD_FILTER(e,f.commandAlias)??void 0:void 0;if(p||g)f.highlights={label:p,detail:this.options.showAlias?g:void 0},a.push(f);else if(e===f.commandId)a.push(f);else if(e.length>=3){let A=s();if(n.isCancellationRequested)return[];let v=A.find(w=>w.key===f.commandId);v&&(f.tfIdfScore=v.score,a.push(f))}}let l=new Map;for(let f of a){let p=l.get(f.label);p?(f.description=f.commandId,p.description=p.commandId):l.set(f.label,f)}a.sort((f,p)=>{if(f.tfIdfScore&&p.tfIdfScore)return f.tfIdfScore===p.tfIdfScore?f.label.localeCompare(p.label):p.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(p.tfIdfScore)return-1;let g=this.commandsHistory.peek(f.commandId),A=this.commandsHistory.peek(p.commandId);if(g&&A)return g>A?-1:1;if(g)return-1;if(A)return 1;if(this.options.suggestedCommandIds){let v=this.options.suggestedCommandIds.has(f.commandId),w=this.options.suggestedCommandIds.has(p.commandId);if(v&&w)return 0;if(v)return-1;if(w)return 1}return f.label.localeCompare(p.label)});let c=[],u=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let f=0;f{let f=await this.getAdditionalCommandPicks(r,a,e,n);if(n.isCancellationRequested)return[];let p=f.map(g=>this.toCommandPick(g,o));return d&&p[0]?.type!=="separator"&&p.unshift({type:"separator",label:y("suggested","similar commands")}),p})()}:c}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),o=n?y("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:o,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(r){Ka(r)||this.dialogService.error(y("canNotRun","Command '{0}' resulted in an error",e.label),p3(r))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let o=e;return t&&t!==e&&(o+=` - ${t}`),n&&n.value!==e&&(o+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),o}};ome=I2=U_t([QD(1,Re),QD(2,Xt),QD(3,Ii),QD(4,rr),QD(5,Ry)],ome);R9e=class extends H{static{za=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,n){super(),this.storageService=e,this.configurationService=t,this.logService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===zE.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=za.getConfiguredCommandHistoryLength(this.configurationService),za.cache&&za.cache.limit!==this.configuredCommandsHistoryLength&&(za.cache.limit=this.configuredCommandsHistoryLength,za.hasChanges=!0))}load(){let e=this.storageService.get(za.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(o){this.logService.error(`[CommandsHistory] invalid data: ${o}`)}let n=za.cache=new Jl(this.configuredCommandsHistoryLength,1);if(t){let o;t.usesLRU?o=t.entries:o=t.entries.sort((r,s)=>r.value-s.value),o.forEach(r=>n.set(r.key,r.value))}za.counter=this.storageService.getNumber(za.PREF_KEY_COUNTER,0,za.counter)}push(e){za.cache&&(za.cache.set(e,za.counter++),za.hasChanges=!0)}peek(e){return za.cache?.peek(e)}saveState(){if(!za.cache||!za.hasChanges)return;let e={usesLRU:!0,entries:[]};za.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(za.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(za.PREF_KEY_COUNTER,za.counter,0,0),za.hasChanges=!1}static getConfiguredCommandHistoryLength(e){let n=e.getValue().workbench?.commandPalette?.history;return typeof n=="number"?n:za.DEFAULT_COMMANDS_HISTORY_LENGTH}};R9e=za=U_t([QD(0,oc),QD(1,Et),QD(2,sr)],R9e)});var rme,Q_t=D(()=>{_L();dLe();j_t();rme=class extends ome{constructor(e,t,n,o,r,s){super(e,t,n,o,r,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions()){let o;n.metadata?.description&&(Cdt(n.metadata.description)?o=n.metadata.description:o={original:n.metadata.description,value:n.metadata.description}),t.push({commandId:n.id,commandAlias:n.alias,commandDescription:o,label:JO(n.label)||n.id})}return t}}});var I0i,_4,wQ,sme,G_t=D(()=>{fa();KL();Gy();hs();Q_t();ht();Xo();to();lh();zO();Jt();An();gf();I0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},_4=function(i,e){return function(t,n){e(t,n,i)}},wQ=class extends rme{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,n,o,r,s){super({showAlias:!1},e,n,o,r,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};wQ=I0i([_4(0,Re),_4(1,ei),_4(2,Xt),_4(3,Ii),_4(4,rr),_4(5,Ry)],wQ);sme=class i extends Pe{static{this.ID="editor.action.quickCommand"}constructor(){super({id:i.ID,label:hH.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:V.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Pa).quickAccess.show(wQ.PREFIX)}};Ce(sme);Qi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:wQ,prefix:wQ.PREFIX,helpEntries:[{description:hH.quickCommandHelp,commandId:sme.ID}]})});var L0i,S4,F9e,q_t=D(()=>{Jt();hs();DBe();ao();Bt();ht();Ic();VA();L0i=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},S4=function(i,e){return function(t,n){e(t,n,i)}},F9e=class extends NC{constructor(e,t,n,o,r,s,a){super(!0,e,t,n,o,r,s,a)}};F9e=L0i([S4(1,Ze),S4(2,ei),S4(3,_n),S4(4,Re),S4(5,oc),S4(6,Et)],F9e);St(NC.ID,F9e,4)});var O9e,Y_t=D(()=>{Jt();cN();Gy();Jb();Z2e();O9e=class extends Pe{constructor(){super({id:"editor.action.toggleHighContrast",label:cne.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(hu),o=n.getColorTheme();ju(o.type)?(n.setTheme(this._originalThemeName||(wy(o.type)?lN:x1)),this._originalThemeName=null):(n.setTheme(wy(o.type)?XE:ZE),this._originalThemeName=o.themeName)}};Ce(O9e)});var EPo,K_t=D(()=>{v_t();w_t();EPo=ae(__t());D_t();k_t();B_t();G_t();q_t();Y_t();jN()});var J_t={};ad(J_t,{CancellationTokenSource:()=>n0t,Emitter:()=>Gce,KeyCode:()=>o0t,KeyMod:()=>r0t,MarkerSeverity:()=>u0t,MarkerTag:()=>d0t,Position:()=>s0t,Range:()=>a0t,Selection:()=>l0t,SelectionDirection:()=>c0t,Token:()=>h0t,Uri:()=>qce,editor:()=>Yg,languages:()=>Kg});var L2=D(()=>{y0t();MOe();K_t()});function eSt(i,e){if(!e)return new ame({languageId:i,schemas:[],formattingOptions:P9e,modeConfiguration:X_t,diagnosticSettings:Z_t,completionSettings:$_t});let{schemas:t,formattingOptions:n,modeConfiguration:o,diagnosticSettings:r,completionSettings:s}=e;return new ame({languageId:i,schemas:t,formattingOptions:{...P9e,...n,prettierConfig:{...P9e.prettierConfig,...n?.prettierConfig}},modeConfiguration:{...X_t,...o},diagnosticSettings:{...Z_t,...r},completionSettings:{...$_t,...s}})}var ame,X_t,P9e,Z_t,$_t,tSt=D(()=>{L2();ame=class{_onDidChange=new Gce;_formattingOptions;_modeConfiguration;_diagnosticSettings;_completionSettings;_schemas=null;_schemasById=Object.create(null);_languageId;_externalFragmentDefinitions;constructor({languageId:e,schemas:t,modeConfiguration:n,formattingOptions:o,diagnosticSettings:r,completionSettings:s}){this._languageId=e,t&&this.setSchemaConfig(t),this._modeConfiguration=n,this._completionSettings=s,this._diagnosticSettings=r,this._formattingOptions=o}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get schemas(){return this._schemas}schemasById(){return this._schemasById}get formattingOptions(){return this._formattingOptions}get diagnosticSettings(){return this._diagnosticSettings}get completionSettings(){return{...this._completionSettings,fillLeafsOnComplete:this._completionSettings.__experimental__fillLeafsOnComplete??this._completionSettings.fillLeafsOnComplete}}get externalFragmentDefinitions(){return this._externalFragmentDefinitions}setSchemaConfig(e){this._schemas=e,this._schemasById=e.reduce((t,n)=>(t[n.uri]=n,t),Object.create(null)),this._onDidChange.fire(this)}setExternalFragmentDefinitions(e){this._externalFragmentDefinitions=e}setModeConfiguration(e){this._modeConfiguration=e,this._onDidChange.fire(this)}setFormattingOptions(e){this._formattingOptions=e,this._onDidChange.fire(this)}setDiagnosticSettings(e){this._diagnosticSettings=e,this._onDidChange.fire(this)}setCompletionSettings(e){this._completionSettings=e,this._onDidChange.fire(this)}};X_t={documentFormattingEdits:!0,documentRangeFormattingEdits:!1,completionItems:!0,hovers:!0,documentSymbols:!1,tokens:!1,colors:!1,foldingRanges:!1,diagnostics:!0,selectionRanges:!1},P9e={prettierConfig:{tabWidth:2}},Z_t={jsonDiagnosticSettings:{schemaValidation:"error"}},$_t={__experimental__fillLeafsOnComplete:!1}});var B9e=D(()=>{});var iSt,z9e,nSt,lme,uv,ac,cme,oSt,V9e,rSt,sSt,aSt,lSt,H9e,cSt,uSt,dSt,ume,E4,D4,dme,N2,hSt,W9e,U9e,j9e,Q9e,G9e,fSt,pSt,mSt,q9e,gSt,bSt,Y9e,M2,ASt,hme,vSt,ySt,K9e,wSt,xSt,CSt,_St,fme,SSt,ESt,DSt,TSt,kSt,ISt,LSt,NSt,MSt,RSt,FSt,pme,OSt,J9e,PSt,BSt,zSt,VSt,HSt,WSt,USt,jSt,QSt,GSt,qSt,YSt,X9e,Z9e,KSt,$9e,JSt,XSt,ZSt,$St,eEt,tEt,iEt,e7e,Oe,t7e=D(()=>{"use strict";(function(i){function e(t){return typeof t=="string"}i.is=e})(iSt||(iSt={}));(function(i){function e(t){return typeof t=="string"}i.is=e})(z9e||(z9e={}));(function(i){i.MIN_VALUE=-2147483648,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(nSt||(nSt={}));(function(i){i.MIN_VALUE=0,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(lme||(lme={}));(function(i){function e(n,o){return n===Number.MAX_VALUE&&(n=lme.MAX_VALUE),o===Number.MAX_VALUE&&(o=lme.MAX_VALUE),{line:n,character:o}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&Oe.uinteger(o.line)&&Oe.uinteger(o.character)}i.is=t})(uv||(uv={}));(function(i){function e(n,o,r,s){if(Oe.uinteger(n)&&Oe.uinteger(o)&&Oe.uinteger(r)&&Oe.uinteger(s))return{start:uv.create(n,o),end:uv.create(r,s)};if(uv.is(n)&&uv.is(o))return{start:n,end:o};throw new Error(`Range#create called with invalid arguments[${n}, ${o}, ${r}, ${s}]`)}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&uv.is(o.start)&&uv.is(o.end)}i.is=t})(ac||(ac={}));(function(i){function e(n,o){return{uri:n,range:o}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&ac.is(o.range)&&(Oe.string(o.uri)||Oe.undefined(o.uri))}i.is=t})(cme||(cme={}));(function(i){function e(n,o,r,s){return{targetUri:n,targetRange:o,targetSelectionRange:r,originSelectionRange:s}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&ac.is(o.targetRange)&&Oe.string(o.targetUri)&&ac.is(o.targetSelectionRange)&&(ac.is(o.originSelectionRange)||Oe.undefined(o.originSelectionRange))}i.is=t})(oSt||(oSt={}));(function(i){function e(n,o,r,s){return{red:n,green:o,blue:r,alpha:s}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&Oe.numberRange(o.red,0,1)&&Oe.numberRange(o.green,0,1)&&Oe.numberRange(o.blue,0,1)&&Oe.numberRange(o.alpha,0,1)}i.is=t})(V9e||(V9e={}));(function(i){function e(n,o){return{range:n,color:o}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&ac.is(o.range)&&V9e.is(o.color)}i.is=t})(rSt||(rSt={}));(function(i){function e(n,o,r){return{label:n,textEdit:o,additionalTextEdits:r}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&Oe.string(o.label)&&(Oe.undefined(o.textEdit)||D4.is(o))&&(Oe.undefined(o.additionalTextEdits)||Oe.typedArray(o.additionalTextEdits,D4.is))}i.is=t})(sSt||(sSt={}));(function(i){i.Comment="comment",i.Imports="imports",i.Region="region"})(aSt||(aSt={}));(function(i){function e(n,o,r,s,a,l){let c={startLine:n,endLine:o};return Oe.defined(r)&&(c.startCharacter=r),Oe.defined(s)&&(c.endCharacter=s),Oe.defined(a)&&(c.kind=a),Oe.defined(l)&&(c.collapsedText=l),c}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&Oe.uinteger(o.startLine)&&Oe.uinteger(o.startLine)&&(Oe.undefined(o.startCharacter)||Oe.uinteger(o.startCharacter))&&(Oe.undefined(o.endCharacter)||Oe.uinteger(o.endCharacter))&&(Oe.undefined(o.kind)||Oe.string(o.kind))}i.is=t})(lSt||(lSt={}));(function(i){function e(n,o){return{location:n,message:o}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&cme.is(o.location)&&Oe.string(o.message)}i.is=t})(H9e||(H9e={}));(function(i){i.Error=1,i.Warning=2,i.Information=3,i.Hint=4})(cSt||(cSt={}));(function(i){i.Unnecessary=1,i.Deprecated=2})(uSt||(uSt={}));(function(i){function e(t){let n=t;return Oe.objectLiteral(n)&&Oe.string(n.href)}i.is=e})(dSt||(dSt={}));(function(i){function e(r,s,a,l,c,u){let d={range:r,message:s};return Oe.defined(a)&&(d.severity=a),Oe.defined(l)&&(d.code=l),Oe.defined(c)&&(d.source=c),Oe.defined(u)&&(d.relatedInformation=u),d}i.create=e;function t(r){var s;let a=r;return Oe.defined(a)&&ac.is(a.range)&&(Oe.string(a.message)||M2.is(a.message))&&(Oe.number(a.severity)||Oe.undefined(a.severity))&&(Oe.integer(a.code)||Oe.string(a.code)||Oe.undefined(a.code))&&(Oe.undefined(a.codeDescription)||Oe.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(Oe.string(a.source)||Oe.undefined(a.source))&&(Oe.undefined(a.relatedInformation)||Oe.typedArray(a.relatedInformation,H9e.is))}i.is=t;function n(r){return Oe.string(r.message)}i.is3_17=n;function o(r){if(Oe.string(r.message))return r.message;if(M2.is(r.message))return r.message.value;throw new Error(`Unknown message type ${typeof r.message}`)}i.getMessageString=o})(ume||(ume={}));(function(i){function e(n,o,...r){let s={title:n,command:o};return Oe.defined(r)&&r.length>0&&(s.arguments=r),s}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.string(o.title)&&(o.tooltip===void 0||Oe.string(o.tooltip))&&Oe.string(o.command)}i.is=t})(E4||(E4={}));(function(i){function e(r,s){return{range:r,newText:s}}i.replace=e;function t(r,s){return{range:{start:r,end:r},newText:s}}i.insert=t;function n(r){return{range:r,newText:""}}i.del=n;function o(r){let s=r;return Oe.objectLiteral(s)&&Oe.string(s.newText)&&ac.is(s.range)}i.is=o})(D4||(D4={}));(function(i){function e(n,o,r){let s={label:n};return o!==void 0&&(s.needsConfirmation=o),r!==void 0&&(s.description=r),s}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&Oe.string(o.label)&&(Oe.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(Oe.string(o.description)||o.description===void 0)}i.is=t})(dme||(dme={}));(function(i){function e(t){let n=t;return Oe.string(n)}i.is=e})(N2||(N2={}));(function(i){function e(r,s,a){return{range:r,newText:s,annotationId:a}}i.replace=e;function t(r,s,a){return{range:{start:r,end:r},newText:s,annotationId:a}}i.insert=t;function n(r,s){return{range:r,newText:"",annotationId:s}}i.del=n;function o(r){let s=r;return D4.is(s)&&(dme.is(s.annotationId)||N2.is(s.annotationId))}i.is=o})(hSt||(hSt={}));(function(i){function e(n,o){return{textDocument:n,edits:o}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&q9e.is(o.textDocument)&&Array.isArray(o.edits)}i.is=t})(W9e||(W9e={}));(function(i){function e(n,o,r){let s={kind:"create",uri:n};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),r!==void 0&&(s.annotationId=r),s}i.create=e;function t(n){let o=n;return o&&o.kind==="create"&&Oe.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||Oe.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Oe.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||N2.is(o.annotationId))}i.is=t})(U9e||(U9e={}));(function(i){function e(n,o,r,s){let a={kind:"rename",oldUri:n,newUri:o};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(a.options=r),s!==void 0&&(a.annotationId=s),a}i.create=e;function t(n){let o=n;return o&&o.kind==="rename"&&Oe.string(o.oldUri)&&Oe.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||Oe.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Oe.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||N2.is(o.annotationId))}i.is=t})(j9e||(j9e={}));(function(i){function e(n,o,r){let s={kind:"delete",uri:n};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),r!==void 0&&(s.annotationId=r),s}i.create=e;function t(n){let o=n;return o&&o.kind==="delete"&&Oe.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||Oe.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||Oe.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||N2.is(o.annotationId))}i.is=t})(Q9e||(Q9e={}));(function(i){function e(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(o=>Oe.string(o.kind)?U9e.is(o)||j9e.is(o)||Q9e.is(o):W9e.is(o)))}i.is=e})(G9e||(G9e={}));(function(i){function e(t){let n=t;return Oe.objectLiteral(n)&&ac.is(n.range)&&$9e.isSnippet(n.snippet)&&(n.annotationId===void 0||dme.is(n.annotationId)||N2.is(n.annotationId))}i.is=e})(fSt||(fSt={}));(function(i){function e(n){return{uri:n}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.string(o.uri)}i.is=t})(pSt||(pSt={}));(function(i){function e(n,o){return{uri:n,version:o}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.string(o.uri)&&Oe.integer(o.version)}i.is=t})(mSt||(mSt={}));(function(i){function e(n,o){return{uri:n,version:o}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.string(o.uri)&&(o.version===null||Oe.integer(o.version))}i.is=t})(q9e||(q9e={}));(function(i){i.ABAP="abap",i.WindowsBat="bat",i.BibTeX="bibtex",i.Clojure="clojure",i.Coffeescript="coffeescript",i.C="c",i.CPP="cpp",i.CSharp="csharp",i.CSS="css",i.D="d",i.Delphi="pascal",i.Diff="diff",i.Dart="dart",i.Dockerfile="dockerfile",i.Elixir="elixir",i.Erlang="erlang",i.FSharp="fsharp",i.GitCommit="git-commit",i.GitRebase="git-rebase",i.Go="go",i.Groovy="groovy",i.Handlebars="handlebars",i.Haskell="haskell",i.HTML="html",i.Ini="ini",i.Java="java",i.JavaScript="javascript",i.JavaScriptReact="javascriptreact",i.JSON="json",i.LaTeX="latex",i.Less="less",i.Lua="lua",i.Makefile="makefile",i.Markdown="markdown",i.ObjectiveC="objective-c",i.ObjectiveCPP="objective-cpp",i.Pascal="pascal",i.Perl="perl",i.Perl6="perl6",i.PHP="php",i.Plaintext="plaintext",i.Powershell="powershell",i.Pug="jade",i.Python="python",i.R="r",i.Razor="razor",i.Ruby="ruby",i.Rust="rust",i.SCSS="scss",i.SASS="sass",i.Scala="scala",i.ShaderLab="shaderlab",i.ShellScript="shellscript",i.SQL="sql",i.Swift="swift",i.TypeScript="typescript",i.TypeScriptReact="typescriptreact",i.TeX="tex",i.VisualBasic="vb",i.XML="xml",i.XSL="xsl",i.YAML="yaml"})(gSt||(gSt={}));(function(i){function e(n,o,r,s){return{uri:n,languageId:o,version:r,text:s}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.string(o.uri)&&Oe.string(o.languageId)&&Oe.integer(o.version)&&Oe.string(o.text)}i.is=t})(bSt||(bSt={}));(function(i){i.PlainText="plaintext",i.Markdown="markdown";function e(t){let n=t;return n===i.PlainText||n===i.Markdown}i.is=e})(Y9e||(Y9e={}));(function(i){function e(t){let n=t;return Oe.objectLiteral(t)&&Y9e.is(n.kind)&&Oe.string(n.value)}i.is=e})(M2||(M2={}));(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(ASt||(ASt={}));(function(i){i.PlainText=1,i.Snippet=2})(hme||(hme={}));(function(i){i.Deprecated=1})(vSt||(vSt={}));(function(i){function e(n,o,r){return{newText:n,insert:o,replace:r}}i.create=e;function t(n){let o=n;return o&&Oe.string(o.newText)&&ac.is(o.insert)&&ac.is(o.replace)}i.is=t})(ySt||(ySt={}));(function(i){i.asIs=1,i.adjustIndentation=2})(K9e||(K9e={}));(function(i){i.Replace=1,i.Merge=2})(wSt||(wSt={}));(function(i){function e(t){let n=t;return n&&(Oe.string(n.detail)||n.detail===void 0)&&(Oe.string(n.description)||n.description===void 0)}i.is=e})(xSt||(xSt={}));(function(i){function e(t){return{label:t}}i.create=e})(CSt||(CSt={}));(function(i){function e(t,n){return{items:t||[],isIncomplete:!!n}}i.create=e})(_St||(_St={}));(function(i){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i.fromPlainText=e;function t(n){let o=n;return Oe.string(o)||Oe.objectLiteral(o)&&Oe.string(o.language)&&Oe.string(o.value)}i.is=t})(fme||(fme={}));(function(i){function e(t){let n=t;return!!n&&Oe.objectLiteral(n)&&(M2.is(n.contents)||fme.is(n.contents)||Oe.typedArray(n.contents,fme.is))&&(t.range===void 0||ac.is(t.range))}i.is=e})(SSt||(SSt={}));(function(i){function e(t,n){return n?{label:t,documentation:n}:{label:t}}i.create=e})(ESt||(ESt={}));(function(i){function e(t,n,...o){let r={label:t};return Oe.defined(n)&&(r.documentation=n),Oe.defined(o)?r.parameters=o:r.parameters=[],r}i.create=e})(DSt||(DSt={}));(function(i){i.Text=1,i.Read=2,i.Write=3})(TSt||(TSt={}));(function(i){function e(t,n){let o={range:t};return Oe.number(n)&&(o.kind=n),o}i.create=e})(kSt||(kSt={}));(function(i){i.File=1,i.Module=2,i.Namespace=3,i.Package=4,i.Class=5,i.Method=6,i.Property=7,i.Field=8,i.Constructor=9,i.Enum=10,i.Interface=11,i.Function=12,i.Variable=13,i.Constant=14,i.String=15,i.Number=16,i.Boolean=17,i.Array=18,i.Object=19,i.Key=20,i.Null=21,i.EnumMember=22,i.Struct=23,i.Event=24,i.Operator=25,i.TypeParameter=26})(ISt||(ISt={}));(function(i){i.Deprecated=1})(LSt||(LSt={}));(function(i){function e(t,n,o,r,s){let a={name:t,kind:n,location:{uri:r,range:o}};return s&&(a.containerName=s),a}i.create=e})(NSt||(NSt={}));(function(i){function e(t,n,o,r){return r!==void 0?{name:t,kind:n,location:{uri:o,range:r}}:{name:t,kind:n,location:{uri:o}}}i.create=e})(MSt||(MSt={}));(function(i){function e(n,o,r,s,a,l){let c={name:n,detail:o,kind:r,range:s,selectionRange:a};return l!==void 0&&(c.children=l),c}i.create=e;function t(n){let o=n;return o&&Oe.string(o.name)&&Oe.number(o.kind)&&ac.is(o.range)&&ac.is(o.selectionRange)&&(o.detail===void 0||Oe.string(o.detail))&&(o.deprecated===void 0||Oe.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}i.is=t})(RSt||(RSt={}));(function(i){i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorMove="refactor.move",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll",i.Notebook="notebook"})(FSt||(FSt={}));(function(i){i.Invoked=1,i.Automatic=2})(pme||(pme={}));(function(i){function e(n,o,r){let s={diagnostics:n};return o!=null&&(s.only=o),r!=null&&(s.triggerKind=r),s}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.typedArray(o.diagnostics,ume.is)&&(o.only===void 0||Oe.typedArray(o.only,Oe.string))&&(o.triggerKind===void 0||o.triggerKind===pme.Invoked||o.triggerKind===pme.Automatic)}i.is=t})(OSt||(OSt={}));(function(i){i.LLMGenerated=1;function e(t){return Oe.defined(t)&&t===i.LLMGenerated}i.is=e})(J9e||(J9e={}));(function(i){function e(n,o,r){let s={title:n},a=!0;return typeof o=="string"?(a=!1,s.kind=o):E4.is(o)?s.command=o:s.edit=o,a&&r!==void 0&&(s.kind=r),s}i.create=e;function t(n){let o=n;return o&&Oe.string(o.title)&&(o.diagnostics===void 0||Oe.typedArray(o.diagnostics,ume.is))&&(o.kind===void 0||Oe.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||E4.is(o.command))&&(o.isPreferred===void 0||Oe.boolean(o.isPreferred))&&(o.edit===void 0||G9e.is(o.edit))&&(o.tags===void 0||Oe.typedArray(o.tags,J9e.is))}i.is=t})(PSt||(PSt={}));(function(i){function e(n,o){let r={range:n};return Oe.defined(o)&&(r.data=o),r}i.create=e;function t(n){let o=n;return Oe.defined(o)&&ac.is(o.range)&&(Oe.undefined(o.command)||E4.is(o.command))}i.is=t})(BSt||(BSt={}));(function(i){function e(n,o){return{tabSize:n,insertSpaces:o}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&Oe.uinteger(o.tabSize)&&Oe.boolean(o.insertSpaces)}i.is=t})(zSt||(zSt={}));(function(i){function e(n,o,r){return{range:n,target:o,data:r}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&ac.is(o.range)&&(Oe.undefined(o.target)||Oe.string(o.target))}i.is=t})(VSt||(VSt={}));(function(i){function e(n,o){return{range:n,parent:o}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&ac.is(o.range)&&(o.parent===void 0||i.is(o.parent))}i.is=t})(HSt||(HSt={}));(function(i){i.namespace="namespace",i.type="type",i.class="class",i.enum="enum",i.interface="interface",i.struct="struct",i.typeParameter="typeParameter",i.parameter="parameter",i.variable="variable",i.property="property",i.enumMember="enumMember",i.event="event",i.function="function",i.method="method",i.macro="macro",i.keyword="keyword",i.modifier="modifier",i.comment="comment",i.string="string",i.number="number",i.regexp="regexp",i.operator="operator",i.decorator="decorator",i.label="label"})(WSt||(WSt={}));(function(i){i.declaration="declaration",i.definition="definition",i.readonly="readonly",i.static="static",i.deprecated="deprecated",i.abstract="abstract",i.async="async",i.modification="modification",i.documentation="documentation",i.defaultLibrary="defaultLibrary"})(USt||(USt={}));(function(i){function e(t){let n=t;return Oe.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i.is=e})(jSt||(jSt={}));(function(i){function e(n,o){return{range:n,text:o}}i.create=e;function t(n){let o=n;return o!=null&&ac.is(o.range)&&Oe.string(o.text)}i.is=t})(QSt||(QSt={}));(function(i){function e(n,o,r){return{range:n,variableName:o,caseSensitiveLookup:r}}i.create=e;function t(n){let o=n;return o!=null&&ac.is(o.range)&&Oe.boolean(o.caseSensitiveLookup)&&(Oe.string(o.variableName)||o.variableName===void 0)}i.is=t})(GSt||(GSt={}));(function(i){function e(n,o){return{range:n,expression:o}}i.create=e;function t(n){let o=n;return o!=null&&ac.is(o.range)&&(Oe.string(o.expression)||o.expression===void 0)}i.is=t})(qSt||(qSt={}));(function(i){function e(n,o){return{frameId:n,stoppedLocation:o}}i.create=e;function t(n){let o=n;return Oe.defined(o)&&ac.is(n.stoppedLocation)}i.is=t})(YSt||(YSt={}));(function(i){i.Type=1,i.Parameter=2;function e(t){return t===1||t===2}i.is=e})(X9e||(X9e={}));(function(i){function e(n){return{value:n}}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&(o.tooltip===void 0||Oe.string(o.tooltip)||M2.is(o.tooltip))&&(o.location===void 0||cme.is(o.location))&&(o.command===void 0||E4.is(o.command))}i.is=t})(Z9e||(Z9e={}));(function(i){function e(n,o,r){let s={position:n,label:o};return r!==void 0&&(s.kind=r),s}i.create=e;function t(n){let o=n;return Oe.objectLiteral(o)&&uv.is(o.position)&&(Oe.string(o.label)||Oe.typedArray(o.label,Z9e.is))&&(o.kind===void 0||X9e.is(o.kind))&&o.textEdits===void 0||Oe.typedArray(o.textEdits,D4.is)&&(o.tooltip===void 0||Oe.string(o.tooltip)||M2.is(o.tooltip))&&(o.paddingLeft===void 0||Oe.boolean(o.paddingLeft))&&(o.paddingRight===void 0||Oe.boolean(o.paddingRight))}i.is=t})(KSt||(KSt={}));(function(i){function e(n){return{kind:"snippet",value:n}}i.createSnippet=e;function t(n){let o=n;return Oe.objectLiteral(o)&&o.kind==="snippet"&&Oe.string(o.value)}i.isSnippet=t})($9e||($9e={}));(function(i){function e(t,n,o,r){return{insertText:t,filterText:n,range:o,command:r}}i.create=e})(JSt||(JSt={}));(function(i){function e(t){return{items:t}}i.create=e})(XSt||(XSt={}));(function(i){i.Invoked=1,i.Automatic=2})(ZSt||(ZSt={}));(function(i){function e(t,n){return{range:t,text:n}}i.create=e})($St||($St={}));(function(i){function e(t,n){return{triggerKind:t,selectedCompletionInfo:n}}i.create=e})(eEt||(eEt={}));(function(i){function e(t){let n=t;return Oe.objectLiteral(n)&&z9e.is(n.uri)&&Oe.string(n.name)}i.is=e})(tEt||(tEt={}));(function(i){function e(r,s,a,l){return new e7e(r,s,a,l)}i.create=e;function t(r){let s=r;return!!(Oe.defined(s)&&Oe.string(s.uri)&&(Oe.undefined(s.languageId)||Oe.string(s.languageId))&&Oe.uinteger(s.lineCount)&&Oe.func(s.getText)&&Oe.func(s.positionAt)&&Oe.func(s.offsetAt))}i.is=t;function n(r,s){let a=r.getText(),l=o(s,(u,d)=>{let h=u.range.start.line-d.range.start.line;return h===0?u.range.start.character-d.range.start.character:h}),c=a.length;for(let u=l.length-1;u>=0;u--){let d=l[u],h=r.offsetAt(d.range.start),f=r.offsetAt(d.range.end);if(f<=c)a=a.substring(0,h)+d.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}i.applyEdits=n;function o(r,s){if(r.length<=1)return r;let a=r.length/2|0,l=r.slice(0,a),c=r.slice(a);o(l,s),o(c,s);let u=0,d=0,h=0;for(;u0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,o=t.length;if(o===0)return uv.create(0,e);for(;ne?o=s:n=s+1}let r=n-1;return uv.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],o=e.line+1"u"}i.undefined=n;function o(f){return f===!0||f===!1}i.boolean=o;function r(f){return e.call(f)==="[object String]"}i.string=r;function s(f){return e.call(f)==="[object Number]"}i.number=s;function a(f,p,g){return e.call(f)==="[object Number]"&&p<=f&&f<=g}i.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}i.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}i.uinteger=c;function u(f){return e.call(f)==="[object Function]"}i.func=u;function d(f){return f!==null&&typeof f=="object"}i.objectLiteral=d;function h(f,p){return Array.isArray(f)&&f.every(p)}i.typedArray=h})(Oe||(Oe={}))});var WC,nEt=D(()=>{WC=class{constructor(e){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{let t=this._sourceText.charAt(this._pos);return this._pos++,t},this.eat=t=>{if(this._testNextCharacter(t))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=t=>{let n=this._testNextCharacter(t),o=!1;for(n&&(o=n,this._start=this._pos);n;)this._pos++,n=this._testNextCharacter(t),o=!0;return o},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=t=>{this._pos=t},this.match=(t,n=!0,o=!1)=>{let r=null,s=null;return typeof t=="string"?(s=new RegExp(t,o?"i":"g").test(this._sourceText.slice(this._pos,this._pos+t.length)),r=t):t instanceof RegExp&&(s=this._sourceText.slice(this._pos).match(t),r=s?.[0]),s!=null&&(typeof t=="string"||s instanceof Array&&this._sourceText.startsWith(s[0],this._pos))?(n&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),s):!1},this.backUp=t=>{this._pos-=t},this.column=()=>this._pos,this.indentation=()=>{let t=this._sourceText.match(/\s*/),n=0;if(t&&t.length!==0){let o=t[0],r=0;for(;o.length>r;)o.charCodeAt(r)===9?n+=2:n++,r++}return n},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){let t=this._sourceText.charAt(this._pos),n=!1;return typeof e=="string"?n=t===e:n=e instanceof RegExp?e.test(t):e(t),n}}});function Vs(i){return{ofRule:i}}function fr(i,e){return{ofRule:i,isList:!0,separator:e}}function i7e(i,e){let t=i.match;return i.match=n=>{let o=!1;return t&&(o=t(n)),o&&e.every(r=>r.match&&!r.match(n))},i}function T4(i,e){return{style:e,match:t=>t.kind===i}}function Yn(i,e){return{style:e||"punctuation",match:t=>t.kind==="Punctuation"&&t.value===i}}var n7e=D(()=>{});function Sh(i){return{style:"keyword",match:e=>e.kind==="Name"&&e.value===i}}function Ca(i){return{style:i,match:e=>e.kind==="Name",update(e,t){e.name=t.value}}}function N0i(i){return{style:i,match:e=>e.kind==="Name",update(e,t){var n;!((n=e.prevState)===null||n===void 0)&&n.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}}}var mme,gme,bme,o7e=D(()=>{n7e();ua();mme=i=>i===" "||i===" "||i===","||i===` +`||i==="\r"||i==="\uFEFF"||i==="\xA0",gme={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},bme={Document:[fr("Definition")],Definition(i){switch(i.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return W.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[Sh("query"),Vs(Ca("def")),Vs("VariableDefinitions"),fr("Directive"),"SelectionSet"],Mutation:[Sh("mutation"),Vs(Ca("def")),Vs("VariableDefinitions"),fr("Directive"),"SelectionSet"],Subscription:[Sh("subscription"),Vs(Ca("def")),Vs("VariableDefinitions"),fr("Directive"),"SelectionSet"],VariableDefinitions:[Yn("("),fr("VariableDefinition"),Yn(")")],VariableDefinition:["Variable",Yn(":"),"Type",Vs("DefaultValue")],Variable:[Yn("$","variable"),Ca("variable")],DefaultValue:[Yn("="),"Value"],SelectionSet:[Yn("{"),fr("Selection"),Yn("}")],Selection(i,e){return i.value==="..."?e.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":e.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[Ca("property"),Yn(":"),Ca("qualifier"),Vs("Arguments"),fr("Directive"),Vs("SelectionSet")],Field:[Ca("property"),Vs("Arguments"),fr("Directive"),Vs("SelectionSet")],Arguments:[Yn("("),fr("Argument"),Yn(")")],Argument:[Ca("attribute"),Yn(":"),"Value"],FragmentSpread:[Yn("..."),Ca("def"),fr("Directive")],InlineFragment:[Yn("..."),Vs("TypeCondition"),fr("Directive"),"SelectionSet"],FragmentDefinition:[Sh("fragment"),Vs(i7e(Ca("def"),[Sh("on")])),"TypeCondition",fr("Directive"),"SelectionSet"],TypeCondition:[Sh("on"),"NamedType"],Value(i){switch(i.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(i.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(i.value){case"true":case"false":return"BooleanValue"}return i.value==="null"?"NullValue":"EnumValue"}},NumberValue:[T4("Number","number")],StringValue:[{style:"string",match:i=>i.kind==="String",update(i,e){e.value.startsWith('"""')&&(i.inBlockstring=!e.value.slice(3).endsWith('"""'))}}],BooleanValue:[T4("Name","builtin")],NullValue:[T4("Name","keyword")],EnumValue:[Ca("string-2")],ListValue:[Yn("["),fr("Value"),Yn("]")],ObjectValue:[Yn("{"),fr("ObjectField"),Yn("}")],ObjectField:[Ca("attribute"),Yn(":"),"Value"],Type(i){return i.value==="["?"ListType":"NonNullType"},ListType:[Yn("["),"Type",Yn("]"),Vs(Yn("!"))],NonNullType:["NamedType",Vs(Yn("!"))],NamedType:[N0i("atom")],Directive:[Yn("@","meta"),Ca("meta"),Vs("Arguments")],DirectiveDef:[Sh("directive"),Yn("@","meta"),Ca("meta"),Vs("ArgumentsDef"),Sh("on"),fr("DirectiveLocation",Yn("|"))],InterfaceDef:[Sh("interface"),Ca("atom"),Vs("Implements"),fr("Directive"),Vs("FieldsDef")],Implements:[Sh("implements"),fr("NamedType",Yn("&"))],DirectiveLocation:[Ca("string-2")],SchemaDef:[Sh("schema"),fr("Directive"),Yn("{"),fr("OperationTypeDef"),Yn("}")],OperationTypeDef:[Ca("keyword"),Yn(":"),Ca("atom")],ScalarDef:[Sh("scalar"),Ca("atom"),fr("Directive")],ObjectTypeDef:[Sh("type"),Ca("atom"),Vs("Implements"),fr("Directive"),Vs("FieldsDef")],FieldsDef:[Yn("{"),fr("FieldDef"),Yn("}")],FieldDef:[Ca("property"),Vs("ArgumentsDef"),Yn(":"),"Type",fr("Directive")],ArgumentsDef:[Yn("("),fr("InputValueDef"),Yn(")")],InputValueDef:[Ca("attribute"),Yn(":"),"Type",Vs("DefaultValue"),fr("Directive")],UnionDef:[Sh("union"),Ca("atom"),fr("Directive"),Yn("="),fr("UnionMember",Yn("|"))],UnionMember:["NamedType"],EnumDef:[Sh("enum"),Ca("atom"),fr("Directive"),Vs("EnumValuesDef")],EnumValuesDef:[Yn("{"),fr("EnumValueDef"),Yn("}")],EnumValueDef:[Ca("string-2"),fr("Directive")],InputDef:[Sh("input"),Ca("atom"),fr("Directive"),Vs("InputFieldsDef")],InputFieldsDef:[Yn("{"),fr("InputValueDef"),Yn("}")],ExtendDef:[Sh("extend"),"ExtensionDefinition"],ExtensionDefinition(i){switch(i.value){case"schema":return W.SCHEMA_EXTENSION;case"scalar":return W.SCALAR_TYPE_EXTENSION;case"type":return W.OBJECT_TYPE_EXTENSION;case"interface":return W.INTERFACE_TYPE_EXTENSION;case"union":return W.UNION_TYPE_EXTENSION;case"enum":return W.ENUM_TYPE_EXTENSION;case"input":return W.INPUT_OBJECT_TYPE_EXTENSION}},[W.SCHEMA_EXTENSION]:["SchemaDef"],[W.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[W.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[W.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[W.UNION_TYPE_EXTENSION]:["UnionDef"],[W.ENUM_TYPE_EXTENSION]:["EnumDef"],[W.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]}});function k4(i={eatWhitespace:e=>e.eatWhile(mme),lexRules:gme,parseRules:bme,editorConfig:{}}){return{startState(){let e={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return xQ(i.parseRules,e,W.DOCUMENT),e},token(e,t){return M0i(e,t,i)}}}function M0i(i,e,t){var n;if(e.inBlockstring)return i.match(/.*"""/)?(e.inBlockstring=!1,"string"):(i.skipToEnd(),"string");let{lexRules:o,parseRules:r,eatWhitespace:s,editorConfig:a}=t;if(e.rule&&e.rule.length===0?a7e(e):e.needsAdvance&&(e.needsAdvance=!1,s7e(e,!0)),i.sol()){let u=a?.tabSize||2;e.indentLevel=Math.floor(i.indentation()/u)}if(s(i))return"ws";let l=F0i(o,i);if(!l)return i.match(/\S+/)||i.match(/\s/),xQ(r7e,e,"Invalid"),"invalidchar";if(l.kind==="Comment")return xQ(r7e,e,"Comment"),"comment";let c=oEt({},e);if(l.kind==="Punctuation"){if(/^[{([]/.test(l.value))e.indentLevel!==void 0&&(e.levels=(e.levels||[]).concat(e.indentLevel+1));else if(/^[})\]]/.test(l.value)){let u=e.levels=(e.levels||[]).slice(0,-1);e.indentLevel&&u.length>0&&u.at(-1){o7e();ua();r7e={Invalid:[],Comment:[]}});function l7e(i,e){let t=i.split(` +`),n=k4(),o=n.startState(),r="",s=new WC("");for(let a=0;a{if(!(u!==e.line||a.getCurrentPosition()+t{GD();ua();(function(i){i.TYPE_SYSTEM="TYPE_SYSTEM",i.EXECUTABLE="EXECUTABLE",i.UNKNOWN="UNKNOWN"})(q1||(q1={}));O0i=[W.SCHEMA_DEFINITION,W.OPERATION_TYPE_DEFINITION,W.SCALAR_TYPE_DEFINITION,W.OBJECT_TYPE_DEFINITION,W.INTERFACE_TYPE_DEFINITION,W.UNION_TYPE_DEFINITION,W.ENUM_TYPE_DEFINITION,W.INPUT_OBJECT_TYPE_DEFINITION,W.DIRECTIVE_DEFINITION,W.SCHEMA_EXTENSION,W.SCALAR_TYPE_EXTENSION,W.OBJECT_TYPE_EXTENSION,W.INTERFACE_TYPE_EXTENSION,W.UNION_TYPE_EXTENSION,W.ENUM_TYPE_EXTENSION,W.INPUT_OBJECT_TYPE_EXTENSION],P0i=i=>{let e=q1.UNKNOWN;if(i)try{ca(Zc(i),{enter(t){if(t.kind==="Document"){e=q1.EXECUTABLE;return}return O0i.includes(t.kind)?(e=q1.TYPE_SYSTEM,$v):!1}})}catch{return e}return e}});function Ame(i,e,t){return t===Kw.name&&i.getQueryType()===e?Kw:t===Jw.name&&i.getQueryType()===e?Jw:t===Xw.name&&jh(e)?Xw:"getFields"in e?e.getFields()[t]:null}function B0i(i,e){let t=[],n=i;for(;n?.kind;)t.push(n),n=n.prevState;for(let o=t.length-1;o>=0;o--)e(t[o])}function CQ(i,e){let t,n,o,r,s,a,l,c,u,d,h,f;return B0i(e,p=>{var g,A;switch(p.kind){case _a.QUERY:case"ShortQuery":h=i.getQueryType();break;case _a.MUTATION:h=i.getMutationType();break;case _a.SUBSCRIPTION:h=i.getSubscriptionType();break;case _a.INLINE_FRAGMENT:case _a.FRAGMENT_DEFINITION:p.type&&(h=i.getType(p.type));break;case _a.FIELD:case _a.ALIASED_FIELD:{!h||!p.name?s=null:(s=d?Ame(i,d,p.name):null,h=s?s.type:null);break}case _a.SELECTION_SET:d=Vr(h);break;case _a.DIRECTIVE:o=p.name?i.getDirective(p.name):null;break;case _a.INTERFACE_DEF:p.name&&(c=null,f=new Qp({name:p.name,interfaces:[],fields:{}}));break;case _a.OBJECT_TYPE_DEF:p.name&&(f=null,c=new vc({name:p.name,interfaces:[],fields:{}}));break;case _a.ARGUMENTS:{if(p.prevState)switch(p.prevState.kind){case _a.FIELD:n=s&&s.args;break;case _a.DIRECTIVE:n=o&&o.args;break;case _a.ALIASED_FIELD:{let E=(g=p.prevState)===null||g===void 0?void 0:g.name;if(!E){n=null;break}let I=d?Ame(i,d,E):null;if(!I){n=null;break}n=I.args;break}default:n=null;break}else n=null;break}case _a.ARGUMENT:if(n){for(let E=0;EE.value===p.name):null;break;case _a.LIST_VALUE:let w=Vk(a);a=w instanceof Ks?w.ofType:null;break;case _a.OBJECT_VALUE:let C=Vr(a);l=C instanceof Gp?C:null,u=(A=l?.getFields())!==null&&A!==void 0?A:null;break;case _a.OBJECT_FIELD:let _=p.name&&u?u[p.name]:null;a=_?.type,s=_,h=s?s.type:null;break;case _a.NAMED_TYPE:p.name&&(h=i.getType(p.name));break}}),{argDef:t,argDefs:n,directiveDef:o,enumValue:r,fieldDef:s,inputObjectType:l,inputType:a,objectFieldDefs:u,parentType:d,type:h,interfaceDef:f,objectTypeDef:c}}var cEt=D(()=>{ua();GD()});var z0i,_a,uEt=D(()=>{ua();z0i={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},_a=Object.assign(Object.assign({},W),z0i)});var GD=D(()=>{nEt();o7e();n7e();sEt();lEt();cEt();uEt()});var Ao,u7e=D(()=>{t7e();GD();(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(Ao||(Ao={}))});var _Bo,SBo,hEt=D(()=>{u7e();GD();B9e();t7e();_Bo=[{label:"type",kind:Ao.Function},{label:"interface",kind:Ao.Function},{label:"union",kind:Ao.Function},{label:"input",kind:Ao.Function},{label:"scalar",kind:Ao.Function},{label:"schema",kind:Ao.Function}],SBo=[{label:"query",kind:Ao.Function},{label:"mutation",kind:Ao.Function},{label:"subscription",kind:Ao.Function},{label:"fragment",kind:Ao.Function},{label:"{",kind:Ao.Constructor}]});var pEt=la((DBo,vme)=>{"use strict";function fEt(i,e){if(i!=null)return i;var t=new Error(e!==void 0?e:"Got unexpected "+i);throw t.framesToPop=1,t}vme.exports=fEt;vme.exports.default=fEt;Object.defineProperty(vme.exports,"__esModule",{value:!0})});var d7e,yme,mEt=D(()=>{ua();d7e=ae(pEt()),yme=(i,e)=>{if(!e)return[];let t=new Map,n=new Set;ca(i,{FragmentDefinition(s){t.set(s.name.value,!0)},FragmentSpread(s){n.has(s.name.value)||n.add(s.name.value)}});let o=new Set;for(let s of n)!t.has(s)&&e.has(s)&&o.add((0,d7e.default)(e.get(s)));let r=[];for(let s of o)ca(s,{FragmentSpread(a){!n.has(a.name.value)&&e.get(a.name.value)&&(o.add((0,d7e.default)(e.get(a.name.value))),n.add(a.name.value))}}),t.has(s.name.value)||r.push(s);return r}});var gEt=D(()=>{});var bEt=D(()=>{});var R2,AEt=D(()=>{R2=class{constructor(e,t){this.lessThanOrEqualTo=n=>this.line{});function wme(i,e){let t=Object.create(null);for(let n of e.definitions)if(n.kind==="OperationDefinition"){let{variableDefinitions:o}=n;if(o)for(let{variable:r,type:s}of o){let a=Cs(i,s);a?t[r.name.value]=a:s.kind===W.NAMED_TYPE&&s.name.value==="Float"&&(t[r.name.value]=WR)}}return t}var h7e=D(()=>{ua()});function f7e(i,e){let t=e?wme(e,i):void 0,n=[];return ca(i,{OperationDefinition(o){n.push(o)}}),{variableToType:t,operations:n}}function _Q(i,e){if(e)try{let t=Zc(e);return Object.assign(Object.assign({},f7e(t,i)),{documentAST:t})}catch{}}var yEt=D(()=>{ua();h7e()});var SQ=D(()=>{mEt();gEt();bEt();AEt();vEt();h7e();yEt()});var CEt=D(()=>{SQ()});var EQ,G0i,_Et=D(()=>{GD();SQ();EQ={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},G0i={[EQ.Error]:1,[EQ.Warning]:2,[EQ.Information]:3,[EQ.Hint]:4}});var SEt=D(()=>{SQ()});var EEt=D(()=>{GD()});var DEt=D(()=>{B9e();hEt();CEt();_Et();SEt();EEt()});var DQ=D(()=>{DEt();GD();u7e();SQ()});function TEt(i){return new R2(i.lineNumber-1,i.column-1)}var xme,kEt,Cme=D(()=>{ua();DQ();xk();xme=i=>"getModeId"in i?i.getModeId():i.getLanguageId();kEt=i=>{let{schema:e,documentAST:t,introspectionJSON:n,introspectionJSONString:o,documentString:r,...s}=i;if(e)return{...s,documentString:bF(e)};if(o)return{...s,introspectionJSONString:o};if(r)return{...s,documentString:r};if(n)return{...s,introspectionJSONString:JSON.stringify(n)};if(t){let a=mF(t,s.buildSchemaOptions);return{...s,documentString:bF(a)}}throw new Error("No schema supplied")}});var K0i,_me,IEt=D(()=>{L2();Cme();K0i=120*1e3,_me=class{_defaults;_idleCheckInterval;_lastUsedTime=0;_configChangeListener;_worker=null;_client=null;constructor(e){this._defaults=e,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._configChangeListener=this._defaults.onDidChange(()=>{this._stopWorker()})}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>K0i&&this._stopWorker()}async _getClient(){if(this._lastUsedTime=Date.now(),!this._client&&!this._worker)try{let{languageId:e,formattingOptions:t,schemas:n,externalFragmentDefinitions:o,completionSettings:r}=this._defaults;this._worker=Yg.createWebWorker({moduleId:"monaco-graphql/esm/GraphQLWorker.js",label:e,createData:{languageId:e,formattingOptions:t,languageConfig:{schemas:n?.map(kEt),externalFragmentDefinitions:o,fillLeafsOnComplete:r.__experimental__fillLeafsOnComplete}}}),this._client=this._worker.getProxy()}catch(e){console.error("error loading worker",e)}return this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return await this._worker.withSyncedResources(e),t}}});function J0i(i){return i in LEt?LEt[i]:Sa.Text}function X0i(i){return{range:i.range,kind:J0i(i.kind),label:i.label,insertText:i.insertText??i.label,insertTextRules:i.insertText?Kg.CompletionItemInsertTextRule.InsertAsSnippet:void 0,sortText:i.sortText,filterText:i.filterText,documentation:i.documentation,detail:i.detail,command:i.command}}var Sme,Sa,LEt,Eme,Dme,Tme,NEt=D(()=>{L2();jN();DQ();Cme();Sme=class{defaults;_worker;_disposables=[];_listener=Object.create(null);constructor(e,t){this.defaults=e,this._worker=t,this._worker=t;let n,o=s=>{let a=xme(s);if(a!==this.defaults.languageId)return;let l=s.uri.toString(),c=e.diagnosticSettings.validateVariablesJSON?.[l];n=setTimeout(()=>{this._doValidate(s.uri,a,c)},400),this._listener[l]=s.onDidChangeContent(()=>{clearTimeout(n),n=setTimeout(()=>{this._doValidate(s.uri,a,c)},400)})},r=s=>{Yg.setModelMarkers(s,this.defaults.languageId,[]);let a=s.uri.toString(),l=this._listener[a];l&&(l.dispose(),delete this._listener[a])};this._disposables.push(Yg.onDidCreateModel(o),{dispose(){clearTimeout(n)}},Yg.onWillDisposeModel(s=>{r(s)}),Yg.onDidChangeModelLanguage(s=>{r(s.model),o(s.model)}),{dispose:()=>{for(let s of Object.values(this._listener))s.dispose()}},e.onDidChange(()=>{for(let s of Yg.getModels())xme(s)===this.defaults.languageId&&(r(s),o(s))}));for(let s of Yg.getModels())xme(s)===this.defaults.languageId&&o(s)}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[]}async _doValidate(e,t,n){let o=await this._worker(e);if(!o)return;let r=await o.doValidation(e.toString());if(Yg.setModelMarkers(Yg.getModel(e),t,r),n){if(await Promise.resolve().then(()=>(MOe(),YAt)),!n.length)throw new Error("No variables URI strings provided to validate");let s=await o.doGetVariablesJSONSchema(e.toString());if(!s)return;let a=qce.file(n[0].replace(".json","-schema.json")).toString(),l={uri:a,schema:s,fileMatch:n},c=Kg.json.jsonDefaults.diagnosticsOptions.schemas?.filter(u=>u.uri!==a)||[];Kg.json.jsonDefaults.setDiagnosticsOptions({schemaValidation:"error",validate:!0,...this.defaults.diagnosticSettings.jsonDiagnosticSettings,schemas:[...c,l],enableSchemaRequest:!1})}}},Sa=Kg.CompletionItemKind,LEt={[Ao.Text]:Sa.Text,[Ao.Method]:Sa.Method,[Ao.Function]:Sa.Function,[Ao.Constructor]:Sa.Constructor,[Ao.Field]:Sa.Field,[Ao.Variable]:Sa.Variable,[Ao.Class]:Sa.Class,[Ao.Interface]:Sa.Interface,[Ao.Module]:Sa.Module,[Ao.Property]:Sa.Property,[Ao.Unit]:Sa.Unit,[Ao.Value]:Sa.Value,[Ao.Enum]:Sa.Enum,[Ao.Keyword]:Sa.Keyword,[Ao.Snippet]:Sa.Snippet,[Ao.Color]:Sa.Color,[Ao.File]:Sa.File,[Ao.Reference]:Sa.Reference,[Ao.Folder]:Sa.Folder,[Ao.EnumMember]:Sa.EnumMember,[Ao.Constant]:Sa.Constant,[Ao.Struct]:Sa.Struct,[Ao.Event]:Sa.Event,[Ao.Operator]:Sa.Operator,[Ao.TypeParameter]:Sa.TypeParameter};Eme=class{_worker;constructor(e){this._worker=e,this._worker=e}get triggerCharacters(){return[":","$"," ","(","@"]}async provideCompletionItems(e,t,n,o){try{return{incomplete:!0,suggestions:(await(await this._worker(e.uri)).doComplete(e.uri.toString(),t)).map(X0i)}}catch(r){return console.error("Error fetching completion items",r),{suggestions:[]}}}},Dme=class{_worker;constructor(e){this._worker=e,this._worker=e}async provideDocumentFormattingEdits(e,t,n){let r=await(await this._worker(e.uri)).doFormat(e.uri.toString());return r?[{range:e.getFullModelRange(),text:r}]:[]}},Tme=class{_worker;constructor(e){this._worker=e}async provideHover(e,t,n){let o=e.uri,s=await(await this._worker(e.uri)).doHover(o.toString(),t);return s?{range:s.range,contents:[{value:s.content}]}:{contents:[]}}dispose(){}}});var FEt={};ad(FEt,{setupMode:()=>$0i});function $0i(i){let e=[],t=[],n=new _me(i);e.push(n);let o=(...h)=>{try{return n.getLanguageServiceWorker(...h)}catch{throw new Error("Error fetching graphql language service worker")}};function r(){let{modeConfiguration:h,languageId:f}=i;h.documentFormattingEdits&&t.push(Kg.registerDocumentFormattingEditProvider(f,new Dme(o)))}function s(h){let{modeConfiguration:f,languageId:p}=i;REt(t),f.completionItems&&t.push(Kg.registerCompletionItemProvider(p,new Eme(o))),f.diagnostics&&t.push(new Sme(h,o)),f.hovers&&t.push(Kg.registerHoverProvider(p,new Tme(o))),r()}let{modeConfiguration:a,formattingOptions:l,diagnosticSettings:c,externalFragmentDefinitions:u,schemas:d}=i;return s(i),i.onDidChange(h=>{h.modeConfiguration!==a&&(a=h.modeConfiguration,s(h)),h.formattingOptions!==l&&(l=h.formattingOptions,r()),h.externalFragmentDefinitions!==u&&(u=h.externalFragmentDefinitions,s(h)),h.diagnosticSettings!==c&&(c=h.diagnosticSettings,s(h)),h.schemas!==d&&(d=h.schemas,s(h))}),e.push(MEt(t)),MEt(e)}function MEt(i){return{dispose:()=>REt(i)}}function REt(i){for(;i.length;)i.pop().dispose()}var OEt=D(()=>{L2();IEt();NEt()});function PEt(i){return TQ||(TQ=eSt(m7e,i),Kg.graphql={api:TQ},eAi().then(e=>e.setupMode(TQ))),TQ}function eAi(){return Promise.resolve().then(()=>(OEt(),FEt))}var m7e,TQ,BEt=D(()=>{tSt();L2();m7e="graphql"});var zEt={};ad(zEt,{LANGUAGE_ID:()=>m7e,initializeMode:()=>PEt});var VEt=D(()=>{BEt()});var jEt=la(($3o,UEt)=>{"use strict";UEt.exports=function(e){return typeof e=="object"?e===null:typeof e!="function"}});var A7e=la((e4o,QEt)=>{"use strict";QEt.exports=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}});var YEt=la((t4o,qEt)=>{"use strict";var iAi=A7e();function GEt(i){return iAi(i)===!0&&Object.prototype.toString.call(i)==="[object Object]"}qEt.exports=function(e){var t,n;return!(GEt(e)===!1||(t=e.constructor,typeof t!="function")||(n=t.prototype,GEt(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)}});var $Et=la((i4o,ZEt)=>{"use strict";var{deleteProperty:nAi}=Reflect,oAi=jEt(),KEt=YEt(),JEt=i=>typeof i=="object"&&i!==null||typeof i=="function",rAi=i=>i==="__proto__"||i==="constructor"||i==="prototype",v7e=i=>{if(!oAi(i))throw new TypeError("Object keys must be strings or symbols");if(rAi(i))throw new Error(`Cannot set unsafe key: "${i}"`)},sAi=i=>Array.isArray(i)?i.flat().map(String).join(","):i,aAi=(i,e)=>{if(typeof i!="string"||!e)return i;let t=i+";";return e.arrays!==void 0&&(t+=`arrays=${e.arrays};`),e.separator!==void 0&&(t+=`separator=${e.separator};`),e.split!==void 0&&(t+=`split=${e.split};`),e.merge!==void 0&&(t+=`merge=${e.merge};`),e.preservePaths!==void 0&&(t+=`preservePaths=${e.preservePaths};`),t},lAi=(i,e,t)=>{let n=sAi(e?aAi(i,e):i);v7e(n);let o=F2.cache.get(n)||t();return F2.cache.set(n,o),o},cAi=(i,e={})=>{let t=e.separator||".",n=t==="/"?!1:e.preservePaths;if(typeof i=="string"&&n!==!1&&/\//.test(i))return[i];let o=[],r="",s=a=>{let l;a.trim()!==""&&Number.isInteger(l=Number(a))?o.push(l):o.push(a)};for(let a=0;ae&&typeof e.split=="function"?e.split(i):typeof i=="symbol"?[i]:Array.isArray(i)?i:lAi(i,e,()=>cAi(i,e)),uAi=(i,e,t,n)=>{if(v7e(e),t===void 0)nAi(i,e);else if(n&&n.merge){let o=n.merge==="function"?n.merge:Object.assign;o&&KEt(i[e])&&KEt(t)?i[e]=o(i[e],t):i[e]=t}else i[e]=t;return i},F2=(i,e,t,n)=>{if(!e||!JEt(i))return i;let o=XEt(e,n),r=i;for(let s=0;s{F2.cache=new Map};ZEt.exports=F2});var oDt=la((n4o,nDt)=>{var iDt=A7e();nDt.exports=function(i,e,t){if(iDt(t)||(t={default:t}),!tDt(i))return typeof t.default<"u"?t.default:i;typeof e=="number"&&(e=String(e));let n=Array.isArray(e),o=typeof e=="string",r=t.separator||".",s=t.joinChar||(typeof r=="string"?r:".");if(!o&&!n)return i;if(o&&e in i)return y7e(e,i,t)?i[e]:t.default;let a=n?e:dAi(e,r,t),l=a.length,c=0;do{let u=a[c];for(typeof u=="number"&&(u=String(u));u&&u.slice(-1)==="\\";)u=eDt([u.slice(0,-1),a[++c]||""],s,t);if(u in i){if(!y7e(u,i,t))return t.default;i=i[u]}else{let d=!1,h=c+1;for(;h{"use strict";var xyi=ke();function NTt(i){var e="https://react.dev/errors/"+i;if(1{"use strict";function RTt(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RTt)}catch(i){console.error(i)}}RTt(),FTt.exports=MTt()});var qLt=la(ll=>{"use strict";function JVe(i,e){var t=i.length;i.push(e);e:for(;0>>1,o=i[n];if(0>>1;nBge(a,t))lBge(c,a)?(i[n]=c,i[l]=t,n=l):(i[n]=a,i[s]=t,n=s);else if(lBge(c,t))i[n]=c,i[l]=t,n=l;else break e}}return e}function Bge(i,e){var t=i.sortIndex-e.sortIndex;return t!==0?t:i.id-e.id}ll.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(BLt=performance,ll.unstable_now=function(){return BLt.now()}):(qVe=Date,zLt=qVe.now(),ll.unstable_now=function(){return qVe.now()-zLt});var BLt,qVe,zLt,t_=[],sT=[],kxi=1,I0=null,If=3,XVe=!1,lG=!1,cG=!1,ZVe=!1,WLt=typeof setTimeout=="function"?setTimeout:null,ULt=typeof clearTimeout=="function"?clearTimeout:null,VLt=typeof setImmediate<"u"?setImmediate:null;function zge(i){for(var e=tw(sT);e!==null;){if(e.callback===null)Vge(sT);else if(e.startTime<=i)Vge(sT),e.sortIndex=e.expirationTime,JVe(t_,e);else break;e=tw(sT)}}function $Ve(i){if(cG=!1,zge(i),!lG)if(tw(t_)!==null)lG=!0,a8||(a8=!0,s8());else{var e=tw(sT);e!==null&&eHe($Ve,e.startTime-i)}}var a8=!1,uG=-1,jLt=5,QLt=-1;function GLt(){return ZVe?!0:!(ll.unstable_now()-QLti&&GLt());){var n=I0.callback;if(typeof n=="function"){I0.callback=null,If=I0.priorityLevel;var o=n(I0.expirationTime<=i);if(i=ll.unstable_now(),typeof o=="function"){I0.callback=o,zge(i),e=!0;break t}I0===tw(t_)&&Vge(t_),zge(i)}else Vge(t_);I0=tw(t_)}if(I0!==null)e=!0;else{var r=tw(sT);r!==null&&eHe($Ve,r.startTime-i),e=!1}}break e}finally{I0=null,If=t,XVe=!1}e=void 0}}finally{e?s8():a8=!1}}}var s8;typeof VLt=="function"?s8=function(){VLt(YVe)}:typeof MessageChannel<"u"?(KVe=new MessageChannel,HLt=KVe.port2,KVe.port1.onmessage=YVe,s8=function(){HLt.postMessage(null)}):s8=function(){WLt(YVe,0)};var KVe,HLt;function eHe(i,e){uG=WLt(function(){i(ll.unstable_now())},e)}ll.unstable_IdlePriority=5;ll.unstable_ImmediatePriority=1;ll.unstable_LowPriority=4;ll.unstable_NormalPriority=3;ll.unstable_Profiling=null;ll.unstable_UserBlockingPriority=2;ll.unstable_cancelCallback=function(i){i.callback=null};ll.unstable_forceFrameRate=function(i){0>i||125n?(i.sortIndex=t,JVe(sT,i),tw(t_)===null&&i===tw(sT)&&(cG?(ULt(uG),uG=-1):cG=!0,eHe($Ve,t-n))):(i.sortIndex=o,JVe(t_,i),lG||XVe||(lG=!0,a8||(a8=!0,s8()))),i};ll.unstable_shouldYield=GLt;ll.unstable_wrapCallback=function(i){var e=If;return function(){var t=If;If=e;try{return i.apply(this,arguments)}finally{If=t}}}});var KLt=la((BHo,YLt)=>{"use strict";YLt.exports=qLt()});var aFt=la(d0e=>{"use strict";var ed=KLt(),w2t=ke(),Ixi=mv();function pt(i){var e="https://react.dev/errors/"+i;if(1p8||(i.current=zHe[p8],zHe[p8]=null,p8--)}function Ta(i,e){p8++,zHe[p8]=i.current,i.current=e}var rw=sw(null),OG=sw(null),AT=sw(null),ybe=sw(null);function wbe(i,e){switch(Ta(AT,e),Ta(OG,i),Ta(rw,null),e.nodeType){case 9:case 11:i=(i=e.documentElement)&&(i=i.namespaceURI)?o2t(i):0;break;default:if(i=e.tagName,e=e.namespaceURI)e=o2t(e),i=qRt(e,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}jd(rw),Ta(rw,i)}function N8(){jd(rw),jd(OG),jd(AT)}function VHe(i){i.memoizedState!==null&&Ta(ybe,i);var e=rw.current,t=qRt(e,i.type);e!==t&&(Ta(OG,i),Ta(rw,t))}function xbe(i){OG.current===i&&(jd(rw),jd(OG)),ybe.current===i&&(jd(ybe),qG._currentValue=lM)}var tHe,ZLt;function oM(i){if(tHe===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);tHe=e&&e[1]||"",ZLt=-1)":-1r||l[n]!==c[r]){var u=` -`+l[n].replace(" at new "," at ");return i.displayName&&u.includes("")&&(u=u.replace("",i.displayName)),u}while(1<=n&&0<=r);break}}}finally{MVe=!1,Error.prepareStackTrace=t}return(t=i?i.displayName||i.name:"")?_2(t):""}function HNi(i,e){switch(i.tag){case 26:case 27:case 5:return _2(i.type);case 16:return _2("Lazy");case 13:return i.child!==e&&e!==null?_2("Suspense Fallback"):_2("Suspense");case 19:return _2("SuspenseList");case 0:case 15:return RVe(i.type,!1);case 11:return RVe(i.type.render,!1);case 1:return RVe(i.type,!0);case 31:return _2("Activity");default:return""}}function K2t(i){try{var e="",t=null;do e+=HNi(i,t),t=i,i=i.return;while(i);return e}catch(n){return` +`);for(o=n=0;no||l[n]!==c[o]){var u=` +`+l[n].replace(" at new "," at ");return i.displayName&&u.includes("")&&(u=u.replace("",i.displayName)),u}while(1<=n&&0<=o);break}}}finally{iHe=!1,Error.prepareStackTrace=t}return(t=i?i.displayName||i.name:"")?oM(t):""}function Fxi(i,e){switch(i.tag){case 26:case 27:case 5:return oM(i.type);case 16:return oM("Lazy");case 13:return i.child!==e&&e!==null?oM("Suspense Fallback"):oM("Suspense");case 19:return oM("SuspenseList");case 0:case 15:return nHe(i.type,!1);case 11:return nHe(i.type.render,!1);case 1:return nHe(i.type,!0);case 31:return oM("Activity");default:return""}}function $Lt(i){try{var e="",t=null;do e+=Fxi(i,t),t=i,i=i.return;while(i);return e}catch(n){return` Error generating stack: `+n.message+` -`+n.stack}}var vHe=Object.prototype.hasOwnProperty,lWe=Yu.unstable_scheduleCallback,FVe=Yu.unstable_cancelCallback,WNi=Yu.unstable_shouldYield,UNi=Yu.unstable_requestPaint,Yg=Yu.unstable_now,jNi=Yu.unstable_getCurrentPriorityLevel,_Rt=Yu.unstable_ImmediatePriority,SRt=Yu.unstable_UserBlockingPriority,rge=Yu.unstable_NormalPriority,QNi=Yu.unstable_LowPriority,ERt=Yu.unstable_IdlePriority,GNi=Yu.log,qNi=Yu.unstable_setDisableYieldValue,yQ=null,Kg=null;function UD(i){if(typeof GNi=="function"&&qNi(i),Kg&&typeof Kg.setStrictMode=="function")try{Kg.setStrictMode(yQ,i)}catch{}}var Jg=Math.clz32?Math.clz32:JNi,YNi=Math.log,KNi=Math.LN2;function JNi(i){return i>>>=0,i===0?32:31-(YNi(i)/KNi|0)|0}var Cme=256,_me=262144,Sme=4194304;function S2(i){var e=i&42;if(e!==0)return e;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Ige(i,e,t){var n=i.pendingLanes;if(n===0)return 0;var r=0,o=i.suspendedLanes,s=i.pingedLanes;i=i.warmLanes;var a=n&134217727;return a!==0?(n=a&~o,n!==0?r=S2(n):(s&=a,s!==0?r=S2(s):t||(t=a&~i,t!==0&&(r=S2(t))))):(a=n&~o,a!==0?r=S2(a):s!==0?r=S2(s):t||(t=n&~i,t!==0&&(r=S2(t)))),r===0?0:e!==0&&e!==r&&(e&o)===0&&(o=r&-r,t=e&-e,o>=t||o===32&&(t&4194048)!==0)?e:r}function wQ(i,e){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&e)===0}function XNi(i,e){switch(i){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DRt(){var i=Sme;return Sme<<=1,(Sme&62914560)===0&&(Sme=4194304),i}function OVe(i){for(var e=[],t=0;31>t;t++)e.push(i);return e}function xQ(i,e){i.pendingLanes|=e,e!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ZNi(i,e,t,n,r,o){var s=i.pendingLanes;i.pendingLanes=t,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=t,i.entangledLanes&=t,i.errorRecoveryDisabledLanes&=t,i.shellSuspendCounter=0;var a=i.entanglements,l=i.expirationTimes,c=i.hiddenUpdates;for(t=s&~t;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var r2i=/[\n"\\]/g;function x0(i){return i.replace(r2i,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function wHe(i,e,t,n,r,o,s,a){i.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?i.type=s:i.removeAttribute("type"),e!=null?s==="number"?(e===0&&i.value===""||i.value!=e)&&(i.value=""+A0(e)):i.value!==""+A0(e)&&(i.value=""+A0(e)):s!=="submit"&&s!=="reset"||i.removeAttribute("value"),e!=null?xHe(i,s,A0(e)):t!=null?xHe(i,s,A0(t)):n!=null&&i.removeAttribute("value"),r==null&&o!=null&&(i.defaultChecked=!!o),r!=null&&(i.checked=r&&typeof r!="function"&&typeof r!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?i.name=""+A0(a):i.removeAttribute("name")}function ORt(i,e,t,n,r,o,s,a){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(i.type=o),e!=null||t!=null){if(!(o!=="submit"&&o!=="reset"||e!=null)){yHe(i);return}t=t!=null?""+A0(t):"",e=e!=null?""+A0(e):t,a||e===i.value||(i.value=e),i.defaultValue=e}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,i.checked=a?i.checked:!!n,i.defaultChecked=!!n,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(i.name=s),yHe(i)}function xHe(i,e,t){e==="number"&&oge(i.ownerDocument)===i||i.defaultValue===""+t||(i.defaultValue=""+t)}function F4(i,e,t,n){if(i=i.options,e){e={};for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_He=!1;if(jC)try{b4={},Object.defineProperty(b4,"passive",{get:function(){_He=!0}}),window.addEventListener("test",b4,b4),window.removeEventListener("test",b4,b4)}catch{_He=!1}var b4,jD=null,pWe=null,Wme=null;function HRt(){if(Wme)return Wme;var i,e=pWe,t=e.length,n,r="value"in jD?jD.value:jD.textContent,o=r.length;for(i=0;i=Gj),sMt=" ",aMt=!1;function URt(i,e){switch(i){case"keyup":return N2i.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jRt(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var E4=!1;function R2i(i,e){switch(i){case"compositionend":return jRt(e);case"keypress":return e.which!==32?null:(aMt=!0,sMt);case"textInput":return i=e.data,i===sMt&&aMt?null:i;default:return null}}function F2i(i,e){if(E4)return i==="compositionend"||!gWe&&URt(i,e)?(i=HRt(),Wme=pWe=jD=null,E4=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-i};i=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=dMt(t)}}function YRt(i,e){return i&&e?i===e?!0:i&&i.nodeType===3?!1:e&&e.nodeType===3?YRt(i,e.parentNode):"contains"in i?i.contains(e):i.compareDocumentPosition?!!(i.compareDocumentPosition(e)&16):!1:!1}function KRt(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var e=oge(i.document);e instanceof i.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)i=e.contentWindow;else break;e=oge(i.document)}return e}function bWe(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e&&(e==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||e==="textarea"||i.contentEditable==="true")}var U2i=jC&&"documentMode"in document&&11>=document.documentMode,D4=null,SHe=null,Yj=null,EHe=!1;function fMt(i,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;EHe||D4==null||D4!==oge(n)||(n=D4,"selectionStart"in n&&bWe(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Yj&&lQ(Yj,n)||(Yj=n,n=Cge(SHe,"onSelect"),0>=s,r-=s,z1=1<<32-Jg(e)+r|t<L?(M=T,T=null):M=T.sibling;var z=h(A,T,C[L],_);if(z===null){T===null&&(T=M);break}i&&T&&z.alternate===null&&e(A,T),w=o(z,w,L),I===null?E=z:I.sibling=z,I=z,T=M}if(L===C.length)return t(A,T),ho&&OC(A,L),E;if(T===null){for(;LL?(M=T,T=null):M=T.sibling;var H=h(A,T,z.value,_);if(H===null){T===null&&(T=M);break}i&&T&&H.alternate===null&&e(A,T),w=o(H,w,L),I===null?E=H:I.sibling=H,I=H,T=M}if(z.done)return t(A,T),ho&&OC(A,L),E;if(T===null){for(;!z.done;L++,z=C.next())z=d(A,z.value,_),z!==null&&(w=o(z,w,L),I===null?E=z:I.sibling=z,I=z);return ho&&OC(A,L),E}for(T=n(T);!z.done;L++,z=C.next())z=f(T,A,L,z.value,_),z!==null&&(i&&z.alternate!==null&&T.delete(z.key===null?L:z.key),w=o(z,w,L),I===null?E=z:I.sibling=z,I=z);return i&&T.forEach(function(B){return e(A,B)}),ho&&OC(A,L),E}function v(A,w,C,_){if(typeof C=="object"&&C!==null&&C.type===x4&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case xme:e:{for(var E=C.key;w!==null;){if(w.key===E){if(E=C.type,E===x4){if(w.tag===7){t(A,w.sibling),_=r(w,C.props.children),_.return=A,A=_;break e}}else if(w.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===PD&&E2(E)===w.type){t(A,w.sibling),_=r(w,C.props),Oj(_,C),_.return=A,A=_;break e}t(A,w);break}else e(A,w);w=w.sibling}C.type===x4?(_=k2(C.props.children,A.mode,_,C.key),_.return=A,A=_):(_=jme(C.type,C.key,C.props,null,A.mode,_),Oj(_,C),_.return=A,A=_)}return s(A);case Hj:e:{for(E=C.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===C.containerInfo&&w.stateNode.implementation===C.implementation){t(A,w.sibling),_=r(w,C.children||[]),_.return=A,A=_;break e}else{t(A,w);break}else e(A,w);w=w.sibling}_=jVe(C,A.mode,_),_.return=A,A=_}return s(A);case PD:return C=E2(C),v(A,w,C,_)}if(Wj(C))return p(A,w,C,_);if(Rj(C)){if(E=Rj(C),typeof E!="function")throw Error(mt(150));return C=E.call(C),g(A,w,C,_)}if(typeof C.then=="function")return v(A,w,Lme(C),_);if(C.$$typeof===BC)return v(A,w,Ime(A,C),_);Nme(A,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,w!==null&&w.tag===6?(t(A,w.sibling),_=r(w,C),_.return=A,A=_):(t(A,w),_=UVe(C,A.mode,_),_.return=A,A=_),s(A)):t(A,w)}return function(A,w,C,_){try{dQ=0;var E=v(A,w,C,_);return B4=null,E}catch(T){if(T===t8||T===Oge)throw T;var I=Gg(29,T,null,A.mode);return I.lanes=_,I.return=A,I}}}var F2=uFt(!0),dFt=uFt(!1),BD=!1;function EWe(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function MHe(i,e){i=i.updateQueue,e.updateQueue===i&&(e.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function JD(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function XD(i,e,t){var n=i.updateQueue;if(n===null)return null;if(n=n.shared,(rs&2)!==0){var r=n.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),n.pending=e,e=age(i),iFt(i,null,t),e}return Fge(i,n,e,t),age(i)}function Jj(i,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194048)!==0)){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,kRt(i,t)}}function GVe(i,e){var t=i.updateQueue,n=i.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var r=null,o=null;if(t=t.firstBaseUpdate,t!==null){do{var s={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};o===null?r=o=s:o=o.next=s,t=t.next}while(t!==null);o===null?r=o=e:o=o.next=e}else r=o=e;t={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},i.updateQueue=t;return}i=t.lastBaseUpdate,i===null?t.firstBaseUpdate=e:i.next=e,t.lastBaseUpdate=e}var RHe=!1;function Xj(){if(RHe){var i=P4;if(i!==null)throw i}}function Zj(i,e,t,n){RHe=!1;var r=i.updateQueue;BD=!1;var o=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=i.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=r.baseState;s=0,u=c=l=null,a=o;do{var h=a.lane&-536870913,f=h!==a.lane;if(f?(Jr&h)===h:(n&h)===h){h!==0&&h===j4&&(RHe=!0),u!==null&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=i,g=a;h=e;var v=t;switch(g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(v,d,h);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(v,d,h):p,h==null)break e;d=Va({},d,h);break e;case 2:BD=!0}}h=a.callback,h!==null&&(i.flags|=64,f&&(i.flags|=8192),f=r.callbacks,f===null?r.callbacks=[h]:f.push(h))}else f={lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,s|=h;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);u===null&&(l=d),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,o===null&&(r.shared.lanes=0),sT|=s,i.lanes=s,i.memoizedState=d}}function hFt(i,e){if(typeof i!="function")throw Error(mt(191,i));i.call(e)}function fFt(i,e){var t=i.callbacks;if(t!==null)for(i.callbacks=null,i=0;io?o:8;var s=_n.T,a={};_n.T=a,zWe(i,!1,e,t);try{var l=r(),c=_n.S;if(c!==null&&c(a,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=Z2i(l,n);$j(i,e,u,Xg(i))}else $j(i,e,n,Xg(i))}catch(d){$j(i,e,{then:function(){},status:"rejected",reason:d},Xg())}finally{os.p=o,s!==null&&a.types!==null&&(s.types=a.types),_n.T=s}}function rMi(){}function zHe(i,e,t,n){if(i.tag!==5)throw Error(mt(476));var r=BFt(i).queue;PFt(i,r,e,T2,t===null?rMi:function(){return zFt(i),t(n)})}function BFt(i){var e=i.memoizedState;if(e!==null)return e;e={memoizedState:T2,baseState:T2,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:GC,lastRenderedState:T2},next:null};var t={};return e.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:GC,lastRenderedState:t},next:null},i.memoizedState=e,i=i.alternate,i!==null&&(i.memoizedState=e),e}function zFt(i){var e=BFt(i);e.next===null&&(e=i.alternate.memoizedState),$j(i,e.next.queue,{},Xg())}function BWe(){return _h(gQ)}function VFt(){return Nc().memoizedState}function HFt(){return Nc().memoizedState}function oMi(i){for(var e=i.return;e!==null;){switch(e.tag){case 24:case 3:var t=Xg();i=JD(t);var n=XD(e,i,t);n!==null&&(Cm(n,e,t),Jj(n,e,t)),e={cache:CWe()},i.payload=e;return}e=e.return}}function sMi(i,e,t){var n=Xg();t={lane:n,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null},Vge(i)?UFt(e,t):(t=AWe(i,e,t,n),t!==null&&(Cm(t,i,n),jFt(t,e,n)))}function WFt(i,e,t){var n=Xg();$j(i,e,t,n)}function $j(i,e,t,n){var r={lane:n,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(Vge(i))UFt(e,r);else{var o=i.alternate;if(i.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,t);if(r.hasEagerState=!0,r.eagerState=a,Zg(a,s))return Fge(i,e,r,0),ea===null&&Rge(),!1}catch{}if(t=AWe(i,e,r,n),t!==null)return Cm(t,i,n),jFt(t,e,n),!0}return!1}function zWe(i,e,t,n){if(n={lane:2,revertLane:YWe(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vge(i)){if(e)throw Error(mt(479))}else e=AWe(i,t,n,2),e!==null&&Cm(e,i,2)}function Vge(i){var e=i.alternate;return i===sr||e!==null&&e===sr}function UFt(i,e){z4=fge=!0;var t=i.pending;t===null?e.next=e:(e.next=t.next,t.next=e),i.pending=e}function jFt(i,e,t){if((t&4194048)!==0){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,kRt(i,t)}}var fQ={readContext:_h,use:Bge,useCallback:rc,useContext:rc,useEffect:rc,useImperativeHandle:rc,useLayoutEffect:rc,useInsertionEffect:rc,useMemo:rc,useReducer:rc,useRef:rc,useState:rc,useDebugValue:rc,useDeferredValue:rc,useTransition:rc,useSyncExternalStore:rc,useId:rc,useHostTransitionStatus:rc,useFormState:rc,useActionState:rc,useOptimistic:rc,useMemoCache:rc,useCacheRefresh:rc};fQ.useEffectEvent=rc;var QFt={readContext:_h,use:Bge,useCallback:function(i,e){return bp().memoizedState=[i,e===void 0?null:e],i},useContext:_h,useEffect:TMt,useImperativeHandle:function(i,e,t){t=t!=null?t.concat([i]):null,qme(4194308,4,NFt.bind(null,e,i),t)},useLayoutEffect:function(i,e){return qme(4194308,4,i,e)},useInsertionEffect:function(i,e){qme(4,2,i,e)},useMemo:function(i,e){var t=bp();e=e===void 0?null:e;var n=i();if(O2){UD(!0);try{i()}finally{UD(!1)}}return t.memoizedState=[n,e],n},useReducer:function(i,e,t){var n=bp();if(t!==void 0){var r=t(e);if(O2){UD(!0);try{t(e)}finally{UD(!1)}}}else r=e;return n.memoizedState=n.baseState=r,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:r},n.queue=i,i=i.dispatch=sMi.bind(null,sr,i),[n.memoizedState,i]},useRef:function(i){var e=bp();return i={current:i},e.memoizedState=i},useState:function(i){i=PHe(i);var e=i.queue,t=WFt.bind(null,sr,e);return e.dispatch=t,[i.memoizedState,t]},useDebugValue:OWe,useDeferredValue:function(i,e){var t=bp();return PWe(t,i,e)},useTransition:function(){var i=PHe(!1);return i=PFt.bind(null,sr,i.queue,!0,!1),bp().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,e,t){var n=sr,r=bp();if(ho){if(t===void 0)throw Error(mt(407));t=t()}else{if(t=e(),ea===null)throw Error(mt(349));(Jr&127)!==0||vFt(n,e,t)}r.memoizedState=t;var o={value:t,getSnapshot:e};return r.queue=o,TMt(yFt.bind(null,n,o,i),[i]),n.flags|=2048,G4(9,{destroy:void 0},AFt.bind(null,n,o,t,e),null),t},useId:function(){var i=bp(),e=ea.identifierPrefix;if(ho){var t=V1,n=z1;t=(n&~(1<<32-Jg(n)-1)).toString(32)+t,e="_"+e+"R_"+t,t=pge++,0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?s.createElement(r,{is:n.is}):s.createElement(r)}}o[xh]=e,o[_m]=n;e:for(s=e.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)break e;for(;s.sibling===null;){if(s.return===null||s.return===e)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}e.stateNode=o;e:switch(Sh(o,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&NC(e)}}return Ba(e),eHe(e,e.type,i===null?null:i.memoizedProps,e.pendingProps,t),null;case 6:if(i&&e.stateNode!=null)i.memoizedProps!==n&&NC(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(mt(166));if(i=YD.current,v4(e)){if(i=e.stateNode,t=e.memoizedProps,n=null,r=Ch,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}i[xh]=e,i=!!(i.nodeValue===t||n!==null&&n.suppressHydrationWarning===!0||WOt(i.nodeValue,t)),i||rT(e,!0)}else i=_ge(i).createTextNode(n),i[xh]=e,e.stateNode=i}return Ba(e),null;case 31:if(t=e.memoizedState,i===null||i.memoizedState!==null){if(n=v4(e),t!==null){if(i===null){if(!n)throw Error(mt(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(mt(557));i[xh]=e}else M2(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ba(e),i=!1}else t=QVe(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=t),i=!0;if(!i)return e.flags&256?(Qg(e),e):(Qg(e),null);if((e.flags&128)!==0)throw Error(mt(558))}return Ba(e),null;case 13:if(n=e.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(r=v4(e),n!==null&&n.dehydrated!==null){if(i===null){if(!r)throw Error(mt(318));if(r=e.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(mt(317));r[xh]=e}else M2(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ba(e),r=!1}else r=QVe(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=r),r=!0;if(!r)return e.flags&256?(Qg(e),e):(Qg(e),null)}return Qg(e),(e.flags&128)!==0?(e.lanes=t,e):(t=n!==null,i=i!==null&&i.memoizedState!==null,t&&(n=e.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048)),t!==i&&t&&(e.child.flags|=8192),Mme(e,e.updateQueue),Ba(e),null);case 4:return H4(),i===null&&KWe(e.stateNode.containerInfo),Ba(e),null;case 10:return WC(e.type),Ba(e),null;case 19:if(Fd(Lc),n=e.memoizedState,n===null)return Ba(e),null;if(r=(e.flags&128)!==0,o=n.rendering,o===null)if(r)Pj(n,!1);else{if(oc!==0||i!==null&&(i.flags&128)!==0)for(i=e.child;i!==null;){if(o=hge(i),o!==null){for(e.flags|=128,Pj(n,!1),i=o.updateQueue,e.updateQueue=i,Mme(e,i),e.subtreeFlags=0,i=t,t=e.child;t!==null;)nFt(t,i),t=t.sibling;return wa(Lc,Lc.current&1|2),ho&&OC(e,n.treeForkCount),e.child}i=i.sibling}n.tail!==null&&Yg()>vge&&(e.flags|=128,r=!0,Pj(n,!1),e.lanes=4194304)}else{if(!r)if(i=hge(o),i!==null){if(e.flags|=128,r=!0,i=i.updateQueue,e.updateQueue=i,Mme(e,i),Pj(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!ho)return Ba(e),null}else 2*Yg()-n.renderingStartTime>vge&&t!==536870912&&(e.flags|=128,r=!0,Pj(n,!1),e.lanes=4194304);n.isBackwards?(o.sibling=e.child,e.child=o):(i=n.last,i!==null?i.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(i=n.tail,n.rendering=i,n.tail=i.sibling,n.renderingStartTime=Yg(),i.sibling=null,t=Lc.current,wa(Lc,r?t&1|2:t&1),ho&&OC(e,n.treeForkCount),i):(Ba(e),null);case 22:case 23:return Qg(e),DWe(),n=e.memoizedState!==null,i!==null?i.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(t&536870912)!==0&&(e.flags&128)===0&&(Ba(e),e.subtreeFlags&6&&(e.flags|=8192)):Ba(e),t=e.updateQueue,t!==null&&Mme(e,t.retryQueue),t=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==t&&(e.flags|=2048),i!==null&&Fd(I2),null;case 24:return t=null,i!==null&&(t=i.memoizedState.cache),e.memoizedState.cache!==t&&(e.flags|=2048),WC(xu),Ba(e),null;case 25:return null;case 30:return null}throw Error(mt(156,e.tag))}function dMi(i,e){switch(xWe(e),e.tag){case 1:return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 3:return WC(xu),H4(),i=e.flags,(i&65536)!==0&&(i&128)===0?(e.flags=i&-65537|128,e):null;case 26:case 27:case 5:return nge(e),null;case 31:if(e.memoizedState!==null){if(Qg(e),e.alternate===null)throw Error(mt(340));M2()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 13:if(Qg(e),i=e.memoizedState,i!==null&&i.dehydrated!==null){if(e.alternate===null)throw Error(mt(340));M2()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 19:return Fd(Lc),null;case 4:return H4(),null;case 10:return WC(e.type),null;case 22:case 23:return Qg(e),DWe(),i!==null&&Fd(I2),i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 24:return WC(xu),null;case 25:return null;default:return null}}function nOt(i,e){switch(xWe(e),e.tag){case 3:WC(xu),H4();break;case 26:case 27:case 5:nge(e);break;case 4:H4();break;case 31:e.memoizedState!==null&&Qg(e);break;case 13:Qg(e);break;case 19:Fd(Lc);break;case 10:WC(e.type);break;case 22:case 23:Qg(e),DWe(),i!==null&&Fd(I2);break;case 24:WC(xu)}}function DQ(i,e){try{var t=e.updateQueue,n=t!==null?t.lastEffect:null;if(n!==null){var r=n.next;t=r;do{if((t.tag&i)===i){n=void 0;var o=t.create,s=t.inst;n=o(),s.destroy=n}t=t.next}while(t!==r)}}catch(a){Ss(e,e.return,a)}}function oT(i,e,t){try{var n=e.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&i)===i){var s=n.inst,a=s.destroy;if(a!==void 0){s.destroy=void 0,r=e;var l=t,c=a;try{c()}catch(u){Ss(r,l,u)}}}n=n.next}while(n!==o)}}catch(u){Ss(e,e.return,u)}}function rOt(i){var e=i.updateQueue;if(e!==null){var t=i.stateNode;try{fFt(e,t)}catch(n){Ss(i,i.return,n)}}}function oOt(i,e,t){t.props=P2(i.type,i.memoizedProps),t.state=i.memoizedState;try{t.componentWillUnmount()}catch(n){Ss(i,e,n)}}function eQ(i,e){try{var t=i.ref;if(t!==null){switch(i.tag){case 26:case 27:case 5:var n=i.stateNode;break;case 30:n=i.stateNode;break;default:n=i.stateNode}typeof t=="function"?i.refCleanup=t(n):t.current=n}}catch(r){Ss(i,e,r)}}function H1(i,e){var t=i.ref,n=i.refCleanup;if(t!==null)if(typeof n=="function")try{n()}catch(r){Ss(i,e,r)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof t=="function")try{t(null)}catch(r){Ss(i,e,r)}else t.current=null}function sOt(i){var e=i.type,t=i.memoizedProps,n=i.stateNode;try{e:switch(e){case"button":case"input":case"select":case"textarea":t.autoFocus&&n.focus();break e;case"img":t.src?n.src=t.src:t.srcSet&&(n.srcset=t.srcSet)}}catch(r){Ss(i,i.return,r)}}function tHe(i,e,t){try{var n=i.stateNode;LMi(n,i.type,t,e),n[_m]=e}catch(r){Ss(i,i.return,r)}}function aOt(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&lT(i.type)||i.tag===4}function iHe(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||aOt(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&lT(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function jHe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).insertBefore(i,e):(e=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,e.appendChild(i),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=zC));else if(n!==4&&(n===27&&lT(i.type)&&(t=i.stateNode,e=null),i=i.child,i!==null))for(jHe(i,e,t),i=i.sibling;i!==null;)jHe(i,e,t),i=i.sibling}function bge(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.insertBefore(i,e):t.appendChild(i);else if(n!==4&&(n===27&&lT(i.type)&&(t=i.stateNode),i=i.child,i!==null))for(bge(i,e,t),i=i.sibling;i!==null;)bge(i,e,t),i=i.sibling}function lOt(i){var e=i.stateNode,t=i.memoizedProps;try{for(var n=i.type,r=e.attributes;r.length;)e.removeAttributeNode(r[0]);Sh(e,n,t),e[xh]=i,e[_m]=t}catch(o){Ss(i,i.return,o)}}var PC=!1,wu=!1,nHe=!1,HMt=typeof WeakSet=="function"?WeakSet:Set,Md=null;function hMi(i,e){if(i=i.containerInfo,XHe=Tge,i=KRt(i),bWe(i)){if("selectionStart"in i)var t={start:i.selectionStart,end:i.selectionEnd};else e:{t=(t=i.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=i,h=null;t:for(;;){for(var f;d!==t||r!==0&&d.nodeType!==3||(a=s+r),d!==o||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===i)break t;if(h===t&&++c===r&&(a=s),h===o&&++u===n&&(l=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(ZHe={focusedElem:i,selectionRange:t},Tge=!1,Md=e;Md!==null;)if(e=Md,i=e.child,(e.subtreeFlags&1028)!==0&&i!==null)i.return=e,Md=i;else for(;Md!==null;){switch(e=Md,o=e.alternate,i=e.flags,e.tag){case 0:if((i&4)!==0&&(i=e.updateQueue,i=i!==null?i.events:null,i!==null))for(t=0;t title"))),Sh(o,n,t),o[xh]=i,Rd(o),n=o;break e;case"link":var s=cRt("link","href",r).get(n+(t.href||""));if(s){for(var a=0;av&&(s=v,v=g,g=s);var A=hMt(a,g),w=hMt(a,v);if(A&&w&&(f.rangeCount!==1||f.anchorNode!==A.node||f.anchorOffset!==A.offset||f.focusNode!==w.node||f.focusOffset!==w.offset)){var C=d.createRange();C.setStart(A.node,A.offset),f.removeAllRanges(),g>v?(f.addRange(C),f.extend(w.node,w.offset)):(C.setEnd(w.node,w.offset),f.addRange(C))}}}}for(d=[],f=a;f=f.parentNode;)f.nodeType===1&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;at?32:t,_n.T=null,t=qHe,qHe=null;var o=$D,s=UC;if(qu=0,Y4=$D=null,UC=0,(rs&6)!==0)throw Error(mt(331));var a=rs;if(rs|=4,AOt(o.current),gOt(o,o.current,s,t),rs=a,TQ(0,!1),Kg&&typeof Kg.onPostCommitFiberRoot=="function")try{Kg.onPostCommitFiberRoot(yQ,o)}catch{}return!0}finally{os.p=r,_n.T=n,ROt(i,e)}}function QMt(i,e,t){e=C0(t,e),e=HHe(i.stateNode,e,2),i=XD(i,e,2),i!==null&&(xQ(i,2),j1(i))}function Ss(i,e,t){if(i.tag===3)QMt(i,i,t);else for(;e!==null;){if(e.tag===3){QMt(e,i,t);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ZD===null||!ZD.has(n))){i=C0(t,i),t=JFt(2),n=XD(e,t,2),n!==null&&(XFt(t,n,e,i),xQ(n,2),j1(n));break}}e=e.return}}function oHe(i,e,t){var n=i.pingCache;if(n===null){n=i.pingCache=new mMi;var r=new Set;n.set(e,r)}else r=n.get(e),r===void 0&&(r=new Set,n.set(e,r));r.has(t)||(QWe=!0,r.add(t),i=yMi.bind(null,i,e,t),e.then(i,i))}function yMi(i,e,t){var n=i.pingCache;n!==null&&n.delete(e),i.pingedLanes|=i.suspendedLanes&t,i.warmLanes&=~t,ea===i&&(Jr&t)===t&&(oc===4||oc===3&&(Jr&62914560)===Jr&&300>Yg()-Hge?(rs&2)===0&&K4(i,0):GWe|=t,q4===Jr&&(q4=0)),j1(i)}function OOt(i,e){e===0&&(e=DRt()),i=H2(i,e),i!==null&&(xQ(i,e),j1(i))}function wMi(i){var e=i.memoizedState,t=0;e!==null&&(t=e.retryLane),OOt(i,t)}function xMi(i,e){var t=0;switch(i.tag){case 31:case 13:var n=i.stateNode,r=i.memoizedState;r!==null&&(t=r.retryLane);break;case 19:n=i.stateNode;break;case 22:n=i.stateNode._retryCache;break;default:throw Error(mt(314))}n!==null&&n.delete(e),OOt(i,t)}function CMi(i,e){return lWe(i,e)}var wge=null,w4=null,KHe=!1,xge=!1,sHe=!1,qD=0;function j1(i){i!==w4&&i.next===null&&(w4===null?wge=w4=i:w4=w4.next=i),xge=!0,KHe||(KHe=!0,SMi())}function TQ(i,e){if(!sHe&&xge){sHe=!0;do for(var t=!1,n=wge;n!==null;){if(!e)if(i!==0){var r=n.pendingLanes;if(r===0)var o=0;else{var s=n.suspendedLanes,a=n.pingedLanes;o=(1<<31-Jg(42|i)+1)-1,o&=r&~(s&~a),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(t=!0,GMt(n,o))}else o=Jr,o=Ige(n,n===ea?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||wQ(n,o)||(t=!0,GMt(n,o));n=n.next}while(t);sHe=!1}}function _Mi(){POt()}function POt(){xge=KHe=!1;var i=0;qD!==0&&MMi()&&(i=qD);for(var e=Yg(),t=null,n=wge;n!==null;){var r=n.next,o=BOt(n,e);o===0?(n.next=null,t===null?wge=r:t.next=r,r===null&&(w4=t)):(t=n,(i!==0||(o&3)!==0)&&(xge=!0)),n=r}qu!==0&&qu!==5||TQ(i,!1),qD!==0&&(qD=0)}function BOt(i,e){for(var t=i.suspendedLanes,n=i.pingedLanes,r=i.expirationTimes,o=i.pendingLanes&-62914561;0a)break;var u=l.transferSize,d=l.initiatorType;u&&$Mt(d)&&(l=l.responseEnd,s+=u*(l"u"?null:document;function qOt(i,e,t){var n=n8;if(n&&typeof e=="string"&&e){var r=x0(e);r='link[rel="'+i+'"][href="'+r+'"]',typeof t=="string"&&(r+='[crossorigin="'+t+'"]'),sRt.has(r)||(sRt.add(r),i={rel:i,crossOrigin:t,href:e},n.querySelector(r)===null&&(e=n.createElement("link"),Sh(e,"link",i),Rd(e),n.head.appendChild(e)))}}function WMi(i){KC.D(i),qOt("dns-prefetch",i,null)}function UMi(i,e){KC.C(i,e),qOt("preconnect",i,e)}function jMi(i,e,t){KC.L(i,e,t);var n=n8;if(n&&i&&e){var r='link[rel="preload"][as="'+x0(e)+'"]';e==="image"&&t&&t.imageSrcSet?(r+='[imagesrcset="'+x0(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(r+='[imagesizes="'+x0(t.imageSizes)+'"]')):r+='[href="'+x0(i)+'"]';var o=r;switch(e){case"style":o=J4(i);break;case"script":o=r8(i)}D0.has(o)||(i=Va({rel:"preload",href:e==="image"&&t&&t.imageSrcSet?void 0:i,as:e},t),D0.set(o,i),n.querySelector(r)!==null||e==="style"&&n.querySelector(kQ(o))||e==="script"&&n.querySelector(IQ(o))||(e=n.createElement("link"),Sh(e,"link",i),Rd(e),n.head.appendChild(e)))}}function QMi(i,e){KC.m(i,e);var t=n8;if(t&&i){var n=e&&typeof e.as=="string"?e.as:"script",r='link[rel="modulepreload"][as="'+x0(n)+'"][href="'+x0(i)+'"]',o=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=r8(i)}if(!D0.has(o)&&(i=Va({rel:"modulepreload",href:i},e),D0.set(o,i),t.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(IQ(o)))return}n=t.createElement("link"),Sh(n,"link",i),Rd(n),t.head.appendChild(n)}}}function GMi(i,e,t){KC.S(i,e,t);var n=n8;if(n&&i){var r=R4(n).hoistableStyles,o=J4(i);e=e||"default";var s=r.get(o);if(!s){var a={loading:0,preload:null};if(s=n.querySelector(kQ(o)))a.loading=5;else{i=Va({rel:"stylesheet",href:i,"data-precedence":e},t),(t=D0.get(o))&&JWe(i,t);var l=s=n.createElement("link");Rd(l),Sh(l,"link",i),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Xme(s,e,n)}s={type:"stylesheet",instance:s,count:1,state:a},r.set(o,s)}}}function qMi(i,e){KC.X(i,e);var t=n8;if(t&&i){var n=R4(t).hoistableScripts,r=r8(i),o=n.get(r);o||(o=t.querySelector(IQ(r)),o||(i=Va({src:i,async:!0},e),(e=D0.get(r))&&XWe(i,e),o=t.createElement("script"),Rd(o),Sh(o,"link",i),t.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function YMi(i,e){KC.M(i,e);var t=n8;if(t&&i){var n=R4(t).hoistableScripts,r=r8(i),o=n.get(r);o||(o=t.querySelector(IQ(r)),o||(i=Va({src:i,async:!0,type:"module"},e),(e=D0.get(r))&&XWe(i,e),o=t.createElement("script"),Rd(o),Sh(o,"link",i),t.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function aRt(i,e,t,n){var r=(r=YD.current)?Sge(r):null;if(!r)throw Error(mt(446));switch(i){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(e=J4(t.href),t=R4(r).hoistableStyles,n=t.get(e),n||(n={type:"style",instance:null,count:0,state:null},t.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){i=J4(t.href);var o=R4(r).hoistableStyles,s=o.get(i);if(s||(r=r.ownerDocument||r,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(i,s),(o=r.querySelector(kQ(i)))&&!o._p&&(s.instance=o,s.state.loading=5),D0.has(i)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},D0.set(i,t),o||KMi(r,i,t,s.state))),e&&n===null)throw Error(mt(528,""));return s}if(e&&n!==null)throw Error(mt(529,""));return null;case"script":return e=t.async,t=t.src,typeof t=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=r8(t),t=R4(r).hoistableScripts,n=t.get(e),n||(n={type:"script",instance:null,count:0,state:null},t.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(mt(444,i))}}function J4(i){return'href="'+x0(i)+'"'}function kQ(i){return'link[rel="stylesheet"]['+i+"]"}function YOt(i){return Va({},i,{"data-precedence":i.precedence,precedence:null})}function KMi(i,e,t,n){i.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=i.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),Sh(e,"link",t),Rd(e),i.head.appendChild(e))}function r8(i){return'[src="'+x0(i)+'"]'}function IQ(i){return"script[async]"+i}function lRt(i,e,t){if(e.count++,e.instance===null)switch(e.type){case"style":var n=i.querySelector('style[data-href~="'+x0(t.href)+'"]');if(n)return e.instance=n,Rd(n),n;var r=Va({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return n=(i.ownerDocument||i).createElement("style"),Rd(n),Sh(n,"style",r),Xme(n,t.precedence,i),e.instance=n;case"stylesheet":r=J4(t.href);var o=i.querySelector(kQ(r));if(o)return e.state.loading|=4,e.instance=o,Rd(o),o;n=YOt(t),(r=D0.get(r))&&JWe(n,r),o=(i.ownerDocument||i).createElement("link"),Rd(o);var s=o;return s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),Sh(o,"link",n),e.state.loading|=4,Xme(o,t.precedence,i),e.instance=o;case"script":return o=r8(t.src),(r=i.querySelector(IQ(o)))?(e.instance=r,Rd(r),r):(n=t,(r=D0.get(o))&&(n=Va({},t),XWe(n,r)),i=i.ownerDocument||i,r=i.createElement("script"),Rd(r),Sh(r,"link",n),i.head.appendChild(r),e.instance=r);case"void":return null;default:throw Error(mt(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Xme(n,t.precedence,i));return e.instance}function Xme(i,e,t){for(var n=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,o=r,s=0;s title"):null)}function JMi(i,e,t){if(t===1||e.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(i=e.disabled,typeof e.precedence=="string"&&i==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function KOt(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function XMi(i,e,t,n){if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var r=J4(n.href),o=e.querySelector(kQ(r));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Ege.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=o,Rd(o);return}o=e.ownerDocument||e,n=YOt(n),(r=D0.get(r))&&JWe(n,r),o=o.createElement("link"),Rd(o);var s=o;s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),Sh(o,"link",n),t.instance=o}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=Ege.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}var uHe=0;function ZMi(i,e){return i.stylesheets&&i.count===0&&$me(i,i.stylesheets),0uHe?50:800)+e);return i.unsuspend=t,function(){i.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function Ege(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$me(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Dge=null;function $me(i,e){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Dge=new Map,e.forEach($Mi,i),Dge=null,Ege.call(i))}function $Mi(i,e){if(!(e.state.loading&4)){var t=Dge.get(i);if(t)var n=t.get(null);else{t=new Map,Dge.set(i,t);for(var r=i.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o{"use strict";function rPt(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rPt)}catch(i){console.error(i)}}rPt(),oPt.exports=nPt()});var a8t=Ue(I0e=>{"use strict";Object.defineProperty(I0e,"__esModule",{value:!0});var aPi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},J4t=(function(){function i(e,t){var n=[],r=!0,o=!1,s=void 0;try{for(var a=e[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){o=!0,s=c}finally{try{!r&&a.return&&a.return()}finally{if(o)throw s}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return i(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),as=Object.assign||function(i){for(var e=1;e"u"?d=!0:typeof c.kind=="string"&&(f=!0)}catch{}var p=r.props.selection,g=r._getArgSelection();if(!g){console.error("missing arg selection when setting arg value");return}var v=_T(r.props.arg.type),A=(0,Vn.isLeafType)(v)||h||d||f;if(!A){console.warn("Unable to handle non leaf types in InputArgView.setArgValue",c);return}var w=void 0,C=void 0;c===null||typeof c>"u"?C=null:!c.target&&c.kind&&c.kind==="VariableDefinition"?(w=c,C=w.variable):typeof c.kind=="string"?C=c:c.target&&typeof c.target.value=="string"&&(w=c.target.value,C=i8t(v,w));var _=r.props.modifyFields((p.fields||[]).map(function(E){var I=E===g,T=I?as({},E,{value:C}):E;return T}),u);return _},r._modifyChildFields=function(c){return r.props.modifyFields(r.props.selection.fields.map(function(u){return u.name.value===r.props.arg.name?as({},u,{value:{kind:"ObjectValue",fields:c}}):u}),!0)},n),Rc(r,o)}return oA(e,[{key:"render",value:function(){var n=this.props,r=n.arg,o=n.parentField,s=this._getArgSelection();return wt.createElement(r8t,{argValue:s?s.value:null,arg:r,parentField:o,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._modifyChildFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),e})(wt.PureComponent);function Tje(i){if((0,Vn.isEnumType)(i))return{kind:"EnumValue",value:i.getValues()[0].name};switch(i.name){case"String":return{kind:"StringValue",value:""};case"Float":return{kind:"FloatValue",value:"1.5"};case"Int":return{kind:"IntValue",value:"10"};case"Boolean":return{kind:"BooleanValue",value:!1};default:return{kind:"StringValue",value:""}}}function n8t(i,e,t){return Tje(t)}var bPi=(function(i){aA(e,i);function e(){var t,n,r,o;sA(this,e);for(var s=arguments.length,a=Array(s),l=0;l"u"?d=!0:typeof c.kind=="string"&&(f=!0)}catch{}var p=r.props.selection,g=r._getArgSelection();if(!g&&!h){console.error("missing arg selection when setting arg value");return}var v=_T(r.props.arg.type),A=(0,Vn.isLeafType)(v)||h||d||f;if(!A){console.warn("Unable to handle non leaf types in ArgView._setArgValue");return}var w=void 0,C=void 0;return c===null||typeof c>"u"?C=null:c.target&&typeof c.target.value=="string"?(w=c.target.value,C=i8t(v,w)):!c.target&&c.kind==="VariableDefinition"?(w=c,C=w.variable):typeof c.kind=="string"&&(C=c),r.props.modifyArguments((p.arguments||[]).map(function(_){return _===g?as({},_,{value:C}):_}),u)},r._setArgFields=function(c,u){var d=r.props.selection,h=r._getArgSelection();if(!h){console.error("missing arg selection when setting arg value");return}return r.props.modifyArguments((d.arguments||[]).map(function(f){return f===h?as({},f,{value:{kind:"ObjectValue",fields:c}}):f}),u)},n),Rc(r,o)}return oA(e,[{key:"render",value:function(){var n=this.props,r=n.arg,o=n.parentField,s=this._getArgSelection();return wt.createElement(r8t,{argValue:s?s.value:null,arg:r,parentField:o,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._setArgFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),e})(wt.PureComponent);function vPi(i){return i.ctrlKey&&i.key==="Enter"}function APi(i){return i!=="FragmentDefinition"}var yPi=(function(i){aA(e,i);function e(){var t,n,r,o;sA(this,e);for(var s=arguments.length,a=Array(s),l=0;l0?w=""+v+A:w=v;var C=s.type.toString(),_=(0,Vn.parseType)(C),E={kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:w}},type:_,directives:[]},I=function(fe){return(n.props.definition.variableDefinitions||[]).find(function(Re){return Re.variable.name.value===fe})},T=void 0,L={};if(typeof o<"u"&&o!==null){var M=(0,Vn.visit)(o,{Variable:function(fe){var Re=fe.name.value,ft=I(Re);if(L[Re]=L[Re]+1||1,!!ft)return ft.defaultValue}}),z=E.type.kind==="NonNullType",H=z?as({},E,{type:E.type.type}):E;T=as({},H,{defaultValue:M})}else T=E;var B=Object.entries(L).filter(function(oe){var fe=J4t(oe,2),Re=fe[0],ft=fe[1];return ft<2}).map(function(oe){var fe=J4t(oe,2),Re=fe[0],ft=fe[1];return Re});if(T){var q=n.props.setArgValue(T,!1);if(q){var U=q.definitions.find(function(oe){return oe.operation&&oe.name&&oe.name.value&&n.props.definition.name&&n.props.definition.name.value?oe.name.value===n.props.definition.name.value:!1}),F=[].concat(R0(U.variableDefinitions||[]),[T]).filter(function(oe){return B.indexOf(oe.variable.name.value)===-1}),ne=as({},U,{variableDefinitions:F}),ce=q.definitions,se=ce.map(function(oe){return U===oe?ne:oe}),le=as({},q,{definitions:se});n.props.onCommit(le)}}},h=function(){if(!(!o||!o.name||!o.name.value)){var v=o.name.value,A=(n.props.definition.variableDefinitions||[]).find(function(H){return H.variable.name.value===v});if(A){var w=A.defaultValue,C=n.props.setArgValue(w,{commit:!1});if(C){var _=C.definitions.find(function(H){return H.name.value===n.props.definition.name.value});if(!_)return;var E=0;(0,Vn.visit)(_,{Variable:function(B){B.name.value===v&&(E=E+1)}});var I=_.variableDefinitions||[];E<2&&(I=I.filter(function(H){return H.variable.name.value!==v}));var T=as({},_,{variableDefinitions:I}),L=C.definitions,M=L.map(function(H){return _===H?T:H}),z=as({},C,{definitions:M});n.props.onCommit(z)}}}},f=o&&o.kind==="Variable",p=this.state.displayArgActions?wt.createElement("button",{type:"submit",className:"toolbar-button",title:f?"Remove the variable":"Extract the current value into a GraphQL variable",onClick:function(v){v.preventDefault(),v.stopPropagation(),f?h():d()},style:a.styles.actionButtonStyle},wt.createElement("span",{style:{color:a.colors.variable}},"$")):null;return wt.createElement("div",{style:{cursor:"pointer",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-arg-name":s.name,"data-arg-type":l.name,className:"graphiql-explorer-"+s.name},wt.createElement("span",{style:{cursor:"pointer"},onClick:function(v){var A=!o;A?n.props.addArg(!0):n.props.removeArg(!0),n.setState({displayArgActions:A})}},(0,Vn.isInputObjectType)(l)?wt.createElement("span",null,o?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):wt.createElement(T0e,{checked:!!o,styleConfig:this.props.styleConfig}),wt.createElement("span",{style:{color:a.colors.attribute},title:s.description,onMouseEnter:function(){o!==null&&typeof o<"u"&&n.setState({displayArgActions:!0})},onMouseLeave:function(){return n.setState({displayArgActions:!1})}},s.name,t8t(s)?"*":"",": ",p," ")," "),c||wt.createElement("span",null)," ")}}]),e})(wt.PureComponent),wPi=(function(i){aA(e,i);function e(){var t,n,r,o;sA(this,e);for(var s=arguments.length,a=Array(s),l=0;l0;w&&n.setState({displayFieldActions:!0})},onMouseLeave:function(){return n.setState({displayFieldActions:!1})}},(0,Vn.isObjectType)(u)?wt.createElement("span",null,c?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):null,(0,Vn.isObjectType)(u)?null:wt.createElement(T0e,{checked:!!c,styleConfig:this.props.styleConfig}),wt.createElement("span",{style:{color:l.colors.property},className:"graphiql-explorer-field-view"},o.name),this.state.displayFieldActions?wt.createElement("button",{type:"submit",className:"toolbar-button",title:"Extract selections into a new reusable fragment",onClick:function(w){w.preventDefault(),w.stopPropagation();var C=u.name,_=C+"Fragment",E=(f||[]).filter(function(H){return H.name.value.startsWith(_)}).length;E>0&&(_=""+_+E);var I=c?c.selectionSet?c.selectionSet.selections:[]:[],T=[{kind:"FragmentSpread",name:{kind:"Name",value:_},directives:[]}],L={kind:"FragmentDefinition",name:{kind:"Name",value:_},typeCondition:{kind:"NamedType",name:{kind:"Name",value:u.name}},directives:[],selectionSet:{kind:"SelectionSet",selections:I}},M=n._modifyChildSelections(T,!1);if(M){var z=as({},M,{definitions:[].concat(R0(M.definitions),[L])});n.props.onCommit(z)}else console.warn("Unable to complete extractFragment operation")},style:as({},l.styles.actionButtonStyle)},wt.createElement("span",null,"\u2026")):null),c&&d.length?wt.createElement("div",{style:{marginLeft:16},className:"graphiql-explorer-graphql-arguments"},d.map(function(A){return wt.createElement(bPi,{key:A.name,parentField:o,arg:A,selection:c,modifyArguments:n._setArguments,getDefaultScalarArgValue:n.props.getDefaultScalarArgValue,makeDefaultArg:n.props.makeDefaultArg,onRunOperation:n.props.onRunOperation,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit,definition:n.props.definition})})):null);if(c&&((0,Vn.isObjectType)(u)||(0,Vn.isInterfaceType)(u)||(0,Vn.isUnionType)(u))){var g=(0,Vn.isUnionType)(u)?{}:u.getFields(),v=c?c.selectionSet?c.selectionSet.selections:[]:[];return wt.createElement("div",{className:"graphiql-explorer-"+o.name},p,wt.createElement("div",{style:{marginLeft:16}},f?f.map(function(A){var w=s.getType(A.typeCondition.name.value),C=A.name.value;return w?wt.createElement(xPi,{key:C,fragment:A,selections:v,modifySelections:n._modifyChildSelections,schema:s,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit}):null}):null,Object.keys(g).sort().map(function(A){return wt.createElement(e,{key:A,field:g[A],selections:v,modifySelections:n._modifyChildSelections,schema:s,getDefaultFieldNames:a,getDefaultScalarArgValue:n.props.getDefaultScalarArgValue,makeDefaultArg:n.props.makeDefaultArg,onRunOperation:n.props.onRunOperation,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit,definition:n.props.definition,availableFragments:n.props.availableFragments})}),(0,Vn.isInterfaceType)(u)||(0,Vn.isUnionType)(u)?s.getPossibleTypes(u).map(function(A){return wt.createElement(wPi,{key:A.name,implementingType:A,selections:v,modifySelections:n._modifyChildSelections,schema:s,getDefaultFieldNames:a,getDefaultScalarArgValue:n.props.getDefaultScalarArgValue,makeDefaultArg:n.props.makeDefaultArg,onRunOperation:n.props.onRunOperation,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit,definition:n.props.definition})}):null))}return p}}]),e})(wt.PureComponent);function CPi(i){try{return i.trim()?(0,Vn.parse)(i,{noLocation:!0}):null}catch(e){return new Error(e)}}var _Pi={kind:"OperationDefinition",operation:"query",variableDefinitions:[],name:{kind:"Name",value:"MyQuery"},directives:[],selectionSet:{kind:"SelectionSet",selections:[]}},D0e={kind:"Document",definitions:[_Pi]},L8=null;function SPi(i){if(L8&&L8[0]===i)return L8[1];var e=CPi(i);return e?e instanceof Error?L8?L8[1]:D0e:(L8=[i,e],e):D0e}var $4t={buttonStyle:{fontSize:"1.2em",padding:"0px",backgroundColor:"white",border:"none",margin:"5px 0px",height:"40px",width:"100%",display:"block",maxWidth:"none"},actionButtonStyle:{padding:"0px",backgroundColor:"white",border:"none",margin:"0px",maxWidth:"none",height:"15px",width:"15px",display:"inline-block",fontSize:"smaller"},explorerActionsStyle:{margin:"4px -8px -8px",paddingLeft:"8px",bottom:"0px",width:"100%",textAlign:"center",background:"none",borderTop:"none",borderBottom:"none"}},EPi=(function(i){aA(e,i);function e(){var t,n,r,o;sA(this,e);for(var s=arguments.length,a=Array(s),l=0;l"u"?"undefined":aPi(Vt))==="object"&&typeof Vt.commit<"u"?Li=Vt.commit:Li=!0,Be){var ei=as({},g,{definitions:g.definitions.map(function(Ni){return Ni===F?Be:Ni})});return Li&&Ct(ei),ei}else return g},schema:o,getDefaultFieldNames:v,getDefaultScalarArgValue:A,makeDefaultArg:a,onRunOperation:function(){n.props.onRunOperation&&n.props.onRunOperation(ce)},styleConfig:l,availableFragments:q})}),U),z)}}]),e})(wt.PureComponent);s8t.defaultProps={getDefaultFieldNames:e8t,getDefaultScalarArgValue:n8t};var TPi=(function(i){aA(e,i);function e(){var t,n,r,o;sA(this,e);for(var s=arguments.length,a=Array(s),l=0;l{"use strict";Object.defineProperty(IG,"__esModule",{value:!0});IG.Explorer=void 0;var kPi=a8t(),l8t=IPi(kPi);function IPi(i){return i&&i.__esModule?i:{default:i}}IG.Explorer=l8t.default;IG.default=l8t.default});var G5t=Ue(Q5t=>{"use strict";var QG=Te();function u3i(i,e){return i===e&&(i!==0||1/i===1/e)||i!==i&&e!==e}var d3i=typeof Object.is=="function"?Object.is:u3i,h3i=QG.useSyncExternalStore,f3i=QG.useRef,p3i=QG.useEffect,m3i=QG.useMemo,g3i=QG.useDebugValue;Q5t.useSyncExternalStoreWithSelector=function(i,e,t,n,r){var o=f3i(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=m3i(function(){function l(f){if(!c){if(c=!0,u=f,f=n(f),r!==void 0&&s.hasValue){var p=s.value;if(r(p,f))return d=p}return d=f}if(p=d,d3i(u,f))return p;var g=n(f);return r!==void 0&&r(p,g)?(u=f,p):(u=f,d=g)}var c=!1,u,d,h=t===void 0?null:t;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,t,n,r]);var a=h3i(i,o[0],o[1]);return p3i(function(){s.hasValue=!0,s.value=a},[a]),g3i(a),a}});var Y5t=Ue((iso,q5t)=>{"use strict";q5t.exports=G5t()});var rzt=new URL(".",document.currentScript?.src??window.location.href),hAe=i=>new URL(i,rzt).href;globalThis.MonacoEnvironment={getWorker(i,e){switch(e){case"json":return new Worker(hAe("json.worker.js"));case"graphql":return new Worker(hAe("graphql.worker.js"));default:return new Worker(hAe("editor.worker.js"))}}};var dM=$(Hi()),Cf=$(Te()),u8t=$(Te());var bqe=$(Hi()),vqe=$(ur());var g5=$(Te()),VGe=({title:i,titleId:e,...t})=>g5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?g5.createElement("title",{id:e},i):null,g5.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"M5.048 1.408a2.76 2.76 0 0 1 3.904 0l3.64 3.64a2.76 2.76 0 0 1 0 3.904l-3.64 3.64a2.76 2.76 0 0 1-3.904 0l-3.64-3.64a2.76 2.76 0 0 1 0-3.904z"}),g5.createElement("rect",{width:2,height:2,x:6,y:6,fill:"currentColor",rx:1}));var Pq=$(Te()),HGe=({title:i,titleId:e,...t})=>Pq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 9","aria-labelledby":e,...t},i?Pq.createElement("title",{id:e},i):null,Pq.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"m1 1 6 6 6-6"}));var Bq=$(Te()),WGe=({title:i,titleId:e,...t})=>Bq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 7 10","aria-labelledby":e,...t},i?Bq.createElement("title",{id:e},i):null,Bq.createElement("path",{stroke:"currentColor",strokeWidth:1.75,d:"m6 1.048-4 4 4 4"}));var zq=$(Te()),UGe=({title:i,titleId:e,...t})=>zq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 9","aria-labelledby":e,...t},i?zq.createElement("title",{id:e},i):null,zq.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M13 8 7 2 1 8"}));var Vq=$(Te()),jGe=({title:i,titleId:e,...t})=>Vq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",stroke:"currentColor",strokeWidth:3,viewBox:"0 0 14 14","aria-labelledby":e,...t},i?Vq.createElement("title",{id:e},i):null,Vq.createElement("path",{d:"m1 1 12 12m0-12L1 13"}));var b5=$(Te()),QGe=({title:i,titleId:e,...t})=>b5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"-2 -2 22 22","aria-labelledby":e,...t},i?b5.createElement("title",{id:e},i):null,b5.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M11.25 14.21v1.025a2.015 2.015 0 0 1-2.015 2.015h-6.47A2.015 2.015 0 0 1 .75 15.235v-6.47c0-1.113.902-2.015 2.015-2.015h1.024"}),b5.createElement("rect",{width:10.5,height:10.5,x:6.75,y:.75,stroke:"currentColor",strokeWidth:1.5,rx:2.207}));var Hq=$(Te()),GGe=({title:i,titleId:e,...t})=>Hq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?Hq.createElement("title",{id:e},i):null,Hq.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"M5.048 1.408a2.76 2.76 0 0 1 3.904 0l3.64 3.64a2.76 2.76 0 0 1 0 3.904l-3.64 3.64a2.76 2.76 0 0 1-3.904 0l-3.64-3.64a2.76 2.76 0 0 1 0-3.904zM5 9l4-4M5 5l4 4"}));var v5=$(Te()),qGe=({title:i,titleId:e,...t})=>v5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?v5.createElement("title",{id:e},i):null,v5.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"m4 8 4-4M4 4l4 4"}),v5.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.5 1.2H9A1.8 1.8 0 0 1 10.8 3v6A1.8 1.8 0 0 1 9 10.8h-.5V12H9a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3h-.5zm-5 0V0H3a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h.5v-1.2H3A1.8 1.8 0 0 1 1.2 9V3A1.8 1.8 0 0 1 3 1.2z",clipRule:"evenodd"}));var A5=$(Te()),YGe=({title:i,titleId:e,...t})=>A5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?A5.createElement("title",{id:e},i):null,A5.createElement("rect",{width:10.8,height:10.8,x:.6,y:.6,stroke:"currentColor",strokeWidth:1.2,rx:3.4}),A5.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"m4 8 4-4M4 4l4 4"}));var y5=$(Te()),KGe=({title:i,titleId:e,...t})=>y5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0.5 12 12","aria-labelledby":e,...t},i?y5.createElement("title",{id:e},i):null,y5.createElement("rect",{width:2,height:2,x:7,y:5.5,fill:"currentColor",rx:1,transform:"rotate(90 7 5.5)"}),y5.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.8 9v.5A1.8 1.8 0 0 1 9 11.3H3a1.8 1.8 0 0 1-1.8-1.8V9H0v.5a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9zm0-5H12v-.5a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3V4h1.2v-.5A1.8 1.8 0 0 1 3 1.7h6a1.8 1.8 0 0 1 1.8 1.8z",clipRule:"evenodd"}));var LM=$(Te()),JGe=({title:i,titleId:e,...t})=>LM.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 20 24","aria-labelledby":e,...t},i?LM.createElement("title",{id:e},i):null,LM.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M.75 3A2.25 2.25 0 0 1 3 .75h14.25a1 1 0 0 1 1 1v3.5"}),LM.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M.75 3A2.25 2.25 0 0 0 3 5.25h15.25a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3A2.25 2.25 0 0 1 .75 21z"}),LM.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 5.25A2.25 2.25 0 0 1 .75 3v18A2.25 2.25 0 0 0 3 23.25h15.25a1 1 0 0 0 1-1v-16a1 1 0 0 0-1-1zM13 11H6v1.5h7z",clipRule:"evenodd"}));var Wq=$(Te()),XGe=({title:i,titleId:e,...t})=>Wq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 20 24","aria-labelledby":e,...t},i?Wq.createElement("title",{id:e},i):null,Wq.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M.75 3A2.25 2.25 0 0 0 3 5.25h14.25M.75 3A2.25 2.25 0 0 1 3 .75h13.25a1 1 0 0 1 1 1v3.5M.75 3v18A2.25 2.25 0 0 0 3 23.25h15.25a1 1 0 0 0 1-1v-16a1 1 0 0 0-1-1h-1M13 11.75H6"}));var w5=$(Te()),ZGe=({title:i,titleId:e,...t})=>w5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?w5.createElement("title",{id:e},i):null,w5.createElement("rect",{width:2,height:2,x:5,y:5,fill:"currentColor",rx:1}),w5.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.5 1.2H9A1.8 1.8 0 0 1 10.8 3v6A1.8 1.8 0 0 1 9 10.8h-.5V12H9a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3h-.5zm-5 0V0H3a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h.5v-1.2H3A1.8 1.8 0 0 1 1.2 9V3A1.8 1.8 0 0 1 3 1.2z",clipRule:"evenodd"}));var x5=$(Te()),$Ge=({title:i,titleId:e,...t})=>x5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 13","aria-labelledby":e,...t},i?x5.createElement("title",{id:e},i):null,x5.createElement("rect",{width:10.8,height:10.8,x:.6,y:1.1,stroke:"currentColor",strokeWidth:1.2,rx:2.4}),x5.createElement("rect",{width:2,height:2,x:5,y:5.5,fill:"currentColor",rx:1}));var C5=$(Te()),eqe=({title:i,titleId:e,...t})=>C5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 24 20","aria-labelledby":e,...t},i?C5.createElement("title",{id:e},i):null,C5.createElement("path",{stroke:"currentColor",strokeLinecap:"square",strokeWidth:1.5,d:"m1.594 9.523 3.279 3.471 3.206-3.582M13.75 5.25v5.5h5"}),C5.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M4.954 11.933A9.25 9.25 0 1 1 14 19.25"}));var _5=$(Te()),tqe=({title:i,titleId:e,...t})=>_5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?_5.createElement("title",{id:e},i):null,_5.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeDasharray:"4.241025 4.241025",strokeWidth:1.2,transform:"rotate(22.5 6 6)"}),_5.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"}));var S5=$(Te()),iqe=({title:i,titleId:e,...t})=>S5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 19 18","aria-labelledby":e,...t},i?S5.createElement("title",{id:e},i):null,S5.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.125,d:"M1.5 14.565a2.435 2.435 0 0 0 4.87 0v-2.434H3.935A2.434 2.434 0 0 0 1.5 14.564M3.935 1a2.435 2.435 0 1 0 0 4.87H6.37V3.435a2.435 2.435 0 0 0-2.435-2.434m11.13 11.129H12.63v2.435a2.435 2.435 0 1 0 2.435-2.434m-2.433-6.263H6.37v6.26h6.262z"}),S5.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.125,d:"M17.5 3.435a2.435 2.435 0 1 0-4.87 0v2.434h2.435A2.435 2.435 0 0 0 17.5 3.435"}));var E5=$(Te()),nqe=({title:i,titleId:e,...t})=>E5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 13 13","aria-labelledby":e,...t},i?E5.createElement("title",{id:e},i):null,E5.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),E5.createElement("path",{stroke:"currentColor",strokeWidth:1.3,d:"m8.46 8.54 3.292 3.293"}));var D5=$(Te()),rqe=({title:i,titleId:e,...t})=>D5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"-2 -2 22 22","aria-labelledby":e,...t},i?D5.createElement("title",{id:e},i):null,D5.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M17.25 6V2.957A2.207 2.207 0 0 0 15.041.75H2.957A2.207 2.207 0 0 0 .75 2.957V6m0 6v3.043c0 1.219.988 2.207 2.207 2.207h12.085a2.207 2.207 0 0 0 2.207-2.207V12"}),D5.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"m6 4.5 3 3 3-3m0 9-3-3-3 3"}));var T5=$(Te()),oqe=({title:i,titleId:e,...t})=>T5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?T5.createElement("title",{id:e},i):null,T5.createElement("path",{fill:"currentColor",d:"m.75 13.25-.695-.283a.75.75 0 0 0 .99.972zM12.821 1.833l-.53.53zm0 2.069.53.53zm-2.723-2.723-.53-.53zm2.07 0 .53-.53zM2.58 8.757l.695.283zm.12-.181.531.53zm2.548 2.843-.294-.69zm.172-.116-.53-.53zm-.466-.573c-.865.369-1.536.632-2.219.9-.684.27-1.38.544-2.28.93l.59 1.38a75 75 0 0 1 2.24-.913c.683-.27 1.37-.54 2.257-.918zm-3.51 2.803L3.276 9.04l-1.39-.566-1.83 4.493zm1.787-4.427 7.397-7.397-1.06-1.06L2.17 8.045zm8.406-7.397.654.654 1.06-1.06-.653-.655zm.654 1.663-7.401 7.4 1.06 1.061 7.402-7.4zm0-1.01a.713.713 0 0 1 0 1.01l1.06 1.06a2.213 2.213 0 0 0 0-3.13zm-1.663-.653a.713.713 0 0 1 1.01 0l1.06-1.06a2.213 2.213 0 0 0-3.13 0zm-7.353 7.33a.2.2 0 0 1-.044.067l-1.06-1.06c-.123.122-.22.268-.285.428zm2.267 3.07a1.3 1.3 0 0 0 .409-.276l-1.061-1.06a.2.2 0 0 1 .064-.043z"}),T5.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.403,d:"m11.5 4.5-2-2m-4 8-2-2"}));var Uq=$(Te()),sqe=({title:i,titleId:e,...t})=>Uq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 16 18","aria-labelledby":e,...t},i?Uq.createElement("title",{id:e},i):null,Uq.createElement("path",{fill:"currentColor",d:"M0 1.66A1 1 0 0 1 1.468.778l13.863 7.34a1 1 0 0 1 0 1.767L1.468 17.223A1 1 0 0 1 0 16.339z"}));var jq=$(Te()),aqe=({title:i,titleId:e,...t})=>jq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"currentColor",viewBox:"0 0 10 16","aria-labelledby":e,...t},i?jq.createElement("title",{id:e},i):null,jq.createElement("path",{fillRule:"evenodd",d:"M4.25 9.25v4.25h1.5V9.25H10v-1.5H5.75V3.5h-1.5v4.25H0v1.5z",clipRule:"evenodd"}));var k5=$(Te()),lqe=({title:i,titleId:e,...t})=>k5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:25,fill:"none",viewBox:"0 0 25 25","aria-labelledby":e,...t},i?k5.createElement("title",{id:e},i):null,k5.createElement("path",{stroke:"currentColor",strokeWidth:1.563,d:"m10.285 24.075 3.429-6m.86 6 2.572-4.286m2.341 4.285 1.236-2.322a5.98 5.98 0 0 0-1.089-7.065l4.164-7.808a1.714 1.714 0 0 0-3.025-1.614l-4.165 7.81a5.98 5.98 0 0 0-6.473 3.025L6 24.073"}),k5.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.563,d:"m4 15 1-2 2-1-2-1-1-2-1 2-2 1 2 1zm7.5-7 1.166-2.334L15 4.5l-2.334-1.166L11.5 1l-1.166 2.334L8 4.5l2.334 1.166z"}));var I5=$(Te()),cqe=({title:i,titleId:e,...t})=>I5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 16 16","aria-labelledby":e,...t},i?I5.createElement("title",{id:e},i):null,I5.createElement("path",{stroke:"currentColor",strokeLinecap:"square",d:"M4.75 9.25h-3.5v3.5m10-6h3.5v-3.5"}),I5.createElement("path",{stroke:"currentColor",d:"M14.104 6.655a6.25 6.25 0 0 0-12.175-.142m-.033 2.832a6.25 6.25 0 0 0 12.174.142"}));var L5=$(Te()),uqe=({title:i,titleId:e,...t})=>L5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 13 13","aria-labelledby":e,...t},i?L5.createElement("title",{id:e},i):null,L5.createElement("rect",{width:11.8,height:11.8,x:.6,y:.6,stroke:"currentColor",strokeWidth:1.2,rx:5.9}),L5.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"M4.25 7.5c0-1.5 1.5-2.5 2.25-1s2.25.5 2.25-1"}));var Qq=$(Te()),dqe=({title:i,titleId:e,...t})=>Qq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 21 20","aria-labelledby":e,...t},i?Qq.createElement("title",{id:e},i):null,Qq.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.292 1.927a1.7 1.7 0 0 1-.584-.427L7.866.575A1.741 1.741 0 0 0 4.84 1.83l.064 1.25a1.743 1.743 0 0 1-1.828 1.827l-1.245-.064A1.741 1.741 0 0 0 .575 7.876l.925.836a1.733 1.733 0 0 1 0 2.584l-.925.836a1.742 1.742 0 0 0 1.25 3.028l1.246-.064a1.74 1.74 0 0 1 1.828 1.828l-.064 1.245a1.741 1.741 0 0 0 3.031 1.256l.847-.925a1.732 1.732 0 0 1 2.584 0l.836.925a1.741 1.741 0 0 0 3.031-1.256l-.064-1.245a1.743 1.743 0 0 1 1.828-1.828l1.245.064a1.74 1.74 0 0 0 1.256-3.032l-.925-.836a1.732 1.732 0 0 1 0-2.584l.925-.836a1.742 1.742 0 0 0-1.255-3.032l-1.246.064A1.743 1.743 0 0 1 15.1 3.076l.064-1.245A1.742 1.742 0 0 0 12.133.575l-.842.925a1.73 1.73 0 0 1-2 .427M14.375 10a4.375 4.375 0 1 1-8.75 0 4.375 4.375 0 0 1 8.75 0",clipRule:"evenodd"}));var Gq=$(Te()),hqe=({title:i,titleId:e,...t})=>Gq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?Gq.createElement("title",{id:e},i):null,Gq.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M6.578 1.07a.438.438 0 0 1 .844 0l1.171 3.776c.06.192.23.321.422.321h3.79c.43 0 .609.576.261.84L10 8.341a.48.48 0 0 0-.161.519l1.17 3.775c.134.428-.334.784-.682.52L7.261 10.82a.43.43 0 0 0-.522 0l-3.066 2.333c-.348.265-.816-.091-.683-.519L4.161 8.86a.48.48 0 0 0-.16-.52L.933 6.008c-.348-.264-.17-.84.26-.84h3.791c.192 0 .362-.13.422-.32z"}));var qq=$(Te()),fqe=({title:i,titleId:e,...t})=>qq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?qq.createElement("title",{id:e},i):null,qq.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M6.578 1.07a.438.438 0 0 1 .844 0l1.171 3.776c.06.192.23.321.422.321h3.79c.43 0 .609.576.261.84L10 8.341a.48.48 0 0 0-.161.519l1.17 3.775c.134.428-.334.784-.682.52L7.261 10.82a.43.43 0 0 0-.522 0l-3.066 2.333c-.348.265-.816-.091-.683-.519L4.161 8.86a.48.48 0 0 0-.16-.52L.933 6.008c-.348-.264-.17-.84.26-.84h3.791c.192 0 .362-.13.422-.32z"}));var Yq=$(Te()),pqe=({title:i,titleId:e,...t})=>Yq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 16 16","aria-labelledby":e,...t},i?Yq.createElement("title",{id:e},i):null,Yq.createElement("rect",{width:16,height:16,fill:"currentColor",rx:2}));var Kq=$(Te()),mqe=({title:i,titleId:e,...t})=>Kq.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"5em",fillRule:"evenodd","aria-hidden":"true",clipRule:"evenodd",style:{height:"1.5em"},viewBox:"0 0 23 23","aria-labelledby":e,...t},i?Kq.createElement("title",{id:e},i):null,Kq.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeWidth:.25,d:"M19 24H5a2 2 0 0 1-2-2V5H2V3h6V1.5C8 .673 8.673 0 9.5 0h5c.825 0 1.5.671 1.5 1.5V3h6v2h-1v17a2 2 0 0 1-2 2zm0-19H5v16.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5zm-7 7.586 3.293-3.293 1.414 1.414L13.414 14l3.293 3.293-1.414 1.414L12 15.414l-3.293 3.293-1.414-1.414L10.586 14l-3.293-3.293 1.414-1.414zM14 2h-4v1h4z"}));var N5=$(Te()),gqe=({title:i,titleId:e,...t})=>N5.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 13 13","aria-labelledby":e,...t},i?N5.createElement("title",{id:e},i):null,N5.createElement("rect",{width:11.8,height:11.8,x:.6,y:.6,stroke:"currentColor",strokeWidth:1.2,rx:5.9}),N5.createElement("rect",{width:2,height:2,x:5.5,y:5.5,fill:"currentColor",rx:1}));var xAe=Ko(VGe),CAe=Ko(HGe),_Ae=Ko(WGe),SAe=Ko(UGe),UT=Ko(jGe),EAe=Ko(QGe),DAe=Ko(GGe),TAe=Ko(qGe),kAe=Ko(YGe),IAe=Ko(KGe),LAe=Ko(JGe),NAe=Ko(XGe),MAe=Ko(ZGe),RAe=Ko($Ge),FAe=Ko(eqe),OAe=Ko(tqe),PAe=Ko(iqe),BAe=Ko(nqe),zAe=Ko(rqe),VAe=Ko(oqe),HAe=Ko(sqe),WAe=Ko(aqe),UAe=Ko(lqe),jAe=Ko(cqe),QAe=Ko(uqe),GAe=Ko(dqe),qAe=Ko(hqe),YAe=Ko(fqe),KAe=Ko(pqe),JAe=Ko(mqe),NM=Ko(gqe);function Ko(i){let e=i.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon",t=n=>{let r=(0,vqe.c)(2),o;return r[0]!==n?(o=(0,bqe.jsx)(i,{title:e,...n}),r[0]=n,r[1]=o):o=r[1],o};return t.displayName=i.name,t}X5();ZT();var KM=typeof navigator<"u"&&navigator.userAgent.includes("Mac");function j0(i,e="\u2318"){return KM?i.replace("Ctrl",e):i}var Us=Object.freeze({prettify:{key:"Shift-Ctrl-P",keybindings:[hb.Shift|hb.WinCtrl|wA.KeyP]},mergeFragments:{key:"Shift-Ctrl-M",keybindings:[hb.Shift|hb.WinCtrl|wA.KeyM]},runQuery:{key:"Ctrl-Enter",keybindings:[hb.CtrlCmd|wA.Enter]},autoComplete:{key:"Space"},copyQuery:{key:"Shift-Ctrl-C",keybindings:[hb.Shift|hb.WinCtrl|wA.KeyC]},refetchSchema:{key:"Shift-Ctrl-R"},searchInEditor:{key:"Ctrl-F"},searchInDocs:{key:"Ctrl-Alt-K"}}),ds={headers:"headers",visiblePlugin:"visiblePlugin",query:"query",variables:"variables",tabs:"tabState",persistHeaders:"shouldPersistHeaders",theme:"theme"},AJe=`# Welcome to GraphiQL +`+n.stack}}var HHe=Object.prototype.hasOwnProperty,LWe=ed.unstable_scheduleCallback,oHe=ed.unstable_cancelCallback,Oxi=ed.unstable_shouldYield,Pxi=ed.unstable_requestPaint,lb=ed.unstable_now,Bxi=ed.unstable_getCurrentPriorityLevel,T2t=ed.unstable_ImmediatePriority,k2t=ed.unstable_UserBlockingPriority,Cbe=ed.unstable_NormalPriority,zxi=ed.unstable_LowPriority,I2t=ed.unstable_IdlePriority,Vxi=ed.log,Hxi=ed.unstable_setDisableYieldValue,XG=null,cb=null;function fT(i){if(typeof Vxi=="function"&&Hxi(i),cb&&typeof cb.setStrictMode=="function")try{cb.setStrictMode(XG,i)}catch{}}var ub=Math.clz32?Math.clz32:jxi,Wxi=Math.log,Uxi=Math.LN2;function jxi(i){return i>>>=0,i===0?32:31-(Wxi(i)/Uxi|0)|0}var Wge=256,Uge=262144,jge=4194304;function rM(i){var e=i&42;if(e!==0)return e;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Kbe(i,e,t){var n=i.pendingLanes;if(n===0)return 0;var o=0,r=i.suspendedLanes,s=i.pingedLanes;i=i.warmLanes;var a=n&134217727;return a!==0?(n=a&~r,n!==0?o=rM(n):(s&=a,s!==0?o=rM(s):t||(t=a&~i,t!==0&&(o=rM(t))))):(a=n&~r,a!==0?o=rM(a):s!==0?o=rM(s):t||(t=n&~i,t!==0&&(o=rM(t)))),o===0?0:e!==0&&e!==o&&(e&r)===0&&(r=o&-o,t=e&-e,r>=t||r===32&&(t&4194048)!==0)?e:o}function ZG(i,e){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&e)===0}function Qxi(i,e){switch(i){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function L2t(){var i=jge;return jge<<=1,(jge&62914560)===0&&(jge=4194304),i}function rHe(i){for(var e=[],t=0;31>t;t++)e.push(i);return e}function $G(i,e){i.pendingLanes|=e,e!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Gxi(i,e,t,n,o,r){var s=i.pendingLanes;i.pendingLanes=t,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=t,i.entangledLanes&=t,i.errorRecoveryDisabledLanes&=t,i.shellSuspendCounter=0;var a=i.entanglements,l=i.expirationTimes,c=i.hiddenUpdates;for(t=s&~t;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Zxi=/[\n"\\]/g;function F0(i){return i.replace(Zxi,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function jHe(i,e,t,n,o,r,s,a){i.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?i.type=s:i.removeAttribute("type"),e!=null?s==="number"?(e===0&&i.value===""||i.value!=e)&&(i.value=""+N0(e)):i.value!==""+N0(e)&&(i.value=""+N0(e)):s!=="submit"&&s!=="reset"||i.removeAttribute("value"),e!=null?QHe(i,s,N0(e)):t!=null?QHe(i,s,N0(t)):n!=null&&i.removeAttribute("value"),o==null&&r!=null&&(i.defaultChecked=!!r),o!=null&&(i.checked=o&&typeof o!="function"&&typeof o!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?i.name=""+N0(a):i.removeAttribute("name")}function V2t(i,e,t,n,o,r,s,a){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(i.type=r),e!=null||t!=null){if(!(r!=="submit"&&r!=="reset"||e!=null)){UHe(i);return}t=t!=null?""+N0(t):"",e=e!=null?""+N0(e):t,a||e===i.value||(i.value=e),i.defaultValue=e}n=n??o,n=typeof n!="function"&&typeof n!="symbol"&&!!n,i.checked=a?i.checked:!!n,i.defaultChecked=!!n,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(i.name=s),UHe(i)}function QHe(i,e,t){e==="number"&&_be(i.ownerDocument)===i||i.defaultValue===""+t||(i.defaultValue=""+t)}function E8(i,e,t,n){if(i=i.options,e){e={};for(var o=0;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qHe=!1;if(m_)try{l8={},Object.defineProperty(l8,"passive",{get:function(){qHe=!0}}),window.addEventListener("test",l8,l8),window.removeEventListener("test",l8,l8)}catch{qHe=!1}var l8,pT=null,PWe=null,abe=null;function Q2t(){if(abe)return abe;var i,e=PWe,t=e.length,n,o="value"in pT?pT.value:pT.textContent,r=o.length;for(i=0;i=CG),uNt=" ",dNt=!1;function q2t(i,e){switch(i){case"keyup":return ECi.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y2t(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var b8=!1;function TCi(i,e){switch(i){case"compositionend":return Y2t(e);case"keypress":return e.which!==32?null:(dNt=!0,uNt);case"textInput":return i=e.data,i===uNt&&dNt?null:i;default:return null}}function kCi(i,e){if(b8)return i==="compositionend"||!zWe&&q2t(i,e)?(i=Q2t(),abe=PWe=pT=null,b8=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-i};i=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=mNt(t)}}function Z2t(i,e){return i&&e?i===e?!0:i&&i.nodeType===3?!1:e&&e.nodeType===3?Z2t(i,e.parentNode):"contains"in i?i.contains(e):i.compareDocumentPosition?!!(i.compareDocumentPosition(e)&16):!1:!1}function $2t(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var e=_be(i.document);e instanceof i.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)i=e.contentWindow;else break;e=_be(i.document)}return e}function VWe(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e&&(e==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||e==="textarea"||i.contentEditable==="true")}var PCi=m_&&"documentMode"in document&&11>=document.documentMode,A8=null,YHe=null,SG=null,KHe=!1;function bNt(i,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;KHe||A8==null||A8!==_be(n)||(n=A8,"selectionStart"in n&&VWe(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),SG&&zG(SG,n)||(SG=n,n=Wbe(YHe,"onSelect"),0>=s,o-=s,iw=1<<32-ub(e)+o|t<N?(L=T,T=null):L=T.sibling;var B=h(v,T,C[N],_);if(B===null){T===null&&(T=L);break}i&&T&&B.alternate===null&&e(v,T),w=r(B,w,N),I===null?E=B:I.sibling=B,I=B,T=L}if(N===C.length)return t(v,T),pr&&a_(v,N),E;if(T===null){for(;NN?(L=T,T=null):L=T.sibling;var z=h(v,T,B.value,_);if(z===null){T===null&&(T=L);break}i&&T&&z.alternate===null&&e(v,T),w=r(z,w,N),I===null?E=z:I.sibling=z,I=z,T=L}if(B.done)return t(v,T),pr&&a_(v,N),E;if(T===null){for(;!B.done;N++,B=C.next())B=d(v,B.value,_),B!==null&&(w=r(B,w,N),I===null?E=B:I.sibling=B,I=B);return pr&&a_(v,N),E}for(T=n(T);!B.done;N++,B=C.next())B=f(T,v,N,B.value,_),B!==null&&(i&&B.alternate!==null&&T.delete(B.key===null?N:B.key),w=r(B,w,N),I===null?E=B:I.sibling=B,I=B);return i&&T.forEach(function(Q){return e(v,Q)}),pr&&a_(v,N),E}function A(v,w,C,_){if(typeof C=="object"&&C!==null&&C.type===f8&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Hge:e:{for(var E=C.key;w!==null;){if(w.key===E){if(E=C.type,E===f8){if(w.tag===7){t(v,w.sibling),_=o(w,C.props.children),_.return=v,v=_;break e}}else if(w.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===aT&&sM(E)===w.type){t(v,w.sibling),_=o(w,C.props),fG(_,C),_.return=v,v=_;break e}t(v,w);break}else e(v,w);w=w.sibling}C.type===f8?(_=cM(C.props.children,v.mode,_,C.key),_.return=v,v=_):(_=cbe(C.type,C.key,C.props,null,v.mode,_),fG(_,C),_.return=v,v=_)}return s(v);case AG:e:{for(E=C.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===C.containerInfo&&w.stateNode.implementation===C.implementation){t(v,w.sibling),_=o(w,C.children||[]),_.return=v,v=_;break e}else{t(v,w);break}else e(v,w);w=w.sibling}_=fHe(C,v.mode,_),_.return=v,v=_}return s(v);case aT:return C=sM(C),A(v,w,C,_)}if(vG(C))return p(v,w,C,_);if(dG(C)){if(E=dG(C),typeof E!="function")throw Error(pt(150));return C=E.call(C),g(v,w,C,_)}if(typeof C.then=="function")return A(v,w,Jge(C),_);if(C.$$typeof===c_)return A(v,w,Kge(v,C),_);Xge(v,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,w!==null&&w.tag===6?(t(v,w.sibling),_=o(w,C),_.return=v,v=_):(t(v,w),_=hHe(C,v.mode,_),_.return=v,v=_),s(v)):t(v,w)}return function(v,w,C,_){try{WG=0;var E=A(v,w,C,_);return k8=null,E}catch(T){if(T===G8||T===t0e)throw T;var I=sb(29,T,null,v.mode);return I.lanes=_,I.return=v,I}}}var mM=pMt(!0),mMt=pMt(!1),lT=!1;function KWe(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iWe(i,e){i=i.updateQueue,e.updateQueue===i&&(e.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function yT(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function wT(i,e,t){var n=i.updateQueue;if(n===null)return null;if(n=n.shared,(ns&2)!==0){var o=n.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),n.pending=e,e=Ebe(i),sMt(i,null,t),e}return e0e(i,n,e,t),Ebe(i)}function DG(i,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194048)!==0)){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,M2t(i,t)}}function mHe(i,e){var t=i.updateQueue,n=i.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var o=null,r=null;if(t=t.firstBaseUpdate,t!==null){do{var s={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};r===null?o=r=s:r=r.next=s,t=t.next}while(t!==null);r===null?o=r=e:r=r.next=e}else o=r=e;t={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:r,shared:n.shared,callbacks:n.callbacks},i.updateQueue=t;return}i=t.lastBaseUpdate,i===null?t.firstBaseUpdate=e:i.next=e,t.lastBaseUpdate=e}var nWe=!1;function TG(){if(nWe){var i=T8;if(i!==null)throw i}}function kG(i,e,t,n){nWe=!1;var o=i.updateQueue;lT=!1;var r=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?r=c:s.next=c,s=l;var u=i.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(r!==null){var d=o.baseState;s=0,u=c=l=null,a=r;do{var h=a.lane&-536870913,f=h!==a.lane;if(f?($o&h)===h:(n&h)===h){h!==0&&h===F8&&(nWe=!0),u!==null&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=i,g=a;h=e;var A=t;switch(g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(A,d,h);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(A,d,h):p,h==null)break e;d=Qa({},d,h);break e;case 2:lT=!0}}h=a.callback,h!==null&&(i.flags|=64,f&&(i.flags|=8192),f=o.callbacks,f===null?o.callbacks=[h]:f.push(h))}else f={lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,s|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,r===null&&(o.shared.lanes=0),IT|=s,i.lanes=s,i.memoizedState=d}}function gMt(i,e){if(typeof i!="function")throw Error(pt(191,i));i.call(e)}function bMt(i,e){var t=i.callbacks;if(t!==null)for(i.callbacks=null,i=0;ir?r:8;var s=Sn.T,a={};Sn.T=a,lUe(i,!1,e,t);try{var l=o(),c=Sn.S;if(c!==null&&c(a,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=GCi(l,n);IG(i,e,u,db(i))}else IG(i,e,n,db(i))}catch(d){IG(i,e,{then:function(){},status:"rejected",reason:d},db())}finally{os.p=r,s!==null&&a.types!==null&&(s.types=a.types),Sn.T=s}}function ZCi(){}function lWe(i,e,t,n){if(i.tag!==5)throw Error(pt(476));var o=WMt(i).queue;HMt(i,o,e,lM,t===null?ZCi:function(){return UMt(i),t(n)})}function WMt(i){var e=i.memoizedState;if(e!==null)return e;e={memoizedState:lM,baseState:lM,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:b_,lastRenderedState:lM},next:null};var t={};return e.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:b_,lastRenderedState:t},next:null},i.memoizedState=e,i=i.alternate,i!==null&&(i.memoizedState=e),e}function UMt(i){var e=WMt(i);e.next===null&&(e=i.alternate.memoizedState),IG(i,e.next.queue,{},db())}function aUe(){return Nh(qG)}function jMt(){return Bc().memoizedState}function QMt(){return Bc().memoizedState}function $Ci(i){for(var e=i.return;e!==null;){switch(e.tag){case 24:case 3:var t=db();i=yT(t);var n=wT(e,i,t);n!==null&&(Vm(n,e,t),DG(n,e,t)),e={cache:GWe()},i.payload=e;return}e=e.return}}function e_i(i,e,t){var n=db();t={lane:n,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null},r0e(i)?qMt(e,t):(t=WWe(i,e,t,n),t!==null&&(Vm(t,i,n),YMt(t,e,n)))}function GMt(i,e,t){var n=db();IG(i,e,t,n)}function IG(i,e,t,n){var o={lane:n,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(r0e(i))qMt(e,o);else{var r=i.alternate;if(i.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var s=e.lastRenderedState,a=r(s,t);if(o.hasEagerState=!0,o.eagerState=a,hb(a,s))return e0e(i,e,o,0),oa===null&&$be(),!1}catch{}if(t=WWe(i,e,o,n),t!==null)return Vm(t,i,n),YMt(t,e,n),!0}return!1}function lUe(i,e,t,n){if(n={lane:2,revertLane:bUe(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},r0e(i)){if(e)throw Error(pt(479))}else e=WWe(i,t,n,2),e!==null&&Vm(e,i,2)}function r0e(i){var e=i.alternate;return i===uo||e!==null&&e===uo}function qMt(i,e){I8=Nbe=!0;var t=i.pending;t===null?e.next=e:(e.next=t.next,t.next=e),i.pending=e}function YMt(i,e,t){if((t&4194048)!==0){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,M2t(i,t)}}var jG={readContext:Nh,use:n0e,useCallback:lc,useContext:lc,useEffect:lc,useImperativeHandle:lc,useLayoutEffect:lc,useInsertionEffect:lc,useMemo:lc,useReducer:lc,useRef:lc,useState:lc,useDebugValue:lc,useDeferredValue:lc,useTransition:lc,useSyncExternalStore:lc,useId:lc,useHostTransitionStatus:lc,useFormState:lc,useActionState:lc,useOptimistic:lc,useMemoCache:lc,useCacheRefresh:lc};jG.useEffectEvent=lc;var KMt={readContext:Nh,use:n0e,useCallback:function(i,e){return kp().memoizedState=[i,e===void 0?null:e],i},useContext:Nh,useEffect:NNt,useImperativeHandle:function(i,e,t){t=t!=null?t.concat([i]):null,hbe(4194308,4,OMt.bind(null,e,i),t)},useLayoutEffect:function(i,e){return hbe(4194308,4,i,e)},useInsertionEffect:function(i,e){hbe(4,2,i,e)},useMemo:function(i,e){var t=kp();e=e===void 0?null:e;var n=i();if(gM){fT(!0);try{i()}finally{fT(!1)}}return t.memoizedState=[n,e],n},useReducer:function(i,e,t){var n=kp();if(t!==void 0){var o=t(e);if(gM){fT(!0);try{t(e)}finally{fT(!1)}}}else o=e;return n.memoizedState=n.baseState=o,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},n.queue=i,i=i.dispatch=e_i.bind(null,uo,i),[n.memoizedState,i]},useRef:function(i){var e=kp();return i={current:i},e.memoizedState=i},useState:function(i){i=sWe(i);var e=i.queue,t=GMt.bind(null,uo,e);return e.dispatch=t,[i.memoizedState,t]},useDebugValue:rUe,useDeferredValue:function(i,e){var t=kp();return sUe(t,i,e)},useTransition:function(){var i=sWe(!1);return i=HMt.bind(null,uo,i.queue,!0,!1),kp().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,e,t){var n=uo,o=kp();if(pr){if(t===void 0)throw Error(pt(407));t=t()}else{if(t=e(),oa===null)throw Error(pt(349));($o&127)!==0||xMt(n,e,t)}o.memoizedState=t;var r={value:t,getSnapshot:e};return o.queue=r,NNt(_Mt.bind(null,n,r,i),[i]),n.flags|=2048,P8(9,{destroy:void 0},CMt.bind(null,n,r,t,e),null),t},useId:function(){var i=kp(),e=oa.identifierPrefix;if(pr){var t=nw,n=iw;t=(n&~(1<<32-ub(n)-1)).toString(32)+t,e="_"+e+"R_"+t,t=Mbe++,0<\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?s.createElement(o,{is:n.is}):s.createElement(o)}}r[Ih]=e,r[Hm]=n;e:for(s=e.child;s!==null;){if(s.tag===5||s.tag===6)r.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)break e;for(;s.sibling===null;){if(s.return===null||s.return===e)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}e.stateNode=r;e:switch(Mh(r,o,n),o){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&n_(e)}}return Ua(e),CHe(e,e.type,i===null?null:i.memoizedProps,e.pendingProps,t),null;case 6:if(i&&e.stateNode!=null)i.memoizedProps!==n&&n_(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(pt(166));if(i=AT.current,c8(e)){if(i=e.stateNode,t=e.memoizedProps,n=null,o=Lh,o!==null)switch(o.tag){case 27:case 5:n=o.memoizedProps}i[Ih]=e,i=!!(i.nodeValue===t||n!==null&&n.suppressHydrationWarning===!0||GRt(i.nodeValue,t)),i||TT(e,!0)}else i=Ube(i).createTextNode(n),i[Ih]=e,e.stateNode=i}return Ua(e),null;case 31:if(t=e.memoizedState,i===null||i.memoizedState!==null){if(n=c8(e),t!==null){if(i===null){if(!n)throw Error(pt(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(pt(557));i[Ih]=e}else fM(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ua(e),i=!1}else t=pHe(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=t),i=!0;if(!i)return e.flags&256?(rb(e),e):(rb(e),null);if((e.flags&128)!==0)throw Error(pt(558))}return Ua(e),null;case 13:if(n=e.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(o=c8(e),n!==null&&n.dehydrated!==null){if(i===null){if(!o)throw Error(pt(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(pt(317));o[Ih]=e}else fM(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ua(e),o=!1}else o=pHe(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?(rb(e),e):(rb(e),null)}return rb(e),(e.flags&128)!==0?(e.lanes=t,e):(t=n!==null,i=i!==null&&i.memoizedState!==null,t&&(n=e.child,o=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(o=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==o&&(n.flags|=2048)),t!==i&&t&&(e.child.flags|=8192),Zge(e,e.updateQueue),Ua(e),null);case 4:return N8(),i===null&&AUe(e.stateNode.containerInfo),Ua(e),null;case 10:return f_(e.type),Ua(e),null;case 19:if(jd(Pc),n=e.memoizedState,n===null)return Ua(e),null;if(o=(e.flags&128)!==0,r=n.rendering,r===null)if(o)pG(n,!1);else{if(cc!==0||i!==null&&(i.flags&128)!==0)for(i=e.child;i!==null;){if(r=Lbe(i),r!==null){for(e.flags|=128,pG(n,!1),i=r.updateQueue,e.updateQueue=i,Zge(e,i),e.subtreeFlags=0,i=t,t=e.child;t!==null;)aMt(t,i),t=t.sibling;return Ta(Pc,Pc.current&1|2),pr&&a_(e,n.treeForkCount),e.child}i=i.sibling}n.tail!==null&&lb()>Pbe&&(e.flags|=128,o=!0,pG(n,!1),e.lanes=4194304)}else{if(!o)if(i=Lbe(r),i!==null){if(e.flags|=128,o=!0,i=i.updateQueue,e.updateQueue=i,Zge(e,i),pG(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!pr)return Ua(e),null}else 2*lb()-n.renderingStartTime>Pbe&&t!==536870912&&(e.flags|=128,o=!0,pG(n,!1),e.lanes=4194304);n.isBackwards?(r.sibling=e.child,e.child=r):(i=n.last,i!==null?i.sibling=r:e.child=r,n.last=r)}return n.tail!==null?(i=n.tail,n.rendering=i,n.tail=i.sibling,n.renderingStartTime=lb(),i.sibling=null,t=Pc.current,Ta(Pc,o?t&1|2:t&1),pr&&a_(e,n.treeForkCount),i):(Ua(e),null);case 22:case 23:return rb(e),JWe(),n=e.memoizedState!==null,i!==null?i.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(t&536870912)!==0&&(e.flags&128)===0&&(Ua(e),e.subtreeFlags&6&&(e.flags|=8192)):Ua(e),t=e.updateQueue,t!==null&&Zge(e,t.retryQueue),t=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==t&&(e.flags|=2048),i!==null&&jd(uM),null;case 24:return t=null,i!==null&&(t=i.memoizedState.cache),e.memoizedState.cache!==t&&(e.flags|=2048),f_(Iu),Ua(e),null;case 25:return null;case 30:return null}throw Error(pt(156,e.tag))}function r_i(i,e){switch(QWe(e),e.tag){case 1:return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 3:return f_(Iu),N8(),i=e.flags,(i&65536)!==0&&(i&128)===0?(e.flags=i&-65537|128,e):null;case 26:case 27:case 5:return xbe(e),null;case 31:if(e.memoizedState!==null){if(rb(e),e.alternate===null)throw Error(pt(340));fM()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 13:if(rb(e),i=e.memoizedState,i!==null&&i.dehydrated!==null){if(e.alternate===null)throw Error(pt(340));fM()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 19:return jd(Pc),null;case 4:return N8(),null;case 10:return f_(e.type),null;case 22:case 23:return rb(e),JWe(),i!==null&&jd(uM),i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 24:return f_(Iu),null;case 25:return null;default:return null}}function aRt(i,e){switch(QWe(e),e.tag){case 3:f_(Iu),N8();break;case 26:case 27:case 5:xbe(e);break;case 4:N8();break;case 31:e.memoizedState!==null&&rb(e);break;case 13:rb(e);break;case 19:jd(Pc);break;case 10:f_(e.type);break;case 22:case 23:rb(e),JWe(),i!==null&&jd(uM);break;case 24:f_(Iu)}}function oq(i,e){try{var t=e.updateQueue,n=t!==null?t.lastEffect:null;if(n!==null){var o=n.next;t=o;do{if((t.tag&i)===i){n=void 0;var r=t.create,s=t.inst;n=r(),s.destroy=n}t=t.next}while(t!==o)}}catch(a){Ts(e,e.return,a)}}function kT(i,e,t){try{var n=e.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var r=o.next;n=r;do{if((n.tag&i)===i){var s=n.inst,a=s.destroy;if(a!==void 0){s.destroy=void 0,o=e;var l=t,c=a;try{c()}catch(u){Ts(o,l,u)}}}n=n.next}while(n!==r)}}catch(u){Ts(e,e.return,u)}}function lRt(i){var e=i.updateQueue;if(e!==null){var t=i.stateNode;try{bMt(e,t)}catch(n){Ts(i,i.return,n)}}}function cRt(i,e,t){t.props=bM(i.type,i.memoizedProps),t.state=i.memoizedState;try{t.componentWillUnmount()}catch(n){Ts(i,e,n)}}function LG(i,e){try{var t=i.ref;if(t!==null){switch(i.tag){case 26:case 27:case 5:var n=i.stateNode;break;case 30:n=i.stateNode;break;default:n=i.stateNode}typeof t=="function"?i.refCleanup=t(n):t.current=n}}catch(o){Ts(i,e,o)}}function ow(i,e){var t=i.ref,n=i.refCleanup;if(t!==null)if(typeof n=="function")try{n()}catch(o){Ts(i,e,o)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof t=="function")try{t(null)}catch(o){Ts(i,e,o)}else t.current=null}function uRt(i){var e=i.type,t=i.memoizedProps,n=i.stateNode;try{e:switch(e){case"button":case"input":case"select":case"textarea":t.autoFocus&&n.focus();break e;case"img":t.src?n.src=t.src:t.srcSet&&(n.srcset=t.srcSet)}}catch(o){Ts(i,i.return,o)}}function _He(i,e,t){try{var n=i.stateNode;S_i(n,i.type,t,e),n[Hm]=e}catch(o){Ts(i,i.return,o)}}function dRt(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&NT(i.type)||i.tag===4}function SHe(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||dRt(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&NT(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function fWe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).insertBefore(i,e):(e=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,e.appendChild(i),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=u_));else if(n!==4&&(n===27&&NT(i.type)&&(t=i.stateNode,e=null),i=i.child,i!==null))for(fWe(i,e,t),i=i.sibling;i!==null;)fWe(i,e,t),i=i.sibling}function Obe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.insertBefore(i,e):t.appendChild(i);else if(n!==4&&(n===27&&NT(i.type)&&(t=i.stateNode),i=i.child,i!==null))for(Obe(i,e,t),i=i.sibling;i!==null;)Obe(i,e,t),i=i.sibling}function hRt(i){var e=i.stateNode,t=i.memoizedProps;try{for(var n=i.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);Mh(e,n,t),e[Ih]=i,e[Hm]=t}catch(r){Ts(i,i.return,r)}}var l_=!1,ku=!1,EHe=!1,QNt=typeof WeakSet=="function"?WeakSet:Set,Wd=null;function s_i(i,e){if(i=i.containerInfo,yWe=qbe,i=$2t(i),VWe(i)){if("selectionStart"in i)var t={start:i.selectionStart,end:i.selectionEnd};else e:{t=(t=i.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var o=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=i,h=null;t:for(;;){for(var f;d!==t||o!==0&&d.nodeType!==3||(a=s+o),d!==r||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===i)break t;if(h===t&&++c===o&&(a=s),h===r&&++u===n&&(l=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(wWe={focusedElem:i,selectionRange:t},qbe=!1,Wd=e;Wd!==null;)if(e=Wd,i=e.child,(e.subtreeFlags&1028)!==0&&i!==null)i.return=e,Wd=i;else for(;Wd!==null;){switch(e=Wd,r=e.alternate,i=e.flags,e.tag){case 0:if((i&4)!==0&&(i=e.updateQueue,i=i!==null?i.events:null,i!==null))for(t=0;t title"))),Mh(r,n,t),r[Ih]=i,Ud(r),n=r;break e;case"link":var s=f2t("link","href",o).get(n+(t.href||""));if(s){for(var a=0;aA&&(s=A,A=g,g=s);var v=gNt(a,g),w=gNt(a,A);if(v&&w&&(f.rangeCount!==1||f.anchorNode!==v.node||f.anchorOffset!==v.offset||f.focusNode!==w.node||f.focusOffset!==w.offset)){var C=d.createRange();C.setStart(v.node,v.offset),f.removeAllRanges(),g>A?(f.addRange(C),f.extend(w.node,w.offset)):(C.setEnd(w.node,w.offset),f.addRange(C))}}}}for(d=[],f=a;f=f.parentNode;)f.nodeType===1&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;at?32:t,Sn.T=null,t=gWe,gWe=null;var r=CT,s=p_;if($u=0,z8=CT=null,p_=0,(ns&6)!==0)throw Error(pt(331));var a=ns;if(ns|=4,CRt(r.current),yRt(r,r.current,s,t),ns=a,rq(0,!1),cb&&typeof cb.onPostCommitFiberRoot=="function")try{cb.onPostCommitFiberRoot(XG,r)}catch{}return!0}finally{os.p=o,Sn.T=n,BRt(i,e)}}function KNt(i,e,t){e=O0(t,e),e=uWe(i.stateNode,e,2),i=wT(i,e,2),i!==null&&($G(i,2),aw(i))}function Ts(i,e,t){if(i.tag===3)KNt(i,i,t);else for(;e!==null;){if(e.tag===3){KNt(e,i,t);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(xT===null||!xT.has(n))){i=O0(t,i),t=eRt(2),n=wT(e,t,2),n!==null&&(tRt(t,n,e,i),$G(n,2),aw(n));break}}e=e.return}}function THe(i,e,t){var n=i.pingCache;if(n===null){n=i.pingCache=new c_i;var o=new Set;n.set(e,o)}else o=n.get(e),o===void 0&&(o=new Set,n.set(e,o));o.has(t)||(pUe=!0,o.add(t),i=p_i.bind(null,i,e,t),e.then(i,i))}function p_i(i,e,t){var n=i.pingCache;n!==null&&n.delete(e),i.pingedLanes|=i.suspendedLanes&t,i.warmLanes&=~t,oa===i&&($o&t)===t&&(cc===4||cc===3&&($o&62914560)===$o&&300>lb()-s0e?(ns&2)===0&&V8(i,0):mUe|=t,B8===$o&&(B8=0)),aw(i)}function VRt(i,e){e===0&&(e=L2t()),i=wM(i,e),i!==null&&($G(i,e),aw(i))}function m_i(i){var e=i.memoizedState,t=0;e!==null&&(t=e.retryLane),VRt(i,t)}function g_i(i,e){var t=0;switch(i.tag){case 31:case 13:var n=i.stateNode,o=i.memoizedState;o!==null&&(t=o.retryLane);break;case 19:n=i.stateNode;break;case 22:n=i.stateNode._retryCache;break;default:throw Error(pt(314))}n!==null&&n.delete(e),VRt(i,t)}function b_i(i,e){return LWe(i,e)}var Vbe=null,h8=null,AWe=!1,Hbe=!1,kHe=!1,bT=0;function aw(i){i!==h8&&i.next===null&&(h8===null?Vbe=h8=i:h8=h8.next=i),Hbe=!0,AWe||(AWe=!0,v_i())}function rq(i,e){if(!kHe&&Hbe){kHe=!0;do for(var t=!1,n=Vbe;n!==null;){if(!e)if(i!==0){var o=n.pendingLanes;if(o===0)var r=0;else{var s=n.suspendedLanes,a=n.pingedLanes;r=(1<<31-ub(42|i)+1)-1,r&=o&~(s&~a),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(t=!0,JNt(n,r))}else r=$o,r=Kbe(n,n===oa?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(r&3)===0||ZG(n,r)||(t=!0,JNt(n,r));n=n.next}while(t);kHe=!1}}function A_i(){HRt()}function HRt(){Hbe=AWe=!1;var i=0;bT!==0&&D_i()&&(i=bT);for(var e=lb(),t=null,n=Vbe;n!==null;){var o=n.next,r=WRt(n,e);r===0?(n.next=null,t===null?Vbe=o:t.next=o,o===null&&(h8=t)):(t=n,(i!==0||(r&3)!==0)&&(Hbe=!0)),n=o}$u!==0&&$u!==5||rq(i,!1),bT!==0&&(bT=0)}function WRt(i,e){for(var t=i.suspendedLanes,n=i.pingedLanes,o=i.expirationTimes,r=i.pendingLanes&-62914561;0a)break;var u=l.transferSize,d=l.initiatorType;u&&n2t(d)&&(l=l.responseEnd,s+=u*(l"u"?null:document;function XRt(i,e,t){var n=Y8;if(n&&typeof e=="string"&&e){var o=F0(e);o='link[rel="'+i+'"][href="'+o+'"]',typeof t=="string"&&(o+='[crossorigin="'+t+'"]'),u2t.has(o)||(u2t.add(o),i={rel:i,crossOrigin:t,href:e},n.querySelector(o)===null&&(e=n.createElement("link"),Mh(e,"link",i),Ud(e),n.head.appendChild(e)))}}function O_i(i){y_.D(i),XRt("dns-prefetch",i,null)}function P_i(i,e){y_.C(i,e),XRt("preconnect",i,e)}function B_i(i,e,t){y_.L(i,e,t);var n=Y8;if(n&&i&&e){var o='link[rel="preload"][as="'+F0(e)+'"]';e==="image"&&t&&t.imageSrcSet?(o+='[imagesrcset="'+F0(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(o+='[imagesizes="'+F0(t.imageSizes)+'"]')):o+='[href="'+F0(i)+'"]';var r=o;switch(e){case"style":r=H8(i);break;case"script":r=K8(i)}V0.has(r)||(i=Qa({rel:"preload",href:e==="image"&&t&&t.imageSrcSet?void 0:i,as:e},t),V0.set(r,i),n.querySelector(o)!==null||e==="style"&&n.querySelector(sq(r))||e==="script"&&n.querySelector(aq(r))||(e=n.createElement("link"),Mh(e,"link",i),Ud(e),n.head.appendChild(e)))}}function z_i(i,e){y_.m(i,e);var t=Y8;if(t&&i){var n=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+F0(n)+'"][href="'+F0(i)+'"]',r=o;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=K8(i)}if(!V0.has(r)&&(i=Qa({rel:"modulepreload",href:i},e),V0.set(r,i),t.querySelector(o)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(aq(r)))return}n=t.createElement("link"),Mh(n,"link",i),Ud(n),t.head.appendChild(n)}}}function V_i(i,e,t){y_.S(i,e,t);var n=Y8;if(n&&i){var o=S8(n).hoistableStyles,r=H8(i);e=e||"default";var s=o.get(r);if(!s){var a={loading:0,preload:null};if(s=n.querySelector(sq(r)))a.loading=5;else{i=Qa({rel:"stylesheet",href:i,"data-precedence":e},t),(t=V0.get(r))&&vUe(i,t);var l=s=n.createElement("link");Ud(l),Mh(l,"link",i),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,gbe(s,e,n)}s={type:"stylesheet",instance:s,count:1,state:a},o.set(r,s)}}}function H_i(i,e){y_.X(i,e);var t=Y8;if(t&&i){var n=S8(t).hoistableScripts,o=K8(i),r=n.get(o);r||(r=t.querySelector(aq(o)),r||(i=Qa({src:i,async:!0},e),(e=V0.get(o))&&yUe(i,e),r=t.createElement("script"),Ud(r),Mh(r,"link",i),t.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(o,r))}}function W_i(i,e){y_.M(i,e);var t=Y8;if(t&&i){var n=S8(t).hoistableScripts,o=K8(i),r=n.get(o);r||(r=t.querySelector(aq(o)),r||(i=Qa({src:i,async:!0,type:"module"},e),(e=V0.get(o))&&yUe(i,e),r=t.createElement("script"),Ud(r),Mh(r,"link",i),t.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(o,r))}}function d2t(i,e,t,n){var o=(o=AT.current)?jbe(o):null;if(!o)throw Error(pt(446));switch(i){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(e=H8(t.href),t=S8(o).hoistableStyles,n=t.get(e),n||(n={type:"style",instance:null,count:0,state:null},t.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){i=H8(t.href);var r=S8(o).hoistableStyles,s=r.get(i);if(s||(o=o.ownerDocument||o,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(i,s),(r=o.querySelector(sq(i)))&&!r._p&&(s.instance=r,s.state.loading=5),V0.has(i)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},V0.set(i,t),r||U_i(o,i,t,s.state))),e&&n===null)throw Error(pt(528,""));return s}if(e&&n!==null)throw Error(pt(529,""));return null;case"script":return e=t.async,t=t.src,typeof t=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=K8(t),t=S8(o).hoistableScripts,n=t.get(e),n||(n={type:"script",instance:null,count:0,state:null},t.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(pt(444,i))}}function H8(i){return'href="'+F0(i)+'"'}function sq(i){return'link[rel="stylesheet"]['+i+"]"}function ZRt(i){return Qa({},i,{"data-precedence":i.precedence,precedence:null})}function U_i(i,e,t,n){i.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=i.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),Mh(e,"link",t),Ud(e),i.head.appendChild(e))}function K8(i){return'[src="'+F0(i)+'"]'}function aq(i){return"script[async]"+i}function h2t(i,e,t){if(e.count++,e.instance===null)switch(e.type){case"style":var n=i.querySelector('style[data-href~="'+F0(t.href)+'"]');if(n)return e.instance=n,Ud(n),n;var o=Qa({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return n=(i.ownerDocument||i).createElement("style"),Ud(n),Mh(n,"style",o),gbe(n,t.precedence,i),e.instance=n;case"stylesheet":o=H8(t.href);var r=i.querySelector(sq(o));if(r)return e.state.loading|=4,e.instance=r,Ud(r),r;n=ZRt(t),(o=V0.get(o))&&vUe(n,o),r=(i.ownerDocument||i).createElement("link"),Ud(r);var s=r;return s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),Mh(r,"link",n),e.state.loading|=4,gbe(r,t.precedence,i),e.instance=r;case"script":return r=K8(t.src),(o=i.querySelector(aq(r)))?(e.instance=o,Ud(o),o):(n=t,(o=V0.get(r))&&(n=Qa({},t),yUe(n,o)),i=i.ownerDocument||i,o=i.createElement("script"),Ud(o),Mh(o,"link",n),i.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(pt(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,gbe(n,t.precedence,i));return e.instance}function gbe(i,e,t){for(var n=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=n.length?n[n.length-1]:null,r=o,s=0;s title"):null)}function j_i(i,e,t){if(t===1||e.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(i=e.disabled,typeof e.precedence=="string"&&i==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function $Rt(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Q_i(i,e,t,n){if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=H8(n.href),r=e.querySelector(sq(o));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Qbe.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=r,Ud(r);return}r=e.ownerDocument||e,n=ZRt(n),(o=V0.get(o))&&vUe(n,o),r=r.createElement("link"),Ud(r);var s=r;s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),Mh(r,"link",n),t.instance=r}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=Qbe.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}var MHe=0;function G_i(i,e){return i.stylesheets&&i.count===0&&Abe(i,i.stylesheets),0MHe?50:800)+e);return i.unsuspend=t,function(){i.unsuspend=null,clearTimeout(n),clearTimeout(o)}}:null}function Qbe(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Abe(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Gbe=null;function Abe(i,e){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Gbe=new Map,e.forEach(q_i,i),Gbe=null,Qbe.call(i))}function q_i(i,e){if(!(e.state.loading&4)){var t=Gbe.get(i);if(t)var n=t.get(null);else{t=new Map,Gbe.set(i,t);for(var o=i.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r{"use strict";function lFt(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lFt)}catch(i){console.error(i)}}lFt(),cFt.exports=aFt()});var d3t=la(KAe=>{"use strict";Object.defineProperty(KAe,"__esModule",{value:!0});var tTi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e3t=(function(){function i(e,t){var n=[],o=!0,r=!1,s=void 0;try{for(var a=e[Symbol.iterator](),l;!(o=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));o=!0);}catch(c){r=!0,s=c}finally{try{!o&&a.return&&a.return()}finally{if(r)throw s}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return i(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),ss=Object.assign||function(i){for(var e=1;e"u"?d=!0:typeof c.kind=="string"&&(f=!0)}catch{}var p=o.props.selection,g=o._getArgSelection();if(!g){console.error("missing arg selection when setting arg value");return}var A=YT(o.props.arg.type),v=(0,jn.isLeafType)(A)||h||d||f;if(!v){console.warn("Unable to handle non leaf types in InputArgView.setArgValue",c);return}var w=void 0,C=void 0;c===null||typeof c>"u"?C=null:!c.target&&c.kind&&c.kind==="VariableDefinition"?(w=c,C=w.variable):typeof c.kind=="string"?C=c:c.target&&typeof c.target.value=="string"&&(w=c.target.value,C=s3t(A,w));var _=o.props.modifyFields((p.fields||[]).map(function(E){var I=E===g,T=I?ss({},E,{value:C}):E;return T}),u);return _},o._modifyChildFields=function(c){return o.props.modifyFields(o.props.selection.fields.map(function(u){return u.name.value===o.props.arg.name?ss({},u,{value:{kind:"ObjectValue",fields:c}}):u}),!0)},n),Vc(o,r)}return Sv(e,[{key:"render",value:function(){var n=this.props,o=n.arg,r=n.parentField,s=this._getArgSelection();return yt.createElement(l3t,{argValue:s?s.value:null,arg:o,parentField:r,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._modifyChildFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),e})(yt.PureComponent);function Xje(i){if((0,jn.isEnumType)(i))return{kind:"EnumValue",value:i.getValues()[0].name};switch(i.name){case"String":return{kind:"StringValue",value:""};case"Float":return{kind:"FloatValue",value:"1.5"};case"Int":return{kind:"IntValue",value:"10"};case"Boolean":return{kind:"BooleanValue",value:!1};default:return{kind:"StringValue",value:""}}}function a3t(i,e,t){return Xje(t)}var dTi=(function(i){Dv(e,i);function e(){var t,n,o,r;Ev(this,e);for(var s=arguments.length,a=Array(s),l=0;l"u"?d=!0:typeof c.kind=="string"&&(f=!0)}catch{}var p=o.props.selection,g=o._getArgSelection();if(!g&&!h){console.error("missing arg selection when setting arg value");return}var A=YT(o.props.arg.type),v=(0,jn.isLeafType)(A)||h||d||f;if(!v){console.warn("Unable to handle non leaf types in ArgView._setArgValue");return}var w=void 0,C=void 0;return c===null||typeof c>"u"?C=null:c.target&&typeof c.target.value=="string"?(w=c.target.value,C=s3t(A,w)):!c.target&&c.kind==="VariableDefinition"?(w=c,C=w.variable):typeof c.kind=="string"&&(C=c),o.props.modifyArguments((p.arguments||[]).map(function(_){return _===g?ss({},_,{value:C}):_}),u)},o._setArgFields=function(c,u){var d=o.props.selection,h=o._getArgSelection();if(!h){console.error("missing arg selection when setting arg value");return}return o.props.modifyArguments((d.arguments||[]).map(function(f){return f===h?ss({},f,{value:{kind:"ObjectValue",fields:c}}):f}),u)},n),Vc(o,r)}return Sv(e,[{key:"render",value:function(){var n=this.props,o=n.arg,r=n.parentField,s=this._getArgSelection();return yt.createElement(l3t,{argValue:s?s.value:null,arg:o,parentField:r,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._setArgFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),e})(yt.PureComponent);function hTi(i){return i.ctrlKey&&i.key==="Enter"}function fTi(i){return i!=="FragmentDefinition"}var pTi=(function(i){Dv(e,i);function e(){var t,n,o,r;Ev(this,e);for(var s=arguments.length,a=Array(s),l=0;l0?w=""+A+v:w=A;var C=s.type.toString(),_=(0,jn.parseType)(C),E={kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:w}},type:_,directives:[]},I=function(ue){return(n.props.definition.variableDefinitions||[]).find(function(Ie){return Ie.variable.name.value===ue})},T=void 0,N={};if(typeof r<"u"&&r!==null){var L=(0,jn.visit)(r,{Variable:function(ue){var Ie=ue.name.value,nt=I(Ie);if(N[Ie]=N[Ie]+1||1,!!nt)return nt.defaultValue}}),B=E.type.kind==="NonNullType",z=B?ss({},E,{type:E.type.type}):E;T=ss({},z,{defaultValue:L})}else T=E;var Q=Object.entries(N).filter(function(re){var ue=e3t(re,2),Ie=ue[0],nt=ue[1];return nt<2}).map(function(re){var ue=e3t(re,2),Ie=ue[0],nt=ue[1];return Ie});if(T){var Z=n.props.setArgValue(T,!1);if(Z){var U=Z.definitions.find(function(re){return re.operation&&re.name&&re.name.value&&n.props.definition.name&&n.props.definition.name.value?re.name.value===n.props.definition.name.value:!1}),M=[].concat(q0(U.variableDefinitions||[]),[T]).filter(function(re){return Q.indexOf(re.variable.name.value)===-1}),ee=ss({},U,{variableDefinitions:M}),X=Z.definitions,Y=X.map(function(re){return U===re?ee:re}),$=ss({},Z,{definitions:Y});n.props.onCommit($)}}},h=function(){if(!(!r||!r.name||!r.name.value)){var A=r.name.value,v=(n.props.definition.variableDefinitions||[]).find(function(z){return z.variable.name.value===A});if(v){var w=v.defaultValue,C=n.props.setArgValue(w,{commit:!1});if(C){var _=C.definitions.find(function(z){return z.name.value===n.props.definition.name.value});if(!_)return;var E=0;(0,jn.visit)(_,{Variable:function(Q){Q.name.value===A&&(E=E+1)}});var I=_.variableDefinitions||[];E<2&&(I=I.filter(function(z){return z.variable.name.value!==A}));var T=ss({},_,{variableDefinitions:I}),N=C.definitions,L=N.map(function(z){return _===z?T:z}),B=ss({},C,{definitions:L});n.props.onCommit(B)}}}},f=r&&r.kind==="Variable",p=this.state.displayArgActions?yt.createElement("button",{type:"submit",className:"toolbar-button",title:f?"Remove the variable":"Extract the current value into a GraphQL variable",onClick:function(A){A.preventDefault(),A.stopPropagation(),f?h():d()},style:a.styles.actionButtonStyle},yt.createElement("span",{style:{color:a.colors.variable}},"$")):null;return yt.createElement("div",{style:{cursor:"pointer",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-arg-name":s.name,"data-arg-type":l.name,className:"graphiql-explorer-"+s.name},yt.createElement("span",{style:{cursor:"pointer"},onClick:function(A){var v=!r;v?n.props.addArg(!0):n.props.removeArg(!0),n.setState({displayArgActions:v})}},(0,jn.isInputObjectType)(l)?yt.createElement("span",null,r?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):yt.createElement(qAe,{checked:!!r,styleConfig:this.props.styleConfig}),yt.createElement("span",{style:{color:a.colors.attribute},title:s.description,onMouseEnter:function(){r!==null&&typeof r<"u"&&n.setState({displayArgActions:!0})},onMouseLeave:function(){return n.setState({displayArgActions:!1})}},s.name,r3t(s)?"*":"",": ",p," ")," "),c||yt.createElement("span",null)," ")}}]),e})(yt.PureComponent),mTi=(function(i){Dv(e,i);function e(){var t,n,o,r;Ev(this,e);for(var s=arguments.length,a=Array(s),l=0;l0;w&&n.setState({displayFieldActions:!0})},onMouseLeave:function(){return n.setState({displayFieldActions:!1})}},(0,jn.isObjectType)(u)?yt.createElement("span",null,c?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):null,(0,jn.isObjectType)(u)?null:yt.createElement(qAe,{checked:!!c,styleConfig:this.props.styleConfig}),yt.createElement("span",{style:{color:l.colors.property},className:"graphiql-explorer-field-view"},r.name),this.state.displayFieldActions?yt.createElement("button",{type:"submit",className:"toolbar-button",title:"Extract selections into a new reusable fragment",onClick:function(w){w.preventDefault(),w.stopPropagation();var C=u.name,_=C+"Fragment",E=(f||[]).filter(function(z){return z.name.value.startsWith(_)}).length;E>0&&(_=""+_+E);var I=c?c.selectionSet?c.selectionSet.selections:[]:[],T=[{kind:"FragmentSpread",name:{kind:"Name",value:_},directives:[]}],N={kind:"FragmentDefinition",name:{kind:"Name",value:_},typeCondition:{kind:"NamedType",name:{kind:"Name",value:u.name}},directives:[],selectionSet:{kind:"SelectionSet",selections:I}},L=n._modifyChildSelections(T,!1);if(L){var B=ss({},L,{definitions:[].concat(q0(L.definitions),[N])});n.props.onCommit(B)}else console.warn("Unable to complete extractFragment operation")},style:ss({},l.styles.actionButtonStyle)},yt.createElement("span",null,"\u2026")):null),c&&d.length?yt.createElement("div",{style:{marginLeft:16},className:"graphiql-explorer-graphql-arguments"},d.map(function(v){return yt.createElement(dTi,{key:v.name,parentField:r,arg:v,selection:c,modifyArguments:n._setArguments,getDefaultScalarArgValue:n.props.getDefaultScalarArgValue,makeDefaultArg:n.props.makeDefaultArg,onRunOperation:n.props.onRunOperation,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit,definition:n.props.definition})})):null);if(c&&((0,jn.isObjectType)(u)||(0,jn.isInterfaceType)(u)||(0,jn.isUnionType)(u))){var g=(0,jn.isUnionType)(u)?{}:u.getFields(),A=c?c.selectionSet?c.selectionSet.selections:[]:[];return yt.createElement("div",{className:"graphiql-explorer-"+r.name},p,yt.createElement("div",{style:{marginLeft:16}},f?f.map(function(v){var w=s.getType(v.typeCondition.name.value),C=v.name.value;return w?yt.createElement(gTi,{key:C,fragment:v,selections:A,modifySelections:n._modifyChildSelections,schema:s,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit}):null}):null,Object.keys(g).sort().map(function(v){return yt.createElement(e,{key:v,field:g[v],selections:A,modifySelections:n._modifyChildSelections,schema:s,getDefaultFieldNames:a,getDefaultScalarArgValue:n.props.getDefaultScalarArgValue,makeDefaultArg:n.props.makeDefaultArg,onRunOperation:n.props.onRunOperation,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit,definition:n.props.definition,availableFragments:n.props.availableFragments})}),(0,jn.isInterfaceType)(u)||(0,jn.isUnionType)(u)?s.getPossibleTypes(u).map(function(v){return yt.createElement(mTi,{key:v.name,implementingType:v,selections:A,modifySelections:n._modifyChildSelections,schema:s,getDefaultFieldNames:a,getDefaultScalarArgValue:n.props.getDefaultScalarArgValue,makeDefaultArg:n.props.makeDefaultArg,onRunOperation:n.props.onRunOperation,styleConfig:n.props.styleConfig,onCommit:n.props.onCommit,definition:n.props.definition})}):null))}return p}}]),e})(yt.PureComponent);function bTi(i){try{return i.trim()?(0,jn.parse)(i,{noLocation:!0}):null}catch(e){return new Error(e)}}var ATi={kind:"OperationDefinition",operation:"query",variableDefinitions:[],name:{kind:"Name",value:"MyQuery"},directives:[],selectionSet:{kind:"SelectionSet",selections:[]}},GAe={kind:"Document",definitions:[ATi]},x5=null;function vTi(i){if(x5&&x5[0]===i)return x5[1];var e=bTi(i);return e?e instanceof Error?x5?x5[1]:GAe:(x5=[i,e],e):GAe}var n3t={buttonStyle:{fontSize:"1.2em",padding:"0px",backgroundColor:"white",border:"none",margin:"5px 0px",height:"40px",width:"100%",display:"block",maxWidth:"none"},actionButtonStyle:{padding:"0px",backgroundColor:"white",border:"none",margin:"0px",maxWidth:"none",height:"15px",width:"15px",display:"inline-block",fontSize:"smaller"},explorerActionsStyle:{margin:"4px -8px -8px",paddingLeft:"8px",bottom:"0px",width:"100%",textAlign:"center",background:"none",borderTop:"none",borderBottom:"none"}},yTi=(function(i){Dv(e,i);function e(){var t,n,o,r;Ev(this,e);for(var s=arguments.length,a=Array(s),l=0;l"u"?"undefined":tTi(zt))==="object"&&typeof zt.commit<"u"?Fi=zt.commit:Fi=!0,Fe){var Kt=ss({},g,{definitions:g.definitions.map(function(Li){return Li===M?Fe:Li})});return Fi&&wt(Kt),Kt}else return g},schema:r,getDefaultFieldNames:A,getDefaultScalarArgValue:v,makeDefaultArg:a,onRunOperation:function(){n.props.onRunOperation&&n.props.onRunOperation(X)},styleConfig:l,availableFragments:Z})}),U),B)}}]),e})(yt.PureComponent);u3t.defaultProps={getDefaultFieldNames:o3t,getDefaultScalarArgValue:a3t};var xTi=(function(i){Dv(e,i);function e(){var t,n,o,r;Ev(this,e);for(var s=arguments.length,a=Array(s),l=0;l{"use strict";Object.defineProperty(aY,"__esModule",{value:!0});aY.Explorer=void 0;var CTi=d3t(),h3t=_Ti(CTi);function _Ti(i){return i&&i.__esModule?i:{default:i}}aY.Explorer=h3t.default;aY.default=h3t.default});var K4t=la(Y4t=>{"use strict";var xY=ke();function oIi(i,e){return i===e&&(i!==0||1/i===1/e)||i!==i&&e!==e}var rIi=typeof Object.is=="function"?Object.is:oIi,sIi=xY.useSyncExternalStore,aIi=xY.useRef,lIi=xY.useEffect,cIi=xY.useMemo,uIi=xY.useDebugValue;Y4t.useSyncExternalStoreWithSelector=function(i,e,t,n,o){var r=aIi(null);if(r.current===null){var s={hasValue:!1,value:null};r.current=s}else s=r.current;r=cIi(function(){function l(f){if(!c){if(c=!0,u=f,f=n(f),o!==void 0&&s.hasValue){var p=s.value;if(o(p,f))return d=p}return d=f}if(p=d,rIi(u,f))return p;var g=n(f);return o!==void 0&&o(p,g)?(u=f,p):(u=f,d=g)}var c=!1,u,d,h=t===void 0?null:t;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,t,n,o]);var a=sIi(i,r[0],r[1]);return lIi(function(){s.hasValue=!0,s.value=a},[a]),uIi(a),a}});var X4t=la((icr,J4t)=>{"use strict";J4t.exports=K4t()});var s9t=new URL(".",document.currentScript?.src??window.location.href),Tye=i=>new URL(i,s9t).href;globalThis.MonacoEnvironment={getWorker(i,e){switch(e){case"json":return new Worker(Tye("json.worker.js"));case"graphql":return new Worker(Tye("graphql.worker.js"));default:return new Worker(Tye("editor.worker.js"))}}};var QM=ae(zi()),Rf=ae(ke()),p3t=ae(ke());var Hqe=ae(zi()),Wqe=ae(fo());var s6=ae(ke()),uqe=({title:i,titleId:e,...t})=>s6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?s6.createElement("title",{id:e},i):null,s6.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"M5.048 1.408a2.76 2.76 0 0 1 3.904 0l3.64 3.64a2.76 2.76 0 0 1 0 3.904l-3.64 3.64a2.76 2.76 0 0 1-3.904 0l-3.64-3.64a2.76 2.76 0 0 1 0-3.904z"}),s6.createElement("rect",{width:2,height:2,x:6,y:6,fill:"currentColor",rx:1}));var mK=ae(ke()),dqe=({title:i,titleId:e,...t})=>mK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 9","aria-labelledby":e,...t},i?mK.createElement("title",{id:e},i):null,mK.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"m1 1 6 6 6-6"}));var gK=ae(ke()),hqe=({title:i,titleId:e,...t})=>gK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 7 10","aria-labelledby":e,...t},i?gK.createElement("title",{id:e},i):null,gK.createElement("path",{stroke:"currentColor",strokeWidth:1.75,d:"m6 1.048-4 4 4 4"}));var bK=ae(ke()),fqe=({title:i,titleId:e,...t})=>bK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 9","aria-labelledby":e,...t},i?bK.createElement("title",{id:e},i):null,bK.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M13 8 7 2 1 8"}));var AK=ae(ke()),pqe=({title:i,titleId:e,...t})=>AK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",stroke:"currentColor",strokeWidth:3,viewBox:"0 0 14 14","aria-labelledby":e,...t},i?AK.createElement("title",{id:e},i):null,AK.createElement("path",{d:"m1 1 12 12m0-12L1 13"}));var a6=ae(ke()),mqe=({title:i,titleId:e,...t})=>a6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"-2 -2 22 22","aria-labelledby":e,...t},i?a6.createElement("title",{id:e},i):null,a6.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M11.25 14.21v1.025a2.015 2.015 0 0 1-2.015 2.015h-6.47A2.015 2.015 0 0 1 .75 15.235v-6.47c0-1.113.902-2.015 2.015-2.015h1.024"}),a6.createElement("rect",{width:10.5,height:10.5,x:6.75,y:.75,stroke:"currentColor",strokeWidth:1.5,rx:2.207}));var vK=ae(ke()),gqe=({title:i,titleId:e,...t})=>vK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?vK.createElement("title",{id:e},i):null,vK.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"M5.048 1.408a2.76 2.76 0 0 1 3.904 0l3.64 3.64a2.76 2.76 0 0 1 0 3.904l-3.64 3.64a2.76 2.76 0 0 1-3.904 0l-3.64-3.64a2.76 2.76 0 0 1 0-3.904zM5 9l4-4M5 5l4 4"}));var l6=ae(ke()),bqe=({title:i,titleId:e,...t})=>l6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?l6.createElement("title",{id:e},i):null,l6.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"m4 8 4-4M4 4l4 4"}),l6.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.5 1.2H9A1.8 1.8 0 0 1 10.8 3v6A1.8 1.8 0 0 1 9 10.8h-.5V12H9a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3h-.5zm-5 0V0H3a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h.5v-1.2H3A1.8 1.8 0 0 1 1.2 9V3A1.8 1.8 0 0 1 3 1.2z",clipRule:"evenodd"}));var c6=ae(ke()),Aqe=({title:i,titleId:e,...t})=>c6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?c6.createElement("title",{id:e},i):null,c6.createElement("rect",{width:10.8,height:10.8,x:.6,y:.6,stroke:"currentColor",strokeWidth:1.2,rx:3.4}),c6.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"m4 8 4-4M4 4l4 4"}));var u6=ae(ke()),vqe=({title:i,titleId:e,...t})=>u6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0.5 12 12","aria-labelledby":e,...t},i?u6.createElement("title",{id:e},i):null,u6.createElement("rect",{width:2,height:2,x:7,y:5.5,fill:"currentColor",rx:1,transform:"rotate(90 7 5.5)"}),u6.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.8 9v.5A1.8 1.8 0 0 1 9 11.3H3a1.8 1.8 0 0 1-1.8-1.8V9H0v.5a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9zm0-5H12v-.5a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3V4h1.2v-.5A1.8 1.8 0 0 1 3 1.7h6a1.8 1.8 0 0 1 1.8 1.8z",clipRule:"evenodd"}));var dR=ae(ke()),yqe=({title:i,titleId:e,...t})=>dR.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 20 24","aria-labelledby":e,...t},i?dR.createElement("title",{id:e},i):null,dR.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M.75 3A2.25 2.25 0 0 1 3 .75h14.25a1 1 0 0 1 1 1v3.5"}),dR.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M.75 3A2.25 2.25 0 0 0 3 5.25h15.25a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3A2.25 2.25 0 0 1 .75 21z"}),dR.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 5.25A2.25 2.25 0 0 1 .75 3v18A2.25 2.25 0 0 0 3 23.25h15.25a1 1 0 0 0 1-1v-16a1 1 0 0 0-1-1zM13 11H6v1.5h7z",clipRule:"evenodd"}));var yK=ae(ke()),wqe=({title:i,titleId:e,...t})=>yK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 20 24","aria-labelledby":e,...t},i?yK.createElement("title",{id:e},i):null,yK.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M.75 3A2.25 2.25 0 0 0 3 5.25h14.25M.75 3A2.25 2.25 0 0 1 3 .75h13.25a1 1 0 0 1 1 1v3.5M.75 3v18A2.25 2.25 0 0 0 3 23.25h15.25a1 1 0 0 0 1-1v-16a1 1 0 0 0-1-1h-1M13 11.75H6"}));var d6=ae(ke()),xqe=({title:i,titleId:e,...t})=>d6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?d6.createElement("title",{id:e},i):null,d6.createElement("rect",{width:2,height:2,x:5,y:5,fill:"currentColor",rx:1}),d6.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.5 1.2H9A1.8 1.8 0 0 1 10.8 3v6A1.8 1.8 0 0 1 9 10.8h-.5V12H9a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3h-.5zm-5 0V0H3a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h.5v-1.2H3A1.8 1.8 0 0 1 1.2 9V3A1.8 1.8 0 0 1 3 1.2z",clipRule:"evenodd"}));var h6=ae(ke()),Cqe=({title:i,titleId:e,...t})=>h6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 13","aria-labelledby":e,...t},i?h6.createElement("title",{id:e},i):null,h6.createElement("rect",{width:10.8,height:10.8,x:.6,y:1.1,stroke:"currentColor",strokeWidth:1.2,rx:2.4}),h6.createElement("rect",{width:2,height:2,x:5,y:5.5,fill:"currentColor",rx:1}));var f6=ae(ke()),_qe=({title:i,titleId:e,...t})=>f6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 24 20","aria-labelledby":e,...t},i?f6.createElement("title",{id:e},i):null,f6.createElement("path",{stroke:"currentColor",strokeLinecap:"square",strokeWidth:1.5,d:"m1.594 9.523 3.279 3.471 3.206-3.582M13.75 5.25v5.5h5"}),f6.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M4.954 11.933A9.25 9.25 0 1 1 14 19.25"}));var p6=ae(ke()),Sqe=({title:i,titleId:e,...t})=>p6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 12 12","aria-labelledby":e,...t},i?p6.createElement("title",{id:e},i):null,p6.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeDasharray:"4.241025 4.241025",strokeWidth:1.2,transform:"rotate(22.5 6 6)"}),p6.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"}));var m6=ae(ke()),Eqe=({title:i,titleId:e,...t})=>m6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 19 18","aria-labelledby":e,...t},i?m6.createElement("title",{id:e},i):null,m6.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.125,d:"M1.5 14.565a2.435 2.435 0 0 0 4.87 0v-2.434H3.935A2.434 2.434 0 0 0 1.5 14.564M3.935 1a2.435 2.435 0 1 0 0 4.87H6.37V3.435a2.435 2.435 0 0 0-2.435-2.434m11.13 11.129H12.63v2.435a2.435 2.435 0 1 0 2.435-2.434m-2.433-6.263H6.37v6.26h6.262z"}),m6.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.125,d:"M17.5 3.435a2.435 2.435 0 1 0-4.87 0v2.434h2.435A2.435 2.435 0 0 0 17.5 3.435"}));var g6=ae(ke()),Dqe=({title:i,titleId:e,...t})=>g6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 13 13","aria-labelledby":e,...t},i?g6.createElement("title",{id:e},i):null,g6.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),g6.createElement("path",{stroke:"currentColor",strokeWidth:1.3,d:"m8.46 8.54 3.292 3.293"}));var b6=ae(ke()),Tqe=({title:i,titleId:e,...t})=>b6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"-2 -2 22 22","aria-labelledby":e,...t},i?b6.createElement("title",{id:e},i):null,b6.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M17.25 6V2.957A2.207 2.207 0 0 0 15.041.75H2.957A2.207 2.207 0 0 0 .75 2.957V6m0 6v3.043c0 1.219.988 2.207 2.207 2.207h12.085a2.207 2.207 0 0 0 2.207-2.207V12"}),b6.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"m6 4.5 3 3 3-3m0 9-3-3-3 3"}));var A6=ae(ke()),kqe=({title:i,titleId:e,...t})=>A6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?A6.createElement("title",{id:e},i):null,A6.createElement("path",{fill:"currentColor",d:"m.75 13.25-.695-.283a.75.75 0 0 0 .99.972zM12.821 1.833l-.53.53zm0 2.069.53.53zm-2.723-2.723-.53-.53zm2.07 0 .53-.53zM2.58 8.757l.695.283zm.12-.181.531.53zm2.548 2.843-.294-.69zm.172-.116-.53-.53zm-.466-.573c-.865.369-1.536.632-2.219.9-.684.27-1.38.544-2.28.93l.59 1.38a75 75 0 0 1 2.24-.913c.683-.27 1.37-.54 2.257-.918zm-3.51 2.803L3.276 9.04l-1.39-.566-1.83 4.493zm1.787-4.427 7.397-7.397-1.06-1.06L2.17 8.045zm8.406-7.397.654.654 1.06-1.06-.653-.655zm.654 1.663-7.401 7.4 1.06 1.061 7.402-7.4zm0-1.01a.713.713 0 0 1 0 1.01l1.06 1.06a2.213 2.213 0 0 0 0-3.13zm-1.663-.653a.713.713 0 0 1 1.01 0l1.06-1.06a2.213 2.213 0 0 0-3.13 0zm-7.353 7.33a.2.2 0 0 1-.044.067l-1.06-1.06c-.123.122-.22.268-.285.428zm2.267 3.07a1.3 1.3 0 0 0 .409-.276l-1.061-1.06a.2.2 0 0 1 .064-.043z"}),A6.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.403,d:"m11.5 4.5-2-2m-4 8-2-2"}));var wK=ae(ke()),Iqe=({title:i,titleId:e,...t})=>wK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 16 18","aria-labelledby":e,...t},i?wK.createElement("title",{id:e},i):null,wK.createElement("path",{fill:"currentColor",d:"M0 1.66A1 1 0 0 1 1.468.778l13.863 7.34a1 1 0 0 1 0 1.767L1.468 17.223A1 1 0 0 1 0 16.339z"}));var xK=ae(ke()),Lqe=({title:i,titleId:e,...t})=>xK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"currentColor",viewBox:"0 0 10 16","aria-labelledby":e,...t},i?xK.createElement("title",{id:e},i):null,xK.createElement("path",{fillRule:"evenodd",d:"M4.25 9.25v4.25h1.5V9.25H10v-1.5H5.75V3.5h-1.5v4.25H0v1.5z",clipRule:"evenodd"}));var v6=ae(ke()),Nqe=({title:i,titleId:e,...t})=>v6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:25,fill:"none",viewBox:"0 0 25 25","aria-labelledby":e,...t},i?v6.createElement("title",{id:e},i):null,v6.createElement("path",{stroke:"currentColor",strokeWidth:1.563,d:"m10.285 24.075 3.429-6m.86 6 2.572-4.286m2.341 4.285 1.236-2.322a5.98 5.98 0 0 0-1.089-7.065l4.164-7.808a1.714 1.714 0 0 0-3.025-1.614l-4.165 7.81a5.98 5.98 0 0 0-6.473 3.025L6 24.073"}),v6.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.563,d:"m4 15 1-2 2-1-2-1-1-2-1 2-2 1 2 1zm7.5-7 1.166-2.334L15 4.5l-2.334-1.166L11.5 1l-1.166 2.334L8 4.5l2.334 1.166z"}));var y6=ae(ke()),Mqe=({title:i,titleId:e,...t})=>y6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 16 16","aria-labelledby":e,...t},i?y6.createElement("title",{id:e},i):null,y6.createElement("path",{stroke:"currentColor",strokeLinecap:"square",d:"M4.75 9.25h-3.5v3.5m10-6h3.5v-3.5"}),y6.createElement("path",{stroke:"currentColor",d:"M14.104 6.655a6.25 6.25 0 0 0-12.175-.142m-.033 2.832a6.25 6.25 0 0 0 12.174.142"}));var w6=ae(ke()),Rqe=({title:i,titleId:e,...t})=>w6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 13 13","aria-labelledby":e,...t},i?w6.createElement("title",{id:e},i):null,w6.createElement("rect",{width:11.8,height:11.8,x:.6,y:.6,stroke:"currentColor",strokeWidth:1.2,rx:5.9}),w6.createElement("path",{stroke:"currentColor",strokeWidth:1.2,d:"M4.25 7.5c0-1.5 1.5-2.5 2.25-1s2.25.5 2.25-1"}));var CK=ae(ke()),Fqe=({title:i,titleId:e,...t})=>CK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 21 20","aria-labelledby":e,...t},i?CK.createElement("title",{id:e},i):null,CK.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.292 1.927a1.7 1.7 0 0 1-.584-.427L7.866.575A1.741 1.741 0 0 0 4.84 1.83l.064 1.25a1.743 1.743 0 0 1-1.828 1.827l-1.245-.064A1.741 1.741 0 0 0 .575 7.876l.925.836a1.733 1.733 0 0 1 0 2.584l-.925.836a1.742 1.742 0 0 0 1.25 3.028l1.246-.064a1.74 1.74 0 0 1 1.828 1.828l-.064 1.245a1.741 1.741 0 0 0 3.031 1.256l.847-.925a1.732 1.732 0 0 1 2.584 0l.836.925a1.741 1.741 0 0 0 3.031-1.256l-.064-1.245a1.743 1.743 0 0 1 1.828-1.828l1.245.064a1.74 1.74 0 0 0 1.256-3.032l-.925-.836a1.732 1.732 0 0 1 0-2.584l.925-.836a1.742 1.742 0 0 0-1.255-3.032l-1.246.064A1.743 1.743 0 0 1 15.1 3.076l.064-1.245A1.742 1.742 0 0 0 12.133.575l-.842.925a1.73 1.73 0 0 1-2 .427M14.375 10a4.375 4.375 0 1 1-8.75 0 4.375 4.375 0 0 1 8.75 0",clipRule:"evenodd"}));var _K=ae(ke()),Oqe=({title:i,titleId:e,...t})=>_K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?_K.createElement("title",{id:e},i):null,_K.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M6.578 1.07a.438.438 0 0 1 .844 0l1.171 3.776c.06.192.23.321.422.321h3.79c.43 0 .609.576.261.84L10 8.341a.48.48 0 0 0-.161.519l1.17 3.775c.134.428-.334.784-.682.52L7.261 10.82a.43.43 0 0 0-.522 0l-3.066 2.333c-.348.265-.816-.091-.683-.519L4.161 8.86a.48.48 0 0 0-.16-.52L.933 6.008c-.348-.264-.17-.84.26-.84h3.791c.192 0 .362-.13.422-.32z"}));var SK=ae(ke()),Pqe=({title:i,titleId:e,...t})=>SK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 14 14","aria-labelledby":e,...t},i?SK.createElement("title",{id:e},i):null,SK.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"M6.578 1.07a.438.438 0 0 1 .844 0l1.171 3.776c.06.192.23.321.422.321h3.79c.43 0 .609.576.261.84L10 8.341a.48.48 0 0 0-.161.519l1.17 3.775c.134.428-.334.784-.682.52L7.261 10.82a.43.43 0 0 0-.522 0l-3.066 2.333c-.348.265-.816-.091-.683-.519L4.161 8.86a.48.48 0 0 0-.16-.52L.933 6.008c-.348-.264-.17-.84.26-.84h3.791c.192 0 .362-.13.422-.32z"}));var EK=ae(ke()),Bqe=({title:i,titleId:e,...t})=>EK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 16 16","aria-labelledby":e,...t},i?EK.createElement("title",{id:e},i):null,EK.createElement("rect",{width:16,height:16,fill:"currentColor",rx:2}));var DK=ae(ke()),zqe=({title:i,titleId:e,...t})=>DK.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"5em",fillRule:"evenodd","aria-hidden":"true",clipRule:"evenodd",style:{height:"1.5em"},viewBox:"0 0 23 23","aria-labelledby":e,...t},i?DK.createElement("title",{id:e},i):null,DK.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeWidth:.25,d:"M19 24H5a2 2 0 0 1-2-2V5H2V3h6V1.5C8 .673 8.673 0 9.5 0h5c.825 0 1.5.671 1.5 1.5V3h6v2h-1v17a2 2 0 0 1-2 2zm0-19H5v16.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5zm-7 7.586 3.293-3.293 1.414 1.414L13.414 14l3.293 3.293-1.414 1.414L12 15.414l-3.293 3.293-1.414-1.414L10.586 14l-3.293-3.293 1.414-1.414zM14 2h-4v1h4z"}));var x6=ae(ke()),Vqe=({title:i,titleId:e,...t})=>x6.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 13 13","aria-labelledby":e,...t},i?x6.createElement("title",{id:e},i):null,x6.createElement("rect",{width:11.8,height:11.8,x:.6,y:.6,stroke:"currentColor",strokeWidth:1.2,rx:5.9}),x6.createElement("rect",{width:2,height:2,x:5.5,y:5.5,fill:"currentColor",rx:1}));var Bye=Yr(uqe),zye=Yr(dqe),Vye=Yr(hqe),Hye=Yr(fqe),fk=Yr(pqe),Wye=Yr(mqe),Uye=Yr(gqe),jye=Yr(bqe),Qye=Yr(Aqe),Gye=Yr(vqe),qye=Yr(yqe),Yye=Yr(wqe),Kye=Yr(xqe),Jye=Yr(Cqe),Xye=Yr(_qe),Zye=Yr(Sqe),$ye=Yr(Eqe),e1e=Yr(Dqe),t1e=Yr(Tqe),i1e=Yr(kqe),n1e=Yr(Iqe),o1e=Yr(Lqe),r1e=Yr(Nqe),s1e=Yr(Mqe),a1e=Yr(Rqe),l1e=Yr(Fqe),c1e=Yr(Oqe),u1e=Yr(Pqe),d1e=Yr(Bqe),h1e=Yr(zqe),hR=Yr(Vqe);function Yr(i){let e=i.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon",t=n=>{let o=(0,Wqe.c)(2),r;return o[0]!==n?(r=(0,Hqe.jsx)(i,{title:e,...n}),o[0]=n,o[1]=r):r=o[1],r};return t.displayName=i.name,t}H6();xk();var kR=typeof navigator<"u"&&navigator.userAgent.includes("Mac");function nA(i,e="\u2318"){return kR?i.replace("Ctrl",e):i}var Ys=Object.freeze({prettify:{key:"Shift-Ctrl-P",keybindings:[Eb.Shift|Eb.WinCtrl|Hv.KeyP]},mergeFragments:{key:"Shift-Ctrl-M",keybindings:[Eb.Shift|Eb.WinCtrl|Hv.KeyM]},runQuery:{key:"Ctrl-Enter",keybindings:[Eb.CtrlCmd|Hv.Enter]},autoComplete:{key:"Space"},copyQuery:{key:"Shift-Ctrl-C",keybindings:[Eb.Shift|Eb.WinCtrl|Hv.KeyC]},refetchSchema:{key:"Shift-Ctrl-R"},searchInEditor:{key:"Ctrl-F"},searchInDocs:{key:"Ctrl-Alt-K"}}),us={headers:"headers",visiblePlugin:"visiblePlugin",query:"query",variables:"variables",tabs:"tabState",persistHeaders:"shouldPersistHeaders",theme:"theme"},UJe=`# Welcome to GraphiQL # # GraphiQL is an in-browser tool for writing, validating, and testing # GraphQL queries. @@ -1050,26 +1050,26 @@ Error generating stack: `+n.message+` # # Keyboard shortcuts: # -# Prettify query: ${Us.prettify.key} (or press the prettify button) +# Prettify query: ${Ys.prettify.key} (or press the prettify button) # -# Merge fragments: ${Us.mergeFragments.key} (or press the merge button) +# Merge fragments: ${Ys.mergeFragments.key} (or press the merge button) # -# Run Query: ${j0(Us.runQuery.key,"Cmd")} (or press the play button) +# Run Query: ${nA(Ys.runQuery.key,"Cmd")} (or press the play button) # -# Auto Complete: ${Us.autoComplete.key} (or just start typing) +# Auto Complete: ${Ys.autoComplete.key} (or just start typing) # -`,Mf={prettify:{id:"graphql-prettify",label:"Prettify Editors",contextMenuGroupId:"graphql",keybindings:Us.prettify.keybindings},mergeFragments:{id:"graphql-merge",label:"Merge Fragments into Query",contextMenuGroupId:"graphql",keybindings:Us.mergeFragments.keybindings},runQuery:{id:"graphql-run",label:"Run Operation",contextMenuGroupId:"graphql",keybindings:Us.runQuery.keybindings},copyQuery:{id:"graphql-copy",label:"Copy Query",contextMenuGroupId:"graphql",keybindings:Us.copyQuery.keybindings}},kA={operation:"operation.graphql",schema:"schema.graphql",variables:"variables.json",requestHeaders:"request-headers.json",response:"response.json"},s1e={allowComments:!0,trailingCommas:"ignore"},l6={validateVariablesJSON:{},jsonDiagnosticSettings:{validate:!0,schemaValidation:"error",...s1e}},yJe=async i=>{let[e,{printers:t},{parsers:n}]=await Promise.all([Promise.resolve().then(()=>($ye(),Zye)),Promise.resolve().then(()=>(pJe(),fJe)),Promise.resolve().then(()=>$(bJe()))]);return e.format(i,{parser:"graphql",plugins:[{printers:t},{parsers:n}]})},c6={dark:"graphiql-DARK",light:"graphiql-LIGHT"},Ws={transparent:"#ffffff00",bg:{dark:"#212a3b",light:"#ffffffff"},primary:{dark:"#ff5794",light:"#d60590"},primaryBg:{dark:"#ff579419",light:"#d6059019"},secondary:{dark:"#b7c2d711",light:"#3b4b6811"}},vJe=i=>({"editor.background":Ws.transparent,"scrollbar.shadow":Ws.transparent,"textLink.foreground":Ws.primary[i],"textLink.activeForeground":Ws.primary[i],"editorLink.activeForeground":Ws.primary[i],"editorHoverWidget.background":Ws.bg[i],"list.hoverBackground":Ws.primaryBg[i],"list.highlightForeground":Ws.primary[i],"list.focusHighlightForeground":Ws.primary[i],"menu.background":Ws.bg[i],"editorSuggestWidget.background":Ws.bg[i],"editorSuggestWidget.selectedBackground":Ws.primaryBg[i],"editorSuggestWidget.selectedForeground":Ws.primary[i],"quickInput.background":Ws.bg[i],"quickInputList.focusForeground":i==="dark"?"#ffffff":"#444444","highlighted.label":Ws.primary[i],"quickInput.widget":Ws.primary[i],highlight:Ws.primary[i],"editorWidget.background":Ws.bg[i],"input.background":Ws.secondary[i],focusBorder:Ws.primary[i],"toolbar.hoverBackground":Ws.primaryBg[i],"inputOption.hoverBackground":Ws.primaryBg[i],"quickInputList.focusBackground":Ws.primaryBg[i],"editorWidget.resizeBorder":Ws.primary[i],"pickerGroup.foreground":Ws.primary[i],"menu.selectionBackground":Ws.primaryBg[i],"menu.selectionForeground":Ws.primary[i]}),a1e={dark:{base:"vs-dark",inherit:!0,colors:vJe("dark"),rules:[{token:"argument.identifier.gql",foreground:"#908aff"}]},light:{base:"vs",inherit:!0,colors:vJe("light"),rules:[{token:"argument.identifier.gql",foreground:"#6c69ce"}]}};var Z9e=$(Hi()),$9e=$(ur()),mm=$(Te());var wJe=i=>{let e,t=new Set,n=(c,u)=>{let d=typeof c=="function"?c(e):c;if(!Object.is(d,e)){let h=e;e=u??(typeof d!="object"||d===null)?d:Object.assign({},e,d),t.forEach(f=>f(e,h))}},r=()=>e,a={setState:n,getState:r,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=e=i(n,r,a);return a},M_=(i=>i?wJe(i):wJe);var u6=$(Te(),1);var nqt=i=>i;function d6(i,e=nqt){let t=u6.default.useSyncExternalStore(i.subscribe,u6.default.useCallback(()=>e(i.getState()),[i,e]),u6.default.useCallback(()=>e(i.getInitialState()),[i,e]));return u6.default.useDebugValue(t),t}var xJe=i=>{let e=M_(i),t=n=>d6(e,n);return Object.assign(t,e),t},CJe=(i=>i?xJe(i):xJe);var _Je=i=>Symbol.iterator in i,SJe=i=>"entries"in i,EJe=(i,e)=>{let t=i instanceof Map?i:new Map(i.entries()),n=e instanceof Map?e:new Map(e.entries());if(t.size!==n.size)return!1;for(let[r,o]of t)if(!n.has(r)||!Object.is(o,n.get(r)))return!1;return!0},rqt=(i,e)=>{let t=i[Symbol.iterator](),n=e[Symbol.iterator](),r=t.next(),o=n.next();for(;!r.done&&!o.done;){if(!Object.is(r.value,o.value))return!1;r=t.next(),o=n.next()}return!!r.done&&!!o.done};function DJe(i,e){return Object.is(i,e)?!0:typeof i!="object"||i===null||typeof e!="object"||e===null||Object.getPrototypeOf(i)!==Object.getPrototypeOf(e)?!1:_Je(i)&&_Je(e)?SJe(i)&&SJe(e)?EJe(i,e):rqt(i,e):EJe({entries:()=>Object.entries(i)},{entries:()=>Object.entries(e)})}var TJe=$(Te(),1);function h6(i){let e=TJe.default.useRef(void 0);return t=>{let n=i(t);return DJe(e.current,n)?e.current:e.current=n}}var oqt=Object.defineProperty,sqt=Object.defineProperties,aqt=Object.getOwnPropertyDescriptors,kJe=Object.getOwnPropertySymbols,lqt=Object.prototype.hasOwnProperty,cqt=Object.prototype.propertyIsEnumerable;var IJe=(i,e,t)=>e in i?oqt(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,IA=(i,e)=>{for(var t in e||(e={}))lqt.call(e,t)&&IJe(i,t,e[t]);if(kJe)for(var t of kJe(e))cqt.call(e,t)&&IJe(i,t,e[t]);return i},R_=(i,e)=>sqt(i,aqt(e));function LJe(i){return typeof i=="object"&&i!==null&&typeof i.then=="function"}function uqt(i){return new Promise((e,t)=>{let n=i.subscribe({next(r){e(r),n.unsubscribe()},error:t,complete(){t(new Error("no value resolved"))}})})}function l1e(i){return typeof i=="object"&&i!==null&&"subscribe"in i&&typeof i.subscribe=="function"}function c1e(i){return typeof i=="object"&&i!==null&&(i[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in i)}async function dqt(i){var e;let t=(e=("return"in i?i:i[Symbol.asyncIterator]()).return)==null?void 0:e.bind(i),n=await("next"in i?i:i[Symbol.asyncIterator]()).next.bind(i)();return t?.(),n.value}async function NJe(i){let e=await i;return c1e(e)?dqt(e):l1e(e)?uqt(e):e}function QCe(i){return JSON.stringify(i,null,2)}function Ari(i){return R_(IA({},i),{message:i.message,stack:i.stack})}function Ltt(i){return i instanceof Error?Ari(i):i}function $_(i){return Array.isArray(i)?QCe({errors:i.map(e=>Ltt(e))}):QCe({errors:[Ltt(i)]})}function c9(i){return QCe(i)}var qd=$(na());function Ntt(i,e,t){let n=[];if(!i||!e)return{insertions:n,result:e};let r;try{r=(0,qd.parse)(e)}catch{return{insertions:n,result:e}}let o=t||yri,s=new qd.TypeInfo(i);return(0,qd.visit)(r,{leave(a){s.leave(a)},enter(a){if(s.enter(a),a.kind==="Field"&&!a.selectionSet){let l=s.getType(),c=Mtt(Cri(l),o);if(c&&a.loc){let u=xri(e,a.loc.start);n.push({index:a.loc.end,string:" "+(0,qd.print)(c).replaceAll(` +`,jf={prettify:{id:"graphql-prettify",label:"Prettify Editors",contextMenuGroupId:"graphql",keybindings:Ys.prettify.keybindings},mergeFragments:{id:"graphql-merge",label:"Merge Fragments into Query",contextMenuGroupId:"graphql",keybindings:Ys.mergeFragments.keybindings},runQuery:{id:"graphql-run",label:"Run Operation",contextMenuGroupId:"graphql",keybindings:Ys.runQuery.keybindings},copyQuery:{id:"graphql-copy",label:"Copy Query",contextMenuGroupId:"graphql",keybindings:Ys.copyQuery.keybindings}},Kv={operation:"operation.graphql",schema:"schema.graphql",variables:"variables.json",requestHeaders:"request-headers.json",response:"response.json"},xwe={allowComments:!0,trailingCommas:"ignore"},Z6={validateVariablesJSON:{},jsonDiagnosticSettings:{validate:!0,schemaValidation:"error",...xwe}},jJe=async i=>{let[e,{printers:t},{parsers:n}]=await Promise.all([Promise.resolve().then(()=>(mwe(),pwe)),Promise.resolve().then(()=>(BJe(),PJe)),Promise.resolve().then(()=>ae(HJe()))]);return e.format(i,{parser:"graphql",plugins:[{printers:t},{parsers:n}]})},$6={dark:"graphiql-DARK",light:"graphiql-LIGHT"},qs={transparent:"#ffffff00",bg:{dark:"#212a3b",light:"#ffffffff"},primary:{dark:"#ff5794",light:"#d60590"},primaryBg:{dark:"#ff579419",light:"#d6059019"},secondary:{dark:"#b7c2d711",light:"#3b4b6811"}},WJe=i=>({"editor.background":qs.transparent,"scrollbar.shadow":qs.transparent,"textLink.foreground":qs.primary[i],"textLink.activeForeground":qs.primary[i],"editorLink.activeForeground":qs.primary[i],"editorHoverWidget.background":qs.bg[i],"list.hoverBackground":qs.primaryBg[i],"list.highlightForeground":qs.primary[i],"list.focusHighlightForeground":qs.primary[i],"menu.background":qs.bg[i],"editorSuggestWidget.background":qs.bg[i],"editorSuggestWidget.selectedBackground":qs.primaryBg[i],"editorSuggestWidget.selectedForeground":qs.primary[i],"quickInput.background":qs.bg[i],"quickInputList.focusForeground":i==="dark"?"#ffffff":"#444444","highlighted.label":qs.primary[i],"quickInput.widget":qs.primary[i],highlight:qs.primary[i],"editorWidget.background":qs.bg[i],"input.background":qs.secondary[i],focusBorder:qs.primary[i],"toolbar.hoverBackground":qs.primaryBg[i],"inputOption.hoverBackground":qs.primaryBg[i],"quickInputList.focusBackground":qs.primaryBg[i],"editorWidget.resizeBorder":qs.primary[i],"pickerGroup.foreground":qs.primary[i],"menu.selectionBackground":qs.primaryBg[i],"menu.selectionForeground":qs.primary[i]}),Cwe={dark:{base:"vs-dark",inherit:!0,colors:WJe("dark"),rules:[{token:"argument.identifier.gql",foreground:"#908aff"}]},light:{base:"vs",inherit:!0,colors:WJe("light"),rules:[{token:"argument.identifier.gql",foreground:"#6c69ce"}]}};var w7e=ae(zi()),x7e=ae(fo()),Nm=ae(ke());var QJe=i=>{let e,t=new Set,n=(c,u)=>{let d=typeof c=="function"?c(e):c;if(!Object.is(d,e)){let h=e;e=u??(typeof d!="object"||d===null)?d:Object.assign({},e,d),t.forEach(f=>f(e,h))}},o=()=>e,a={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=e=i(n,o,a);return a},nS=(i=>i?QJe(i):QJe);var e9=ae(ke(),1);var rQt=i=>i;function t9(i,e=rQt){let t=e9.default.useSyncExternalStore(i.subscribe,e9.default.useCallback(()=>e(i.getState()),[i,e]),e9.default.useCallback(()=>e(i.getInitialState()),[i,e]));return e9.default.useDebugValue(t),t}var GJe=i=>{let e=nS(i),t=n=>t9(e,n);return Object.assign(t,e),t},qJe=(i=>i?GJe(i):GJe);var YJe=i=>Symbol.iterator in i,KJe=i=>"entries"in i,JJe=(i,e)=>{let t=i instanceof Map?i:new Map(i.entries()),n=e instanceof Map?e:new Map(e.entries());if(t.size!==n.size)return!1;for(let[o,r]of t)if(!n.has(o)||!Object.is(r,n.get(o)))return!1;return!0},sQt=(i,e)=>{let t=i[Symbol.iterator](),n=e[Symbol.iterator](),o=t.next(),r=n.next();for(;!o.done&&!r.done;){if(!Object.is(o.value,r.value))return!1;o=t.next(),r=n.next()}return!!o.done&&!!r.done};function XJe(i,e){return Object.is(i,e)?!0:typeof i!="object"||i===null||typeof e!="object"||e===null||Object.getPrototypeOf(i)!==Object.getPrototypeOf(e)?!1:YJe(i)&&YJe(e)?KJe(i)&&KJe(e)?JJe(i,e):sQt(i,e):JJe({entries:()=>Object.entries(i)},{entries:()=>Object.entries(e)})}var ZJe=ae(ke(),1);function i9(i){let e=ZJe.default.useRef(void 0);return t=>{let n=i(t);return XJe(e.current,n)?e.current:e.current=n}}var aQt=Object.defineProperty,lQt=Object.defineProperties,cQt=Object.getOwnPropertyDescriptors,$Je=Object.getOwnPropertySymbols,uQt=Object.prototype.hasOwnProperty,dQt=Object.prototype.propertyIsEnumerable;var eXe=(i,e,t)=>e in i?aQt(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Jv=(i,e)=>{for(var t in e||(e={}))uQt.call(e,t)&&eXe(i,t,e[t]);if($Je)for(var t of $Je(e))dQt.call(e,t)&&eXe(i,t,e[t]);return i},oS=(i,e)=>lQt(i,cQt(e));function tXe(i){return typeof i=="object"&&i!==null&&typeof i.then=="function"}function hQt(i){return new Promise((e,t)=>{let n=i.subscribe({next(o){e(o),n.unsubscribe()},error:t,complete(){t(new Error("no value resolved"))}})})}function _we(i){return typeof i=="object"&&i!==null&&"subscribe"in i&&typeof i.subscribe=="function"}function Swe(i){return typeof i=="object"&&i!==null&&(i[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in i)}async function fQt(i){var e;let t=(e=("return"in i?i:i[Symbol.asyncIterator]()).return)==null?void 0:e.bind(i),n=await("next"in i?i:i[Symbol.asyncIterator]()).next.bind(i)();return t?.(),n.value}async function iXe(i){let e=await i;return Swe(e)?fQt(e):_we(e)?hQt(e):e}function p_e(i){return JSON.stringify(i,null,2)}function fYt(i){return oS(Jv({},i),{message:i.message,stack:i.stack})}function B$e(i){return i instanceof Error?fYt(i):i}function CS(i){return Array.isArray(i)?p_e({errors:i.map(e=>B$e(e))}):p_e({errors:[B$e(i)]})}function H7(i){return p_e(i)}ua();function z$e(i,e,t){let n=[];if(!i||!e)return{insertions:n,result:e};let o;try{o=Zc(e)}catch{return{insertions:n,result:e}}let r=t||pYt,s=new sg(i);return ca(o,{leave(a){s.leave(a)},enter(a){if(s.enter(a),a.kind==="Field"&&!a.selectionSet){let l=s.getType(),c=V$e(bYt(l),r);if(c&&a.loc){let u=gYt(e,a.loc.start);n.push({index:a.loc.end,string:" "+Rn(c).replaceAll(` `,` -`+u)})}}}}),{insertions:n,result:wri(e,n)}}function yri(i){if(!("getFields"in i))return[];let e=i.getFields();if(e.id)return["id"];if(e.edges)return["edges"];if(e.node)return["node"];let t=[];for(let n of Object.keys(e))(0,qd.isLeafType)(e[n].type)&&t.push(n);return t}function Mtt(i,e){let t=(0,qd.getNamedType)(i);if(!i||(0,qd.isLeafType)(i))return;let n=e(t);if(!(!Array.isArray(n)||n.length===0||!("getFields"in t)))return{kind:qd.Kind.SELECTION_SET,selections:n.map(r=>{let o=t.getFields()[r],s=o?o.type:null;return{kind:qd.Kind.FIELD,name:{kind:qd.Kind.NAME,value:r},selectionSet:Mtt(s,e)}})}}function wri(i,e){if(e.length===0)return i;let t="",n=0;for(let{index:r,string:o}of e)t+=i.slice(n,r)+o,n=r;return t+=i.slice(n),t}function xri(i,e){let t=e,n=e;for(;t;){let r=i.charCodeAt(t-1);if(r===10||r===13||r===8232||r===8233)break;t--,r!==9&&r!==11&&r!==12&&r!==32&&r!==160&&(n=t)}return i.slice(t,n)}function Cri(i){if(i)return i}var Gm=$(na());function _ri(i,e){var t;let n=new Map,r=[];for(let o of i)if(o.kind==="Field"){let s=e(o),a=n.get(s);if((t=o.directives)!=null&&t.length){let l=IA({},o);r.push(l)}else if(a!=null&&a.selectionSet&&o.selectionSet)a.selectionSet.selections=[...a.selectionSet.selections,...o.selectionSet.selections];else if(!a){let l=IA({},o);n.set(s,l),r.push(l)}}else r.push(o);return r}function Rtt(i,e,t){var n;let r=t?(0,Gm.getNamedType)(t).name:null,o=[],s=[];for(let a of e){if(a.kind==="FragmentSpread"){let l=a.name.value;if(!a.directives||a.directives.length===0){if(s.includes(l))continue;s.push(l)}let c=i[a.name.value];if(c){let{typeCondition:u,directives:d,selectionSet:h}=c;a={kind:Gm.Kind.INLINE_FRAGMENT,typeCondition:u,directives:d,selectionSet:h}}}if(a.kind===Gm.Kind.INLINE_FRAGMENT&&(!a.directives||((n=a.directives)==null?void 0:n.length)===0)){let l=a.typeCondition?a.typeCondition.name.value:null;if(!l||l===r){o.push(...Rtt(i,a.selectionSet.selections,t));continue}}o.push(a)}return o}function Ftt(i,e){let t=e?new Gm.TypeInfo(e):null,n=Object.create(null);for(let s of i.definitions)s.kind===Gm.Kind.FRAGMENT_DEFINITION&&(n[s.name.value]=s);let r={SelectionSet(s){let a=t?t.getParentType():null,{selections:l}=s;return l=Rtt(n,l,a),R_(IA({},s),{selections:l})},FragmentDefinition(){return null}},o=(0,Gm.visit)(i,t?(0,Gm.visitWithTypeInfo)(t,r):r);return(0,Gm.visit)(o,{SelectionSet(s){let{selections:a}=s;return a=_ri(a,l=>l.alias?l.alias.value:l.name.value),R_(IA({},s),{selections:a})},FragmentDefinition(){return null}})}function Ott(i,e,t){if(!t||t.length<1)return;let n=t.map(r=>{var o;return(o=r.name)==null?void 0:o.value});if(e&&n.includes(e))return e;if(e&&i){let r=i.map(o=>{var s;return(s=o.name)==null?void 0:s.value}).indexOf(e);if(r!==-1&&r"u"?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let t=0;for(let n in localStorage)n.indexOf(`${rX}:`)===0&&(t+=1);return t},clear(){for(let t in localStorage)t.indexOf(`${rX}:`)===0&&localStorage.removeItem(t)}}}get(e){if(!this.storage)return null;let t=`${rX}:${e}`,n=this.storage.getItem(t);return n==="null"||n==="undefined"?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,r=null;if(this.storage){let o=`${rX}:${e}`;if(t)try{this.storage.setItem(o,t)}catch(s){r=s instanceof Error?s:new Error(`${s}`),n=Sri(this.storage,s)}else this.storage.removeItem(o)}return{isQuotaError:n,error:r}}clear(){this.storage&&this.storage.clear()}},rX="graphiql";var Ptt=$(na());var u9=class{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some(t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName)}edit(e,t){if(typeof t=="number"&&this.items[t]){let r=this.items[t];if(r.query===e.query&&r.variables===e.variables&&r.headers===e.headers&&r.operationName===e.operationName){this.items.splice(t,1,e),this.save();return}}let n=this.items.findIndex(r=>r.query===e.query&&r.variables===e.variables&&r.headers===e.headers&&r.operationName===e.operationName);n!==-1&&(this.items.splice(n,1,e),this.save())}delete(e){let t=this.items.findIndex(n=>n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName);t!==-1&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){let e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){let t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){let r=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(!(r!=null&&r.error))this.items=t;else if(r.isQuotaError&&this.maxSize)t.shift();else return}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}};var Eri=1e5,sX=class{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:n,variables:r,headers:o,operationName:s})=>{if(!this.shouldSaveQuery(n,r,o,this.history.fetchRecent()))return;this.history.push({query:n,variables:r,headers:o,operationName:s});let a=this.history.items,l=this.favorite.items;this.queries=a.concat(l)},this.deleteHistory=({query:n,variables:r,headers:o,operationName:s,favorite:a},l=!1)=>{function c(u){let d=u.items.find(h=>h.query===n&&h.variables===r&&h.headers===o&&h.operationName===s);d&&u.delete(d)}(a||l)&&c(this.favorite),(!a||l)&&c(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new u9("queries",this.storage,this.maxHistoryLength),this.favorite=new u9("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,r){if(!e)return!1;try{(0,Ptt.parse)(e)}catch{return!1}return e.length>Eri?!1:r?!(JSON.stringify(e)===JSON.stringify(r.query)&&(JSON.stringify(t)===JSON.stringify(r.variables)&&(JSON.stringify(n)===JSON.stringify(r.headers)||n&&!r.headers)||t&&!r.variables)):!0}toggleFavorite({query:e,variables:t,headers:n,operationName:r,label:o,favorite:s}){let a={query:e,variables:t,headers:n,operationName:r,label:o};s?(a.favorite=!1,this.favorite.delete(a),this.history.push(a)):(a.favorite=!0,this.favorite.push(a),this.history.delete(a)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:r,label:o,favorite:s},a){let l={query:e,variables:t,headers:n,operationName:r,label:o};s?this.favorite.edit(R_(IA({},l),{favorite:s}),a):this.history.edit(l,a),this.queries=[...this.history.items,...this.favorite.items]}};var yot=$(na());function ztt({defaultQuery:i,defaultHeaders:e,headers:t,query:n,variables:r,defaultTabs:o=[{query:n??i,variables:r,headers:t??e}],shouldPersistHeaders:s,storage:a}){let l=a.get(ds.tabs);try{if(!l)throw new Error("Storage for tabs is empty");let c=JSON.parse(l),u=s?t:void 0;if(Dri(c)){let d=aX({query:n,variables:r,headers:u}),h=-1;for(let f=0;f=0)c.activeTabIndex=h;else{let f=n?KCe(n):null;c.tabs.push({id:Vtt(),hash:d,title:f||JCe,query:n,variables:r,headers:t,operationName:f,response:null}),c.activeTabIndex=c.tabs.length-1}return c}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:o.map(qCe)}}}function Dri(i){return i&&typeof i=="object"&&!Array.isArray(i)&&kri(i,"activeTabIndex")&&"tabs"in i&&Array.isArray(i.tabs)&&i.tabs.every(Tri)}function Tri(i){return i&&typeof i=="object"&&!Array.isArray(i)&&Btt(i,"id")&&Btt(i,"title")&&d9(i,"query")&&d9(i,"variables")&&d9(i,"headers")&&d9(i,"operationName")&&d9(i,"response")}function kri(i,e){return e in i&&typeof i[e]=="number"}function Btt(i,e){return e in i&&typeof i[e]=="string"}function d9(i,e){return e in i&&(typeof i[e]=="string"||i[e]===null)}function GCe(i,e=!1){return JSON.stringify(i,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}function qCe({query:i=null,variables:e=null,headers:t=null}={}){let n=i?KCe(i):null;return{id:Vtt(),hash:aX({query:i,variables:e,headers:t}),title:n||JCe,query:i,variables:e,headers:t,operationName:n,response:null}}function YCe(i,e){return{...i,tabs:i.tabs.map((t,n)=>{if(n!==i.activeTabIndex)return t;let r={...t,...e};return{...r,hash:aX(r),title:r.operationName||(r.query?KCe(r.query):void 0)||JCe}})}}function Vtt(){let i=()=>Math.floor((1+Math.random())*65536).toString(16).slice(1);return`${i()}${i()}-${i()}-${i()}-${i()}-${i()}${i()}${i()}`}function aX(i){return[i.query??"",i.variables??"",i.headers??""].join("|")}function KCe(i){let t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(i);return t?.[2]??null}function Htt(i){let e=i.get(ds.tabs);if(e){let t=JSON.parse(e);i.set(ds.tabs,JSON.stringify(t,(n,r)=>n==="headers"?null:r))}}var JCe="";function lX(i,e=!1){let t=i.length,n=0,r="",o=0,s=16,a=0,l=0,c=0,u=0,d=0;function h(C,_){let E=0,I=0;for(;E=48&&T<=57)I=I*16+T-48;else if(T>=65&&T<=70)I=I*16+T-65+10;else if(T>=97&&T<=102)I=I*16+T-97+10;else break;n++,E++}return E=t){C+=i.substring(_,n),d=2;break}let E=i.charCodeAt(n);if(E===34){C+=i.substring(_,n),n++;break}if(E===92){if(C+=i.substring(_,n),n++,n>=t){d=2;break}switch(i.charCodeAt(n++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=` -`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:let T=h(4,!0);T>=0?C+=String.fromCharCode(T):d=4;break;default:d=5}_=n;continue}if(E>=0&&E<=31)if(h9(E)){C+=i.substring(_,n),d=2;break}else d=6;n++}return C}function v(){if(r="",d=0,o=n,l=a,u=c,n>=t)return o=t,s=17;let C=i.charCodeAt(n);if(XCe(C)){do n++,r+=String.fromCharCode(C),C=i.charCodeAt(n);while(XCe(C));return s=15}if(h9(C))return n++,r+=String.fromCharCode(C),C===13&&i.charCodeAt(n)===10&&(n++,r+=` -`),a++,c=n,s=14;switch(C){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,r=g(),s=10;case 47:let _=n-1;if(i.charCodeAt(n+1)===47){for(n+=2;n=12&&C<=15);return C}return{setPosition:f,getPosition:()=>n,scan:e?w:v,getToken:()=>s,getTokenValue:()=>r,getTokenOffset:()=>o,getTokenLength:()=>n-o,getTokenStartLine:()=>l,getTokenStartCharacter:()=>o-u,getTokenError:()=>d}}function XCe(i){return i===32||i===9}function h9(i){return i===10||i===13}function TR(i){return i>=48&&i<=57}var Wtt;(function(i){i[i.lineFeed=10]="lineFeed",i[i.carriageReturn=13]="carriageReturn",i[i.space=32]="space",i[i._0=48]="_0",i[i._1=49]="_1",i[i._2=50]="_2",i[i._3=51]="_3",i[i._4=52]="_4",i[i._5=53]="_5",i[i._6=54]="_6",i[i._7=55]="_7",i[i._8=56]="_8",i[i._9=57]="_9",i[i.a=97]="a",i[i.b=98]="b",i[i.c=99]="c",i[i.d=100]="d",i[i.e=101]="e",i[i.f=102]="f",i[i.g=103]="g",i[i.h=104]="h",i[i.i=105]="i",i[i.j=106]="j",i[i.k=107]="k",i[i.l=108]="l",i[i.m=109]="m",i[i.n=110]="n",i[i.o=111]="o",i[i.p=112]="p",i[i.q=113]="q",i[i.r=114]="r",i[i.s=115]="s",i[i.t=116]="t",i[i.u=117]="u",i[i.v=118]="v",i[i.w=119]="w",i[i.x=120]="x",i[i.y=121]="y",i[i.z=122]="z",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.asterisk=42]="asterisk",i[i.backslash=92]="backslash",i[i.closeBrace=125]="closeBrace",i[i.closeBracket=93]="closeBracket",i[i.colon=58]="colon",i[i.comma=44]="comma",i[i.dot=46]="dot",i[i.doubleQuote=34]="doubleQuote",i[i.minus=45]="minus",i[i.openBrace=123]="openBrace",i[i.openBracket=91]="openBracket",i[i.plus=43]="plus",i[i.slash=47]="slash",i[i.formFeed=12]="formFeed",i[i.tab=9]="tab"})(Wtt||(Wtt={}));var Lri=new Array(20).fill(0).map((i,e)=>" ".repeat(e)),kR=200,Nri={" ":{"\n":new Array(kR).fill(0).map((i,e)=>` -`+" ".repeat(e)),"\r":new Array(kR).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(kR).fill(0).map((i,e)=>`\r -`+" ".repeat(e))}," ":{"\n":new Array(kR).fill(0).map((i,e)=>` -`+" ".repeat(e)),"\r":new Array(kR).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(kR).fill(0).map((i,e)=>`\r -`+" ".repeat(e))}};var cX;(function(i){i.DEFAULT={allowTrailingComma:!1}})(cX||(cX={}));function Utt(i,e=[],t=cX.DEFAULT){let n=null,r=[],o=[];function s(l){Array.isArray(r)?r.push(l):n!==null&&(r[n]=l)}return jtt(i,{onObjectBegin:()=>{let l={};s(l),o.push(r),r=l,n=null},onObjectProperty:l=>{n=l},onObjectEnd:()=>{r=o.pop()},onArrayBegin:()=>{let l=[];s(l),o.push(r),r=l,n=null},onArrayEnd:()=>{r=o.pop()},onLiteralValue:s,onError:(l,c,u)=>{e.push({error:l,offset:c,length:u})}},t),r[0]}function jtt(i,e,t=cX.DEFAULT){let n=lX(i,!1),r=[],o=0;function s(U){return U?()=>o===0&&U(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function a(U){return U?F=>o===0&&U(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function l(U){return U?F=>o===0&&U(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>r.slice()):()=>!0}function c(U){return U?()=>{o>0?o++:U(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>r.slice())===!1&&(o=1)}:()=>!0}function u(U){return U?()=>{o>0&&o--,o===0&&U(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let d=c(e.onObjectBegin),h=l(e.onObjectProperty),f=u(e.onObjectEnd),p=c(e.onArrayBegin),g=u(e.onArrayEnd),v=l(e.onLiteralValue),A=a(e.onSeparator),w=s(e.onComment),C=a(e.onError),_=t&&t.disallowComments,E=t&&t.allowTrailingComma;function I(){for(;;){let U=n.scan();switch(n.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:_||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(U){case 12:case 13:_?T(10):w();break;case 16:T(1);break;case 15:case 14:break;default:return U}}}function T(U,F=[],ne=[]){if(C(U),F.length+ne.length>0){let ce=n.getToken();for(;ce!==17;){if(F.indexOf(ce)!==-1){I();break}else if(ne.indexOf(ce)!==-1)break;ce=I()}}}function L(U){let F=n.getTokenValue();return U?v(F):(h(F),r.push(F)),I(),!0}function M(){switch(n.getToken()){case 11:let U=n.getTokenValue(),F=Number(U);isNaN(F)&&(T(2),F=0),v(F);break;case 7:v(null);break;case 8:v(!0);break;case 9:v(!1);break;default:return!1}return I(),!0}function z(){return n.getToken()!==10?(T(3,[],[2,5]),!1):(L(!1),n.getToken()===6?(A(":"),I(),q()||T(4,[],[2,5])):T(5,[],[2,5]),r.pop(),!0)}function H(){d(),I();let U=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(U||T(4,[],[]),A(","),I(),n.getToken()===2&&E)break}else U&&T(6,[],[]);z()||T(4,[],[2,5]),U=!0}return f(),n.getToken()!==2?T(7,[2],[]):I(),!0}function B(){p(),I();let U=!0,F=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(F||T(4,[],[]),A(","),I(),n.getToken()===4&&E)break}else F&&T(6,[],[]);U?(r.push(0),U=!1):r[r.length-1]++,q()||T(4,[],[4,5]),F=!0}return g(),U||r.pop(),n.getToken()!==4?T(8,[4],[]):I(),!0}function q(){switch(n.getToken()){case 3:return B();case 1:return H();case 10:return L(!0);default:return M()}}return I(),n.getToken()===17?t.allowEmptyContent?!0:(T(4,[],[]),!1):q()?(n.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}var Qtt;(function(i){i[i.None=0]="None",i[i.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=2]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",i[i.InvalidUnicode=4]="InvalidUnicode",i[i.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",i[i.InvalidCharacter=6]="InvalidCharacter"})(Qtt||(Qtt={}));var Gtt;(function(i){i[i.OpenBraceToken=1]="OpenBraceToken",i[i.CloseBraceToken=2]="CloseBraceToken",i[i.OpenBracketToken=3]="OpenBracketToken",i[i.CloseBracketToken=4]="CloseBracketToken",i[i.CommaToken=5]="CommaToken",i[i.ColonToken=6]="ColonToken",i[i.NullKeyword=7]="NullKeyword",i[i.TrueKeyword=8]="TrueKeyword",i[i.FalseKeyword=9]="FalseKeyword",i[i.StringLiteral=10]="StringLiteral",i[i.NumericLiteral=11]="NumericLiteral",i[i.LineCommentTrivia=12]="LineCommentTrivia",i[i.BlockCommentTrivia=13]="BlockCommentTrivia",i[i.LineBreakTrivia=14]="LineBreakTrivia",i[i.Trivia=15]="Trivia",i[i.Unknown=16]="Unknown",i[i.EOF=17]="EOF"})(Gtt||(Gtt={}));var Ytt=Utt;var qtt;(function(i){i[i.InvalidSymbol=1]="InvalidSymbol",i[i.InvalidNumberFormat=2]="InvalidNumberFormat",i[i.PropertyNameExpected=3]="PropertyNameExpected",i[i.ValueExpected=4]="ValueExpected",i[i.ColonExpected=5]="ColonExpected",i[i.CommaExpected=6]="CommaExpected",i[i.CloseBraceExpected=7]="CloseBraceExpected",i[i.CloseBracketExpected=8]="CloseBracketExpected",i[i.EndOfFileExpected=9]="EndOfFileExpected",i[i.InvalidCommentToken=10]="InvalidCommentToken",i[i.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=12]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",i[i.InvalidUnicode=14]="InvalidUnicode",i[i.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",i[i.InvalidCharacter=16]="InvalidCharacter"})(qtt||(qtt={}));function Ktt(i){switch(i){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}async function uSe(i){let[e,{printers:t},{parsers:n}]=await Promise.all([Promise.resolve().then(()=>($ye(),Zye)),Promise.resolve().then(()=>(got(),mot)),Promise.resolve().then(()=>$(Aot()))]);return e.format(i,{parser:"jsonc",plugins:[{printers:t},{parsers:n}],printWidth:0})}var zhi=new Intl.ListFormat("en",{style:"long",type:"conjunction"});function Vhi(i){let e=[],t=Ytt(i,e,{allowTrailingComma:!0,allowEmptyContent:!0});if(e.length){let n=zhi.format(e.map(({error:r})=>Ktt(r)));throw new SyntaxError(n)}return t}function M9(i=""){let e;try{e=Vhi(i)}catch(n){throw new Error(`are invalid JSON: ${n instanceof Error?n.message:n}.`)}if(!e)return;if(!(typeof e=="object"&&!Array.isArray(e)))throw new TypeError("are not a JSON object.");return e}function kb(i,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{t=null,e(...n)},i)}}var wot=i=>(e,t)=>{function n({query:s,variables:a,headers:l,response:c}){let{queryEditor:u,variableEditor:d,headerEditor:h,responseEditor:f,defaultHeaders:p}=t();u?.setValue(s??""),d?.setValue(a??""),h?.setValue(l??p??""),f?.setValue(c??"")}function r(s){let{queryEditor:a,variableEditor:l,headerEditor:c,responseEditor:u,operationName:d}=t();return YCe(s,{query:a?.getValue()??null,variables:l?.getValue()??null,headers:c?.getValue()??null,response:u?.getValue()??null,operationName:d??null})}return{...i,actions:{addTab(){e(({defaultHeaders:s,onTabChange:a,tabs:l,activeTabIndex:c,actions:u})=>{let d=r({tabs:l,activeTabIndex:c}),h={tabs:[...d.tabs,qCe({headers:s})],activeTabIndex:d.tabs.length};return u.storeTabs(h),n(h.tabs[h.activeTabIndex]),a?.(h),h})},changeTab(s){e(({actions:a,onTabChange:l,tabs:c})=>{a.stop();let u={tabs:c,activeTabIndex:s};return a.storeTabs(u),n(u.tabs[u.activeTabIndex]),l?.(u),u})},moveTab(s){e(({onTabChange:a,actions:l,tabs:c,activeTabIndex:u})=>{let d=c[u],h={tabs:s,activeTabIndex:s.indexOf(d)};return l.storeTabs(h),n(h.tabs[h.activeTabIndex]),a?.(h),h})},closeTab(s){e(({activeTabIndex:a,onTabChange:l,actions:c,tabs:u})=>{a===s&&c.stop();let d={tabs:u.filter((h,f)=>s!==f),activeTabIndex:Math.max(a-1,0)};return c.storeTabs(d),n(d.tabs[d.activeTabIndex]),l?.(d),d})},updateActiveTabValues(s){e(({activeTabIndex:a,tabs:l,onTabChange:c,actions:u})=>{let d=YCe({tabs:l,activeTabIndex:a},s);return u.storeTabs(d),c?.(d),d})},setEditor({headerEditor:s,queryEditor:a,responseEditor:l,variableEditor:c}){let u=Object.entries({headerEditor:s,queryEditor:a,responseEditor:l,variableEditor:c}).filter(([h,f])=>f),d=Object.fromEntries(u);e(d)},setOperationName(s){e(({onEditOperationName:a,actions:l})=>(l.updateActiveTabValues({operationName:s}),a?.(s),{operationName:s}))},setShouldPersistHeaders(s){let{headerEditor:a,tabs:l,activeTabIndex:c,storage:u}=t();if(s){u.set(ds.headers,a?.getValue()??"");let d=GCe({tabs:l,activeTabIndex:c},!0);u.set(ds.tabs,d)}else u.set(ds.headers,""),Htt(u);u.set(ds.persistHeaders,s.toString()),e({shouldPersistHeaders:s})},storeTabs({tabs:s,activeTabIndex:a}){let{shouldPersistHeaders:l,storage:c}=t();kb(500,d=>{c.set(ds.tabs,d)})(GCe({tabs:s,activeTabIndex:a},l))},setOperationFacts({documentAST:s,operationName:a,operations:l}){e({documentAST:s,operationName:a,operations:l})},async copyQuery(){let{queryEditor:s,onCopyQuery:a}=t();if(!s)return;let l=s.getValue();a?.(l);try{await navigator.clipboard.writeText(l)}catch(c){console.warn("Failed to copy query!",c)}},async prettifyEditors(){let{queryEditor:s,headerEditor:a,variableEditor:l,onPrettifyQuery:c}=t();if(l)try{let u=l.getValue(),d=await uSe(u);d!==u&&l.setValue(d)}catch(u){console.warn("Parsing variables JSON failed, skip prettification.",u)}if(a)try{let u=a.getValue(),d=await uSe(u);d!==u&&a.setValue(d)}catch(u){console.warn("Parsing headers JSON failed, skip prettification.",u)}if(s)try{let u=s.getValue(),d=await c(u);d!==u&&s.setValue(d)}catch(u){console.warn("Parsing query failed, skip prettification.",u)}},mergeQuery(){let{queryEditor:s,documentAST:a,schema:l}=t(),c=s?.getValue();!a||!c||s.setValue((0,yot.print)(Ftt(a,l)))}}}};var I1=$(na());var Hk=i=>e=>d6(i,e&&h6(e));async function aDi(){let{MouseTargetFactory:i}=await Promise.resolve().then(()=>(u$(),Blt)),e=i._doHitTestWithCaretPositionFromPoint;i._doHitTestWithCaretPositionFromPoint=(...t)=>{let[n,r]=t;return n.viewDomNode.ownerDocument.caretPositionFromPoint(r.clientX,r.clientY)?e(...t):{type:0}}}var V3=M_((i,e)=>({actions:{async initialize(){if(!!e().monaco)return;let[n,{initializeMode:r}]=await Promise.all([Promise.resolve().then(()=>(XN(),UEt)),Promise.resolve().then(()=>(FTt(),RTt))]);globalThis.__MONACO=n,n.languages.json.jsonDefaults.setDiagnosticsOptions(s1e),n.editor.defineTheme(c6.dark,a1e.dark),n.editor.defineTheme(c6.light,a1e.light),navigator.userAgent.includes("Firefox/")&&aDi();let o=r({diagnosticSettings:l6});i({monaco:n,monacoGraphQL:o})}}})),Hg=Hk(V3);var ZU=$(ur()),a0=$(Te());function $U(i,e,t){let n=(0,ZU.c)(10),{updateActiveTabValues:r}=Ic(),o;n[0]!==t?(o=u=>({editor:u[t==="variables"?"variableEditor":"headerEditor"],storage:u.storage}),n[0]=t,n[1]=o):o=n[1];let{editor:s,storage:a}=Or(o),l,c;n[2]!==i||n[3]!==s||n[4]!==a||n[5]!==e||n[6]!==t||n[7]!==r?(l=()=>{if(!s)return;let u=kb(500,p=>{e!==null&&a.set(e,p)}),d=kb(100,p=>{r({[t]:p})}),h=p=>{let g=s.getValue();u(g),d(g),i?.(g)},f=s.getModel().onDidChangeContent(h);return()=>{f.dispose()}},c=[i,s,e,t,r,a],n[2]=i,n[3]=s,n[4]=a,n[5]=e,n[6]=t,n[7]=r,n[8]=l,n[9]=c):(l=n[8],c=n[9]),(0,a0.useEffect)(l,c)}var OTt=i=>{let e=(0,ZU.c)(12),t;e[0]!==i?(t=f=>f[`${i}Editor`],e[0]=i,e[1]=t):t=e[1];let n=Or(t),[r,o]=(0,a0.useState)(""),s;e[2]!==n?(s=n?.getModel(),e[2]=n,e[3]=s):s=e[3];let a=s,l,c;e[4]!==a?(l=()=>{if(!a)return;let f=function(){o(a.getValue())},p=a.onDidChangeContent(f);return f(),()=>{p.dispose()}},c=[a],e[4]=a,e[5]=l,e[6]=c):(l=e[5],c=e[6]),(0,a0.useEffect)(l,c);let u;e[7]!==a?(u=function(p){a.setValue(p)},e[7]=a,e[8]=u):u=e[8];let d=u,h;return e[9]!==d||e[10]!==r?(h=[r,d],e[9]=d,e[10]=r,e[11]=h):h=e[11],h},q9e=()=>OTt("query");function Y9e(i){let e=(0,ZU.c)(12),[t,n]=i,r;e[0]!==t?(r={pending:null,last:t},e[0]=t,e[1]=r):r=e[1];let o=(0,a0.useRef)(r),[s,a]=(0,a0.useState)(t),l,c;e[2]!==s||e[3]!==n||e[4]!==t?(l=()=>{if(o.current.last!==t){if(o.current.last=t,o.current.pending===null){a(t);return}if(o.current.pending===t){o.current.pending=null,t!==s&&(o.current.pending=s,n(s));return}o.current.pending=null,a(t)}},c=[t,s,n],e[2]=s,e[3]=n,e[4]=t,e[5]=l,e[6]=c):(l=e[5],c=e[6]),(0,a0.useEffect)(l,c);let u;e[7]!==n?(u=f=>{a(f),o.current.pending===null&&o.current.last!==f&&(o.current.pending=f,n(f))},e[7]=n,e[8]=u):u=e[8];let d=u,h;return e[9]!==d||e[10]!==s?(h=[s,d],e[9]=d,e[10]=s,e[11]=h):h=e[11],h}var cpe=(i,e)=>{let t=(0,ZU.c)(4),n=(0,a0.useRef)(!1),r,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>()=>{n.current=!1},o=[],t[0]=r,t[1]=o):(r=t[0],o=t[1]),(0,a0.useEffect)(r,o);let s;t[2]!==i?(s=()=>{if(n.current)return i();n.current=!0},t[2]=i,t[3]=s):s=t[3],(0,a0.useEffect)(s,e)};var PTt=i=>()=>i;var ekt=$(na());KU();var upe=$(YTt()),tkt=$($Tt());We();var ikt=i=>(e,t)=>{function n(){let{queryEditor:r,schema:o,getDefaultFieldNames:s}=t();if(!r)return;let a=r.getValue(),{insertions:l,result:c=""}=Ntt(o,a,s);if(!l.length)return c;let u=r.getModel(),d=r.getSelection(),h=u.getOffsetAt(d.getPosition());u.setValue(c);let f=0,p=l.map(({index:w,string:C})=>{let _=u.getPositionAt(w+f),E=u.getPositionAt(w+(f+=C.length));return{range:new N(_.lineNumber,_.column,E.lineNumber,E.column),options:{className:"auto-inserted-leaf",hoverMessage:{value:"Automatically added leaf fields"},isWholeLine:!1}}}),g=r.createDecorationsCollection([]);g.set(p),setTimeout(()=>{g.clear()},7e3);let v=h;for(let{index:w,string:C}of l)w(r?.unsubscribe(),{isFetching:!1,subscription:null}))},async run(){let{externalFragments:r,headerEditor:o,queryEditor:s,responseEditor:a,variableEditor:l,actions:c,operationName:u,documentAST:d,subscription:h,overrideOperationName:f,queryId:p,fetcher:g}=t();if(!s||!a)return;if(h){c.stop();return}function v(T){a?.setValue(T),c.updateActiveTabValues({response:T})}function A(T,L){if(!L)return;v($_({message:`${L===l?"Variables":"Request headers"} ${T.message}`}))}let w=p+1;e({queryId:w});let C=n()||s.getValue(),_;try{_=M9(l?.getValue())}catch(T){A(T,l);return}let E;try{E=M9(o?.getValue())}catch(T){A(T,o);return}let I=d?$fe(d,r):[];I.length&&(C+=` -`+I.map(T=>(0,ekt.print)(T)).join(` -`)),v(""),e({isFetching:!0});try{let T={},L=B=>{if(w!==t().queryId)return;let q=Array.isArray(B)?B:!1;if(!q&&typeof B=="object"&&"hasNext"in B&&(q=[B]),q){for(let U of q)nkt(T,U);e({isFetching:!1}),v(c9(T))}else e({isFetching:!1}),v(c9(B))},H=await g({query:C,variables:_,operationName:f??u},{headers:E,documentAST:d});if(l1e(H)){let B=H.subscribe({next(q){L(q)},error(q){e({isFetching:!1}),v($_(q)),e({subscription:null})},complete(){e({isFetching:!1,subscription:null})}});e({subscription:B})}else if(c1e(H)){e({subscription:{unsubscribe:()=>{var q,U;return(U=(q=H[Symbol.asyncIterator]()).return)==null?void 0:U.call(q)}}});for await(let q of H)L(q);e({isFetching:!1,subscription:null})}else L(H)}catch(T){e({isFetching:!1}),v($_(T)),e({subscription:null})}}}}},ej=new WeakMap;function nkt(i,e){var t,n,r;let o=["data",...e.path??[]];for(let c of[i,e])if(c.pending){let u=ej.get(i);u===void 0&&(u=new Map,ej.set(i,u));for(let{id:d,path:h}of c.pending)u.set(d,["data",...h])}let{items:s,data:a,id:l}=e;if(s)if(l){if(o=(t=ej.get(i))==null?void 0:t.get(l),o===void 0)throw new Error("Invalid incremental delivery format.");(0,tkt.default)(i,o.join(".")).push(...s)}else{o=["data",...e.path??[]];for(let c of s)(0,upe.default)(i,o.join("."),c),o[o.length-1]++}if(a){if(l){if(o=(n=ej.get(i))==null?void 0:n.get(l),o===void 0)throw new Error("Invalid incremental delivery format.");let{subPath:c}=e;c!==void 0&&(o=[...o,...c])}(0,upe.default)(i,o.join("."),a,{merge:!0})}if(e.errors&&(i.errors||(i.errors=[]),i.errors.push(...e.errors)),e.extensions&&(0,upe.default)(i,"extensions",e.extensions,{merge:!0}),e.incremental)for(let c of e.incremental)nkt(i,c);if(e.completed)for(let{id:c,errors:u}of e.completed)(r=ej.get(i))==null||r.delete(c),u&&(i.errors||(i.errors=[]),i.errors.push(...u))}var rkt=i=>e=>({plugins:[],visiblePlugin:null,...i,actions:{setVisiblePlugin(t=null){e(n=>{let{visiblePlugin:r,plugins:o,onTogglePluginVisibility:s,storage:a}=n,l=typeof t=="string",c=t&&o.find(u=>(l?u.title:u)===t)||null;return c===r?n:(s?.(c),a.set(ds.visiblePlugin,c?.title??""),{visiblePlugin:c})})},setPlugins(t){let n=new Set,r="All GraphiQL plugins must have a unique title";for(let{title:o}of t){if(typeof o!="string"||!o)throw new Error(r);if(n.has(o))throw new Error(`${r}, found two plugins with the title '${o}'`);n.add(o)}e({plugins:t})}}});var dpe=$(na());var okt=i=>(e,t)=>({...i,fetchError:null,isIntrospecting:!1,schema:null,validationErrors:[],schemaReference:null,requestCounter:0,shouldIntrospect:!0,actions:{setSchemaReference(n){e({schemaReference:n})},async introspect(){let{requestCounter:n,shouldIntrospect:r,onSchemaChange:o,headerEditor:s,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,schemaDescription:u}=t();if(!r)return;let d=n+1;e({requestCounter:d,isIntrospecting:!0,fetchError:null});try{let h=function(_){let E=NJe(a({query:_,operationName:c},p));if(!LJe(E))throw new TypeError("Fetcher did not return a Promise for introspection.");return E},f;try{f=M9(s?.getValue())}catch(_){throw new Error(`Introspection failed. Request headers ${_ instanceof Error?_.message:_}`)}let p=f?{headers:f}:{},g=(0,dpe.getIntrospectionQuery)({inputValueDeprecation:l,schemaDescription:u}),v=c==="IntrospectionQuery"?g:g.replace("query IntrospectionQuery",`query ${c}`),A=await h(v);(typeof A!="object"||!("data"in A))&&(A=await h(g.replace("subscriptionType { name }",""))),e({isIntrospecting:!1});let w;if(A.data&&"__schema"in A.data)w=A.data;else{let _=typeof A=="string"?A:c9(A);e({fetchError:_})}if(d!==t().requestCounter||!w)return;let C=(0,dpe.buildClientSchema)(w);e({schema:C}),o?.(C)}catch(h){if(d!==t().requestCounter)return;h instanceof Error&&delete h.stack,e({isIntrospecting:!1,fetchError:$_(h)})}}}});var skt=({editorTheme:i})=>(e,t)=>({theme:null,actions:{setTheme(n){let{storage:r}=t();r.set(ds.theme,n??""),document.body.classList.remove("graphiql-light","graphiql-dark"),n&&document.body.classList.add(`graphiql-${n}`);let{monaco:o}=V3.getState(),s=n??vDi(),a=i[s];o?.editor.setTheme(a),e({theme:n,monacoTheme:a})}}});function vDi(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ADi(i){return typeof i=="object"&&i!==null&&"__schema"in i}var akt=(0,mm.createContext)(null),e7e=i=>{let e=(0,$9e.c)(5);if(!i.fetcher)throw new TypeError("The `GraphiQLProvider` component requires a `fetcher` function to be passed as prop.");if(i.validationRules)throw new TypeError("The `validationRules` prop has been removed. Use custom GraphQL worker, see https://github.com/graphql/graphiql/tree/main/packages/monaco-graphql#custom-webworker-for-passing-non-static-config-to-worker.");if(i.query)throw new TypeError(`The \`query\` prop has been removed. Use \`initialQuery\` prop instead, or set value programmatically using: +`+u)})}}}}),{insertions:n,result:mYt(e,n)}}function pYt(i){if(!("getFields"in i))return[];let e=i.getFields();if(e.id)return["id"];if(e.edges)return["edges"];if(e.node)return["node"];let t=[];for(let n of Object.keys(e))hd(e[n].type)&&t.push(n);return t}function V$e(i,e){let t=Vr(i);if(!i||hd(i))return;let n=e(t);if(!(!Array.isArray(n)||n.length===0||!("getFields"in t)))return{kind:W.SELECTION_SET,selections:n.map(o=>{let r=t.getFields()[o],s=r?r.type:null;return{kind:W.FIELD,name:{kind:W.NAME,value:o},selectionSet:V$e(s,e)}})}}function mYt(i,e){if(e.length===0)return i;let t="",n=0;for(let{index:o,string:r}of e)t+=i.slice(n,o)+r,n=o;return t+=i.slice(n),t}function gYt(i,e){let t=e,n=e;for(;t;){let o=i.charCodeAt(t-1);if(o===10||o===13||o===8232||o===8233)break;t--,o!==9&&o!==11&&o!==12&&o!==32&&o!==160&&(n=t)}return i.slice(t,n)}function bYt(i){if(i)return i}ua();function AYt(i,e){var t;let n=new Map,o=[];for(let r of i)if(r.kind==="Field"){let s=e(r),a=n.get(s);if((t=r.directives)!=null&&t.length){let l=Jv({},r);o.push(l)}else if(a!=null&&a.selectionSet&&r.selectionSet)a.selectionSet.selections=[...a.selectionSet.selections,...r.selectionSet.selections];else if(!a){let l=Jv({},r);n.set(s,l),o.push(l)}}else o.push(r);return o}function H$e(i,e,t){var n;let o=t?Vr(t).name:null,r=[],s=[];for(let a of e){if(a.kind==="FragmentSpread"){let l=a.name.value;if(!a.directives||a.directives.length===0){if(s.includes(l))continue;s.push(l)}let c=i[a.name.value];if(c){let{typeCondition:u,directives:d,selectionSet:h}=c;a={kind:W.INLINE_FRAGMENT,typeCondition:u,directives:d,selectionSet:h}}}if(a.kind===W.INLINE_FRAGMENT&&(!a.directives||((n=a.directives)==null?void 0:n.length)===0)){let l=a.typeCondition?a.typeCondition.name.value:null;if(!l||l===o){r.push(...H$e(i,a.selectionSet.selections,t));continue}}r.push(a)}return r}function W$e(i,e){let t=e?new sg(e):null,n=Object.create(null);for(let s of i.definitions)s.kind===W.FRAGMENT_DEFINITION&&(n[s.name.value]=s);let o={SelectionSet(s){let a=t?t.getParentType():null,{selections:l}=s;return l=H$e(n,l,a),oS(Jv({},s),{selections:l})},FragmentDefinition(){return null}},r=ca(i,t?ex(t,o):o);return ca(r,{SelectionSet(s){let{selections:a}=s;return a=AYt(a,l=>l.alias?l.alias.value:l.name.value),oS(Jv({},s),{selections:a})},FragmentDefinition(){return null}})}function U$e(i,e,t){if(!t||t.length<1)return;let n=t.map(o=>{var r;return(r=o.name)==null?void 0:r.value});if(e&&n.includes(e))return e;if(e&&i){let o=i.map(r=>{var s;return(s=r.name)==null?void 0:s.value}).indexOf(e);if(o!==-1&&o"u"?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let t=0;for(let n in localStorage)n.indexOf(`${EZ}:`)===0&&(t+=1);return t},clear(){for(let t in localStorage)t.indexOf(`${EZ}:`)===0&&localStorage.removeItem(t)}}}get(e){if(!this.storage)return null;let t=`${EZ}:${e}`,n=this.storage.getItem(t);return n==="null"||n==="undefined"?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,o=null;if(this.storage){let r=`${EZ}:${e}`;if(t)try{this.storage.setItem(r,t)}catch(s){o=s instanceof Error?s:new Error(`${s}`),n=vYt(this.storage,s)}else this.storage.removeItem(r)}return{isQuotaError:n,error:o}}clear(){this.storage&&this.storage.clear()}},EZ="graphiql";ua();var W7=class{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some(t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName)}edit(e,t){if(typeof t=="number"&&this.items[t]){let o=this.items[t];if(o.query===e.query&&o.variables===e.variables&&o.headers===e.headers&&o.operationName===e.operationName){this.items.splice(t,1,e),this.save();return}}let n=this.items.findIndex(o=>o.query===e.query&&o.variables===e.variables&&o.headers===e.headers&&o.operationName===e.operationName);n!==-1&&(this.items.splice(n,1,e),this.save())}delete(e){let t=this.items.findIndex(n=>n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName);t!==-1&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){let e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){let t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){let o=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(!(o!=null&&o.error))this.items=t;else if(o.isQuotaError&&this.maxSize)t.shift();else return}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}};var yYt=1e5,TZ=class{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:n,variables:o,headers:r,operationName:s})=>{if(!this.shouldSaveQuery(n,o,r,this.history.fetchRecent()))return;this.history.push({query:n,variables:o,headers:r,operationName:s});let a=this.history.items,l=this.favorite.items;this.queries=a.concat(l)},this.deleteHistory=({query:n,variables:o,headers:r,operationName:s,favorite:a},l=!1)=>{function c(u){let d=u.items.find(h=>h.query===n&&h.variables===o&&h.headers===r&&h.operationName===s);d&&u.delete(d)}(a||l)&&c(this.favorite),(!a||l)&&c(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new W7("queries",this.storage,this.maxHistoryLength),this.favorite=new W7("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,o){if(!e)return!1;try{Zc(e)}catch{return!1}return e.length>yYt?!1:o?!(JSON.stringify(e)===JSON.stringify(o.query)&&(JSON.stringify(t)===JSON.stringify(o.variables)&&(JSON.stringify(n)===JSON.stringify(o.headers)||n&&!o.headers)||t&&!o.variables)):!0}toggleFavorite({query:e,variables:t,headers:n,operationName:o,label:r,favorite:s}){let a={query:e,variables:t,headers:n,operationName:o,label:r};s?(a.favorite=!1,this.favorite.delete(a),this.history.push(a)):(a.favorite=!0,this.favorite.push(a),this.history.delete(a)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:o,label:r,favorite:s},a){let l={query:e,variables:t,headers:n,operationName:o,label:r};s?this.favorite.edit(oS(Jv({},l),{favorite:s}),a):this.history.edit(l,a),this.queries=[...this.history.items,...this.favorite.items]}};ua();function Q$e({defaultQuery:i,defaultHeaders:e,headers:t,query:n,variables:o,defaultTabs:r=[{query:n??i,variables:o,headers:t??e}],shouldPersistHeaders:s,storage:a}){let l=a.get(us.tabs);try{if(!l)throw new Error("Storage for tabs is empty");let c=JSON.parse(l),u=s?t:void 0;if(wYt(c)){let d=kZ({query:n,variables:o,headers:u}),h=-1;for(let f=0;f=0)c.activeTabIndex=h;else{let f=n?A_e(n):null;c.tabs.push({id:G$e(),hash:d,title:f||v_e,query:n,variables:o,headers:t,operationName:f,response:null}),c.activeTabIndex=c.tabs.length-1}return c}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:r.map(g_e)}}}function wYt(i){return i&&typeof i=="object"&&!Array.isArray(i)&&CYt(i,"activeTabIndex")&&"tabs"in i&&Array.isArray(i.tabs)&&i.tabs.every(xYt)}function xYt(i){return i&&typeof i=="object"&&!Array.isArray(i)&&j$e(i,"id")&&j$e(i,"title")&&U7(i,"query")&&U7(i,"variables")&&U7(i,"headers")&&U7(i,"operationName")&&U7(i,"response")}function CYt(i,e){return e in i&&typeof i[e]=="number"}function j$e(i,e){return e in i&&typeof i[e]=="string"}function U7(i,e){return e in i&&(typeof i[e]=="string"||i[e]===null)}function m_e(i,e=!1){return JSON.stringify(i,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}function g_e({query:i=null,variables:e=null,headers:t=null}={}){let n=i?A_e(i):null;return{id:G$e(),hash:kZ({query:i,variables:e,headers:t}),title:n||v_e,query:i,variables:e,headers:t,operationName:n,response:null}}function b_e(i,e){return{...i,tabs:i.tabs.map((t,n)=>{if(n!==i.activeTabIndex)return t;let o={...t,...e};return{...o,hash:kZ(o),title:o.operationName||(o.query?A_e(o.query):void 0)||v_e}})}}function G$e(){let i=()=>Math.floor((1+Math.random())*65536).toString(16).slice(1);return`${i()}${i()}-${i()}-${i()}-${i()}-${i()}${i()}${i()}`}function kZ(i){return[i.query??"",i.variables??"",i.headers??""].join("|")}function A_e(i){let t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(i);return t?.[2]??null}function q$e(i){let e=i.get(us.tabs);if(e){let t=JSON.parse(e);i.set(us.tabs,JSON.stringify(t,(n,o)=>n==="headers"?null:o))}}var v_e="";function IZ(i,e=!1){let t=i.length,n=0,o="",r=0,s=16,a=0,l=0,c=0,u=0,d=0;function h(C,_){let E=0,I=0;for(;E=48&&T<=57)I=I*16+T-48;else if(T>=65&&T<=70)I=I*16+T-65+10;else if(T>=97&&T<=102)I=I*16+T-97+10;else break;n++,E++}return E=t){C+=i.substring(_,n),d=2;break}let E=i.charCodeAt(n);if(E===34){C+=i.substring(_,n),n++;break}if(E===92){if(C+=i.substring(_,n),n++,n>=t){d=2;break}switch(i.charCodeAt(n++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=` +`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:let T=h(4,!0);T>=0?C+=String.fromCharCode(T):d=4;break;default:d=5}_=n;continue}if(E>=0&&E<=31)if(j7(E)){C+=i.substring(_,n),d=2;break}else d=6;n++}return C}function A(){if(o="",d=0,r=n,l=a,u=c,n>=t)return r=t,s=17;let C=i.charCodeAt(n);if(y_e(C)){do n++,o+=String.fromCharCode(C),C=i.charCodeAt(n);while(y_e(C));return s=15}if(j7(C))return n++,o+=String.fromCharCode(C),C===13&&i.charCodeAt(n)===10&&(n++,o+=` +`),a++,c=n,s=14;switch(C){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,o=g(),s=10;case 47:let _=n-1;if(i.charCodeAt(n+1)===47){for(n+=2;n=12&&C<=15);return C}return{setPosition:f,getPosition:()=>n,scan:e?w:A,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>r,getTokenLength:()=>n-r,getTokenStartLine:()=>l,getTokenStartCharacter:()=>r-u,getTokenError:()=>d}}function y_e(i){return i===32||i===9}function j7(i){return i===10||i===13}function yF(i){return i>=48&&i<=57}var Y$e;(function(i){i[i.lineFeed=10]="lineFeed",i[i.carriageReturn=13]="carriageReturn",i[i.space=32]="space",i[i._0=48]="_0",i[i._1=49]="_1",i[i._2=50]="_2",i[i._3=51]="_3",i[i._4=52]="_4",i[i._5=53]="_5",i[i._6=54]="_6",i[i._7=55]="_7",i[i._8=56]="_8",i[i._9=57]="_9",i[i.a=97]="a",i[i.b=98]="b",i[i.c=99]="c",i[i.d=100]="d",i[i.e=101]="e",i[i.f=102]="f",i[i.g=103]="g",i[i.h=104]="h",i[i.i=105]="i",i[i.j=106]="j",i[i.k=107]="k",i[i.l=108]="l",i[i.m=109]="m",i[i.n=110]="n",i[i.o=111]="o",i[i.p=112]="p",i[i.q=113]="q",i[i.r=114]="r",i[i.s=115]="s",i[i.t=116]="t",i[i.u=117]="u",i[i.v=118]="v",i[i.w=119]="w",i[i.x=120]="x",i[i.y=121]="y",i[i.z=122]="z",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.asterisk=42]="asterisk",i[i.backslash=92]="backslash",i[i.closeBrace=125]="closeBrace",i[i.closeBracket=93]="closeBracket",i[i.colon=58]="colon",i[i.comma=44]="comma",i[i.dot=46]="dot",i[i.doubleQuote=34]="doubleQuote",i[i.minus=45]="minus",i[i.openBrace=123]="openBrace",i[i.openBracket=91]="openBracket",i[i.plus=43]="plus",i[i.slash=47]="slash",i[i.formFeed=12]="formFeed",i[i.tab=9]="tab"})(Y$e||(Y$e={}));var SYt=new Array(20).fill(0).map((i,e)=>" ".repeat(e)),wF=200,EYt={" ":{"\n":new Array(wF).fill(0).map((i,e)=>` +`+" ".repeat(e)),"\r":new Array(wF).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(wF).fill(0).map((i,e)=>`\r +`+" ".repeat(e))}," ":{"\n":new Array(wF).fill(0).map((i,e)=>` +`+" ".repeat(e)),"\r":new Array(wF).fill(0).map((i,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(wF).fill(0).map((i,e)=>`\r +`+" ".repeat(e))}};var LZ;(function(i){i.DEFAULT={allowTrailingComma:!1}})(LZ||(LZ={}));function K$e(i,e=[],t=LZ.DEFAULT){let n=null,o=[],r=[];function s(l){Array.isArray(o)?o.push(l):n!==null&&(o[n]=l)}return J$e(i,{onObjectBegin:()=>{let l={};s(l),r.push(o),o=l,n=null},onObjectProperty:l=>{n=l},onObjectEnd:()=>{o=r.pop()},onArrayBegin:()=>{let l=[];s(l),r.push(o),o=l,n=null},onArrayEnd:()=>{o=r.pop()},onLiteralValue:s,onError:(l,c,u)=>{e.push({error:l,offset:c,length:u})}},t),o[0]}function J$e(i,e,t=LZ.DEFAULT){let n=IZ(i,!1),o=[],r=0;function s(U){return U?()=>r===0&&U(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function a(U){return U?M=>r===0&&U(M,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function l(U){return U?M=>r===0&&U(M,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(U){return U?()=>{r>0?r++:U(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice())===!1&&(r=1)}:()=>!0}function u(U){return U?()=>{r>0&&r--,r===0&&U(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let d=c(e.onObjectBegin),h=l(e.onObjectProperty),f=u(e.onObjectEnd),p=c(e.onArrayBegin),g=u(e.onArrayEnd),A=l(e.onLiteralValue),v=a(e.onSeparator),w=s(e.onComment),C=a(e.onError),_=t&&t.disallowComments,E=t&&t.allowTrailingComma;function I(){for(;;){let U=n.scan();switch(n.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:_||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(U){case 12:case 13:_?T(10):w();break;case 16:T(1);break;case 15:case 14:break;default:return U}}}function T(U,M=[],ee=[]){if(C(U),M.length+ee.length>0){let X=n.getToken();for(;X!==17;){if(M.indexOf(X)!==-1){I();break}else if(ee.indexOf(X)!==-1)break;X=I()}}}function N(U){let M=n.getTokenValue();return U?A(M):(h(M),o.push(M)),I(),!0}function L(){switch(n.getToken()){case 11:let U=n.getTokenValue(),M=Number(U);isNaN(M)&&(T(2),M=0),A(M);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return I(),!0}function B(){return n.getToken()!==10?(T(3,[],[2,5]),!1):(N(!1),n.getToken()===6?(v(":"),I(),Z()||T(4,[],[2,5])):T(5,[],[2,5]),o.pop(),!0)}function z(){d(),I();let U=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(U||T(4,[],[]),v(","),I(),n.getToken()===2&&E)break}else U&&T(6,[],[]);B()||T(4,[],[2,5]),U=!0}return f(),n.getToken()!==2?T(7,[2],[]):I(),!0}function Q(){p(),I();let U=!0,M=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(M||T(4,[],[]),v(","),I(),n.getToken()===4&&E)break}else M&&T(6,[],[]);U?(o.push(0),U=!1):o[o.length-1]++,Z()||T(4,[],[4,5]),M=!0}return g(),U||o.pop(),n.getToken()!==4?T(8,[4],[]):I(),!0}function Z(){switch(n.getToken()){case 3:return Q();case 1:return z();case 10:return N(!0);default:return L()}}return I(),n.getToken()===17?t.allowEmptyContent?!0:(T(4,[],[]),!1):Z()?(n.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}var X$e;(function(i){i[i.None=0]="None",i[i.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=2]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",i[i.InvalidUnicode=4]="InvalidUnicode",i[i.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",i[i.InvalidCharacter=6]="InvalidCharacter"})(X$e||(X$e={}));var Z$e;(function(i){i[i.OpenBraceToken=1]="OpenBraceToken",i[i.CloseBraceToken=2]="CloseBraceToken",i[i.OpenBracketToken=3]="OpenBracketToken",i[i.CloseBracketToken=4]="CloseBracketToken",i[i.CommaToken=5]="CommaToken",i[i.ColonToken=6]="ColonToken",i[i.NullKeyword=7]="NullKeyword",i[i.TrueKeyword=8]="TrueKeyword",i[i.FalseKeyword=9]="FalseKeyword",i[i.StringLiteral=10]="StringLiteral",i[i.NumericLiteral=11]="NumericLiteral",i[i.LineCommentTrivia=12]="LineCommentTrivia",i[i.BlockCommentTrivia=13]="BlockCommentTrivia",i[i.LineBreakTrivia=14]="LineBreakTrivia",i[i.Trivia=15]="Trivia",i[i.Unknown=16]="Unknown",i[i.EOF=17]="EOF"})(Z$e||(Z$e={}));var eet=K$e;var $$e;(function(i){i[i.InvalidSymbol=1]="InvalidSymbol",i[i.InvalidNumberFormat=2]="InvalidNumberFormat",i[i.PropertyNameExpected=3]="PropertyNameExpected",i[i.ValueExpected=4]="ValueExpected",i[i.ColonExpected=5]="ColonExpected",i[i.CommaExpected=6]="CommaExpected",i[i.CloseBraceExpected=7]="CloseBraceExpected",i[i.CloseBracketExpected=8]="CloseBracketExpected",i[i.EndOfFileExpected=9]="EndOfFileExpected",i[i.InvalidCommentToken=10]="InvalidCommentToken",i[i.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",i[i.UnexpectedEndOfString=12]="UnexpectedEndOfString",i[i.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",i[i.InvalidUnicode=14]="InvalidUnicode",i[i.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",i[i.InvalidCharacter=16]="InvalidCharacter"})($$e||($$e={}));function tet(i){switch(i){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}async function MSe(i){let[e,{printers:t},{parsers:n}]=await Promise.all([Promise.resolve().then(()=>(mwe(),pwe)),Promise.resolve().then(()=>(_nt(),Cnt)),Promise.resolve().then(()=>ae(Dnt()))]);return e.format(i,{parser:"jsonc",plugins:[{printers:t},{parsers:n}],printWidth:0})}var Mii=new Intl.ListFormat("en",{style:"long",type:"conjunction"});function Rii(i){let e=[],t=eet(i,e,{allowTrailingComma:!0,allowEmptyContent:!0});if(e.length){let n=Mii.format(e.map(({error:o})=>tet(o)));throw new SyntaxError(n)}return t}function dz(i=""){let e;try{e=Rii(i)}catch(n){throw new Error(`are invalid JSON: ${n instanceof Error?n.message:n}.`)}if(!e)return;if(!(typeof e=="object"&&!Array.isArray(e)))throw new TypeError("are not a JSON object.");return e}function Wb(i,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{t=null,e(...n)},i)}}var Tnt=i=>(e,t)=>{function n({query:s,variables:a,headers:l,response:c}){let{queryEditor:u,variableEditor:d,headerEditor:h,responseEditor:f,defaultHeaders:p}=t();u?.setValue(s??""),d?.setValue(a??""),h?.setValue(l??p??""),f?.setValue(c??"")}function o(s){let{queryEditor:a,variableEditor:l,headerEditor:c,responseEditor:u,operationName:d}=t();return b_e(s,{query:a?.getValue()??null,variables:l?.getValue()??null,headers:c?.getValue()??null,response:u?.getValue()??null,operationName:d??null})}return{...i,actions:{addTab(){e(({defaultHeaders:s,onTabChange:a,tabs:l,activeTabIndex:c,actions:u})=>{let d=o({tabs:l,activeTabIndex:c}),h={tabs:[...d.tabs,g_e({headers:s})],activeTabIndex:d.tabs.length};return u.storeTabs(h),n(h.tabs[h.activeTabIndex]),a?.(h),h})},changeTab(s){e(({actions:a,onTabChange:l,tabs:c})=>{a.stop();let u={tabs:c,activeTabIndex:s};return a.storeTabs(u),n(u.tabs[u.activeTabIndex]),l?.(u),u})},moveTab(s){e(({onTabChange:a,actions:l,tabs:c,activeTabIndex:u})=>{let d=c[u],h={tabs:s,activeTabIndex:s.indexOf(d)};return l.storeTabs(h),n(h.tabs[h.activeTabIndex]),a?.(h),h})},closeTab(s){e(({activeTabIndex:a,onTabChange:l,actions:c,tabs:u})=>{a===s&&c.stop();let d={tabs:u.filter((h,f)=>s!==f),activeTabIndex:Math.max(a-1,0)};return c.storeTabs(d),n(d.tabs[d.activeTabIndex]),l?.(d),d})},updateActiveTabValues(s){e(({activeTabIndex:a,tabs:l,onTabChange:c,actions:u})=>{let d=b_e({tabs:l,activeTabIndex:a},s);return u.storeTabs(d),c?.(d),d})},setEditor({headerEditor:s,queryEditor:a,responseEditor:l,variableEditor:c}){let u=Object.entries({headerEditor:s,queryEditor:a,responseEditor:l,variableEditor:c}).filter(([h,f])=>f),d=Object.fromEntries(u);e(d)},setOperationName(s){e(({onEditOperationName:a,actions:l})=>(l.updateActiveTabValues({operationName:s}),a?.(s),{operationName:s}))},setShouldPersistHeaders(s){let{headerEditor:a,tabs:l,activeTabIndex:c,storage:u}=t();if(s){u.set(us.headers,a?.getValue()??"");let d=m_e({tabs:l,activeTabIndex:c},!0);u.set(us.tabs,d)}else u.set(us.headers,""),q$e(u);u.set(us.persistHeaders,s.toString()),e({shouldPersistHeaders:s})},storeTabs({tabs:s,activeTabIndex:a}){let{shouldPersistHeaders:l,storage:c}=t();Wb(500,d=>{c.set(us.tabs,d)})(m_e({tabs:s,activeTabIndex:a},l))},setOperationFacts({documentAST:s,operationName:a,operations:l}){e({documentAST:s,operationName:a,operations:l})},async copyQuery(){let{queryEditor:s,onCopyQuery:a}=t();if(!s)return;let l=s.getValue();a?.(l);try{await navigator.clipboard.writeText(l)}catch(c){console.warn("Failed to copy query!",c)}},async prettifyEditors(){let{queryEditor:s,headerEditor:a,variableEditor:l,onPrettifyQuery:c}=t();if(l)try{let u=l.getValue(),d=await MSe(u);d!==u&&l.setValue(d)}catch(u){console.warn("Parsing variables JSON failed, skip prettification.",u)}if(a)try{let u=a.getValue(),d=await MSe(u);d!==u&&a.setValue(d)}catch(u){console.warn("Parsing headers JSON failed, skip prettification.",u)}if(s)try{let u=s.getValue(),d=await c(u);d!==u&&s.setValue(d)}catch(u){console.warn("Parsing query failed, skip prettification.",u)}},mergeQuery(){let{queryEditor:s,documentAST:a,schema:l}=t(),c=s?.getValue();!a||!c||s.setValue(Rn(W$e(a,l)))}}}};ua();var wI=i=>e=>t9(i,e&&i9(e));async function tAi(){let{MouseTargetFactory:i}=await Promise.resolve().then(()=>(Nee(),Qst)),e=i._doHitTestWithCaretPositionFromPoint;i._doHitTestWithCaretPositionFromPoint=(...t)=>{let[n,o]=t;return n.viewDomNode.ownerDocument.caretPositionFromPoint(o.clientX,o.clientY)?e(...t):{type:0}}}var L4=nS((i,e)=>({actions:{async initialize(){if(!!e().monaco)return;let[n,{initializeMode:o}]=await Promise.all([Promise.resolve().then(()=>(L2(),J_t)),Promise.resolve().then(()=>(VEt(),zEt))]);globalThis.__MONACO=n,n.languages.json.jsonDefaults.setDiagnosticsOptions(xwe),n.editor.defineTheme($6.dark,Cwe.dark),n.editor.defineTheme($6.light,Cwe.light),navigator.userAgent.includes("Firefox/")&&tAi();let r=o({diagnosticSettings:Z6});i({monaco:n,monacoGraphQL:r})}}})),tb=wI(L4);var kQ=ae(fo()),y0=ae(ke());function IQ(i,e,t){let n=(0,kQ.c)(10),{updateActiveTabValues:o}=Oc(),r;n[0]!==t?(r=u=>({editor:u[t==="variables"?"variableEditor":"headerEditor"],storage:u.storage}),n[0]=t,n[1]=r):r=n[1];let{editor:s,storage:a}=Vo(r),l,c;n[2]!==i||n[3]!==s||n[4]!==a||n[5]!==e||n[6]!==t||n[7]!==o?(l=()=>{if(!s)return;let u=Wb(500,p=>{e!==null&&a.set(e,p)}),d=Wb(100,p=>{o({[t]:p})}),h=p=>{let g=s.getValue();u(g),d(g),i?.(g)},f=s.getModel().onDidChangeContent(h);return()=>{f.dispose()}},c=[i,s,e,t,o,a],n[2]=i,n[3]=s,n[4]=a,n[5]=e,n[6]=t,n[7]=o,n[8]=l,n[9]=c):(l=n[8],c=n[9]),(0,y0.useEffect)(l,c)}var HEt=i=>{let e=(0,kQ.c)(12),t;e[0]!==i?(t=f=>f[`${i}Editor`],e[0]=i,e[1]=t):t=e[1];let n=Vo(t),[o,r]=(0,y0.useState)(""),s;e[2]!==n?(s=n?.getModel(),e[2]=n,e[3]=s):s=e[3];let a=s,l,c;e[4]!==a?(l=()=>{if(!a)return;let f=function(){r(a.getValue())},p=a.onDidChangeContent(f);return f(),()=>{p.dispose()}},c=[a],e[4]=a,e[5]=l,e[6]=c):(l=e[5],c=e[6]),(0,y0.useEffect)(l,c);let u;e[7]!==a?(u=function(p){a.setValue(p)},e[7]=a,e[8]=u):u=e[8];let d=u,h;return e[9]!==d||e[10]!==o?(h=[o,d],e[9]=d,e[10]=o,e[11]=h):h=e[11],h},g7e=()=>HEt("query");function b7e(i){let e=(0,kQ.c)(12),[t,n]=i,o;e[0]!==t?(o={pending:null,last:t},e[0]=t,e[1]=o):o=e[1];let r=(0,y0.useRef)(o),[s,a]=(0,y0.useState)(t),l,c;e[2]!==s||e[3]!==n||e[4]!==t?(l=()=>{if(r.current.last!==t){if(r.current.last=t,r.current.pending===null){a(t);return}if(r.current.pending===t){r.current.pending=null,t!==s&&(r.current.pending=s,n(s));return}r.current.pending=null,a(t)}},c=[t,s,n],e[2]=s,e[3]=n,e[4]=t,e[5]=l,e[6]=c):(l=e[5],c=e[6]),(0,y0.useEffect)(l,c);let u;e[7]!==n?(u=f=>{a(f),r.current.pending===null&&r.current.last!==f&&(r.current.pending=f,n(f))},e[7]=n,e[8]=u):u=e[8];let d=u,h;return e[9]!==d||e[10]!==s?(h=[s,d],e[9]=d,e[10]=s,e[11]=h):h=e[11],h}var kme=(i,e)=>{let t=(0,kQ.c)(4),n=(0,y0.useRef)(!1),o,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>()=>{n.current=!1},r=[],t[0]=o,t[1]=r):(o=t[0],r=t[1]),(0,y0.useEffect)(o,r);let s;t[2]!==i?(s=()=>{if(n.current)return i();n.current=!0},t[2]=i,t[3]=s):s=t[3],(0,y0.useEffect)(s,e)};var WEt=i=>()=>i;ua();DQ();var Ime=ae($Et()),rDt=ae(oDt());Ue();var sDt=i=>(e,t)=>{function n(){let{queryEditor:o,schema:r,getDefaultFieldNames:s}=t();if(!o)return;let a=o.getValue(),{insertions:l,result:c=""}=z$e(r,a,s);if(!l.length)return c;let u=o.getModel(),d=o.getSelection(),h=u.getOffsetAt(d.getPosition());u.setValue(c);let f=0,p=l.map(({index:w,string:C})=>{let _=u.getPositionAt(w+f),E=u.getPositionAt(w+(f+=C.length));return{range:new R(_.lineNumber,_.column,E.lineNumber,E.column),options:{className:"auto-inserted-leaf",hoverMessage:{value:"Automatically added leaf fields"},isWholeLine:!1}}}),g=o.createDecorationsCollection([]);g.set(p),setTimeout(()=>{g.clear()},7e3);let A=h;for(let{index:w,string:C}of l)w(o?.unsubscribe(),{isFetching:!1,subscription:null}))},async run(){let{externalFragments:o,headerEditor:r,queryEditor:s,responseEditor:a,variableEditor:l,actions:c,operationName:u,documentAST:d,subscription:h,overrideOperationName:f,queryId:p,fetcher:g}=t();if(!s||!a)return;if(h){c.stop();return}function A(T){a?.setValue(T),c.updateActiveTabValues({response:T})}function v(T,N){if(!N)return;A(CS({message:`${N===l?"Variables":"Request headers"} ${T.message}`}))}let w=p+1;e({queryId:w});let C=n()||s.getValue(),_;try{_=dz(l?.getValue())}catch(T){v(T,l);return}let E;try{E=dz(r?.getValue())}catch(T){v(T,r);return}let I=d?yme(d,o):[];I.length&&(C+=` +`+I.map(T=>Rn(T)).join(` +`)),A(""),e({isFetching:!0});try{let T={},N=Q=>{if(w!==t().queryId)return;let Z=Array.isArray(Q)?Q:!1;if(!Z&&typeof Q=="object"&&"hasNext"in Q&&(Z=[Q]),Z){for(let U of Z)aDt(T,U);e({isFetching:!1}),A(H7(T))}else e({isFetching:!1}),A(H7(Q))},z=await g({query:C,variables:_,operationName:f??u},{headers:E,documentAST:d});if(_we(z)){let Q=z.subscribe({next(Z){N(Z)},error(Z){e({isFetching:!1}),A(CS(Z)),e({subscription:null})},complete(){e({isFetching:!1,subscription:null})}});e({subscription:Q})}else if(Swe(z)){e({subscription:{unsubscribe:()=>{var Z,U;return(U=(Z=z[Symbol.asyncIterator]()).return)==null?void 0:U.call(Z)}}});for await(let Z of z)N(Z);e({isFetching:!1,subscription:null})}else N(z)}catch(T){e({isFetching:!1}),A(CS(T)),e({subscription:null})}}}}},LQ=new WeakMap;function aDt(i,e){var t,n,o;let r=["data",...e.path??[]];for(let c of[i,e])if(c.pending){let u=LQ.get(i);u===void 0&&(u=new Map,LQ.set(i,u));for(let{id:d,path:h}of c.pending)u.set(d,["data",...h])}let{items:s,data:a,id:l}=e;if(s)if(l){if(r=(t=LQ.get(i))==null?void 0:t.get(l),r===void 0)throw new Error("Invalid incremental delivery format.");(0,rDt.default)(i,r.join(".")).push(...s)}else{r=["data",...e.path??[]];for(let c of s)(0,Ime.default)(i,r.join("."),c),r[r.length-1]++}if(a){if(l){if(r=(n=LQ.get(i))==null?void 0:n.get(l),r===void 0)throw new Error("Invalid incremental delivery format.");let{subPath:c}=e;c!==void 0&&(r=[...r,...c])}(0,Ime.default)(i,r.join("."),a,{merge:!0})}if(e.errors&&(i.errors||(i.errors=[]),i.errors.push(...e.errors)),e.extensions&&(0,Ime.default)(i,"extensions",e.extensions,{merge:!0}),e.incremental)for(let c of e.incremental)aDt(i,c);if(e.completed)for(let{id:c,errors:u}of e.completed)(o=LQ.get(i))==null||o.delete(c),u&&(i.errors||(i.errors=[]),i.errors.push(...u))}var lDt=i=>e=>({plugins:[],visiblePlugin:null,...i,actions:{setVisiblePlugin(t=null){e(n=>{let{visiblePlugin:o,plugins:r,onTogglePluginVisibility:s,storage:a}=n,l=typeof t=="string",c=t&&r.find(u=>(l?u.title:u)===t)||null;return c===o?n:(s?.(c),a.set(us.visiblePlugin,c?.title??""),{visiblePlugin:c})})},setPlugins(t){let n=new Set,o="All GraphiQL plugins must have a unique title";for(let{title:r}of t){if(typeof r!="string"||!r)throw new Error(o);if(n.has(r))throw new Error(`${o}, found two plugins with the title '${r}'`);n.add(r)}e({plugins:t})}}});ua();var cDt=i=>(e,t)=>({...i,fetchError:null,isIntrospecting:!1,schema:null,validationErrors:[],schemaReference:null,requestCounter:0,shouldIntrospect:!0,actions:{setSchemaReference(n){e({schemaReference:n})},async introspect(){let{requestCounter:n,shouldIntrospect:o,onSchemaChange:r,headerEditor:s,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,schemaDescription:u}=t();if(!o)return;let d=n+1;e({requestCounter:d,isIntrospecting:!0,fetchError:null});try{let h=function(_){let E=iXe(a({query:_,operationName:c},p));if(!tXe(E))throw new TypeError("Fetcher did not return a Promise for introspection.");return E},f;try{f=dz(s?.getValue())}catch(_){throw new Error(`Introspection failed. Request headers ${_ instanceof Error?_.message:_}`)}let p=f?{headers:f}:{},g=tx({inputValueDeprecation:l,schemaDescription:u}),A=c==="IntrospectionQuery"?g:g.replace("query IntrospectionQuery",`query ${c}`),v=await h(A);(typeof v!="object"||!("data"in v))&&(v=await h(g.replace("subscriptionType { name }",""))),e({isIntrospecting:!1});let w;if(v.data&&"__schema"in v.data)w=v.data;else{let _=typeof v=="string"?v:H7(v);e({fetchError:_})}if(d!==t().requestCounter||!w)return;let C=ix(w);e({schema:C}),r?.(C)}catch(h){if(d!==t().requestCounter)return;h instanceof Error&&delete h.stack,e({isIntrospecting:!1,fetchError:CS(h)})}}}});var uDt=({editorTheme:i})=>(e,t)=>({theme:null,actions:{setTheme(n){let{storage:o}=t();o.set(us.theme,n??""),document.body.classList.remove("graphiql-light","graphiql-dark"),n&&document.body.classList.add(`graphiql-${n}`);let{monaco:r}=L4.getState(),s=n??hAi(),a=i[s];r?.editor.setTheme(a),e({theme:n,monacoTheme:a})}}});function hAi(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function fAi(i){return typeof i=="object"&&i!==null&&"__schema"in i}var dDt=(0,Nm.createContext)(null),C7e=i=>{let e=(0,x7e.c)(5);if(!i.fetcher)throw new TypeError("The `GraphiQLProvider` component requires a `fetcher` function to be passed as prop.");if(i.validationRules)throw new TypeError("The `validationRules` prop has been removed. Use custom GraphQL worker, see https://github.com/graphql/graphiql/tree/main/packages/monaco-graphql#custom-webworker-for-passing-non-static-config-to-worker.");if(i.query)throw new TypeError(`The \`query\` prop has been removed. Use \`initialQuery\` prop instead, or set value programmatically using: const queryEditor = useGraphiQL(state => state.queryEditor) @@ -1093,33 +1093,33 @@ const responseEditor = useGraphiQL(state => state.responseEditor) useEffect(() => { responseEditor.setValue(response) -}, [response])`);let{actions:t}=Hg(),[n,r]=(0,mm.useState)(!1),o;e[0]!==t?(o=()=>{t.initialize(),r(!0)},e[0]=t,e[1]=o):o=e[1];let s;if(e[2]===Symbol.for("react.memo_cache_sentinel")?(s=[],e[2]=s):s=e[2],(0,mm.useEffect)(o,s),!n)return null;let a;return e[3]!==i?(a=(0,Z9e.jsx)(yDi,{...i}),e[3]=i,e[4]=a):a=e[4],a},yDi=i=>{let e=(0,$9e.c)(18),{defaultHeaders:t,defaultQuery:n,defaultTabs:r,externalFragments:o,onEditOperationName:s,onTabChange:a,shouldPersistHeaders:l,onCopyQuery:c,onPrettifyQuery:u,customScalarSchemas:d,dangerouslyAssumeSchemaIsValid:h,fetcher:f,inputValueDeprecation:p,introspectionQueryName:g,onSchemaChange:v,schema:A,schemaDescription:w,getDefaultFieldNames:C,operationName:_,onTogglePluginVisibility:E,plugins:I,referencePlugin:T,visiblePlugin:L,children:M,defaultTheme:z,editorTheme:H,storage:B,...q}=i,U=n===void 0?AJe:n,F=l===void 0?!1:l,ne=u===void 0?yJe:u,ce=h===void 0?!1:h,se=p===void 0?!1:p,le=g===void 0?"IntrospectionQuery":g,oe=w===void 0?!1:w,fe=_===void 0?null:_,Re=I===void 0?[]:I,ft=z===void 0?null:z,At=H===void 0?c6:H,Dt=(0,mm.useRef)(null),Ct=(0,mm.useId)();if(Dt.current===null){let at=new oX(B),Je=function(){let xr=at.get(ds.visiblePlugin),lr=Re.find(qo=>qo.title===xr);return lr||(xr&&at.set(ds.visiblePlugin,""),L)},xt=function(){let xr=at.get(ds.theme);switch(xr){case"light":return"light";case"dark":return"dark";default:return typeof xr=="string"&&at.set(ds.theme,""),ft}},Ti=function(){let xr=q.initialQuery??at.get(ds.query),lr=q.initialVariables??at.get(ds.variables),qo=q.initialHeaders??at.get(ds.headers),{tabs:As,activeTabIndex:Vr}=ztt({defaultHeaders:t,defaultQuery:U,defaultTabs:r,headers:qo,query:xr,shouldPersistHeaders:F,storage:at,variables:lr}),Ca=at.get(ds.persistHeaders)!==null,br=F!==!1&&Ca?at.get(ds.persistHeaders)==="true":F,Yo=CJe((...Wa)=>{let Hr=Wa,cl=PTt({storage:at})(...Hr),ul=wot({activeTabIndex:Vr,defaultHeaders:t,defaultQuery:U,externalFragments:wDi(o),initialHeaders:qo??t??"",initialQuery:xr??(Vr===0?As[0].query:null)??"",initialVariables:lr??"",onCopyQuery:c,onEditOperationName:s,onPrettifyQuery:ne,onTabChange:a,shouldPersistHeaders:br,tabs:As,uriInstanceId:Ct.replaceAll(/[:«»]/g,"")+"-"})(...Hr),Xr=ikt({fetcher:f,getDefaultFieldNames:C,overrideOperationName:fe})(...Hr),cs=rkt({onTogglePluginVisibility:E,referencePlugin:T})(...Hr),No=okt({customScalarSchemas:d,inputValueDeprecation:se,introspectionQueryName:le,onSchemaChange:v,schemaDescription:oe})(...Hr),ta=skt({editorTheme:At})(...Hr);return{...cl,...ul,...Xr,...cs,...No,...ta,actions:{...ul.actions,...Xr.actions,...cs.actions,...No.actions,...ta.actions}}}),{actions:cr}=Yo.getState();return cr.storeTabs({activeTabIndex:Vr,tabs:As}),cr.setPlugins(Re),cr.setVisiblePlugin(Je()),cr.setTheme(xt()),Yo};Dt.current=Ti()}let Xt,Be;e[0]!==f?(Xt=()=>{Dt.current.setState({fetcher:f})},Be=[f],e[0]=f,e[1]=Xt,e[2]=Be):(Xt=e[1],Be=e[2]),cpe(Xt,Be);let Vt,Li;e[3]!==Re||e[4]!==L?(Vt=()=>{let{actions:at}=Dt.current.getState();at.setPlugins(Re),at.setVisiblePlugin(L)},Li=[Re,L],e[3]=Re,e[4]=L,e[5]=Vt,e[6]=Li):(Vt=e[5],Li=e[6]),cpe(Vt,Li);let ei;e[7]!==ce||e[8]!==A?(ei=()=>{let at=(0,I1.isSchema)(A)||A==null?A:ADi(A)?(0,I1.buildClientSchema)(A):void 0,Je=!at||ce?[]:(0,I1.validateSchema)(at),xt=Dt.current;xt.setState(Ut=>{let{requestCounter:xr}=Ut;return{requestCounter:xr+1,schema:at,shouldIntrospect:!at&&A!==null,validationErrors:Je}});let{actions:Ti}=xt.getState();Ti.introspect()},e[7]=ce,e[8]=A,e[9]=ei):ei=e[9];let Ni;e[10]!==ce||e[11]!==f||e[12]!==A?(Ni=[A,ce,f],e[10]=ce,e[11]=f,e[12]=A,e[13]=Ni):Ni=e[13],(0,mm.useEffect)(ei,Ni);let Ke,St;e[14]===Symbol.for("react.memo_cache_sentinel")?(Ke=()=>{let at=function(xt){if(xt.ctrlKey&&xt.key==="R"){let{actions:Ti}=Dt.current.getState();Ti.introspect()}};return window.addEventListener("keydown",at),()=>{window.removeEventListener("keydown",at)}},St=[],e[14]=Ke,e[15]=St):(Ke=e[14],St=e[15]),(0,mm.useEffect)(Ke,St);let yt;return e[16]!==M?(yt=(0,Z9e.jsx)(akt.Provider,{value:Dt,children:M}),e[16]=M,e[17]=yt):yt=e[17],yt};function Or(i){let e=(0,mm.useContext)(akt);if(!e)throw new Error(`"useGraphiQL" hook must be used within a component. -It looks like you are trying to use the hook outside the GraphiQL provider tree.`);return d6(e.current,h6(i))}var Ic=()=>Or(xDi);function wDi(i){let e=new Map;if(i)if(Array.isArray(i))for(let t of i)e.set(t.name.value,t);else if(typeof i=="string")(0,I1.visit)((0,I1.parse)(i),{FragmentDefinition(t){e.set(t.name.value,t)}});else throw new TypeError("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of `FragmentDefinitionNode` objects.");return e}function xDi(i){return i.actions}function Nl(...i){return e=>{let t=Object.create(null);for(let n of i)t[n]=e[n];return t}}function vC(i){return()=>{for(let e of i)e.dispose()}}mn();var CD=i=>{var e;let t=i.currentTarget;t===document.activeElement&&i.code==="Enter"&&(i.preventDefault(),(e=t.querySelector("textarea"))==null||e.focus())};function _D({uri:i,value:e}){let{monaco:t}=V3.getState();if(!t)throw new Error("Monaco editor is not initialized");let n=Xe.file(i),r=t.editor.getModel(n),o=n.path.split(".").at(-1);return r??t.editor.createModel(e,o,n)}function SD(i,e){let{model:t}=e;if(!t)throw new Error("options.model is required");let n=t.uri.path.split(".").at(-1),{monaco:r}=V3.getState();if(!r)throw new Error("Monaco editor is not initialized");return r.editor.create(i.current,{language:n,automaticLayout:!0,fontSize:15,minimap:{enabled:!1},tabSize:2,renderLineHighlight:"none",stickyScroll:{enabled:!1},overviewRulerLanes:0,scrollbar:{verticalScrollbarSize:10},scrollBeyondLastLine:!1,fontFamily:'"Fira Code"',fontLigatures:'"liga" off, "calt" off, "clig" off',lineNumbersMinChars:2,roundedSelection:!1,tabIndex:-1,...e})}var l7e={};Ih(l7e,{arrayReplaceAt:()=>YDi,asciiTrim:()=>s2,assign:()=>j3,escapeHtml:()=>yC,escapeRE:()=>oTi,fromCodePoint:()=>Q3,has:()=>qDi,isMdAsciiPunct:()=>r2,isPunctChar:()=>Tkt,isPunctCharCode:()=>n2,isSpace:()=>Pr,isString:()=>Cpe,isValidEntityCode:()=>_pe,isWhiteSpace:()=>i2,lib:()=>sTi,normalizeReference:()=>o2,unescapeAll:()=>AC,unescapeMd:()=>$Di});var gpe={};Ih(gpe,{decode:()=>tj,encode:()=>ppe,format:()=>H3,parse:()=>ij});var lkt={};function CDi(i){let e=lkt[i];if(e)return e;e=lkt[i]=[];for(let t=0;t<128;t++){let n=String.fromCharCode(t);e.push(n)}for(let t=0;t=55296&&u<=57343?r+="\uFFFD\uFFFD\uFFFD":r+=String.fromCharCode(u),o+=6;continue}}if((a&248)===240&&o+91114111?r+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,r+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}r+="\uFFFD"}return r})}hpe.defaultChars=";/?:@&=+$,#";hpe.componentChars="";var tj=hpe;var ckt={};function _Di(i){let e=ckt[i];if(e)return e;e=ckt[i]=[];for(let t=0;t<128;t++){let n=String.fromCharCode(t);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let t=0;t"u"&&(t=!0);let n=_Di(e),r="";for(let o=0,s=i.length;o=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1=56320&&l<=57343){r+=encodeURIComponent(i[o]+i[o+1]),o++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(i[o])}return r}fpe.defaultChars=";/?:@&=+$,-_.!~*'()#";fpe.componentChars="-_.!~*'()";var ppe=fpe;function H3(i){let e="";return e+=i.protocol||"",e+=i.slashes?"//":"",e+=i.auth?i.auth+"@":"",i.hostname&&i.hostname.indexOf(":")!==-1?e+="["+i.hostname+"]":e+=i.hostname||"",e+=i.port?":"+i.port:"",e+=i.pathname||"",e+=i.search||"",e+=i.hash||"",e}function mpe(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var SDi=/^([a-z0-9.+-]+:)/i,EDi=/:[0-9]*$/,DDi=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,TDi=["<",">",'"',"`"," ","\r",` -`," "],kDi=["{","}","|","\\","^","`"].concat(TDi),IDi=["'"].concat(kDi),ukt=["%","/","?",";","#"].concat(IDi),dkt=["/","?","#"],LDi=255,hkt=/^[+a-z0-9A-Z_-]{0,63}$/,NDi=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,fkt={javascript:!0,"javascript:":!0},pkt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function MDi(i,e){if(i&&i instanceof mpe)return i;let t=new mpe;return t.parse(i,e),t}mpe.prototype.parse=function(i,e){let t,n,r,o=i;if(o=o.trim(),!e&&i.split("#").length===1){let c=DDi.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=SDi.exec(o);if(s&&(s=s[0],t=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(e||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(s&&fkt[s])&&(o=o.substr(2),this.slashes=!0)),!fkt[s]&&(r||s&&!pkt[s])){let c=-1;for(let p=0;p127?w+="x":w+=A[C];if(!w.match(hkt)){let C=p.slice(0,g),_=p.slice(g+1),E=A.match(NDi);E&&(C.push(E[1]),_.unshift(E[2])),_.length&&(o=_.join(".")+o),this.hostname=C.join(".");break}}}}this.hostname.length>LDi&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=o.indexOf("#");a!==-1&&(this.hash=o.substr(a),o=o.slice(0,a));let l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),pkt[t]&&this.hostname&&!this.pathname&&(this.pathname=""),this};mpe.prototype.parseHost=function(i){let e=EDi.exec(i);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),i=i.substr(0,i.length-e.length)),i&&(this.hostname=i)};var ij=MDi;var t7e={};Ih(t7e,{Any:()=>bpe,Cc:()=>vpe,Cf:()=>mkt,P:()=>W3,S:()=>Ape,Z:()=>ype});var bpe=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var vpe=/[\0-\x1F\x7F-\x9F]/;var mkt=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var W3=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Ape=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var ype=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var gkt=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(i=>i.charCodeAt(0)));var bkt=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(i=>i.charCodeAt(0)));var i7e,RDi=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),n7e=(i7e=String.fromCodePoint)!==null&&i7e!==void 0?i7e:function(i){let e="";return i>65535&&(i-=65536,e+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),e+=String.fromCharCode(i),e};function r7e(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=RDi.get(i))!==null&&e!==void 0?e:i}var Dd;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(Dd||(Dd={}));var FDi=32,ED;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(ED||(ED={}));function o7e(i){return i>=Dd.ZERO&&i<=Dd.NINE}function ODi(i){return i>=Dd.UPPER_A&&i<=Dd.UPPER_F||i>=Dd.LOWER_A&&i<=Dd.LOWER_F}function PDi(i){return i>=Dd.UPPER_A&&i<=Dd.UPPER_Z||i>=Dd.LOWER_A&&i<=Dd.LOWER_Z||o7e(i)}function BDi(i){return i===Dd.EQUALS||PDi(i)}var Ed;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(Ed||(Ed={}));var Qv;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(Qv||(Qv={}));var wpe=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ed.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qv.Strict}startEntity(e){this.decodeMode=e,this.state=Ed.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ed.EntityStart:return e.charCodeAt(t)===Dd.NUM?(this.state=Ed.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ed.NamedEntity,this.stateNamedEntity(e,t));case Ed.NumericStart:return this.stateNumericStart(e,t);case Ed.NumericDecimal:return this.stateNumericDecimal(e,t);case Ed.NumericHex:return this.stateNumericHex(e,t);case Ed.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|FDi)===Dd.LOWER_X?(this.state=Ed.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ed.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let o=n-t;this.result=this.result*Math.pow(r,o)+parseInt(e.substr(t,o),r),this.consumed+=o}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,o!==0){if(s===Dd.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Qv.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&ED.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~ED.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Ed.NamedEntity:return this.result!==0&&(this.decodeMode!==Qv.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ed.NumericDecimal:return this.emitNumericEntity(0,2);case Ed.NumericHex:return this.emitNumericEntity(0,3);case Ed.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ed.EntityStart:return 0}}};function vkt(i){let e="",t=new wpe(i,n=>e+=n7e(n));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){e+=r.slice(s,a),t.startEntity(o);let c=t.write(r,a+1);if(c<0){s=a+t.end();break}s=a+c,a=c===0?s+1:s}let l=e+r.slice(s);return e="",l}}function zDi(i,e,t,n){let r=(e&ED.BRANCH_LENGTH)>>7,o=e&ED.JUMP_TABLE;if(r===0)return o!==0&&n===o?t:-1;if(o){let l=n-o;return l<0||l>=r?-1:i[t+l]-1}let s=t,a=s+r-1;for(;s<=a;){let l=s+a>>>1,c=i[l];if(cn)a=l-1;else return i[l+r]}return-1}var Akt=vkt(gkt),bBr=vkt(bkt);function U3(i,e=Qv.Legacy){return Akt(i,e)}function nj(i){return Akt(i,Qv.Strict)}function xpe(i){for(let e=1;ei.codePointAt(e):(i,e)=>(i.charCodeAt(e)&64512)===55296?(i.charCodeAt(e)-55296)*1024+i.charCodeAt(e+1)-56320+65536:i.charCodeAt(e);function s7e(i,e){return function(n){let r,o=0,s="";for(;r=i.exec(n);)o!==r.index&&(s+=n.substring(o,r.index)),s+=e.get(r[0].charCodeAt(0)),o=r.index+1;return s+n.substring(o)}}var ykt=s7e(/[&<>'"]/g,HDi),wkt=s7e(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),xkt=s7e(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Ckt;(function(i){i[i.XML=0]="XML",i[i.HTML=1]="HTML"})(Ckt||(Ckt={}));var _kt;(function(i){i[i.UTF8=0]="UTF8",i[i.ASCII=1]="ASCII",i[i.Extensive=2]="Extensive",i[i.Attribute=3]="Attribute",i[i.Text=4]="Text"})(_kt||(_kt={}));function QDi(i){return Object.prototype.toString.call(i)}function Cpe(i){return QDi(i)==="[object String]"}var GDi=Object.prototype.hasOwnProperty;function qDi(i,e){return GDi.call(i,e)}function j3(i){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){i[n]=t[n]})}}),i}function YDi(i,e,t){return[].concat(i.slice(0,e),t,i.slice(e+1))}function _pe(i){return!(i>=55296&&i<=57343||i>=64976&&i<=65007||(i&65535)===65535||(i&65535)===65534||i>=0&&i<=8||i===11||i>=14&&i<=31||i>=127&&i<=159||i>1114111)}function Q3(i){if(i>65535){i-=65536;let e=55296+(i>>10),t=56320+(i&1023);return String.fromCharCode(e,t)}return String.fromCharCode(i)}var Dkt=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,KDi=/&([a-z#][a-z0-9]{1,31});/gi,JDi=new RegExp(Dkt.source+"|"+KDi.source,"gi"),XDi=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function ZDi(i,e){if(e.charCodeAt(0)===35&&XDi.test(e)){let n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return _pe(n)?Q3(n):i}let t=U3(i);return t!==i?t:i}function $Di(i){return i.indexOf("\\")<0?i:i.replace(Dkt,"$1")}function AC(i){return i.indexOf("\\")<0&&i.indexOf("&")<0?i:i.replace(JDi,function(e,t,n){return t||ZDi(e,n)})}var eTi=/[&<>"]/,tTi=/[&<>"]/g,iTi={"&":"&","<":"<",">":">",'"':"""};function nTi(i){return iTi[i]}function yC(i){return eTi.test(i)?i.replace(tTi,nTi):i}var rTi=/[.?*+^$[\]\\(){}|-]/g;function oTi(i){return i.replace(rTi,"\\$&")}function Pr(i){switch(i){case 9:case 32:return!0}return!1}function i2(i){if(i>=8192&&i<=8202)return!0;switch(i){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Tkt(i){return W3.test(i)||Ape.test(i)}function n2(i){return Tkt(Q3(i))}function r2(i){switch(i){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function o2(i){return i=i.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(i=i.replace(/ẞ/g,"\xDF")),i.toLowerCase().toUpperCase()}function Ekt(i){return i===32||i===9||i===10||i===13}function s2(i){let e=0;for(;e=e&&Ekt(i.charCodeAt(t));t--);return i.slice(e,t+1)}var sTi={mdurl:gpe,ucmicro:t7e};var h7e={};Ih(h7e,{parseLinkDestination:()=>u7e,parseLinkLabel:()=>c7e,parseLinkTitle:()=>d7e});function c7e(i,e,t){let n,r,o,s,a=i.posMax,l=i.pos;for(i.pos=e+1,n=1;i.pos32))return o;if(n===41){if(s===0)break;s--}r++}return e===r||s!==0||(o.str=AC(i.slice(e,r)),o.pos=r,o.ok=!0),o}function d7e(i,e,t,n){let r,o=e,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)s.str=n.str,s.marker=n.marker;else{if(o>=t)return s;let a=i.charCodeAt(o);if(a!==34&&a!==39&&a!==40)return s;e++,o++,a===40&&(a=41),s.marker=a}for(;o"+yC(o.content)+""};L1.code_block=function(i,e,t,n,r){let o=i[e];return""+yC(i[e].content)+` -`};L1.fence=function(i,e,t,n,r){let o=i[e],s=o.info?AC(o.info).trim():"",a="",l="";if(s){let u=s.split(/(\s+)/g);a=u[0],l=u.slice(2).join("")}let c;if(t.highlight?c=t.highlight(o.content,a,l)||yC(o.content):c=yC(o.content),c.indexOf("${c} -`}return`
    ${c}
    -`};L1.image=function(i,e,t,n,r){let o=i[e];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,t,n),r.renderToken(i,e,t)};L1.hardbreak=function(i,e,t){return t.xhtmlOut?`
    +}, [response])`);let{actions:t}=tb(),[n,o]=(0,Nm.useState)(!1),r;e[0]!==t?(r=()=>{t.initialize(),o(!0)},e[0]=t,e[1]=r):r=e[1];let s;if(e[2]===Symbol.for("react.memo_cache_sentinel")?(s=[],e[2]=s):s=e[2],(0,Nm.useEffect)(r,s),!n)return null;let a;return e[3]!==i?(a=(0,w7e.jsx)(pAi,{...i}),e[3]=i,e[4]=a):a=e[4],a},pAi=i=>{let e=(0,x7e.c)(18),{defaultHeaders:t,defaultQuery:n,defaultTabs:o,externalFragments:r,onEditOperationName:s,onTabChange:a,shouldPersistHeaders:l,onCopyQuery:c,onPrettifyQuery:u,customScalarSchemas:d,dangerouslyAssumeSchemaIsValid:h,fetcher:f,inputValueDeprecation:p,introspectionQueryName:g,onSchemaChange:A,schema:v,schemaDescription:w,getDefaultFieldNames:C,operationName:_,onTogglePluginVisibility:E,plugins:I,referencePlugin:T,visiblePlugin:N,children:L,defaultTheme:B,editorTheme:z,storage:Q,...Z}=i,U=n===void 0?UJe:n,M=l===void 0?!1:l,ee=u===void 0?jJe:u,X=h===void 0?!1:h,Y=p===void 0?!1:p,$=g===void 0?"IntrospectionQuery":g,re=w===void 0?!1:w,ue=_===void 0?null:_,Ie=I===void 0?[]:I,nt=B===void 0?null:B,mt=z===void 0?$6:z,xt=(0,Nm.useRef)(null),wt=(0,Nm.useId)();if(xt.current===null){let Ei=new DZ(Q),vt=function(){let xr=Ei.get(us.visiblePlugin),Do=Ie.find(As=>As.title===xr);return Do||(xr&&Ei.set(us.visiblePlugin,""),N)},ni=function(){let xr=Ei.get(us.theme);switch(xr){case"light":return"light";case"dark":return"dark";default:return typeof xr=="string"&&Ei.set(us.theme,""),nt}},mr=function(){let xr=Z.initialQuery??Ei.get(us.query),Do=Z.initialVariables??Ei.get(us.variables),As=Z.initialHeaders??Ei.get(us.headers),{tabs:ra,activeTabIndex:gr}=Q$e({defaultHeaders:t,defaultQuery:U,defaultTabs:o,headers:As,query:xr,shouldPersistHeaders:M,storage:Ei,variables:Do}),hl=Ei.get(us.persistHeaders)!==null,Ro=M!==!1&&hl?Ei.get(us.persistHeaders)==="true":M,vs=qJe((...qa)=>{let jo=qa,fl=WEt({storage:Ei})(...jo),pl=Tnt({activeTabIndex:gr,defaultHeaders:t,defaultQuery:U,externalFragments:mAi(r),initialHeaders:As??t??"",initialQuery:xr??(gr===0?ra[0].query:null)??"",initialVariables:Do??"",onCopyQuery:c,onEditOperationName:s,onPrettifyQuery:ee,onTabChange:a,shouldPersistHeaders:Ro,tabs:ra,uriInstanceId:wt.replaceAll(/[:«»]/g,"")+"-"})(...jo),tr=sDt({fetcher:f,getDefaultFieldNames:C,overrideOperationName:ue})(...jo),ls=lDt({onTogglePluginVisibility:E,referencePlugin:T})(...jo),Or=cDt({customScalarSchemas:d,inputValueDeprecation:Y,introspectionQueryName:$,onSchemaChange:A,schemaDescription:re})(...jo),sa=uDt({editorTheme:mt})(...jo);return{...fl,...pl,...tr,...ls,...Or,...sa,actions:{...pl.actions,...tr.actions,...ls.actions,...Or.actions,...sa.actions}}}),{actions:er}=vs.getState();return er.storeTabs({activeTabIndex:gr,tabs:ra}),er.setPlugins(Ie),er.setVisiblePlugin(vt()),er.setTheme(ni()),vs};xt.current=mr()}let Ht,Fe;e[0]!==f?(Ht=()=>{xt.current.setState({fetcher:f})},Fe=[f],e[0]=f,e[1]=Ht,e[2]=Fe):(Ht=e[1],Fe=e[2]),kme(Ht,Fe);let zt,Fi;e[3]!==Ie||e[4]!==N?(zt=()=>{let{actions:Ei}=xt.current.getState();Ei.setPlugins(Ie),Ei.setVisiblePlugin(N)},Fi=[Ie,N],e[3]=Ie,e[4]=N,e[5]=zt,e[6]=Fi):(zt=e[5],Fi=e[6]),kme(zt,Fi);let Kt;e[7]!==X||e[8]!==v?(Kt=()=>{let Ei=YR(v)||v==null?v:fAi(v)?ix(v):void 0,vt=!Ei||X?[]:bS(Ei),ni=xt.current;ni.setState(Wi=>{let{requestCounter:xr}=Wi;return{requestCounter:xr+1,schema:Ei,shouldIntrospect:!Ei&&v!==null,validationErrors:vt}});let{actions:mr}=ni.getState();mr.introspect()},e[7]=X,e[8]=v,e[9]=Kt):Kt=e[9];let Li;e[10]!==X||e[11]!==f||e[12]!==v?(Li=[v,X,f],e[10]=X,e[11]=f,e[12]=v,e[13]=Li):Li=e[13],(0,Nm.useEffect)(Kt,Li);let Bn,zn;e[14]===Symbol.for("react.memo_cache_sentinel")?(Bn=()=>{let Ei=function(ni){if(ni.ctrlKey&&ni.key==="R"){let{actions:mr}=xt.current.getState();mr.introspect()}};return window.addEventListener("keydown",Ei),()=>{window.removeEventListener("keydown",Ei)}},zn=[],e[14]=Bn,e[15]=zn):(Bn=e[14],zn=e[15]),(0,Nm.useEffect)(Bn,zn);let yo;return e[16]!==L?(yo=(0,w7e.jsx)(dDt.Provider,{value:xt,children:L}),e[16]=L,e[17]=yo):yo=e[17],yo};function Vo(i){let e=(0,Nm.useContext)(dDt);if(!e)throw new Error(`"useGraphiQL" hook must be used within a component. +It looks like you are trying to use the hook outside the GraphiQL provider tree.`);return t9(e.current,i9(i))}var Oc=()=>Vo(gAi);function mAi(i){let e=new Map;if(i)if(Array.isArray(i))for(let t of i)e.set(t.name.value,t);else if(typeof i=="string")ca(Zc(i),{FragmentDefinition(t){e.set(t.name.value,t)}});else throw new TypeError("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of `FragmentDefinitionNode` objects.");return e}function gAi(i){return i.actions}function Ol(...i){return e=>{let t=Object.create(null);for(let n of i)t[n]=e[n];return t}}function UC(i){return()=>{for(let e of i)e.dispose()}}mn();var qD=i=>{var e;let t=i.currentTarget;t===document.activeElement&&i.code==="Enter"&&(i.preventDefault(),(e=t.querySelector("textarea"))==null||e.focus())};function YD({uri:i,value:e}){let{monaco:t}=L4.getState();if(!t)throw new Error("Monaco editor is not initialized");let n=Je.file(i),o=t.editor.getModel(n),r=n.path.split(".").at(-1);return o??t.editor.createModel(e,r,n)}function KD(i,e){let{model:t}=e;if(!t)throw new Error("options.model is required");let n=t.uri.path.split(".").at(-1),{monaco:o}=L4.getState();if(!o)throw new Error("Monaco editor is not initialized");return o.editor.create(i.current,{language:n,automaticLayout:!0,fontSize:15,minimap:{enabled:!1},tabSize:2,renderLineHighlight:"none",stickyScroll:{enabled:!1},overviewRulerLanes:0,scrollbar:{verticalScrollbarSize:10},scrollBeyondLastLine:!1,fontFamily:'"Fira Code"',fontLigatures:'"liga" off, "calt" off, "clig" off',lineNumbersMinChars:2,roundedSelection:!1,tabIndex:-1,...e})}var L7e={};ad(L7e,{arrayReplaceAt:()=>WAi,asciiTrim:()=>V2,assign:()=>F4,escapeHtml:()=>QC,escapeRE:()=>$Ai,fromCodePoint:()=>O4,has:()=>HAi,isMdAsciiPunct:()=>B2,isPunctChar:()=>NDt,isPunctCharCode:()=>P2,isSpace:()=>Ho,isString:()=>Wme,isValidEntityCode:()=>Ume,isWhiteSpace:()=>O2,lib:()=>evi,normalizeReference:()=>z2,unescapeAll:()=>jC,unescapeMd:()=>qAi});var Fme={};ad(Fme,{decode:()=>NQ,encode:()=>Mme,format:()=>N4,parse:()=>MQ});var hDt={};function bAi(i){let e=hDt[i];if(e)return e;e=hDt[i]=[];for(let t=0;t<128;t++){let n=String.fromCharCode(t);e.push(n)}for(let t=0;t=55296&&u<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(u),r+=6;continue}}if((a&248)===240&&r+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),r+=9;continue}}o+="\uFFFD"}return o})}Lme.defaultChars=";/?:@&=+$,#";Lme.componentChars="";var NQ=Lme;var fDt={};function AAi(i){let e=fDt[i];if(e)return e;e=fDt[i]=[];for(let t=0;t<128;t++){let n=String.fromCharCode(t);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let t=0;t"u"&&(t=!0);let n=AAi(e),o="";for(let r=0,s=i.length;r=55296&&a<=57343){if(a>=55296&&a<=56319&&r+1=56320&&l<=57343){o+=encodeURIComponent(i[r]+i[r+1]),r++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(i[r])}return o}Nme.defaultChars=";/?:@&=+$,-_.!~*'()#";Nme.componentChars="-_.!~*'()";var Mme=Nme;function N4(i){let e="";return e+=i.protocol||"",e+=i.slashes?"//":"",e+=i.auth?i.auth+"@":"",i.hostname&&i.hostname.indexOf(":")!==-1?e+="["+i.hostname+"]":e+=i.hostname||"",e+=i.port?":"+i.port:"",e+=i.pathname||"",e+=i.search||"",e+=i.hash||"",e}function Rme(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var vAi=/^([a-z0-9.+-]+:)/i,yAi=/:[0-9]*$/,wAi=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xAi=["<",">",'"',"`"," ","\r",` +`," "],CAi=["{","}","|","\\","^","`"].concat(xAi),_Ai=["'"].concat(CAi),pDt=["%","/","?",";","#"].concat(_Ai),mDt=["/","?","#"],SAi=255,gDt=/^[+a-z0-9A-Z_-]{0,63}$/,EAi=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,bDt={javascript:!0,"javascript:":!0},ADt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function DAi(i,e){if(i&&i instanceof Rme)return i;let t=new Rme;return t.parse(i,e),t}Rme.prototype.parse=function(i,e){let t,n,o,r=i;if(r=r.trim(),!e&&i.split("#").length===1){let c=wAi.exec(r);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=vAi.exec(r);if(s&&(s=s[0],t=s.toLowerCase(),this.protocol=s,r=r.substr(s.length)),(e||s||r.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=r.substr(0,2)==="//",o&&!(s&&bDt[s])&&(r=r.substr(2),this.slashes=!0)),!bDt[s]&&(o||s&&!ADt[s])){let c=-1;for(let p=0;p127?w+="x":w+=v[C];if(!w.match(gDt)){let C=p.slice(0,g),_=p.slice(g+1),E=v.match(EAi);E&&(C.push(E[1]),_.unshift(E[2])),_.length&&(r=_.join(".")+r),this.hostname=C.join(".");break}}}}this.hostname.length>SAi&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=r.indexOf("#");a!==-1&&(this.hash=r.substr(a),r=r.slice(0,a));let l=r.indexOf("?");return l!==-1&&(this.search=r.substr(l),r=r.slice(0,l)),r&&(this.pathname=r),ADt[t]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Rme.prototype.parseHost=function(i){let e=yAi.exec(i);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),i=i.substr(0,i.length-e.length)),i&&(this.hostname=i)};var MQ=DAi;var _7e={};ad(_7e,{Any:()=>Ome,Cc:()=>Pme,Cf:()=>vDt,P:()=>M4,S:()=>Bme,Z:()=>zme});var Ome=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Pme=/[\0-\x1F\x7F-\x9F]/;var vDt=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var M4=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Bme=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var zme=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var yDt=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(i=>i.charCodeAt(0)));var wDt=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(i=>i.charCodeAt(0)));var S7e,TAi=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),E7e=(S7e=String.fromCodePoint)!==null&&S7e!==void 0?S7e:function(i){let e="";return i>65535&&(i-=65536,e+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),e+=String.fromCharCode(i),e};function D7e(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=TAi.get(i))!==null&&e!==void 0?e:i}var Od;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(Od||(Od={}));var kAi=32,JD;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(JD||(JD={}));function T7e(i){return i>=Od.ZERO&&i<=Od.NINE}function IAi(i){return i>=Od.UPPER_A&&i<=Od.UPPER_F||i>=Od.LOWER_A&&i<=Od.LOWER_F}function LAi(i){return i>=Od.UPPER_A&&i<=Od.UPPER_Z||i>=Od.LOWER_A&&i<=Od.LOWER_Z||T7e(i)}function NAi(i){return i===Od.EQUALS||LAi(i)}var Fd;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(Fd||(Fd={}));var dv;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(dv||(dv={}));var Vme=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Fd.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=dv.Strict}startEntity(e){this.decodeMode=e,this.state=Fd.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Fd.EntityStart:return e.charCodeAt(t)===Od.NUM?(this.state=Fd.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Fd.NamedEntity,this.stateNamedEntity(e,t));case Fd.NumericStart:return this.stateNumericStart(e,t);case Fd.NumericDecimal:return this.stateNumericDecimal(e,t);case Fd.NumericHex:return this.stateNumericHex(e,t);case Fd.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|kAi)===Od.LOWER_X?(this.state=Fd.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Fd.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,o){if(t!==n){let r=n-t;this.result=this.result*Math.pow(o,r)+parseInt(e.substr(t,r),o),this.consumed+=r}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,r!==0){if(s===Od.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==dv.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,o=(n[t]&JD.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:o}=this;return this.emitCodePoint(t===1?o[e]&~JD.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Fd.NamedEntity:return this.result!==0&&(this.decodeMode!==dv.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Fd.NumericDecimal:return this.emitNumericEntity(0,2);case Fd.NumericHex:return this.emitNumericEntity(0,3);case Fd.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Fd.EntityStart:return 0}}};function xDt(i){let e="",t=new Vme(i,n=>e+=E7e(n));return function(o,r){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){e+=o.slice(s,a),t.startEntity(r);let c=t.write(o,a+1);if(c<0){s=a+t.end();break}s=a+c,a=c===0?s+1:s}let l=e+o.slice(s);return e="",l}}function MAi(i,e,t,n){let o=(e&JD.BRANCH_LENGTH)>>7,r=e&JD.JUMP_TABLE;if(o===0)return r!==0&&n===r?t:-1;if(r){let l=n-r;return l<0||l>=o?-1:i[t+l]-1}let s=t,a=s+o-1;for(;s<=a;){let l=s+a>>>1,c=i[l];if(cn)a=l-1;else return i[l+o]}return-1}var CDt=xDt(yDt),h8o=xDt(wDt);function R4(i,e=dv.Legacy){return CDt(i,e)}function RQ(i){return CDt(i,dv.Strict)}function Hme(i){for(let e=1;ei.codePointAt(e):(i,e)=>(i.charCodeAt(e)&64512)===55296?(i.charCodeAt(e)-55296)*1024+i.charCodeAt(e+1)-56320+65536:i.charCodeAt(e);function k7e(i,e){return function(n){let o,r=0,s="";for(;o=i.exec(n);)r!==o.index&&(s+=n.substring(r,o.index)),s+=e.get(o[0].charCodeAt(0)),r=o.index+1;return s+n.substring(r)}}var _Dt=k7e(/[&<>'"]/g,FAi),SDt=k7e(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),EDt=k7e(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var DDt;(function(i){i[i.XML=0]="XML",i[i.HTML=1]="HTML"})(DDt||(DDt={}));var TDt;(function(i){i[i.UTF8=0]="UTF8",i[i.ASCII=1]="ASCII",i[i.Extensive=2]="Extensive",i[i.Attribute=3]="Attribute",i[i.Text=4]="Text"})(TDt||(TDt={}));function zAi(i){return Object.prototype.toString.call(i)}function Wme(i){return zAi(i)==="[object String]"}var VAi=Object.prototype.hasOwnProperty;function HAi(i,e){return VAi.call(i,e)}function F4(i){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){i[n]=t[n]})}}),i}function WAi(i,e,t){return[].concat(i.slice(0,e),t,i.slice(e+1))}function Ume(i){return!(i>=55296&&i<=57343||i>=64976&&i<=65007||(i&65535)===65535||(i&65535)===65534||i>=0&&i<=8||i===11||i>=14&&i<=31||i>=127&&i<=159||i>1114111)}function O4(i){if(i>65535){i-=65536;let e=55296+(i>>10),t=56320+(i&1023);return String.fromCharCode(e,t)}return String.fromCharCode(i)}var LDt=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,UAi=/&([a-z#][a-z0-9]{1,31});/gi,jAi=new RegExp(LDt.source+"|"+UAi.source,"gi"),QAi=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function GAi(i,e){if(e.charCodeAt(0)===35&&QAi.test(e)){let n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Ume(n)?O4(n):i}let t=R4(i);return t!==i?t:i}function qAi(i){return i.indexOf("\\")<0?i:i.replace(LDt,"$1")}function jC(i){return i.indexOf("\\")<0&&i.indexOf("&")<0?i:i.replace(jAi,function(e,t,n){return t||GAi(e,n)})}var YAi=/[&<>"]/,KAi=/[&<>"]/g,JAi={"&":"&","<":"<",">":">",'"':"""};function XAi(i){return JAi[i]}function QC(i){return YAi.test(i)?i.replace(KAi,XAi):i}var ZAi=/[.?*+^$[\]\\(){}|-]/g;function $Ai(i){return i.replace(ZAi,"\\$&")}function Ho(i){switch(i){case 9:case 32:return!0}return!1}function O2(i){if(i>=8192&&i<=8202)return!0;switch(i){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function NDt(i){return M4.test(i)||Bme.test(i)}function P2(i){return NDt(O4(i))}function B2(i){switch(i){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function z2(i){return i=i.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(i=i.replace(/ẞ/g,"\xDF")),i.toLowerCase().toUpperCase()}function IDt(i){return i===32||i===9||i===10||i===13}function V2(i){let e=0;for(;e=e&&IDt(i.charCodeAt(t));t--);return i.slice(e,t+1)}var evi={mdurl:Fme,ucmicro:_7e};var F7e={};ad(F7e,{parseLinkDestination:()=>M7e,parseLinkLabel:()=>N7e,parseLinkTitle:()=>R7e});function N7e(i,e,t){let n,o,r,s,a=i.posMax,l=i.pos;for(i.pos=e+1,n=1;i.pos32))return r;if(n===41){if(s===0)break;s--}o++}return e===o||s!==0||(r.str=jC(i.slice(e,o)),r.pos=o,r.ok=!0),r}function R7e(i,e,t,n){let o,r=e,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)s.str=n.str,s.marker=n.marker;else{if(r>=t)return s;let a=i.charCodeAt(r);if(a!==34&&a!==39&&a!==40)return s;e++,r++,a===40&&(a=41),s.marker=a}for(;r"+QC(r.content)+""};Y1.code_block=function(i,e,t,n,o){let r=i[e];return""+QC(i[e].content)+` +`};Y1.fence=function(i,e,t,n,o){let r=i[e],s=r.info?jC(r.info).trim():"",a="",l="";if(s){let u=s.split(/(\s+)/g);a=u[0],l=u.slice(2).join("")}let c;if(t.highlight?c=t.highlight(r.content,a,l)||QC(r.content):c=QC(r.content),c.indexOf("${c} +`}return`
    ${c}
    +`};Y1.image=function(i,e,t,n,o){let r=i[e];return r.attrs[r.attrIndex("alt")][1]=o.renderInlineAsText(r.children,t,n),o.renderToken(i,e,t)};Y1.hardbreak=function(i,e,t){return t.xhtmlOut?`
    `:`
    -`};L1.softbreak=function(i,e,t){return t.breaks?t.xhtmlOut?`
    +`};Y1.softbreak=function(i,e,t){return t.breaks?t.xhtmlOut?`
    `:`
    `:` -`};L1.text=function(i,e){return yC(i[e].content)};L1.html_block=function(i,e){return i[e].content};L1.html_inline=function(i,e){return i[e].content};function G3(){this.rules=j3({},L1)}G3.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t -`:">",o};G3.prototype.renderInline=function(i,e,t){let n="",r=this.rules;for(let o=0,s=i.length;o=0&&(n=this.attrs[t][1]),n};q3.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};var wC=q3;function Ikt(i,e,t){this.src=i,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}Ikt.prototype.Token=wC;var Lkt=Ikt;var aTi=/\r\n?|\n/g,lTi=/\0/g;function f7e(i){let e;e=i.src.replace(aTi,` -`),e=e.replace(lTi,"\uFFFD"),i.src=e}function p7e(i){let e;i.inlineMode?(e=new i.Token("inline","",0),e.content=i.src,e.map=[0,1],e.children=[],i.tokens.push(e)):i.md.block.parse(i.src,i.md,i.env,i.tokens)}function m7e(i){let e=i.tokens;for(let t=0,n=e.length;t\s]/i.test(i)}function uTi(i){return/^<\/a\s*>/i.test(i)}function g7e(i){let e=i.tokens;if(i.md.options.linkify)for(let t=0,n=e.length;t=0;a--){let l=r[a];if(l.type==="link_close"){for(a--;r[a].level!==l.level&&r[a].type!=="link_open";)a--;continue}if(l.type==="html_inline"&&(cTi(l.content)&&s>0&&s--,uTi(l.content)&&s++),!(s>0)&&l.type==="text"&&i.md.linkify.test(l.content)){let c=l.content,u=i.md.linkify.match(c),d=[],h=l.level,f=0;u.length>0&&u[0].index===0&&a>0&&r[a-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let I=new i.Token("text","",0);I.content=c.slice(f,w),I.level=h,d.push(I)}let C=new i.Token("link_open","a",1);C.attrs=[["href",v]],C.level=h++,C.markup="linkify",C.info="auto",d.push(C);let _=new i.Token("text","",0);_.content=A,_.level=h,d.push(_);let E=new i.Token("link_close","a",-1);E.level=--h,E.markup="linkify",E.info="auto",d.push(E),f=u[p].lastIndex}if(f0){let a=r.length;for(let d of o)a+=d.nodes.length-1;let l=new Array(a),c=0,u=0;o.reverse();for(let d=0;d=0;t--){let n=i[t];n.type==="text"&&!e&&(n.content=n.content.replace(hTi,pTi)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function gTi(i){let e=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n.type==="text"&&!e&&Nkt.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function b7e(i){let e;if(i.md.options.typographer)for(e=i.tokens.length-1;e>=0;e--)i.tokens[e].type==="inline"&&(dTi.test(i.tokens[e].content)&&mTi(i.tokens[e].children),Nkt.test(i.tokens[e].content)&&gTi(i.tokens[e].children))}var bTi=/['"]/,Mkt=/['"]/g,Rkt="\u2019";function Spe(i,e,t,n){i[e]||(i[e]=[]),i[e].push({pos:t,ch:n})}function vTi(i,e){let t="",n=0;e.sort((r,o)=>r.pos-o.pos);for(let r=0;r=0&&!(n[t].level<=a);t--);if(n.length=t+1,s.type!=="text")continue;let l=s.content,c=0,u=l.length;e:for(;c=0)g=l.charCodeAt(d.index-1);else for(t=o-1;t>=0&&!(i[t].type==="softbreak"||i[t].type==="hardbreak");t--)if(i[t].content){g=i[t].content.charCodeAt(i[t].content.length-1);break}let v=32;if(c=48&&g<=57&&(f=h=!1),h&&f&&(h=A,f=w),!h&&!f){p&&Spe(r,o,d.index,Rkt);continue}if(f)for(t=n.length-1;t>=0;t--){let E=n[t];if(n[t].level=0;e--)i.tokens[e].type!=="inline"||!bTi.test(i.tokens[e].content)||ATi(i.tokens[e].children,i)}function A7e(i){let e,t,n=i.tokens,r=n.length;for(let o=0;o0&&this.level++,this.tokens.push(n),n};N1.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};N1.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;et;)if(!Pr(this.src.charCodeAt(--e)))return e+1;return e};N1.prototype.skipChars=function(e,t){for(let n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e};N1.prototype.getLines=function(e,t,n,r){if(e>=t)return"";let o=new Array(t-e);for(let s=0,a=e;an?o[s]=new Array(l-n+1).join(" ")+this.src.slice(u,d):o[s]=this.src.slice(u,d)}return o.join("")};N1.prototype.Token=wC;var Okt=N1;var yTi=65536;function x7e(i,e){let t=i.bMarks[e]+i.tShift[e],n=i.eMarks[e];return i.src.slice(t,n)}function Pkt(i){let e=[],t=i.length,n=0,r=i.charCodeAt(n),o=!1,s=0,a="";for(;nt)return!1;let r=e+1;if(i.sCount[r]=4)return!1;let o=i.bMarks[r]+i.tShift[r];if(o>=i.eMarks[r])return!1;let s=i.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=i.eMarks[r])return!1;let a=i.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!Pr(a)||s===45&&Pr(a))return!1;for(;o=4)return!1;c=Pkt(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();let d=c.length;if(d===0||d!==u.length)return!1;if(n)return!0;let h=i.parentType;i.parentType="table";let f=i.md.block.ruler.getRules("blockquote"),p=i.push("table_open","table",1),g=[e,0];p.map=g;let v=i.push("thead_open","thead",1);v.map=[e,e+1];let A=i.push("tr_open","tr",1);A.map=[e,e+1];for(let _=0;_=4||(c=Pkt(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),C+=d-c.length,C>yTi))break;if(r===e+2){let I=i.push("tbody_open","tbody",1);I.map=w=[e+2,0]}let E=i.push("tr_open","tr",1);E.map=[r,r+1];for(let I=0;I=4){n++,r=n;continue}break}i.line=r;let o=i.push("code_block","code",0);return o.content=i.getLines(e,r,4+i.blkIndent,!1)+` -`,o.map=[e,i.line],!0}function S7e(i,e,t,n){let r=i.bMarks[e]+i.tShift[e],o=i.eMarks[e];if(i.sCount[e]-i.blkIndent>=4||r+3>o)return!1;let s=i.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=i.skipChars(r,s);let l=r-a;if(l<3)return!1;let c=i.src.slice(a,r),u=i.src.slice(r,o);if(s===96&&u.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let d=e,h=!1;for(;d++,!(d>=t||(r=a=i.bMarks[d]+i.tShift[d],o=i.eMarks[d],r=4)&&(r=i.skipChars(r,s),!(r-a=4||i.src.charCodeAt(r)!==62)return!1;if(n)return!0;let a=[],l=[],c=[],u=[],d=i.md.block.ruler.getRules("blockquote"),h=i.parentType;i.parentType="blockquote";let f=!1,p;for(p=e;p=o)break;if(i.src.charCodeAt(r++)===62&&!C){let E=i.sCount[p]+1,I,T;i.src.charCodeAt(r)===32?(r++,E++,T=!1,I=!0):i.src.charCodeAt(r)===9?(I=!0,(i.bsCount[p]+E)%4===3?(r++,E++,T=!1):T=!0):I=!1;let L=E;for(a.push(i.bMarks[p]),i.bMarks[p]=r;r=o,l.push(i.bsCount[p]),i.bsCount[p]=i.sCount[p]+1+(I?1:0),c.push(i.sCount[p]),i.sCount[p]=L-E,u.push(i.tShift[p]),i.tShift[p]=r-i.bMarks[p];continue}if(f)break;let _=!1;for(let E=0,I=d.length;E";let A=[e,0];v.map=A,i.md.block.tokenize(i,e,p);let w=i.push("blockquote_close","blockquote",-1);w.markup=">",i.lineMax=s,i.parentType=h,A[1]=i.line;for(let C=0;C=4)return!1;let o=i.bMarks[e]+i.tShift[e],s=i.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o=n)return-1;let o=i.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=n)return-1;if(o=i.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r=4||i.listIndent>=0&&i.sCount[l]-i.listIndent>=4&&i.sCount[l]=i.blkIndent&&(u=!0);let d,h,f;if((f=zkt(i,l))>=0){if(d=!0,s=i.bMarks[l]+i.tShift[l],h=Number(i.src.slice(s,f-1)),u&&h!==1)return!1}else if((f=Bkt(i,l))>=0)d=!1;else return!1;if(u&&i.skipSpaces(f)>=i.eMarks[l])return!1;if(n)return!0;let p=i.src.charCodeAt(f-1),g=i.tokens.length;d?(a=i.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=i.push("bullet_list_open","ul",1);let v=[l,0];a.map=v,a.markup=String.fromCharCode(p);let A=!1,w=i.md.block.ruler.getRules("list"),C=i.parentType;for(i.parentType="list";l=r?T=1:T=E-_,T>4&&(T=1);let L=_+T;a=i.push("list_item_open","li",1),a.markup=String.fromCharCode(p);let M=[l,0];a.map=M,d&&(a.info=i.src.slice(s,f-1));let z=i.tight,H=i.tShift[l],B=i.sCount[l],q=i.listIndent;if(i.listIndent=i.blkIndent,i.blkIndent=L,i.tight=!0,i.tShift[l]=I-i.bMarks[l],i.sCount[l]=E,I>=r&&i.isEmpty(l+1)?i.line=Math.min(i.line+2,t):i.md.block.tokenize(i,l,t,!0),(!i.tight||A)&&(c=!1),A=i.line-l>1&&i.isEmpty(i.line-1),i.blkIndent=i.listIndent,i.listIndent=q,i.tShift[l]=H,i.sCount[l]=B,i.tight=z,a=i.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),l=i.line,M[1]=l,l>=t||i.sCount[l]=4)break;let U=!1;for(let F=0,ne=w.length;F=4||i.src.charCodeAt(r)!==91)return!1;function a(w){let C=i.lineMax;if(w>=C||i.isEmpty(w))return null;let _=!1;if(i.sCount[w]-i.blkIndent>3&&(_=!0),i.sCount[w]<0&&(_=!0),!_){let T=i.md.block.ruler.getRules("reference"),L=i.parentType;i.parentType="reference";let M=!1;for(let z=0,H=T.length;z"u"&&(i.env.references={}),typeof i.env.references[A]>"u"&&(i.env.references[A]={title:v,href:d}),i.line=s),!0):!1}var Vkt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var xTi="[a-zA-Z_:][a-zA-Z0-9:._-]*",CTi="[^\"'=<>`\\x00-\\x20]+",_Ti="'[^']*'",STi='"[^"]*"',ETi="(?:"+CTi+"|"+_Ti+"|"+STi+")",DTi="(?:\\s+"+xTi+"(?:\\s*=\\s*"+ETi+")?)",Hkt="<[A-Za-z][A-Za-z0-9\\-]*"+DTi+"*\\s*\\/?>",Wkt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",TTi="",kTi="<[?][\\s\\S]*?[?]>",ITi="]*>",LTi="",Ukt=new RegExp("^(?:"+Hkt+"|"+Wkt+"|"+TTi+"|"+kTi+"|"+ITi+"|"+LTi+")"),jkt=new RegExp("^(?:"+Hkt+"|"+Wkt+")");var l2=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(jkt.source+"\\s*$"),/^$/,!1]];function I7e(i,e,t,n){let r=i.bMarks[e]+i.tShift[e],o=i.eMarks[e];if(i.sCount[e]-i.blkIndent>=4||!i.md.options.html||i.src.charCodeAt(r)!==60)return!1;let s=i.src.slice(r,o),a=0;for(;a=4)return!1;let s=i.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=i.src.charCodeAt(++r);s===35&&r6||rr&&Pr(i.src.charCodeAt(l-1))&&(o=l),i.line=e+1;let c=i.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[e,i.line];let u=i.push("inline","",0);u.content=s2(i.src.slice(r,o)),u.map=[e,i.line],u.children=[];let d=i.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function N7e(i,e,t){let n=i.md.block.ruler.getRules("paragraph");if(i.sCount[e]-i.blkIndent>=4)return!1;let r=i.parentType;i.parentType="paragraph";let o=0,s,a=e+1;for(;a3)continue;if(i.sCount[a]>=i.blkIndent){let f=i.bMarks[a]+i.tShift[a],p=i.eMarks[a];if(f=p))){o=s===61?1:2;break}}if(i.sCount[a]<0)continue;let h=!1;for(let f=0,p=n.length;f3||i.sCount[o]<0)continue;let c=!1;for(let u=0,d=n.length;u=t||i.sCount[s]=o){i.line=t;break}let l=i.line,c=!1;for(let u=0;u=i.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");i.tight=!a,i.isEmpty(i.line-1)&&(a=!0),s=i.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n};rj.prototype.scanDelims=function(i,e){let t=this.posMax,n=this.src.charCodeAt(i),r;if(i===0)r=32;else if(i===1)r=this.src.charCodeAt(0),(r&63488)===55296&&(r=65533);else if(r=this.src.charCodeAt(i-1),(r&64512)===56320){let v=this.src.charCodeAt(i-2);r=(v&64512)===55296?65536+(v-55296<<10)+(r-56320):65533}else(r&64512)===55296&&(r=65533);let o=i;for(;o=65&&i<=90||i>=97&&i<=122}function RTi(i){return i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===43||i===45||i===46}function F7e(i,e){if(!i.md.options.linkify||i.linkLevel>0)return!1;let t=i.pos,n=i.posMax;if(t+3>n||i.src.charCodeAt(t)!==58||i.src.charCodeAt(t+1)!==47||i.src.charCodeAt(t+2)!==47)return!1;let r=t-Math.min(10,i.pending.length,t),o=t;for(;o>r&&RTi(i.src.charCodeAt(o-1));)o--;if(o===t||!MTi(i.src.charCodeAt(o)))return!1;let s=t-o,a=i.md.linkify.matchAtStart(i.src.slice(o));if(!a)return!1;let l=a.url;if(l.length<=s)return!1;let c=l.length;for(;c>0&&l.charCodeAt(c-1)===42;)c--;c!==l.length&&(l=l.slice(0,c));let u=i.md.normalizeLink(l);if(!i.md.validateLink(u))return!1;if(!e){i.pending=i.pending.slice(0,-s);let d=i.push("link_open","a",1);d.attrs=[["href",u]],d.markup="linkify",d.info="auto";let h=i.push("text","",0);h.content=i.md.normalizeLinkText(l);let f=i.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return i.pos+=l.length-s,!0}function O7e(i,e){let t=i.pos;if(i.src.charCodeAt(t)!==10)return!1;let n=i.pending.length-1,r=i.posMax;if(!e)if(n>=0&&i.pending.charCodeAt(n)===32)if(n>=1&&i.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&i.pending.charCodeAt(o-1)===32;)o--;i.pending=i.pending.slice(0,o),i.push("hardbreak","br",0)}else i.pending=i.pending.slice(0,-1),i.push("softbreak","br",0);else i.push("softbreak","br",0);for(t++;t?@[]^_`{|}~-".split("").forEach(function(i){P7e[i.charCodeAt(0)]=1});function B7e(i,e){let t=i.pos,n=i.posMax;if(i.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let r=i.src.charCodeAt(t);if(r===10){for(e||i.push("hardbreak","br",0),t++;t=55296&&r<=56319&&t+1=56320&&a<=57343&&(o+=i.src[t+1],t++)}let s="\\"+o;if(!e){let a=i.push("text_special","",0);r<256&&P7e[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return i.pos=t+1,!0}function z7e(i,e){let t=i.pos;if(i.src.charCodeAt(t)!==96)return!1;let r=t;t++;let o=i.posMax;for(;t=0;n--){let r=e[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;let o=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=i.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";let c=i.tokens[o.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(i.tokens[e[n-1].token].content="",i.tokens[e[r.end+1].token].content="",n--)}}function BTi(i){let e=i.tokens_meta,t=i.tokens_meta.length;Ykt(i,i.delimiters);for(let n=0;n=d)return!1;if(l=p,r=i.md.helpers.parseLinkDestination(i.src,p,i.posMax),r.ok){for(s=i.md.normalizeLink(r.str),i.md.validateLink(s)?p=r.pos:s="",l=p;p=d||i.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof i.env.references>"u")return!1;if(p=0?n=i.src.slice(l,p++):p=f+1):p=f+1,n||(n=i.src.slice(h,f)),o=i.env.references[o2(n)],!o)return i.pos=u,!1;s=o.href,a=o.title}if(!e){i.pos=h,i.posMax=f;let g=i.push("link_open","a",1),v=[["href",s]];g.attrs=v,a&&v.push(["title",a]),i.linkLevel++,i.md.inline.tokenize(i),i.linkLevel--,i.push("link_close","a",-1)}return i.pos=p,i.posMax=d,!0}function U7e(i,e){let t,n,r,o,s,a,l,c,u="",d=i.pos,h=i.posMax;if(i.src.charCodeAt(i.pos)!==33||i.src.charCodeAt(i.pos+1)!==91)return!1;let f=i.pos+2,p=i.md.helpers.parseLinkLabel(i,i.pos+1,!1);if(p<0)return!1;if(o=p+1,o=h)return!1;for(c=o,a=i.md.helpers.parseLinkDestination(i.src,o,i.posMax),a.ok&&(u=i.md.normalizeLink(a.str),i.md.validateLink(u)?o=a.pos:u=""),c=o;o=h||i.src.charCodeAt(o)!==41)return i.pos=d,!1;o++}else{if(typeof i.env.references>"u")return!1;if(o=0?r=i.src.slice(c,o++):o=p+1):o=p+1,r||(r=i.src.slice(f,p)),s=i.env.references[o2(r)],!s)return i.pos=d,!1;u=s.href,l=s.title}if(!e){n=i.src.slice(f,p);let g=[];i.md.inline.parse(n,i.md,i.env,g);let v=i.push("image","img",0),A=[["src",u],["alt",""]];v.attrs=A,v.children=g,v.content=n,l&&A.push(["title",l])}return i.pos=o,i.posMax=h,!0}var zTi=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,VTi=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function j7e(i,e){let t=i.pos;if(i.src.charCodeAt(t)!==60)return!1;let n=i.pos,r=i.posMax;for(;;){if(++t>=r)return!1;let s=i.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}let o=i.src.slice(n+1,t);if(VTi.test(o)){let s=i.md.normalizeLink(o);if(!i.md.validateLink(s))return!1;if(!e){let a=i.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=i.push("text","",0);l.content=i.md.normalizeLinkText(o);let c=i.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return i.pos+=o.length+2,!0}if(zTi.test(o)){let s=i.md.normalizeLink("mailto:"+o);if(!i.md.validateLink(s))return!1;if(!e){let a=i.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=i.push("text","",0);l.content=i.md.normalizeLinkText(o);let c=i.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return i.pos+=o.length+2,!0}return!1}function HTi(i){return/^\s]/i.test(i)}function WTi(i){return/^<\/a\s*>/i.test(i)}function UTi(i){let e=i|32;return e>=97&&e<=122}function Q7e(i,e){if(!i.md.options.html)return!1;let t=i.posMax,n=i.pos;if(i.src.charCodeAt(n)!==60||n+2>=t)return!1;let r=i.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!UTi(r))return!1;let o=i.src.slice(n).match(Ukt);if(!o)return!1;if(!e){let s=i.push("html_inline","",0);s.content=o[0],HTi(s.content)&&i.linkLevel++,WTi(s.content)&&i.linkLevel--}return i.pos+=o[0].length,!0}var jTi=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,QTi=/^&([a-z][a-z0-9]{1,31});/i;function G7e(i,e){let t=i.pos,n=i.posMax;if(i.src.charCodeAt(t)!==38||t+1>=n)return!1;if(i.src.charCodeAt(t+1)===35){let o=i.src.slice(t).match(jTi);if(o){if(!e){let s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=i.push("text_special","",0);a.content=_pe(s)?Q3(s):Q3(65533),a.markup=o[0],a.info="entity"}return i.pos+=o[0].length,!0}}else{let o=i.src.slice(t).match(QTi);if(o){let s=nj(o[0]);if(s!==o[0]){if(!e){let a=i.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return i.pos+=o[0].length,!0}}}return!1}function Kkt(i){let e={},t=i.length;if(!t)return;let n=0,r=-2,o=[];for(let s=0;sl;c-=o[c]+1){let d=i[c];if(d.marker===a.marker&&d.open&&d.end<0){let h=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(h=!0),!h){let f=c>0&&!i[c-1].open?o[c-1]+1:0;o[s]=s-c+f,o[c]=f,a.open=!1,d.end=s,d.close=!1,u=-1,r=-2;break}}}u!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=u)}}function q7e(i){let e=i.tokens_meta,t=i.tokens_meta.length;Kkt(i.delimiters);for(let n=0;n0&&n++,r[e].type==="text"&&e+1=i.pos)throw new Error("inline rule didn't increment state.pos");break}}else i.pos=i.posMax;s||i.pos++,o[e]=i.pos};oj.prototype.tokenize=function(i){let e=this.ruler.getRules(""),t=e.length,n=i.posMax,r=i.md.options.maxNesting;for(;i.pos=i.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(i.pos>=n)break;continue}i.pending+=i.src[i.pos++]}i.pending&&i.pushPending()};oj.prototype.parse=function(i,e,t,n){let r=new this.State(i,e,t,n);this.tokenize(r);let o=this.ruler2.getRules(""),s=o.length;for(let a=0;a|$))`,e.tpl_email_fuzzy=`(^|${t}|"|\\(|${e.src_ZCc})(${e.src_email_name}@${e.tpl_host_fuzzy_strict})`,e.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_fuzzy_strict}${e.src_path})`,e.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_no_ip_fuzzy_strict}${e.src_path})`,e}function X7e(i){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){i[n]=t[n]})}),i}function kpe(i){return Object.prototype.toString.call(i)}function GTi(i){return kpe(i)==="[object String]"}function qTi(i){return kpe(i)==="[object Object]"}function YTi(i){return kpe(i)==="[object RegExp]"}function Zkt(i){return kpe(i)==="[object Function]"}function KTi(i){return i.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var eIt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function JTi(i){return Object.keys(i||{}).reduce(function(e,t){return e||eIt.hasOwnProperty(t)},!1)}var XTi={"http:":{validate:function(i,e,t){let n=i.slice(e);return t.re.http||(t.re.http=new RegExp(`^\\/\\/${t.re.src_auth}${t.re.src_host_port_strict}${t.re.src_path}`,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(i,e,t){let n=i.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+`(?:localhost|(?:(?:${t.re.src_domain})\\.)+${t.re.src_domain_root})`+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&i[e-3]===":"||e>=3&&i[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(i,e,t){let n=i.slice(e);return t.re.mailto||(t.re.mailto=new RegExp(`^${t.re.src_email_name}@${t.re.src_host_strict}`,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},ZTi="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",$Ti="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function eki(i){return function(e,t){let n=e.slice(t);return i.test(n)?n.match(i)[0].length:0}}function $kt(){return function(i,e){e.normalize(i)}}function Tpe(i){let e=i.re=Xkt(i.__opts__),t=i.__tlds__.slice();i.onCompile(),i.__tlds_replaced__||t.push(ZTi),t.push(e.src_xn),e.src_tlds=t.join("|");function n(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.email_fuzzy_global=RegExp(n(e.tpl_email_fuzzy),"ig"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_fuzzy_global=RegExp(n(e.tpl_link_fuzzy),"ig"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.link_no_ip_fuzzy_global=RegExp(n(e.tpl_link_no_ip_fuzzy),"ig"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let r=[];i.__compiled__={};function o(a,l){throw new Error(`(LinkifyIt) Invalid schema "${a}": ${l}`)}Object.keys(i.__schemas__).forEach(function(a){let l=i.__schemas__[a];if(l===null)return;let c={validate:null,link:null};if(i.__compiled__[a]=c,qTi(l)){YTi(l.validate)?c.validate=eki(l.validate):Zkt(l.validate)?c.validate=l.validate:o(a,l),Zkt(l.normalize)?c.normalize=l.normalize:l.normalize?o(a,l):c.normalize=$kt();return}if(GTi(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){i.__compiled__[i.__schemas__[a]]&&(i.__compiled__[a].validate=i.__compiled__[i.__schemas__[a]].validate,i.__compiled__[a].normalize=i.__compiled__[i.__schemas__[a]].normalize)}),i.__compiled__[""]={validate:null,normalize:$kt()};let s=Object.keys(i.__compiled__).filter(function(a){return a.length>0&&i.__compiled__[a]}).map(KTi).join("|");i.re.schema_test=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"i"),i.re.schema_search=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"ig"),i.re.schema_at_start=RegExp(`^${i.re.schema_search.source}`,"i"),i.re.pretest=RegExp(`(${i.re.schema_test.source})|(${i.re.host_fuzzy_test.source})|@`,"i")}function tIt(i,e,t,n){let r=i.slice(t,n);this.schema=e.toLowerCase(),this.index=t,this.lastIndex=n,this.raw=r,this.text=r,this.url=r}function Wg(i,e){if(!(this instanceof Wg))return new Wg(i,e);e||JTi(i)&&(e=i,i={}),this.__opts__=X7e({},eIt,e),this.__schemas__=X7e({},XTi,i),this.__compiled__={},this.__tlds__=$Ti,this.__tlds_replaced__=!1,this.re={},Tpe(this)}Wg.prototype.add=function(e,t){return this.__schemas__[e]=t,Tpe(this),this};Wg.prototype.set=function(e){return this.__opts__=X7e(this.__opts__,e),this};Wg.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&e.match(this.re.email_fuzzy)!==null)};Wg.prototype.pretest=function(e){return this.re.pretest.test(e)};Wg.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0};Wg.prototype.match=function(e){let t=[],n=[],r=[],o=[],s,a,l;function c(h,f){return h?f?h.index!==f.index?h.index=f.lastIndex?h:f:h:f}if(!e.length)return null;if(this.re.schema_test.test(e))for(l=this.re.schema_search,l.lastIndex=0;(s=l.exec(e))!==null;)a=this.testSchemaAt(e,s[2],l.lastIndex),a&&n.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)r.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)o.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});let u=[0,0,0],d=0;for(;;){let h=[n[u[0]],o[u[1]],r[u[2]]],f=c(c(h[0],h[1]),h[2]);if(!f)break;if(f===h[0]?u[0]++:f===h[1]?u[1]++:u[2]++,f.index= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Z7e=35,M1=Math.floor,$7e=String.fromCharCode;function DD(i){throw new RangeError(rki[i])}function oki(i,e){let t=[],n=i.length;for(;n--;)t[n]=e(i[n]);return t}function rIt(i,e){let t=i.split("@"),n="";t.length>1&&(n=t[0]+"@",i=t[1]),i=i.replace(nki,".");let r=i.split("."),o=oki(r,e).join(".");return n+o}function oIt(i){let e=[],t=0,n=i.length;for(;t=55296&&r<=56319&&tString.fromCodePoint(...i),aki=function(i){return i>=48&&i<58?26+(i-48):i>=65&&i<91?i-65:i>=97&&i<123?i-97:36},nIt=function(i,e){return i+22+75*(i<26)-((e!=0)<<5)},sIt=function(i,e,t){let n=0;for(i=t?M1(i/700):i>>1,i+=M1(i/e);i>Z7e*26>>1;n+=36)i=M1(i/Z7e);return M1(n+(Z7e+1)*i/(i+38))},aIt=function(i){let e=[],t=i.length,n=0,r=128,o=72,s=i.lastIndexOf("-");s<0&&(s=0);for(let a=0;a=128&&DD("not-basic"),e.push(i.charCodeAt(a));for(let a=s>0?s+1:0;a=t&&DD("invalid-input");let h=aki(i.charCodeAt(a++));h>=36&&DD("invalid-input"),h>M1((2147483647-n)/u)&&DD("overflow"),n+=h*u;let f=d<=o?1:d>=o+26?26:d-o;if(hM1(2147483647/p)&&DD("overflow"),u*=p}let c=e.length+1;o=sIt(n-l,c,l==0),M1(n/c)>2147483647-r&&DD("overflow"),r+=M1(n/c),n%=c,e.splice(n++,0,r)}return String.fromCodePoint(...e)},lIt=function(i){let e=[];i=oIt(i);let t=i.length,n=128,r=0,o=72;for(let l of i)l<128&&e.push($7e(l));let s=e.length,a=s;for(s&&e.push("-");a=n&&uM1((2147483647-r)/c)&&DD("overflow"),r+=(l-n)*c,n=l;for(let u of i)if(u2147483647&&DD("overflow"),u===n){let d=r;for(let h=36;;h+=36){let f=h<=o?1:h>=o+26?26:h-o;if(d=0))try{e.hostname=eze.toASCII(e.hostname)}catch{}return ppe(H3(e))}function gki(i){let e=ij(i,!0);if(e.hostname&&(!e.protocol||hIt.indexOf(e.protocol)>=0))try{e.hostname=eze.toUnicode(e.hostname)}catch{}return tj(H3(e),tj.defaultChars+"%")}function l0(i,e){if(!(this instanceof l0))return new l0(i,e);e||Cpe(i)||(e=i||{},i="default"),this.inline=new Jkt,this.block=new Qkt,this.core=new Fkt,this.renderer=new kkt,this.linkify=new iIt,this.validateLink=pki,this.normalizeLink=mki,this.normalizeLinkText=gki,this.utils=l7e,this.helpers=j3({},h7e),this.options={},this.configure(i),e&&this.set(e)}l0.prototype.set=function(i){return j3(this.options,i),this};l0.prototype.configure=function(i){let e=this;if(Cpe(i)){let t=i;if(i=dki[t],!i)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!i)throw new Error("Wrong `markdown-it` preset, can't be empty");return i.options&&e.set(i.options),i.components&&Object.keys(i.components).forEach(function(t){i.components[t].rules&&e[t].ruler.enableOnly(i.components[t].rules),i.components[t].rules2&&e[t].ruler2.enableOnly(i.components[t].rules2)}),this};l0.prototype.enable=function(i,e){let t=[];Array.isArray(i)||(i=[i]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(i,!0))},this),t=t.concat(this.inline.ruler2.enable(i,!0));let n=i.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};l0.prototype.disable=function(i,e){let t=[];Array.isArray(i)||(i=[i]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(i,!0))},this),t=t.concat(this.inline.ruler2.disable(i,!0));let n=i.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};l0.prototype.use=function(i){let e=[this].concat(Array.prototype.slice.call(arguments,1));return i.apply(i,e),this};l0.prototype.parse=function(i,e){if(typeof i!="string")throw new Error("Input data should be a String");let t=new this.core.State(i,this,e);return this.core.process(t),t.tokens};l0.prototype.render=function(i,e){return e=e||{},this.renderer.render(this.parse(i,e),this.options,e)};l0.prototype.parseInline=function(i,e){let t=new this.core.State(i,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};l0.prototype.renderInline=function(i,e){return e=e||{},this.renderer.render(this.parseInline(i,e),this.options,e)};var tze=l0;var fIt=new tze({breaks:!1,linkify:!0});mn();X5();ZT();We();var pIt=$(ur()),qv=$(Te());function sj(i){let e=(0,pIt.c)(26),{defaultSizeRelation:t,direction:n,initiallyHidden:r,onHiddenElementChange:o,sizeThresholdFirst:s,sizeThresholdSecond:a,storageKey:l}=i,c=t===void 0?1:t,u=s===void 0?100:s,d=a===void 0?100:a,h=Or(bki),f;e[0]!==r||e[1]!==h||e[2]!==l?(f=()=>{let H=l&&h.get(l);return H===Ipe||r==="first"?"first":H===Lpe||r==="second"?"second":null},e[0]=r,e[1]=h,e[2]=l,e[3]=f):f=e[3];let[p,g]=(0,qv.useState)(f),v=(0,qv.useRef)(null),A=(0,qv.useRef)(null),w=(0,qv.useRef)(null),C=(0,qv.useRef)(`${c}`),_;e[4]!==h||e[5]!==l?(_=()=>{let H=l&&h.get(l)||C.current;v.current&&(v.current.style.flex=H===Ipe||H===Lpe?C.current:H),w.current&&(w.current.style.flex="1")},e[4]=h,e[5]=l,e[6]=_):_=e[6];let E;e[7]!==n||e[8]!==h||e[9]!==l?(E=[n,h,l],e[7]=n,e[8]=h,e[9]=l,e[10]=E):E=e[10],(0,qv.useEffect)(_,E);let I,T;e[11]!==p||e[12]!==h||e[13]!==l?(I=()=>{let H=function(U){if(U.style.left="-1000px",U.style.position="absolute",U.style.opacity="0",!v.current)return;let F=parseFloat(v.current.style.flex);(!Number.isFinite(F)||F<1)&&(v.current.style.flex="1")},B=function(U){if(U.style.left="",U.style.position="",U.style.opacity="",!l)return;let F=h.get(l);v.current&&F!==Ipe&&F!==Lpe&&(v.current.style.flex=F||C.current)};for(let q of["first","second"]){let U=(q==="first"?v:w).current;U&&(q===p?H(U):B(U))}},T=[p,h,l],e[11]=p,e[12]=h,e[13]=l,e[14]=I,e[15]=T):(I=e[14],T=e[15]),(0,qv.useEffect)(I,T);let L,M;e[16]!==n||e[17]!==o||e[18]!==u||e[19]!==d||e[20]!==h||e[21]!==l?(M=()=>{if(!A.current||!v.current||!w.current)return;let H=kb(500,ft=>{l&&h.set(l,ft)}),B=function(At){g(Dt=>At===Dt?Dt:(o?.(At),At))},q=A.current,U=v.current,F=U.parentElement,ne=n==="horizontal",ce=ne?"clientX":"clientY",se=ne?"left":"top",le=ne?"right":"bottom",oe=ne?"clientWidth":"clientHeight",fe=function(At){if(!(At.target===At.currentTarget))return;At.preventDefault();let Ct=At[ce]-q.getBoundingClientRect()[se],Xt=function(Li){if(Li.buttons===0)return Be();let ei=F.getBoundingClientRect(),Ni=Li[ce]-ei[se]-Ct,Ke=ei[le]-Li[ce]+Ct-q[oe];if(Ni{q.removeEventListener("mousedown",fe),q.removeEventListener("dblclick",Re)}},L=[n,o,u,d,h,l],e[16]=n,e[17]=o,e[18]=u,e[19]=d,e[20]=h,e[21]=l,e[22]=L,e[23]=M):(L=e[22],M=e[23]),(0,qv.useEffect)(M,L);let z;return e[24]!==p?(z={dragBarRef:A,hiddenElement:p,firstRef:v,setHiddenElement:g,secondRef:w},e[24]=p,e[25]=z):z=e[25],z}function bki(i){return i.storage}var Ipe="hide-first",Lpe="hide-second";function mIt(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i))for(e=0;evki(i,"name",{value:e,configurable:!0}),gIt=!!(typeof window<"u"&&window.document&&window.document.createElement);function Qn(i,e,{checkForDefaultPrevented:t=!0}={}){return Y3(function(r){if(i?.(r),t===!1||!r||!r.defaultPrevented)return e?.(r)},"handleEvent")}Y3(Qn,"composeEventHandlers");function Aki(i){if(!gIt)throw new Error("Cannot access window outside of the DOM");return i?.ownerDocument?.defaultView??window}Y3(Aki,"getOwnerWindow");function ize(i){if(!gIt)throw new Error("Cannot access document outside of the DOM");return i?.ownerDocument??document}Y3(ize,"getOwnerDocument");function bIt(i,e=!1){let{activeElement:t}=ize(i);if(!t?.nodeName)return null;if(vIt(t)&&t.contentDocument)return bIt(t.contentDocument.body,e);if(e){let n=t.getAttribute("aria-activedescendant");if(n){let r=ize(t).getElementById(n);if(r)return r}}return t}Y3(bIt,"getActiveElement");function vIt(i){return i.tagName==="IFRAME"}Y3(vIt,"isFrame");var AIt=$(Te(),1),yki=Object.defineProperty,rze=(i,e)=>yki(i,"name",{value:e,configurable:!0});function nze(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}rze(nze,"setRef");function yIt(...i){return e=>{let t=!1,n=i.map(r=>{let o=nze(r,e);return!t&&typeof o=="function"&&(t=!0),o});if(t)return()=>{for(let r=0;rwki(i,"name",{value:e,configurable:!0});function xki(i,e){let t=u0.createContext(e);t.displayName=i+"Context";let n=c0(o=>{let{children:s,...a}=o,l=u0.useMemo(()=>a,Object.values(a));return(0,oze.jsx)(t.Provider,{value:l,children:s})},"Provider");n.displayName=i+"Provider";function r(o,s={}){let{optional:a=!1}=s,l=u0.useContext(t);if(l)return l;if(e!==void 0)return e;if(!a)throw new Error(`\`${o}\` must be used within \`${i}\``)}return c0(r,"useContext"),[n,r]}c0(xki,"createContext");function vh(i,e=[]){let t=[];function n(o,s){let a=u0.createContext(s);a.displayName=o+"Context";let l=t.length;t=[...t,s];let c=c0(d=>{let{scope:h,children:f,...p}=d,g=h?.[i]?.[l]||a,v=u0.useMemo(()=>p,Object.values(p));return(0,oze.jsx)(g.Provider,{value:v,children:f})},"Provider");c.displayName=o+"Provider";function u(d,h,f={}){let{optional:p=!1}=f,g=h?.[i]?.[l]||a,v=u0.useContext(g);if(v)return v;if(s!==void 0)return s;if(!p)throw new Error(`\`${d}\` must be used within \`${o}\``)}return c0(u,"useContext"),[c,u]}c0(n,"createContext");let r=c0(()=>{let o=t.map(s=>u0.createContext(s));return c0(function(a){let l=a?.[i]||o;return u0.useMemo(()=>({[`__scope${i}`]:{...a,[i]:l}}),[a,l])},"useScope")},"createScope");return r.scopeName=i,[n,wIt(r,...e)]}c0(vh,"createContextScope");function wIt(...i){let e=i[0];if(i.length===1)return e;let t=c0(()=>{let n=i.map(r=>({useScope:r(),scopeName:r.scopeName}));return c0(function(o){let s=n.reduce((a,{useScope:l,scopeName:c})=>{let d=l(o)[`__scope${c}`];return{...a,...d}},{});return u0.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return t.scopeName=e.scopeName,t}c0(wIt,"composeContextScopes");var d0=$(Te(),1);var Npe=!1;var xIt=$(Te(),1),rl=globalThis?.document?xIt.useLayoutEffect:()=>{};var Yv=$(Te(),1);var K3=$(Te(),1),Cki=Object.defineProperty,_ki=(i,e)=>Cki(i,"name",{value:e,configurable:!0}),CIt=K3[" useEffectEvent ".trim().toString()],_It=K3[" useInsertionEffect ".trim().toString()];function sze(i){if(typeof CIt=="function")return CIt(i);let e=K3.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof _It=="function"?_It(()=>{e.current=i}):rl(()=>{e.current=i}),K3.useMemo(()=>((...t)=>e.current?.(...t)),[])}_ki(sze,"useEffectEvent");var Ski=Object.defineProperty,aj=(i,e)=>Ski(i,"name",{value:e,configurable:!0}),Eki=d0[" useInsertionEffect ".trim().toString()]||rl;function xC({prop:i,defaultProp:e,onChange:t=aj(()=>{},"onChange"),caller:n}){let[r,o,s]=EIt({defaultProp:e,onChange:t}),a=i!==void 0,l=a?i:r;if(Npe){let u=d0.useRef(i!==void 0);d0.useEffect(()=>{let d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}let c=d0.useCallback(u=>{if(a){let d=DIt(u)?u(i):u;d!==i&&s.current?.(d)}else o(u)},[a,i,o,s]);return[l,c]}aj(xC,"useControllableState");function EIt({defaultProp:i,onChange:e}){let[t,n]=d0.useState(i),r=d0.useRef(t),o=d0.useRef(e);return Eki(()=>{o.current=e},[e]),d0.useEffect(()=>{r.current!==t&&(o.current?.(t),r.current=t)},[t,r]),[t,n,o]}aj(EIt,"useUncontrolledState");function DIt(i){return typeof i=="function"}aj(DIt,"isFunction");var SIt=Symbol("RADIX:SYNC_STATE");function Dki(i,e,t,n){let{prop:r,defaultProp:o,onChange:s,caller:a}=e,l=r!==void 0,c=sze(s);if(Npe){let v=Yv.useRef(r!==void 0);Yv.useEffect(()=>{let A=v.current;A!==l&&console.warn(`${a} is changing from ${A?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=l},[l,a])}let u=[{...t,state:o}];n&&u.push(n);let[d,h]=Yv.useReducer((v,A)=>{if(A.type===SIt)return{...v,state:A.state};let w=i(v,A);return l&&!Object.is(w.state,v.state)&&c(w.state),w},...u),f=d.state,p=Yv.useRef(f);Yv.useEffect(()=>{p.current!==f&&(p.current=f,l||c(f))},[f,p,l]);let g=Yv.useMemo(()=>r!==void 0?{...d,state:r}:d,[d,r]);return Yv.useEffect(()=>{l&&!Object.is(r,d.state)&&h({type:SIt,state:r})},[r,d.state,l]),[g,h]}aj(Dki,"useControllableStateReducer");var PIt=$(Te(),1),BIt=$(Kv(),1);var Ah=$(Te(),1);var Lki=Object.defineProperty,Jv=(i,e)=>Lki(i,"name",{value:e,configurable:!0});function Ug(i){let e=Ah.forwardRef((t,n)=>{let{children:r,...o}=t,s=null,a=!1,l=[];aze(r)&&typeof Rpe=="function"&&(r=Rpe(r._payload)),Ah.Children.forEach(r,h=>{if(FIt(h)){a=!0;let f=h,p="child"in f.props?f.props.child:f.props.children;aze(p)&&typeof Rpe=="function"&&(p=Rpe(p._payload)),s=Nki(f,p),l.push(s?.props?.children)}else l.push(h)}),s?s=Ah.cloneElement(s,void 0,l):!a&&Ah.Children.count(r)===1&&Ah.isValidElement(r)&&(s=r);let c=s?RIt(s):void 0,u=Lo(n,c);if(!s){if(r||r===0)throw new Error(a?Fki(i):Rki(i));return r}let d=MIt(o,s.props??{});return s.type!==Ah.Fragment&&(d.ref=n?u:c),Ah.cloneElement(s,d)});return e.displayName=`${i}.Slot`,e}Jv(Ug,"createSlot");var NIt=Symbol.for("radix.slottable");function lze(i){let e=Jv(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${i}.Slottable`,e.__radixId=NIt,e}Jv(lze,"createSlottable");var Nki=Jv((i,e)=>{if("child"in i.props){let t=i.props.child;return Ah.isValidElement(t)?Ah.cloneElement(t,void 0,i.props.children(t.props.children)):null}return Ah.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function MIt(i,e){let t={...e};for(let n in e){let r=i[n],o=e[n];/^on[A-Z]/.test(n)?r&&o?t[n]=(...a)=>{let l=o(...a);return r(...a),l}:r&&(t[n]=r):n==="style"?t[n]={...r,...o}:n==="className"&&(t[n]=[r,o].filter(Boolean).join(" "))}return{...i,...t}}Jv(MIt,"mergeProps");function RIt(i){let e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=Object.getOwnPropertyDescriptor(i,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}Jv(RIt,"getElementRef");function FIt(i){return Ah.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===NIt}Jv(FIt,"isSlottable");var Mki=Symbol.for("react.lazy");function aze(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===Mki&&"_payload"in i&&OIt(i._payload)}Jv(aze,"isLazyComponent");function OIt(i){return typeof i=="object"&&i!==null&&"then"in i}Jv(OIt,"isPromiseLike");var Rki=Jv(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Fki=Jv(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Rpe=Ah[" use ".trim().toString()];var zIt=$(Hi(),1),Oki=Object.defineProperty,Pki=(i,e)=>Oki(i,"name",{value:e,configurable:!0}),Bki=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Aa=Bki.reduce((i,e)=>{let t=Ug(`Primitive.${e}`),n=PIt.forwardRef((r,o)=>{let{asChild:s,...a}=r,l=s?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,zIt.jsx)(l,{...a,ref:o})});return n.displayName=`Primitive.${e}`,{...i,[e]:n}},{});function cj(i,e){i&&BIt.flushSync(()=>i.dispatchEvent(e))}Pki(cj,"dispatchDiscreteCustomEvent");var gr=$(Te(),1);var Xv=$(Te(),1);var Fpe=$(Hi(),1),gm=$(Te(),1);var c2=$(Hi(),1),zki=Object.defineProperty,Td=(i,e)=>zki(i,"name",{value:e,configurable:!0});function uj(i){let e=i+"CollectionProvider",[t,n]=vh(e),[r,o]=t(e,{collectionRef:{current:null},itemMap:new Map}),s=Td(g=>{let{scope:v,children:A}=g,w=Xv.useRef(null),C=Xv.useRef(new Map).current;return(0,Fpe.jsx)(r,{scope:v,itemMap:C,collectionRef:w,children:A})},"CollectionProvider");s.displayName=e;let a=i+"CollectionSlot",l=Ug(a),c=Xv.forwardRef((g,v)=>{let{scope:A,children:w}=g,C=o(a,A),_=Lo(v,C.collectionRef);return(0,Fpe.jsx)(l,{ref:_,children:w})});c.displayName=a;let u=i+"CollectionItemSlot",d="data-radix-collection-item",h=Ug(u),f=Xv.forwardRef((g,v)=>{let{scope:A,children:w,...C}=g,_=Xv.useRef(null),E=Lo(v,_),I=o(u,A);return Xv.useEffect(()=>(I.itemMap.set(_,{ref:_,...C}),()=>{I.itemMap.delete(_)})),(0,Fpe.jsx)(h,{[d]:"",ref:E,children:w})});f.displayName=u;function p(g){let v=o(i+"CollectionConsumer",g);return Xv.useCallback(()=>{let w=v.collectionRef.current;if(!w)return[];let C=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((I,T)=>C.indexOf(I.ref.current)-C.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return Td(p,"useCollection"),[{Provider:s,Slot:c,ItemSlot:f},p,n]}Td(uj,"createCollection");var VIt=new WeakMap,cze=class kD extends Map{static{Td(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],VIt.set(this,!0)}set(e,t){return VIt.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),o=this.#e.length,s=dze(e),a=s>=0?s:o+s,l=a<0||a>=o?-1:a;if(l===this.size||r&&l===this.size-1||l===-1)return this.set(t,n),this;let c=this.size+(r?0:1);s<0&&a++;let u=[...this.#e],d,h=!1;for(let f=a;f=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(e,t){let n=[],r=0;for(let o of this)Reflect.apply(e,t,[o,r,this])&&n.push(o),r++;return new kD(n)}map(e,t){let n=[],r=0;for(let o of this)n.push([o[0],Reflect.apply(e,t,[o,r,this])]),r++;return new kD(n)}reduce(...e){let[t,n]=e,r=0,o=n??this.at(0);for(let s of this)r===0&&e.length===1?o=s:o=Reflect.apply(t,this,[o,s,r,this]),r++;return o}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let o=this.size-1;o>=0;o--){let s=this.at(o);o===this.size-1&&e.length===1?r=s:r=Reflect.apply(t,this,[r,s,o,this])}return r}toSorted(e){let t=[...this.entries()].sort(e);return new kD(t)}toReversed(){let e=new kD;for(let t=this.size-1;t>=0;t--){let n=this.keyAt(t),r=this.get(n);e.set(n,r)}return e}toSpliced(...e){let t=[...this.entries()];return t.splice(...e),new kD(t)}slice(e,t){let n=new kD,r=this.size-1;if(e===void 0)return n;e<0&&(e=e+this.size),t!==void 0&&t>0&&(r=t-1);for(let o=e;o<=r;o++){let s=this.keyAt(o),a=this.get(s);n.set(s,a)}return n}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Ope(i,e){if("at"in Array.prototype)return Array.prototype.at.call(i,e);let t=HIt(i,e);return t===-1?void 0:i[t]}Td(Ope,"at");function HIt(i,e){let t=i.length,n=dze(e),r=n>=0?n:t+n;return r<0||r>=t?-1:r}Td(HIt,"toSafeIndex");function dze(i){return i!==i||i===0?0:Math.trunc(i)}Td(dze,"toSafeInteger");function Vki(i){let e=i+"CollectionProvider",[t,n]=vh(e),[r,o]=t(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new cze,setItemMap:Td(()=>{},"setItemMap")}),s=Td(({state:C,..._})=>C?(0,c2.jsx)(l,{..._,state:C}):(0,c2.jsx)(a,{..._}),"CollectionProvider");s.displayName=e;let a=Td(C=>{let _=v();return(0,c2.jsx)(l,{...C,state:_})},"CollectionInit");a.displayName=e+"Init";let l=Td(C=>{let{scope:_,children:E,state:I}=C,T=gm.useRef(null),[L,M]=gm.useState(null),z=Lo(T,M),[H,B]=I;return gm.useEffect(()=>{if(!L)return;let q=jIt(()=>{});return q.observe(L,{childList:!0,subtree:!0}),()=>{q.disconnect()}},[L]),(0,c2.jsx)(r,{scope:_,itemMap:H,setItemMap:B,collectionRef:z,collectionRefObject:T,collectionElement:L,children:E})},"CollectionProviderImpl");l.displayName=e+"Impl";let c=i+"CollectionSlot",u=Ug(c),d=gm.forwardRef((C,_)=>{let{scope:E,children:I}=C,T=o(c,E),L=Lo(_,T.collectionRef);return(0,c2.jsx)(u,{ref:L,children:I})});d.displayName=c;let h=i+"CollectionItemSlot",f="data-radix-collection-item",p=Ug(h),g=gm.forwardRef((C,_)=>{let{scope:E,children:I,...T}=C,L=gm.useRef(null),[M,z]=gm.useState(null),H=Lo(_,L,z),B=o(h,E),{setItemMap:q}=B,U=gm.useRef(T);WIt(U.current,T)||(U.current=T);let F=U.current;return gm.useEffect(()=>{let ne=F;return q(ce=>M?ce.has(M)?ce.set(M,{...ne,element:M}).toSorted(uze):(ce.set(M,{...ne,element:M}),ce.toSorted(uze)):ce),()=>{q(ce=>!M||!ce.has(M)?ce:(ce.delete(M),new cze(ce)))}},[M,F,q]),(0,c2.jsx)(p,{[f]:"",ref:H,children:I})});g.displayName=h;function v(){return gm.useState(new cze)}Td(v,"useInitCollection");function A(C){let{itemMap:_}=o(i+"CollectionConsumer",C);return _}return Td(A,"useCollection"),[{Provider:s,Slot:d,ItemSlot:g},{createCollectionScope:n,useCollection:A,useInitCollection:v}]}Td(Vki,"createCollection");function WIt(i,e){if(i===e)return!0;if(typeof i!="object"||typeof e!="object"||i==null||e==null)return!1;let t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(let r of t)if(!Object.prototype.hasOwnProperty.call(e,r)||i[r]!==e[r])return!1;return!0}Td(WIt,"shallowEqual");function UIt(i,e){return!!(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}Td(UIt,"isElementPreceding");function uze(i,e){return!i[1].element||!e[1].element?0:UIt(i[1].element,e[1].element)?-1:1}Td(uze,"sortByDocumentPosition");function jIt(i){return new MutationObserver(t=>{for(let n of t)if(n.type==="childList"){i();return}})}Td(jIt,"getChildListObserver");var Ppe=$(Te(),1),Uki=$(Hi(),1),Hki=Object.defineProperty,Wki=(i,e)=>Hki(i,"name",{value:e,configurable:!0}),jki=Ppe.createContext(void 0);function dj(i){let e=Ppe.useContext(jki);return i||e||"ltr"}Wki(dj,"useDirection");var Os=$(Te(),1);var J3=$(Te(),1),Qki=Object.defineProperty,Gki=(i,e)=>Qki(i,"name",{value:e,configurable:!0});function bm(i){let e=J3.useRef(i);return J3.useEffect(()=>{e.current=i}),J3.useMemo(()=>((...t)=>e.current?.(...t)),[])}Gki(bm,"useCallbackRef");var GIt=$(Hi(),1),qki=Object.defineProperty,kd=(i,e)=>qki(i,"name",{value:e,configurable:!0}),hze="dismissableLayer.update",Yki="dismissableLayer.pointerDownOutside",Kki="dismissableLayer.focusOutside",QIt,qIt=Os.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),X3=Os.forwardRef(kd(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=Os.useContext(qIt),[h,f]=Os.useState(null),p=h?.ownerDocument??globalThis?.document,[,g]=Os.useState({}),v=Lo(t,f),A=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=w?A.indexOf(w):-1,_=h?A.indexOf(h):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,I=_>=C,T=Os.useRef(!1),L=YIt(B=>{s?.(B),l?.(B),B.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:Os.useCallback(B=>{if(!(B instanceof Node))return!1;let q=[...d.branches].some(U=>U.contains(B));return I&&!q},[d.branches,I])}),M=KIt(B=>{if(r&&T.current)return;let q=B.target;[...d.branches].some(F=>F.contains(q))||(a?.(B),l?.(B),B.defaultPrevented||c?.())},p),z=h?_===A.length-1:!1,H=bm(B=>{B.key==="Escape"&&(o?.(B),!B.defaultPrevented&&c&&(B.preventDefault(),c()))});return Os.useEffect(()=>{if(z)return p.addEventListener("keydown",H,{capture:!0}),()=>p.removeEventListener("keydown",H,{capture:!0})},[p,z,H]),Os.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(QIt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),fze(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(h),d.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=QIt))}},[h,p,n,d]),Os.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),fze())},[h,d]),Os.useEffect(()=>{let B=kd(()=>g({}),"handleUpdate");return document.addEventListener(hze,B),()=>document.removeEventListener(hze,B)},[]),(0,GIt.jsx)(Aa.div,{...u,ref:v,style:{pointerEvents:E?I?"auto":"none":void 0,...e.style},onFocusCapture:Qn(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Qn(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Qn(e.onPointerDownCapture,L.onPointerDownCapture)})},"DismissableLayer"));function pze(){let i=Os.useContext(qIt),[e,t]=Os.useState(null);return Os.useEffect(()=>{if(e)return i.dismissableSurfaces.add(e),()=>{i.dismissableSurfaces.delete(e)}},[e,i.dismissableSurfaces]),t}kd(pze,"useDismissableLayerSurface");var Jki=kd(()=>!0,"IS_TRUE");function YIt(i,e){let{ownerDocument:t=globalThis?.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=Jki}=e,a=bm(i),l=Os.useRef(!1),c=Os.useRef(!1),u=Os.useRef(new Map),d=Os.useRef(()=>{});return Os.useEffect(()=>{function h(){c.current=!1,r.current=!1,u.current.clear()}kd(h,"resetOutsideInteraction");function f(){return Array.from(u.current.values()).some(Boolean)}kd(f,"isOutsideInteractionIntercepted");function p(C){if(!c.current)return;let _=C.target;_ instanceof Node&&[...o].some(I=>I.contains(_))||u.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{c.current&&d.current()},0)}kd(p,"handleInteractionCapture");function g(C){c.current&&u.current.set(C.type,!1)}kd(g,"handleInteractionBubble");let v=kd(C=>{if(C.target&&!l.current){let E=function(){t.removeEventListener("click",d.current);let T=f();h(),T||mze(Yki,a,I,{discrete:!0})};var _=E;if(kd(E,"handleAndDispatchPointerDownOutsideEvent"),!s(C.target)){t.removeEventListener("click",d.current),h(),l.current=!1;return}let I={originalEvent:C};c.current=!0,r.current=n&&C.button===0,u.current.clear(),!n||C.button!==0?E():(t.removeEventListener("click",d.current),d.current=E,t.addEventListener("click",d.current,{once:!0}))}else t.removeEventListener("click",d.current),h();l.current=!1},"handlePointerDown"),A=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let C of A)t.addEventListener(C,p,!0),t.addEventListener(C,g);let w=window.setTimeout(()=>{t.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(w),t.removeEventListener("pointerdown",v),t.removeEventListener("click",d.current);for(let C of A)t.removeEventListener(C,p,!0),t.removeEventListener(C,g)}},[t,a,n,r,o,s]),{onPointerDownCapture:kd(()=>l.current=!0,"onPointerDownCapture")}}kd(YIt,"usePointerDownOutside");function KIt(i,e=globalThis?.document){let t=bm(i),n=Os.useRef(!1);return Os.useEffect(()=>{let r=kd(o=>{o.target&&!n.current&&mze(Kki,t,{originalEvent:o},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:kd(()=>n.current=!0,"onFocusCapture"),onBlurCapture:kd(()=>n.current=!1,"onBlurCapture")}}kd(KIt,"useFocusOutside");function fze(){let i=new CustomEvent(hze);document.dispatchEvent(i)}kd(fze,"dispatchUpdate");function mze(i,e,t,{discrete:n}){let r=t.originalEvent.target,o=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(i,e,{once:!0}),n?cj(r,o):r.dispatchEvent(o)}kd(mze,"handleAndDispatchCustomEvent");var JIt=$(Te(),1),Xki=Object.defineProperty,bze=(i,e)=>Xki(i,"name",{value:e,configurable:!0}),Bpe=0,Z3=null;function Zki(i){return $3(),i.children}bze(Zki,"FocusGuards");function $3(){JIt.useEffect(()=>{Z3||(Z3={start:gze(),end:gze()});let{start:i,end:e}=Z3;return document.body.firstElementChild!==i&&document.body.insertAdjacentElement("afterbegin",i),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Bpe++,()=>{Bpe===1&&(Z3?.start.remove(),Z3?.end.remove(),Z3=null),Bpe=Math.max(0,Bpe-1)}},[])}bze($3,"useFocusGuards");function gze(){let i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}bze(gze,"createFocusGuard");var h0=$(Te(),1);var $It=$(Hi(),1),$ki=Object.defineProperty,mp=(i,e)=>$ki(i,"name",{value:e,configurable:!0}),vze="focusScope.autoFocusOnMount",Aze="focusScope.autoFocusOnUnmount",XIt={bubbles:!1,cancelable:!0},zpe=h0.forwardRef(mp(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[l,c]=h0.useState(null),u=bm(o),d=bm(s),h=h0.useRef(null),f=Lo(t,c),p=h0.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h0.useEffect(()=>{if(r){let C=function(T){if(p.paused||!l)return;let L=T.target;l.contains(L)?h.current=L:CC(h.current,{select:!0})},_=function(T){if(p.paused||!l)return;let L=T.relatedTarget;L!==null&&(l.contains(L)||CC(h.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(let M of T)M.removedNodes.length>0&&CC(l)};var v=C,A=_,w=E;mp(C,"handleFocusIn"),mp(_,"handleFocusOut"),mp(E,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",_);let I=new MutationObserver(E);return l&&I.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",_),I.disconnect()}}},[r,l,p.paused]),h0.useEffect(()=>{if(l){ZIt.add(p);let v=document.activeElement;if(!l.contains(v)){let w=new CustomEvent(vze,XIt);l.addEventListener(vze,u),l.dispatchEvent(w),w.defaultPrevented||(eLt(oLt(xze(l)),{select:!0}),document.activeElement===v&&CC(l))}return()=>{l.removeEventListener(vze,u),setTimeout(()=>{let w=new CustomEvent(Aze,XIt);l.addEventListener(Aze,d),l.dispatchEvent(w),w.defaultPrevented||CC(v??document.body,{select:!0}),l.removeEventListener(Aze,d),ZIt.remove(p)},0)}}},[l,u,d,p]);let g=h0.useCallback(v=>{if(!n&&!r||p.paused)return;let A=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(A&&w){let C=v.currentTarget,[_,E]=tLt(C);_&&E?!v.shiftKey&&w===E?(v.preventDefault(),n&&CC(_,{select:!0})):v.shiftKey&&w===_&&(v.preventDefault(),n&&CC(E,{select:!0})):w===C&&v.preventDefault()}},[n,r,p.paused]);return(0,$It.jsx)(Aa.div,{tabIndex:-1,...a,ref:f,onKeyDown:g})},"FocusScope"));function eLt(i,{select:e=!1}={}){let t=document.activeElement;for(let n of i)if(CC(n,{select:e}),document.activeElement!==t)return}mp(eLt,"focusFirst");function tLt(i){let e=xze(i),t=yze(e,i),n=yze(e.reverse(),i);return[t,n]}mp(tLt,"getTabbableEdges");function xze(i){let e=[],t=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:mp(n=>{let r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;t.nextNode();)e.push(t.currentNode);return e}mp(xze,"getTabbableCandidates");function yze(i,e){let t=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(let n of i)if(!(t?!n.checkVisibility({checkVisibilityCSS:!0}):iLt(n,{upTo:e})))return n}mp(yze,"findVisible");function iLt(i,{upTo:e}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(e!==void 0&&i===e)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}mp(iLt,"isHidden");function nLt(i){return i instanceof HTMLInputElement&&"select"in i}mp(nLt,"isSelectableInput");function CC(i,{select:e=!1}={}){if(i&&i.focus){let t=document.activeElement;i.focus({preventScroll:!0}),i!==t&&nLt(i)&&e&&i.select()}}mp(CC,"focus");var ZIt=rLt();function rLt(){let i=[];return{add(e){let t=i[0];e!==t&&t?.pause(),i=wze(i,e),i.unshift(e)},remove(e){i=wze(i,e),i[0]?.resume()}}}mp(rLt,"createFocusScopesStack");function wze(i,e){let t=[...i],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}mp(wze,"arrayRemove");function oLt(i){return i.filter(e=>e.tagName!=="A")}mp(oLt,"removeLinks");var Cze=$(Te(),1);var eIi=Object.defineProperty,tIi=(i,e)=>eIi(i,"name",{value:e,configurable:!0}),iIi=Cze[" useId ".trim().toString()]||(()=>{}),nIi=0;function f0(i){let[e,t]=Cze.useState(iIi());return rl(()=>{i||t(n=>n??String(nIi++))},[i]),i||(e?`radix-${e}`:"")}tIi(f0,"useId");var gf=$(Te(),1);var lLt=["top","right","bottom","left"];var p0=Math.min,gp=Math.max,u2=Math.round,e4=Math.floor,R1=i=>({x:i,y:i}),rIi={left:"right",right:"left",bottom:"top",top:"bottom"};function _ze(i,e,t){return gp(i,p0(e,t))}function m0(i,e){return typeof i=="function"?i(e):i}function _C(i){return i.split("-")[0]}function d2(i){return i.split("-")[1]}function Hpe(i){return i==="x"?"y":"x"}function Wpe(i){return i==="y"?"height":"width"}function Zv(i){let e=i[0];return e==="t"||e==="b"?"y":"x"}function Upe(i){return Hpe(Zv(i))}function cLt(i,e,t){t===void 0&&(t=!1);let n=d2(i),r=Upe(i),o=Wpe(r),s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=hj(s)),[s,hj(s)]}function uLt(i){let e=hj(i);return[Vpe(i),e,Vpe(e)]}function Vpe(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var sLt=["left","right"],aLt=["right","left"],oIi=["top","bottom"],sIi=["bottom","top"];function aIi(i,e,t){switch(i){case"top":case"bottom":return t?e?aLt:sLt:e?sLt:aLt;case"left":case"right":return e?oIi:sIi;default:return[]}}function dLt(i,e,t,n){let r=d2(i),o=aIi(_C(i),t==="start",n);return r&&(o=o.map(s=>s+"-"+r),e&&(o=o.concat(o.map(Vpe)))),o}function hj(i){let e=_C(i);return rIi[e]+i.slice(e.length)}function lIi(i){var e,t,n,r;return{top:(e=i.top)!=null?e:0,right:(t=i.right)!=null?t:0,bottom:(n=i.bottom)!=null?n:0,left:(r=i.left)!=null?r:0}}function Sze(i){return typeof i!="number"?lIi(i):{top:i,right:i,bottom:i,left:i}}function h2(i){let{x:e,y:t,width:n,height:r}=i;return{width:n,height:r,top:t,left:e,right:e+n,bottom:t+r,x:e,y:t}}function hLt(i,e,t){let{reference:n,floating:r}=i,o=Zv(e),s=Upe(e),a=Wpe(s),l=_C(e),c=o==="y",u=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,h=n[a]/2-r[a]/2,f;switch(l){case"top":f={x:u,y:n.y-r.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-r.width,y:d};break;default:f={x:n.x,y:n.y}}let p=d2(e);return p&&(f[s]+=h*(p==="end"?1:-1)*(t&&c?-1:1)),f}async function Eze(i,e){var t;e===void 0&&(e={});let{x:n,y:r,platform:o,rects:s,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=m0(e,i),p=Sze(f),v=a[h?d==="floating"?"reference":"floating":d],A=h2(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(v)))==null||t?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},E=h2(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:C,strategy:l}):w);return{top:(A.top-E.top+p.top)/_.y,bottom:(E.bottom-A.bottom+p.bottom)/_.y,left:(A.left-E.left+p.left)/_.x,right:(E.right-A.right+p.right)/_.x}}var cIi=50,mLt=async(i,e,t)=>{let{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,a=s.detectOverflow?s:{...s,detectOverflow:Eze},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:i,floating:e,strategy:r}),{x:u,y:d}=hLt(c,n,l),h=n,f=0,p={};for(let g=0;g({name:"arrow",options:i,async fn(e){let{x:t,y:n,placement:r,rects:o,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=m0(i,e)||{};if(c==null)return{};let d=Sze(u),h={x:t,y:n},f=Upe(r),p=Wpe(f),g=await s.getDimensions(c),v=f==="y",A=v?"top":"left",w=v?"bottom":"right",C=v?"clientHeight":"clientWidth",_=o.reference[p]+o.reference[f]-h[f]-o.floating[p],E=h[f]-o.reference[f],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),T=I?I[C]:0;(!T||!await(s.isElement==null?void 0:s.isElement(I)))&&(T=a.floating[C]||o.floating[p]);let L=_/2-E/2,M=T/2-g[p]/2-1,z=p0(d[A],M),H=p0(d[w],M),B=T-g[p]-H,q=T/2-g[p]/2+L,U=_ze(z,q,B),F=!l.arrow&&d2(r)!=null&&q!==U&&o.reference[p]/2-(qU<=0)){var H,B;let U=(((H=o.flip)==null?void 0:H.index)||0)+1,F=T[U];if(F&&(!(d==="alignment"?w!==Zv(F):!1)||z.every(se=>Zv(se.placement)===w?se.overflows[0]>0:!0)))return{data:{index:U,overflows:z},reset:{placement:F}};let ne=(B=z.filter(ce=>ce.overflows[0]<=0).sort((ce,se)=>ce.overflows[1]-se.overflows[1])[0])==null?void 0:B.placement;if(!ne)switch(f){case"bestFit":{var q;let ce=(q=z.filter(se=>{if(I){let le=Zv(se.placement);return le===w||le==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(le=>le>0).reduce((le,oe)=>le+oe,0)]).sort((se,le)=>se[1]-le[1])[0])==null?void 0:q[0];ce&&(ne=ce);break}case"initialPlacement":ne=a;break}if(r!==ne)return{reset:{placement:ne}}}return{}}}};function fLt(i,e){return{top:i.top-e.height,right:i.right-e.width,bottom:i.bottom-e.height,left:i.left-e.width}}function pLt(i){return lLt.some(e=>i[e]>=0)}var vLt=function(i){return i===void 0&&(i={}),{name:"hide",options:i,async fn(e){let{rects:t,platform:n}=e,{strategy:r="referenceHidden",...o}=m0(i,e);switch(r){case"referenceHidden":{let s=await n.detectOverflow(e,{...o,elementContext:"reference"}),a=fLt(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:pLt(a)}}}case"escaped":{let s=await n.detectOverflow(e,{...o,altBoundary:!0}),a=fLt(s,t.floating);return{data:{escapedOffsets:a,escaped:pLt(a)}}}default:return{}}}}};var ALt=new Set(["left","top"]);async function uIi(i,e){let{placement:t,platform:n,elements:r}=i,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=_C(t),a=d2(t),l=Zv(t)==="y",c=ALt.has(s)?-1:1,u=o&&l?-1:1,d=m0(e,i),{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}var yLt=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){var t,n;let{x:r,y:o,placement:s,middlewareData:a}=e,l=await uIi(e,i);return s===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:s}}}}},wLt=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:n,placement:r,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:C,y:_}=w;return{x:C,y:_}}},...c}=m0(i,e),u={x:t,y:n},d=await o.detectOverflow(e,c),h=Zv(r),f=Hpe(h),p=u[f],g=u[h],v=(w,C)=>_ze(C+d[w==="y"?"top":"left"],C,C-d[w==="y"?"bottom":"right"]);s&&(p=v(f,p)),a&&(g=v(h,g));let A=l.fn({...e,[f]:p,[h]:g});return{...A,data:{x:A.x-t,y:A.y-n,enabled:{[f]:s,[h]:a}}}}}},xLt=function(i){return i===void 0&&(i={}),{options:i,fn(e){var t,n;let{x:r,y:o,placement:s,rects:a,middlewareData:l}=e,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=m0(i,e),h={x:r,y:o},f=Zv(s),p=Hpe(f),g=h[p],v=h[f],A=m0(c,e),w=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(t=A.mainAxis)!=null?t:0,crossAxis:(n=A.crossAxis)!=null?n:0};if(u){let E=p==="y"?"height":"width",I=a.reference[p]-a.floating[E]+w.mainAxis,T=a.reference[p]+a.reference[E]-w.mainAxis;gT&&(g=T)}if(d){var C,_;let E=p==="y"?"width":"height",I=ALt.has(_C(s)),T=a.reference[f]-a.floating[E]+(I&&((C=l.offset)==null?void 0:C[f])||0)+(I?0:w.crossAxis),L=a.reference[f]+a.reference[E]+(I?0:((_=l.offset)==null?void 0:_[f])||0)-(I?w.crossAxis:0);vL&&(v=L)}return{[p]:g,[f]:v}}}},CLt=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(e){let{placement:t,rects:n,platform:r,elements:o}=e,{apply:s=()=>{},...a}=m0(i,e),l=await r.detectOverflow(e,a),c=_C(t),u=d2(t),d=Zv(t)==="y",{width:h,height:f}=n.floating,p,g;c==="top"||c==="bottom"?(p=c,g=u===(await(r.isRTL==null?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(g=c,p=u==="end"?"top":"bottom");let v=f-l.top-l.bottom,A=h-l.left-l.right,w=p0(f-l[p],v),C=p0(h-l[g],A),_=e.middlewareData.shift,E=!_,I=w,T=C;_!=null&&_.enabled.x&&(T=A),_!=null&&_.enabled.y&&(I=v),E&&!u&&(d?T=h-2*gp(l.left,l.right):I=f-2*gp(l.top,l.bottom)),await s({...e,availableWidth:T,availableHeight:I});let L=await r.getDimensions(o.floating);return h!==L.width||f!==L.height?{reset:{rects:!0}}:{}}}};function jpe(){return typeof window<"u"}function ID(i){return SLt(i)?(i.nodeName||"").toLowerCase():"#document"}function pf(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function F1(i){var e;return(e=(SLt(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function SLt(i){return jpe()?i instanceof Node||i instanceof pf(i).Node:!1}function mf(i){return jpe()?i instanceof Element||i instanceof pf(i).Element:!1}function O1(i){return jpe()?i instanceof HTMLElement||i instanceof pf(i).HTMLElement:!1}function _Lt(i){return!jpe()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof pf(i).ShadowRoot}function fj(i){let{overflow:e,overflowX:t,overflowY:n,display:r}=g0(i);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&r!=="inline"&&r!=="contents"}function ELt(i){return/^(table|td|th)$/.test(ID(i))}function pj(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var dIi=/transform|translate|scale|rotate|perspective|filter/,hIi=/paint|layout|strict|content/,f2=i=>!!i&&i!=="none",Dze;function Qpe(i){let e=mf(i)?g0(i):i;return f2(e.transform)||f2(e.translate)||f2(e.scale)||f2(e.rotate)||f2(e.perspective)||!mj()&&(f2(e.backdropFilter)||f2(e.filter))||dIi.test(e.willChange||"")||hIi.test(e.contain||"")}function DLt(i){let e=SC(i);for(;O1(e)&&!p2(e);){if(Qpe(e))return e;if(pj(e))return null;e=SC(e)}return null}function mj(){return Dze==null&&(Dze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dze}function p2(i){return/^(html|body|#document)$/.test(ID(i))}function g0(i){return pf(i).getComputedStyle(i)}function gj(i){return mf(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function SC(i){if(ID(i)==="html")return i;let e=i.assignedSlot||i.parentNode||_Lt(i)&&i.host||F1(i);return _Lt(e)?e.host:e}function TLt(i){let e=SC(i);return p2(e)?(i.ownerDocument||i).body:O1(e)&&fj(e)?e:TLt(e)}function EC(i,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);let r=TLt(i),o=r===((n=i.ownerDocument)==null?void 0:n.body),s=pf(r);if(o){let a=Gpe(s);return e.concat(s,s.visualViewport||[],fj(r)?r:[],a&&t?EC(a):[])}else return e.concat(r,EC(r,[],t))}function Gpe(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function LLt(i){let e=g0(i),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,r=O1(i),o=r?i.offsetWidth:t,s=r?i.offsetHeight:n,a=u2(t)!==o||u2(n)!==s;return a&&(t=o,n=s),{width:t,height:n,$:a}}function kze(i){return mf(i)?i:i.contextElement}function t4(i){let e=kze(i);if(!O1(e))return R1(1);let t=e.getBoundingClientRect(),{width:n,height:r,$:o}=LLt(e),s=(o?u2(t.width):t.width)/n,a=(o?u2(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var fIi=R1(0);function NLt(i){let e=pf(i);return!mj()||!e.visualViewport?fIi:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pIi(i,e,t){return e===void 0&&(e=!1),!!t&&e&&t===pf(i)}function m2(i,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);let r=i.getBoundingClientRect(),o=kze(i),s=R1(1);e&&(n?mf(n)&&(s=t4(n)):s=t4(i));let a=pIi(o,t,n)?NLt(o):R1(0),l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(o&&n){let h=pf(o),f=mf(n)?pf(n):n,p=h,g=Gpe(p);for(;g&&f!==p;){let v=t4(g),A=g.getBoundingClientRect(),w=g0(g),C=A.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,_=A.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=C,c+=_,p=pf(g),g=Gpe(p)}}return h2({width:u,height:d,x:l,y:c})}function qpe(i,e){let t=gj(i).scrollLeft;return e?e.left+t:m2(F1(i)).left+t}function MLt(i,e){let t=i.getBoundingClientRect(),n=t.left+e.scrollLeft-qpe(i,t),r=t.top+e.scrollTop;return{x:n,y:r}}function mIi(i){let{elements:e,rect:t,offsetParent:n,strategy:r}=i,o=r==="fixed",s=F1(n),a=e?pj(e.floating):!1;if(n===s||a&&o)return t;let l={scrollLeft:0,scrollTop:0},c=R1(1),u=R1(0),d=O1(n);if((d||!o)&&((ID(n)!=="body"||fj(s))&&(l=gj(n)),d)){let f=m2(n);c=t4(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}let h=s&&!d&&!o?MLt(s,l):R1(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:t.y*c.y-l.scrollTop*c.y+u.y+h.y}}function gIi(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function bIi(i){let e=gj(i),t=i.ownerDocument.body,n=gp(i.scrollWidth,i.clientWidth,t.scrollWidth,t.clientWidth),r=gp(i.scrollHeight,i.clientHeight,t.scrollHeight,t.clientHeight),o=-e.scrollLeft+qpe(i),s=-e.scrollTop;return g0(t).direction==="rtl"&&(o+=gp(i.clientWidth,t.clientWidth)-n),{width:n,height:r,x:o,y:s}}var vIi=25;function AIi(i,e,t){t===void 0&&(t="viewport");let n=t==="layoutViewport",r=pf(i),o=F1(i),s=r.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let h=!mj()||e==="fixed";n?h||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,h&&(c=s.offsetLeft,u=s.offsetTop))}if(qpe(o)<=0){let h=o.ownerDocument,f=h.body,p=getComputedStyle(f),g=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(o.clientWidth-f.clientWidth-g),A=getComputedStyle(o).scrollbarGutter==="stable both-edges"?v/2:v;A<=vIi&&(a-=A)}return{width:a,height:l,x:c,y:u}}function yIi(i,e){let t=m2(i,!0,e==="fixed"),n=t.top+i.clientTop,r=t.left+i.clientLeft,o=t4(i),s=i.clientWidth*o.x,a=i.clientHeight*o.y,l=r*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function kLt(i,e,t){let n;if(e==="viewport"||e==="layoutViewport")n=AIi(i,t,e);else if(e==="document")n=bIi(F1(i));else if(mf(e))n=yIi(e,t);else{let r=NLt(i);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return h2(n)}function wIi(i,e){let t=e.get(i);if(t)return t;let n=EC(i,[],!1).filter(a=>mf(a)&&ID(a)!=="body"),r=null,o=g0(i).position==="fixed",s=o?SC(i):i;for(;mf(s)&&!p2(s);){let a=g0(s),l=Qpe(s),c=r?r.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):r=a,s=SC(s)}return e.set(i,n),n}function xIi(i){let{element:e,boundary:t,rootBoundary:n,strategy:r}=i,s=[...t==="clippingAncestors"?pj(e)?[]:wIi(e,this._c):[].concat(t),n],a=kLt(e,s[0],r),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let h=1;h{a(!1,1e-7)},1e3)}T=!1}try{n=new IntersectionObserver(L,{...I,root:o.ownerDocument})}catch{n=new IntersectionObserver(L,I)}n.observe(i)}let l=pf(i),c=()=>a(t);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),s()}}function i4(i,e,t,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=kze(i),u=r||o?[...c?EC(c):[],...e?EC(e):[]]:[];u.forEach(A=>{r&&A.addEventListener("scroll",t),o&&A.addEventListener("resize",t)});let d=c&&a?DIi(c,t,o):null,h=-1,f=null;s&&(f=new ResizeObserver(A=>{let[w]=A;w&&w.target===c&&f&&e&&(f.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(e)})),t()}),c&&!l&&f.observe(c),e&&f.observe(e));let p,g=l?m2(i):null;l&&v();function v(){let A=m2(i);g&&!FLt(g,A)&&t(),g=A,p=requestAnimationFrame(v)}return t(),()=>{var A;u.forEach(w=>{r&&w.removeEventListener("scroll",t),o&&w.removeEventListener("resize",t)}),d?.(),(A=f)==null||A.disconnect(),f=null,l&&cancelAnimationFrame(p)}}var n4=Eze,OLt=yLt;var PLt=wLt,BLt=bLt,zLt=CLt,VLt=vLt,Lze=gLt;var HLt=xLt,Ype=(i,e,t)=>{let n=new Map,r=t??{},o={...Ize,...r.platform,_c:n};return mLt(i,e,{...r,platform:o})};var vu=$(Te(),1),ULt=$(Te(),1),jLt=$(Kv(),1),TIi=typeof document<"u",kIi=function(){},Kpe=TIi?ULt.useLayoutEffect:kIi;function Jpe(i,e){if(i===e)return!0;if(typeof i!=typeof e)return!1;if(typeof i=="function"&&i.toString()===e.toString())return!0;let t,n,r;if(i&&e&&typeof i=="object"){if(Array.isArray(i)){if(t=i.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!Jpe(i[n],e[n]))return!1;return!0}if(r=Object.keys(i),t=r.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,r[n]))return!1;for(n=t;n--!==0;){let o=r[n];if(!(o==="_owner"&&i.$$typeof)&&!Jpe(i[o],e[o]))return!1}return!0}return i!==i&&e!==e}function QLt(i){return typeof window>"u"?1:(i.ownerDocument.defaultView||window).devicePixelRatio||1}function WLt(i,e){let t=QLt(i);return Math.round(e*t)/t}function Nze(i){let e=vu.useRef(i);return Kpe(()=>{e.current=i}),e}function Xpe(i){i===void 0&&(i={});let{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:r,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=i,[u,d]=vu.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[h,f]=vu.useState(n);Jpe(h,n)||f(n);let[p,g]=vu.useState(null),[v,A]=vu.useState(null),w=vu.useCallback(se=>{se!==I.current&&(I.current=se,g(se))},[]),C=vu.useCallback(se=>{se!==T.current&&(T.current=se,A(se))},[]),_=o||p,E=s||v,I=vu.useRef(null),T=vu.useRef(null),L=vu.useRef(u),M=l!=null,z=Nze(l),H=Nze(r),B=Nze(c),q=vu.useCallback(()=>{if(!I.current||!T.current)return;let se={placement:e,strategy:t,middleware:h};H.current&&(se.platform=H.current),Ype(I.current,T.current,se).then(le=>{let oe={...le,isPositioned:B.current!==!1};U.current&&!Jpe(L.current,oe)&&(L.current=oe,jLt.flushSync(()=>{d(oe)}))})},[h,e,t,H,B]);Kpe(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(se=>({...se,isPositioned:!1})))},[c]);let U=vu.useRef(!1);Kpe(()=>(U.current=!0,()=>{U.current=!1}),[]),Kpe(()=>{if(_&&(I.current=_),E&&(T.current=E),_&&E){if(z.current)return z.current(_,E,q);q()}},[_,E,q,z,M]);let F=vu.useMemo(()=>({reference:I,floating:T,setReference:w,setFloating:C}),[w,C]),ne=vu.useMemo(()=>({reference:_,floating:E}),[_,E]),ce=vu.useMemo(()=>{let se={position:t,left:0,top:0};if(!ne.floating)return se;let le=WLt(ne.floating,u.x),oe=WLt(ne.floating,u.y);return a?{...se,transform:"translate("+le+"px, "+oe+"px)",...QLt(ne.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:le,top:oe}},[t,a,ne.floating,u.x,u.y]);return vu.useMemo(()=>({...u,update:q,refs:F,elements:ne,floatingStyles:ce}),[u,q,F,ne,ce])}var IIi=i=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:i,fn(t){let{element:n,padding:r}=typeof i=="function"?i(t):i;return n&&e(n)?n.current!=null?Lze({element:n.current,padding:r}).fn(t):{}:n?Lze({element:n,padding:r}).fn(t):{}}}},g2=(i,e)=>{let t=OLt(i);return{name:t.name,fn:t.fn,options:[i,e]}},bj=(i,e)=>{let t=PLt(i);return{name:t.name,fn:t.fn,options:[i,e]}},Mze=(i,e)=>({fn:HLt(i).fn,options:[i,e]}),vj=(i,e)=>{let t=BLt(i);return{name:t.name,fn:t.fn,options:[i,e]}},Aj=(i,e)=>{let t=zLt(i);return{name:t.name,fn:t.fn,options:[i,e]}};var Rze=(i,e)=>{let t=VLt(i);return{name:t.name,fn:t.fn,options:[i,e]}};var Fze=(i,e)=>{let t=IIi(i);return{name:t.name,fn:t.fn,options:[i,e]}};var GLt=$(Te(),1);var LIi=Object.defineProperty,NIi=(i,e)=>LIi(i,"name",{value:e,configurable:!0});function Oze(i){let[e,t]=GLt.useState(void 0);return rl(()=>{if(i){t({width:i.offsetWidth,height:i.offsetHeight});let n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let o=r[0],s,a;if("borderBoxSize"in o){let l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=i.offsetWidth,a=i.offsetHeight;t({width:s,height:a})});return n.observe(i,{box:"border-box"}),()=>n.unobserve(i)}else t(void 0)},[i]),e}NIi(Oze,"useSize");var r4=$(Hi(),1),MIi=Object.defineProperty,LD=(i,e)=>MIi(i,"name",{value:e,configurable:!0});var qLt="Popper",[YLt,o4]=vh(qLt),[RIi,KLt]=YLt(qLt),FIi=LD(i=>{let{__scopePopper:e,children:t}=i,[n,r]=gf.useState(null),[o,s]=gf.useState(void 0);return(0,r4.jsx)(RIi,{scope:e,anchor:n,onAnchorChange:r,placementState:o,setPlacementState:s,children:t})},"Popper"),OIi="PopperAnchor",PIi=gf.forwardRef(LD(function(e,t){let{__scopePopper:n,virtualRef:r,...o}=e,s=KLt(OIi,n),a=gf.useRef(null),l=s.onAnchorChange,c=gf.useCallback(g=>{a.current=g,g&&l(g)},[l]),u=Lo(t,c),d=gf.useRef(null);gf.useEffect(()=>{if(!r)return;let g=d.current;d.current=r.current,g!==d.current&&l(d.current)});let h=s.placementState&&Zpe(s.placementState),f=h?.[0],p=h?.[1];return r?null:(0,r4.jsx)(Aa.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...o,ref:u})},"PopperAnchor")),JLt="PopperContent",[BIi,_5r]=YLt(JLt),zIi=gf.forwardRef(LD(function(e,t){let{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...v}=e,A=KLt(JLt,n),[w,C]=gf.useState(null),_=Lo(t,C),[E,I]=gf.useState(null),T=Oze(E),L=T?.width??0,M=T?.height??0,z=r+(s!=="center"?"-"+s:""),H=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(u)?u:[u],q=B.length>0,U={padding:H,boundary:B.filter(XLt),altBoundary:q},{refs:F,floatingStyles:ne,placement:ce,isPositioned:se,middlewareData:le}=Xpe({strategy:"fixed",placement:z,whileElementsMounted:LD((...Vt)=>i4(...Vt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:A.anchor},middleware:[g2({mainAxis:o+M,alignmentAxis:a}),c&&bj({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Mze():void 0,...U}),c&&vj({...U}),Aj({...U,apply:LD(({elements:Vt,rects:Li,availableWidth:ei,availableHeight:Ni})=>{let{width:Ke,height:St}=Li.reference,yt=Vt.floating.style;yt.setProperty("--radix-popper-available-width",`${ei}px`),yt.setProperty("--radix-popper-available-height",`${Ni}px`),yt.setProperty("--radix-popper-anchor-width",`${Ke}px`),yt.setProperty("--radix-popper-anchor-height",`${St}px`)},"apply")}),E&&Fze({element:E,padding:l}),VIi({arrowWidth:L,arrowHeight:M}),f&&Rze({strategy:"referenceHidden",...U,boundary:q?U.boundary:void 0})]}),oe=A.setPlacementState;rl(()=>(oe(ce),()=>{oe(void 0)}),[ce,oe]);let[fe,Re]=Zpe(ce),ft=bm(g);rl(()=>{se&&ft?.()},[se,ft]);let At=le.arrow?.x,Dt=le.arrow?.y,Ct=le.arrow?.centerOffset!==0,[Xt,Be]=gf.useState();return rl(()=>{w&&Be(window.getComputedStyle(w).zIndex)},[w]),(0,r4.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:se?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Xt,"--radix-popper-transform-origin":[le.transformOrigin?.x,le.transformOrigin?.y].join(" "),...le.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,r4.jsx)(BIi,{scope:n,placedSide:fe,placedAlign:Re,onArrowChange:I,arrowX:At,arrowY:Dt,shouldHideArrow:Ct,children:(0,r4.jsx)(Aa.div,{"data-side":fe,"data-align":Re,...v,ref:_,style:{...v.style,animation:se?v.style?.animation:"none"}})})})},"PopperContent"));function XLt(i){return i!==null}LD(XLt,"isNotNull");var VIi=LD(i=>({name:"transformOrigin",options:i,fn(e){let{placement:t,rects:n,middlewareData:r}=e,s=r.arrow?.centerOffset!==0,a=s?0:i.arrowWidth,l=s?0:i.arrowHeight,[c,u]=Zpe(t),d={start:"0%",center:"50%",end:"100%"}[u],h=(r.arrow?.x??0)+a/2,f=(r.arrow?.y??0)+l/2,p="",g="";return c==="bottom"?(p=s?d:`${h}px`,g=`${-l}px`):c==="top"?(p=s?d:`${h}px`,g=`${n.floating.height+l}px`):c==="right"?(p=`${-l}px`,g=s?d:`${f}px`):c==="left"&&(p=`${n.floating.width+l}px`,g=s?d:`${f}px`),{data:{x:p,y:g}}}}),"transformOrigin");function Zpe(i){let[e,t="center"]=i.split("-");return[e,t]}LD(Zpe,"getSideAndAlignFromPlacement");var $pe=FIi,eme=PIi,tme=zIi;var ime=$(Te(),1),$Lt=$(Kv(),1);var eNt=$(Hi(),1),HIi=Object.defineProperty,WIi=(i,e)=>HIi(i,"name",{value:e,configurable:!0}),s4=ime.forwardRef(WIi(function(e,t){let{container:n,...r}=e,[o,s]=ime.useState(!1);rl(()=>s(!0),[]);let a=n||o&&globalThis?.document?.body;return a?$Lt.createPortal((0,eNt.jsx)(Aa.div,{...r,ref:t}),a):null},"Portal"));var yh=$(Te(),1);var tNt=$(Te(),1),UIi=Object.defineProperty,DC=(i,e)=>UIi(i,"name",{value:e,configurable:!0});function iNt(i,e){return tNt.useReducer((t,n)=>e[t][n]??t,i)}DC(iNt,"useStateMachine");var P1=DC(i=>{let{present:e,children:t}=i,n=nNt(e),r=typeof t=="function"?t({present:n.isPresent}):yh.Children.only(t),o=rNt(n.ref,oNt(r));return typeof t=="function"||n.isPresent?yh.cloneElement(r,{ref:o}):null},"Presence");function nNt(i){let[e,t]=yh.useState(),n=yh.useRef(null),r=yh.useRef(i),o=yh.useRef("none"),s=yh.useRef(void 0),a=i?"mounted":"unmounted",[l,c]=iNt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return yh.useEffect(()=>{l==="mounted"?(o.current=s.current??a4(n.current),s.current=void 0):o.current="none"},[l]),rl(()=>{let u=n.current,d=r.current;if(d!==i){let f=o.current,p=a4(u);i?(s.current=p,c("MOUNT")):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=i}},[i,c]),rl(()=>{if(e){let u,d=e.ownerDocument.defaultView??window,h=DC(p=>{let v=a4(n.current).includes(CSS.escape(p.animationName));if(p.target===e&&v&&(c("ANIMATION_END"),!r.current)){let A=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=A)})}},"handleAnimationEnd"),f=DC(p=>{p.target===e&&(o.current=a4(n.current))},"handleAnimationStart");return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:yh.useCallback(u=>{if(u){let d=getComputedStyle(u);n.current=d,s.current=a4(d)}else n.current=null;t(u)},[])}}DC(nNt,"usePresence");function Pze(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}DC(Pze,"setRef");function rNt(...i){let e=yh.useRef(i);return e.current=i,yh.useCallback(t=>{let n=e.current,r=!1,o=n.map(s=>{let a=Pze(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;sjIi(i,"name",{value:e,configurable:!0}),Bze=!1;function sNt(){let[i,e]=nme.useState(Bze);return nme.useEffect(()=>{Bze||(Bze=!0,e(!0))},[]),i}zze(sNt,"useIsHydrated");var aNt=QIi[" useSyncExternalStore ".trim().toString()];function lNt(){return()=>{}}zze(lNt,"subscribe");function cNt(){return aNt(lNt,()=>!0,()=>!1)}zze(cNt,"useIsHydratedModern");var uNt=typeof aNt=="function"?cNt:sNt;var ND=$(Hi(),1),GIi=Object.defineProperty,b2=(i,e)=>GIi(i,"name",{value:e,configurable:!0}),Vze="rovingFocusGroup.onEntryFocus",qIi={bubbles:!1,cancelable:!0},rme="RovingFocusGroup",[Hze,dNt,YIi]=uj(rme),[KIi,Wze]=vh(rme,[YIi]),[JIi,XIi]=KIi(rme),ZIi=Id.forwardRef(b2(function(e,t){return(0,ND.jsx)(Hze.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ND.jsx)(Hze.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ND.jsx)($Ii,{...e,ref:t})})})},"RovingFocusGroup")),$Ii=Id.forwardRef(b2(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=Id.useRef(null),p=Lo(t,f),g=dj(s),[v,A]=xC({prop:a,defaultProp:l??null,onChange:c,caller:rme}),[w,C]=Id.useState(!1),_=bm(u),E=dNt(n),I=Id.useRef(!1),[T,L]=Id.useState(0);return Id.useEffect(()=>{let M=f.current;if(M)return M.addEventListener(Vze,_),()=>M.removeEventListener(Vze,_)},[_]),(0,ND.jsx)(JIi,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:v,onItemFocus:Id.useCallback(M=>A(M),[A]),onItemShiftTab:Id.useCallback(()=>C(!0),[]),onFocusableItemAdd:Id.useCallback(()=>L(M=>M+1),[]),onFocusableItemRemove:Id.useCallback(()=>L(M=>M-1),[]),children:(0,ND.jsx)(Aa.div,{tabIndex:w||T===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:Qn(e.onMouseDown,()=>{I.current=!0}),onFocus:Qn(e.onFocus,M=>{let z=!I.current;if(M.target===M.currentTarget&&z&&!w){let H=new CustomEvent(Vze,qIi);if(M.currentTarget.dispatchEvent(H),!H.defaultPrevented){let B=E().filter(ce=>ce.focusable),q=B.find(ce=>ce.active),U=B.find(ce=>ce.id===v),ne=[q,U,...B].filter(Boolean).map(ce=>ce.ref.current);Uze(ne,d)}}I.current=!1}),onBlur:Qn(e.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),eLi="RovingFocusGroupItem",tLi=Id.forwardRef(b2(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...l}=e,c=f0(),u=s||c,d=XIi(eLi,n),h=d.currentTabStopId===u,f=dNt(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:v}=d,A=uNt();return rl(()=>{if(!(!A||!r))return p(),()=>g()},[A,r,p,g]),Id.useEffect(()=>{if(!(A||!r))return p(),()=>g()},[A,r,p,g]),(0,ND.jsx)(Hze.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:(0,ND.jsx)(Aa.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Qn(e.onMouseDown,w=>{r?d.onItemFocus(u):w.preventDefault()}),onFocus:Qn(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Qn(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;let C=fNt(w,d.orientation,d.dir);if(C!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=f().filter(I=>I.focusable).map(I=>I.ref.current);if(C==="last")E.reverse();else if(C==="prev"||C==="next"){C==="prev"&&E.reverse();let I=E.indexOf(w.currentTarget);E=d.loop?pNt(E,I+1):E.slice(I+1)}setTimeout(()=>Uze(E))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:v!=null}):a})})},"RovingFocusGroupItem")),iLi={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hNt(i,e){return e!=="rtl"?i:i==="ArrowLeft"?"ArrowRight":i==="ArrowRight"?"ArrowLeft":i}b2(hNt,"getDirectionAwareKey");function fNt(i,e,t){let n=hNt(i.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return iLi[n]}b2(fNt,"getFocusIntent");function Uze(i,e=!1){let t=document.activeElement;for(let n of i)if(n===t||(n.focus({preventScroll:e}),document.activeElement!==t))return}b2(Uze,"focusFirst");function pNt(i,e){return i.map((t,n)=>i[(e+n)%i.length])}b2(pNt,"wrapArray");var mNt=ZIi,gNt=tLi;var rLi=function(i){if(typeof document>"u")return null;var e=Array.isArray(i)?i[0]:i;return e.ownerDocument.body},l4=new WeakMap,ome=new WeakMap,sme={},jze=0,bNt=function(i){return i&&(i.host||bNt(i.parentNode))},oLi=function(i,e){return e.map(function(t){if(i.contains(t))return t;var n=bNt(t);return n&&i.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",i,". Doing nothing"),null)}).filter(function(t){return!!t})},sLi=function(i,e,t,n){var r=oLi(e,Array.isArray(i)?i:[i]);sme[t]||(sme[t]=new WeakMap);var o=sme[t],s=[],a=new Set,l=new Set(r),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};r.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var f=h.getAttribute(n),p=f!==null&&f!=="false",g=(l4.get(h)||0)+1,v=(o.get(h)||0)+1;l4.set(h,g),o.set(h,v),s.push(h),g===1&&p&&ome.set(h,!0),v===1&&h.setAttribute(t,"true"),p||h.setAttribute(n,"true")}catch(A){console.error("aria-hidden: cannot operate on ",h,A)}})};return u(e),a.clear(),jze++,function(){s.forEach(function(d){var h=l4.get(d)-1,f=o.get(d)-1;l4.set(d,h),o.set(d,f),h||(ome.has(d)||d.removeAttribute(n),ome.delete(d)),f||d.removeAttribute(t)}),jze--,jze||(l4=new WeakMap,l4=new WeakMap,ome=new WeakMap,sme={})}},ame=function(i,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(i)?i:[i]),r=e||rLi(i);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),sLi(n,r,t,"aria-hidden")):function(){return null}};var vm=function(){return vm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u")return fLi;var e=pLi(i),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-t+e[2]-e[0])}};var mLi=wj(),c4="data-scroll-locked",gLi=function(i,e,t,n){var r=i.left,o=i.top,s=i.right,a=i.gap;return t===void 0&&(t="margin"),` - .`.concat(Qze,` { +`};Y1.text=function(i,e){return QC(i[e].content)};Y1.html_block=function(i,e){return i[e].content};Y1.html_inline=function(i,e){return i[e].content};function P4(){this.rules=F4({},Y1)}P4.prototype.renderAttrs=function(e){let t,n,o;if(!e.attrs)return"";for(o="",t=0,n=e.attrs.length;t +`:">",r};P4.prototype.renderInline=function(i,e,t){let n="",o=this.rules;for(let r=0,s=i.length;r=0&&(n=this.attrs[t][1]),n};B4.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};var GC=B4;function RDt(i,e,t){this.src=i,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}RDt.prototype.Token=GC;var FDt=RDt;var tvi=/\r\n?|\n/g,ivi=/\0/g;function O7e(i){let e;e=i.src.replace(tvi,` +`),e=e.replace(ivi,"\uFFFD"),i.src=e}function P7e(i){let e;i.inlineMode?(e=new i.Token("inline","",0),e.content=i.src,e.map=[0,1],e.children=[],i.tokens.push(e)):i.md.block.parse(i.src,i.md,i.env,i.tokens)}function B7e(i){let e=i.tokens;for(let t=0,n=e.length;t\s]/i.test(i)}function ovi(i){return/^<\/a\s*>/i.test(i)}function z7e(i){let e=i.tokens;if(i.md.options.linkify)for(let t=0,n=e.length;t=0;a--){let l=o[a];if(l.type==="link_close"){for(a--;o[a].level!==l.level&&o[a].type!=="link_open";)a--;continue}if(l.type==="html_inline"&&(nvi(l.content)&&s>0&&s--,ovi(l.content)&&s++),!(s>0)&&l.type==="text"&&i.md.linkify.test(l.content)){let c=l.content,u=i.md.linkify.match(c),d=[],h=l.level,f=0;u.length>0&&u[0].index===0&&a>0&&o[a-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let I=new i.Token("text","",0);I.content=c.slice(f,w),I.level=h,d.push(I)}let C=new i.Token("link_open","a",1);C.attrs=[["href",A]],C.level=h++,C.markup="linkify",C.info="auto",d.push(C);let _=new i.Token("text","",0);_.content=v,_.level=h,d.push(_);let E=new i.Token("link_close","a",-1);E.level=--h,E.markup="linkify",E.info="auto",d.push(E),f=u[p].lastIndex}if(f0){let a=o.length;for(let d of r)a+=d.nodes.length-1;let l=new Array(a),c=0,u=0;r.reverse();for(let d=0;d=0;t--){let n=i[t];n.type==="text"&&!e&&(n.content=n.content.replace(svi,lvi)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function uvi(i){let e=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n.type==="text"&&!e&&ODt.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function V7e(i){let e;if(i.md.options.typographer)for(e=i.tokens.length-1;e>=0;e--)i.tokens[e].type==="inline"&&(rvi.test(i.tokens[e].content)&&cvi(i.tokens[e].children),ODt.test(i.tokens[e].content)&&uvi(i.tokens[e].children))}var dvi=/['"]/,PDt=/['"]/g,BDt="\u2019";function jme(i,e,t,n){i[e]||(i[e]=[]),i[e].push({pos:t,ch:n})}function hvi(i,e){let t="",n=0;e.sort((o,r)=>o.pos-r.pos);for(let o=0;o=0&&!(n[t].level<=a);t--);if(n.length=t+1,s.type!=="text")continue;let l=s.content,c=0,u=l.length;e:for(;c=0)g=l.charCodeAt(d.index-1);else for(t=r-1;t>=0&&!(i[t].type==="softbreak"||i[t].type==="hardbreak");t--)if(i[t].content){g=i[t].content.charCodeAt(i[t].content.length-1);break}let A=32;if(c=48&&g<=57&&(f=h=!1),h&&f&&(h=v,f=w),!h&&!f){p&&jme(o,r,d.index,BDt);continue}if(f)for(t=n.length-1;t>=0;t--){let E=n[t];if(n[t].level=0;e--)i.tokens[e].type!=="inline"||!dvi.test(i.tokens[e].content)||fvi(i.tokens[e].children,i)}function W7e(i){let e,t,n=i.tokens,o=n.length;for(let r=0;r0&&this.level++,this.tokens.push(n),n};K1.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};K1.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;et;)if(!Ho(this.src.charCodeAt(--e)))return e+1;return e};K1.prototype.skipChars=function(e,t){for(let n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e};K1.prototype.getLines=function(e,t,n,o){if(e>=t)return"";let r=new Array(t-e);for(let s=0,a=e;an?r[s]=new Array(l-n+1).join(" ")+this.src.slice(u,d):r[s]=this.src.slice(u,d)}return r.join("")};K1.prototype.Token=GC;var VDt=K1;var pvi=65536;function Q7e(i,e){let t=i.bMarks[e]+i.tShift[e],n=i.eMarks[e];return i.src.slice(t,n)}function HDt(i){let e=[],t=i.length,n=0,o=i.charCodeAt(n),r=!1,s=0,a="";for(;nt)return!1;let o=e+1;if(i.sCount[o]=4)return!1;let r=i.bMarks[o]+i.tShift[o];if(r>=i.eMarks[o])return!1;let s=i.src.charCodeAt(r++);if(s!==124&&s!==45&&s!==58||r>=i.eMarks[o])return!1;let a=i.src.charCodeAt(r++);if(a!==124&&a!==45&&a!==58&&!Ho(a)||s===45&&Ho(a))return!1;for(;r=4)return!1;c=HDt(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();let d=c.length;if(d===0||d!==u.length)return!1;if(n)return!0;let h=i.parentType;i.parentType="table";let f=i.md.block.ruler.getRules("blockquote"),p=i.push("table_open","table",1),g=[e,0];p.map=g;let A=i.push("thead_open","thead",1);A.map=[e,e+1];let v=i.push("tr_open","tr",1);v.map=[e,e+1];for(let _=0;_=4||(c=HDt(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),C+=d-c.length,C>pvi))break;if(o===e+2){let I=i.push("tbody_open","tbody",1);I.map=w=[e+2,0]}let E=i.push("tr_open","tr",1);E.map=[o,o+1];for(let I=0;I=4){n++,o=n;continue}break}i.line=o;let r=i.push("code_block","code",0);return r.content=i.getLines(e,o,4+i.blkIndent,!1)+` +`,r.map=[e,i.line],!0}function Y7e(i,e,t,n){let o=i.bMarks[e]+i.tShift[e],r=i.eMarks[e];if(i.sCount[e]-i.blkIndent>=4||o+3>r)return!1;let s=i.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=i.skipChars(o,s);let l=o-a;if(l<3)return!1;let c=i.src.slice(a,o),u=i.src.slice(o,r);if(s===96&&u.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let d=e,h=!1;for(;d++,!(d>=t||(o=a=i.bMarks[d]+i.tShift[d],r=i.eMarks[d],o=4)&&(o=i.skipChars(o,s),!(o-a=4||i.src.charCodeAt(o)!==62)return!1;if(n)return!0;let a=[],l=[],c=[],u=[],d=i.md.block.ruler.getRules("blockquote"),h=i.parentType;i.parentType="blockquote";let f=!1,p;for(p=e;p=r)break;if(i.src.charCodeAt(o++)===62&&!C){let E=i.sCount[p]+1,I,T;i.src.charCodeAt(o)===32?(o++,E++,T=!1,I=!0):i.src.charCodeAt(o)===9?(I=!0,(i.bsCount[p]+E)%4===3?(o++,E++,T=!1):T=!0):I=!1;let N=E;for(a.push(i.bMarks[p]),i.bMarks[p]=o;o=r,l.push(i.bsCount[p]),i.bsCount[p]=i.sCount[p]+1+(I?1:0),c.push(i.sCount[p]),i.sCount[p]=N-E,u.push(i.tShift[p]),i.tShift[p]=o-i.bMarks[p];continue}if(f)break;let _=!1;for(let E=0,I=d.length;E";let v=[e,0];A.map=v,i.md.block.tokenize(i,e,p);let w=i.push("blockquote_close","blockquote",-1);w.markup=">",i.lineMax=s,i.parentType=h,v[1]=i.line;for(let C=0;C=4)return!1;let r=i.bMarks[e]+i.tShift[e],s=i.src.charCodeAt(r++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;r=n)return-1;let r=i.src.charCodeAt(o++);if(r<48||r>57)return-1;for(;;){if(o>=n)return-1;if(r=i.src.charCodeAt(o++),r>=48&&r<=57){if(o-t>=10)return-1;continue}if(r===41||r===46)break;return-1}return o=4||i.listIndent>=0&&i.sCount[l]-i.listIndent>=4&&i.sCount[l]=i.blkIndent&&(u=!0);let d,h,f;if((f=UDt(i,l))>=0){if(d=!0,s=i.bMarks[l]+i.tShift[l],h=Number(i.src.slice(s,f-1)),u&&h!==1)return!1}else if((f=WDt(i,l))>=0)d=!1;else return!1;if(u&&i.skipSpaces(f)>=i.eMarks[l])return!1;if(n)return!0;let p=i.src.charCodeAt(f-1),g=i.tokens.length;d?(a=i.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=i.push("bullet_list_open","ul",1);let A=[l,0];a.map=A,a.markup=String.fromCharCode(p);let v=!1,w=i.md.block.ruler.getRules("list"),C=i.parentType;for(i.parentType="list";l=o?T=1:T=E-_,T>4&&(T=1);let N=_+T;a=i.push("list_item_open","li",1),a.markup=String.fromCharCode(p);let L=[l,0];a.map=L,d&&(a.info=i.src.slice(s,f-1));let B=i.tight,z=i.tShift[l],Q=i.sCount[l],Z=i.listIndent;if(i.listIndent=i.blkIndent,i.blkIndent=N,i.tight=!0,i.tShift[l]=I-i.bMarks[l],i.sCount[l]=E,I>=o&&i.isEmpty(l+1)?i.line=Math.min(i.line+2,t):i.md.block.tokenize(i,l,t,!0),(!i.tight||v)&&(c=!1),v=i.line-l>1&&i.isEmpty(i.line-1),i.blkIndent=i.listIndent,i.listIndent=Z,i.tShift[l]=z,i.sCount[l]=Q,i.tight=B,a=i.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),l=i.line,L[1]=l,l>=t||i.sCount[l]=4)break;let U=!1;for(let M=0,ee=w.length;M=4||i.src.charCodeAt(o)!==91)return!1;function a(w){let C=i.lineMax;if(w>=C||i.isEmpty(w))return null;let _=!1;if(i.sCount[w]-i.blkIndent>3&&(_=!0),i.sCount[w]<0&&(_=!0),!_){let T=i.md.block.ruler.getRules("reference"),N=i.parentType;i.parentType="reference";let L=!1;for(let B=0,z=T.length;B"u"&&(i.env.references={}),typeof i.env.references[v]>"u"&&(i.env.references[v]={title:A,href:d}),i.line=s),!0):!1}var jDt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var gvi="[a-zA-Z_:][a-zA-Z0-9:._-]*",bvi="[^\"'=<>`\\x00-\\x20]+",Avi="'[^']*'",vvi='"[^"]*"',yvi="(?:"+bvi+"|"+Avi+"|"+vvi+")",wvi="(?:\\s+"+gvi+"(?:\\s*=\\s*"+yvi+")?)",QDt="<[A-Za-z][A-Za-z0-9\\-]*"+wvi+"*\\s*\\/?>",GDt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",xvi="",Cvi="<[?][\\s\\S]*?[?]>",_vi="]*>",Svi="",qDt=new RegExp("^(?:"+QDt+"|"+GDt+"|"+xvi+"|"+Cvi+"|"+_vi+"|"+Svi+")"),YDt=new RegExp("^(?:"+QDt+"|"+GDt+")");var W2=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(YDt.source+"\\s*$"),/^$/,!1]];function $7e(i,e,t,n){let o=i.bMarks[e]+i.tShift[e],r=i.eMarks[e];if(i.sCount[e]-i.blkIndent>=4||!i.md.options.html||i.src.charCodeAt(o)!==60)return!1;let s=i.src.slice(o,r),a=0;for(;a=4)return!1;let s=i.src.charCodeAt(o);if(s!==35||o>=r)return!1;let a=1;for(s=i.src.charCodeAt(++o);s===35&&o6||oo&&Ho(i.src.charCodeAt(l-1))&&(r=l),i.line=e+1;let c=i.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[e,i.line];let u=i.push("inline","",0);u.content=V2(i.src.slice(o,r)),u.map=[e,i.line],u.children=[];let d=i.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function tze(i,e,t){let n=i.md.block.ruler.getRules("paragraph");if(i.sCount[e]-i.blkIndent>=4)return!1;let o=i.parentType;i.parentType="paragraph";let r=0,s,a=e+1;for(;a3)continue;if(i.sCount[a]>=i.blkIndent){let f=i.bMarks[a]+i.tShift[a],p=i.eMarks[a];if(f=p))){r=s===61?1:2;break}}if(i.sCount[a]<0)continue;let h=!1;for(let f=0,p=n.length;f3||i.sCount[r]<0)continue;let c=!1;for(let u=0,d=n.length;u=t||i.sCount[s]=r){i.line=t;break}let l=i.line,c=!1;for(let u=0;u=i.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");i.tight=!a,i.isEmpty(i.line-1)&&(a=!0),s=i.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(o),n};FQ.prototype.scanDelims=function(i,e){let t=this.posMax,n=this.src.charCodeAt(i),o;if(i===0)o=32;else if(i===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(i-1),(o&64512)===56320){let A=this.src.charCodeAt(i-2);o=(A&64512)===55296?65536+(A-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let r=i;for(;r=65&&i<=90||i>=97&&i<=122}function Tvi(i){return i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===43||i===45||i===46}function oze(i,e){if(!i.md.options.linkify||i.linkLevel>0)return!1;let t=i.pos,n=i.posMax;if(t+3>n||i.src.charCodeAt(t)!==58||i.src.charCodeAt(t+1)!==47||i.src.charCodeAt(t+2)!==47)return!1;let o=t-Math.min(10,i.pending.length,t),r=t;for(;r>o&&Tvi(i.src.charCodeAt(r-1));)r--;if(r===t||!Dvi(i.src.charCodeAt(r)))return!1;let s=t-r,a=i.md.linkify.matchAtStart(i.src.slice(r));if(!a)return!1;let l=a.url;if(l.length<=s)return!1;let c=l.length;for(;c>0&&l.charCodeAt(c-1)===42;)c--;c!==l.length&&(l=l.slice(0,c));let u=i.md.normalizeLink(l);if(!i.md.validateLink(u))return!1;if(!e){i.pending=i.pending.slice(0,-s);let d=i.push("link_open","a",1);d.attrs=[["href",u]],d.markup="linkify",d.info="auto";let h=i.push("text","",0);h.content=i.md.normalizeLinkText(l);let f=i.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return i.pos+=l.length-s,!0}function rze(i,e){let t=i.pos;if(i.src.charCodeAt(t)!==10)return!1;let n=i.pending.length-1,o=i.posMax;if(!e)if(n>=0&&i.pending.charCodeAt(n)===32)if(n>=1&&i.pending.charCodeAt(n-1)===32){let r=n-1;for(;r>=1&&i.pending.charCodeAt(r-1)===32;)r--;i.pending=i.pending.slice(0,r),i.push("hardbreak","br",0)}else i.pending=i.pending.slice(0,-1),i.push("softbreak","br",0);else i.push("softbreak","br",0);for(t++;t?@[]^_`{|}~-".split("").forEach(function(i){sze[i.charCodeAt(0)]=1});function aze(i,e){let t=i.pos,n=i.posMax;if(i.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let o=i.src.charCodeAt(t);if(o===10){for(e||i.push("hardbreak","br",0),t++;t=55296&&o<=56319&&t+1=56320&&a<=57343&&(r+=i.src[t+1],t++)}let s="\\"+r;if(!e){let a=i.push("text_special","",0);o<256&&sze[o]!==0?a.content=r:a.content=s,a.markup=s,a.info="escape"}return i.pos=t+1,!0}function lze(i,e){let t=i.pos;if(i.src.charCodeAt(t)!==96)return!1;let o=t;t++;let r=i.posMax;for(;t=0;n--){let o=e[n];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let r=e[o.end],s=n>0&&e[n-1].end===o.end+1&&e[n-1].marker===o.marker&&e[n-1].token===o.token-1&&e[o.end+1].token===r.token+1,a=String.fromCharCode(o.marker),l=i.tokens[o.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";let c=i.tokens[r.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(i.tokens[e[n-1].token].content="",i.tokens[e[o.end+1].token].content="",n--)}}function Nvi(i){let e=i.tokens_meta,t=i.tokens_meta.length;ZDt(i,i.delimiters);for(let n=0;n=d)return!1;if(l=p,o=i.md.helpers.parseLinkDestination(i.src,p,i.posMax),o.ok){for(s=i.md.normalizeLink(o.str),i.md.validateLink(s)?p=o.pos:s="",l=p;p=d||i.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof i.env.references>"u")return!1;if(p=0?n=i.src.slice(l,p++):p=f+1):p=f+1,n||(n=i.src.slice(h,f)),r=i.env.references[z2(n)],!r)return i.pos=u,!1;s=r.href,a=r.title}if(!e){i.pos=h,i.posMax=f;let g=i.push("link_open","a",1),A=[["href",s]];g.attrs=A,a&&A.push(["title",a]),i.linkLevel++,i.md.inline.tokenize(i),i.linkLevel--,i.push("link_close","a",-1)}return i.pos=p,i.posMax=d,!0}function hze(i,e){let t,n,o,r,s,a,l,c,u="",d=i.pos,h=i.posMax;if(i.src.charCodeAt(i.pos)!==33||i.src.charCodeAt(i.pos+1)!==91)return!1;let f=i.pos+2,p=i.md.helpers.parseLinkLabel(i,i.pos+1,!1);if(p<0)return!1;if(r=p+1,r=h)return!1;for(c=r,a=i.md.helpers.parseLinkDestination(i.src,r,i.posMax),a.ok&&(u=i.md.normalizeLink(a.str),i.md.validateLink(u)?r=a.pos:u=""),c=r;r=h||i.src.charCodeAt(r)!==41)return i.pos=d,!1;r++}else{if(typeof i.env.references>"u")return!1;if(r=0?o=i.src.slice(c,r++):r=p+1):r=p+1,o||(o=i.src.slice(f,p)),s=i.env.references[z2(o)],!s)return i.pos=d,!1;u=s.href,l=s.title}if(!e){n=i.src.slice(f,p);let g=[];i.md.inline.parse(n,i.md,i.env,g);let A=i.push("image","img",0),v=[["src",u],["alt",""]];A.attrs=v,A.children=g,A.content=n,l&&v.push(["title",l])}return i.pos=r,i.posMax=h,!0}var Mvi=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Rvi=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function fze(i,e){let t=i.pos;if(i.src.charCodeAt(t)!==60)return!1;let n=i.pos,o=i.posMax;for(;;){if(++t>=o)return!1;let s=i.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}let r=i.src.slice(n+1,t);if(Rvi.test(r)){let s=i.md.normalizeLink(r);if(!i.md.validateLink(s))return!1;if(!e){let a=i.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=i.push("text","",0);l.content=i.md.normalizeLinkText(r);let c=i.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return i.pos+=r.length+2,!0}if(Mvi.test(r)){let s=i.md.normalizeLink("mailto:"+r);if(!i.md.validateLink(s))return!1;if(!e){let a=i.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=i.push("text","",0);l.content=i.md.normalizeLinkText(r);let c=i.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return i.pos+=r.length+2,!0}return!1}function Fvi(i){return/^\s]/i.test(i)}function Ovi(i){return/^<\/a\s*>/i.test(i)}function Pvi(i){let e=i|32;return e>=97&&e<=122}function pze(i,e){if(!i.md.options.html)return!1;let t=i.posMax,n=i.pos;if(i.src.charCodeAt(n)!==60||n+2>=t)return!1;let o=i.src.charCodeAt(n+1);if(o!==33&&o!==63&&o!==47&&!Pvi(o))return!1;let r=i.src.slice(n).match(qDt);if(!r)return!1;if(!e){let s=i.push("html_inline","",0);s.content=r[0],Fvi(s.content)&&i.linkLevel++,Ovi(s.content)&&i.linkLevel--}return i.pos+=r[0].length,!0}var Bvi=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,zvi=/^&([a-z][a-z0-9]{1,31});/i;function mze(i,e){let t=i.pos,n=i.posMax;if(i.src.charCodeAt(t)!==38||t+1>=n)return!1;if(i.src.charCodeAt(t+1)===35){let r=i.src.slice(t).match(Bvi);if(r){if(!e){let s=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),a=i.push("text_special","",0);a.content=Ume(s)?O4(s):O4(65533),a.markup=r[0],a.info="entity"}return i.pos+=r[0].length,!0}}else{let r=i.src.slice(t).match(zvi);if(r){let s=RQ(r[0]);if(s!==r[0]){if(!e){let a=i.push("text_special","",0);a.content=s,a.markup=r[0],a.info="entity"}return i.pos+=r[0].length,!0}}}return!1}function $Dt(i){let e={},t=i.length;if(!t)return;let n=0,o=-2,r=[];for(let s=0;sl;c-=r[c]+1){let d=i[c];if(d.marker===a.marker&&d.open&&d.end<0){let h=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(h=!0),!h){let f=c>0&&!i[c-1].open?r[c-1]+1:0;r[s]=s-c+f,r[c]=f,a.open=!1,d.end=s,d.close=!1,u=-1,o=-2;break}}}u!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=u)}}function gze(i){let e=i.tokens_meta,t=i.tokens_meta.length;$Dt(i.delimiters);for(let n=0;n0&&n++,o[e].type==="text"&&e+1=i.pos)throw new Error("inline rule didn't increment state.pos");break}}else i.pos=i.posMax;s||i.pos++,r[e]=i.pos};OQ.prototype.tokenize=function(i){let e=this.ruler.getRules(""),t=e.length,n=i.posMax,o=i.md.options.maxNesting;for(;i.pos=i.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(i.pos>=n)break;continue}i.pending+=i.src[i.pos++]}i.pending&&i.pushPending()};OQ.prototype.parse=function(i,e,t,n){let o=new this.State(i,e,t,n);this.tokenize(o);let r=this.ruler2.getRules(""),s=r.length;for(let a=0;a|$))`,e.tpl_email_fuzzy=`(^|${t}|"|\\(|${e.src_ZCc})(${e.src_email_name}@${e.tpl_host_fuzzy_strict})`,e.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_fuzzy_strict}${e.src_path})`,e.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_no_ip_fuzzy_strict}${e.src_path})`,e}function yze(i){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){i[n]=t[n]})}),i}function Yme(i){return Object.prototype.toString.call(i)}function Vvi(i){return Yme(i)==="[object String]"}function Hvi(i){return Yme(i)==="[object Object]"}function Wvi(i){return Yme(i)==="[object RegExp]"}function iTt(i){return Yme(i)==="[object Function]"}function Uvi(i){return i.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var oTt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function jvi(i){return Object.keys(i||{}).reduce(function(e,t){return e||oTt.hasOwnProperty(t)},!1)}var Qvi={"http:":{validate:function(i,e,t){let n=i.slice(e);return t.re.http||(t.re.http=new RegExp(`^\\/\\/${t.re.src_auth}${t.re.src_host_port_strict}${t.re.src_path}`,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(i,e,t){let n=i.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+`(?:localhost|(?:(?:${t.re.src_domain})\\.)+${t.re.src_domain_root})`+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&i[e-3]===":"||e>=3&&i[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(i,e,t){let n=i.slice(e);return t.re.mailto||(t.re.mailto=new RegExp(`^${t.re.src_email_name}@${t.re.src_host_strict}`,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},Gvi="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",qvi="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function Yvi(i){return function(e,t){let n=e.slice(t);return i.test(n)?n.match(i)[0].length:0}}function nTt(){return function(i,e){e.normalize(i)}}function qme(i){let e=i.re=tTt(i.__opts__),t=i.__tlds__.slice();i.onCompile(),i.__tlds_replaced__||t.push(Gvi),t.push(e.src_xn),e.src_tlds=t.join("|");function n(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.email_fuzzy_global=RegExp(n(e.tpl_email_fuzzy),"ig"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_fuzzy_global=RegExp(n(e.tpl_link_fuzzy),"ig"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.link_no_ip_fuzzy_global=RegExp(n(e.tpl_link_no_ip_fuzzy),"ig"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let o=[];i.__compiled__={};function r(a,l){throw new Error(`(LinkifyIt) Invalid schema "${a}": ${l}`)}Object.keys(i.__schemas__).forEach(function(a){let l=i.__schemas__[a];if(l===null)return;let c={validate:null,link:null};if(i.__compiled__[a]=c,Hvi(l)){Wvi(l.validate)?c.validate=Yvi(l.validate):iTt(l.validate)?c.validate=l.validate:r(a,l),iTt(l.normalize)?c.normalize=l.normalize:l.normalize?r(a,l):c.normalize=nTt();return}if(Vvi(l)){o.push(a);return}r(a,l)}),o.forEach(function(a){i.__compiled__[i.__schemas__[a]]&&(i.__compiled__[a].validate=i.__compiled__[i.__schemas__[a]].validate,i.__compiled__[a].normalize=i.__compiled__[i.__schemas__[a]].normalize)}),i.__compiled__[""]={validate:null,normalize:nTt()};let s=Object.keys(i.__compiled__).filter(function(a){return a.length>0&&i.__compiled__[a]}).map(Uvi).join("|");i.re.schema_test=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"i"),i.re.schema_search=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"ig"),i.re.schema_at_start=RegExp(`^${i.re.schema_search.source}`,"i"),i.re.pretest=RegExp(`(${i.re.schema_test.source})|(${i.re.host_fuzzy_test.source})|@`,"i")}function rTt(i,e,t,n){let o=i.slice(t,n);this.schema=e.toLowerCase(),this.index=t,this.lastIndex=n,this.raw=o,this.text=o,this.url=o}function ib(i,e){if(!(this instanceof ib))return new ib(i,e);e||jvi(i)&&(e=i,i={}),this.__opts__=yze({},oTt,e),this.__schemas__=yze({},Qvi,i),this.__compiled__={},this.__tlds__=qvi,this.__tlds_replaced__=!1,this.re={},qme(this)}ib.prototype.add=function(e,t){return this.__schemas__[e]=t,qme(this),this};ib.prototype.set=function(e){return this.__opts__=yze(this.__opts__,e),this};ib.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&e.match(this.re.email_fuzzy)!==null)};ib.prototype.pretest=function(e){return this.re.pretest.test(e)};ib.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0};ib.prototype.match=function(e){let t=[],n=[],o=[],r=[],s,a,l;function c(h,f){return h?f?h.index!==f.index?h.index=f.lastIndex?h:f:h:f}if(!e.length)return null;if(this.re.schema_test.test(e))for(l=this.re.schema_search,l.lastIndex=0;(s=l.exec(e))!==null;)a=this.testSchemaAt(e,s[2],l.lastIndex),a&&n.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)r.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});let u=[0,0,0],d=0;for(;;){let h=[n[u[0]],r[u[1]],o[u[2]]],f=c(c(h[0],h[1]),h[2]);if(!f)break;if(f===h[0]?u[0]++:f===h[1]?u[1]++:u[2]++,f.index= 0x80 (not a basic code point)","invalid-input":"Invalid input"},wze=35,J1=Math.floor,xze=String.fromCharCode;function XD(i){throw new RangeError(Zvi[i])}function $vi(i,e){let t=[],n=i.length;for(;n--;)t[n]=e(i[n]);return t}function lTt(i,e){let t=i.split("@"),n="";t.length>1&&(n=t[0]+"@",i=t[1]),i=i.replace(Xvi,".");let o=i.split("."),r=$vi(o,e).join(".");return n+r}function cTt(i){let e=[],t=0,n=i.length;for(;t=55296&&o<=56319&&tString.fromCodePoint(...i),tyi=function(i){return i>=48&&i<58?26+(i-48):i>=65&&i<91?i-65:i>=97&&i<123?i-97:36},aTt=function(i,e){return i+22+75*(i<26)-((e!=0)<<5)},uTt=function(i,e,t){let n=0;for(i=t?J1(i/700):i>>1,i+=J1(i/e);i>wze*26>>1;n+=36)i=J1(i/wze);return J1(n+(wze+1)*i/(i+38))},dTt=function(i){let e=[],t=i.length,n=0,o=128,r=72,s=i.lastIndexOf("-");s<0&&(s=0);for(let a=0;a=128&&XD("not-basic"),e.push(i.charCodeAt(a));for(let a=s>0?s+1:0;a=t&&XD("invalid-input");let h=tyi(i.charCodeAt(a++));h>=36&&XD("invalid-input"),h>J1((2147483647-n)/u)&&XD("overflow"),n+=h*u;let f=d<=r?1:d>=r+26?26:d-r;if(hJ1(2147483647/p)&&XD("overflow"),u*=p}let c=e.length+1;r=uTt(n-l,c,l==0),J1(n/c)>2147483647-o&&XD("overflow"),o+=J1(n/c),n%=c,e.splice(n++,0,o)}return String.fromCodePoint(...e)},hTt=function(i){let e=[];i=cTt(i);let t=i.length,n=128,o=0,r=72;for(let l of i)l<128&&e.push(xze(l));let s=e.length,a=s;for(s&&e.push("-");a=n&&uJ1((2147483647-o)/c)&&XD("overflow"),o+=(l-n)*c,n=l;for(let u of i)if(u2147483647&&XD("overflow"),u===n){let d=o;for(let h=36;;h+=36){let f=h<=r?1:h>=r+26?26:h-r;if(d=0))try{e.hostname=Cze.toASCII(e.hostname)}catch{}return Mme(N4(e))}function uyi(i){let e=MQ(i,!0);if(e.hostname&&(!e.protocol||gTt.indexOf(e.protocol)>=0))try{e.hostname=Cze.toUnicode(e.hostname)}catch{}return NQ(N4(e),NQ.defaultChars+"%")}function w0(i,e){if(!(this instanceof w0))return new w0(i,e);e||Wme(i)||(e=i||{},i="default"),this.inline=new eTt,this.block=new KDt,this.core=new zDt,this.renderer=new MDt,this.linkify=new sTt,this.validateLink=lyi,this.normalizeLink=cyi,this.normalizeLinkText=uyi,this.utils=L7e,this.helpers=F4({},F7e),this.options={},this.configure(i),e&&this.set(e)}w0.prototype.set=function(i){return F4(this.options,i),this};w0.prototype.configure=function(i){let e=this;if(Wme(i)){let t=i;if(i=ryi[t],!i)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!i)throw new Error("Wrong `markdown-it` preset, can't be empty");return i.options&&e.set(i.options),i.components&&Object.keys(i.components).forEach(function(t){i.components[t].rules&&e[t].ruler.enableOnly(i.components[t].rules),i.components[t].rules2&&e[t].ruler2.enableOnly(i.components[t].rules2)}),this};w0.prototype.enable=function(i,e){let t=[];Array.isArray(i)||(i=[i]),["core","block","inline"].forEach(function(o){t=t.concat(this[o].ruler.enable(i,!0))},this),t=t.concat(this.inline.ruler2.enable(i,!0));let n=i.filter(function(o){return t.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};w0.prototype.disable=function(i,e){let t=[];Array.isArray(i)||(i=[i]),["core","block","inline"].forEach(function(o){t=t.concat(this[o].ruler.disable(i,!0))},this),t=t.concat(this.inline.ruler2.disable(i,!0));let n=i.filter(function(o){return t.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};w0.prototype.use=function(i){let e=[this].concat(Array.prototype.slice.call(arguments,1));return i.apply(i,e),this};w0.prototype.parse=function(i,e){if(typeof i!="string")throw new Error("Input data should be a String");let t=new this.core.State(i,this,e);return this.core.process(t),t.tokens};w0.prototype.render=function(i,e){return e=e||{},this.renderer.render(this.parse(i,e),this.options,e)};w0.prototype.parseInline=function(i,e){let t=new this.core.State(i,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};w0.prototype.renderInline=function(i,e){return e=e||{},this.renderer.render(this.parseInline(i,e),this.options,e)};var _ze=w0;var bTt=new _ze({breaks:!1,linkify:!0});mn();H6();xk();Ue();var ATt=ae(fo()),fv=ae(ke());function PQ(i){let e=(0,ATt.c)(26),{defaultSizeRelation:t,direction:n,initiallyHidden:o,onHiddenElementChange:r,sizeThresholdFirst:s,sizeThresholdSecond:a,storageKey:l}=i,c=t===void 0?1:t,u=s===void 0?100:s,d=a===void 0?100:a,h=Vo(dyi),f;e[0]!==o||e[1]!==h||e[2]!==l?(f=()=>{let z=l&&h.get(l);return z===Kme||o==="first"?"first":z===Jme||o==="second"?"second":null},e[0]=o,e[1]=h,e[2]=l,e[3]=f):f=e[3];let[p,g]=(0,fv.useState)(f),A=(0,fv.useRef)(null),v=(0,fv.useRef)(null),w=(0,fv.useRef)(null),C=(0,fv.useRef)(`${c}`),_;e[4]!==h||e[5]!==l?(_=()=>{let z=l&&h.get(l)||C.current;A.current&&(A.current.style.flex=z===Kme||z===Jme?C.current:z),w.current&&(w.current.style.flex="1")},e[4]=h,e[5]=l,e[6]=_):_=e[6];let E;e[7]!==n||e[8]!==h||e[9]!==l?(E=[n,h,l],e[7]=n,e[8]=h,e[9]=l,e[10]=E):E=e[10],(0,fv.useEffect)(_,E);let I,T;e[11]!==p||e[12]!==h||e[13]!==l?(I=()=>{let z=function(U){if(U.style.left="-1000px",U.style.position="absolute",U.style.opacity="0",!A.current)return;let M=parseFloat(A.current.style.flex);(!Number.isFinite(M)||M<1)&&(A.current.style.flex="1")},Q=function(U){if(U.style.left="",U.style.position="",U.style.opacity="",!l)return;let M=h.get(l);A.current&&M!==Kme&&M!==Jme&&(A.current.style.flex=M||C.current)};for(let Z of["first","second"]){let U=(Z==="first"?A:w).current;U&&(Z===p?z(U):Q(U))}},T=[p,h,l],e[11]=p,e[12]=h,e[13]=l,e[14]=I,e[15]=T):(I=e[14],T=e[15]),(0,fv.useEffect)(I,T);let N,L;e[16]!==n||e[17]!==r||e[18]!==u||e[19]!==d||e[20]!==h||e[21]!==l?(L=()=>{if(!v.current||!A.current||!w.current)return;let z=Wb(500,nt=>{l&&h.set(l,nt)}),Q=function(mt){g(xt=>mt===xt?xt:(r?.(mt),mt))},Z=v.current,U=A.current,M=U.parentElement,ee=n==="horizontal",X=ee?"clientX":"clientY",Y=ee?"left":"top",$=ee?"right":"bottom",re=ee?"clientWidth":"clientHeight",ue=function(mt){if(!(mt.target===mt.currentTarget))return;mt.preventDefault();let wt=mt[X]-Z.getBoundingClientRect()[Y],Ht=function(Fi){if(Fi.buttons===0)return Fe();let Kt=M.getBoundingClientRect(),Li=Fi[X]-Kt[Y]-wt,Bn=Kt[$]-Fi[X]+wt-Z[re];if(Li{Z.removeEventListener("mousedown",ue),Z.removeEventListener("dblclick",Ie)}},N=[n,r,u,d,h,l],e[16]=n,e[17]=r,e[18]=u,e[19]=d,e[20]=h,e[21]=l,e[22]=N,e[23]=L):(N=e[22],L=e[23]),(0,fv.useEffect)(L,N);let B;return e[24]!==p?(B={dragBarRef:v,hiddenElement:p,firstRef:A,setHiddenElement:g,secondRef:w},e[24]=p,e[25]=B):B=e[25],B}function dyi(i){return i.storage}var Kme="hide-first",Jme="hide-second";function vTt(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i))for(e=0;ehyi(i,"name",{value:e,configurable:!0}),yTt=!!(typeof window<"u"&&window.document&&window.document.createElement);function Kn(i,e,{checkForDefaultPrevented:t=!0}={}){return z4(function(o){if(i?.(o),t===!1||!o||!o.defaultPrevented)return e?.(o)},"handleEvent")}z4(Kn,"composeEventHandlers");function fyi(i){if(!yTt)throw new Error("Cannot access window outside of the DOM");return i?.ownerDocument?.defaultView??window}z4(fyi,"getOwnerWindow");function Sze(i){if(!yTt)throw new Error("Cannot access document outside of the DOM");return i?.ownerDocument??document}z4(Sze,"getOwnerDocument");function wTt(i,e=!1){let{activeElement:t}=Sze(i);if(!t?.nodeName)return null;if(xTt(t)&&t.contentDocument)return wTt(t.contentDocument.body,e);if(e){let n=t.getAttribute("aria-activedescendant");if(n){let o=Sze(t).getElementById(n);if(o)return o}}return t}z4(wTt,"getActiveElement");function xTt(i){return i.tagName==="IFRAME"}z4(xTt,"isFrame");var CTt=ae(ke(),1),pyi=Object.defineProperty,Dze=(i,e)=>pyi(i,"name",{value:e,configurable:!0});function Eze(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}Dze(Eze,"setRef");function _Tt(...i){return e=>{let t=!1,n=i.map(o=>{let r=Eze(o,e);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let o=0;omyi(i,"name",{value:e,configurable:!0});function gyi(i,e){let t=C0.createContext(e);t.displayName=i+"Context";let n=x0(r=>{let{children:s,...a}=r,l=C0.useMemo(()=>a,Object.values(a));return(0,Tze.jsx)(t.Provider,{value:l,children:s})},"Provider");n.displayName=i+"Provider";function o(r,s={}){let{optional:a=!1}=s,l=C0.useContext(t);if(l)return l;if(e!==void 0)return e;if(!a)throw new Error(`\`${r}\` must be used within \`${i}\``)}return x0(o,"useContext"),[n,o]}x0(gyi,"createContext");function Eh(i,e=[]){let t=[];function n(r,s){let a=C0.createContext(s);a.displayName=r+"Context";let l=t.length;t=[...t,s];let c=x0(d=>{let{scope:h,children:f,...p}=d,g=h?.[i]?.[l]||a,A=C0.useMemo(()=>p,Object.values(p));return(0,Tze.jsx)(g.Provider,{value:A,children:f})},"Provider");c.displayName=r+"Provider";function u(d,h,f={}){let{optional:p=!1}=f,g=h?.[i]?.[l]||a,A=C0.useContext(g);if(A)return A;if(s!==void 0)return s;if(!p)throw new Error(`\`${d}\` must be used within \`${r}\``)}return x0(u,"useContext"),[c,u]}x0(n,"createContext");let o=x0(()=>{let r=t.map(s=>C0.createContext(s));return x0(function(a){let l=a?.[i]||r;return C0.useMemo(()=>({[`__scope${i}`]:{...a,[i]:l}}),[a,l])},"useScope")},"createScope");return o.scopeName=i,[n,STt(o,...e)]}x0(Eh,"createContextScope");function STt(...i){let e=i[0];if(i.length===1)return e;let t=x0(()=>{let n=i.map(o=>({useScope:o(),scopeName:o.scopeName}));return x0(function(r){let s=n.reduce((a,{useScope:l,scopeName:c})=>{let d=l(r)[`__scope${c}`];return{...a,...d}},{});return C0.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return t.scopeName=e.scopeName,t}x0(STt,"composeContextScopes");var _0=ae(ke(),1);var Xme=!1;var ETt=ae(ke(),1),al=globalThis?.document?ETt.useLayoutEffect:()=>{};var pv=ae(ke(),1);var V4=ae(ke(),1),byi=Object.defineProperty,Ayi=(i,e)=>byi(i,"name",{value:e,configurable:!0}),DTt=V4[" useEffectEvent ".trim().toString()],TTt=V4[" useInsertionEffect ".trim().toString()];function kze(i){if(typeof DTt=="function")return DTt(i);let e=V4.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof TTt=="function"?TTt(()=>{e.current=i}):al(()=>{e.current=i}),V4.useMemo(()=>((...t)=>e.current?.(...t)),[])}Ayi(kze,"useEffectEvent");var vyi=Object.defineProperty,BQ=(i,e)=>vyi(i,"name",{value:e,configurable:!0}),yyi=_0[" useInsertionEffect ".trim().toString()]||al;function qC({prop:i,defaultProp:e,onChange:t=BQ(()=>{},"onChange"),caller:n}){let[o,r,s]=ITt({defaultProp:e,onChange:t}),a=i!==void 0,l=a?i:o;if(Xme){let u=_0.useRef(i!==void 0);_0.useEffect(()=>{let d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}let c=_0.useCallback(u=>{if(a){let d=LTt(u)?u(i):u;d!==i&&s.current?.(d)}else r(u)},[a,i,r,s]);return[l,c]}BQ(qC,"useControllableState");function ITt({defaultProp:i,onChange:e}){let[t,n]=_0.useState(i),o=_0.useRef(t),r=_0.useRef(e);return yyi(()=>{r.current=e},[e]),_0.useEffect(()=>{o.current!==t&&(r.current?.(t),o.current=t)},[t,o]),[t,n,r]}BQ(ITt,"useUncontrolledState");function LTt(i){return typeof i=="function"}BQ(LTt,"isFunction");var kTt=Symbol("RADIX:SYNC_STATE");function wyi(i,e,t,n){let{prop:o,defaultProp:r,onChange:s,caller:a}=e,l=o!==void 0,c=kze(s);if(Xme){let A=pv.useRef(o!==void 0);pv.useEffect(()=>{let v=A.current;v!==l&&console.warn(`${a} is changing from ${v?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),A.current=l},[l,a])}let u=[{...t,state:r}];n&&u.push(n);let[d,h]=pv.useReducer((A,v)=>{if(v.type===kTt)return{...A,state:v.state};let w=i(A,v);return l&&!Object.is(w.state,A.state)&&c(w.state),w},...u),f=d.state,p=pv.useRef(f);pv.useEffect(()=>{p.current!==f&&(p.current=f,l||c(f))},[f,p,l]);let g=pv.useMemo(()=>o!==void 0?{...d,state:o}:d,[d,o]);return pv.useEffect(()=>{l&&!Object.is(o,d.state)&&h({type:kTt,state:o})},[o,d.state,l]),[g,h]}BQ(wyi,"useControllableStateReducer");var HTt=ae(ke(),1),WTt=ae(mv(),1);var Dh=ae(ke(),1);var Syi=Object.defineProperty,gv=(i,e)=>Syi(i,"name",{value:e,configurable:!0});function nb(i){let e=Dh.forwardRef((t,n)=>{let{children:o,...r}=t,s=null,a=!1,l=[];Ize(o)&&typeof $me=="function"&&(o=$me(o._payload)),Dh.Children.forEach(o,h=>{if(zTt(h)){a=!0;let f=h,p="child"in f.props?f.props.child:f.props.children;Ize(p)&&typeof $me=="function"&&(p=$me(p._payload)),s=Eyi(f,p),l.push(s?.props?.children)}else l.push(h)}),s?s=Dh.cloneElement(s,void 0,l):!a&&Dh.Children.count(o)===1&&Dh.isValidElement(o)&&(s=o);let c=s?BTt(s):void 0,u=Fr(n,c);if(!s){if(o||o===0)throw new Error(a?kyi(i):Tyi(i));return o}let d=PTt(r,s.props??{});return s.type!==Dh.Fragment&&(d.ref=n?u:c),Dh.cloneElement(s,d)});return e.displayName=`${i}.Slot`,e}gv(nb,"createSlot");var OTt=Symbol.for("radix.slottable");function Lze(i){let e=gv(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${i}.Slottable`,e.__radixId=OTt,e}gv(Lze,"createSlottable");var Eyi=gv((i,e)=>{if("child"in i.props){let t=i.props.child;return Dh.isValidElement(t)?Dh.cloneElement(t,void 0,i.props.children(t.props.children)):null}return Dh.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function PTt(i,e){let t={...e};for(let n in e){let o=i[n],r=e[n];/^on[A-Z]/.test(n)?o&&r?t[n]=(...a)=>{let l=r(...a);return o(...a),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...r}:n==="className"&&(t[n]=[o,r].filter(Boolean).join(" "))}return{...i,...t}}gv(PTt,"mergeProps");function BTt(i){let e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=Object.getOwnPropertyDescriptor(i,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}gv(BTt,"getElementRef");function zTt(i){return Dh.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===OTt}gv(zTt,"isSlottable");var Dyi=Symbol.for("react.lazy");function Ize(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===Dyi&&"_payload"in i&&VTt(i._payload)}gv(Ize,"isLazyComponent");function VTt(i){return typeof i=="object"&&i!==null&&"then"in i}gv(VTt,"isPromiseLike");var Tyi=gv(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),kyi=gv(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),$me=Dh[" use ".trim().toString()];var UTt=ae(zi(),1),Iyi=Object.defineProperty,Lyi=(i,e)=>Iyi(i,"name",{value:e,configurable:!0}),Nyi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ea=Nyi.reduce((i,e)=>{let t=nb(`Primitive.${e}`),n=HTt.forwardRef((o,r)=>{let{asChild:s,...a}=o,l=s?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,UTt.jsx)(l,{...a,ref:r})});return n.displayName=`Primitive.${e}`,{...i,[e]:n}},{});function VQ(i,e){i&&WTt.flushSync(()=>i.dispatchEvent(e))}Lyi(VQ,"dispatchDiscreteCustomEvent");var vo=ae(ke(),1);var bv=ae(ke(),1);var ege=ae(zi(),1),Mm=ae(ke(),1);var U2=ae(zi(),1),Myi=Object.defineProperty,Pd=(i,e)=>Myi(i,"name",{value:e,configurable:!0});function HQ(i){let e=i+"CollectionProvider",[t,n]=Eh(e),[o,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),s=Pd(g=>{let{scope:A,children:v}=g,w=bv.useRef(null),C=bv.useRef(new Map).current;return(0,ege.jsx)(o,{scope:A,itemMap:C,collectionRef:w,children:v})},"CollectionProvider");s.displayName=e;let a=i+"CollectionSlot",l=nb(a),c=bv.forwardRef((g,A)=>{let{scope:v,children:w}=g,C=r(a,v),_=Fr(A,C.collectionRef);return(0,ege.jsx)(l,{ref:_,children:w})});c.displayName=a;let u=i+"CollectionItemSlot",d="data-radix-collection-item",h=nb(u),f=bv.forwardRef((g,A)=>{let{scope:v,children:w,...C}=g,_=bv.useRef(null),E=Fr(A,_),I=r(u,v);return bv.useEffect(()=>(I.itemMap.set(_,{ref:_,...C}),()=>{I.itemMap.delete(_)})),(0,ege.jsx)(h,{[d]:"",ref:E,children:w})});f.displayName=u;function p(g){let A=r(i+"CollectionConsumer",g);return bv.useCallback(()=>{let w=A.collectionRef.current;if(!w)return[];let C=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(A.itemMap.values()).sort((I,T)=>C.indexOf(I.ref.current)-C.indexOf(T.ref.current))},[A.collectionRef,A.itemMap])}return Pd(p,"useCollection"),[{Provider:s,Slot:c,ItemSlot:f},p,n]}Pd(HQ,"createCollection");var jTt=new WeakMap,Nze=class $D extends Map{static{Pd(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],jTt.set(this,!0)}set(e,t){return jTt.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let o=this.has(t),r=this.#e.length,s=Rze(e),a=s>=0?s:r+s,l=a<0||a>=r?-1:a;if(l===this.size||o&&l===this.size-1||l===-1)return this.set(t,n),this;let c=this.size+(o?0:1);s<0&&a++;let u=[...this.#e],d,h=!1;for(let f=a;f=this.size&&(o=this.size-1),this.at(o)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(e,t){let n=0;for(let o of this){if(Reflect.apply(e,t,[o,n,this]))return o;n++}}findIndex(e,t){let n=0;for(let o of this){if(Reflect.apply(e,t,[o,n,this]))return n;n++}return-1}filter(e,t){let n=[],o=0;for(let r of this)Reflect.apply(e,t,[r,o,this])&&n.push(r),o++;return new $D(n)}map(e,t){let n=[],o=0;for(let r of this)n.push([r[0],Reflect.apply(e,t,[r,o,this])]),o++;return new $D(n)}reduce(...e){let[t,n]=e,o=0,r=n??this.at(0);for(let s of this)o===0&&e.length===1?r=s:r=Reflect.apply(t,this,[r,s,o,this]),o++;return r}reduceRight(...e){let[t,n]=e,o=n??this.at(-1);for(let r=this.size-1;r>=0;r--){let s=this.at(r);r===this.size-1&&e.length===1?o=s:o=Reflect.apply(t,this,[o,s,r,this])}return o}toSorted(e){let t=[...this.entries()].sort(e);return new $D(t)}toReversed(){let e=new $D;for(let t=this.size-1;t>=0;t--){let n=this.keyAt(t),o=this.get(n);e.set(n,o)}return e}toSpliced(...e){let t=[...this.entries()];return t.splice(...e),new $D(t)}slice(e,t){let n=new $D,o=this.size-1;if(e===void 0)return n;e<0&&(e=e+this.size),t!==void 0&&t>0&&(o=t-1);for(let r=e;r<=o;r++){let s=this.keyAt(r),a=this.get(s);n.set(s,a)}return n}every(e,t){let n=0;for(let o of this){if(!Reflect.apply(e,t,[o,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let o of this){if(Reflect.apply(e,t,[o,n,this]))return!0;n++}return!1}};function tge(i,e){if("at"in Array.prototype)return Array.prototype.at.call(i,e);let t=QTt(i,e);return t===-1?void 0:i[t]}Pd(tge,"at");function QTt(i,e){let t=i.length,n=Rze(e),o=n>=0?n:t+n;return o<0||o>=t?-1:o}Pd(QTt,"toSafeIndex");function Rze(i){return i!==i||i===0?0:Math.trunc(i)}Pd(Rze,"toSafeInteger");function Ryi(i){let e=i+"CollectionProvider",[t,n]=Eh(e),[o,r]=t(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Nze,setItemMap:Pd(()=>{},"setItemMap")}),s=Pd(({state:C,..._})=>C?(0,U2.jsx)(l,{..._,state:C}):(0,U2.jsx)(a,{..._}),"CollectionProvider");s.displayName=e;let a=Pd(C=>{let _=A();return(0,U2.jsx)(l,{...C,state:_})},"CollectionInit");a.displayName=e+"Init";let l=Pd(C=>{let{scope:_,children:E,state:I}=C,T=Mm.useRef(null),[N,L]=Mm.useState(null),B=Fr(T,L),[z,Q]=I;return Mm.useEffect(()=>{if(!N)return;let Z=YTt(()=>{});return Z.observe(N,{childList:!0,subtree:!0}),()=>{Z.disconnect()}},[N]),(0,U2.jsx)(o,{scope:_,itemMap:z,setItemMap:Q,collectionRef:B,collectionRefObject:T,collectionElement:N,children:E})},"CollectionProviderImpl");l.displayName=e+"Impl";let c=i+"CollectionSlot",u=nb(c),d=Mm.forwardRef((C,_)=>{let{scope:E,children:I}=C,T=r(c,E),N=Fr(_,T.collectionRef);return(0,U2.jsx)(u,{ref:N,children:I})});d.displayName=c;let h=i+"CollectionItemSlot",f="data-radix-collection-item",p=nb(h),g=Mm.forwardRef((C,_)=>{let{scope:E,children:I,...T}=C,N=Mm.useRef(null),[L,B]=Mm.useState(null),z=Fr(_,N,B),Q=r(h,E),{setItemMap:Z}=Q,U=Mm.useRef(T);GTt(U.current,T)||(U.current=T);let M=U.current;return Mm.useEffect(()=>{let ee=M;return Z(X=>L?X.has(L)?X.set(L,{...ee,element:L}).toSorted(Mze):(X.set(L,{...ee,element:L}),X.toSorted(Mze)):X),()=>{Z(X=>!L||!X.has(L)?X:(X.delete(L),new Nze(X)))}},[L,M,Z]),(0,U2.jsx)(p,{[f]:"",ref:z,children:I})});g.displayName=h;function A(){return Mm.useState(new Nze)}Pd(A,"useInitCollection");function v(C){let{itemMap:_}=r(i+"CollectionConsumer",C);return _}return Pd(v,"useCollection"),[{Provider:s,Slot:d,ItemSlot:g},{createCollectionScope:n,useCollection:v,useInitCollection:A}]}Pd(Ryi,"createCollection");function GTt(i,e){if(i===e)return!0;if(typeof i!="object"||typeof e!="object"||i==null||e==null)return!1;let t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(let o of t)if(!Object.prototype.hasOwnProperty.call(e,o)||i[o]!==e[o])return!1;return!0}Pd(GTt,"shallowEqual");function qTt(i,e){return!!(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}Pd(qTt,"isElementPreceding");function Mze(i,e){return!i[1].element||!e[1].element?0:qTt(i[1].element,e[1].element)?-1:1}Pd(Mze,"sortByDocumentPosition");function YTt(i){return new MutationObserver(t=>{for(let n of t)if(n.type==="childList"){i();return}})}Pd(YTt,"getChildListObserver");var ige=ae(ke(),1),Pyi=ae(zi(),1),Fyi=Object.defineProperty,Oyi=(i,e)=>Fyi(i,"name",{value:e,configurable:!0}),Byi=ige.createContext(void 0);function WQ(i){let e=ige.useContext(Byi);return i||e||"ltr"}Oyi(WQ,"useDirection");var Hs=ae(ke(),1);var H4=ae(ke(),1),zyi=Object.defineProperty,Vyi=(i,e)=>zyi(i,"name",{value:e,configurable:!0});function Rm(i){let e=H4.useRef(i);return H4.useEffect(()=>{e.current=i}),H4.useMemo(()=>((...t)=>e.current?.(...t)),[])}Vyi(Rm,"useCallbackRef");var JTt=ae(zi(),1),Hyi=Object.defineProperty,Bd=(i,e)=>Hyi(i,"name",{value:e,configurable:!0}),Fze="dismissableLayer.update",Wyi="dismissableLayer.pointerDownOutside",Uyi="dismissableLayer.focusOutside",KTt,XTt=Hs.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),W4=Hs.forwardRef(Bd(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=Hs.useContext(XTt),[h,f]=Hs.useState(null),p=h?.ownerDocument??globalThis?.document,[,g]=Hs.useState({}),A=Fr(t,f),v=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=w?v.indexOf(w):-1,_=h?v.indexOf(h):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,I=_>=C,T=Hs.useRef(!1),N=ZTt(Q=>{s?.(Q),l?.(Q),Q.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:Hs.useCallback(Q=>{if(!(Q instanceof Node))return!1;let Z=[...d.branches].some(U=>U.contains(Q));return I&&!Z},[d.branches,I])}),L=$Tt(Q=>{if(o&&T.current)return;let Z=Q.target;[...d.branches].some(M=>M.contains(Z))||(a?.(Q),l?.(Q),Q.defaultPrevented||c?.())},p),B=h?_===v.length-1:!1,z=Rm(Q=>{Q.key==="Escape"&&(r?.(Q),!Q.defaultPrevented&&c&&(Q.preventDefault(),c()))});return Hs.useEffect(()=>{if(B)return p.addEventListener("keydown",z,{capture:!0}),()=>p.removeEventListener("keydown",z,{capture:!0})},[p,B,z]),Hs.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(KTt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Oze(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(h),d.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=KTt))}},[h,p,n,d]),Hs.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Oze())},[h,d]),Hs.useEffect(()=>{let Q=Bd(()=>g({}),"handleUpdate");return document.addEventListener(Fze,Q),()=>document.removeEventListener(Fze,Q)},[]),(0,JTt.jsx)(Ea.div,{...u,ref:A,style:{pointerEvents:E?I?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,N.onPointerDownCapture)})},"DismissableLayer"));function Pze(){let i=Hs.useContext(XTt),[e,t]=Hs.useState(null);return Hs.useEffect(()=>{if(e)return i.dismissableSurfaces.add(e),()=>{i.dismissableSurfaces.delete(e)}},[e,i.dismissableSurfaces]),t}Bd(Pze,"useDismissableLayerSurface");var jyi=Bd(()=>!0,"IS_TRUE");function ZTt(i,e){let{ownerDocument:t=globalThis?.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:r,shouldHandlePointerDownOutside:s=jyi}=e,a=Rm(i),l=Hs.useRef(!1),c=Hs.useRef(!1),u=Hs.useRef(new Map),d=Hs.useRef(()=>{});return Hs.useEffect(()=>{function h(){c.current=!1,o.current=!1,u.current.clear()}Bd(h,"resetOutsideInteraction");function f(){return Array.from(u.current.values()).some(Boolean)}Bd(f,"isOutsideInteractionIntercepted");function p(C){if(!c.current)return;let _=C.target;_ instanceof Node&&[...r].some(I=>I.contains(_))||u.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{c.current&&d.current()},0)}Bd(p,"handleInteractionCapture");function g(C){c.current&&u.current.set(C.type,!1)}Bd(g,"handleInteractionBubble");let A=Bd(C=>{if(C.target&&!l.current){let E=function(){t.removeEventListener("click",d.current);let T=f();h(),T||Bze(Wyi,a,I,{discrete:!0})};var _=E;if(Bd(E,"handleAndDispatchPointerDownOutsideEvent"),!s(C.target)){t.removeEventListener("click",d.current),h(),l.current=!1;return}let I={originalEvent:C};c.current=!0,o.current=n&&C.button===0,u.current.clear(),!n||C.button!==0?E():(t.removeEventListener("click",d.current),d.current=E,t.addEventListener("click",d.current,{once:!0}))}else t.removeEventListener("click",d.current),h();l.current=!1},"handlePointerDown"),v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let C of v)t.addEventListener(C,p,!0),t.addEventListener(C,g);let w=window.setTimeout(()=>{t.addEventListener("pointerdown",A)},0);return()=>{window.clearTimeout(w),t.removeEventListener("pointerdown",A),t.removeEventListener("click",d.current);for(let C of v)t.removeEventListener(C,p,!0),t.removeEventListener(C,g)}},[t,a,n,o,r,s]),{onPointerDownCapture:Bd(()=>l.current=!0,"onPointerDownCapture")}}Bd(ZTt,"usePointerDownOutside");function $Tt(i,e=globalThis?.document){let t=Rm(i),n=Hs.useRef(!1);return Hs.useEffect(()=>{let o=Bd(r=>{r.target&&!n.current&&Bze(Uyi,t,{originalEvent:r},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,t]),{onFocusCapture:Bd(()=>n.current=!0,"onFocusCapture"),onBlurCapture:Bd(()=>n.current=!1,"onBlurCapture")}}Bd($Tt,"useFocusOutside");function Oze(){let i=new CustomEvent(Fze);document.dispatchEvent(i)}Bd(Oze,"dispatchUpdate");function Bze(i,e,t,{discrete:n}){let o=t.originalEvent.target,r=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:t});e&&o.addEventListener(i,e,{once:!0}),n?VQ(o,r):o.dispatchEvent(r)}Bd(Bze,"handleAndDispatchCustomEvent");var ekt=ae(ke(),1),Qyi=Object.defineProperty,Vze=(i,e)=>Qyi(i,"name",{value:e,configurable:!0}),nge=0,U4=null;function Gyi(i){return j4(),i.children}Vze(Gyi,"FocusGuards");function j4(){ekt.useEffect(()=>{U4||(U4={start:zze(),end:zze()});let{start:i,end:e}=U4;return document.body.firstElementChild!==i&&document.body.insertAdjacentElement("afterbegin",i),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),nge++,()=>{nge===1&&(U4?.start.remove(),U4?.end.remove(),U4=null),nge=Math.max(0,nge-1)}},[])}Vze(j4,"useFocusGuards");function zze(){let i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}Vze(zze,"createFocusGuard");var S0=ae(ke(),1);var nkt=ae(zi(),1),qyi=Object.defineProperty,Dp=(i,e)=>qyi(i,"name",{value:e,configurable:!0}),Hze="focusScope.autoFocusOnMount",Wze="focusScope.autoFocusOnUnmount",tkt={bubbles:!1,cancelable:!0},oge=S0.forwardRef(Dp(function(e,t){let{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[l,c]=S0.useState(null),u=Rm(r),d=Rm(s),h=S0.useRef(null),f=Fr(t,c),p=S0.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S0.useEffect(()=>{if(o){let C=function(T){if(p.paused||!l)return;let N=T.target;l.contains(N)?h.current=N:YC(h.current,{select:!0})},_=function(T){if(p.paused||!l)return;let N=T.relatedTarget;N!==null&&(l.contains(N)||YC(h.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(let L of T)L.removedNodes.length>0&&YC(l)};var A=C,v=_,w=E;Dp(C,"handleFocusIn"),Dp(_,"handleFocusOut"),Dp(E,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",_);let I=new MutationObserver(E);return l&&I.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",_),I.disconnect()}}},[o,l,p.paused]),S0.useEffect(()=>{if(l){ikt.add(p);let A=document.activeElement;if(!l.contains(A)){let w=new CustomEvent(Hze,tkt);l.addEventListener(Hze,u),l.dispatchEvent(w),w.defaultPrevented||(okt(ckt(Qze(l)),{select:!0}),document.activeElement===A&&YC(l))}return()=>{l.removeEventListener(Hze,u),setTimeout(()=>{let w=new CustomEvent(Wze,tkt);l.addEventListener(Wze,d),l.dispatchEvent(w),w.defaultPrevented||YC(A??document.body,{select:!0}),l.removeEventListener(Wze,d),ikt.remove(p)},0)}}},[l,u,d,p]);let g=S0.useCallback(A=>{if(!n&&!o||p.paused)return;let v=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,w=document.activeElement;if(v&&w){let C=A.currentTarget,[_,E]=rkt(C);_&&E?!A.shiftKey&&w===E?(A.preventDefault(),n&&YC(_,{select:!0})):A.shiftKey&&w===_&&(A.preventDefault(),n&&YC(E,{select:!0})):w===C&&A.preventDefault()}},[n,o,p.paused]);return(0,nkt.jsx)(Ea.div,{tabIndex:-1,...a,ref:f,onKeyDown:g})},"FocusScope"));function okt(i,{select:e=!1}={}){let t=document.activeElement;for(let n of i)if(YC(n,{select:e}),document.activeElement!==t)return}Dp(okt,"focusFirst");function rkt(i){let e=Qze(i),t=Uze(e,i),n=Uze(e.reverse(),i);return[t,n]}Dp(rkt,"getTabbableEdges");function Qze(i){let e=[],t=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:Dp(n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;t.nextNode();)e.push(t.currentNode);return e}Dp(Qze,"getTabbableCandidates");function Uze(i,e){let t=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(let n of i)if(!(t?!n.checkVisibility({checkVisibilityCSS:!0}):skt(n,{upTo:e})))return n}Dp(Uze,"findVisible");function skt(i,{upTo:e}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(e!==void 0&&i===e)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}Dp(skt,"isHidden");function akt(i){return i instanceof HTMLInputElement&&"select"in i}Dp(akt,"isSelectableInput");function YC(i,{select:e=!1}={}){if(i&&i.focus){let t=document.activeElement;i.focus({preventScroll:!0}),i!==t&&akt(i)&&e&&i.select()}}Dp(YC,"focus");var ikt=lkt();function lkt(){let i=[];return{add(e){let t=i[0];e!==t&&t?.pause(),i=jze(i,e),i.unshift(e)},remove(e){i=jze(i,e),i[0]?.resume()}}}Dp(lkt,"createFocusScopesStack");function jze(i,e){let t=[...i],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}Dp(jze,"arrayRemove");function ckt(i){return i.filter(e=>e.tagName!=="A")}Dp(ckt,"removeLinks");var Gze=ae(ke(),1);var Yyi=Object.defineProperty,Kyi=(i,e)=>Yyi(i,"name",{value:e,configurable:!0}),Jyi=Gze[" useId ".trim().toString()]||(()=>{}),Xyi=0;function E0(i){let[e,t]=Gze.useState(Jyi());return al(()=>{i||t(n=>n??String(Xyi++))},[i]),i||(e?`radix-${e}`:"")}Kyi(E0,"useId");var Df=ae(ke(),1);var hkt=["top","right","bottom","left"];var D0=Math.min,Tp=Math.max,j2=Math.round,Q4=Math.floor,X1=i=>({x:i,y:i}),Zyi={left:"right",right:"left",bottom:"top",top:"bottom"};function qze(i,e,t){return Tp(i,D0(e,t))}function T0(i,e){return typeof i=="function"?i(e):i}function KC(i){return i.split("-")[0]}function Q2(i){return i.split("-")[1]}function sge(i){return i==="x"?"y":"x"}function age(i){return i==="y"?"height":"width"}function Av(i){let e=i[0];return e==="t"||e==="b"?"y":"x"}function lge(i){return sge(Av(i))}function fkt(i,e,t){t===void 0&&(t=!1);let n=Q2(i),o=lge(i),r=age(o),s=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=UQ(s)),[s,UQ(s)]}function pkt(i){let e=UQ(i);return[rge(i),e,rge(e)]}function rge(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ukt=["left","right"],dkt=["right","left"],$yi=["top","bottom"],e1i=["bottom","top"];function t1i(i,e,t){switch(i){case"top":case"bottom":return t?e?dkt:ukt:e?ukt:dkt;case"left":case"right":return e?$yi:e1i;default:return[]}}function mkt(i,e,t,n){let o=Q2(i),r=t1i(KC(i),t==="start",n);return o&&(r=r.map(s=>s+"-"+o),e&&(r=r.concat(r.map(rge)))),r}function UQ(i){let e=KC(i);return Zyi[e]+i.slice(e.length)}function i1i(i){var e,t,n,o;return{top:(e=i.top)!=null?e:0,right:(t=i.right)!=null?t:0,bottom:(n=i.bottom)!=null?n:0,left:(o=i.left)!=null?o:0}}function Yze(i){return typeof i!="number"?i1i(i):{top:i,right:i,bottom:i,left:i}}function G2(i){let{x:e,y:t,width:n,height:o}=i;return{width:n,height:o,top:t,left:e,right:e+n,bottom:t+o,x:e,y:t}}function gkt(i,e,t){let{reference:n,floating:o}=i,r=Av(e),s=lge(e),a=age(s),l=KC(e),c=r==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2,f;switch(l){case"top":f={x:u,y:n.y-o.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-o.width,y:d};break;default:f={x:n.x,y:n.y}}let p=Q2(e);return p&&(f[s]+=h*(p==="end"?1:-1)*(t&&c?-1:1)),f}async function Kze(i,e){var t;e===void 0&&(e={});let{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=T0(e,i),p=Yze(f),A=a[h?d==="floating"?"reference":"floating":d],v=G2(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(A)))==null||t?A:A.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),_=await(r.isElement==null?void 0:r.isElement(C))&&await(r.getScale==null?void 0:r.getScale(C))||{x:1,y:1},E=G2(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:C,strategy:l}):w);return{top:(v.top-E.top+p.top)/_.y,bottom:(E.bottom-v.bottom+p.bottom)/_.y,left:(v.left-E.left+p.left)/_.x,right:(E.right-v.right+p.right)/_.x}}var n1i=50,vkt=async(i,e,t)=>{let{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=t,a=s.detectOverflow?s:{...s,detectOverflow:Kze},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:i,floating:e,strategy:o}),{x:u,y:d}=gkt(c,n,l),h=n,f=0,p={};for(let g=0;g({name:"arrow",options:i,async fn(e){let{x:t,y:n,placement:o,rects:r,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=T0(i,e)||{};if(c==null)return{};let d=Yze(u),h={x:t,y:n},f=lge(o),p=age(f),g=await s.getDimensions(c),A=f==="y",v=A?"top":"left",w=A?"bottom":"right",C=A?"clientHeight":"clientWidth",_=r.reference[p]+r.reference[f]-h[f]-r.floating[p],E=h[f]-r.reference[f],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),T=I?I[C]:0;(!T||!await(s.isElement==null?void 0:s.isElement(I)))&&(T=a.floating[C]||r.floating[p]);let N=_/2-E/2,L=T/2-g[p]/2-1,B=D0(d[v],L),z=D0(d[w],L),Q=T-g[p]-z,Z=T/2-g[p]/2+N,U=qze(B,Z,Q),M=!l.arrow&&Q2(o)!=null&&Z!==U&&r.reference[p]/2-(ZU<=0)){var z,Q;let U=(((z=r.flip)==null?void 0:z.index)||0)+1,M=T[U];if(M&&(!(d==="alignment"?w!==Av(M):!1)||B.every(Y=>Av(Y.placement)===w?Y.overflows[0]>0:!0)))return{data:{index:U,overflows:B},reset:{placement:M}};let ee=(Q=B.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:Q.placement;if(!ee)switch(f){case"bestFit":{var Z;let X=(Z=B.filter(Y=>{if(I){let $=Av(Y.placement);return $===w||$==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter($=>$>0).reduce(($,re)=>$+re,0)]).sort((Y,$)=>Y[1]-$[1])[0])==null?void 0:Z[0];X&&(ee=X);break}case"initialPlacement":ee=a;break}if(o!==ee)return{reset:{placement:ee}}}return{}}}};function bkt(i,e){return{top:i.top-e.height,right:i.right-e.width,bottom:i.bottom-e.height,left:i.left-e.width}}function Akt(i){return hkt.some(e=>i[e]>=0)}var xkt=function(i){return i===void 0&&(i={}),{name:"hide",options:i,async fn(e){let{rects:t,platform:n}=e,{strategy:o="referenceHidden",...r}=T0(i,e);switch(o){case"referenceHidden":{let s=await n.detectOverflow(e,{...r,elementContext:"reference"}),a=bkt(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Akt(a)}}}case"escaped":{let s=await n.detectOverflow(e,{...r,altBoundary:!0}),a=bkt(s,t.floating);return{data:{escapedOffsets:a,escaped:Akt(a)}}}default:return{}}}}};var Ckt=new Set(["left","top"]);async function o1i(i,e){let{placement:t,platform:n,elements:o}=i,r=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=KC(t),a=Q2(t),l=Av(t)==="y",c=Ckt.has(s)?-1:1,u=r&&l?-1:1,d=T0(e,i),{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}var _kt=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){var t,n;let{x:o,y:r,placement:s,middlewareData:a}=e,l=await o1i(e,i);return s===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}},Skt=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:n,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:C,y:_}=w;return{x:C,y:_}}},...c}=T0(i,e),u={x:t,y:n},d=await r.detectOverflow(e,c),h=Av(o),f=sge(h),p=u[f],g=u[h],A=(w,C)=>qze(C+d[w==="y"?"top":"left"],C,C-d[w==="y"?"bottom":"right"]);s&&(p=A(f,p)),a&&(g=A(h,g));let v=l.fn({...e,[f]:p,[h]:g});return{...v,data:{x:v.x-t,y:v.y-n,enabled:{[f]:s,[h]:a}}}}}},Ekt=function(i){return i===void 0&&(i={}),{options:i,fn(e){var t,n;let{x:o,y:r,placement:s,rects:a,middlewareData:l}=e,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=T0(i,e),h={x:o,y:r},f=Av(s),p=sge(f),g=h[p],A=h[f],v=T0(c,e),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(t=v.mainAxis)!=null?t:0,crossAxis:(n=v.crossAxis)!=null?n:0};if(u){let E=p==="y"?"height":"width",I=a.reference[p]-a.floating[E]+w.mainAxis,T=a.reference[p]+a.reference[E]-w.mainAxis;gT&&(g=T)}if(d){var C,_;let E=p==="y"?"width":"height",I=Ckt.has(KC(s)),T=a.reference[f]-a.floating[E]+(I&&((C=l.offset)==null?void 0:C[f])||0)+(I?0:w.crossAxis),N=a.reference[f]+a.reference[E]+(I?0:((_=l.offset)==null?void 0:_[f])||0)-(I?w.crossAxis:0);AN&&(A=N)}return{[p]:g,[f]:A}}}},Dkt=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(e){let{placement:t,rects:n,platform:o,elements:r}=e,{apply:s=()=>{},...a}=T0(i,e),l=await o.detectOverflow(e,a),c=KC(t),u=Q2(t),d=Av(t)==="y",{width:h,height:f}=n.floating,p,g;c==="top"||c==="bottom"?(p=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(r.floating))?"start":"end")?"left":"right"):(g=c,p=u==="end"?"top":"bottom");let A=f-l.top-l.bottom,v=h-l.left-l.right,w=D0(f-l[p],A),C=D0(h-l[g],v),_=e.middlewareData.shift,E=!_,I=w,T=C;_!=null&&_.enabled.x&&(T=v),_!=null&&_.enabled.y&&(I=A),E&&!u&&(d?T=h-2*Tp(l.left,l.right):I=f-2*Tp(l.top,l.bottom)),await s({...e,availableWidth:T,availableHeight:I});let N=await o.getDimensions(r.floating);return h!==N.width||f!==N.height?{reset:{rects:!0}}:{}}}};function cge(){return typeof window<"u"}function eT(i){return kkt(i)?(i.nodeName||"").toLowerCase():"#document"}function Sf(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function Z1(i){var e;return(e=(kkt(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function kkt(i){return cge()?i instanceof Node||i instanceof Sf(i).Node:!1}function Ef(i){return cge()?i instanceof Element||i instanceof Sf(i).Element:!1}function $1(i){return cge()?i instanceof HTMLElement||i instanceof Sf(i).HTMLElement:!1}function Tkt(i){return!cge()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Sf(i).ShadowRoot}function jQ(i){let{overflow:e,overflowX:t,overflowY:n,display:o}=k0(i);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&o!=="inline"&&o!=="contents"}function Ikt(i){return/^(table|td|th)$/.test(eT(i))}function QQ(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var r1i=/transform|translate|scale|rotate|perspective|filter/,s1i=/paint|layout|strict|content/,q2=i=>!!i&&i!=="none",Jze;function uge(i){let e=Ef(i)?k0(i):i;return q2(e.transform)||q2(e.translate)||q2(e.scale)||q2(e.rotate)||q2(e.perspective)||!GQ()&&(q2(e.backdropFilter)||q2(e.filter))||r1i.test(e.willChange||"")||s1i.test(e.contain||"")}function Lkt(i){let e=JC(i);for(;$1(e)&&!Y2(e);){if(uge(e))return e;if(QQ(e))return null;e=JC(e)}return null}function GQ(){return Jze==null&&(Jze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jze}function Y2(i){return/^(html|body|#document)$/.test(eT(i))}function k0(i){return Sf(i).getComputedStyle(i)}function qQ(i){return Ef(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function JC(i){if(eT(i)==="html")return i;let e=i.assignedSlot||i.parentNode||Tkt(i)&&i.host||Z1(i);return Tkt(e)?e.host:e}function Nkt(i){let e=JC(i);return Y2(e)?(i.ownerDocument||i).body:$1(e)&&jQ(e)?e:Nkt(e)}function XC(i,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);let o=Nkt(i),r=o===((n=i.ownerDocument)==null?void 0:n.body),s=Sf(o);if(r){let a=dge(s);return e.concat(s,s.visualViewport||[],jQ(o)?o:[],a&&t?XC(a):[])}else return e.concat(o,XC(o,[],t))}function dge(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Fkt(i){let e=k0(i),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,o=$1(i),r=o?i.offsetWidth:t,s=o?i.offsetHeight:n,a=j2(t)!==r||j2(n)!==s;return a&&(t=r,n=s),{width:t,height:n,$:a}}function Zze(i){return Ef(i)?i:i.contextElement}function G4(i){let e=Zze(i);if(!$1(e))return X1(1);let t=e.getBoundingClientRect(),{width:n,height:o,$:r}=Fkt(e),s=(r?j2(t.width):t.width)/n,a=(r?j2(t.height):t.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var a1i=X1(0);function Okt(i){let e=Sf(i);return!GQ()||!e.visualViewport?a1i:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function l1i(i,e,t){return e===void 0&&(e=!1),!!t&&e&&t===Sf(i)}function K2(i,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);let o=i.getBoundingClientRect(),r=Zze(i),s=X1(1);e&&(n?Ef(n)&&(s=G4(n)):s=G4(i));let a=l1i(r,t,n)?Okt(r):X1(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(r&&n){let h=Sf(r),f=Ef(n)?Sf(n):n,p=h,g=dge(p);for(;g&&f!==p;){let A=G4(g),v=g.getBoundingClientRect(),w=k0(g),C=v.left+(g.clientLeft+parseFloat(w.paddingLeft))*A.x,_=v.top+(g.clientTop+parseFloat(w.paddingTop))*A.y;l*=A.x,c*=A.y,u*=A.x,d*=A.y,l+=C,c+=_,p=Sf(g),g=dge(p)}}return G2({width:u,height:d,x:l,y:c})}function hge(i,e){let t=qQ(i).scrollLeft;return e?e.left+t:K2(Z1(i)).left+t}function Pkt(i,e){let t=i.getBoundingClientRect(),n=t.left+e.scrollLeft-hge(i,t),o=t.top+e.scrollTop;return{x:n,y:o}}function c1i(i){let{elements:e,rect:t,offsetParent:n,strategy:o}=i,r=o==="fixed",s=Z1(n),a=e?QQ(e.floating):!1;if(n===s||a&&r)return t;let l={scrollLeft:0,scrollTop:0},c=X1(1),u=X1(0),d=$1(n);if((d||!r)&&((eT(n)!=="body"||jQ(s))&&(l=qQ(n)),d)){let f=K2(n);c=G4(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}let h=s&&!d&&!r?Pkt(s,l):X1(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:t.y*c.y-l.scrollTop*c.y+u.y+h.y}}function u1i(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function d1i(i){let e=qQ(i),t=i.ownerDocument.body,n=Tp(i.scrollWidth,i.clientWidth,t.scrollWidth,t.clientWidth),o=Tp(i.scrollHeight,i.clientHeight,t.scrollHeight,t.clientHeight),r=-e.scrollLeft+hge(i),s=-e.scrollTop;return k0(t).direction==="rtl"&&(r+=Tp(i.clientWidth,t.clientWidth)-n),{width:n,height:o,x:r,y:s}}var h1i=25;function f1i(i,e,t){t===void 0&&(t="viewport");let n=t==="layoutViewport",o=Sf(i),r=Z1(i),s=o.visualViewport,a=r.clientWidth,l=r.clientHeight,c=0,u=0;if(s){let h=!GQ()||e==="fixed";n?h||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,h&&(c=s.offsetLeft,u=s.offsetTop))}if(hge(r)<=0){let h=r.ownerDocument,f=h.body,p=getComputedStyle(f),g=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,A=Math.abs(r.clientWidth-f.clientWidth-g),v=getComputedStyle(r).scrollbarGutter==="stable both-edges"?A/2:A;v<=h1i&&(a-=v)}return{width:a,height:l,x:c,y:u}}function p1i(i,e){let t=K2(i,!0,e==="fixed"),n=t.top+i.clientTop,o=t.left+i.clientLeft,r=G4(i),s=i.clientWidth*r.x,a=i.clientHeight*r.y,l=o*r.x,c=n*r.y;return{width:s,height:a,x:l,y:c}}function Mkt(i,e,t){let n;if(e==="viewport"||e==="layoutViewport")n=f1i(i,t,e);else if(e==="document")n=d1i(Z1(i));else if(Ef(e))n=p1i(e,t);else{let o=Okt(i);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return G2(n)}function m1i(i,e){let t=e.get(i);if(t)return t;let n=XC(i,[],!1).filter(a=>Ef(a)&&eT(a)!=="body"),o=null,r=k0(i).position==="fixed",s=r?JC(i):i;for(;Ef(s)&&!Y2(s);){let a=k0(s),l=uge(s),c=o?o.position:r?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):o=a,s=JC(s)}return e.set(i,n),n}function g1i(i){let{element:e,boundary:t,rootBoundary:n,strategy:o}=i,s=[...t==="clippingAncestors"?QQ(e)?[]:m1i(e,this._c):[].concat(t),n],a=Mkt(e,s[0],o),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let h=1;h{a(!1,1e-7)},1e3)}T=!1}try{n=new IntersectionObserver(N,{...I,root:r.ownerDocument})}catch{n=new IntersectionObserver(N,I)}n.observe(i)}let l=Sf(i),c=()=>a(t);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),s()}}function q4(i,e,t,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Zze(i),u=o||r?[...c?XC(c):[],...e?XC(e):[]]:[];u.forEach(v=>{o&&v.addEventListener("scroll",t),r&&v.addEventListener("resize",t)});let d=c&&a?w1i(c,t,r):null,h=-1,f=null;s&&(f=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&f&&e&&(f.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(e)})),t()}),c&&!l&&f.observe(c),e&&f.observe(e));let p,g=l?K2(i):null;l&&A();function A(){let v=K2(i);g&&!zkt(g,v)&&t(),g=v,p=requestAnimationFrame(A)}return t(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",t),r&&w.removeEventListener("resize",t)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(p)}}var Y4=Kze,Vkt=_kt;var Hkt=Skt,Wkt=wkt,Ukt=Dkt,jkt=xkt,eVe=ykt;var Qkt=Ekt,fge=(i,e,t)=>{let n=new Map,o=t??{},r={...$ze,...o.platform,_c:n};return vkt(i,e,{...o,platform:r})};var Eu=ae(ke(),1),qkt=ae(ke(),1),Ykt=ae(mv(),1),x1i=typeof document<"u",C1i=function(){},pge=x1i?qkt.useLayoutEffect:C1i;function mge(i,e){if(i===e)return!0;if(typeof i!=typeof e)return!1;if(typeof i=="function"&&i.toString()===e.toString())return!0;let t,n,o;if(i&&e&&typeof i=="object"){if(Array.isArray(i)){if(t=i.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!mge(i[n],e[n]))return!1;return!0}if(o=Object.keys(i),t=o.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=t;n--!==0;){let r=o[n];if(!(r==="_owner"&&i.$$typeof)&&!mge(i[r],e[r]))return!1}return!0}return i!==i&&e!==e}function Kkt(i){return typeof window>"u"?1:(i.ownerDocument.defaultView||window).devicePixelRatio||1}function Gkt(i,e){let t=Kkt(i);return Math.round(e*t)/t}function tVe(i){let e=Eu.useRef(i);return pge(()=>{e.current=i}),e}function gge(i){i===void 0&&(i={});let{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=i,[u,d]=Eu.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[h,f]=Eu.useState(n);mge(h,n)||f(n);let[p,g]=Eu.useState(null),[A,v]=Eu.useState(null),w=Eu.useCallback(Y=>{Y!==I.current&&(I.current=Y,g(Y))},[]),C=Eu.useCallback(Y=>{Y!==T.current&&(T.current=Y,v(Y))},[]),_=r||p,E=s||A,I=Eu.useRef(null),T=Eu.useRef(null),N=Eu.useRef(u),L=l!=null,B=tVe(l),z=tVe(o),Q=tVe(c),Z=Eu.useCallback(()=>{if(!I.current||!T.current)return;let Y={placement:e,strategy:t,middleware:h};z.current&&(Y.platform=z.current),fge(I.current,T.current,Y).then($=>{let re={...$,isPositioned:Q.current!==!1};U.current&&!mge(N.current,re)&&(N.current=re,Ykt.flushSync(()=>{d(re)}))})},[h,e,t,z,Q]);pge(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(Y=>({...Y,isPositioned:!1})))},[c]);let U=Eu.useRef(!1);pge(()=>(U.current=!0,()=>{U.current=!1}),[]),pge(()=>{if(_&&(I.current=_),E&&(T.current=E),_&&E){if(B.current)return B.current(_,E,Z);Z()}},[_,E,Z,B,L]);let M=Eu.useMemo(()=>({reference:I,floating:T,setReference:w,setFloating:C}),[w,C]),ee=Eu.useMemo(()=>({reference:_,floating:E}),[_,E]),X=Eu.useMemo(()=>{let Y={position:t,left:0,top:0};if(!ee.floating)return Y;let $=Gkt(ee.floating,u.x),re=Gkt(ee.floating,u.y);return a?{...Y,transform:"translate("+$+"px, "+re+"px)",...Kkt(ee.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:$,top:re}},[t,a,ee.floating,u.x,u.y]);return Eu.useMemo(()=>({...u,update:Z,refs:M,elements:ee,floatingStyles:X}),[u,Z,M,ee,X])}var _1i=i=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:i,fn(t){let{element:n,padding:o}=typeof i=="function"?i(t):i;return n&&e(n)?n.current!=null?eVe({element:n.current,padding:o}).fn(t):{}:n?eVe({element:n,padding:o}).fn(t):{}}}},J2=(i,e)=>{let t=Vkt(i);return{name:t.name,fn:t.fn,options:[i,e]}},YQ=(i,e)=>{let t=Hkt(i);return{name:t.name,fn:t.fn,options:[i,e]}},iVe=(i,e)=>({fn:Qkt(i).fn,options:[i,e]}),KQ=(i,e)=>{let t=Wkt(i);return{name:t.name,fn:t.fn,options:[i,e]}},JQ=(i,e)=>{let t=Ukt(i);return{name:t.name,fn:t.fn,options:[i,e]}};var nVe=(i,e)=>{let t=jkt(i);return{name:t.name,fn:t.fn,options:[i,e]}};var oVe=(i,e)=>{let t=_1i(i);return{name:t.name,fn:t.fn,options:[i,e]}};var Jkt=ae(ke(),1);var S1i=Object.defineProperty,E1i=(i,e)=>S1i(i,"name",{value:e,configurable:!0});function rVe(i){let[e,t]=Jkt.useState(void 0);return al(()=>{if(i){t({width:i.offsetWidth,height:i.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let r=o[0],s,a;if("borderBoxSize"in r){let l=r.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=i.offsetWidth,a=i.offsetHeight;t({width:s,height:a})});return n.observe(i,{box:"border-box"}),()=>n.unobserve(i)}else t(void 0)},[i]),e}E1i(rVe,"useSize");var K4=ae(zi(),1),D1i=Object.defineProperty,tT=(i,e)=>D1i(i,"name",{value:e,configurable:!0});var Xkt="Popper",[Zkt,J4]=Eh(Xkt),[T1i,$kt]=Zkt(Xkt),k1i=tT(i=>{let{__scopePopper:e,children:t}=i,[n,o]=Df.useState(null),[r,s]=Df.useState(void 0);return(0,K4.jsx)(T1i,{scope:e,anchor:n,onAnchorChange:o,placementState:r,setPlacementState:s,children:t})},"Popper"),I1i="PopperAnchor",L1i=Df.forwardRef(tT(function(e,t){let{__scopePopper:n,virtualRef:o,...r}=e,s=$kt(I1i,n),a=Df.useRef(null),l=s.onAnchorChange,c=Df.useCallback(g=>{a.current=g,g&&l(g)},[l]),u=Fr(t,c),d=Df.useRef(null);Df.useEffect(()=>{if(!o)return;let g=d.current;d.current=o.current,g!==d.current&&l(d.current)});let h=s.placementState&&bge(s.placementState),f=h?.[0],p=h?.[1];return o?null:(0,K4.jsx)(Ea.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...r,ref:u})},"PopperAnchor")),eIt="PopperContent",[N1i,v7o]=Zkt(eIt),M1i=Df.forwardRef(tT(function(e,t){let{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...A}=e,v=$kt(eIt,n),[w,C]=Df.useState(null),_=Fr(t,C),[E,I]=Df.useState(null),T=rVe(E),N=T?.width??0,L=T?.height??0,B=o+(s!=="center"?"-"+s:""),z=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Q=Array.isArray(u)?u:[u],Z=Q.length>0,U={padding:z,boundary:Q.filter(tIt),altBoundary:Z},{refs:M,floatingStyles:ee,placement:X,isPositioned:Y,middlewareData:$}=gge({strategy:"fixed",placement:B,whileElementsMounted:tT((...zt)=>q4(...zt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:v.anchor},middleware:[J2({mainAxis:r+L,alignmentAxis:a}),c&&YQ({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?iVe():void 0,...U}),c&&KQ({...U}),JQ({...U,apply:tT(({elements:zt,rects:Fi,availableWidth:Kt,availableHeight:Li})=>{let{width:Bn,height:zn}=Fi.reference,yo=zt.floating.style;yo.setProperty("--radix-popper-available-width",`${Kt}px`),yo.setProperty("--radix-popper-available-height",`${Li}px`),yo.setProperty("--radix-popper-anchor-width",`${Bn}px`),yo.setProperty("--radix-popper-anchor-height",`${zn}px`)},"apply")}),E&&oVe({element:E,padding:l}),R1i({arrowWidth:N,arrowHeight:L}),f&&nVe({strategy:"referenceHidden",...U,boundary:Z?U.boundary:void 0})]}),re=v.setPlacementState;al(()=>(re(X),()=>{re(void 0)}),[X,re]);let[ue,Ie]=bge(X),nt=Rm(g);al(()=>{Y&&nt?.()},[Y,nt]);let mt=$.arrow?.x,xt=$.arrow?.y,wt=$.arrow?.centerOffset!==0,[Ht,Fe]=Df.useState();return al(()=>{w&&Fe(window.getComputedStyle(w).zIndex)},[w]),(0,K4.jsx)("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:Y?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ht,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,K4.jsx)(N1i,{scope:n,placedSide:ue,placedAlign:Ie,onArrowChange:I,arrowX:mt,arrowY:xt,shouldHideArrow:wt,children:(0,K4.jsx)(Ea.div,{"data-side":ue,"data-align":Ie,...A,ref:_,style:{...A.style,animation:Y?A.style?.animation:"none"}})})})},"PopperContent"));function tIt(i){return i!==null}tT(tIt,"isNotNull");var R1i=tT(i=>({name:"transformOrigin",options:i,fn(e){let{placement:t,rects:n,middlewareData:o}=e,s=o.arrow?.centerOffset!==0,a=s?0:i.arrowWidth,l=s?0:i.arrowHeight,[c,u]=bge(t),d={start:"0%",center:"50%",end:"100%"}[u],h=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2,p="",g="";return c==="bottom"?(p=s?d:`${h}px`,g=`${-l}px`):c==="top"?(p=s?d:`${h}px`,g=`${n.floating.height+l}px`):c==="right"?(p=`${-l}px`,g=s?d:`${f}px`):c==="left"&&(p=`${n.floating.width+l}px`,g=s?d:`${f}px`),{data:{x:p,y:g}}}}),"transformOrigin");function bge(i){let[e,t="center"]=i.split("-");return[e,t]}tT(bge,"getSideAndAlignFromPlacement");var Age=k1i,vge=L1i,yge=M1i;var wge=ae(ke(),1),nIt=ae(mv(),1);var oIt=ae(zi(),1),F1i=Object.defineProperty,O1i=(i,e)=>F1i(i,"name",{value:e,configurable:!0}),X4=wge.forwardRef(O1i(function(e,t){let{container:n,...o}=e,[r,s]=wge.useState(!1);al(()=>s(!0),[]);let a=n||r&&globalThis?.document?.body;return a?nIt.createPortal((0,oIt.jsx)(Ea.div,{...o,ref:t}),a):null},"Portal"));var Th=ae(ke(),1);var rIt=ae(ke(),1),P1i=Object.defineProperty,ZC=(i,e)=>P1i(i,"name",{value:e,configurable:!0});function sIt(i,e){return rIt.useReducer((t,n)=>e[t][n]??t,i)}ZC(sIt,"useStateMachine");var ew=ZC(i=>{let{present:e,children:t}=i,n=aIt(e),o=typeof t=="function"?t({present:n.isPresent}):Th.Children.only(t),r=lIt(n.ref,cIt(o));return typeof t=="function"||n.isPresent?Th.cloneElement(o,{ref:r}):null},"Presence");function aIt(i){let[e,t]=Th.useState(),n=Th.useRef(null),o=Th.useRef(i),r=Th.useRef("none"),s=Th.useRef(void 0),a=i?"mounted":"unmounted",[l,c]=sIt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Th.useEffect(()=>{l==="mounted"?(r.current=s.current??Z4(n.current),s.current=void 0):r.current="none"},[l]),al(()=>{let u=n.current,d=o.current;if(d!==i){let f=r.current,p=Z4(u);i?(s.current=p,c("MOUNT")):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=i}},[i,c]),al(()=>{if(e){let u,d=e.ownerDocument.defaultView??window,h=ZC(p=>{let A=Z4(n.current).includes(CSS.escape(p.animationName));if(p.target===e&&A&&(c("ANIMATION_END"),!o.current)){let v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},"handleAnimationEnd"),f=ZC(p=>{p.target===e&&(r.current=Z4(n.current))},"handleAnimationStart");return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:Th.useCallback(u=>{if(u){let d=getComputedStyle(u);n.current=d,s.current=Z4(d)}else n.current=null;t(u)},[])}}ZC(aIt,"usePresence");function sVe(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}ZC(sVe,"setRef");function lIt(...i){let e=Th.useRef(i);return e.current=i,Th.useCallback(t=>{let n=e.current,o=!1,r=n.map(s=>{let a=sVe(s,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let s=0;sB1i(i,"name",{value:e,configurable:!0}),aVe=!1;function uIt(){let[i,e]=xge.useState(aVe);return xge.useEffect(()=>{aVe||(aVe=!0,e(!0))},[]),i}lVe(uIt,"useIsHydrated");var dIt=z1i[" useSyncExternalStore ".trim().toString()];function hIt(){return()=>{}}lVe(hIt,"subscribe");function fIt(){return dIt(hIt,()=>!0,()=>!1)}lVe(fIt,"useIsHydratedModern");var pIt=typeof dIt=="function"?fIt:uIt;var iT=ae(zi(),1),V1i=Object.defineProperty,X2=(i,e)=>V1i(i,"name",{value:e,configurable:!0}),cVe="rovingFocusGroup.onEntryFocus",H1i={bubbles:!1,cancelable:!0},Cge="RovingFocusGroup",[uVe,mIt,W1i]=HQ(Cge),[U1i,dVe]=Eh(Cge,[W1i]),[j1i,Q1i]=U1i(Cge),G1i=zd.forwardRef(X2(function(e,t){return(0,iT.jsx)(uVe.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,iT.jsx)(uVe.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,iT.jsx)(q1i,{...e,ref:t})})})},"RovingFocusGroup")),q1i=zd.forwardRef(X2(function(e,t){let{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=zd.useRef(null),p=Fr(t,f),g=WQ(s),[A,v]=qC({prop:a,defaultProp:l??null,onChange:c,caller:Cge}),[w,C]=zd.useState(!1),_=Rm(u),E=mIt(n),I=zd.useRef(!1),[T,N]=zd.useState(0);return zd.useEffect(()=>{let L=f.current;if(L)return L.addEventListener(cVe,_),()=>L.removeEventListener(cVe,_)},[_]),(0,iT.jsx)(j1i,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:A,onItemFocus:zd.useCallback(L=>v(L),[v]),onItemShiftTab:zd.useCallback(()=>C(!0),[]),onFocusableItemAdd:zd.useCallback(()=>N(L=>L+1),[]),onFocusableItemRemove:zd.useCallback(()=>N(L=>L-1),[]),children:(0,iT.jsx)(Ea.div,{tabIndex:w||T===0?-1:0,"data-orientation":o,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,L=>{let B=!I.current;if(L.target===L.currentTarget&&B&&!w){let z=new CustomEvent(cVe,H1i);if(L.currentTarget.dispatchEvent(z),!z.defaultPrevented){let Q=E().filter(X=>X.focusable),Z=Q.find(X=>X.active),U=Q.find(X=>X.id===A),ee=[Z,U,...Q].filter(Boolean).map(X=>X.ref.current);hVe(ee,d)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),Y1i="RovingFocusGroupItem",K1i=zd.forwardRef(X2(function(e,t){let{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...l}=e,c=E0(),u=s||c,d=Q1i(Y1i,n),h=d.currentTabStopId===u,f=mIt(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:A}=d,v=pIt();return al(()=>{if(!(!v||!o))return p(),()=>g()},[v,o,p,g]),zd.useEffect(()=>{if(!(v||!o))return p(),()=>g()},[v,o,p,g]),(0,iT.jsx)(uVe.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:(0,iT.jsx)(Ea.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Kn(e.onMouseDown,w=>{o?d.onItemFocus(u):w.preventDefault()}),onFocus:Kn(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Kn(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;let C=bIt(w,d.orientation,d.dir);if(C!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=f().filter(I=>I.focusable).map(I=>I.ref.current);if(C==="last")E.reverse();else if(C==="prev"||C==="next"){C==="prev"&&E.reverse();let I=E.indexOf(w.currentTarget);E=d.loop?AIt(E,I+1):E.slice(I+1)}setTimeout(()=>hVe(E))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:A!=null}):a})})},"RovingFocusGroupItem")),J1i={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gIt(i,e){return e!=="rtl"?i:i==="ArrowLeft"?"ArrowRight":i==="ArrowRight"?"ArrowLeft":i}X2(gIt,"getDirectionAwareKey");function bIt(i,e,t){let n=gIt(i.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return J1i[n]}X2(bIt,"getFocusIntent");function hVe(i,e=!1){let t=document.activeElement;for(let n of i)if(n===t||(n.focus({preventScroll:e}),document.activeElement!==t))return}X2(hVe,"focusFirst");function AIt(i,e){return i.map((t,n)=>i[(e+n)%i.length])}X2(AIt,"wrapArray");var vIt=G1i,yIt=K1i;var Z1i=function(i){if(typeof document>"u")return null;var e=Array.isArray(i)?i[0]:i;return e.ownerDocument.body},$4=new WeakMap,_ge=new WeakMap,Sge={},fVe=0,wIt=function(i){return i&&(i.host||wIt(i.parentNode))},$1i=function(i,e){return e.map(function(t){if(i.contains(t))return t;var n=wIt(t);return n&&i.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",i,". Doing nothing"),null)}).filter(function(t){return!!t})},ewi=function(i,e,t,n){var o=$1i(e,Array.isArray(i)?i:[i]);Sge[t]||(Sge[t]=new WeakMap);var r=Sge[t],s=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var f=h.getAttribute(n),p=f!==null&&f!=="false",g=($4.get(h)||0)+1,A=(r.get(h)||0)+1;$4.set(h,g),r.set(h,A),s.push(h),g===1&&p&&_ge.set(h,!0),A===1&&h.setAttribute(t,"true"),p||h.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return u(e),a.clear(),fVe++,function(){s.forEach(function(d){var h=$4.get(d)-1,f=r.get(d)-1;$4.set(d,h),r.set(d,f),h||(_ge.has(d)||d.removeAttribute(n),_ge.delete(d)),f||d.removeAttribute(t)}),fVe--,fVe||($4=new WeakMap,$4=new WeakMap,_ge=new WeakMap,Sge={})}},Ege=function(i,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(i)?i:[i]),o=e||Z1i(i);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),ewi(n,o,t,"aria-hidden")):function(){return null}};var Fm=function(){return Fm=Object.assign||function(e){for(var t,n=1,o=arguments.length;n"u")return awi;var e=lwi(i),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-t+e[2]-e[0])}};var cwi=ZQ(),e8="data-scroll-locked",uwi=function(i,e,t,n){var o=i.left,r=i.top,s=i.right,a=i.gap;return t===void 0&&(t="margin"),` + .`.concat(pVe,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } - body[`).concat(c4,`] { + body[`).concat(e8,`] { overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([e&&"position: relative ".concat(n,";"),t==="margin"&&` - padding-left: `.concat(r,`px; - padding-top: `).concat(o,`px; + padding-left: `.concat(o,`px; + padding-top: `).concat(r,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; @@ -1127,34 +1127,34 @@ It looks like you are trying to use the hook outside the GraphiQL provider tree. `),t==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(v2,` { + .`).concat(Z2,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(A2,` { + .`).concat($2,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(v2," .").concat(v2,` { + .`).concat(Z2," .").concat(Z2,` { right: 0 `).concat(n,`; } - .`).concat(A2," .").concat(A2,` { + .`).concat($2," .").concat($2,` { margin-right: 0 `).concat(n,`; } - body[`).concat(c4,`] { - `).concat(Gze,": ").concat(a,`px; + body[`).concat(e8,`] { + `).concat(mVe,": ").concat(a,`px; } -`)},DNt=function(){var i=parseInt(document.body.getAttribute(c4)||"0",10);return isFinite(i)?i:0},bLi=function(){u4.useEffect(function(){return document.body.setAttribute(c4,(DNt()+1).toString()),function(){var i=DNt()-1;i<=0?document.body.removeAttribute(c4):document.body.setAttribute(c4,i.toString())}},[])},tVe=function(i){var e=i.noRelative,t=i.noImportant,n=i.gapMode,r=n===void 0?"margin":n;bLi();var o=u4.useMemo(function(){return eVe(r)},[r]);return u4.createElement(mLi,{styles:gLi(o,!e,r,t?"":"!important")})};var iVe=!1;if(typeof window<"u")try{xj=Object.defineProperty({},"passive",{get:function(){return iVe=!0,!0}}),window.addEventListener("test",xj,xj),window.removeEventListener("test",xj,xj)}catch{iVe=!1}var xj,y2=iVe?{passive:!1}:!1;var vLi=function(i){return i.tagName==="TEXTAREA"},TNt=function(i,e){if(!(i instanceof Element))return!1;var t=window.getComputedStyle(i);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!vLi(i)&&t[e]==="visible")},ALi=function(i){return TNt(i,"overflowY")},yLi=function(i){return TNt(i,"overflowX")},nVe=function(i,e){var t=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=kNt(i,n);if(r){var o=INt(i,n),s=o[1],a=o[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},wLi=function(i){var e=i.scrollTop,t=i.scrollHeight,n=i.clientHeight;return[e,t,n]},xLi=function(i){var e=i.scrollLeft,t=i.scrollWidth,n=i.clientWidth;return[e,t,n]},kNt=function(i,e){return i==="v"?ALi(e):yLi(e)},INt=function(i,e){return i==="v"?wLi(e):xLi(e)},CLi=function(i,e){return i==="h"&&e==="rtl"?-1:1},LNt=function(i,e,t,n,r){var o=CLi(i,window.getComputedStyle(e).direction),s=o*n,a=t.target,l=e.contains(a),c=!1,u=s>0,d=0,h=0;do{if(!a)break;var f=INt(i,a),p=f[0],g=f[1],v=f[2],A=g-v-o*p;(p||A)&&kNt(i,a)&&(d+=A,h+=p);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(r&&Math.abs(d)<1||!r&&s>d)||!u&&(r&&Math.abs(h)<1||!r&&-s>h))&&(c=!0),c};var hme=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},NNt=function(i){return[i.deltaX,i.deltaY]},MNt=function(i){return i&&"current"in i?i.current:i},_Li=function(i,e){return i[0]===e[0]&&i[1]===e[1]},SLi=function(i){return` +`)},LIt=function(){var i=parseInt(document.body.getAttribute(e8)||"0",10);return isFinite(i)?i:0},dwi=function(){t8.useEffect(function(){return document.body.setAttribute(e8,(LIt()+1).toString()),function(){var i=LIt()-1;i<=0?document.body.removeAttribute(e8):document.body.setAttribute(e8,i.toString())}},[])},_Ve=function(i){var e=i.noRelative,t=i.noImportant,n=i.gapMode,o=n===void 0?"margin":n;dwi();var r=t8.useMemo(function(){return CVe(o)},[o]);return t8.createElement(cwi,{styles:uwi(r,!e,o,t?"":"!important")})};var SVe=!1;if(typeof window<"u")try{$Q=Object.defineProperty({},"passive",{get:function(){return SVe=!0,!0}}),window.addEventListener("test",$Q,$Q),window.removeEventListener("test",$Q,$Q)}catch{SVe=!1}var $Q,eM=SVe?{passive:!1}:!1;var hwi=function(i){return i.tagName==="TEXTAREA"},NIt=function(i,e){if(!(i instanceof Element))return!1;var t=window.getComputedStyle(i);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!hwi(i)&&t[e]==="visible")},fwi=function(i){return NIt(i,"overflowY")},pwi=function(i){return NIt(i,"overflowX")},EVe=function(i,e){var t=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=MIt(i,n);if(o){var r=RIt(i,n),s=r[1],a=r[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},mwi=function(i){var e=i.scrollTop,t=i.scrollHeight,n=i.clientHeight;return[e,t,n]},gwi=function(i){var e=i.scrollLeft,t=i.scrollWidth,n=i.clientWidth;return[e,t,n]},MIt=function(i,e){return i==="v"?fwi(e):pwi(e)},RIt=function(i,e){return i==="v"?mwi(e):gwi(e)},bwi=function(i,e){return i==="h"&&e==="rtl"?-1:1},FIt=function(i,e,t,n,o){var r=bwi(i,window.getComputedStyle(e).direction),s=r*n,a=t.target,l=e.contains(a),c=!1,u=s>0,d=0,h=0;do{if(!a)break;var f=RIt(i,a),p=f[0],g=f[1],A=f[2],v=g-A-r*p;(p||v)&&MIt(i,a)&&(d+=v,h+=p);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(o&&Math.abs(d)<1||!o&&s>d)||!u&&(o&&Math.abs(h)<1||!o&&-s>h))&&(c=!0),c};var Lge=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},OIt=function(i){return[i.deltaX,i.deltaY]},PIt=function(i){return i&&"current"in i?i.current:i},Awi=function(i,e){return i[0]===e[0]&&i[1]===e[1]},vwi=function(i){return` .block-interactivity-`.concat(i,` {pointer-events: none;} .allow-interactivity-`).concat(i,` {pointer-events: all;} -`)},ELi=0,d4=[];function RNt(i){var e=Fa.useRef([]),t=Fa.useRef([0,0]),n=Fa.useRef(),r=Fa.useState(ELi++)[0],o=Fa.useState(wj)[0],s=Fa.useRef(i);Fa.useEffect(function(){s.current=i},[i]),Fa.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(r));var g=vNt([i.lockRef.current],(i.shards||[]).map(MNt),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[i.inert,i.lockRef.current,i.shards]);var a=Fa.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var A=hme(g),w=t.current,C="deltaX"in g?g.deltaX:w[0]-A[0],_="deltaY"in g?g.deltaY:w[1]-A[1],E,I=g.target,T=Math.abs(C)>Math.abs(_)?"h":"v";if("touches"in g&&T==="h"&&I.type==="range")return!1;var L=window.getSelection(),M=L&&L.anchorNode,z=M?M===I||M.contains(I):!1;if(z)return!1;var H=nVe(T,I);if(!H)return!0;if(H?E=T:(E=T==="v"?"h":"v",H=nVe(T,I)),!H)return!1;if(!n.current&&"changedTouches"in g&&(C||_)&&(n.current=E),!E)return!0;var B=n.current||E;return LNt(B,v,g,B==="h"?C:_,!0)},[]),l=Fa.useCallback(function(g){var v=g;if(!(!d4.length||d4[d4.length-1]!==o)){var A="deltaY"in v?NNt(v):hme(v),w=e.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&_Li(E.delta,A)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(MNt).filter(Boolean).filter(function(E){return E.contains(v.target)}),_=C.length>0?a(v,C[0]):!s.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),c=Fa.useCallback(function(g,v,A,w){var C={name:g,delta:v,target:A,should:w,shadowParent:DLi(A)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(_){return _!==C})},1)},[]),u=Fa.useCallback(function(g){t.current=hme(g),n.current=void 0},[]),d=Fa.useCallback(function(g){c(g.type,NNt(g),g.target,a(g,i.lockRef.current))},[]),h=Fa.useCallback(function(g){c(g.type,hme(g),g.target,a(g,i.lockRef.current))},[]);Fa.useEffect(function(){return d4.push(o),i.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,y2),document.addEventListener("touchmove",l,y2),document.addEventListener("touchstart",u,y2),function(){d4=d4.filter(function(g){return g!==o}),document.removeEventListener("wheel",l,y2),document.removeEventListener("touchmove",l,y2),document.removeEventListener("touchstart",u,y2)}},[]);var f=i.removeScrollBar,p=i.inert;return Fa.createElement(Fa.Fragment,null,p?Fa.createElement(o,{styles:SLi(r)}):null,f?Fa.createElement(tVe,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function DLi(i){for(var e=null;i!==null;)i instanceof ShadowRoot&&(e=i.host,i=i.host),i=i.parentNode;return e}var FNt=Kze(dme,RNt);var ONt=fme.forwardRef(function(i,e){return fme.createElement(yj,vm({},i,{ref:e,sideCar:FNt}))});ONt.classNames=yj.classNames;var Cj=ONt;var Oa=$(Hi(),1),kLi=Object.defineProperty,Pa=(i,e)=>kLi(i,"name",{value:e,configurable:!0}),rVe=["Enter"," "],ILi=["ArrowDown","PageUp","Home"],BNt=["ArrowUp","PageDown","End"],LLi=[...ILi,...BNt],p9r={ltr:[...rVe,"ArrowRight"],rtl:[...rVe,"ArrowLeft"]};var mme="Menu",[oVe,NLi,MLi]=uj(mme),[w2,aVe]=vh(mme,[MLi,o4,Wze]),lVe=o4(),zNt=Wze(),[RLi,_j]=w2(mme),[FLi,cVe]=w2(mme),OLi=Pa(i=>{let{__scopeMenu:e,open:t=!1,children:n,dir:r,onOpenChange:o,modal:s=!0}=i,a=lVe(e),[l,c]=gr.useState(null),u=gr.useRef(!1),d=bm(o),h=dj(r);return gr.useEffect(()=>{let f=Pa(()=>{u.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},"handleKeyDown"),p=Pa(()=>u.current=!1,"handlePointer");return document.addEventListener("keydown",f,{capture:!0}),()=>{document.removeEventListener("keydown",f,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),gr.useEffect(()=>{if(!t)return;let f=Pa(()=>d(!1),"handleBlur");return window.addEventListener("blur",f),()=>window.removeEventListener("blur",f)},[t,d]),(0,Oa.jsx)($pe,{...a,children:(0,Oa.jsx)(RLi,{scope:e,open:t,onOpenChange:d,content:l,onContentChange:c,children:(0,Oa.jsx)(FLi,{scope:e,onClose:gr.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:h,modal:s,children:n})})})},"Menu"),PLi=gr.forwardRef(Pa(function(e,t){let{__scopeMenu:n,...r}=e,o=lVe(n);return(0,Oa.jsx)(eme,{...o,...r,ref:t})},"MenuAnchor")),VNt="MenuPortal",[BLi,zLi]=w2(VNt,{forceMount:void 0}),VLi=Pa(i=>{let{__scopeMenu:e,forceMount:t,children:n,container:r}=i,o=_j(VNt,e);return(0,Oa.jsx)(BLi,{scope:e,forceMount:t,children:(0,Oa.jsx)(P1,{present:t||o.open,children:(0,Oa.jsx)(s4,{asChild:!0,container:r,children:n})})})},"MenuPortal"),MD="MenuContent",[HLi,HNt]=w2(MD),WLi=gr.forwardRef(Pa(function(e,t){let n=zLi(MD,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=_j(MD,e.__scopeMenu),a=cVe(MD,e.__scopeMenu);return(0,Oa.jsx)(oVe.Provider,{scope:e.__scopeMenu,children:(0,Oa.jsx)(P1,{present:r||s.open,children:(0,Oa.jsx)(oVe.Slot,{scope:e.__scopeMenu,children:a.modal?(0,Oa.jsx)(ULi,{...o,ref:t}):(0,Oa.jsx)(jLi,{...o,ref:t})})})})},"MenuContent")),ULi=gr.forwardRef(Pa(function(e,t){let n=_j(MD,e.__scopeMenu),r=gr.useRef(null),o=Lo(t,r);return gr.useEffect(()=>{let s=r.current;if(s)return ame(s)},[]),(0,Oa.jsx)(WNt,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Qn(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},"MenuRootContentModal")),jLi=gr.forwardRef(Pa(function(e,t){let n=_j(MD,e.__scopeMenu);return(0,Oa.jsx)(WNt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},"MenuRootContentNonModal")),QLi=Ug("MenuContent.ScrollLock"),WNt=gr.forwardRef(Pa(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...v}=e,A=_j(MD,n),w=cVe(MD,n),C=lVe(n),_=zNt(n),E=NLi(n),[I,T]=gr.useState(null),L=gr.useRef(null),M=Lo(t,L,A.onContentChange),z=gr.useRef(0),H=gr.useRef(""),B=gr.useRef(0),q=gr.useRef(null),U=gr.useRef("right"),F=gr.useRef(0),ne=g?Cj:gr.Fragment,ce=g?{as:QLi,allowPinchZoom:!0}:void 0,se=Pa(oe=>{let fe=H.current+oe,Re=E().filter(Be=>!Be.disabled),ft=document.activeElement,At=Re.find(Be=>Be.ref.current===ft)?.textValue,Dt=Re.map(Be=>Be.textValue),Ct=qNt(Dt,fe,At),Xt=Re.find(Be=>Be.textValue===Ct)?.ref.current;Pa((function Be(Vt){H.current=Vt,window.clearTimeout(z.current),Vt!==""&&(z.current=window.setTimeout(()=>Be(""),1e3))}),"updateSearch")(fe),Xt&&setTimeout(()=>Xt.focus())},"handleTypeaheadSearch");gr.useEffect(()=>()=>window.clearTimeout(z.current),[]),$3();let le=gr.useCallback(oe=>U.current===q.current?.side&&KNt(oe,q.current?.area),[]);return(0,Oa.jsx)(HLi,{scope:n,searchRef:H,onItemEnter:gr.useCallback(oe=>{le(oe)&&oe.preventDefault()},[le]),onItemLeave:gr.useCallback(oe=>{le(oe)||(L.current?.focus(),T(null))},[le]),onTriggerLeave:gr.useCallback(oe=>{le(oe)&&oe.preventDefault()},[le]),pointerGraceTimerRef:B,onPointerGraceIntentChange:gr.useCallback(oe=>{q.current=oe},[]),children:(0,Oa.jsx)(ne,{...ce,children:(0,Oa.jsx)(zpe,{asChild:!0,trapped:o,onMountAutoFocus:Qn(s,oe=>{oe.preventDefault(),L.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:(0,Oa.jsx)(X3,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,children:(0,Oa.jsx)(mNt,{asChild:!0,..._,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:T,onEntryFocus:Qn(c,oe=>{w.isUsingKeyboardRef.current||oe.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Oa.jsx)(tme,{role:"menu","aria-orientation":"vertical","data-state":UNt(A.open),"data-radix-menu-content":"",dir:w.dir,...C,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Qn(v.onKeyDown,oe=>{let Re=oe.target.closest("[data-radix-menu-content]")===oe.currentTarget,ft=oe.ctrlKey||oe.altKey||oe.metaKey,At=oe.key.length===1;Re&&(oe.key==="Tab"&&oe.preventDefault(),!ft&&At&&se(oe.key));let Dt=L.current;if(oe.target!==Dt||!LLi.includes(oe.key))return;oe.preventDefault();let Xt=E().filter(Be=>!Be.disabled).map(Be=>Be.ref.current);BNt.includes(oe.key)&&Xt.reverse(),QNt(Xt)}),onBlur:Qn(e.onBlur,oe=>{oe.currentTarget.contains(oe.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:Qn(e.onPointerMove,pme(oe=>{let fe=oe.target,Re=F.current!==oe.clientX;if(oe.currentTarget.contains(fe)&&Re){let ft=oe.clientX>F.current?"right":"left";U.current=ft,F.current=oe.clientX}}))})})})})})})},"MenuContentImpl"));var sVe="MenuItem",PNt="menu.itemSelect",GLi=gr.forwardRef(Pa(function(e,t){let{disabled:n=!1,onSelect:r,...o}=e,s=gr.useRef(null),a=cVe(sVe,e.__scopeMenu),l=HNt(sVe,e.__scopeMenu),c=Lo(t,s),u=gr.useRef(!1),d=Pa(()=>{let h=s.current;if(!n&&h){let f=new CustomEvent(PNt,{bubbles:!0,cancelable:!0});h.addEventListener(PNt,p=>r?.(p),{once:!0}),cj(h,f),f.defaultPrevented?u.current=!1:a.onClose()}},"handleSelect");return(0,Oa.jsx)(qLi,{...o,ref:c,disabled:n,onClick:Qn(e.onClick,d),onPointerDown:h=>{e.onPointerDown?.(h),u.current=!0},onPointerUp:Qn(e.onPointerUp,h=>{u.current||h.currentTarget?.click()}),onKeyDown:Qn(e.onKeyDown,h=>{n||h.target!==h.currentTarget||l.searchRef.current!==""&&h.key===" "||rVe.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),qLi=gr.forwardRef(Pa(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=HNt(sVe,n),l=zNt(n),c=gr.useRef(null),u=Lo(t,c),[d,h]=gr.useState(!1),[f,p]=gr.useState("");return gr.useEffect(()=>{let g=c.current;g&&p((g.textContent??"").trim())},[s.children]),(0,Oa.jsx)(oVe.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:(0,Oa.jsx)(gNt,{asChild:!0,...l,focusable:!r,children:(0,Oa.jsx)(Aa.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:Qn(e.onPointerMove,pme(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Qn(e.onPointerLeave,pme(g=>a.onItemLeave(g))),onFocus:Qn(e.onFocus,()=>h(!0)),onBlur:Qn(e.onBlur,()=>h(!1))})})})},"MenuItemImpl"));var YLi="MenuRadioGroup",[m9r,g9r]=w2(YLi,{value:void 0,onValueChange:Pa(()=>{},"onValueChange")});var KLi="MenuItemIndicator",[b9r,v9r]=w2(KLi,{checked:!1});var JLi="MenuSub",[A9r,y9r]=w2(JLi);function UNt(i){return i?"open":"closed"}Pa(UNt,"getOpenState");function jNt(i){return i==="indeterminate"}Pa(jNt,"isIndeterminate");function XLi(i){return jNt(i)?"indeterminate":i?"checked":"unchecked"}Pa(XLi,"getCheckedState");function QNt(i){let e=document.activeElement;for(let t of i)if(t===e||(t.focus(),document.activeElement!==e))return}Pa(QNt,"focusFirst");function GNt(i,e){return i.map((t,n)=>i[(e+n)%i.length])}Pa(GNt,"wrapArray");function qNt(i,e,t){let r=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,o=t?i.indexOf(t):-1,s=GNt(i,Math.max(o,0));r.length===1&&(s=s.filter(c=>c!==t));let l=s.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return l!==t?l:void 0}Pa(qNt,"getNextMatch");function YNt(i,e){let{x:t,y:n}=i,r=!1;for(let o=0,s=e.length-1;on!=h>n&&t<(d-c)*(n-u)/(h-u)+c&&(r=!r)}return r}Pa(YNt,"isPointInPolygon");function KNt(i,e){if(!e)return!1;let t={x:i.clientX,y:i.clientY};return YNt(t,e)}Pa(KNt,"isPointerInGraceArea");function pme(i){return e=>e.pointerType==="mouse"?i(e):void 0}Pa(pme,"whenMouse");var JNt=OLi,XNt=PLi,ZNt=VLi,$Nt=WLi;var e2t=GLi;var RD=$(Hi(),1),$Li=Object.defineProperty,Sj=(i,e)=>$Li(i,"name",{value:e,configurable:!0}),uVe="DropdownMenu",[eNi,z9r]=vh(uVe,[aVe]),Ej=aVe(),[tNi,t2t]=eNi(uVe),iNi=Sj(i=>{let{__scopeDropdownMenu:e,children:t,dir:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=i,l=Ej(e),c=TC.useRef(null),[u,d]=xC({prop:r,defaultProp:o??!1,onChange:s,caller:uVe});return(0,RD.jsx)(tNi,{scope:e,triggerId:f0(),triggerRef:c,contentId:f0(),open:u,onOpenChange:d,onOpenToggle:TC.useCallback(()=>d(h=>!h),[d]),modal:a,children:(0,RD.jsx)(JNt,{...l,open:u,onOpenChange:d,dir:n,modal:a,children:t})})},"DropdownMenu"),nNi="DropdownMenuTrigger",rNi=TC.forwardRef(Sj(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=t2t(nNi,n),a=Ej(n),l=Lo(t,s.triggerRef);return(0,RD.jsx)(XNt,{asChild:!0,...a,children:(0,RD.jsx)(Aa.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:l,onPointerDown:Qn(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:Qn(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})},"DropdownMenuTrigger")),oNi=Sj(i=>{let{__scopeDropdownMenu:e,...t}=i,n=Ej(e);return(0,RD.jsx)(ZNt,{...n,...t})},"DropdownMenuPortal"),sNi="DropdownMenuContent",aNi=TC.forwardRef(Sj(function(e,t){let{__scopeDropdownMenu:n,...r}=e,o=t2t(sNi,n),s=Ej(n),a=TC.useRef(!1);return(0,RD.jsx)($Nt,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:Qn(e.onCloseAutoFocus,l=>{a.current||o.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:Qn(e.onInteractOutside,l=>{let c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent"));var lNi=TC.forwardRef(Sj(function(e,t){let{__scopeDropdownMenu:n,...r}=e,o=Ej(n);return(0,RD.jsx)(e2t,{...o,...r,ref:t})},"DropdownMenuItem"));var i2t=iNi,n2t=rNi,r2t=oNi,o2t=aNi;var s2t=lNi;var l2t=(0,a2t.forwardRef)((i,e)=>{let t=(0,gme.c)(6),n;t[0]!==i.className?(n=zn("graphiql-un-styled",i.className),t[0]=i.className,t[1]=n):n=t[1];let r;return t[2]!==i||t[3]!==e||t[4]!==n?(r=(0,h4.jsx)(n2t,{asChild:!0,children:(0,h4.jsx)("button",{...i,ref:e,className:n})}),t[2]=i,t[3]=e,t[4]=n,t[5]=r):r=t[5],r});l2t.displayName="DropdownMenuButton";var cNi=i=>{let e=(0,gme.c)(14),t,n,r,o,s;e[0]!==i?({children:t,align:o,sideOffset:s,className:n,...r}=i,e[0]=i,e[1]=t,e[2]=n,e[3]=r,e[4]=o,e[5]=s):(t=e[1],n=e[2],r=e[3],o=e[4],s=e[5]);let a=o===void 0?"start":o,l=s===void 0?5:s,c;e[6]!==n?(c=zn("graphiql-dropdown-content",n),e[6]=n,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==t||e[10]!==r||e[11]!==l||e[12]!==c?(u=(0,h4.jsx)(r2t,{children:(0,h4.jsx)(o2t,{align:a,sideOffset:l,className:c,...r,children:t})}),e[8]=a,e[9]=t,e[10]=r,e[11]=l,e[12]=c,e[13]=u):u=e[13],u},uNi=i=>{let e=(0,gme.c)(10),t,n,r;e[0]!==i?({className:n,children:t,...r}=i,e[0]=i,e[1]=t,e[2]=n,e[3]=r):(t=e[1],n=e[2],r=e[3]);let o;e[4]!==n?(o=zn("graphiql-dropdown-item",n),e[4]=n,e[5]=o):o=e[5];let s;return e[6]!==t||e[7]!==r||e[8]!==o?(s=(0,h4.jsx)(s2t,{className:o,...r,children:t}),e[6]=t,e[7]=r,e[8]=o,e[9]=s):s=e[9],s},Dj=Object.assign(i2t,{Button:l2t,Item:uNi,Content:cNi});var f4=$(Hi()),S2t=$(ur());var or=$(Te(),1);var c2t=$(Te(),1);var u2t=$(Hi(),1),dNi=Object.defineProperty,hNi=(i,e)=>dNi(i,"name",{value:e,configurable:!0}),fNi=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),pNi=c2t.forwardRef(hNi(function(e,t){return(0,u2t.jsx)(Aa.span,{...e,ref:t,style:{...fNi,...e.style}})},"VisuallyHidden")),FD=pNi;var Nd=$(Hi(),1),gNi=Object.defineProperty,Ld=(i,e)=>gNi(i,"name",{value:e,configurable:!0}),[fVe,n7r]=vh("Tooltip",[o4]),pVe=o4(),bNi="TooltipProvider",vNi=700,dVe="tooltip.open",[ANi,mVe]=fVe(bNi),yNi=Ld(i=>{let{__scopeTooltip:e,delayDuration:t=vNi,skipDelayDuration:n=300,disableHoverableContent:r=!1,children:o}=i,s=or.useRef(!0),a=or.useRef(!1),l=or.useRef(0);return or.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,Nd.jsx)(ANi,{scope:e,isOpenDelayedRef:s,delayDuration:t,onOpen:or.useCallback(()=>{n<=0||(window.clearTimeout(l.current),s.current=!1)},[n]),onClose:or.useCallback(()=>{n<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n))},[n]),isPointerInTransitRef:a,onPointerInTransitChange:or.useCallback(c=>{a.current=c},[]),disableHoverableContent:r,children:o})},"TooltipProvider"),hVe="Tooltip",[wNi,kj]=fVe(hVe),xNi=Ld(i=>{let{__scopeTooltip:e,children:t,open:n,defaultOpen:r,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=i,l=mVe(hVe,i.__scopeTooltip),c=pVe(e),[u,d]=or.useState(null),[h,f]=or.useState(void 0),p=f0(),g=or.useRef(0),v=s??l.disableHoverableContent,A=a??l.delayDuration,w=or.useRef(!1),[C,_]=xC({prop:n,defaultProp:r??!1,onChange:Ld(z=>{z?(l.onOpen(),document.dispatchEvent(new CustomEvent(dVe))):l.onClose(),o?.(z)},"onChange"),caller:hVe}),E=or.useMemo(()=>C?w.current?"delayed-open":"instant-open":"closed",[C]),I=or.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w.current=!1,_(!0)},[_]),T=or.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),L=or.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{w.current=!0,_(!0),g.current=0},A)},[A,_]);return or.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),(0,Nd.jsx)($pe,{...c,children:(0,Nd.jsx)(wNi,{scope:e,contentId:h??p,setContentId:f,open:C,stateAttribute:E,trigger:u,onTriggerChange:d,onTriggerEnter:or.useCallback(()=>{l.isOpenDelayedRef.current?L():I()},[l.isOpenDelayedRef,L,I]),onTriggerLeave:or.useCallback(()=>{v?T():(window.clearTimeout(g.current),g.current=0)},[T,v]),onOpen:I,onClose:T,disableHoverableContent:v,children:t})})},"Tooltip"),d2t="TooltipTrigger",CNi=or.forwardRef(Ld(function(e,t){let{__scopeTooltip:n,...r}=e,o=kj(d2t,n),s=mVe(d2t,n),a=pVe(n),l=or.useRef(null),c=Lo(t,l,o.onTriggerChange),u=or.useRef(!1),d=or.useRef(!1),h=or.useCallback(()=>u.current=!1,[]);return or.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,Nd.jsx)(eme,{asChild:!0,...a,children:(0,Nd.jsx)(Aa.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:Qn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Qn(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Qn(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Qn(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Qn(e.onBlur,o.onClose),onClick:Qn(e.onClick,o.onClose)})})},"TooltipTrigger")),h2t="TooltipPortal",[_Ni,SNi]=fVe(h2t,{forceMount:void 0}),ENi=Ld(i=>{let{__scopeTooltip:e,forceMount:t,children:n,container:r}=i,o=kj(h2t,e);return(0,Nd.jsx)(_Ni,{scope:e,forceMount:t,children:(0,Nd.jsx)(P1,{present:t||o.open,children:(0,Nd.jsx)(s4,{asChild:!0,container:r,children:n})})})},"TooltipPortal"),Tj="TooltipContent",DNi=or.forwardRef(Ld(function(e,t){let n=SNi(Tj,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=kj(Tj,e.__scopeTooltip);return(0,Nd.jsx)(P1,{present:r||a.open,children:a.disableHoverableContent?(0,Nd.jsx)(f2t,{side:o,...s,ref:t}):(0,Nd.jsx)(TNi,{side:o,...s,ref:t})})},"TooltipContent")),TNi=or.forwardRef(Ld(function(e,t){let n=kj(Tj,e.__scopeTooltip),r=mVe(Tj,e.__scopeTooltip),o=or.useRef(null),s=Lo(t,o),[a,l]=or.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:h}=r,f=or.useCallback(()=>{l(null),h(!1)},[h]),p=or.useCallback((g,v)=>{let A=g.currentTarget,w={x:g.clientX,y:g.clientY},C=p2t(w,A.getBoundingClientRect()),_=m2t(w,C),E=g2t(v.getBoundingClientRect()),I=v2t([..._,...E]);l(I),h(!0)},[h]);return or.useEffect(()=>()=>f(),[f]),or.useEffect(()=>{if(c&&d){let g=Ld(A=>p(A,d),"handleTriggerLeave"),v=Ld(A=>p(A,c),"handleContentLeave");return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",v)}}},[c,d,p,f]),or.useEffect(()=>{if(a){let g=Ld(v=>{let A=v.target,w={x:v.clientX,y:v.clientY},C=c?.contains(A)||d?.contains(A),_=!b2t(w,a);C?f():_&&(f(),u())},"handleTrackPointerGrace");return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,a,u,f]),(0,Nd.jsx)(f2t,{...e,ref:s})},"TooltipContentHoverable")),kNi=lze("TooltipContent"),f2t=or.forwardRef(Ld(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":o,id:s,onEscapeKeyDown:a,onPointerDownOutside:l,...c}=e,u=kj(Tj,n),d=pVe(n),{onClose:h}=u;or.useEffect(()=>(document.addEventListener(dVe,h),()=>document.removeEventListener(dVe,h)),[h]),or.useEffect(()=>{if(u.trigger){let p=Ld(g=>{g.target instanceof Node&&g.target.contains(u.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,h]);let{setContentId:f}=u;return rl(()=>(f(s),()=>{f(void 0)}),[s,f]),(0,Nd.jsx)(X3,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:(0,Nd.jsxs)(tme,{"data-state":u.stateAttribute,role:o?void 0:"tooltip",id:o?void 0:u.contentId,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,Nd.jsx)(kNi,{children:r}),o?(0,Nd.jsx)(FD,{id:u.contentId,role:"tooltip",children:o}):null]})})},"TooltipContentImpl"));function p2t(i,e){let t=Math.abs(e.top-i.y),n=Math.abs(e.bottom-i.y),r=Math.abs(e.right-i.x),o=Math.abs(e.left-i.x);switch(Math.min(t,n,r,o)){case o:return"left";case r:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}Ld(p2t,"getExitSideFromRect");function m2t(i,e,t=5){let n=[];switch(e){case"top":n.push({x:i.x-t,y:i.y+t},{x:i.x+t,y:i.y+t});break;case"bottom":n.push({x:i.x-t,y:i.y-t},{x:i.x+t,y:i.y-t});break;case"left":n.push({x:i.x+t,y:i.y-t},{x:i.x+t,y:i.y+t});break;case"right":n.push({x:i.x-t,y:i.y-t},{x:i.x-t,y:i.y+t});break}return n}Ld(m2t,"getPaddedExitPoints");function g2t(i){let{top:e,right:t,bottom:n,left:r}=i;return[{x:r,y:e},{x:t,y:e},{x:t,y:n},{x:r,y:n}]}Ld(g2t,"getPointsFromRect");function b2t(i,e){let{x:t,y:n}=i,r=!1;for(let o=0,s=e.length-1;on!=h>n&&t<(d-c)*(n-u)/(h-u)+c&&(r=!r)}return r}Ld(b2t,"isPointInPolygon");function v2t(i){let e=i.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),A2t(e)}Ld(v2t,"getHull");function A2t(i){if(i.length<=1)return i.slice();let e=[];for(let n=0;n=2;){let o=e[e.length-1],s=e[e.length-2];if((o.x-s.x)*(r.y-s.y)>=(o.y-s.y)*(r.x-s.x))e.pop();else break}e.push(r)}e.pop();let t=[];for(let n=i.length-1;n>=0;n--){let r=i[n];for(;t.length>=2;){let o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(r.y-s.y)>=(o.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}Ld(A2t,"getHullPresorted");var y2t=yNi,w2t=xNi,x2t=CNi,C2t=ENi,_2t=DNi;var LNi=i=>{let e=(0,S2t.c)(10),{children:t,align:n,side:r,sideOffset:o,label:s}=i,a=n===void 0?"start":n,l=r===void 0?"bottom":r,c=o===void 0?5:o,u;e[0]!==t?(u=(0,f4.jsx)(x2t,{asChild:!0,children:t}),e[0]=t,e[1]=u):u=e[1];let d;e[2]!==a||e[3]!==s||e[4]!==l||e[5]!==c?(d=(0,f4.jsx)(C2t,{children:(0,f4.jsx)(_2t,{className:"graphiql-tooltip",align:a,side:l,sideOffset:c,children:s})}),e[2]=a,e[3]=s,e[4]=l,e[5]=c,e[6]=d):d=e[6];let h;return e[7]!==u||e[8]!==d?(h=(0,f4.jsxs)(w2t,{children:[u,d]}),e[7]=u,e[8]=d,e[9]=h):h=e[9],h},Au=Object.assign(LNi,{Provider:y2t});var gVe=()=>{let i=(0,E2t.c)(18),{setOperationName:e,run:t,stop:n}=Ic(),r;i[0]===Symbol.for("react.memo_cache_sentinel")?(r=Nl("operations","operationName","isFetching","overrideOperationName"),i[0]=r):r=i[0];let{operations:o,operationName:s,isFetching:a,overrideOperationName:l}=Or(r),c;i[1]!==o?(c=o===void 0?[]:o,i[1]=o,i[2]=c):c=i[2];let u=c,d=Or(NNi),h=u.length>1&&typeof l!="string",f=a||d,p=`${f?"Stop":"Execute"} query (${j0(Us.runQuery.key,"Cmd")})`,g;i[3]!==f?(g=f?(0,$v.jsx)(KAe,{}):(0,$v.jsx)(HAe,{}),i[3]=f,i[4]=g):g=i[4];let v;i[5]!==p||i[6]!==g?(v={type:"button",className:"graphiql-execute-button",children:g,"aria-label":p},i[5]=p,i[6]=g,i[7]=v):v=i[7];let A=v,w;return i[8]!==A||i[9]!==h||i[10]!==f||i[11]!==p||i[12]!==s||i[13]!==u||i[14]!==t||i[15]!==e||i[16]!==n?(w=h&&!f?(0,$v.jsxs)(Dj,{children:[(0,$v.jsx)(Au,{label:p,children:(0,$v.jsx)(Dj.Button,{...A})}),(0,$v.jsx)(Dj.Content,{children:u.map((C,_)=>{let E=C.name?C.name.value:``;return(0,$v.jsx)(Dj.Item,{onSelect:()=>{var I;let T=(I=C.name)==null?void 0:I.value;T&&T!==s&&e(T),t()},children:E},`${E}-${_}`)})})]}):(0,$v.jsx)(Au,{label:p,children:(0,$v.jsx)("button",{...A,onClick:f?n:t})}),i[8]=A,i[9]=h,i[10]=f,i[11]=p,i[12]=s,i[13]=u,i[14]=t,i[15]=e,i[16]=n,i[17]=w):w=i[17],w};function NNi(i){return!!i.subscription}var yVe=$(Hi()),D2t=$(ur()),bme=$(Te());var bVe=$(Hi()),vVe=$(ur()),AVe=$(Te());var ya=(0,AVe.forwardRef)((i,e)=>{let t=(0,vVe.c)(6),n;t[0]!==i.className?(n=zn("graphiql-un-styled",i.className),t[0]=i.className,t[1]=n):n=t[1];let r;return t[2]!==i||t[3]!==e||t[4]!==n?(r=(0,bVe.jsx)("button",{...i,ref:e,className:n}),t[2]=i,t[3]=e,t[4]=n,t[5]=r):r=t[5],r});ya.displayName="UnStyledButton";var vf=(0,AVe.forwardRef)((i,e)=>{let t=(0,vVe.c)(7),n;t[0]!==i.className||t[1]!==i.state?(n=zn("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[i.state],i.className),t[0]=i.className,t[1]=i.state,t[2]=n):n=t[2];let r;return t[3]!==i||t[4]!==e||t[5]!==n?(r=(0,bVe.jsx)("button",{...i,ref:e,className:n}),t[3]=i,t[4]=e,t[5]=n,t[6]=r):r=t[6],r});vf.displayName="Button";var p4=(0,bme.forwardRef)((i,e)=>{let t=(0,D2t.c)(14),{label:n,onClick:r,...o}=i,[s,a]=(0,bme.useState)(null),l;t[0]!==r?(l=w=>{try{r&&r(w),a(null)}catch(C){let _=C;a(_ instanceof Error?_:new Error(`Toolbar button click failed: ${_}`))}},t[0]=r,t[1]=l):l=t[1];let c=l,u=Au,d=ya,h="button",f=zn("graphiql-toolbar-button",s&&"error",o.className),p=s?s.message:n,g=s?"true":o["aria-invalid"],v;t[2]!==d||t[3]!==c||t[4]!==o||t[5]!==e||t[6]!==f||t[7]!==p||t[8]!==g?(v=(0,yVe.jsx)(d,{...o,ref:e,type:h,className:f,onClick:c,"aria-label":p,"aria-invalid":g}),t[2]=d,t[3]=c,t[4]=o,t[5]=e,t[6]=f,t[7]=p,t[8]=g,t[9]=v):v=t[9];let A;return t[10]!==u||t[11]!==n||t[12]!==v?(A=(0,yVe.jsx)(u,{label:n,children:v}),t[10]=u,t[11]=n,t[12]=v,t[13]=A):A=t[13],A});p4.displayName="ToolbarButton";var T2t=$(Hi()),k2t=$(ur()),vme=$(Te());var wVe=i=>{let e=(0,k2t.c)(15),{onEdit:t,...n}=i,{setEditor:r,run:o,prettifyEditors:s,mergeQuery:a}=Ic(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Nl("initialHeaders","shouldPersistHeaders","uriInstanceId"),e[0]=l):l=e[0];let{initialHeaders:c,shouldPersistHeaders:u,uriInstanceId:d}=Or(l),h=(0,vme.useRef)(null),f=Hg(MNi);$U(t,u?ds.headers:null,"headers");let p;e[1]!==c||e[2]!==a||e[3]!==f||e[4]!==s||e[5]!==o||e[6]!==r||e[7]!==d?(p=()=>{if(!f)return;let _=_D({uri:`${d}${kA.requestHeaders}`,value:c}),E=SD(h,{model:_});r({headerEditor:E});let I=[E.addAction({...Mf.runQuery,run:o}),E.addAction({...Mf.prettify,run:s}),E.addAction({...Mf.mergeFragments,run:a}),E,_];return vC(I)},e[1]=c,e[2]=a,e[3]=f,e[4]=s,e[5]=o,e[6]=r,e[7]=d,e[8]=p):p=e[8];let g;e[9]!==f?(g=[f],e[9]=f,e[10]=g):g=e[10],(0,vme.useEffect)(p,g);let v=0,A=CD,w=zn("graphiql-editor",n.className),C;return e[11]!==n||e[12]!==A||e[13]!==w?(C=(0,T2t.jsx)("div",{ref:h,tabIndex:v,onKeyDown:A,...n,className:w}),e[11]=n,e[12]=A,e[13]=w,e[14]=C):C=e[14],C};function MNi(i){return i.monaco}var Ij=$(Hi()),I2t=$(ur()),x2=$(Te()),RNi=i=>{var e;let t=(0,I2t.c)(14),{path:n}=i,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={width:null,height:null},t[0]=r):r=t[0];let[o,s]=(0,x2.useState)(r),{width:a,height:l}=o,[c,u]=(0,x2.useState)(null),d=(0,x2.useRef)(null),h=(e=L2t(n))==null?void 0:e.href,f,p;t[1]!==h?(f=()=>{if(!h){s({width:null,height:null}),u(null);return}fetch(h,{method:"HEAD"}).then(C=>{u(C.headers.get("Content-Type"))}).catch(()=>{u(null)})},p=[h],t[1]=h,t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,x2.useEffect)(f,p);let g;t[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{s({width:d.current.naturalWidth,height:d.current.naturalHeight})},t[4]=g):g=t[4];let v;t[5]!==h?(v=(0,Ij.jsx)("img",{alt:"",onLoad:g,ref:d,src:h}),t[5]=h,t[6]=v):v=t[6];let A;t[7]!==l||t[8]!==c||t[9]!==a?(A=a!==null&&l!==null&&(0,Ij.jsxs)("div",{children:[a,"x",l,c&&" "+c]}),t[7]=l,t[8]=c,t[9]=a,t[10]=A):A=t[10];let w;return t[11]!==v||t[12]!==A?(w=(0,Ij.jsxs)("div",{children:[v,A]}),t[11]=v,t[12]=A,t[13]=w):w=t[13],w},xVe=Object.assign(RNi,{shouldRender(i){let e=L2t(i);return e?/\.(bmp|gif|jpe?g|png|svg|webp)$/.test(e.pathname):!1}});function L2t(i){let e=i.trim();try{return new URL(e,location.protocol+"//"+location.host)}catch{}}var N2t=$(Hi()),M2t=$(ur());KU();var kC=$(Te());npe();mn();We();var CVe=i=>{let e=(0,M2t.c)(49),{onClickReference:t,onEdit:n,...r}=i,{setOperationName:o,setEditor:s,updateActiveTabValues:a,setVisiblePlugin:l,setSchemaReference:c,run:u,setOperationFacts:d,copyQuery:h,prettifyEditors:f,mergeQuery:p}=Ic(),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Nl("initialQuery","schema","customScalarSchemas","referencePlugin","operations","operationName","externalFragments","uriInstanceId","storage","monacoTheme"),e[0]=g):g=e[0];let{initialQuery:v,schema:A,customScalarSchemas:w,referencePlugin:C,operations:_,operationName:E,externalFragments:I,uriInstanceId:T,storage:L,monacoTheme:M}=Or(g),z=(0,kC.useRef)(null),H=(0,kC.useRef)(null),B,q;e[1]!==t?(B=()=>{H.current=t},q=[t],e[1]=t,e[2]=B,e[3]=q):(B=e[2],q=e[3]),(0,kC.useEffect)(B,q);let U;e[4]!==E||e[5]!==_||e[6]!==A||e[7]!==d?(U=function(Li){let ei=GU(A,Li.getValue()),Ni=Ott(_,E,ei?.operations);return d({documentAST:ei?.documentAST,operationName:Ni,operations:ei?.operations}),ei?{...ei,operationName:Ni}:null},e[4]=E,e[5]=_,e[6]=A,e[7]=d,e[8]=U):U=e[8];let F=U,ne=(0,kC.useRef)(null),ce,se;e[9]!==E||e[10]!==_||e[11]!==u||e[12]!==o?(ce=()=>{ne.current=Vt=>{var Li;if(!_){u();return}let ei=Vt.getPosition(),Ni=Vt.getModel().getOffsetAt(ei),Ke;for(let St of _)St.loc&&St.loc.start<=Ni&&St.loc.end>=Ni&&(Ke=(Li=St.name)==null?void 0:Li.value);Ke&&Ke!==E&&o(Ke),u()}},se=[E,_,u,o],e[9]=E,e[10]=_,e[11]=u,e[12]=o,e[13]=ce,e[14]=se):(ce=e[13],se=e[14]),(0,kC.useEffect)(ce,se);let{monacoGraphQL:le,monaco:oe}=Hg(),fe;e[15]!==h||e[16]!==F||e[17]!==v||e[18]!==p||e[19]!==oe||e[20]!==le||e[21]!==M||e[22]!==n||e[23]!==E||e[24]!==f||e[25]!==s||e[26]!==o||e[27]!==L||e[28]!==a||e[29]!==T?(fe=()=>{if(!oe||!le)return;let Vt=Xe.file(`${T}${kA.operation}`),Li=Xe.file(`${T}${kA.variables}`),{validateVariablesJSON:ei}=l6;ei[Vt.toString()]=[Li.toString()],le.setDiagnosticSettings(l6);let Ni=_D({uri:Vt.path.replace("/",""),value:v}),Ke=SD(z,{model:Ni,theme:M});s({queryEditor:Ke});let St=kb(100,()=>{let at=Ke.getValue();L.set(ds.query,at);let Je=F(Ke);n?.(at,Je?.documentAST),Je?.operationName&&E!==Je.operationName&&o(Je.operationName),a({query:at,operationName:Je?.operationName??null})});F(Ke);let yt=[Ni.onDidChangeContent(St),Ke.addAction({...Mf.runQuery,run:(...at)=>{let Je=at;return ne.current(...Je)}}),Ke.addAction({...Mf.copyQuery,run:h}),Ke.addAction({...Mf.prettify,run:f}),Ke.addAction({...Mf.mergeFragments,run:p}),Ke,Ni];return vC(yt)},e[15]=h,e[16]=F,e[17]=v,e[18]=p,e[19]=oe,e[20]=le,e[21]=M,e[22]=n,e[23]=E,e[24]=f,e[25]=s,e[26]=o,e[27]=L,e[28]=a,e[29]=T,e[30]=fe):fe=e[30];let Re;e[31]!==oe||e[32]!==le?(Re=[oe,le],e[31]=oe,e[32]=le,e[33]=Re):Re=e[33],(0,kC.useEffect)(fe,Re);let ft,At;e[34]!==w||e[35]!==I||e[36]!==oe||e[37]!==le||e[38]!==C||e[39]!==A||e[40]!==c||e[41]!==l||e[42]!==T?(At=()=>{if(!A||!oe||!le||(le.setSchemaConfig([{uri:`${T}${kA.schema}`,schema:A,customScalarSchemas:w}]),le.setExternalFragmentDefinitions([...I.values()]),!C))return;let Vt=null,Li=[oe.languages.registerDefinitionProvider("graphql",{provideDefinition(ei,Ni,Ke){let St=CTt(Ni),yt=B3(ei.getValue(),St,A);if(!yt)return;let{typeInfo:at,token:Je}=yt,{kind:xt,step:Ti}=Je.state;if(xt==="Field"&&Ti===0&&at.fieldDef||xt==="AliasedField"&&Ti===2&&at.fieldDef||xt==="ObjectField"&&Ti===0&&at.fieldDef||xt==="Directive"&&Ti===1&&at.directiveDef||xt==="Variable"&&at.type||xt==="Argument"&&Ti===0&&at.argDef||xt==="EnumValue"&&at.enumValue&&"description"in at.enumValue||xt==="NamedType"&&at.type&&"description"in at.type){Vt={kind:xt,typeInfo:at};let{lineNumber:Ut,column:xr}=Ni,lr=new N(Ut,xr,Ut,xr);return[{uri:ei.uri,range:lr}]}Vt=null}}),oe.languages.registerReferenceProvider("graphql",{provideReferences(ei,Ni,Ke,St){var yt;let{lineNumber:at,column:Je}=Ni;if(!Vt)return;l(C),c(Vt),(yt=H.current)==null||yt.call(H,Vt);let xt=new N(at,Je,at,Je);return[{uri:ei.uri,range:xt}]}})];return vC(Li)},ft=[A,w,C,c,l,I,T,le,oe],e[34]=w,e[35]=I,e[36]=oe,e[37]=le,e[38]=C,e[39]=A,e[40]=c,e[41]=l,e[42]=T,e[43]=ft,e[44]=At):(ft=e[43],At=e[44]),(0,kC.useEffect)(At,ft);let Dt=0,Ct=CD,Xt=zn("graphiql-editor",r.className),Be;return e[45]!==r||e[46]!==Ct||e[47]!==Xt?(Be=(0,N2t.jsx)("div",{ref:z,tabIndex:Dt,onKeyDown:Ct,...r,className:Xt}),e[45]=r,e[46]=Ct,e[47]=Xt,e[48]=Be):Be=e[48],Be};var cT=$(Hi()),sPt=$(ur());var LQ=$(Te()),aPt=$(iUe());We();var nUe=i=>{let e=(0,sPt.c)(18),{responseTooltip:t,...n}=i,{setEditor:r,run:o}=Ic(),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Nl("fetchError","validationErrors","responseEditor","uriInstanceId"),e[0]=s):s=e[0];let{fetchError:a,validationErrors:l,responseEditor:c,uriInstanceId:u}=Or(s),d=(0,LQ.useRef)(null),h=Hg(aRi),f,p;e[1]!==a||e[2]!==c||e[3]!==l?(f=()=>{a&&c?.setValue(a),l.length&&c?.setValue($_(l))},p=[c,a,l],e[1]=a,e[2]=c,e[3]=l,e[4]=f,e[5]=p):(f=e[4],p=e[5]),(0,LQ.useEffect)(f,p);let g;e[6]!==t||e[7]!==h||e[8]!==o||e[9]!==r||e[10]!==u?(g=()=>{if(!h)return;let L=_D({uri:`${u}${kA.response}`,value:""}),M=SD(d,{model:L,readOnly:!0,lineNumbers:"off",wordWrap:"on",contextmenu:!1});r({responseEditor:M});let z,H,B=(F,ne)=>{if(!(F.uri===L.uri))return null;let se=F.getWordAtPosition(ne);if(!se?.word.startsWith("/")||!xVe.shouldRender(se.word))return null;let oe=`hover-${ne.lineNumber}-${ne.column}`;return H&&clearTimeout(H),H=setTimeout(()=>{let fe=document.querySelector(`[data-id="${oe}"]`);fe&&(z?.unmount(),z=(0,aPt.createRoot)(fe),z.render((0,cT.jsxs)(cT.Fragment,{children:[t&&(0,cT.jsx)(t,{position:ne,word:se}),(0,cT.jsx)(xVe,{path:se.word})]})))},500),{range:new N(ne.lineNumber,se.startColumn,ne.lineNumber,se.endColumn),contents:[{value:`
    Loading...
    `,supportHtml:!0}]}},q=L.getLanguageId(),U=[h.languages.registerHoverProvider(q,{provideHover:B}),M.addAction({...Mf.runQuery,run:o}),M,L];return vC(U)},e[6]=t,e[7]=h,e[8]=o,e[9]=r,e[10]=u,e[11]=g):g=e[11];let v;e[12]!==h?(v=[h],e[12]=h,e[13]=v):v=e[13],(0,LQ.useEffect)(g,v);let A="Result Window",w="polite",C="true",_=0,E=CD,I=zn("result-window",n.className),T;return e[14]!==n||e[15]!==E||e[16]!==I?(T=(0,cT.jsx)("section",{ref:d,"aria-label":A,"aria-live":w,"aria-atomic":C,tabIndex:_,onKeyDown:E,...n,className:I}),e[14]=n,e[15]=E,e[16]=I,e[17]=T):T=e[17],T};function aRi(i){return i.monaco}var lPt=$(Hi()),cPt=$(ur()),qge=$(Te());var rUe=i=>{let e=(0,cPt.c)(15),{onEdit:t,...n}=i,{setEditor:r,run:o,prettifyEditors:s,mergeQuery:a}=Ic(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Nl("initialVariables","uriInstanceId"),e[0]=l):l=e[0];let{initialVariables:c,uriInstanceId:u}=Or(l),d=(0,qge.useRef)(null),h=Hg(lRi);$U(t,ds.variables,"variables");let f;e[1]!==c||e[2]!==a||e[3]!==h||e[4]!==s||e[5]!==o||e[6]!==r||e[7]!==u?(f=()=>{if(!h)return;let C=_D({uri:`${u}${kA.variables}`,value:c}),_=SD(d,{model:C});r({variableEditor:_});let E=[_.addAction({...Mf.runQuery,run:o}),_.addAction({...Mf.prettify,run:s}),_.addAction({...Mf.mergeFragments,run:a}),_,C];return vC(E)},e[1]=c,e[2]=a,e[3]=h,e[4]=s,e[5]=o,e[6]=r,e[7]=u,e[8]=f):f=e[8];let p;e[9]!==h?(p=[h],e[9]=h,e[10]=p):p=e[10],(0,qge.useEffect)(f,p);let g=0,v=CD,A=zn("graphiql-editor",n.className),w;return e[11]!==n||e[12]!==v||e[13]!==A?(w=(0,lPt.jsx)("div",{ref:d,tabIndex:g,onKeyDown:v,...n,className:A}),e[11]=n,e[12]=v,e[13]=A,e[14]=w):w=e[14],w};function lRi(i){return i.monaco}var uPt=$(Hi()),dPt=$(ur()),hPt=$(Te());var NQ=(0,hPt.forwardRef)((i,e)=>{let t=(0,dPt.c)(6),n;t[0]!==i.className?(n=zn("graphiql-button-group",i.className),t[0]=i.className,t[1]=n):n=t[1];let r;return t[2]!==i||t[3]!==e||t[4]!==n?(r=(0,uPt.jsx)("div",{...i,ref:e,className:n}),t[2]=i,t[3]=e,t[4]=n,t[5]=r):r=t[5],r});NQ.displayName="ButtonGroup";var Q1=$(Hi()),aUe=$(ur()),SPt=$(Te());var xa=$(Te(),1);var Ml=$(Hi(),1),cRi=Object.defineProperty,eb=(i,e)=>cRi(i,"name",{value:e,configurable:!0}),sUe="Dialog",[fPt,kzr]=vh(sUe),[uRi,nA]=fPt(sUe),pPt=eb(i=>{let{__scopeDialog:e,children:t,open:n,defaultOpen:r,onOpenChange:o,modal:s=!0}=i,a=xa.useRef(null),l=xa.useRef(null),[c,u]=xC({prop:n,defaultProp:r??!1,onChange:o,caller:sUe}),[d,h]=xa.useState(0),[f,p]=xa.useState(0);return(0,Ml.jsx)(uRi,{scope:e,triggerRef:a,contentRef:l,contentId:f0(),titleId:f0(),descriptionId:f0(),titlePresent:d>0,descriptionPresent:f>0,setTitleCount:h,setDescriptionCount:p,open:c,onOpenChange:u,onOpenToggle:xa.useCallback(()=>u(g=>!g),[u]),modal:s,children:t})},"Dialog"),dRi="DialogTrigger",mPt=xa.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,o=nA(dRi,n),s=Lo(t,o.triggerRef);return(0,Ml.jsx)(Aa.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Yge(o.open),...r,ref:s,onClick:Qn(e.onClick,o.onOpenToggle)})},"DialogTrigger")),gPt="DialogPortal",[hRi,bPt]=fPt(gPt,{forceMount:void 0}),vPt=eb(i=>{let{__scopeDialog:e,forceMount:t,children:n,container:r}=i,o=nA(gPt,e);return(0,Ml.jsx)(hRi,{scope:e,forceMount:t,children:xa.Children.map(n,s=>(0,Ml.jsx)(P1,{present:t||o.open,children:(0,Ml.jsx)(s4,{asChild:!0,container:r,children:s})}))})},"DialogPortal"),oUe="DialogOverlay",APt=xa.forwardRef(eb(function(e,t){let n=bPt(oUe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=nA(oUe,e.__scopeDialog);return s.modal?(0,Ml.jsx)(P1,{present:r||s.open,children:(0,Ml.jsx)(pRi,{...o,ref:t})}):null},"DialogOverlay")),fRi=Ug("DialogOverlay.RemoveScroll"),pRi=xa.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,o=nA(oUe,n),s=pze(),a=Lo(t,s);return(0,Ml.jsx)(Cj,{as:fRi,allowPinchZoom:!0,shards:[o.contentRef],children:(0,Ml.jsx)(Aa.div,{"data-state":Yge(o.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),MQ="DialogContent",yPt=xa.forwardRef(eb(function(e,t){let n=bPt(MQ,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=nA(MQ,e.__scopeDialog);return(0,Ml.jsx)(P1,{present:r||s.open,children:s.modal?(0,Ml.jsx)(mRi,{...o,ref:t}):(0,Ml.jsx)(gRi,{...o,ref:t})})},"DialogContent")),mRi=xa.forwardRef(eb(function(e,t){let n=nA(MQ,e.__scopeDialog),r=xa.useRef(null),o=Lo(t,n.contentRef,r);return xa.useEffect(()=>{let s=r.current;if(s)return ame(s)},[]),(0,Ml.jsx)(wPt,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Qn(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Qn(e.onPointerDownOutside,s=>{let a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:Qn(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),gRi=xa.forwardRef(eb(function(e,t){let n=nA(MQ,e.__scopeDialog),r=xa.useRef(!1),o=xa.useRef(!1);return(0,Ml.jsx)(wPt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})},"DialogContentNonModal")),wPt=xa.forwardRef(eb(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,l=nA(MQ,n);return $3(),(0,Ml.jsx)(Ml.Fragment,{children:(0,Ml.jsx)(zpe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,Ml.jsx)(X3,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Yge(l.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),bRi="DialogTitle",xPt=xa.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,o=nA(bRi,n),{setTitleCount:s}=o;return rl(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),(0,Ml.jsx)(Aa.h2,{id:o.titleId,...r,ref:t})},"DialogTitle")),vRi="DialogDescription",CPt=xa.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,o=nA(vRi,n),{setDescriptionCount:s}=o;return rl(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),(0,Ml.jsx)(Aa.p,{id:o.descriptionId,...r,ref:t})},"DialogDescription")),ARi="DialogClose",_Pt=xa.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,o=nA(ARi,n);return(0,Ml.jsx)(Aa.button,{type:"button",...r,ref:t,onClick:Qn(e.onClick,()=>o.onOpenChange(!1))})},"DialogClose"));function Yge(i){return i?"open":"closed"}eb(Yge,"getState");var EPt=(0,SPt.forwardRef)((i,e)=>{let t=(0,aUe.c)(8),n;t[0]!==i.className?(n=zn("graphiql-dialog-close",i.className),t[0]=i.className,t[1]=n):n=t[1];let r,o;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,Q1.jsx)(FD,{children:"Close dialog"}),o=(0,Q1.jsx)(UT,{}),t[2]=r,t[3]=o):(r=t[2],o=t[3]);let s;return t[4]!==i||t[5]!==e||t[6]!==n?(s=(0,Q1.jsx)(_Pt,{asChild:!0,children:(0,Q1.jsxs)(ya,{...i,ref:e,type:"button",className:n,children:[r,o]})}),t[4]=i,t[5]=e,t[6]=n,t[7]=s):s=t[7],s});EPt.displayName="Dialog.Close";var wRi=i=>{let e=(0,aUe.c)(9),t,n;e[0]!==i?({children:t,...n}=i,e[0]=i,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,Q1.jsx)(APt,{className:"graphiql-dialog-overlay"}),e[3]=r):r=e[3];let o;e[4]!==t?(o=(0,Q1.jsxs)(vPt,{children:[r,(0,Q1.jsx)(yPt,{className:"graphiql-dialog",children:t})]}),e[4]=t,e[5]=o):o=e[5];let s;return e[6]!==n||e[7]!==o?(s=(0,Q1.jsx)(pPt,{...n,children:o}),e[6]=n,e[7]=o,e[8]=s):s=e[8],s},G1=Object.assign(wRi,{Close:EPt,Title:xPt,Trigger:mPt,Description:CPt});var DPt=$(Hi()),TPt=$(ur()),kPt=$(Te());var yf=(0,kPt.forwardRef)((i,e)=>{let t=(0,TPt.c)(15),n,r,o,s;if(t[0]!==e||t[1]!==i){let{children:u,onlyShowFirstChild:d,type:h,...f}=i;n=u,r=f,o=e,s=zn(`graphiql-markdown-${h}`,d&&"graphiql-markdown-preview",f.className),t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s}else n=t[2],r=t[3],o=t[4],s=t[5];let a;t[6]!==n?(a=fIt.render(n),t[6]=n,t[7]=a):a=t[7];let l;t[8]!==a?(l={__html:a},t[8]=a,t[9]=l):l=t[9];let c;return t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==l?(c=(0,DPt.jsx)("div",{...r,ref:o,className:s,dangerouslySetInnerHTML:l}),t[10]=r,t[11]=o,t[12]=s,t[13]=l,t[14]=c):c=t[14],c});yf.displayName="MarkdownContent";var IPt=$(Hi()),LPt=$(ur()),NPt=$(Te());var U2=(0,NPt.forwardRef)((i,e)=>{let t=(0,LPt.c)(6),n;t[0]!==i.className?(n=zn("graphiql-spinner",i.className),t[0]=i.className,t[1]=n):n=t[1];let r;return t[2]!==i||t[3]!==e||t[4]!==n?(r=(0,IPt.jsx)("div",{...i,ref:e,className:n}),t[2]=i,t[3]=e,t[4]=n,t[5]=r):r=t[5],r});U2.displayName="Spinner";var I8=$(Hi()),DG=$(ur()),TG=$(Te());var MPt=$(Te(),1),Kge=(0,MPt.createContext)({});var RPt=$(Te(),1);function T0(i){let e=(0,RPt.useRef)(null);return e.current===null&&(e.current=i()),e.current}var Jge=$(Te(),1);var FPt=typeof window<"u";var Xge=FPt?Jge.useLayoutEffect:Jge.useEffect;var OPt=$(Te(),1),o8=(0,OPt.createContext)(null);function j2(i,e){i.indexOf(e)===-1&&i.push(e)}function uT(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function lUe([...i],e,t){let n=e<0?i.length+e:e;if(n>=0&&nt>e?e:t{},Od=()=>{};var vp={};var RQ=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);var FQ=i=>typeof i=="object"&&i!==null;var OQ=i=>/^0[^.\s]+$/u.test(i);function PQ(i){let e;return()=>(e===void 0&&(e=i()),e)}var Rl=i=>i;var rA=(...i)=>i.reduce((e,t)=>n=>t(e(n)));var q1=(i,e,t)=>{let n=e-i;return n?(t-i)/n:1};var XC=class{constructor(){this.subscriptions=[]}add(e){return j2(this.subscriptions,e),()=>uT(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let o=0;oi*1e3,Pd=i=>i/1e3;var BQ=(i,e)=>e?i*(1e3/e):0;var PPt=(i,e,t)=>(((1-3*t+3*e)*i+(3*t-6*e))*i+3*e)*i,xRi=1e-7,CRi=12;function _Ri(i,e,t,n,r){let o,s,a=0;do s=e+(t-e)/2,o=PPt(s,n,r)-i,o>0?t=s:e=s;while(Math.abs(o)>xRi&&++a_Ri(o,0,1,i,t);return o=>o===0||o===1?o:PPt(r(o),e,n)}var Zge=i=>e=>e<=.5?i(2*e)/2:(2-i(2*(1-e)))/2;var $ge=i=>e=>1-i(1-e);var ebe=dT(.33,1.53,.69,.99),s8=$ge(ebe),zQ=Zge(s8);var VQ=i=>i>=1?1:(i*=2)<1?.5*s8(i):.5*(2-Math.pow(2,-10*(i-1)));var HQ=i=>1-Math.sin(Math.acos(i)),WQ=$ge(HQ),UQ=Zge(HQ);var cUe=dT(.42,0,1,1),uUe=dT(0,0,.58,1),jQ=dT(.42,0,.58,1);var dUe=i=>Array.isArray(i)&&typeof i[0]!="number";var QQ=i=>Array.isArray(i)&&typeof i[0]=="number";var BPt={linear:Rl,easeIn:cUe,easeInOut:jQ,easeOut:uUe,circIn:HQ,circInOut:UQ,circOut:WQ,backIn:s8,backInOut:zQ,backOut:ebe,anticipate:VQ},SRi=i=>typeof i=="string",tbe=i=>{if(QQ(i)){Od(i.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,t,n,r]=i;return dT(e,t,n,r)}else if(SRi(i))return Od(BPt[i]!==void 0,`Invalid easing type '${i}'`,"invalid-easing-type"),BPt[i];return i};var GQ=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zPt(i){let e=new Set,t=new Set,n=!1,r=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(c){o.has(c)&&(l.schedule(c),i()),c(s)}let l={schedule:(c,u=!1,d=!1)=>{let f=d&&n?e:t;return u&&o.add(c),f.add(c),c},cancel:c=>{t.delete(c),o.delete(c)},process:c=>{if(s=c,n){r=!0;return}n=!0;let u=e;e=t,t=u,e.forEach(a),e.clear(),n=!1,r&&(r=!1,l.process(c))}};return l}var ERi=40;function ibe(i,e){let t=!1,n=!0,r={delta:0,timestamp:0,isProcessing:!1},o=()=>t=!0,s=GQ.reduce((C,_)=>(C[_]=zPt(o),C),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:p}=s,g=()=>{let C=vp.useManualTiming,_=C?r.timestamp:performance.now();t=!1,C||(r.delta=n?1e3/60:Math.max(Math.min(_-r.timestamp,ERi),1)),r.timestamp=_,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),h.process(r),f.process(r),p.process(r),r.isProcessing=!1,t&&e&&(n=!1,i(g))},v=()=>{t=!0,n=!0,r.isProcessing||i(g)};return{schedule:GQ.reduce((C,_)=>{let E=s[_];return C[_]=(I,T=!1,L=!1)=>(t||v(),E.schedule(I,T,L)),C},{}),cancel:C=>{for(let _=0;_(nbe===void 0&&Fl.set(sc.isProcessing||vp.useManualTiming?sc.timestamp:performance.now()),nbe),set:i=>{nbe=i,queueMicrotask(DRi)}};var VPt=i=>e=>typeof e=="string"&&e.startsWith(i),rbe=VPt("--"),TRi=VPt("var(--"),a8=i=>TRi(i)?kRi.test(i.split("/*")[0].trim()):!1,kRi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function hUe(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}var Y1={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},ZC={...Y1,transform:i=>Ku(0,1,i)},YQ={...Y1,default:1};var hT=i=>Math.round(i*1e5)/1e5;var l8=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function HPt(i){return i==null}var WPt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var c8=(i,e)=>t=>!!(typeof t=="string"&&WPt.test(t)&&t.startsWith(i)||e&&!HPt(t)&&Object.prototype.hasOwnProperty.call(t,e)),obe=(i,e,t)=>n=>{if(typeof n!="string")return n;let[r,o,s,a]=n.match(l8);return{[i]:parseFloat(r),[e]:parseFloat(o),[t]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}};var IRi=i=>Ku(0,255,i),fUe={...Y1,transform:i=>Math.round(IRi(i))},K1={test:c8("rgb","red"),parse:obe("red","green","blue"),transform:({red:i,green:e,blue:t,alpha:n=1})=>"rgba("+fUe.transform(i)+", "+fUe.transform(e)+", "+fUe.transform(t)+", "+hT(ZC.transform(n))+")"};function LRi(i){let e="",t="",n="",r="";return i.length>5?(e=i.substring(1,3),t=i.substring(3,5),n=i.substring(5,7),r=i.substring(7,9)):(e=i.substring(1,2),t=i.substring(2,3),n=i.substring(3,4),r=i.substring(4,5),e+=e,t+=t,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}var KQ={test:c8("#"),parse:LRi,transform:K1.transform};var JQ=i=>({test:e=>typeof e=="string"&&e.endsWith(i)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${i}`}),k0=JQ("deg"),xf=JQ("%"),mi=JQ("px"),pUe=JQ("vh"),mUe=JQ("vw"),sbe={...xf,parse:i=>xf.parse(i)/100,transform:i=>xf.transform(i*100)};var fT={test:c8("hsl","hue"),parse:obe("hue","saturation","lightness"),transform:({hue:i,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(i)+", "+xf.transform(hT(e))+", "+xf.transform(hT(t))+", "+hT(ZC.transform(n))+")"};var al={test:i=>K1.test(i)||KQ.test(i)||fT.test(i),parse:i=>K1.test(i)?K1.parse(i):fT.test(i)?fT.parse(i):KQ.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?K1.transform(i):fT.transform(i),getAnimatableNone:i=>{let e=al.parse(i);return e.alpha=0,al.transform(e)}};var UPt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function NRi(i){return isNaN(i)&&typeof i=="string"&&(i.match(l8)?.length||0)+(i.match(UPt)?.length||0)>0}var QPt="number",GPt="color",MRi="var",RRi="var(",jPt="${}",FRi=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pT(i){let e=i.toString(),t=[],n={color:[],number:[],var:[]},r=[],o=0,a=e.replace(FRi,l=>(al.test(l)?(n.color.push(o),r.push(GPt),t.push(al.parse(l))):l.startsWith(RRi)?(n.var.push(o),r.push(MRi),t.push(l)):(n.number.push(o),r.push(QPt),t.push(parseFloat(l))),++o,jPt)).split(jPt);return{values:t,split:a,indexes:n,types:r}}function ORi(i){return pT(i).values}function qPt({split:i,types:e}){let t=i.length;return n=>{let r="";for(let o=0;otypeof i=="number"?0:al.test(i)?al.getAnimatableNone(i):i,zRi=(i,e)=>typeof i=="number"?e?.trim().endsWith("/")?i:0:BRi(i);function VRi(i){let e=pT(i);return qPt(e)(e.values.map((n,r)=>zRi(n,e.split[r])))}var Ju={test:NRi,parse:ORi,createTransformer:PRi,getAnimatableNone:VRi};function gUe(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function YPt({hue:i,saturation:e,lightness:t,alpha:n}){i/=360,e/=100,t/=100;let r=0,o=0,s=0;if(!e)r=o=s=t;else{let a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=gUe(l,a,i+1/3),o=gUe(l,a,i),s=gUe(l,a,i-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:n}}function u8(i,e){return t=>t>0?e:i}var ar=(i,e,t)=>i+(e-i)*t;var bUe=(i,e,t)=>{let n=i*i,r=t*(e*e-n)+n;return r<0?0:Math.sqrt(r)},HRi=[KQ,K1,fT],WRi=i=>HRi.find(e=>e.test(i));function KPt(i){let e=WRi(i);if(JC(!!e,`'${i}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let t=e.parse(i);return e===fT&&(t=YPt(t)),t}var vUe=(i,e)=>{let t=KPt(i),n=KPt(e);if(!t||!n)return u8(i,e);let r={...t};return o=>(r.red=bUe(t.red,n.red,o),r.green=bUe(t.green,n.green,o),r.blue=bUe(t.blue,n.blue,o),r.alpha=ar(t.alpha,n.alpha,o),K1.transform(r))};var abe=new Set(["none","hidden"]);function JPt(i,e){return abe.has(i)?t=>t<=0?i:e:t=>t>=1?e:i}function URi(i,e){return t=>ar(i,e,t)}function lbe(i){return typeof i=="number"?URi:typeof i=="string"?a8(i)?u8:al.test(i)?vUe:GRi:Array.isArray(i)?XPt:typeof i=="object"?al.test(i)?vUe:jRi:u8}function XPt(i,e){let t=[...i],n=t.length,r=i.map((o,s)=>lbe(o)(o,e[s]));return o=>{for(let s=0;s{for(let o in n)t[o]=n[o](r);return t}}function QRi(i,e){let t=[],n={color:0,var:0,number:0};for(let r=0;r{let t=Ju.createTransformer(e),n=pT(i),r=pT(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?abe.has(i)&&!r.values.length||abe.has(e)&&!n.values.length?JPt(i,e):rA(XPt(QRi(n,r),r.values),t):(JC(!0,`Complex values '${i}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),u8(i,e))};function cbe(i,e,t){return typeof i=="number"&&typeof e=="number"&&typeof t=="number"?ar(i,e,t):lbe(i)(i,e)}var ZPt=i=>{let e=({timestamp:t})=>i(t);return{start:(t=!0)=>Gn.update(e,t),stop:()=>wf(e),now:()=>sc.isProcessing?sc.timestamp:Fl.now()}};var ube=(i,e,t=10)=>{let n="",r=Math.max(Math.round(e/t),2);for(let o=0;o=2e4?1/0:e}function $Pt(i,e=100,t){let n=t({...i,keyframes:[0,e]}),r=Math.min(d8(n),2e4);return{type:"keyframes",ease:o=>n.next(r*o).value/e,duration:Pd(r)}}var Ol={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function wUe(i,e){return i*Math.sqrt(1-e*e)}var qRi=12;function YRi(i,e,t){let n=t;for(let r=1;r{let u=c*s,d=u*i,h=u-t,f=wUe(c,s),p=Math.exp(-d);return yUe-h/f*p},o=c=>{let d=c*s*i,h=d*t+t,f=Math.pow(s,2)*Math.pow(c,2)*i,p=Math.exp(-d),g=wUe(Math.pow(c,2),s);return(-r(c)+yUe>0?-1:1)*((h-f)*p)/g}):(r=c=>{let u=Math.exp(-c*i),d=(c-t)*i+1;return-yUe+u*d},o=c=>{let u=Math.exp(-c*i),d=(t-c)*(i*i);return u*d});let a=5/i,l=YRi(r,o,a);if(i=Mc(i),isNaN(l))return{stiffness:Ol.stiffness,damping:Ol.damping,duration:i};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:s*2*Math.sqrt(n*c),duration:i}}}var JRi=["duration","bounce"],XRi=["stiffness","damping","mass"];function eBt(i,e){return e.some(t=>i[t]!==void 0)}function ZRi(i){let e={velocity:Ol.velocity,stiffness:Ol.stiffness,damping:Ol.damping,mass:Ol.mass,isResolvedFromDuration:!1,...i};if(!eBt(i,XRi)&&eBt(i,JRi))if(e.velocity=0,i.visualDuration){let t=i.visualDuration,n=2*Math.PI/(t*1.2),r=n*n,o=2*Ku(.05,1,1-(i.bounce||0))*Math.sqrt(r);e={...e,mass:Ol.mass,stiffness:r,damping:o}}else{let t=KRi({...i,velocity:0});e={...e,...t,mass:Ol.mass},e.isResolvedFromDuration=!0}return e}function h8(i=Ol.visualDuration,e=Ol.bounce){let t=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:e}:i,{restSpeed:n,restDelta:r}=t,o=t.keyframes[0],s=t.keyframes[t.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=ZRi({...t,velocity:-Pd(t.velocity||0)}),p=h||0,g=c/(2*Math.sqrt(l*u)),v=s-o,A=Pd(Math.sqrt(l/u)),w=Math.abs(v)<5;n||(n=w?Ol.restSpeed.granular:Ol.restSpeed.default),r||(r=w?Ol.restDelta.granular:Ol.restDelta.default);let C,_,E,I,T,L;if(g<1)E=wUe(A,g),I=(p+g*A*v)/E,C=z=>{let H=Math.exp(-g*A*z);return s-H*(I*Math.sin(E*z)+v*Math.cos(E*z))},T=g*A*I+v*E,L=g*A*v-I*E,_=z=>Math.exp(-g*A*z)*(T*Math.sin(E*z)+L*Math.cos(E*z));else if(g===1){C=H=>s-Math.exp(-A*H)*(v+(p+A*v)*H);let z=p+A*v;_=H=>Math.exp(-A*H)*(A*z*H-p)}else{let z=A*Math.sqrt(g*g-1);C=U=>{let F=Math.exp(-g*A*U),ne=Math.min(z*U,300);return s-F*((p+g*A*v)*Math.sinh(ne)+z*v*Math.cosh(ne))/z};let H=(p+g*A*v)/z,B=g*A*H-v*z,q=g*A*v-H*z;_=U=>{let F=Math.exp(-g*A*U),ne=Math.min(z*U,300);return F*(B*Math.sinh(ne)+q*Math.cosh(ne))}}let M={calculatedDuration:f&&d||null,velocity:z=>Mc(_(z)),next:z=>{if(!f&&g<1){let B=Math.exp(-g*A*z),q=Math.sin(E*z),U=Math.cos(E*z),F=s-B*(I*q+v*U),ne=Mc(B*(T*q+L*U));return a.done=Math.abs(ne)<=n&&Math.abs(s-F)<=r,a.value=a.done?s:F,a}let H=C(z);if(f)a.done=z>=d;else{let B=Mc(_(z));a.done=Math.abs(B)<=n&&Math.abs(s-H)<=r}return a.value=a.done?s:H,a},toString:()=>{let z=Math.min(d8(M),2e4),H=ube(B=>M.next(z*B).value,z,30);return z+"ms "+H},toTransition:()=>{}};return M}h8.applyToOptions=i=>{let e=$Pt(i,100,h8);return i.ease=e.ease,i.duration=Mc(e.duration),i.type="keyframes",i};var $Ri=5;function dbe(i,e,t){let n=Math.max(e-$Ri,0);return BQ(t-i(n),e-n)}function XQ({keyframes:i,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){let d=i[0],h={done:!1,value:d},f=L=>a!==void 0&&Ll,p=L=>a===void 0?l:l===void 0||Math.abs(a-L)-g*Math.exp(-L/n),C=L=>A+w(L),_=L=>{let M=w(L),z=C(L);h.done=Math.abs(M)<=c,h.value=h.done?A:z},E,I,T=L=>{f(h.value)&&(E=L,I=h8({keyframes:[h.value,p(h.value)],velocity:dbe(C,L,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:L=>{let M=!1;return!I&&E===void 0&&(M=!0,_(L),T(L)),E!==void 0&&L>=E?I.next(L-E):(!M&&_(L),h)}}}function eFi(i,e,t){let n=[],r=t||vp.mix||cbe,o=i.length-1;for(let s=0;se[0];if(o===2&&e[0]===e[1])return()=>e[1];let s=i[0]===i[1];i[0]>i[o-1]&&(i=[...i].reverse(),e=[...e].reverse());let a=eFi(e,n,r),l=a.length,c=u=>{if(s&&u1)for(;dc(Ku(i[0],i[o-1],u)):c}function tBt(i,e){let t=i[i.length-1];for(let n=1;n<=e;n++){let r=q1(0,e,n);i.push(ar(t,1,r))}}function iBt(i){let e=[0];return tBt(e,i.length-1),e}function nBt(i,e){return i.map(t=>t*e)}function tFi(i,e){return i.map(()=>e||jQ).splice(0,i.length-1)}function Q2({duration:i=300,keyframes:e,times:t,ease:n="easeInOut"}){let r=dUe(n)?n.map(tbe):tbe(n),o={done:!1,value:e[0]},s=nBt(t&&t.length===e.length?t:iBt(e),i),a=hbe(s,e,{ease:Array.isArray(r)?r:tFi(e,r)});return{calculatedDuration:i,next:l=>(o.value=a(l),o.done=l>=i,o)}}var iFi=i=>i!==null;function mT(i,{repeat:e,repeatType:t="loop"},n,r=1){let o=i.filter(iFi),a=r<0||e&&t!=="loop"&&e%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var nFi={decay:XQ,inertia:XQ,tween:Q2,keyframes:Q2,spring:h8};function fbe(i){typeof i.type=="string"&&(i.type=nFi[i.type])}var gT=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};var rFi=i=>i/100,$C=class extends gT{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==Fl.now()&&this.tick(Fl.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;fbe(e);let{type:t=Q2,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:s=0}=e,{keyframes:a}=e,l=t||Q2;l!==Q2&&typeof a[0]!="number"&&(this.mixKeyframes=rA(rFi,cbe(a[0],a[1])),a=[0,100]);let c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=d8(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let A=this.currentTime-c*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?A<0:A>r;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let C=this.currentTime,_=n;if(d){let L=Math.min(this.currentTime,r)/a,M=Math.floor(L),z=L%1;!z&&L>=1&&(z=1),z===1&&M--,M=Math.min(M,d+1),M%2&&(h==="reverse"?(z=1-z,f&&(z-=f/a)):h==="mirror"&&(_=s)),C=Ku(0,1,z)*a}let E;w?(this.delayState.value=u[0],E=this.delayState):E=_.next(C),o&&!w&&(E.value=o(E.value));let{done:I}=E;!w&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return T&&p!==XQ&&(E.value=mT(u,this.options,v,this.speed)),g&&g(E.value),T&&this.finish(),E}then(e,t){return this.finished.then(e,t)}get duration(){return Pd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Pd(e)}get time(){return Pd(this.currentTime)}set time(e){e=Mc(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return dbe(n=>this.generator.next(n).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Fl.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Pd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=ZPt,startTime:t}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Fl.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function rBt(i){for(let e=1;ei*180/Math.PI,xUe=i=>{let e=G2(Math.atan2(i[1],i[0]));return CUe(e)},oFi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:xUe,rotateZ:xUe,skewX:i=>G2(Math.atan(i[1])),skewY:i=>G2(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},CUe=i=>(i=i%360,i<0&&(i+=360),i),oBt=xUe,sBt=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),aBt=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),sFi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sBt,scaleY:aBt,scale:i=>(sBt(i)+aBt(i))/2,rotateX:i=>CUe(G2(Math.atan2(i[6],i[5]))),rotateY:i=>CUe(G2(Math.atan2(-i[2],i[0]))),rotateZ:oBt,rotate:oBt,skewX:i=>G2(Math.atan(i[4])),skewY:i=>G2(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function pbe(i){return i.includes("scale")?1:0}function mbe(i,e){if(!i||i==="none")return pbe(e);let t=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,r;if(t)n=sFi,r=t;else{let a=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=oFi,r=a}if(!r)return pbe(e);let o=n[e],s=r[1].split(",").map(aFi);return typeof o=="function"?o(s):s[o]}var lBt=(i,e)=>{let{transform:t="none"}=getComputedStyle(i);return mbe(t,e)};function aFi(i){return parseFloat(i.trim())}var J1=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],I0=new Set([...J1,"pathRotation"]);var _Ue=i=>i===Y1||i===mi,lFi=new Set(["x","y","z"]),cFi=J1.filter(i=>!lFi.has(i));function cBt(i){let e=[];return cFi.forEach(t=>{let n=i.getValue(t);n!==void 0&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}var e_={width:({x:i},{paddingLeft:e="0",paddingRight:t="0",boxSizing:n})=>{let r=i.max-i.min;return n==="border-box"?r:r-parseFloat(e)-parseFloat(t)},height:({y:i},{paddingTop:e="0",paddingBottom:t="0",boxSizing:n})=>{let r=i.max-i.min;return n==="border-box"?r:r-parseFloat(e)-parseFloat(t)},top:(i,{top:e})=>parseFloat(e),left:(i,{left:e})=>parseFloat(e),bottom:({y:i},{top:e})=>parseFloat(e)+(i.max-i.min),right:({x:i},{left:e})=>parseFloat(e)+(i.max-i.min),x:(i,{transform:e})=>mbe(e,"x"),y:(i,{transform:e})=>mbe(e,"y")};e_.translateX=e_.x;e_.translateY=e_.y;var q2=new Set,SUe=!1,EUe=!1,DUe=!1;function uBt(){if(EUe){let i=Array.from(q2).filter(n=>n.needsMeasurement),e=new Set(i.map(n=>n.element)),t=new Map;e.forEach(n=>{let r=cBt(n);r.length&&(t.set(n,r),n.render())}),i.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();let r=t.get(n);r&&r.forEach(([o,s])=>{n.getValue(o)?.set(s)})}),i.forEach(n=>n.measureEndState()),i.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}EUe=!1,SUe=!1,q2.forEach(i=>i.complete(DUe)),q2.clear()}function dBt(){q2.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(EUe=!0)})}function hBt(){DUe=!0,dBt(),uBt(),DUe=!1}var bT=class{constructor(e,t,n,r,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(q2.add(this),SUe||(SUe=!0,Gn.read(dBt),Gn.resolveKeyframes(uBt))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let o=r?.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(n&&t){let a=n.readValue(t,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),r&&o===void 0&&r.set(e[0])}rBt(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),q2.delete(this)}cancel(){this.state==="scheduled"&&(q2.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var fBt=i=>i.startsWith("--");function gbe(i,e,t){fBt(e)?i.style.setProperty(e,t):i.style[e]=t}var pBt={};function bbe(i,e){let t=PQ(i);return()=>pBt[e]??t()}var mBt=bbe(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var vbe=bbe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Y2=([i,e,t,n])=>`cubic-bezier(${i}, ${e}, ${t}, ${n})`;var TUe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Y2([0,.65,.55,1]),circOut:Y2([.55,0,1,.45]),backIn:Y2([.31,.01,.66,-.59]),backOut:Y2([.33,1.53,.69,.99])};function kUe(i,e){if(i)return typeof i=="function"?vbe()?ube(i,e):"ease-out":QQ(i)?Y2(i):Array.isArray(i)?i.map(t=>kUe(t,e)||TUe.easeOut):TUe[i]}function gBt(i,e,t,{delay:n=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){let u={[e]:t};l&&(u.offset=l);let d=kUe(a,r);Array.isArray(d)&&(u.easing=d);let h={delay:n,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),i.animate(u,h)}function Abe(i){return typeof i=="function"&&"applyToOptions"in i}function bBt({type:i,...e}){return Abe(i)&&vbe()?i.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}var f8=class extends gT{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,Od(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=bBt(e);this.animation=gBt(t,n,r,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){let u=mT(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),gbe(t,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Pd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Pd(e)}get time(){return Pd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Mc(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&mBt()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Rl):r(this)}};var vBt={anticipate:VQ,backInOut:zQ,circInOut:UQ};function uFi(i){return i in vBt}function ABt(i){typeof i.ease=="string"&&uFi(i.ease)&&(i.ease=vBt[i.ease])}var IUe=10,ybe=class extends f8{constructor(e){ABt(e),fbe(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:o,...s}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let a=new $C({...s,autoplay:!1}),l=Math.max(IUe,Fl.now()-this.startTime),c=Ku(0,IUe,l-IUe),u=a.sample(l).value,{name:d}=this.options;o&&d&&gbe(o,d,u),t.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}};var LUe=(i,e)=>e==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(Ju.test(i)||i==="0")&&!i.startsWith("url("));function dFi(i){let e=i[0];if(i.length===1)return!0;for(let t=0;tObject.hasOwnProperty.call(Element.prototype,"animate"));function xBt(i){let{motionValue:e,name:t,repeatDelay:n,repeatType:r,damping:o,type:s,keyframes:a}=i,l=e?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:c,transformTemplate:u}=e.owner.getProps();return pFi()&&t&&(wbe.has(t)||fFi.has(t)&&wBt(a))&&(t!=="transform"||!u)&&!c&&!n&&r!=="mirror"&&o!==0&&s!=="inertia"}var mFi=40,xbe=class extends gT{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Fl.now();let h={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:s,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||bT;this.keyframeResolver=new f(a,(p,g,v)=>this.onKeyframesResolved(p,g,h,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:o,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=Fl.now();let d=!0;yBt(e,o,s,a)||(d=!1,(vp.instantAnimations||!l)&&u?.(mT(e,n,t)),e[0]=e[e.length-1],ZQ(n),n.repeat=0);let f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>mFi?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},p=d&&!c&&xBt(f),g=f.motionValue?.owner?.current,v;if(p)try{v=new ybe({...f,element:g})}catch{v=new $C(f)}else v=new $C(f);v.finished.then(()=>{this.notifyFinished()}).catch(Rl),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),hBt()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Cbe(i,e,t,n=0,r=1){let o=Array.from(i).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),s=i.size,a=(s-1)*n;return typeof t=="function"?t(o,s):r===1?o*n:a-o*n}var CBt=30,gFi=i=>!isNaN(parseFloat(i)),K2={current:void 0},_be=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let r=Fl.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Fl.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gFi(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new XC);let n=this.events[e].add(t);return e==="change"?()=>{n(),Gn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return K2.current&&K2.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Fl.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>CBt)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,CBt);return BQ(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Em(i,e){return new _be(i,e)}function Sbe(i,e){if(i?.inherit&&e){let{inherit:t,...n}=i;return{...e,...n}}return i}function p8(i,e){let t=i?.[e]??i?.default??i;return t!==i?Sbe(t,i):t}var bFi={type:"spring",stiffness:500,damping:25,restSpeed:10},vFi=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),AFi={type:"keyframes",duration:.8},yFi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_Bt=(i,{keyframes:e})=>e.length>2?AFi:I0.has(i)?i.startsWith("scale")?vFi(e[1]):bFi:yFi;var wFi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function SBt(i){for(let e in i)if(!wFi.has(e))return!0;return!1}var J2=(i,e,t,n={},r,o)=>s=>{let a=p8(n,i)||{},l=a.delay||n.delay||0,{elapsed:c=0}=n;c=c-Mc(l);let u={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:i,motionValue:e,element:o?void 0:r};SBt(a)||Object.assign(u,_Bt(i,u)),u.duration&&(u.duration=Mc(u.duration)),u.repeatDelay&&(u.repeatDelay=Mc(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ZQ(u),u.delay===0&&(d=!0)),(vp.instantAnimations||vp.skipAnimations||r?.shouldSkipAnimations||a.skipAnimations)&&(d=!0,ZQ(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){let h=mT(u.keyframes,a);if(h!==void 0){Gn.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new $C(u):new xbe(u)};var xFi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function CFi(i){let e=xFi.exec(i);if(!e)return[,];let[,t,n,r]=e;return[`--${t??n}`,r]}var _Fi=4;function NUe(i,e,t=1){Od(t<=_Fi,`Max CSS variable fallback depth detected in property "${i}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,r]=CFi(i);if(!n)return;let o=window.getComputedStyle(e).getPropertyValue(n);if(o){let s=o.trim();return RQ(s)?parseFloat(s):s}return a8(r)?NUe(r,e,t+1):r}function EBt(i){let e=[{},{}];return i?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function X2(i,e,t,n){if(typeof e=="function"){let[r,o]=EBt(n);e=e(t!==void 0?t:i.custom,r,o)}if(typeof e=="string"&&(e=i.variants&&i.variants[e]),typeof e=="function"){let[r,o]=EBt(n);e=e(t!==void 0?t:i.custom,r,o)}return e}function tb(i,e,t){let n=i.getProps();return X2(n,e,t!==void 0?t:n.custom,i)}var Ebe=new Set(["width","height","top","left","right","bottom",...J1]);var $Q=i=>Array.isArray(i);function SFi(i,e,t){i.hasValue(e)?i.getValue(e).set(t):i.addValue(e,Em(t))}function EFi(i){return $Q(i)?i[i.length-1]||0:i}function DBt(i,e){let t=tb(i,e),{transitionEnd:n={},transition:r={},...o}=t||{};o={...o,...n};for(let s in o){let a=EFi(o[s]);SFi(i,s,a)}}var ss=i=>!!(i&&i.getVelocity);function TBt(i){return!!(ss(i)&&i.add)}function m8(i,e){let t=i.getValue("willChange");if(TBt(t))return t.add(e);if(!t&&vp.WillChange){let n=new vp.WillChange("auto");i.addValue("willChange",n),n.add(e)}}function g8(i){return i.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var kBt="framerAppearId",eG="data-"+g8(kBt);function Dbe(i){return i.props[eG]}function DFi({protectedKeys:i,needsAnimating:e},t){let n=i.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,n}function Tbe(i,e,{delay:t=0,transitionOverride:n,type:r}={}){let{transition:o,transitionEnd:s,...a}=e,l=i.getDefaultTransition();o=o?Sbe(o,l):l;let c=o?.reduceMotion,u=o?.skipAnimations;n&&(o=n);let d=[],h=r&&i.animationState&&i.animationState.getState()[r],f=o?.path;f&&f.animateVisualElement(i,a,o,t,d);for(let p in a){let g=i.getValue(p,i.latestValues[p]??null),v=a[p];if(v===void 0||h&&DFi(h,p))continue;let A={delay:t,...p8(o||{},p)};u&&(A.skipAnimations=!0);let w=g.get();if(w!==void 0&&!g.isAnimating()&&!Array.isArray(v)&&v===w&&!A.velocity){Gn.update(()=>g.set(v));continue}let C=!1;if(window.MotionHandoffAnimation){let I=Dbe(i);if(I){let T=window.MotionHandoffAnimation(I,p,Gn);T!==null&&(A.startTime=T,C=!0)}}m8(i,p);let _=c??i.shouldReduceMotion;g.start(J2(p,g,v,_&&Ebe.has(p)?{type:!1}:A,i,C));let E=g.animation;E&&d.push(E)}if(s){let p=()=>Gn.update(()=>{s&&DBt(i,s)});d.length?Promise.all(d).then(p):p()}return d}function kbe(i,e,t={}){let n=tb(i,e,t.type==="exit"?i.presenceContext?.custom:void 0),{transition:r=i.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(r=t.transitionOverride);let o=n?()=>Promise.all(Tbe(i,n,t)):()=>Promise.resolve(),s=i.variantChildren&&i.variantChildren.size?(l=0)=>{let{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=r;return TFi(i,e,l,c,u,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){let[l,c]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(t.delay)])}function TFi(i,e,t=0,n=0,r=0,o=1,s){let a=[];for(let l of i.variantChildren)l.notify("AnimationStart",e),a.push(kbe(l,e,{...s,delay:t+(typeof n=="function"?0:n)+Cbe(i.variantChildren,l,n,r,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function IBt(i,e,t={}){i.notify("AnimationStart",e);let n;if(Array.isArray(e)){let r=e.map(o=>kbe(i,o,t));n=Promise.all(r)}else if(typeof e=="string")n=kbe(i,e,t);else{let r=typeof e=="function"?tb(i,e,t.custom):e;n=Promise.all(Tbe(i,r,t))}return n.then(()=>{i.notify("AnimationComplete",e)})}var LBt={test:i=>i==="auto",parse:i=>i};var Ibe=i=>e=>e.test(i);var MUe=[Y1,mi,xf,k0,mUe,pUe,LBt],RUe=i=>MUe.find(Ibe(i));function NBt(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||OQ(i):!0}var kFi=new Set(["brightness","contrast","saturate","opacity"]);function IFi(i){let[e,t]=i.slice(0,-1).split("(");if(e==="drop-shadow")return i;let[n]=t.match(l8)||[];if(!n)return i;let r=t.replace(n,""),o=kFi.has(e)?1:0;return n!==t&&(o*=100),e+"("+o+r+")"}var LFi=/\b([a-z-]*)\(.*?\)/gu,tG={...Ju,getAnimatableNone:i=>{let e=i.match(LFi);return e?e.map(IFi).join(" "):i}};var iG={...Ju,getAnimatableNone:i=>{let e=Ju.parse(i);return Ju.createTransformer(i)(e.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}};var FUe={...Y1,transform:Math.round};var MBt={rotate:k0,pathRotation:k0,rotateX:k0,rotateY:k0,rotateZ:k0,scale:YQ,scaleX:YQ,scaleY:YQ,scaleZ:YQ,skew:k0,skewX:k0,skewY:k0,distance:mi,translateX:mi,translateY:mi,translateZ:mi,x:mi,y:mi,z:mi,perspective:mi,transformPerspective:mi,opacity:ZC,originX:sbe,originY:sbe,originZ:mi};var Z2={borderWidth:mi,borderTopWidth:mi,borderRightWidth:mi,borderBottomWidth:mi,borderLeftWidth:mi,borderRadius:mi,borderTopLeftRadius:mi,borderTopRightRadius:mi,borderBottomRightRadius:mi,borderBottomLeftRadius:mi,width:mi,maxWidth:mi,height:mi,maxHeight:mi,top:mi,right:mi,bottom:mi,left:mi,inset:mi,insetBlock:mi,insetBlockStart:mi,insetBlockEnd:mi,insetInline:mi,insetInlineStart:mi,insetInlineEnd:mi,padding:mi,paddingTop:mi,paddingRight:mi,paddingBottom:mi,paddingLeft:mi,paddingBlock:mi,paddingBlockStart:mi,paddingBlockEnd:mi,paddingInline:mi,paddingInlineStart:mi,paddingInlineEnd:mi,margin:mi,marginTop:mi,marginRight:mi,marginBottom:mi,marginLeft:mi,marginBlock:mi,marginBlockStart:mi,marginBlockEnd:mi,marginInline:mi,marginInlineStart:mi,marginInlineEnd:mi,fontSize:mi,backgroundPositionX:mi,backgroundPositionY:mi,...MBt,zIndex:FUe,fillOpacity:ZC,strokeOpacity:ZC,numOctaves:FUe};var NFi={...Z2,color:al,backgroundColor:al,outlineColor:al,fill:al,stroke:al,borderColor:al,borderTopColor:al,borderRightColor:al,borderBottomColor:al,borderLeftColor:al,filter:tG,WebkitFilter:tG,mask:iG,WebkitMask:iG},Lbe=i=>NFi[i];var MFi=new Set([tG,iG]);function Nbe(i,e){let t=Lbe(i);return MFi.has(t)||(t=Ju),t.getAnimatableNone?t.getAnimatableNone(e):void 0}var RFi=new Set(["auto","none","0"]);function RBt(i,e,t){let n=0,r;for(;n{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}};var nG=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Rbe(i,e,t){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let n=document;e&&(n=e.current);let r=t?.[i]??n.querySelectorAll(i);return r?Array.from(r):[]}return Array.from(i).filter(n=>n!=null)}var rG=(i,e)=>e&&typeof i=="number"?e.transform(i):i;function FBt(i){return FQ(i)&&"offsetHeight"in i&&!("ownerSVGElement"in i)}var{schedule:$2,cancel:FFi}=ibe(queueMicrotask,!1);var L0={x:!1,y:!1};function Fbe(){return L0.x||L0.y}function OUe(i){return i==="x"||i==="y"?L0[i]?null:(L0[i]=!0,()=>{L0[i]=!1}):L0.x||L0.y?null:(L0.x=L0.y=!0,()=>{L0.x=L0.y=!1})}function Obe(i,e){let t=Rbe(i),n=new AbortController,r={passive:!0,...e,signal:n.signal};return[t,r,()=>n.abort()]}function OFi(i){return!(i.pointerType==="touch"||Fbe())}function PUe(i,e,t={}){let[n,r,o]=Obe(i,t);return n.forEach(s=>{let a=!1,l=!1,c,u=()=>{s.removeEventListener("pointerleave",p)},d=v=>{c&&(c(v),c=void 0),u()},h=v=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(v))},f=()=>{a=!0,window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",h,r)},p=v=>{if(v.pointerType!=="touch"){if(a){l=!0;return}d(v)}},g=v=>{if(!OFi(v))return;l=!1;let A=e(s,v);typeof A=="function"&&(c=A,s.addEventListener("pointerleave",p,r))};s.addEventListener("pointerenter",g,r),s.addEventListener("pointerdown",f,r)}),o}var BUe=(i,e)=>e?i===e?!0:BUe(i,e.parentElement):!1;var eM=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1;var PFi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zUe(i){return PFi.has(i.tagName)||i.isContentEditable===!0}var BFi=new Set(["INPUT","SELECT","TEXTAREA"]);function VUe(i){return BFi.has(i.tagName)||i.isContentEditable===!0}var b8=new WeakSet;function OBt(i){return e=>{e.key==="Enter"&&i(e)}}function HUe(i,e){i.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}var PBt=(i,e)=>{let t=i.currentTarget;if(!t)return;let n=OBt(()=>{if(b8.has(t))return;HUe(t,"down");let r=OBt(()=>{HUe(t,"up")}),o=()=>HUe(t,"cancel");t.addEventListener("keyup",r,e),t.addEventListener("blur",o,e)});t.addEventListener("keydown",n,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),e)};function BBt(i){return eM(i)&&!Fbe()}var zBt=new WeakSet;function WUe(i,e,t={}){let[n,r,o]=Obe(i,t),s=a=>{let l=a.currentTarget;if(!BBt(a)||zBt.has(a))return;b8.add(l),t.stopPropagation&&zBt.add(a);let c=e(l,a),u={...r,capture:!0},d=(p,g)=>{window.removeEventListener("pointerup",h,u),window.removeEventListener("pointercancel",f,u),b8.has(l)&&b8.delete(l),BBt(p)&&typeof c=="function"&&c(p,{success:g})},h=p=>{d(p,l===window||l===document||t.useGlobalTarget||BUe(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,u),window.addEventListener("pointercancel",f,u)};return n.forEach(a=>{(t.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),FBt(a)&&(a.addEventListener("focus",c=>PBt(c,r)),!zUe(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function v8(i){return FQ(i)&&"ownerSVGElement"in i}var Pbe=new WeakMap,Bbe,VBt=(i,e,t)=>(n,r)=>r&&r[0]?r[0][i+"Size"]:v8(n)&&"getBBox"in n?n.getBBox()[e]:n[t],zFi=VBt("inline","width","offsetWidth"),VFi=VBt("block","height","offsetHeight");function HFi({target:i,borderBoxSize:e}){Pbe.get(i)?.forEach(t=>{t(i,{get width(){return zFi(i,e)},get height(){return VFi(i,e)}})})}function WFi(i){i.forEach(HFi)}function UFi(){typeof ResizeObserver>"u"||(Bbe=new ResizeObserver(WFi))}function HBt(i,e){Bbe||UFi();let t=Rbe(i);return t.forEach(n=>{let r=Pbe.get(n);r||(r=new Set,Pbe.set(n,r)),r.add(e),Bbe?.observe(n)}),()=>{t.forEach(n=>{let r=Pbe.get(n);r?.delete(e),r?.size||Bbe?.unobserve(n)})}}var zbe=new Set,A8;function jFi(){A8=()=>{let i={get width(){return window.innerWidth},get height(){return window.innerHeight}};zbe.forEach(e=>e(i))},window.addEventListener("resize",A8)}function WBt(i){return zbe.add(i),A8||jFi(),()=>{zbe.delete(i),!zbe.size&&typeof A8=="function"&&(window.removeEventListener("resize",A8),A8=void 0)}}function Vbe(i,e){return typeof i=="function"?WBt(i):HBt(i,e)}var tM={value:null,addProjectionMetrics:null};function UBt(i){return v8(i)&&i.tagName==="svg"}function UUe(...i){let e=!Array.isArray(i[0]),t=e?0:-1,n=i[0+t],r=i[1+t],o=i[2+t],s=i[3+t],a=hbe(r,o,s);return e?a(n):a}var QFi=[...MUe,al,Ju],jBt=i=>QFi.find(Ibe(i));var jUe=()=>({translate:0,scale:1,origin:0,originPoint:0}),vT=()=>({x:jUe(),y:jUe()}),QUe=()=>({min:0,max:0}),ll=()=>({x:QUe(),y:QUe()});var QBt=new WeakMap;function t_(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function X1(i){return typeof i=="string"||Array.isArray(i)}var Hbe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oG=["initial",...Hbe];function AT(i){return t_(i.animate)||oG.some(e=>X1(i[e]))}function sG(i){return!!(AT(i)||i.variants)}function GBt(i,e,t){for(let n in e){let r=e[n],o=t[n];if(ss(r))i.addValue(n,r);else if(ss(o))i.addValue(n,Em(r,{owner:i}));else if(o!==r)if(i.hasValue(n)){let s=i.getValue(n);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{let s=i.getStaticValue(n);i.addValue(n,Em(s!==void 0?s:r,{owner:i}))}}for(let n in t)e[n]===void 0&&i.removeValue(n);return e}var aG={current:null},Wbe={current:!1};var GFi=typeof window<"u";function qBt(){if(Wbe.current=!0,!!GFi)if(window.matchMedia){let i=window.matchMedia("(prefers-reduced-motion)"),e=()=>aG.current=i.matches;i.addEventListener("change",e),e()}else aG.current=!1}var YBt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ube={};function cG(i){Ube=i}function GUe(){return Ube}var lG=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bT,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=Fl.now();this.renderScheduledAtthis.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Wbe.current||qBt(),this.shouldReduceMotion=aG.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),wf(this.notifyUpdate),wf(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&wbe.has(e)&&this.current instanceof HTMLElement){let{factory:s,keyframes:a,times:l,ease:c,duration:u}=t.accelerate,d=new f8({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:Mc(u)}),h=s(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}let n=I0.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Gn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ube){let t=Ube[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ll()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;nt.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Em(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(RQ(n)||OQ(n))?n=parseFloat(n):!jBt(n)&&Ju.test(t)&&(n=Nbe(e,t)),this.setBaseTarget(e,ss(n)?n.get():n)),ss(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t=="string"||typeof t=="object"){let o=X2(this.props,t,this.presenceContext?.custom);o&&(n=o[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!ss(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new XC),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){$2.render(this.render)}};var y8=class extends lG{constructor(){super(...arguments),this.KeyframeResolver=Mbe}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;ss(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}};var Xu=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function uG({top:i,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:i,max:n}}}function qUe({x:i,y:e}){return{top:e.min,right:i.max,bottom:e.max,left:i.min}}function YUe(i,e){if(!e)return i;let t=e({x:i.left,y:i.top}),n=e({x:i.right,y:i.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function KUe(i){return i===void 0||i===1}function jbe({scale:i,scaleX:e,scaleY:t}){return!KUe(i)||!KUe(e)||!KUe(t)}function i_(i){return jbe(i)||JUe(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function JUe(i){return KBt(i.x)||KBt(i.y)}function KBt(i){return i&&i!=="0%"}function dG(i,e,t){let n=i-t,r=e*n;return t+r}function JBt(i,e,t,n,r){return r!==void 0&&(i=dG(i,r,n)),dG(i,t,n)+e}function XUe(i,e=0,t=1,n,r){i.min=JBt(i.min,e,t,n,r),i.max=JBt(i.max,e,t,n,r)}function ZUe(i,{x:e,y:t}){XUe(i.x,e.translate,e.scale,e.originPoint),XUe(i.y,t.translate,t.scale,t.originPoint)}var XBt=.999999999999,ZBt=1.0000000000001;function t3t(i,e,t,n=!1){let r=t.length;if(!r)return;e.x=e.y=1;let o,s;for(let a=0;aXBt&&(e.x=1),e.yXBt&&(e.y=1)}function N0(i,e){i.min+=e,i.max+=e}function $Bt(i,e,t,n,r=.5){let o=ar(i.min,i.max,r);XUe(i,e,t,o,n)}function e3t(i,e){return typeof i=="string"?parseFloat(i)/100*(e.max-e.min):i}function hG(i,e,t){let n=t??i;$Bt(i.x,e3t(e.x,n.x),e.scaleX,e.scale,e.originX),$Bt(i.y,e3t(e.y,n.y),e.scaleY,e.scale,e.originY)}function Qbe(i,e){return uG(YUe(i.getBoundingClientRect(),e))}function $Ue(i,e,t){let n=Qbe(i,t),{scroll:r}=e;return r&&(N0(n.x,r.offset.x),N0(n.y,r.offset.y)),n}var qFi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YFi=J1.length;function i3t(i,e,t){let n="",r=!0;for(let s=0;s{if(!e.target)return i;if(typeof i=="string")if(mi.test(i))i=parseFloat(i);else return i;let t=n3t(i,e.target.x),n=n3t(i,e.target.y);return`${t}% ${n}%`}};var r3t={correct:(i,{treeScale:e,projectionDelta:t})=>{let n=i,r=Ju.parse(i);if(r.length>5)return n;let o=Ju.createTransformer(i),s=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+s]/=a,r[1+s]/=l;let c=ar(a,l,.5);return typeof r[2+s]=="number"&&(r[2+s]/=c),typeof r[3+s]=="number"&&(r[3+s]/=c),o(r)}};var fG={borderRadius:{...w8,applyTo:[...nG]},borderTopLeftRadius:w8,borderTopRightRadius:w8,borderBottomLeftRadius:w8,borderBottomRightRadius:w8,boxShadow:r3t};function pG(i,{layout:e,layoutId:t}){return I0.has(i)||i.startsWith("origin")||(e||t!==void 0)&&(!!fG[i]||i==="opacity")}function nM(i,e,t){let n=i.style,r=e?.style,o={};if(!n)return o;for(let s in n)(ss(n[s])||r&&ss(r[s])||pG(s,i)||t?.getValue(s)?.liveStyle!==void 0)&&(o[s]=n[s]);return o}function KFi(i){return window.getComputedStyle(i)}var mG=class extends y8{constructor(){super(...arguments),this.type="html",this.renderInstance=Gbe}mount(e){Od(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,t){if(I0.has(t))return this.projection?.isProjecting?pbe(t):lBt(e,t);{let n=KFi(e),r=(rbe(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Qbe(e,t)}build(e,t,n){iM(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return nM(e,t,n)}};var JFi={offset:"stroke-dashoffset",array:"stroke-dasharray"},XFi={offset:"strokeDashoffset",array:"strokeDasharray"};function o3t(i,e,t=1,n=0,r=!0){i.pathLength=1;let o=r?JFi:XFi;i[o.offset]=`${-n}`,i[o.array]=`${e} ${t}`}var ZFi=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function gG(i,{attrX:e,attrY:t,attrScale:n,pathLength:r,pathSpacing:o=1,pathOffset:s=0,...a},l,c,u){if(iM(i,a,c),l){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};let{attrs:d,style:h}=i;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(let f of ZFi)d[f]!==void 0&&(h[f]=d[f],delete d[f]);e!==void 0&&(d.x=e),t!==void 0&&(d.y=t),n!==void 0&&(d.scale=n),r!==void 0&&o3t(d,r,o,s,!1)}var qbe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var bG=i=>typeof i=="string"&&i.toLowerCase()==="svg";function s3t(i,e,t,n){Gbe(i,e,void 0,n);for(let r in e.attrs)i.setAttribute(qbe.has(r)?r:g8(r),e.attrs[r])}function vG(i,e,t){let n=nM(i,e,t);for(let r in i)if(ss(i[r])||ss(e[r])){let o=J1.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=i[r]}return n}var AG=class extends y8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ll}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(I0.has(t)){let n=Lbe(t);return n&&n.default||0}return t=qbe.has(t)?t:g8(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return vG(e,t,n)}build(e,t,n){gG(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){s3t(e,t,n,r)}mount(e){this.isSVGTag=bG(e.tagName),super.mount(e)}};var $Fi=oG.length;function eje(i){if(!i)return;if(!i.isControllingVariants){let t=i.parent?eje(i.parent)||{}:{};return i.props.initial!==void 0&&(t.initial=i.props.initial),t}let e={};for(let t=0;t<$Fi;t++){let n=oG[t],r=i.props[n];(X1(r)||r===!1)&&(e[n]=r)}return e}function tje(i,e){if(!Array.isArray(e))return!1;let t=e.length;if(t!==i.length)return!1;for(let n=0;nPromise.all(e.map(({animation:t,options:n})=>IBt(i,t,n)))}function ije(i){let e=iOi(i),t=a3t(),n=!0,r=!1,o=c=>(u,d)=>{let h=tb(i,d,c==="exit"?i.presenceContext?.custom:void 0);if(h){let{transition:f,transitionEnd:p,...g}=h;u={...u,...g,...p}}return u};function s(c){e=c(i)}function a(c){let{props:u}=i,d=eje(i.parent)||{},h=[],f=new Set,p={},g=1/0;for(let A=0;Ag&&E,z=!1,H=Array.isArray(_)?_:[_],B=H.reduce(o(w),{});I===!1&&(B={});let{prevResolvedValues:q={}}=C,U={...q,...B},F=se=>{M=!0,f.has(se)&&(z=!0,f.delete(se)),C.needsAnimating[se]=!0;let le=i.getValue(se);le&&(le.liveStyle=!1)};for(let se in U){let le=B[se],oe=q[se];if(p.hasOwnProperty(se))continue;let fe=!1;$Q(le)&&$Q(oe)?fe=!tje(le,oe)||L:fe=le!==oe,fe?le!=null?F(se):f.add(se):le!==void 0&&f.has(se)?F(se):C.protectedKeys[se]=!0}C.prevProp=_,C.prevResolvedValues=B,C.isActive&&(p={...p,...B}),(n||r)&&i.blockInitialAnimation&&(M=!1);let ne=T&&L;M&&(!ne||z)&&h.push(...H.map(se=>{let le={type:w};if(typeof se=="string"&&(n||r)&&!ne&&i.manuallyAnimateOnMount&&i.parent){let{parent:oe}=i,fe=tb(oe,se);if(oe.enteringChildren&&fe){let{delayChildren:Re}=fe.transition||{};le.delay=Cbe(oe.enteringChildren,i,Re)}}return{animation:se,options:le}}))}if(f.size){let A={};if(typeof u.initial!="boolean"){let w=tb(i,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(A.transition=w.transition)}f.forEach(w=>{let C=i.getBaseTarget(w),_=i.getValue(w);_&&(_.liveStyle=!0),A[w]=C??null}),h.push({animation:A})}let v=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!i.manuallyAnimateOnMount&&(v=!1),n=!1,r=!1,v?e(h):Promise.resolve()}function l(c,u){if(t[c].isActive===u)return Promise.resolve();i.variantChildren?.forEach(h=>h.animationState?.setActive(c,u)),t[c].isActive=u;let d=a(c);for(let h in t)t[h].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>t,reset:()=>{t=a3t(),r=!0}}}function l3t(i,e){return typeof e=="string"?e!==i:Array.isArray(e)?!tje(e,i):!1}function rM(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function a3t(){return{animate:rM(!0),whileInView:rM(),whileHover:rM(),whileTap:rM(),whileDrag:rM(),whileFocus:rM(),exit:rM()}}function Ybe(i,e){i.min=e.min,i.max=e.max}function M0(i,e){Ybe(i.x,e.x),Ybe(i.y,e.y)}function nje(i,e){i.translate=e.translate,i.scale=e.scale,i.originPoint=e.originPoint,i.origin=e.origin}var c3t=1e-4,nOi=1-c3t,rOi=1+c3t,u3t=.01,oOi=0-u3t,sOi=0+u3t;function _u(i){return i.max-i.min}function aje(i,e,t){return Math.abs(i-e)<=t}function rje(i,e,t,n=.5){i.origin=n,i.originPoint=ar(e.min,e.max,i.origin),i.scale=_u(t)/_u(e),i.translate=ar(t.min,t.max,i.origin)-i.originPoint,(i.scale>=nOi&&i.scale<=rOi||isNaN(i.scale))&&(i.scale=1),(i.translate>=oOi&&i.translate<=sOi||isNaN(i.translate))&&(i.translate=0)}function oM(i,e,t,n){rje(i.x,e.x,t.x,n?n.originX:void 0),rje(i.y,e.y,t.y,n?n.originY:void 0)}function oje(i,e,t,n=0){let r=n?ar(t.min,t.max,n):t.min;i.min=r+e.min,i.max=i.min+_u(e)}function lje(i,e,t,n){oje(i.x,e.x,t.x,n?.x),oje(i.y,e.y,t.y,n?.y)}function sje(i,e,t,n=0){let r=n?ar(t.min,t.max,n):t.min;i.min=e.min-r,i.max=i.min+_u(e)}function x8(i,e,t,n){sje(i.x,e.x,t.x,n?.x),sje(i.y,e.y,t.y,n?.y)}function d3t(i,e,t,n,r){return i-=e,i=dG(i,1/t,n),r!==void 0&&(i=dG(i,1/r,n)),i}function aOi(i,e=0,t=1,n=.5,r,o=i,s=i){if(xf.test(e)&&(e=parseFloat(e),e=ar(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=ar(o.min,o.max,n);i===o&&(a-=e),i.min=d3t(i.min,e,t,a,r),i.max=d3t(i.max,e,t,a,r)}function h3t(i,e,[t,n,r],o,s){aOi(i,e[t],e[n],e[r],e.scale,o,s)}var lOi=["x","scaleX","originX"],cOi=["y","scaleY","originY"];function cje(i,e,t,n){h3t(i.x,e,lOi,t?t.x:void 0,n?n.x:void 0),h3t(i.y,e,cOi,t?t.y:void 0,n?n.y:void 0)}function f3t(i){return i.translate===0&&i.scale===1}function uje(i){return f3t(i.x)&&f3t(i.y)}function p3t(i,e){return i.min===e.min&&i.max===e.max}function g3t(i,e){return p3t(i.x,e.x)&&p3t(i.y,e.y)}function m3t(i,e){return Math.round(i.min)===Math.round(e.min)&&Math.round(i.max)===Math.round(e.max)}function dje(i,e){return m3t(i.x,e.x)&&m3t(i.y,e.y)}function hje(i){return _u(i.x)/_u(i.y)}function fje(i,e){return i.translate===e.translate&&i.scale===e.scale&&i.originPoint===e.originPoint}function ib(i){return[i("x"),i("y")]}function b3t(i,e,t){let n="",r=i.x.translate/e.x,o=i.y.translate/e.y,s=t?.z||0;if((r||o||s)&&(n=`translate3d(${r}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),t){let{transformPerspective:c,rotate:u,pathRotation:d,rotateX:h,rotateY:f,skewX:p,skewY:g}=t;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotate(${d}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),g&&(n+=`skewY(${g}deg) `)}let a=i.x.scale*e.x,l=i.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}var uOi=nG.length,v3t=i=>typeof i=="string"?parseFloat(i):i,A3t=i=>typeof i=="number"||mi.test(i);function w3t(i,e,t,n,r,o){r?(i.opacity=ar(0,t.opacity??1,dOi(n)),i.opacityExit=ar(e.opacity??1,0,hOi(n))):o&&(i.opacity=ar(e.opacity??1,t.opacity??1,n));for(let s=0;sne?1:t(q1(i,e,n))}function C3t(i,e,t){let n=ss(i)?i:Em(i);return n.start(J2("",n,e,t)),n.animation}function Z1(i,e,t,n={passive:!0}){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}var _3t=(i,e)=>i.depth-e.depth;var Kbe=class{constructor(){this.children=[],this.isDirty=!1}add(e){j2(this.children,e),this.isDirty=!0}remove(e){uT(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_3t),this.isDirty=!1,this.children.forEach(e)}};function S3t(i,e){let t=Fl.now(),n=({timestamp:r})=>{let o=r-t;o>=e&&(wf(n),i(o-e))};return Gn.setup(n,!0),()=>wf(n)}function sM(i){return ss(i)?i.get():i}var Jbe=class{constructor(){this.members=[]}add(e){j2(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(uT(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(uT(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};var aM={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var lM={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},pje=["","X","Y","Z"],fOi=1e3,pOi=0;function mje(i,e,t,n){let{latestValues:r}=e;r[i]&&(t[i]=r[i],e.setStaticValue(i,0),n&&(n[i]=0))}function R3t(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;let{visualElement:e}=i.options;if(!e)return;let t=Dbe(e);if(window.MotionHasOptimisedAnimation(t,"transform")){let{layout:r,layoutId:o}=i.options;window.MotionCancelOptimisedAnimation(t,"transform",Gn,!(r||o))}let{parent:n}=i;n&&!n.hasCheckedOptimisedAppear&&R3t(n)}function Xbe({attachResizeListener:i,defaultParent:e,measureScroll:t,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(s={},a=e?.()){this.id=pOi++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tM.value&&(lM.nodes=lM.calculatedTargetDeltas=lM.calculatedProjections=0),this.nodes.forEach(bOi),this.nodes.forEach(COi),this.nodes.forEach(_Oi),this.nodes.forEach(vOi),tM.addProjectionMetrics&&tM.addProjectionMetrics(lM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;Gn.read(()=>{d=window.innerWidth}),i(s,()=>{let f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=S3t(h,250),aM.hasAnimatedSinceResize&&(aM.hasAnimatedSinceResize=!1,this.nodes.forEach(T3t)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||c.getDefaultTransition()||kOi,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=c.getProps(),A=!this.targetLayout||!dje(this.targetLayout,f),w=!d&&h;if(this.options.layoutRoot||this.resumeFrom||w||d&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let C={...p8(p,"layout"),onPlay:g,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(u,w,C.path)}else d||T3t(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wf(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(SOi),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&R3t(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_u(this.snapshot.measuredBox.x)&&!_u(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{let T=I/1e3,L=E?.(T);L?(h.x.translate=L.x,h.x.scale=ar(s.x.scale,1,T),h.x.origin=s.x.origin,h.x.originPoint=s.x.originPoint,h.y.translate=L.y,h.y.scale=ar(s.y.scale,1,T),h.y.origin=s.y.origin,h.y.originPoint=s.y.originPoint):(k3t(h.x,s.x,T),k3t(h.y,s.y,T)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(x8(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),DOi(this.relativeTarget,this.relativeTargetOrigin,f,T),_&&g3t(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=ll()),M0(_,this.relativeTarget)),v&&(this.animationValues=d,w3t(d,u,this.latestValues,T,C,w)),L&&L.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=L.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(wf(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Gn.update(()=>{aM.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Em(0)),this.motionValue.jump(0,!1),this.currentAnimation=C3t(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fOi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&F3t(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ll();let d=_u(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let h=_u(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}M0(a,l),hG(a,u),oM(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Jbe),this.sharedNodes.get(s).add(a);let c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let a=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;let c={};l.z&&mje("z",s,c,this.animationValues);for(let u=0;us.currentAnimation?.stop()),this.root.nodes.forEach(E3t),this.root.sharedNodes.clear()}}}function mOi(i){i.updateLayout()}function gOi(i){let e=i.resumeFrom?.snapshot||i.snapshot;if(i.isLead()&&i.layout&&e&&i.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:n}=i.layout,{animationType:r}=i.options,o=e.source!==i.layout.source;if(r==="size")ib(u=>{let d=o?e.measuredBox[u]:e.layoutBox[u],h=_u(d);d.min=t[u].min,d.max=d.min+h});else if(r==="x"||r==="y"){let u=r==="x"?"y":"x";Ybe(o?e.measuredBox[u]:e.layoutBox[u],t[u])}else F3t(r,e.layoutBox,t)&&ib(u=>{let d=o?e.measuredBox[u]:e.layoutBox[u],h=_u(t[u]);d.max=d.min+h,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[u].max=i.relativeTarget[u].min+h)});let s=vT();oM(s,t,e.layoutBox);let a=vT();o?oM(a,i.applyTransform(n,!0),e.measuredBox):oM(a,t,e.layoutBox);let l=!uje(s),c=!1;if(!i.resumeFrom){let u=i.getClosestProjectingParent();if(u&&!u.resumeFrom){let{snapshot:d,layout:h}=u;if(d&&h){let f=i.options.layoutAnchor||void 0,p=ll();x8(p,e.layoutBox,d.layoutBox,f);let g=ll();x8(g,t,h.layoutBox,f),dje(p,g)||(c=!0),u.options.layoutRoot&&(i.relativeTarget=g,i.relativeTargetOrigin=p,i.relativeParent=u)}}}i.notifyListeners("didUpdate",{layout:t,snapshot:e,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(i.isLead()){let{onExitComplete:t}=i.options;t&&t()}i.options.transition=void 0}function bOi(i){tM.value&&lM.nodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function vOi(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function AOi(i){i.clearSnapshot()}function E3t(i){i.clearMeasurements()}function yOi(i){i.isLayoutDirty=!0,i.updateLayout()}function D3t(i){i.isLayoutDirty=!1}function wOi(i){i.isAnimationBlocked&&i.layout&&!i.isLayoutDirty&&(i.snapshot=i.layout,i.isLayoutDirty=!0)}function xOi(i){let{visualElement:e}=i.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),i.resetTransform()}function T3t(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function COi(i){i.resolveTargetDelta()}function _Oi(i){i.calcProjection()}function SOi(i){i.resetSkewAndRotation()}function EOi(i){i.removeLeadSnapshot()}function k3t(i,e,t){i.translate=ar(e.translate,0,t),i.scale=ar(e.scale,1,t),i.origin=e.origin,i.originPoint=e.originPoint}function I3t(i,e,t,n){i.min=ar(e.min,t.min,n),i.max=ar(e.max,t.max,n)}function DOi(i,e,t,n){I3t(i.x,e.x,t.x,n),I3t(i.y,e.y,t.y,n)}function TOi(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}var kOi={duration:.45,ease:[.4,0,.1,1]},L3t=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),N3t=L3t("applewebkit/")&&!L3t("chrome/")?Math.round:Rl;function M3t(i){i.min=N3t(i.min),i.max=N3t(i.max)}function IOi(i){M3t(i.x),M3t(i.y)}function F3t(i,e,t){return i==="position"||i==="preserve-aspect"&&!aje(hje(e),hje(t),.2)}function LOi(i){return i!==i.root&&i.scroll?.wasRoot}var O3t=Xbe({attachResizeListener:(i,e)=>Z1(i,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0});var Zbe={current:void 0},yG=Xbe({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!Zbe.current){let i=new O3t({});i.mount(window),i.setOptions({layoutScroll:!0}),Zbe.current=i}return Zbe.current},resetTransform:(i,e)=>{i.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"});var P3t=$(Te(),1),C8=(0,P3t.createContext)({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});var yT=$(Te(),1);function B3t(i=!0){let e=(0,yT.useContext)(o8);if(e===null)return[!0,null];let{isPresent:t,onExitComplete:n,register:r}=e,o=(0,yT.useId)();(0,yT.useEffect)(()=>{if(i)return r(o)},[i]);let s=(0,yT.useCallback)(()=>i&&n&&n(o),[o,n,i]);return!t&&n?[!1,s]:[!0]}var z3t=$(Te(),1),$be=(0,z3t.createContext)({strict:!1});var V3t={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},H3t=!1;function NOi(){if(H3t)return;let i={};for(let e in V3t)i[e]={isEnabled:t=>V3t[e].some(n=>!!t[n])};cG(i),H3t=!0}function e0e(){return NOi(),GUe()}function W3t(i){let e=e0e();for(let t in i)e[t]={...e[t],...i[t]};cG(e)}var MOi=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function wG(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||MOi.has(i)}var U3t=i=>!wG(i);function ROi(i){typeof i=="function"&&(U3t=e=>e.startsWith("on")?!wG(e):i(e))}try{ROi(require("@emotion/is-prop-valid").default)}catch{}function j3t(i,e,t){let n={};for(let r in i)r==="values"&&typeof i.values=="object"||ss(i[r])||(U3t(r)||t===!0&&wG(r)||!e&&!wG(r)||i.draggable&&r.startsWith("onDrag"))&&(n[r]=i[r]);return n}var o0e=$(Hi(),1);var D8=$(Te(),1);var Q3t=$(Te(),1),wT=(0,Q3t.createContext)({});var t0e=$(Te(),1);function G3t(i,e){if(AT(i)){let{initial:t,animate:n}=i;return{initial:t===!1||X1(t)?t:void 0,animate:X1(n)?n:void 0}}return i.inherit!==!1?e:{}}function Y3t(i){let{initial:e,animate:t}=G3t(i,(0,t0e.useContext)(wT));return(0,t0e.useMemo)(()=>({initial:e,animate:t}),[q3t(e),q3t(t)])}function q3t(i){return Array.isArray(i)?i.join(" "):i}var E8=$(Te(),1);var K3t=$(Te(),1);var _8=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gje(i,e,t){for(let n in e)!ss(e[n])&&!pG(n,t)&&(i[n]=e[n])}function FOi({transformTemplate:i},e){return(0,K3t.useMemo)(()=>{let t=_8();return iM(t,e,i),Object.assign({},t.vars,t.style)},[e])}function OOi(i,e){let t=i.style||{},n={};return gje(n,t,i),Object.assign(n,FOi(i,e)),n}function J3t(i,e){let t={},n=OOi(i,e);return i.drag&&i.dragListener!==!1&&(t.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(t.tabIndex=0),t.style=n,t}var X3t=$(Te(),1);var i0e=()=>({..._8(),attrs:{}});function Z3t(i,e,t,n){let r=(0,X3t.useMemo)(()=>{let o=i0e();return gG(o,e,bG(n),i.transformTemplate,i.style),{...o.attrs,style:{...o.style}}},[e]);if(i.style){let o={};gje(o,i.style,i),r.style={...o,...r.style}}return r}var $3t=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function S8(i){return typeof i!="string"||i.includes("-")?!1:!!($3t.indexOf(i)>-1||/[A-Z]/u.test(i))}function e4t(i,e,t,{latestValues:n},r,o=!1,s){let l=(s??S8(i)?Z3t:J3t)(e,n,r,i),c=j3t(e,typeof i=="string",o),u=i!==E8.Fragment?{...c,...l,ref:t}:{},{children:d}=e,h=(0,E8.useMemo)(()=>ss(d)?d.get():d,[d]);return(0,E8.createElement)(i,{...u,children:h})}var bje=$(Te(),1);function POi({scrapeMotionValuesFromProps:i,createRenderState:e},t,n,r){return{latestValues:BOi(t,n,r,i),renderState:e()}}function BOi(i,e,t,n){let r={},o=n(i,{});for(let h in o)r[h]=sM(o[h]);let{initial:s,animate:a}=i,l=AT(i),c=sG(i);e&&c&&!l&&i.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=t?t.initial===!1:!1;u=u||s===!1;let d=u?a:s;if(d&&typeof d!="boolean"&&!t_(d)){let h=Array.isArray(d)?d:[d];for(let f=0;f(e,t)=>{let n=(0,bje.useContext)(wT),r=(0,bje.useContext)(o8),o=()=>POi(i,e,n,r);return t?o():T0(o)};var t4t=n0e({scrapeMotionValuesFromProps:nM,createRenderState:_8});var i4t=n0e({scrapeMotionValuesFromProps:vG,createRenderState:i0e});var n4t=Symbol.for("motionComponentSymbol");var cM=$(Te(),1);function r4t(i,e,t){let n=(0,cM.useRef)(t);(0,cM.useInsertionEffect)(()=>{n.current=t});let r=(0,cM.useRef)(null);return(0,cM.useCallback)(o=>{o&&i.onMount?.(o),e&&(o?e.mount(o):e.unmount());let s=n.current;if(typeof s=="function")if(o){let a=s(o);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):s(o);else s&&(s.current=o)},[e])}var Ap=$(Te(),1);var o4t=$(Te(),1),r0e=(0,o4t.createContext)({});function xT(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function s4t(i,e,t,n,r,o){let{visualElement:s}=(0,Ap.useContext)(wT),a=(0,Ap.useContext)($be),l=(0,Ap.useContext)(o8),c=(0,Ap.useContext)(C8),u=c.reducedMotion,d=c.skipAnimations,h=(0,Ap.useRef)(null),f=(0,Ap.useRef)(!1);n=n||a.renderer,!h.current&&n&&(h.current=n(i,{visualState:e,parent:s,props:t,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:o}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let p=h.current,g=(0,Ap.useContext)(r0e);p&&!p.projection&&r&&(p.type==="html"||p.type==="svg")&&zOi(h.current,t,r,g);let v=(0,Ap.useRef)(!1);(0,Ap.useInsertionEffect)(()=>{p&&v.current&&p.update(t,l)});let A=t[eG],w=(0,Ap.useRef)(!!A&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return Xge(()=>{f.current=!0,p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),w.current&&p.animationState&&p.animationState.animateChanges())}),(0,Ap.useEffect)(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),w.current=!1),p.enteringChildren=void 0)}),p}function zOi(i,e,t,n){let{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=e;i.projection=new t(i.latestValues,e["data-framer-portal-id"]?void 0:a4t(i.parent)),i.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&xT(a),visualElement:i,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function a4t(i){if(i)return i.options.allowProjection!==!1?i.projection:a4t(i.parent)}function s0e(i,{forwardMotionProps:e=!1,type:t}={},n,r){n&&W3t(n);let o=t?t==="svg":S8(i),s=o?i4t:t4t;function a(c,u){let d,h={...(0,D8.useContext)(C8),...c,layoutId:VOi(c)},{isStatic:f}=h,p=Y3t(c),g=s(c,f);if(!f&&typeof window<"u"){HOi(h,n);let v=WOi(h);d=v.MeasureLayout,p.visualElement=s4t(i,g,h,r,v.ProjectionNode,o)}return(0,o0e.jsxs)(wT.Provider,{value:p,children:[d&&p.visualElement?(0,o0e.jsx)(d,{visualElement:p.visualElement,...h}):null,e4t(i,c,r4t(g,p.visualElement,u),g,f,e,o)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;let l=(0,D8.forwardRef)(a);return l[n4t]=i,l}function VOi({layoutId:i}){let e=(0,D8.useContext)(Kge).id;return e&&i!==void 0?e+"-"+i:i}function HOi(i,e){let t=(0,D8.useContext)($be).strict}function WOi(i){let e=e0e(),{drag:t,layout:n}=e;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(i)||n?.isEnabled(i)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function l4t(i,e){if(typeof Proxy>"u")return s0e;let t=new Map,n=(o,s)=>s0e(o,s,i,e),r=(o,s)=>n(o,s);return new Proxy(r,{get:(o,s)=>s==="create"?n:(t.has(s)||t.set(s,s0e(s,void 0,i,e)),t.get(s))})}var c4t=$(Te(),1);var u4t=(i,e)=>e.isSVG??S8(i)?new AG(e):new mG(e,{allowProjection:i!==c4t.Fragment});var a0e=class extends Xu{constructor(e){super(e),e.animationState||(e.animationState=ije(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();t_(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var UOi=0,l0e=class extends Xu{constructor(){super(...arguments),this.id=UOi++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:o,custom:s}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){let a=tb(this.node,o,s);if(a){let{transition:l,transitionEnd:c,...u}=a;for(let d in u)this.node.getValue(d)?.jump(u[d])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var d4t={animation:{Feature:a0e},exit:{Feature:l0e}};function n_(i){return{point:{x:i.pageX,y:i.pageY}}}var h4t=i=>e=>eM(e)&&i(e,n_(e));function CT(i,e,t,n){return Z1(i,e,h4t(t),n)}var c0e=({current:i})=>i?i.ownerDocument.defaultView:null;var f4t=(i,e)=>Math.abs(i-e);function p4t(i,e){let t=f4t(i.x,e.x),n=f4t(i.y,e.y);return Math.sqrt(t**2+n**2)}var m4t=new Set(["auto","scroll"]),T8=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=u0e(this.lastRawMoveEventInfo,this.transformPagePoint));let p=vje(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=p4t(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!v)return;let{point:A}=p,{timestamp:w}=sc;this.history.push({...A,timestamp:w});let{onStart:C,onMove:_}=this.handlers;g||(C&&C(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=u0e(g,this.transformPagePoint),Gn.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();let{onEnd:v,onSessionEnd:A,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let C=vje(p.type==="pointercancel"?this.lastMoveEventInfo:u0e(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(p,C),A&&A(p,C)},!eM(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=r||window;let l=n_(e),c=u0e(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=sc;this.history=[{...u,timestamp:d}];let{onSessionStart:h}=t;h&&h(e,vje(c,this.history));let f={passive:!0,capture:!0};this.removeListeners=rA(CT(this.contextWindow,"pointermove",this.handlePointerMove,f),CT(this.contextWindow,"pointerup",this.handlePointerUp,f),CT(this.contextWindow,"pointercancel",this.handlePointerUp,f)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let n=getComputedStyle(t);(m4t.has(n.overflowX)||m4t.has(n.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:r.x-t.x,y:r.y-t.y};o.x===0&&o.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,r),Gn.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),wf(this.updatePoint)}};function u0e(i,e){return e?{point:e(i.point)}:i}function g4t(i,e){return{x:i.x-e.x,y:i.y-e.y}}function vje({point:i},e){return{point:i,delta:g4t(i,b4t(e)),offset:g4t(i,jOi(e)),velocity:QOi(e,.1)}}function jOi(i){return i[0]}function b4t(i){return i[i.length-1]}function QOi(i,e){if(i.length<2)return{x:0,y:0};let t=i.length-1,n=null,r=b4t(i);for(;t>=0&&(n=i[t],!(r.timestamp-n.timestamp>Mc(e)));)t--;if(!n)return{x:0,y:0};n===i[0]&&i.length>2&&r.timestamp-n.timestamp>Mc(e)*2&&(n=i[1]);let o=Pd(r.timestamp-n.timestamp);if(o===0)return{x:0,y:0};let s={x:(r.x-n.x)/o,y:(r.y-n.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function x4t(i,{min:e,max:t},n){return e!==void 0&&it&&(i=n?ar(t,i,n.max):Math.min(i,t)),i}function v4t(i,e,t){return{min:e!==void 0?i.min+e:void 0,max:t!==void 0?i.max+t-(i.max-i.min):void 0}}function C4t(i,{top:e,left:t,bottom:n,right:r}){return{x:v4t(i.x,t,r),y:v4t(i.y,e,n)}}function A4t(i,e){let t=e.min-i.min,n=e.max-i.max;return e.max-e.minn?t=q1(e.min,e.max-n,i.min):n>r&&(t=q1(i.min,i.max-r,e.min)),Ku(0,1,t)}function E4t(i,e){let t={};return e.min!==void 0&&(t.min=e.min-i.min),e.max!==void 0&&(t.max=e.max-i.min),t}var d0e=.35;function D4t(i=d0e){return i===!1?i=0:i===!0&&(i=d0e),{x:y4t(i,"left","right"),y:y4t(i,"top","bottom")}}function y4t(i,e,t){return{min:w4t(i,e),max:w4t(i,t)}}function w4t(i,e){return typeof i=="number"?i:i[e]||0}var GOi=new WeakMap,f0e=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ll(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let o=d=>{t&&this.snapToCursor(n_(d).point),this.stopAnimation()},s=(d,h)=>{let{drag:f,dragPropagation:p,onDragStart:g}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=OUe(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ib(A=>{let w=this.getAxisMotionValue(A).get()||0;if(xf.test(w)){let{projection:C}=this.visualElement;if(C&&C.layout){let _=C.layout.layoutBox[A];_&&(w=_u(_)*(parseFloat(w)/100))}}this.originPoint[A]=w}),g&&Gn.update(()=>g(d,h),!1,!0),m8(this.visualElement,"transform");let{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:g,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:A}=h;if(p&&this.currentDirection===null){this.currentDirection=YOi(A),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,A),this.updateAxis("y",h.point,A),this.visualElement.render(),v&&Gn.update(()=>v(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new T8(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:c0e(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;let{velocity:s}=r;this.startAnimation(s);let{onDragEnd:a}=this.getProps();a&&Gn.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!h0e(e,r,this.currentDirection))return;let o=this.getAxisMotionValue(e),s=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(s=x4t(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&xT(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=C4t(n.layoutBox,e):this.constraints=!1,this.elastic=D4t(t),r!==this.constraints&&!xT(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&ib(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=E4t(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xT(e))return!1;let n=e.current;Od(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let o=$Ue(n,r.root,this.visualElement.getTransformPagePoint()),s=_4t(r.layout.layoutBox,o);if(t){let a=t(qUe(s));this.hasMutatedConstraints=!!a,a&&(s=uG(a))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ib(u=>{if(!h0e(u,t,this.currentDirection))return;let d=l&&l[u]||{};(s===!0||s===u)&&(d={min:0,max:0});let h=r?200:1e6,f=r?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return m8(this.visualElement,e),n.start(J2(e,n,0,t,this.visualElement,!1))}stopAnimation(){ib(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps()[t];return r||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){ib(t=>{let{drag:n}=this.getProps();if(!h0e(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){let{min:s,max:a}=r.layout.layoutBox[t],l=o.get()||0;o.set(e[t]-ar(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!xT(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};ib(s=>{let a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){let l=a.get();r[s]=S4t({min:l,max:l},this.constraints[s])}});let{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ib(s=>{if(!h0e(s,e,null))return;let a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(ar(l,c,r[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;GOi.set(this.visualElement,this);let e=this.visualElement.current,t=CT(e,"pointerdown",c=>{let{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,f=h!==e&&VUe(h);u&&d&&!f&&this.start(c)}),n,r=()=>{let{dragConstraints:c}=this.getProps();xT(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=qOi(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Gn.read(r);let a=Z1(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(ib(d=>{let h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),t(),s(),l&&l(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:s=d0e,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:s,dragMomentum:a}}};function T4t(i){let e=!0;return()=>{if(e){e=!1;return}i()}}function qOi(i,e,t){let n=Vbe(i,T4t(t)),r=Vbe(e,T4t(t));return()=>{n(),r()}}function h0e(i,e,t){return(e===!0||e===i)&&(t===null||t===i)}function YOi(i,e=10){let t=null;return Math.abs(i.y)>e?t="y":Math.abs(i.x)>e&&(t="x"),t}var p0e=class extends Xu{constructor(e){super(e),this.removeGroupControls=Rl,this.removeListeners=Rl,this.controls=new f0e(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Rl}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var Aje=i=>(e,t)=>{i&&Gn.update(()=>i(e,t),!1,!0)},m0e=class extends Xu{constructor(){super(...arguments),this.removePointerDownListener=Rl}onPointerDown(e){this.session=new T8(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:c0e(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Aje(e),onStart:Aje(t),onMove:Aje(n),onEnd:(o,s)=>{delete this.session,r&&Gn.postRender(()=>r(o,s))}}}mount(){this.removePointerDownListener=CT(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var k4t=$(Hi(),1);var xG=$(Te(),1);var yje=!1,wje=class extends xG.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),yje&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),aM.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:s}=n;return s&&(s.isPresent=o,e.layoutDependency!==t&&s.setOptions({...s.options,layoutDependency:t}),yje=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Gn.postRender(()=>{let a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),$2.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;yje=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function g0e(i){let[e,t]=B3t(),n=(0,xG.useContext)(Kge);return(0,k4t.jsx)(wje,{...i,layoutGroup:n,switchLayoutGroup:(0,xG.useContext)(r0e),isPresent:e,safeToRemove:t})}var I4t={pan:{Feature:m0e},drag:{Feature:p0e,ProjectionNode:yG,MeasureLayout:g0e}};function L4t(i,e,t){let{props:n}=i;i.animationState&&n.whileHover&&i.animationState.setActive("whileHover",t==="Start");let r="onHover"+t,o=n[r];o&&Gn.postRender(()=>o(e,n_(e)))}var b0e=class extends Xu{mount(){let{current:e}=this.node;e&&(this.unmount=PUe(e,(t,n)=>(L4t(this.node,n,"Start"),r=>L4t(this.node,r,"End"))))}unmount(){}};var v0e=class extends Xu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=rA(Z1(this.node.current,"focus",()=>this.onFocus()),Z1(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function N4t(i,e,t){let{props:n}=i;if(i.current instanceof HTMLButtonElement&&i.current.disabled)return;i.animationState&&n.whileTap&&i.animationState.setActive("whileTap",t==="Start");let r="onTap"+(t==="End"?"":t),o=n[r];o&&Gn.postRender(()=>o(e,n_(e)))}var A0e=class extends Xu{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=WUe(e,(r,o)=>(N4t(this.node,o,"Start"),(s,{success:a})=>N4t(this.node,s,a?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}};var Cje=new WeakMap,xje=new WeakMap,KOi=i=>{let e=Cje.get(i.target);e&&e(i)},JOi=i=>{i.forEach(KOi)};function XOi({root:i,...e}){let t=i||document;xje.has(t)||xje.set(t,{});let n=xje.get(t),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(JOi,{root:i,...e})),n[r]}function M4t(i,e,t){let n=XOi(e);return Cje.set(i,t),n.observe(i),()=>{Cje.delete(i),n.unobserve(i)}}var ZOi={some:0,all:1},y0e=class extends Xu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,s={root:t?t.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:ZOi[r]},a=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};this.stopObserver=M4t(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some($Oi(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function $Oi({viewport:i={}},{viewport:e={}}={}){return t=>i[t]!==e[t]}var R4t={inView:{Feature:y0e},tap:{Feature:A0e},focus:{Feature:v0e},hover:{Feature:b0e}};var F4t={layout:{ProjectionNode:yG,MeasureLayout:g0e}};var O4t={...d4t,...R4t,...I4t,...F4t};var w0e=l4t(O4t,u4t);var k8=$(Te(),1);function x0e(i){let e=T0(()=>Em(i)),{isStatic:t}=(0,k8.useContext)(C8);if(t){let[,n]=(0,k8.useState)(i);(0,k8.useEffect)(()=>e.on("change",n),[])}return e}function C0e(i,e){let t=x0e(e()),n=()=>t.set(e());return n(),Xge(()=>{let r=()=>Gn.preRender(n,!1,!0),o=i.map(s=>s.on("change",r));return()=>{o.forEach(s=>s()),wf(n)}}),t}function P4t(i){K2.current=[],i();let e=C0e(K2.current,i);return K2.current=void 0,e}function _je(i,e,t,n){if(typeof i=="function")return P4t(i);if(t!==void 0&&!Array.isArray(t)&&typeof e!="function")return ePi(i,e,t,n);let s=typeof e=="function"?e:UUe(e,t,n),a=Array.isArray(i)?B4t(i,s):B4t([i],([c])=>s(c)),l=Array.isArray(i)?void 0:i.accelerate;return l&&!l.isTransformed&&typeof e!="function"&&Array.isArray(t)&&n?.clamp!==!1&&(a.accelerate={...l,times:e,keyframes:t,isTransformed:!0,...n?.ease?{ease:n.ease}:{}}),a}function B4t(i,e){let t=T0(()=>[]);return C0e(i,()=>{t.length=0;let n=i.length;for(let r=0;rObject.keys(t)),o=T0(()=>({}));for(let s of r)o[s]=_je(i,e,t[s],n);return o}var EG={};Ih(EG,{Group:()=>H4t,Item:()=>G4t});var Sje=$(Hi(),1);var uM=$(Te(),1);var z4t=$(Te(),1),_0e=(0,z4t.createContext)(null);function V4t(i,e,t,n){if(!n)return i;let r=i.findIndex(u=>u.value===e);if(r===-1)return i;let o=n>0?1:-1,s=i[r+o];if(!s)return i;let a=i[r],l=s.layout,c=ar(l.min,l.max,.5);return o===1&&a.layout.max+t>c||o===-1&&a.layout.min+tw0e[e]),l=[],c=(0,uM.useRef)(!1),u=(0,uM.useRef)(null);Od(!!r,"Reorder.Group must be provided a values prop","reorder-values");let d={axis:t,groupRef:u,registerItem:(p,g)=>{let v=l.findIndex(A=>p===A.value);v!==-1?l[v].layout=g[t]:l.push({value:p,layout:g[t]}),l.sort(iPi)},updateOrder:(p,g,v)=>{if(c.current)return;let A=V4t(l,p,g,v);if(l!==A){c.current=!0;let w=[...r];for(let C=0;C{c.current=!1});let h=p=>{u.current=p,typeof s=="function"?s(p):s&&(s.current=p)},f={overflowAnchor:"none",...o.style};return(0,Sje.jsx)(a,{...o,style:f,ref:h,ignoreStrict:!0,children:(0,Sje.jsx)(_0e.Provider,{value:d,children:i})})}var H4t=(0,uM.forwardRef)(tPi);function iPi(i,e){return i.layout.min-e.layout.min}var Q4t=$(Hi(),1);var S0e=$(Te(),1);var nPi=new Set(["auto","scroll"]),_G=new WeakMap,SG=new WeakMap,CG=null;function W4t(){if(CG){let i=Eje(CG,"y");i&&(SG.delete(i),_G.delete(i));let e=Eje(CG,"x");e&&e!==i&&(SG.delete(e),_G.delete(e)),CG=null}}function rPi(i,e){let t=getComputedStyle(i),n=e==="x"?t.overflowX:t.overflowY,r=i===document.body||i===document.documentElement;return nPi.has(n)||r}function Eje(i,e){let t=i?.parentElement;for(;t;){if(rPi(t,e))return t;t=t.parentElement}return null}function oPi(i,e,t){let n=e.getBoundingClientRect(),r=t==="x"?Math.max(0,n.left):Math.max(0,n.top),o=t==="x"?Math.min(window.innerWidth,n.right):Math.min(window.innerHeight,n.bottom),s=i-r,a=o-i;if(s<50){let l=1-s/50;return{amount:-25*l*l,edge:"start"}}else if(a<50){let l=1-a/50;return{amount:25*l*l,edge:"end"}}return{amount:0,edge:null}}function U4t(i,e,t,n){if(!i)return;CG=i;let r=Eje(i,t);if(!r)return;let o=e-(t==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=oPi(o,r,t);if(a===null){SG.delete(r),_G.delete(r);return}let l=SG.get(r),c=r===document.body||r===document.documentElement;if(l!==a){if(!(a==="start"&&n<0||a==="end"&&n>0))return;SG.set(r,a);let d=t==="x"?r.scrollWidth-(c?window.innerWidth:r.clientWidth):r.scrollHeight-(c?window.innerHeight:r.clientHeight);_G.set(r,d)}if(s>0){let u=_G.get(r);if((t==="x"?c?window.scrollX:r.scrollLeft:c?window.scrollY:r.scrollTop)>=u)return}t==="x"?c?window.scrollBy({left:s}):r.scrollLeft+=s:c?window.scrollBy({top:s}):r.scrollTop+=s}function j4t(i,e=0){return ss(i)?i:x0e(e)}function sPi({children:i,style:e={},value:t,as:n="li",onDrag:r,onDragEnd:o,layout:s=!0,...a},l){let c=T0(()=>w0e[n]),u=(0,S0e.useContext)(_0e),d={x:j4t(e.x),y:j4t(e.y)},h=_je([d.x,d.y],([A,w])=>A||w?1:"unset");Od(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");let{axis:f,registerItem:p,updateOrder:g,groupRef:v}=u;return(0,Q4t.jsx)(c,{drag:f,...a,dragSnapToOrigin:!0,style:{...e,x:d.x,y:d.y,zIndex:h},layout:s,onDrag:(A,w)=>{let{velocity:C,point:_}=w,E=d[f].get();g(t,E,C[f]),U4t(v.current,_[f],f,C[f]),r&&r(A,w)},onDragEnd:(A,w)=>{W4t(),o&&o(A,w)},onLayoutMeasure:A=>{p(t,A)},ref:l,ignoreStrict:!0,children:i})}var G4t=(0,S0e.forwardRef)(sPi);var q4t=(0,TG.forwardRef)((i,e)=>{let t=(0,DG.c)(16),n,r,o,s,a;t[0]!==i?({isActive:o,value:a,children:n,className:r,...s}=i,t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=a):(n=t[1],r=t[2],o=t[3],s=t[4],a=t[5]);let l=o&&"graphiql-tab-active",c;t[6]!==r||t[7]!==l?(c=zn("graphiql-tab",l,r),t[6]=r,t[7]=l,t[8]=c):c=t[8];let u;return t[9]!==n||t[10]!==o||t[11]!==s||t[12]!==e||t[13]!==c||t[14]!==a?(u=(0,I8.jsx)(EG.Item,{...s,ref:e,value:a,"aria-selected":o,dragElastic:!1,role:"tab",className:c,children:n}),t[9]=n,t[10]=o,t[11]=s,t[12]=e,t[13]=c,t[14]=a,t[15]=u):u=t[15],u});q4t.displayName="Tab";var Y4t=(0,TG.forwardRef)((i,e)=>{let t=(0,DG.c)(11),n,r,o;t[0]!==i?({children:n,className:r,...o}=i,t[0]=i,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);let s;t[4]!==r?(s=zn("graphiql-tab-button",r),t[4]=r,t[5]=s):s=t[5];let a;return t[6]!==n||t[7]!==o||t[8]!==e||t[9]!==s?(a=(0,I8.jsx)(ya,{...o,ref:e,type:"button",className:s,children:n}),t[6]=n,t[7]=o,t[8]=e,t[9]=s,t[10]=a):a=t[10],a});Y4t.displayName="Tab.Button";var K4t=(0,TG.forwardRef)((i,e)=>{let t=(0,DG.c)(7),n;t[0]!==i.className?(n=zn("graphiql-tab-close",i.className),t[0]=i.className,t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,I8.jsx)(UT,{}),t[2]=r):r=t[2];let o;return t[3]!==i||t[4]!==e||t[5]!==n?(o=(0,I8.jsx)(ya,{"aria-label":"Close Tab",...i,ref:e,type:"button",className:n,children:r}),t[3]=i,t[4]=e,t[5]=n,t[6]=o):o=t[6],o});K4t.displayName="Tab.Close";var kG=Object.assign(q4t,{Button:Y4t,Close:K4t}),E0e=(0,TG.forwardRef)((i,e)=>{let t=(0,DG.c)(15),n,r,o,s,a;t[0]!==i?({values:a,onReorder:o,children:n,className:r,...s}=i,t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=a):(n=t[1],r=t[2],o=t[3],s=t[4],a=t[5]);let l;t[6]!==r?(l=zn("graphiql-tabs",r),t[6]=r,t[7]=l):l=t[7];let c;return t[8]!==n||t[9]!==o||t[10]!==s||t[11]!==e||t[12]!==l||t[13]!==a?(c=(0,I8.jsx)(EG.Group,{...s,ref:e,values:a,onReorder:o,axis:"x",role:"tablist",className:l,children:n}),t[8]=n,t[9]=o,t[10]=s,t[11]=e,t[12]=l,t[13]=a,t[14]=c):c=t[14],c});E0e.displayName="Tabs";var d8t=$(c8t()),h8t=({title:i,titleId:e,...t})=>Cf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:5,height:8,fill:"currentColor",viewBox:"0 0 5 8","aria-labelledby":e,...t},i?Cf.createElement("title",{id:e},i):null,Cf.createElement("path",{d:"m.91 6.87 2.98-2.98a.533.533 0 0 0 0-.754L.91.157A.533.533 0 0 0 0 .534v5.959c0 .475.574.713.91.377"})),LPi=({title:i,titleId:e,...t})=>Cf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24","aria-labelledby":e,...t},i?Cf.createElement("title",{id:e},i):null,Cf.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6h2m2 0h-2m0 0V4m0 2v2"}),Cf.createElement("path",{d:"M21.4 20H2.6a.6.6 0 0 1-.6-.6V11h19.4a.6.6 0 0 1 .6.6v7.8a.6.6 0 0 1-.6.6Z"}),Cf.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2 11V4.6a.6.6 0 0 1 .6-.6h6.178a.6.6 0 0 1 .39.144l3.164 2.712a.6.6 0 0 0 .39.144H14"})),NPi=({title:i,titleId:e,...t})=>Cf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,fill:"none",stroke:"currentColor",viewBox:"0 0 15 15","aria-labelledby":e,...t},i?Cf.createElement("title",{id:e},i):null,Cf.createElement("circle",{cx:7.5,cy:7.5,r:6,strokeWidth:2})),MPi=({title:i,titleId:e,...t})=>Cf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,fill:"currentColor",viewBox:"0 0 15 15","aria-labelledby":e,...t},i?Cf.createElement("title",{id:e},i):null,Cf.createElement("circle",{cx:7.5,cy:7.5,r:7.5}),Cf.createElement("path",{stroke:"#fff",strokeWidth:1.5,d:"M4.646 7.001 6.88 9.233l3.622-3.62"})),RPi={keyword:"hsl(var(--color-primary))",def:"hsl(var(--color-tertiary))",property:"hsl(var(--color-info))",qualifier:"hsl(var(--color-secondary))",attribute:"hsl(var(--color-tertiary))",number:"hsl(var(--color-success))",string:"hsl(var(--color-warning))",builtin:"hsl(var(--color-success))",string2:"hsl(var(--color-secondary))",variable:"hsl(var(--color-secondary))",atom:"hsl(var(--color-tertiary))"},FPi=(0,dM.jsx)(h8t,{style:{width:"var(--px-16)",transform:"rotate(90deg)"}}),OPi=(0,dM.jsx)(h8t,{style:{width:"var(--px-16)"}}),PPi=(0,dM.jsx)(NPi,{style:{marginRight:"var(--px-4)"}}),BPi=(0,dM.jsx)(MPi,{style:{fill:"hsl(var(--color-info))",marginRight:"var(--px-4)"}}),zPi={buttonStyle:{cursor:"pointer",fontSize:"2em",lineHeight:0},explorerActionsStyle:{paddingTop:"var(--px-16)"},actionButtonStyle:{}},VPi=i=>{let{setOperationName:e,run:t}=Ic(),n=Or(a=>a.schema),r=(0,u8t.useCallback)(a=>{a&&e(a),t()},[t,e]),[o,s]=Y9e(q9e());return(0,dM.jsx)(d8t.Explorer,{schema:n,onRunOperation:r,explorerIsOpen:!0,colors:RPi,arrowOpen:FPi,arrowClosed:OPi,checkboxUnchecked:PPi,checkboxChecked:BPi,styles:zPi,query:o,onEdit:s,...i})};function f8t(i){return{title:"GraphiQL Explorer",icon:LPi,content:()=>(0,dM.jsx)(VPi,{...i})}}var qn=$(Hi()),WQe=$(ur()),u_=$(Te());var Go=$(Hi()),Rje=$(ur()),r_=$(Te());var p8t=$(ur()),Ije=$(Te());var Lje=M_((i,e)=>({historyStorage:null,actions:{addToHistory(t){let{historyStorage:n}=e();n?.updateHistory(t),i({})},editLabel(t,n){let{historyStorage:r}=e();r?.editLabel(t,n),i({})},toggleFavorite(t){let{historyStorage:n}=e();n?.toggleFavorite(t),i({})},setActive:t=>t,deleteFromHistory(t,n){let{historyStorage:r}=e();r?.deleteHistory(t,n),i({})}}})),Nje=i=>{let e=(0,p8t.c)(11),{maxHistoryLength:t,children:n}=i,r=t===void 0?20:t,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Nl("isFetching","tabs","activeTabIndex","storage"),e[0]=o):o=e[0];let{isFetching:s,tabs:a,activeTabIndex:l,storage:c}=Or(o),u=a[l],d;e[1]!==r||e[2]!==c?(d=new sX(c,r),e[1]=r,e[2]=c,e[3]=d):d=e[3];let h=d,f,p;e[4]!==h?(f=()=>{Lje.setState({historyStorage:h})},p=[h],e[4]=h,e[5]=f,e[6]=p):(f=e[5],p=e[6]),(0,Ije.useEffect)(f,p);let g,v;return e[7]!==u||e[8]!==s?(g=()=>{if(!s)return;let{addToHistory:A}=Lje.getState().actions;A({query:u.query??void 0,variables:u.variables??void 0,headers:u.headers??void 0,operationName:u.operationName??void 0})},v=[s,u],e[7]=u,e[8]=s,e[9]=g,e[10]=v):(g=e[9],v=e[10]),(0,Ije.useEffect)(g,v),n},m8t=Hk(Lje),HPi=[],Mje=()=>m8t(WPi),L0e=()=>m8t(UPi);function WPi(i){var e;return((e=i.historyStorage)==null?void 0:e.queries)??HPi}function UPi(i){return i.actions}function jPi(i,e){for(let t of i)e(t,!0)}var g8t=()=>{let i=(0,Rje.c)(16),e=Mje(),{deleteFromHistory:t}=L0e(),n=e.slice().map(GPi).reverse(),r=n.filter(qPi);r.length&&(n=n.filter(YPi));let[o,s]=(0,r_.useState)(null),a,l;i[0]!==o?(a=()=>{o&&setTimeout(()=>{s(null)},2e3)},l=[o],i[0]=o,i[1]=a,i[2]=l):(a=i[1],l=i[2]),(0,r_.useEffect)(a,l);let c=()=>{try{jPi(n,t),s("success")}catch{s("error")}},u=!!r.length,d=!!n.length,h="History",f="graphiql-history",p=(o||d)&&(0,Go.jsx)(vf,{type:"button",state:o||void 0,disabled:!n.length,onClick:c,children:{success:"Cleared",error:"Failed to Clear"}[o]||"Clear"}),g;i[3]!==p?(g=(0,Go.jsxs)("div",{className:"graphiql-history-header",children:["History",p]}),i[3]=p,i[4]=g):g=i[4];let v=u&&(0,Go.jsx)("ul",{className:"graphiql-history-items",children:r.map(KPi)}),A;i[5]!==u||i[6]!==d?(A=u&&d&&(0,Go.jsx)("div",{className:"graphiql-history-item-spacer"}),i[5]=u,i[6]=d,i[7]=A):A=i[7];let w;i[8]!==d||i[9]!==n?(w=d&&(0,Go.jsx)("ul",{className:"graphiql-history-items",children:n.map(JPi)}),i[8]=d,i[9]=n,i[10]=w):w=i[10];let C;return i[11]!==g||i[12]!==v||i[13]!==A||i[14]!==w?(C=(0,Go.jsxs)("section",{"aria-label":h,className:f,children:[g,v,A,w]}),i[11]=g,i[12]=v,i[13]=A,i[14]=w,i[15]=C):C=i[15],C},b8t=i=>{let e=(0,Rje.c)(39),{editLabel:t,toggleFavorite:n,deleteFromHistory:r,setActive:o}=L0e(),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Nl("headerEditor","queryEditor","variableEditor"),e[0]=s):s=e[0];let{headerEditor:a,queryEditor:l,variableEditor:c}=Or(s),u=(0,r_.useRef)(null),d=(0,r_.useRef)(null),[h,f]=(0,r_.useState)(!1),p,g;e[1]!==h?(p=()=>{var se;h&&((se=u.current)==null||se.focus())},g=[h],e[1]=h,e[2]=p,e[3]=g):(p=e[2],g=e[3]),(0,r_.useEffect)(p,g);let v;e[4]!==i.item.label||e[5]!==i.item.operationName||e[6]!==i.item.query?(v=i.item.label||i.item.operationName||QPi(i.item.query),e[4]=i.item.label,e[5]=i.item.operationName,e[6]=i.item.query,e[7]=v):v=e[7];let A=v,w;e[8]!==t||e[9]!==i.item?(w=()=>{var se;f(!1);let{index:le,...oe}=i.item;t({...oe,label:(se=u.current)==null?void 0:se.value},le)},e[8]=t,e[9]=i.item,e[10]=w):w=e[10];let C=w,_;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{f(!1)},e[11]=_):_=e[11];let E=_,I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=se=>{se.stopPropagation(),f(!0)},e[12]=I):I=e[12];let T=I,L;e[13]!==a||e[14]!==i.item||e[15]!==l||e[16]!==o||e[17]!==c?(L=()=>{let{query:se,variables:le,headers:oe}=i.item;l?.setValue(se??""),c?.setValue(le??""),a?.setValue(oe??""),o(i.item)},e[13]=a,e[14]=i.item,e[15]=l,e[16]=o,e[17]=c,e[18]=L):L=e[18];let M=L,z;e[19]!==r||e[20]!==i.item?(z=se=>{se.stopPropagation(),r(i.item)},e[19]=r,e[20]=i.item,e[21]=z):z=e[21];let H=z,B;e[22]!==i.item||e[23]!==n?(B=se=>{se.stopPropagation(),n(i.item)},e[22]=i.item,e[23]=n,e[24]=B):B=e[24];let q=B,U=h&&"editable",F;e[25]!==U?(F=zn("graphiql-history-item",U),e[25]=U,e[26]=F):F=e[26];let ne;e[27]!==A||e[28]!==t||e[29]!==H||e[30]!==M||e[31]!==C||e[32]!==q||e[33]!==h||e[34]!==i.item?(ne=h?(0,Go.jsxs)(Go.Fragment,{children:[(0,Go.jsx)("input",{type:"text",defaultValue:i.item.label,ref:u,onKeyDown:se=>{se.key==="Esc"?f(!1):se.key==="Enter"&&(f(!1),t({...i.item,label:se.currentTarget.value}))},placeholder:"Type a label"}),(0,Go.jsx)(ya,{type:"button",ref:d,onClick:C,children:"Save"}),(0,Go.jsx)(ya,{type:"button",ref:d,onClick:E,children:(0,Go.jsx)(UT,{})})]}):(0,Go.jsxs)(Go.Fragment,{children:[(0,Go.jsx)(Au,{label:"Set active",children:(0,Go.jsx)(ya,{type:"button",className:"graphiql-history-item-label",onClick:M,"aria-label":"Set active",children:A})}),(0,Go.jsx)(Au,{label:"Edit label",children:(0,Go.jsx)(ya,{type:"button",className:"graphiql-history-item-action",onClick:T,"aria-label":"Edit label",children:(0,Go.jsx)(VAe,{"aria-hidden":"true"})})}),(0,Go.jsx)(Au,{label:i.item.favorite?"Remove favorite":"Add favorite",children:(0,Go.jsx)(ya,{type:"button",className:"graphiql-history-item-action",onClick:q,"aria-label":i.item.favorite?"Remove favorite":"Add favorite",children:i.item.favorite?(0,Go.jsx)(qAe,{"aria-hidden":"true"}):(0,Go.jsx)(YAe,{"aria-hidden":"true"})})}),(0,Go.jsx)(Au,{label:"Delete from history",children:(0,Go.jsx)(ya,{type:"button",className:"graphiql-history-item-action",onClick:H,"aria-label":"Delete from history",children:(0,Go.jsx)(JAe,{"aria-hidden":"true"})})})]}),e[27]=A,e[28]=t,e[29]=H,e[30]=M,e[31]=C,e[32]=q,e[33]=h,e[34]=i.item,e[35]=ne):ne=e[35];let ce;return e[36]!==F||e[37]!==ne?(ce=(0,Go.jsx)("li",{className:F,children:ne}),e[36]=F,e[37]=ne,e[38]=ce):ce=e[38],ce};function QPi(i){return i?.split(` -`).map(e=>e.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}function GPi(i,e){return{...i,index:e}}function qPi(i){return i.favorite}function YPi(i){return!i.favorite}function KPi(i){return(0,Go.jsx)(b8t,{item:i},i.index)}function JPi(i){return(0,Go.jsx)(b8t,{item:i},i.index)}var Fje={title:"History",icon:FAe,content:g8t};var PQe=$(Hi()),S9t=$(ur()),Lm=$(na()),yve=$(Te());var v8t=$(na());function A8t(i,e){if(i==="Field"&&e.fieldDef||i==="AliasedField"&&e.fieldDef||i==="ObjectField"&&e.fieldDef)return $Pi(e,i==="ObjectField");if(i==="Directive"&&e.directiveDef)return ZPi(e);if(i==="Argument"&&e.argDef)return XPi(e);if(i==="EnumValue"&&e.enumValue)return tBi(e);if(i==="NamedType"&&e.type)return eBi(e)}function XPi(i){return i.directiveDef?{kind:"Argument",schema:i.schema,argument:i.argDef,directive:i.directiveDef}:{kind:"Argument",schema:i.schema,argument:i.argDef,field:i.fieldDef,type:y8t(i.fieldDef)?null:i.parentType}}function ZPi(i){return{kind:"Directive",schema:i.schema,directive:i.directiveDef}}function $Pi(i,e=!1){let t=e?i.inputObjectType:i.parentType;return{kind:"Field",schema:i.schema,field:i.fieldDef,type:y8t(i.fieldDef)?null:t}}function eBi(i,e){return{kind:"Type",schema:i.schema,type:e||i.type}}function tBi(i){return{kind:"EnumValue",value:i.enumValue||void 0,type:i.inputType?(0,v8t.getNamedType)(i.inputType):void 0}}function y8t(i){return i.name.slice(0,2)==="__"}var Dh=$(Hi()),x9t=$(ur()),C9t=$(na());var Fc=$(Hi()),O0e=$(ur()),I8t=$(Te());var lA=$(Hi()),_8t=$(ur());var N8=$(Hi()),w8t=$(ur()),N0e=$(na()),iBi=i=>i?(0,N0e.print)(i):"",M0e=i=>{let e=(0,w8t.c)(12),{field:t}=i;if(!("defaultValue"in t)||t.defaultValue===void 0)return null;let n=t.defaultValue,r=t.type,o,s,a,l;if(e[0]!==t.defaultValue||e[1]!==t.type){l=Symbol.for("react.early_return_sentinel");e:{let d=(0,N0e.astFromValue)(n,r);if(!d){l=null;break e}a=" = ",o="graphiql-doc-explorer-default-value",s=iBi(d)}e[0]=t.defaultValue,e[1]=t.type,e[2]=o,e[3]=s,e[4]=a,e[5]=l}else o=e[2],s=e[3],a=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;e[6]!==o||e[7]!==s?(c=(0,N8.jsx)("span",{className:o,children:s}),e[6]=o,e[7]=s,e[8]=c):c=e[8];let u;return e[9]!==a||e[10]!==c?(u=(0,N8.jsxs)(N8.Fragment,{children:[a,c]}),e[9]=a,e[10]=c,e[11]=u):u=e[11],u};var x8t=$(Hi()),C8t=$(ur());var M8=$(Hi()),R0e=$(na());function R8(i,e){return(0,R0e.isNonNullType)(i)?(0,M8.jsxs)(M8.Fragment,{children:[R8(i.ofType,e),"!"]}):(0,R0e.isListType)(i)?(0,M8.jsxs)(M8.Fragment,{children:["[",R8(i.ofType,e),"]"]}):e(i)}var nb=i=>{let e=(0,C8t.c)(5),{type:t}=i,{push:n}=o_(),r;e[0]!==n?(r=s=>(0,x8t.jsx)("a",{className:"graphiql-doc-explorer-type-name",onClick:a=>{a.preventDefault(),n({name:s.name,def:s})},href:"#",children:s.name}),e[0]=n,e[1]=r):r=e[1];let o;return e[2]!==r||e[3]!==t?(o=R8(t,r),e[2]=r,e[3]=t,e[4]=o):o=e[4],o};var F8=i=>{let e=(0,_8t.c)(19),{arg:t,showDefaultValue:n,inline:r}=i,o;e[0]!==t.name?(o=(0,lA.jsx)("span",{className:"graphiql-doc-explorer-argument-name",children:t.name}),e[0]=t.name,e[1]=o):o=e[1];let s;e[2]!==t.type?(s=(0,lA.jsx)(nb,{type:t.type}),e[2]=t.type,e[3]=s):s=e[3];let a;e[4]!==t||e[5]!==n?(a=n!==!1&&(0,lA.jsx)(M0e,{field:t}),e[4]=t,e[5]=n,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==s||e[9]!==a?(l=(0,lA.jsxs)("span",{children:[o,": ",s,a]}),e[7]=o,e[8]=s,e[9]=a,e[10]=l):l=e[10];let c=l;if(r)return c;let u;e[11]!==t.description?(u=t.description?(0,lA.jsx)(yf,{type:"description",children:t.description}):null,e[11]=t.description,e[12]=u):u=e[12];let d;e[13]!==t.deprecationReason?(d=t.deprecationReason?(0,lA.jsxs)("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[(0,lA.jsx)("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),(0,lA.jsx)(yf,{type:"deprecation",children:t.deprecationReason})]}):null,e[13]=t.deprecationReason,e[14]=d):d=e[14];let h;return e[15]!==c||e[16]!==u||e[17]!==d?(h=(0,lA.jsxs)("div",{className:"graphiql-doc-explorer-argument",children:[c,u,d]}),e[15]=c,e[16]=u,e[17]=d,e[18]=h):h=e[18],h};var LG=$(Hi()),S8t=$(ur());var F0e=i=>{let e=(0,S8t.c)(3),t;return e[0]!==i.children||e[1]!==i.preview?(t=i.children?(0,LG.jsxs)("div",{className:"graphiql-doc-explorer-deprecation",children:[(0,LG.jsx)("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),(0,LG.jsx)(yf,{type:"deprecation",onlyShowFirstChild:i.preview??!0,children:i.children})]}):null,e[0]=i.children,e[1]=i.preview,e[2]=t):t=e[2],t};var E8t=$(Hi()),D8t=$(ur()),T8t=i=>{let e=(0,D8t.c)(2),{directive:t}=i,n;return e[0]!==t.name.value?(n=(0,E8t.jsxs)("span",{className:"graphiql-doc-explorer-directive",children:["@",t.name.value]}),e[0]=t.name.value,e[1]=n):n=e[1],n};var O8=$(Hi()),k8t=$(ur());var yp=i=>{let e=(0,k8t.c)(10),{title:t,children:n}=i,r=nBi[t],o;e[0]!==r?(o=(0,O8.jsx)(r,{}),e[0]=r,e[1]=o):o=e[1];let s;e[2]!==o||e[3]!==t?(s=(0,O8.jsxs)("div",{className:"graphiql-doc-explorer-section-title",children:[o,t]}),e[2]=o,e[3]=t,e[4]=s):s=e[4];let a;e[5]!==n?(a=(0,O8.jsx)("div",{className:"graphiql-doc-explorer-section-content",children:n}),e[5]=n,e[6]=a):a=e[6];let l;return e[7]!==s||e[8]!==a?(l=(0,O8.jsxs)("div",{children:[s,a]}),e[7]=s,e[8]=a,e[9]=l):l=e[9],l},nBi={Arguments:xAe,"Deprecated Arguments":DAe,"Deprecated Enum Values":TAe,"Deprecated Fields":kAe,Directives:IAe,"Enum Values":MAe,Fields:RAe,Implements:OAe,Implementations:NM,"Possible Types":NM,"Root Types":QAe,Type:NM,"All Schema Types":NM};var L8t=i=>{let e=(0,O0e.c)(15),{field:t}=i,n;e[0]!==t.description?(n=t.description?(0,Fc.jsx)(yf,{type:"description",children:t.description}):null,e[0]=t.description,e[1]=n):n=e[1];let r;e[2]!==t.deprecationReason?(r=(0,Fc.jsx)(F0e,{preview:!1,children:t.deprecationReason}),e[2]=t.deprecationReason,e[3]=r):r=e[3];let o;e[4]!==t.type?(o=(0,Fc.jsx)(yp,{title:"Type",children:(0,Fc.jsx)(nb,{type:t.type})}),e[4]=t.type,e[5]=o):o=e[5];let s,a;e[6]!==t?(s=(0,Fc.jsx)(rBi,{field:t}),a=(0,Fc.jsx)(oBi,{field:t}),e[6]=t,e[7]=s,e[8]=a):(s=e[7],a=e[8]);let l;return e[9]!==n||e[10]!==r||e[11]!==o||e[12]!==s||e[13]!==a?(l=(0,Fc.jsxs)(Fc.Fragment,{children:[n,r,o,s,a]}),e[9]=n,e[10]=r,e[11]=o,e[12]=s,e[13]=a,e[14]=l):l=e[14],l},rBi=i=>{let e=(0,O0e.c)(12),{field:t}=i,[n,r]=(0,I8t.useState)(!1),o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{r(!0)},e[0]=o):o=e[0];let s=o;if(!("args"in t))return null;let a,l,c;if(e[1]!==t.args){a=[],l=[];for(let h of t.args)h.deprecationReason?l.push(h):a.push(h);c=a.length>0?(0,Fc.jsx)(yp,{title:"Arguments",children:a.map(sBi)}):null,e[1]=t.args,e[2]=a,e[3]=l,e[4]=c}else a=e[2],l=e[3],c=e[4];let u;e[5]!==a.length||e[6]!==l||e[7]!==n?(u=l.length>0?n||a.length===0?(0,Fc.jsx)(yp,{title:"Deprecated Arguments",children:l.map(aBi)}):(0,Fc.jsx)(vf,{type:"button",onClick:s,children:"Show Deprecated Arguments"}):null,e[5]=a.length,e[6]=l,e[7]=n,e[8]=u):u=e[8];let d;return e[9]!==c||e[10]!==u?(d=(0,Fc.jsxs)(Fc.Fragment,{children:[c,u]}),e[9]=c,e[10]=u,e[11]=d):d=e[11],d},oBi=i=>{var e;let t=(0,O0e.c)(4),{field:n}=i,r=(e=n.astNode)==null?void 0:e.directives;if(!r?.length)return null;let o;t[0]!==r?(o=r.map(lBi),t[0]=r,t[1]=o):o=t[1];let s;return t[2]!==o?(s=(0,Fc.jsx)(yp,{title:"Directives",children:o}),t[2]=o,t[3]=s):s=t[3],s};function sBi(i){return(0,Fc.jsx)(F8,{arg:i},i.name)}function aBi(i){return(0,Fc.jsx)(F8,{arg:i},i.name)}function lBi(i){return(0,Fc.jsx)("div",{children:(0,Fc.jsx)(T8t,{directive:i})},i.name.value)}var Su=$(Hi()),N8t=$(ur());var M8t=i=>{let e=(0,N8t.c)(35),{schema:t}=i,n;e[0]!==t?(n=t.getQueryType(),e[0]=t,e[1]=n):n=e[1];let r=n,o;e[2]!==t?(o=t.getMutationType(),e[2]=t,e[3]=o):o=e[3];let s=o,a;e[4]!==t?(a=t.getSubscriptionType(),e[4]=t,e[5]=a):a=e[5];let l=a,c,u,d,h,f;if(e[6]!==s||e[7]!==r||e[8]!==t||e[9]!==l){let v=t.getTypeMap(),A=[r?.name,s?.name,l?.name],w=t.description||"A GraphQL schema provides a root type for each kind of operation.";e[15]!==w?(d=(0,Su.jsx)(yf,{type:"description",children:w}),e[15]=w,e[16]=d):d=e[16];let C;e[17]!==r?(C=r?(0,Su.jsxs)("div",{children:[(0,Su.jsx)("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",(0,Su.jsx)(nb,{type:r})]}):null,e[17]=r,e[18]=C):C=e[18];let _;e[19]!==s?(_=s&&(0,Su.jsxs)("div",{children:[(0,Su.jsx)("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",(0,Su.jsx)(nb,{type:s})]}),e[19]=s,e[20]=_):_=e[20];let E;e[21]!==l?(E=l&&(0,Su.jsxs)("div",{children:[(0,Su.jsx)("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",(0,Su.jsx)(nb,{type:l})]}),e[21]=l,e[22]=E):E=e[22],e[23]!==_||e[24]!==E||e[25]!==C?(h=(0,Su.jsxs)(yp,{title:"Root Types",children:[C,_,E]}),e[23]=_,e[24]=E,e[25]=C,e[26]=h):h=e[26],c=yp,u="All Schema Types",f=(0,Su.jsx)("div",{children:Object.values(v).map(I=>A.includes(I.name)||I.name.startsWith("__")?null:(0,Su.jsx)("div",{children:(0,Su.jsx)(nb,{type:I})},I.name))}),e[6]=s,e[7]=r,e[8]=t,e[9]=l,e[10]=c,e[11]=u,e[12]=d,e[13]=h,e[14]=f}else c=e[10],u=e[11],d=e[12],h=e[13],f=e[14];let p;e[27]!==c||e[28]!==u||e[29]!==f?(p=(0,Su.jsx)(c,{title:u,children:f}),e[27]=c,e[28]=u,e[29]=f,e[30]=p):p=e[30];let g;return e[31]!==d||e[32]!==h||e[33]!==p?(g=(0,Su.jsxs)(Su.Fragment,{children:[d,h,p]}),e[31]=d,e[32]=h,e[33]=p,e[34]=g):g=e[34],g};var Ha=$(Hi()),rq=$(ur()),l_=$(na()),MT=$(Te());var Dm=i=>cBi(i)?i.document:uBi(i)?i:i?.ownerDocument??(typeof document<"u"?document:void 0),P8=i=>Dm(i)?.defaultView??(typeof window<"u"?window:void 0);function R8t(i){return i!==null&&typeof i=="object"&&"nodeType"in i&&typeof i.nodeType=="number"}function cBi(i){return typeof i=="object"&&i!=null&&"window"in i&&i.window===i}function uBi(i){return R8t(i)&&i.nodeType===9}function F8t(i){return R8t(i)&&i.nodeType===11&&"host"in i}var dBi=!1;function NG(){return dBi}function s_(i,e){if(!NG())return e&&i?i.contains(e):!1;if(!i||!e)return!1;let t=e;for(;t!==null;){if(t===i)return!0;typeof t.assignedElements!="function"&&t.assignedSlot?.parentNode?t=t.assignedSlot.parentNode:F8t(t)?t=t.host:t=t.parentNode}return!1}var $1=(i=document)=>{if(!NG())return i.activeElement;let e=i.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function Oc(i){if(NG()&&i.target instanceof Element&&i.target.shadowRoot){if("composedPath"in i)return i.composedPath()[0]??null;if("composedPath"in i.nativeEvent)return i.nativeEvent.composedPath()[0]??null}return i.target}function O8t(i){if(hBi())i.focus({preventScroll:!0});else{let e=fBi(i);i.focus(),pBi(e)}}var P0e=null;function hBi(){if(P0e==null){P0e=!1;try{document.createElement("div").focus({get preventScroll(){return P0e=!0,!0}})}catch{}}return P0e}function fBi(i){let e=i.parentNode,t=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight{};var B0e=$(Te(),1);function Oje(i){let e=i;return e.nativeEvent=i,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function z8t(i,e){Object.defineProperty(i,"target",{value:e}),Object.defineProperty(i,"currentTarget",{value:e})}function z0e(i){let e=(0,B0e.useRef)({isFocused:!1,observer:null});return B8t(()=>{let t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]),(0,B0e.useCallback)(t=>{let n=Oc(t);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){e.current.isFocused=!0;let r=n,o=s=>{if(e.current.isFocused=!1,r.disabled){let a=Oje(s);i?.(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&r.disabled){e.current.observer?.disconnect();let s=r===$1()?null:$1();r.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[i])}var Pje=!1;function V0e(i){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(t=>i.test(t.brand))||i.test(window.navigator.userAgent)}function Bje(i){return typeof window<"u"&&window.navigator!=null?i.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function ew(i){let e=null;return()=>(e==null&&(e=i()),e)}var hM=ew(function(){return Bje(/^Mac/i)}),mBi=ew(function(){return Bje(/^iPhone/i)}),zje=ew(function(){return Bje(/^iPad/i)||hM()&&navigator.maxTouchPoints>1}),V8t=ew(function(){return mBi()||zje()}),Rno=ew(function(){return hM()||V8t()}),H0e=ew(function(){return V0e(/AppleWebKit/i)&&(V8t()||!H8t())}),Fno=ew(function(){return H0e()&&!H8t()&&!Vje()}),H8t=ew(function(){return V0e(/Chrome|CriOS|CrMo/i)}),W8t=ew(function(){return V0e(/Android/i)}),Vje=ew(function(){return V0e(/(Firefox|FxiOS)/i)});function U8t(i){return i.pointerType===""&&i.isTrusted?!0:W8t()&&i.pointerType?i.type==="click"&&i.buttons===1:i.detail===0&&!i.pointerType}var W0e=$(Te(),1);function B8(i,e,t=!0){let{metaKey:n,ctrlKey:r,altKey:o,shiftKey:s}=e;!H0e()&&Vje()&&window.event?.type?.startsWith("key")&&i.target==="_blank"&&(hM()?n=!0:r=!0);let a=H0e()&&hM()&&!zje()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:r,altKey:o,shiftKey:s}):new MouseEvent("click",{metaKey:n,ctrlKey:r,altKey:o,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});B8.isOpening=t,O8t(i),i.dispatchEvent(a),B8.isOpening=!1}B8.isOpening=!1;var jje=$(Te(),1),RG=null,j0e="keyboard",Hje=new Set,MG=new Map,fM=!1,Wje=!1,gBi={Tab:!0,Escape:!0};function Qje(i,e){for(let t of Hje)t(i,e)}function bBi(i){return!(i.metaKey||!hM()&&i.altKey||i.ctrlKey||i.key==="Control"||i.key==="Shift"||i.key==="Meta")}function U0e(i){fM=!0,!B8.isOpening&&bBi(i)&&(RG="keyboard",j0e="keyboard",Qje("keyboard",i))}function z8(i){RG="pointer",j0e="pointerType"in i?i.pointerType:"mouse",(i.type==="mousedown"||i.type==="pointerdown")&&(fM=!0,Qje("pointer",i))}function j8t(i){!B8.isOpening&&U8t(i)&&(fM=!0,RG="virtual",j0e="virtual")}function Q8t(i){let e=P8(Oc(i)),t=Dm(Oc(i));Oc(i)===e||Oc(i)===t||Pje||!i.isTrusted||(!fM&&!Wje&&(RG="virtual",j0e="virtual",Qje("virtual",i)),fM=!1,Wje=!1)}function G8t(){Pje||(fM=!1,Wje=!0)}function Uje(i){if(typeof window>"u"||typeof document>"u")return;let e=P8(i),t=Dm(i);if(MG.get(e))return;let n=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){fM=!0,n.apply(this,arguments)}}),t.addEventListener("keydown",U0e,!0),t.addEventListener("keyup",U0e,!0),t.addEventListener("click",j8t,!0),e.addEventListener("focus",Q8t,!0),e.addEventListener("blur",G8t,!1),typeof PointerEvent<"u"&&(t.addEventListener("pointerdown",z8,!0),t.addEventListener("pointermove",z8,!0),t.addEventListener("pointerup",z8,!0)),e.addEventListener("beforeunload",()=>{q8t(i)},{once:!0}),MG.set(e,{focus:n})}var q8t=(i,e)=>{let t=P8(i),n=Dm(i);e&&n.removeEventListener("DOMContentLoaded",e),MG.has(t)&&(Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:MG.get(t).focus}),n.removeEventListener("keydown",U0e,!0),n.removeEventListener("keyup",U0e,!0),n.removeEventListener("click",j8t,!0),t.removeEventListener("focus",Q8t,!0),t.removeEventListener("blur",G8t,!1),typeof PointerEvent<"u"&&(n.removeEventListener("pointerdown",z8,!0),n.removeEventListener("pointermove",z8,!0),n.removeEventListener("pointerup",z8,!0)),MG.delete(t))};function vBi(i){let e=Dm(i),t;return e.readyState!=="loading"?Uje(i):(t=()=>{Uje(i)},e.addEventListener("DOMContentLoaded",t)),()=>q8t(i,t)}typeof document<"u"&&vBi();function Q0e(){return RG!=="pointer"}var ABi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yBi(i,e,t){let n=t?Oc(t):void 0,r=Dm(n),o=P8(n),s=typeof o<"u"?o.HTMLInputElement:HTMLInputElement,a=typeof o<"u"?o.HTMLTextAreaElement:HTMLTextAreaElement,l=typeof o<"u"?o.HTMLElement:HTMLElement,c=typeof o<"u"?o.KeyboardEvent:KeyboardEvent,u=$1(r);return i=i||u instanceof s&&!ABi.has(u.type)||u instanceof a||u instanceof l&&u.isContentEditable,!(i&&e==="keyboard"&&t instanceof c&&!gBi[t.key])}function Y8t(i,e,t){Uje(),(0,jje.useEffect)(()=>{if(t?.enabled===!1)return;let n=(r,o)=>{yBi(!!t?.isTextInput,r,o)&&i(Q0e())};return Hje.add(n),()=>{Hje.delete(n)}},e)}var Gje=$(Te(),1);function K8t(i){let{isDisabled:e,onFocus:t,onBlur:n,onFocusChange:r}=i,o=(0,Gje.useCallback)(l=>{if(Oc(l)===l.currentTarget)return n&&n(l),r&&r(!1),!0},[n,r]),s=z0e(o),a=(0,Gje.useCallback)(l=>{let c=Oc(l),u=Dm(c),d=u?$1(u):$1();c===l.currentTarget&&c===d&&(t&&t(l),r&&r(!0),s(l))},[r,t,s]);return{focusProps:{onFocus:!e&&(t||r||n)?a:void 0,onBlur:!e&&(n||r)?o:void 0}}}var ST=$(Te(),1);function G0e(){let i=(0,ST.useRef)(new Map),e=(0,ST.useCallback)((r,o,s,a)=>{let l=a?.once?(...c)=>{i.current.delete(s),s(...c)}:s;i.current.set(s,{type:o,eventTarget:r,fn:l,options:a}),r.addEventListener(o,l,a)},[]),t=(0,ST.useCallback)((r,o,s,a)=>{let l=i.current.get(s)?.fn||s;r.removeEventListener(o,l,a),i.current.delete(s)},[]),n=(0,ST.useCallback)(()=>{i.current.forEach((r,o)=>{t(r.eventTarget,r.type,o,r.options)})},[t]);return(0,ST.useEffect)(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:n}}var FG=$(Te(),1);function J8t(i){let{isDisabled:e,onBlurWithin:t,onFocusWithin:n,onFocusWithinChange:r}=i,o=(0,FG.useRef)({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=G0e(),l=(0,FG.useCallback)(d=>{s_(d.currentTarget,Oc(d))&&o.current.isFocusWithin&&!s_(d.currentTarget,d.relatedTarget)&&(o.current.isFocusWithin=!1,a(),t&&t(d),r&&r(!1))},[t,r,o,a]),c=z0e(l),u=(0,FG.useCallback)(d=>{if(!s_(d.currentTarget,Oc(d)))return;let h=Oc(d),f=Dm(h),p=$1(f);if(!o.current.isFocusWithin&&p===h){n&&n(d),r&&r(!0),o.current.isFocusWithin=!0,c(d);let g=d.currentTarget;s(f,"focus",v=>{let A=Oc(v);if(o.current.isFocusWithin&&!s_(g,A)){let w=new f.defaultView.FocusEvent("blur",{relatedTarget:A});z8t(w,g);let C=Oje(w);l(C)}},{capture:!0})}},[n,r,c,s,l]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}var ET=$(Te(),1);function OG(i={}){let{autoFocus:e=!1,isTextInput:t,within:n}=i,r=(0,ET.useRef)({isFocused:!1,isFocusVisible:e||Q0e()}),[o,s]=(0,ET.useState)(!1),[a,l]=(0,ET.useState)(()=>r.current.isFocused&&r.current.isFocusVisible),c=(0,ET.useCallback)(()=>l(r.current.isFocused&&r.current.isFocusVisible),[]),u=(0,ET.useCallback)(f=>{r.current.isFocused=f,r.current.isFocusVisible=Q0e(),s(f),c()},[c]);Y8t(f=>{r.current.isFocusVisible=f,c()},[t,o],{enabled:o,isTextInput:t});let{focusProps:d}=K8t({isDisabled:n,onFocusChange:u}),{focusWithinProps:h}=J8t({isDisabled:!n,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:a,focusProps:n?h:d}}var a_=$(Te(),1),qje=!1,q0e=0;function wBi(){qje=!0,setTimeout(()=>{qje=!1},500)}function X8t(i){i.pointerType==="touch"&&wBi()}function xBi(){let i=Dm(null);if(!(typeof i>"u"))return q0e===0&&typeof PointerEvent<"u"&&i.addEventListener("pointerup",X8t),q0e++,()=>{q0e--,!(q0e>0)&&typeof PointerEvent<"u"&&i.removeEventListener("pointerup",X8t)}}function PG(i){let{onHoverStart:e,onHoverChange:t,onHoverEnd:n,isDisabled:r}=i,[o,s]=(0,a_.useState)(!1),a=(0,a_.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,a_.useEffect)(xBi,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=G0e(),{hoverProps:u,triggerHoverEnd:d}=(0,a_.useMemo)(()=>{let h=(g,v)=>{if(a.pointerType=v,r||v==="touch"||a.isHovered||!s_(g.currentTarget,Oc(g)))return;a.isHovered=!0;let A=g.currentTarget;a.target=A,l(Dm(Oc(g)),"pointerover",w=>{a.isHovered&&a.target&&!s_(a.target,Oc(w))&&f(w,w.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:A,pointerType:v}),t&&t(!0),s(!0)},f=(g,v)=>{let A=a.target;a.pointerType="",a.target=null,!(v==="touch"||!a.isHovered||!A)&&(a.isHovered=!1,c(),n&&n({type:"hoverend",target:A,pointerType:v}),t&&t(!1),s(!1))},p={};return typeof PointerEvent<"u"&&(p.onPointerEnter=g=>{qje&&g.pointerType==="mouse"||h(g,g.pointerType)},p.onPointerLeave=g=>{!r&&s_(g.currentTarget,Oc(g))&&f(g,g.pointerType)}),{hoverProps:p,triggerHoverEnd:f}},[e,t,n,r,a,l,c]);return(0,a_.useEffect)(()=>{r&&d({currentTarget:a.target},a.pointerType)},[r]),{hoverProps:u,isHovered:o}}var Z0e=$(Te(),1);var CBi=Object.defineProperty,_Bi=(i,e,t)=>e in i?CBi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Yje=(i,e,t)=>(_Bi(i,typeof e!="symbol"?e+"":e,t),t),Kje=class{constructor(){Yje(this,"current",this.detect()),Yje(this,"handoffState","pending"),Yje(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},wp=new Kje;function tw(i){var e;return wp.isServer?null:i==null?document:(e=i?.ownerDocument)!=null?e:document}function Jje(i){var e,t;return wp.isServer?null:i==null?document:(t=(e=i?.getRootNode)==null?void 0:e.call(i))!=null?t:document}function Z8t(i){var e,t;return(t=(e=Jje(i))==null?void 0:e.activeElement)!=null?t:null}function Y0e(i){return Z8t(i)===i}var J0e=$(Te(),1);function K0e(i){typeof queueMicrotask=="function"?queueMicrotask(i):Promise.resolve().then(i).catch(e=>setTimeout(()=>{throw e}))}function ac(){let i=[],e={addEventListener(t,n,r,o){return t.addEventListener(n,r,o),e.add(()=>t.removeEventListener(n,r,o))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return K0e(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,r){let o=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:r}),this.add(()=>{Object.assign(t.style,{[n]:o})})},group(t){let n=ac();return t(n),this.add(()=>n.dispose())},add(t){return i.includes(t)||i.push(t),()=>{let n=i.indexOf(t);if(n>=0)for(let r of i.splice(n,1))r()}},dispose(){for(let t of i.splice(0))t()}};return e}function F0(){let[i]=(0,J0e.useState)(ac);return(0,J0e.useEffect)(()=>()=>i.dispose(),[i]),i}var e5t=$(Te(),1);var $8t=$(Te(),1);var X0e=$(Te(),1);var ls=(i,e)=>{wp.isServer?(0,X0e.useEffect)(i,e):(0,X0e.useLayoutEffect)(i,e)};function Tm(i){let e=(0,$8t.useRef)(i);return ls(()=>{e.current=i},[i]),e}var Rn=function(i){let e=Tm(i);return e5t.default.useCallback((...t)=>e.current(...t),[e])};function SBi(i){let e=i.width/2,t=i.height/2;return{top:i.clientY-t,right:i.clientX+e,bottom:i.clientY+t,left:i.clientX-e}}function EBi(i,e){return!(!i||!e||i.righte.right||i.bottome.bottom)}function t5t({disabled:i=!1}={}){let e=(0,Z0e.useRef)(null),[t,n]=(0,Z0e.useState)(!1),r=F0(),o=Rn(()=>{e.current=null,n(!1),r.dispose()}),s=Rn(a=>{if(r.dispose(),e.current===null){e.current=a.currentTarget,n(!0);{let l=tw(a.currentTarget);r.addEventListener(l,"pointerup",o,!1),r.addEventListener(l,"pointermove",c=>{if(e.current){let u=SBi(c);n(EBi(u,e.current.getBoundingClientRect()))}},!1),r.addEventListener(l,"pointercancel",o,!1)}}});return{pressed:t,pressProps:i?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}var i5t=$(Te(),1);function iw(i){return(0,i5t.useMemo)(()=>i,Object.values(i))}var BG=$(Te(),1),DBi=(0,BG.createContext)(void 0);function V8(){return(0,BG.useContext)(DBi)}var Eh=$(Te(),1);function Xje(...i){return Array.from(new Set(i.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function xp(i,e,...t){if(i in e){let r=e[i];return typeof r=="function"?r(...t):r}let n=new Error(`Tried to handle "${i}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,xp),n}var tve=(i=>(i[i.None=0]="None",i[i.RenderStrategy=1]="RenderStrategy",i[i.Static=2]="Static",i))(tve||{}),TBi=(i=>(i[i.Unmount=0]="Unmount",i[i.Hidden=1]="Hidden",i))(TBi||{});function _f(){let i=IBi();return(0,Eh.useCallback)(e=>kBi({mergeRefs:i,...e}),[i])}function kBi({ourProps:i,theirProps:e,slot:t,defaultTag:n,features:r,visible:o=!0,name:s,mergeRefs:a}){a=a??LBi;let l=n5t(e,i);if(o)return $0e(l,t,n,s,a);let c=r??0;if(c&2){let{static:u=!1,...d}=l;if(u)return $0e(d,t,n,s,a)}if(c&1){let{unmount:u=!0,...d}=l;return xp(u?0:1,{0(){return null},1(){return $0e({...d,hidden:!0,style:{display:"none"}},t,n,s,a)}})}return $0e(l,t,n,s,a)}function $0e(i,e={},t,n,r){let{as:o=t,children:s,refName:a="ref",...l}=Zje(i,["unmount","static"]),c=i.ref!==void 0?{[a]:i.ref}:{},u=typeof s=="function"?s(e):s;u=r5t(u),"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(e)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(e){let h=!1,f=[];for(let[p,g]of Object.entries(e))typeof g=="boolean"&&(h=!0),g===!0&&f.push(p.replace(/([A-Z])/g,v=>`-${v.toLowerCase()}`));if(h){d["data-headlessui-state"]=f.join(" ");for(let p of f)d[`data-${p}`]=""}}if(eve(o)&&(Object.keys(DT(l)).length>0||Object.keys(DT(d)).length>0))if(!(0,Eh.isValidElement)(u)||Array.isArray(u)&&u.length>1||MBi(u)){if(Object.keys(DT(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(DT(l)).concat(Object.keys(DT(d))).map(h=>` - ${h}`).join(` +`)},ywi=0,i8=[];function BIt(i){var e=Va.useRef([]),t=Va.useRef([0,0]),n=Va.useRef(),o=Va.useState(ywi++)[0],r=Va.useState(ZQ)[0],s=Va.useRef(i);Va.useEffect(function(){s.current=i},[i]),Va.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(o));var g=xIt([i.lockRef.current],(i.shards||[]).map(PIt),!0).filter(Boolean);return g.forEach(function(A){return A.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(o))})}}},[i.inert,i.lockRef.current,i.shards]);var a=Va.useCallback(function(g,A){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var v=Lge(g),w=t.current,C="deltaX"in g?g.deltaX:w[0]-v[0],_="deltaY"in g?g.deltaY:w[1]-v[1],E,I=g.target,T=Math.abs(C)>Math.abs(_)?"h":"v";if("touches"in g&&T==="h"&&I.type==="range")return!1;var N=window.getSelection(),L=N&&N.anchorNode,B=L?L===I||L.contains(I):!1;if(B)return!1;var z=EVe(T,I);if(!z)return!0;if(z?E=T:(E=T==="v"?"h":"v",z=EVe(T,I)),!z)return!1;if(!n.current&&"changedTouches"in g&&(C||_)&&(n.current=E),!E)return!0;var Q=n.current||E;return FIt(Q,A,g,Q==="h"?C:_,!0)},[]),l=Va.useCallback(function(g){var A=g;if(!(!i8.length||i8[i8.length-1]!==r)){var v="deltaY"in A?OIt(A):Lge(A),w=e.current.filter(function(E){return E.name===A.type&&(E.target===A.target||A.target===E.shadowParent)&&Awi(E.delta,v)})[0];if(w&&w.should){A.cancelable&&A.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(PIt).filter(Boolean).filter(function(E){return E.contains(A.target)}),_=C.length>0?a(A,C[0]):!s.current.noIsolation;_&&A.cancelable&&A.preventDefault()}}},[]),c=Va.useCallback(function(g,A,v,w){var C={name:g,delta:A,target:v,should:w,shadowParent:wwi(v)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(_){return _!==C})},1)},[]),u=Va.useCallback(function(g){t.current=Lge(g),n.current=void 0},[]),d=Va.useCallback(function(g){c(g.type,OIt(g),g.target,a(g,i.lockRef.current))},[]),h=Va.useCallback(function(g){c(g.type,Lge(g),g.target,a(g,i.lockRef.current))},[]);Va.useEffect(function(){return i8.push(r),i.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,eM),document.addEventListener("touchmove",l,eM),document.addEventListener("touchstart",u,eM),function(){i8=i8.filter(function(g){return g!==r}),document.removeEventListener("wheel",l,eM),document.removeEventListener("touchmove",l,eM),document.removeEventListener("touchstart",u,eM)}},[]);var f=i.removeScrollBar,p=i.inert;return Va.createElement(Va.Fragment,null,p?Va.createElement(r,{styles:vwi(o)}):null,f?Va.createElement(_Ve,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function wwi(i){for(var e=null;i!==null;)i instanceof ShadowRoot&&(e=i.host,i=i.host),i=i.parentNode;return e}var zIt=AVe(Ige,BIt);var VIt=Nge.forwardRef(function(i,e){return Nge.createElement(XQ,Fm({},i,{ref:e,sideCar:zIt}))});VIt.classNames=XQ.classNames;var eG=VIt;var Ha=ae(zi(),1),Cwi=Object.defineProperty,Wa=(i,e)=>Cwi(i,"name",{value:e,configurable:!0}),DVe=["Enter"," "],_wi=["ArrowDown","PageUp","Home"],WIt=["ArrowUp","PageDown","End"],Swi=[..._wi,...WIt],cVo={ltr:[...DVe,"ArrowRight"],rtl:[...DVe,"ArrowLeft"]};var Rge="Menu",[TVe,Ewi,Dwi]=HQ(Rge),[tM,IVe]=Eh(Rge,[Dwi,J4,dVe]),LVe=J4(),UIt=dVe(),[Twi,tG]=tM(Rge),[kwi,NVe]=tM(Rge),Iwi=Wa(i=>{let{__scopeMenu:e,open:t=!1,children:n,dir:o,onOpenChange:r,modal:s=!0}=i,a=LVe(e),[l,c]=vo.useState(null),u=vo.useRef(!1),d=Rm(r),h=WQ(o);return vo.useEffect(()=>{let f=Wa(()=>{u.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},"handleKeyDown"),p=Wa(()=>u.current=!1,"handlePointer");return document.addEventListener("keydown",f,{capture:!0}),()=>{document.removeEventListener("keydown",f,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),vo.useEffect(()=>{if(!t)return;let f=Wa(()=>d(!1),"handleBlur");return window.addEventListener("blur",f),()=>window.removeEventListener("blur",f)},[t,d]),(0,Ha.jsx)(Age,{...a,children:(0,Ha.jsx)(Twi,{scope:e,open:t,onOpenChange:d,content:l,onContentChange:c,children:(0,Ha.jsx)(kwi,{scope:e,onClose:vo.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:h,modal:s,children:n})})})},"Menu"),Lwi=vo.forwardRef(Wa(function(e,t){let{__scopeMenu:n,...o}=e,r=LVe(n);return(0,Ha.jsx)(vge,{...r,...o,ref:t})},"MenuAnchor")),jIt="MenuPortal",[Nwi,Mwi]=tM(jIt,{forceMount:void 0}),Rwi=Wa(i=>{let{__scopeMenu:e,forceMount:t,children:n,container:o}=i,r=tG(jIt,e);return(0,Ha.jsx)(Nwi,{scope:e,forceMount:t,children:(0,Ha.jsx)(ew,{present:t||r.open,children:(0,Ha.jsx)(X4,{asChild:!0,container:o,children:n})})})},"MenuPortal"),nT="MenuContent",[Fwi,QIt]=tM(nT),Owi=vo.forwardRef(Wa(function(e,t){let n=Mwi(nT,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=tG(nT,e.__scopeMenu),a=NVe(nT,e.__scopeMenu);return(0,Ha.jsx)(TVe.Provider,{scope:e.__scopeMenu,children:(0,Ha.jsx)(ew,{present:o||s.open,children:(0,Ha.jsx)(TVe.Slot,{scope:e.__scopeMenu,children:a.modal?(0,Ha.jsx)(Pwi,{...r,ref:t}):(0,Ha.jsx)(Bwi,{...r,ref:t})})})})},"MenuContent")),Pwi=vo.forwardRef(Wa(function(e,t){let n=tG(nT,e.__scopeMenu),o=vo.useRef(null),r=Fr(t,o);return vo.useEffect(()=>{let s=o.current;if(s)return Ege(s)},[]),(0,Ha.jsx)(GIt,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},"MenuRootContentModal")),Bwi=vo.forwardRef(Wa(function(e,t){let n=tG(nT,e.__scopeMenu);return(0,Ha.jsx)(GIt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},"MenuRootContentNonModal")),zwi=nb("MenuContent.ScrollLock"),GIt=vo.forwardRef(Wa(function(e,t){let{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...A}=e,v=tG(nT,n),w=NVe(nT,n),C=LVe(n),_=UIt(n),E=Ewi(n),[I,T]=vo.useState(null),N=vo.useRef(null),L=Fr(t,N,v.onContentChange),B=vo.useRef(0),z=vo.useRef(""),Q=vo.useRef(0),Z=vo.useRef(null),U=vo.useRef("right"),M=vo.useRef(0),ee=g?eG:vo.Fragment,X=g?{as:zwi,allowPinchZoom:!0}:void 0,Y=Wa(re=>{let ue=z.current+re,Ie=E().filter(Fe=>!Fe.disabled),nt=document.activeElement,mt=Ie.find(Fe=>Fe.ref.current===nt)?.textValue,xt=Ie.map(Fe=>Fe.textValue),wt=XIt(xt,ue,mt),Ht=Ie.find(Fe=>Fe.textValue===wt)?.ref.current;Wa((function Fe(zt){z.current=zt,window.clearTimeout(B.current),zt!==""&&(B.current=window.setTimeout(()=>Fe(""),1e3))}),"updateSearch")(ue),Ht&&setTimeout(()=>Ht.focus())},"handleTypeaheadSearch");vo.useEffect(()=>()=>window.clearTimeout(B.current),[]),j4();let $=vo.useCallback(re=>U.current===Z.current?.side&&$It(re,Z.current?.area),[]);return(0,Ha.jsx)(Fwi,{scope:n,searchRef:z,onItemEnter:vo.useCallback(re=>{$(re)&&re.preventDefault()},[$]),onItemLeave:vo.useCallback(re=>{$(re)||(N.current?.focus(),T(null))},[$]),onTriggerLeave:vo.useCallback(re=>{$(re)&&re.preventDefault()},[$]),pointerGraceTimerRef:Q,onPointerGraceIntentChange:vo.useCallback(re=>{Z.current=re},[]),children:(0,Ha.jsx)(ee,{...X,children:(0,Ha.jsx)(oge,{asChild:!0,trapped:r,onMountAutoFocus:Kn(s,re=>{re.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:(0,Ha.jsx)(W4,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,children:(0,Ha.jsx)(vIt,{asChild:!0,..._,dir:w.dir,orientation:"vertical",loop:o,currentTabStopId:I,onCurrentTabStopIdChange:T,onEntryFocus:Kn(c,re=>{w.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Ha.jsx)(yge,{role:"menu","aria-orientation":"vertical","data-state":qIt(v.open),"data-radix-menu-content":"",dir:w.dir,...C,...A,ref:L,style:{outline:"none",...A.style},onKeyDown:Kn(A.onKeyDown,re=>{let Ie=re.target.closest("[data-radix-menu-content]")===re.currentTarget,nt=re.ctrlKey||re.altKey||re.metaKey,mt=re.key.length===1;Ie&&(re.key==="Tab"&&re.preventDefault(),!nt&&mt&&Y(re.key));let xt=N.current;if(re.target!==xt||!Swi.includes(re.key))return;re.preventDefault();let Ht=E().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);WIt.includes(re.key)&&Ht.reverse(),KIt(Ht)}),onBlur:Kn(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(B.current),z.current="")}),onPointerMove:Kn(e.onPointerMove,Mge(re=>{let ue=re.target,Ie=M.current!==re.clientX;if(re.currentTarget.contains(ue)&&Ie){let nt=re.clientX>M.current?"right":"left";U.current=nt,M.current=re.clientX}}))})})})})})})},"MenuContentImpl"));var kVe="MenuItem",HIt="menu.itemSelect",Vwi=vo.forwardRef(Wa(function(e,t){let{disabled:n=!1,onSelect:o,...r}=e,s=vo.useRef(null),a=NVe(kVe,e.__scopeMenu),l=QIt(kVe,e.__scopeMenu),c=Fr(t,s),u=vo.useRef(!1),d=Wa(()=>{let h=s.current;if(!n&&h){let f=new CustomEvent(HIt,{bubbles:!0,cancelable:!0});h.addEventListener(HIt,p=>o?.(p),{once:!0}),VQ(h,f),f.defaultPrevented?u.current=!1:a.onClose()}},"handleSelect");return(0,Ha.jsx)(Hwi,{...r,ref:c,disabled:n,onClick:Kn(e.onClick,d),onPointerDown:h=>{e.onPointerDown?.(h),u.current=!0},onPointerUp:Kn(e.onPointerUp,h=>{u.current||h.currentTarget?.click()}),onKeyDown:Kn(e.onKeyDown,h=>{n||h.target!==h.currentTarget||l.searchRef.current!==""&&h.key===" "||DVe.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),Hwi=vo.forwardRef(Wa(function(e,t){let{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=QIt(kVe,n),l=UIt(n),c=vo.useRef(null),u=Fr(t,c),[d,h]=vo.useState(!1),[f,p]=vo.useState("");return vo.useEffect(()=>{let g=c.current;g&&p((g.textContent??"").trim())},[s.children]),(0,Ha.jsx)(TVe.ItemSlot,{scope:n,disabled:o,textValue:r??f,children:(0,Ha.jsx)(yIt,{asChild:!0,...l,focusable:!o,children:(0,Ha.jsx)(Ea.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:Kn(e.onPointerMove,Mge(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Kn(e.onPointerLeave,Mge(g=>a.onItemLeave(g))),onFocus:Kn(e.onFocus,()=>h(!0)),onBlur:Kn(e.onBlur,()=>h(!1))})})})},"MenuItemImpl"));var Wwi="MenuRadioGroup",[uVo,dVo]=tM(Wwi,{value:void 0,onValueChange:Wa(()=>{},"onValueChange")});var Uwi="MenuItemIndicator",[hVo,fVo]=tM(Uwi,{checked:!1});var jwi="MenuSub",[pVo,mVo]=tM(jwi);function qIt(i){return i?"open":"closed"}Wa(qIt,"getOpenState");function YIt(i){return i==="indeterminate"}Wa(YIt,"isIndeterminate");function Qwi(i){return YIt(i)?"indeterminate":i?"checked":"unchecked"}Wa(Qwi,"getCheckedState");function KIt(i){let e=document.activeElement;for(let t of i)if(t===e||(t.focus(),document.activeElement!==e))return}Wa(KIt,"focusFirst");function JIt(i,e){return i.map((t,n)=>i[(e+n)%i.length])}Wa(JIt,"wrapArray");function XIt(i,e,t){let o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,r=t?i.indexOf(t):-1,s=JIt(i,Math.max(r,0));o.length===1&&(s=s.filter(c=>c!==t));let l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==t?l:void 0}Wa(XIt,"getNextMatch");function ZIt(i,e){let{x:t,y:n}=i,o=!1;for(let r=0,s=e.length-1;rn!=h>n&&t<(d-c)*(n-u)/(h-u)+c&&(o=!o)}return o}Wa(ZIt,"isPointInPolygon");function $It(i,e){if(!e)return!1;let t={x:i.clientX,y:i.clientY};return ZIt(t,e)}Wa($It,"isPointerInGraceArea");function Mge(i){return e=>e.pointerType==="mouse"?i(e):void 0}Wa(Mge,"whenMouse");var eLt=Iwi,tLt=Lwi,iLt=Rwi,nLt=Owi;var oLt=Vwi;var oT=ae(zi(),1),qwi=Object.defineProperty,iG=(i,e)=>qwi(i,"name",{value:e,configurable:!0}),MVe="DropdownMenu",[Ywi,RVo]=Eh(MVe,[IVe]),nG=IVe(),[Kwi,rLt]=Ywi(MVe),Jwi=iG(i=>{let{__scopeDropdownMenu:e,children:t,dir:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=i,l=nG(e),c=$C.useRef(null),[u,d]=qC({prop:o,defaultProp:r??!1,onChange:s,caller:MVe});return(0,oT.jsx)(Kwi,{scope:e,triggerId:E0(),triggerRef:c,contentId:E0(),open:u,onOpenChange:d,onOpenToggle:$C.useCallback(()=>d(h=>!h),[d]),modal:a,children:(0,oT.jsx)(eLt,{...l,open:u,onOpenChange:d,dir:n,modal:a,children:t})})},"DropdownMenu"),Xwi="DropdownMenuTrigger",Zwi=$C.forwardRef(iG(function(e,t){let{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=rLt(Xwi,n),a=nG(n),l=Fr(t,s.triggerRef);return(0,oT.jsx)(tLt,{asChild:!0,...a,children:(0,oT.jsx)(Ea.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:l,onPointerDown:Kn(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:Kn(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})},"DropdownMenuTrigger")),$wi=iG(i=>{let{__scopeDropdownMenu:e,...t}=i,n=nG(e);return(0,oT.jsx)(iLt,{...n,...t})},"DropdownMenuPortal"),exi="DropdownMenuContent",txi=$C.forwardRef(iG(function(e,t){let{__scopeDropdownMenu:n,...o}=e,r=rLt(exi,n),s=nG(n),a=$C.useRef(!1);return(0,oT.jsx)(nLt,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:Kn(e.onCloseAutoFocus,l=>{a.current||r.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:Kn(e.onInteractOutside,l=>{let c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!r.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent"));var ixi=$C.forwardRef(iG(function(e,t){let{__scopeDropdownMenu:n,...o}=e,r=nG(n);return(0,oT.jsx)(oLt,{...r,...o,ref:t})},"DropdownMenuItem"));var sLt=Jwi,aLt=Zwi,lLt=$wi,cLt=txi;var uLt=ixi;var hLt=(0,dLt.forwardRef)((i,e)=>{let t=(0,Fge.c)(6),n;t[0]!==i.className?(n=Un("graphiql-un-styled",i.className),t[0]=i.className,t[1]=n):n=t[1];let o;return t[2]!==i||t[3]!==e||t[4]!==n?(o=(0,n8.jsx)(aLt,{asChild:!0,children:(0,n8.jsx)("button",{...i,ref:e,className:n})}),t[2]=i,t[3]=e,t[4]=n,t[5]=o):o=t[5],o});hLt.displayName="DropdownMenuButton";var nxi=i=>{let e=(0,Fge.c)(14),t,n,o,r,s;e[0]!==i?({children:t,align:r,sideOffset:s,className:n,...o}=i,e[0]=i,e[1]=t,e[2]=n,e[3]=o,e[4]=r,e[5]=s):(t=e[1],n=e[2],o=e[3],r=e[4],s=e[5]);let a=r===void 0?"start":r,l=s===void 0?5:s,c;e[6]!==n?(c=Un("graphiql-dropdown-content",n),e[6]=n,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==t||e[10]!==o||e[11]!==l||e[12]!==c?(u=(0,n8.jsx)(lLt,{children:(0,n8.jsx)(cLt,{align:a,sideOffset:l,className:c,...o,children:t})}),e[8]=a,e[9]=t,e[10]=o,e[11]=l,e[12]=c,e[13]=u):u=e[13],u},oxi=i=>{let e=(0,Fge.c)(10),t,n,o;e[0]!==i?({className:n,children:t,...o}=i,e[0]=i,e[1]=t,e[2]=n,e[3]=o):(t=e[1],n=e[2],o=e[3]);let r;e[4]!==n?(r=Un("graphiql-dropdown-item",n),e[4]=n,e[5]=r):r=e[5];let s;return e[6]!==t||e[7]!==o||e[8]!==r?(s=(0,n8.jsx)(uLt,{className:r,...o,children:t}),e[6]=t,e[7]=o,e[8]=r,e[9]=s):s=e[9],s},oG=Object.assign(sLt,{Button:hLt,Item:oxi,Content:nxi});var o8=ae(zi()),kLt=ae(fo());var co=ae(ke(),1);var fLt=ae(ke(),1);var pLt=ae(zi(),1),rxi=Object.defineProperty,sxi=(i,e)=>rxi(i,"name",{value:e,configurable:!0}),axi=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),lxi=fLt.forwardRef(sxi(function(e,t){return(0,pLt.jsx)(Ea.span,{...e,ref:t,style:{...axi,...e.style}})},"VisuallyHidden")),rT=lxi;var Hd=ae(zi(),1),uxi=Object.defineProperty,Vd=(i,e)=>uxi(i,"name",{value:e,configurable:!0}),[OVe,ZVo]=Eh("Tooltip",[J4]),PVe=J4(),dxi="TooltipProvider",hxi=700,RVe="tooltip.open",[fxi,BVe]=OVe(dxi),pxi=Vd(i=>{let{__scopeTooltip:e,delayDuration:t=hxi,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:r}=i,s=co.useRef(!0),a=co.useRef(!1),l=co.useRef(0);return co.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,Hd.jsx)(fxi,{scope:e,isOpenDelayedRef:s,delayDuration:t,onOpen:co.useCallback(()=>{n<=0||(window.clearTimeout(l.current),s.current=!1)},[n]),onClose:co.useCallback(()=>{n<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n))},[n]),isPointerInTransitRef:a,onPointerInTransitChange:co.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:r})},"TooltipProvider"),FVe="Tooltip",[mxi,sG]=OVe(FVe),gxi=Vd(i=>{let{__scopeTooltip:e,children:t,open:n,defaultOpen:o,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=i,l=BVe(FVe,i.__scopeTooltip),c=PVe(e),[u,d]=co.useState(null),[h,f]=co.useState(void 0),p=E0(),g=co.useRef(0),A=s??l.disableHoverableContent,v=a??l.delayDuration,w=co.useRef(!1),[C,_]=qC({prop:n,defaultProp:o??!1,onChange:Vd(B=>{B?(l.onOpen(),document.dispatchEvent(new CustomEvent(RVe))):l.onClose(),r?.(B)},"onChange"),caller:FVe}),E=co.useMemo(()=>C?w.current?"delayed-open":"instant-open":"closed",[C]),I=co.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w.current=!1,_(!0)},[_]),T=co.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),N=co.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{w.current=!0,_(!0),g.current=0},v)},[v,_]);return co.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),(0,Hd.jsx)(Age,{...c,children:(0,Hd.jsx)(mxi,{scope:e,contentId:h??p,setContentId:f,open:C,stateAttribute:E,trigger:u,onTriggerChange:d,onTriggerEnter:co.useCallback(()=>{l.isOpenDelayedRef.current?N():I()},[l.isOpenDelayedRef,N,I]),onTriggerLeave:co.useCallback(()=>{A?T():(window.clearTimeout(g.current),g.current=0)},[T,A]),onOpen:I,onClose:T,disableHoverableContent:A,children:t})})},"Tooltip"),mLt="TooltipTrigger",bxi=co.forwardRef(Vd(function(e,t){let{__scopeTooltip:n,...o}=e,r=sG(mLt,n),s=BVe(mLt,n),a=PVe(n),l=co.useRef(null),c=Fr(t,l,r.onTriggerChange),u=co.useRef(!1),d=co.useRef(!1),h=co.useCallback(()=>u.current=!1,[]);return co.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,Hd.jsx)(vge,{asChild:!0,...a,children:(0,Hd.jsx)(Ea.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:c,onPointerMove:Kn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:Kn(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:Kn(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Kn(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:Kn(e.onBlur,r.onClose),onClick:Kn(e.onClick,r.onClose)})})},"TooltipTrigger")),gLt="TooltipPortal",[Axi,vxi]=OVe(gLt,{forceMount:void 0}),yxi=Vd(i=>{let{__scopeTooltip:e,forceMount:t,children:n,container:o}=i,r=sG(gLt,e);return(0,Hd.jsx)(Axi,{scope:e,forceMount:t,children:(0,Hd.jsx)(ew,{present:t||r.open,children:(0,Hd.jsx)(X4,{asChild:!0,container:o,children:n})})})},"TooltipPortal"),rG="TooltipContent",wxi=co.forwardRef(Vd(function(e,t){let n=vxi(rG,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=sG(rG,e.__scopeTooltip);return(0,Hd.jsx)(ew,{present:o||a.open,children:a.disableHoverableContent?(0,Hd.jsx)(bLt,{side:r,...s,ref:t}):(0,Hd.jsx)(xxi,{side:r,...s,ref:t})})},"TooltipContent")),xxi=co.forwardRef(Vd(function(e,t){let n=sG(rG,e.__scopeTooltip),o=BVe(rG,e.__scopeTooltip),r=co.useRef(null),s=Fr(t,r),[a,l]=co.useState(null),{trigger:c,onClose:u}=n,d=r.current,{onPointerInTransitChange:h}=o,f=co.useCallback(()=>{l(null),h(!1)},[h]),p=co.useCallback((g,A)=>{let v=g.currentTarget,w={x:g.clientX,y:g.clientY},C=ALt(w,v.getBoundingClientRect()),_=vLt(w,C),E=yLt(A.getBoundingClientRect()),I=xLt([..._,...E]);l(I),h(!0)},[h]);return co.useEffect(()=>()=>f(),[f]),co.useEffect(()=>{if(c&&d){let g=Vd(v=>p(v,d),"handleTriggerLeave"),A=Vd(v=>p(v,c),"handleContentLeave");return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",A),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",A)}}},[c,d,p,f]),co.useEffect(()=>{if(a){let g=Vd(A=>{let v=A.target,w={x:A.clientX,y:A.clientY},C=c?.contains(v)||d?.contains(v),_=!wLt(w,a);C?f():_&&(f(),u())},"handleTrackPointerGrace");return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,a,u,f]),(0,Hd.jsx)(bLt,{...e,ref:s})},"TooltipContentHoverable")),Cxi=Lze("TooltipContent"),bLt=co.forwardRef(Vd(function(e,t){let{__scopeTooltip:n,children:o,"aria-label":r,id:s,onEscapeKeyDown:a,onPointerDownOutside:l,...c}=e,u=sG(rG,n),d=PVe(n),{onClose:h}=u;co.useEffect(()=>(document.addEventListener(RVe,h),()=>document.removeEventListener(RVe,h)),[h]),co.useEffect(()=>{if(u.trigger){let p=Vd(g=>{g.target instanceof Node&&g.target.contains(u.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,h]);let{setContentId:f}=u;return al(()=>(f(s),()=>{f(void 0)}),[s,f]),(0,Hd.jsx)(W4,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:(0,Hd.jsxs)(yge,{"data-state":u.stateAttribute,role:r?void 0:"tooltip",id:r?void 0:u.contentId,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,Hd.jsx)(Cxi,{children:o}),r?(0,Hd.jsx)(rT,{id:u.contentId,role:"tooltip",children:r}):null]})})},"TooltipContentImpl"));function ALt(i,e){let t=Math.abs(e.top-i.y),n=Math.abs(e.bottom-i.y),o=Math.abs(e.right-i.x),r=Math.abs(e.left-i.x);switch(Math.min(t,n,o,r)){case r:return"left";case o:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}Vd(ALt,"getExitSideFromRect");function vLt(i,e,t=5){let n=[];switch(e){case"top":n.push({x:i.x-t,y:i.y+t},{x:i.x+t,y:i.y+t});break;case"bottom":n.push({x:i.x-t,y:i.y-t},{x:i.x+t,y:i.y-t});break;case"left":n.push({x:i.x+t,y:i.y-t},{x:i.x+t,y:i.y+t});break;case"right":n.push({x:i.x-t,y:i.y-t},{x:i.x-t,y:i.y+t});break}return n}Vd(vLt,"getPaddedExitPoints");function yLt(i){let{top:e,right:t,bottom:n,left:o}=i;return[{x:o,y:e},{x:t,y:e},{x:t,y:n},{x:o,y:n}]}Vd(yLt,"getPointsFromRect");function wLt(i,e){let{x:t,y:n}=i,o=!1;for(let r=0,s=e.length-1;rn!=h>n&&t<(d-c)*(n-u)/(h-u)+c&&(o=!o)}return o}Vd(wLt,"isPointInPolygon");function xLt(i){let e=i.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),CLt(e)}Vd(xLt,"getHull");function CLt(i){if(i.length<=1)return i.slice();let e=[];for(let n=0;n=2;){let r=e[e.length-1],s=e[e.length-2];if((r.x-s.x)*(o.y-s.y)>=(r.y-s.y)*(o.x-s.x))e.pop();else break}e.push(o)}e.pop();let t=[];for(let n=i.length-1;n>=0;n--){let o=i[n];for(;t.length>=2;){let r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(o.y-s.y)>=(r.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}Vd(CLt,"getHullPresorted");var _Lt=pxi,SLt=gxi,ELt=bxi,DLt=yxi,TLt=wxi;var Sxi=i=>{let e=(0,kLt.c)(10),{children:t,align:n,side:o,sideOffset:r,label:s}=i,a=n===void 0?"start":n,l=o===void 0?"bottom":o,c=r===void 0?5:r,u;e[0]!==t?(u=(0,o8.jsx)(ELt,{asChild:!0,children:t}),e[0]=t,e[1]=u):u=e[1];let d;e[2]!==a||e[3]!==s||e[4]!==l||e[5]!==c?(d=(0,o8.jsx)(DLt,{children:(0,o8.jsx)(TLt,{className:"graphiql-tooltip",align:a,side:l,sideOffset:c,children:s})}),e[2]=a,e[3]=s,e[4]=l,e[5]=c,e[6]=d):d=e[6];let h;return e[7]!==u||e[8]!==d?(h=(0,o8.jsxs)(SLt,{children:[u,d]}),e[7]=u,e[8]=d,e[9]=h):h=e[9],h},Du=Object.assign(Sxi,{Provider:_Lt});var zVe=()=>{let i=(0,ILt.c)(18),{setOperationName:e,run:t,stop:n}=Oc(),o;i[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ol("operations","operationName","isFetching","overrideOperationName"),i[0]=o):o=i[0];let{operations:r,operationName:s,isFetching:a,overrideOperationName:l}=Vo(o),c;i[1]!==r?(c=r===void 0?[]:r,i[1]=r,i[2]=c):c=i[2];let u=c,d=Vo(Exi),h=u.length>1&&typeof l!="string",f=a||d,p=`${f?"Stop":"Execute"} query (${nA(Ys.runQuery.key,"Cmd")})`,g;i[3]!==f?(g=f?(0,vv.jsx)(d1e,{}):(0,vv.jsx)(n1e,{}),i[3]=f,i[4]=g):g=i[4];let A;i[5]!==p||i[6]!==g?(A={type:"button",className:"graphiql-execute-button",children:g,"aria-label":p},i[5]=p,i[6]=g,i[7]=A):A=i[7];let v=A,w;return i[8]!==v||i[9]!==h||i[10]!==f||i[11]!==p||i[12]!==s||i[13]!==u||i[14]!==t||i[15]!==e||i[16]!==n?(w=h&&!f?(0,vv.jsxs)(oG,{children:[(0,vv.jsx)(Du,{label:p,children:(0,vv.jsx)(oG.Button,{...v})}),(0,vv.jsx)(oG.Content,{children:u.map((C,_)=>{let E=C.name?C.name.value:``;return(0,vv.jsx)(oG.Item,{onSelect:()=>{var I;let T=(I=C.name)==null?void 0:I.value;T&&T!==s&&e(T),t()},children:E},`${E}-${_}`)})})]}):(0,vv.jsx)(Du,{label:p,children:(0,vv.jsx)("button",{...v,onClick:f?n:t})}),i[8]=v,i[9]=h,i[10]=f,i[11]=p,i[12]=s,i[13]=u,i[14]=t,i[15]=e,i[16]=n,i[17]=w):w=i[17],w};function Exi(i){return!!i.subscription}var UVe=ae(zi()),LLt=ae(fo()),Oge=ae(ke());var VVe=ae(zi()),HVe=ae(fo()),WVe=ae(ke());var Da=(0,WVe.forwardRef)((i,e)=>{let t=(0,HVe.c)(6),n;t[0]!==i.className?(n=Un("graphiql-un-styled",i.className),t[0]=i.className,t[1]=n):n=t[1];let o;return t[2]!==i||t[3]!==e||t[4]!==n?(o=(0,VVe.jsx)("button",{...i,ref:e,className:n}),t[2]=i,t[3]=e,t[4]=n,t[5]=o):o=t[5],o});Da.displayName="UnStyledButton";var kf=(0,WVe.forwardRef)((i,e)=>{let t=(0,HVe.c)(7),n;t[0]!==i.className||t[1]!==i.state?(n=Un("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[i.state],i.className),t[0]=i.className,t[1]=i.state,t[2]=n):n=t[2];let o;return t[3]!==i||t[4]!==e||t[5]!==n?(o=(0,VVe.jsx)("button",{...i,ref:e,className:n}),t[3]=i,t[4]=e,t[5]=n,t[6]=o):o=t[6],o});kf.displayName="Button";var r8=(0,Oge.forwardRef)((i,e)=>{let t=(0,LLt.c)(14),{label:n,onClick:o,...r}=i,[s,a]=(0,Oge.useState)(null),l;t[0]!==o?(l=w=>{try{o&&o(w),a(null)}catch(C){let _=C;a(_ instanceof Error?_:new Error(`Toolbar button click failed: ${_}`))}},t[0]=o,t[1]=l):l=t[1];let c=l,u=Du,d=Da,h="button",f=Un("graphiql-toolbar-button",s&&"error",r.className),p=s?s.message:n,g=s?"true":r["aria-invalid"],A;t[2]!==d||t[3]!==c||t[4]!==r||t[5]!==e||t[6]!==f||t[7]!==p||t[8]!==g?(A=(0,UVe.jsx)(d,{...r,ref:e,type:h,className:f,onClick:c,"aria-label":p,"aria-invalid":g}),t[2]=d,t[3]=c,t[4]=r,t[5]=e,t[6]=f,t[7]=p,t[8]=g,t[9]=A):A=t[9];let v;return t[10]!==u||t[11]!==n||t[12]!==A?(v=(0,UVe.jsx)(u,{label:n,children:A}),t[10]=u,t[11]=n,t[12]=A,t[13]=v):v=t[13],v});r8.displayName="ToolbarButton";var NLt=ae(zi()),MLt=ae(fo()),Pge=ae(ke());var jVe=i=>{let e=(0,MLt.c)(15),{onEdit:t,...n}=i,{setEditor:o,run:r,prettifyEditors:s,mergeQuery:a}=Oc(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ol("initialHeaders","shouldPersistHeaders","uriInstanceId"),e[0]=l):l=e[0];let{initialHeaders:c,shouldPersistHeaders:u,uriInstanceId:d}=Vo(l),h=(0,Pge.useRef)(null),f=tb(Dxi);IQ(t,u?us.headers:null,"headers");let p;e[1]!==c||e[2]!==a||e[3]!==f||e[4]!==s||e[5]!==r||e[6]!==o||e[7]!==d?(p=()=>{if(!f)return;let _=YD({uri:`${d}${Kv.requestHeaders}`,value:c}),E=KD(h,{model:_});o({headerEditor:E});let I=[E.addAction({...jf.runQuery,run:r}),E.addAction({...jf.prettify,run:s}),E.addAction({...jf.mergeFragments,run:a}),E,_];return UC(I)},e[1]=c,e[2]=a,e[3]=f,e[4]=s,e[5]=r,e[6]=o,e[7]=d,e[8]=p):p=e[8];let g;e[9]!==f?(g=[f],e[9]=f,e[10]=g):g=e[10],(0,Pge.useEffect)(p,g);let A=0,v=qD,w=Un("graphiql-editor",n.className),C;return e[11]!==n||e[12]!==v||e[13]!==w?(C=(0,NLt.jsx)("div",{ref:h,tabIndex:A,onKeyDown:v,...n,className:w}),e[11]=n,e[12]=v,e[13]=w,e[14]=C):C=e[14],C};function Dxi(i){return i.monaco}var aG=ae(zi()),RLt=ae(fo()),iM=ae(ke()),Txi=i=>{var e;let t=(0,RLt.c)(14),{path:n}=i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={width:null,height:null},t[0]=o):o=t[0];let[r,s]=(0,iM.useState)(o),{width:a,height:l}=r,[c,u]=(0,iM.useState)(null),d=(0,iM.useRef)(null),h=(e=FLt(n))==null?void 0:e.href,f,p;t[1]!==h?(f=()=>{if(!h){s({width:null,height:null}),u(null);return}fetch(h,{method:"HEAD"}).then(C=>{u(C.headers.get("Content-Type"))}).catch(()=>{u(null)})},p=[h],t[1]=h,t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,iM.useEffect)(f,p);let g;t[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{s({width:d.current.naturalWidth,height:d.current.naturalHeight})},t[4]=g):g=t[4];let A;t[5]!==h?(A=(0,aG.jsx)("img",{alt:"",onLoad:g,ref:d,src:h}),t[5]=h,t[6]=A):A=t[6];let v;t[7]!==l||t[8]!==c||t[9]!==a?(v=a!==null&&l!==null&&(0,aG.jsxs)("div",{children:[a,"x",l,c&&" "+c]}),t[7]=l,t[8]=c,t[9]=a,t[10]=v):v=t[10];let w;return t[11]!==A||t[12]!==v?(w=(0,aG.jsxs)("div",{children:[A,v]}),t[11]=A,t[12]=v,t[13]=w):w=t[13],w},QVe=Object.assign(Txi,{shouldRender(i){let e=FLt(i);return e?/\.(bmp|gif|jpe?g|png|svg|webp)$/.test(e.pathname):!1}});function FLt(i){let e=i.trim();try{return new URL(e,location.protocol+"//"+location.host)}catch{}}var OLt=ae(zi()),PLt=ae(fo());DQ();var e_=ae(ke());Cme();mn();Ue();var GVe=i=>{let e=(0,PLt.c)(49),{onClickReference:t,onEdit:n,...o}=i,{setOperationName:r,setEditor:s,updateActiveTabValues:a,setVisiblePlugin:l,setSchemaReference:c,run:u,setOperationFacts:d,copyQuery:h,prettifyEditors:f,mergeQuery:p}=Oc(),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Ol("initialQuery","schema","customScalarSchemas","referencePlugin","operations","operationName","externalFragments","uriInstanceId","storage","monacoTheme"),e[0]=g):g=e[0];let{initialQuery:A,schema:v,customScalarSchemas:w,referencePlugin:C,operations:_,operationName:E,externalFragments:I,uriInstanceId:T,storage:N,monacoTheme:L}=Vo(g),B=(0,e_.useRef)(null),z=(0,e_.useRef)(null),Q,Z;e[1]!==t?(Q=()=>{z.current=t},Z=[t],e[1]=t,e[2]=Q,e[3]=Z):(Q=e[2],Z=e[3]),(0,e_.useEffect)(Q,Z);let U;e[4]!==E||e[5]!==_||e[6]!==v||e[7]!==d?(U=function(Fi){let Kt=_Q(v,Fi.getValue()),Li=U$e(_,E,Kt?.operations);return d({documentAST:Kt?.documentAST,operationName:Li,operations:Kt?.operations}),Kt?{...Kt,operationName:Li}:null},e[4]=E,e[5]=_,e[6]=v,e[7]=d,e[8]=U):U=e[8];let M=U,ee=(0,e_.useRef)(null),X,Y;e[9]!==E||e[10]!==_||e[11]!==u||e[12]!==r?(X=()=>{ee.current=zt=>{var Fi;if(!_){u();return}let Kt=zt.getPosition(),Li=zt.getModel().getOffsetAt(Kt),Bn;for(let zn of _)zn.loc&&zn.loc.start<=Li&&zn.loc.end>=Li&&(Bn=(Fi=zn.name)==null?void 0:Fi.value);Bn&&Bn!==E&&r(Bn),u()}},Y=[E,_,u,r],e[9]=E,e[10]=_,e[11]=u,e[12]=r,e[13]=X,e[14]=Y):(X=e[13],Y=e[14]),(0,e_.useEffect)(X,Y);let{monacoGraphQL:$,monaco:re}=tb(),ue;e[15]!==h||e[16]!==M||e[17]!==A||e[18]!==p||e[19]!==re||e[20]!==$||e[21]!==L||e[22]!==n||e[23]!==E||e[24]!==f||e[25]!==s||e[26]!==r||e[27]!==N||e[28]!==a||e[29]!==T?(ue=()=>{if(!re||!$)return;let zt=Je.file(`${T}${Kv.operation}`),Fi=Je.file(`${T}${Kv.variables}`),{validateVariablesJSON:Kt}=Z6;Kt[zt.toString()]=[Fi.toString()],$.setDiagnosticSettings(Z6);let Li=YD({uri:zt.path.replace("/",""),value:A}),Bn=KD(B,{model:Li,theme:L});s({queryEditor:Bn});let zn=Wb(100,()=>{let Ei=Bn.getValue();N.set(us.query,Ei);let vt=M(Bn);n?.(Ei,vt?.documentAST),vt?.operationName&&E!==vt.operationName&&r(vt.operationName),a({query:Ei,operationName:vt?.operationName??null})});M(Bn);let yo=[Li.onDidChangeContent(zn),Bn.addAction({...jf.runQuery,run:(...Ei)=>{let vt=Ei;return ee.current(...vt)}}),Bn.addAction({...jf.copyQuery,run:h}),Bn.addAction({...jf.prettify,run:f}),Bn.addAction({...jf.mergeFragments,run:p}),Bn,Li];return UC(yo)},e[15]=h,e[16]=M,e[17]=A,e[18]=p,e[19]=re,e[20]=$,e[21]=L,e[22]=n,e[23]=E,e[24]=f,e[25]=s,e[26]=r,e[27]=N,e[28]=a,e[29]=T,e[30]=ue):ue=e[30];let Ie;e[31]!==re||e[32]!==$?(Ie=[re,$],e[31]=re,e[32]=$,e[33]=Ie):Ie=e[33],(0,e_.useEffect)(ue,Ie);let nt,mt;e[34]!==w||e[35]!==I||e[36]!==re||e[37]!==$||e[38]!==C||e[39]!==v||e[40]!==c||e[41]!==l||e[42]!==T?(mt=()=>{if(!v||!re||!$||($.setSchemaConfig([{uri:`${T}${Kv.schema}`,schema:v,customScalarSchemas:w}]),$.setExternalFragmentDefinitions([...I.values()]),!C))return;let zt=null,Fi=[re.languages.registerDefinitionProvider("graphql",{provideDefinition(Kt,Li,Bn){let zn=TEt(Li),yo=I4(Kt.getValue(),zn,v);if(!yo)return;let{typeInfo:Ei,token:vt}=yo,{kind:ni,step:mr}=vt.state;if(ni==="Field"&&mr===0&&Ei.fieldDef||ni==="AliasedField"&&mr===2&&Ei.fieldDef||ni==="ObjectField"&&mr===0&&Ei.fieldDef||ni==="Directive"&&mr===1&&Ei.directiveDef||ni==="Variable"&&Ei.type||ni==="Argument"&&mr===0&&Ei.argDef||ni==="EnumValue"&&Ei.enumValue&&"description"in Ei.enumValue||ni==="NamedType"&&Ei.type&&"description"in Ei.type){zt={kind:ni,typeInfo:Ei};let{lineNumber:Wi,column:xr}=Li,Do=new R(Wi,xr,Wi,xr);return[{uri:Kt.uri,range:Do}]}zt=null}}),re.languages.registerReferenceProvider("graphql",{provideReferences(Kt,Li,Bn,zn){var yo;let{lineNumber:Ei,column:vt}=Li;if(!zt)return;l(C),c(zt),(yo=z.current)==null||yo.call(z,zt);let ni=new R(Ei,vt,Ei,vt);return[{uri:Kt.uri,range:ni}]}})];return UC(Fi)},nt=[v,w,C,c,l,I,T,$,re],e[34]=w,e[35]=I,e[36]=re,e[37]=$,e[38]=C,e[39]=v,e[40]=c,e[41]=l,e[42]=T,e[43]=nt,e[44]=mt):(nt=e[43],mt=e[44]),(0,e_.useEffect)(mt,nt);let xt=0,wt=qD,Ht=Un("graphiql-editor",o.className),Fe;return e[45]!==o||e[46]!==wt||e[47]!==Ht?(Fe=(0,OLt.jsx)("div",{ref:B,tabIndex:xt,onKeyDown:wt,...o,className:Ht}),e[45]=o,e[46]=wt,e[47]=Ht,e[48]=Fe):Fe=e[48],Fe};var MT=ae(zi()),uFt=ae(fo());var lq=ae(ke()),dFt=ae(SUe());Ue();var EUe=i=>{let e=(0,uFt.c)(18),{responseTooltip:t,...n}=i,{setEditor:o,run:r}=Oc(),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Ol("fetchError","validationErrors","responseEditor","uriInstanceId"),e[0]=s):s=e[0];let{fetchError:a,validationErrors:l,responseEditor:c,uriInstanceId:u}=Vo(s),d=(0,lq.useRef)(null),h=tb(tSi),f,p;e[1]!==a||e[2]!==c||e[3]!==l?(f=()=>{a&&c?.setValue(a),l.length&&c?.setValue(CS(l))},p=[c,a,l],e[1]=a,e[2]=c,e[3]=l,e[4]=f,e[5]=p):(f=e[4],p=e[5]),(0,lq.useEffect)(f,p);let g;e[6]!==t||e[7]!==h||e[8]!==r||e[9]!==o||e[10]!==u?(g=()=>{if(!h)return;let N=YD({uri:`${u}${Kv.response}`,value:""}),L=KD(d,{model:N,readOnly:!0,lineNumbers:"off",wordWrap:"on",contextmenu:!1});o({responseEditor:L});let B,z,Q=(M,ee)=>{if(!(M.uri===N.uri))return null;let Y=M.getWordAtPosition(ee);if(!Y?.word.startsWith("/")||!QVe.shouldRender(Y.word))return null;let re=`hover-${ee.lineNumber}-${ee.column}`;return z&&clearTimeout(z),z=setTimeout(()=>{let ue=document.querySelector(`[data-id="${re}"]`);ue&&(B?.unmount(),B=(0,dFt.createRoot)(ue),B.render((0,MT.jsxs)(MT.Fragment,{children:[t&&(0,MT.jsx)(t,{position:ee,word:Y}),(0,MT.jsx)(QVe,{path:Y.word})]})))},500),{range:new R(ee.lineNumber,Y.startColumn,ee.lineNumber,Y.endColumn),contents:[{value:`
    Loading...
    `,supportHtml:!0}]}},Z=N.getLanguageId(),U=[h.languages.registerHoverProvider(Z,{provideHover:Q}),L.addAction({...jf.runQuery,run:r}),L,N];return UC(U)},e[6]=t,e[7]=h,e[8]=r,e[9]=o,e[10]=u,e[11]=g):g=e[11];let A;e[12]!==h?(A=[h],e[12]=h,e[13]=A):A=e[13],(0,lq.useEffect)(g,A);let v="Result Window",w="polite",C="true",_=0,E=qD,I=Un("result-window",n.className),T;return e[14]!==n||e[15]!==E||e[16]!==I?(T=(0,MT.jsx)("section",{ref:d,"aria-label":v,"aria-live":w,"aria-atomic":C,tabIndex:_,onKeyDown:E,...n,className:I}),e[14]=n,e[15]=E,e[16]=I,e[17]=T):T=e[17],T};function tSi(i){return i.monaco}var hFt=ae(zi()),fFt=ae(fo()),h0e=ae(ke());var DUe=i=>{let e=(0,fFt.c)(15),{onEdit:t,...n}=i,{setEditor:o,run:r,prettifyEditors:s,mergeQuery:a}=Oc(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ol("initialVariables","uriInstanceId"),e[0]=l):l=e[0];let{initialVariables:c,uriInstanceId:u}=Vo(l),d=(0,h0e.useRef)(null),h=tb(iSi);IQ(t,us.variables,"variables");let f;e[1]!==c||e[2]!==a||e[3]!==h||e[4]!==s||e[5]!==r||e[6]!==o||e[7]!==u?(f=()=>{if(!h)return;let C=YD({uri:`${u}${Kv.variables}`,value:c}),_=KD(d,{model:C});o({variableEditor:_});let E=[_.addAction({...jf.runQuery,run:r}),_.addAction({...jf.prettify,run:s}),_.addAction({...jf.mergeFragments,run:a}),_,C];return UC(E)},e[1]=c,e[2]=a,e[3]=h,e[4]=s,e[5]=r,e[6]=o,e[7]=u,e[8]=f):f=e[8];let p;e[9]!==h?(p=[h],e[9]=h,e[10]=p):p=e[10],(0,h0e.useEffect)(f,p);let g=0,A=qD,v=Un("graphiql-editor",n.className),w;return e[11]!==n||e[12]!==A||e[13]!==v?(w=(0,hFt.jsx)("div",{ref:d,tabIndex:g,onKeyDown:A,...n,className:v}),e[11]=n,e[12]=A,e[13]=v,e[14]=w):w=e[14],w};function iSi(i){return i.monaco}var pFt=ae(zi()),mFt=ae(fo()),gFt=ae(ke());var cq=(0,gFt.forwardRef)((i,e)=>{let t=(0,mFt.c)(6),n;t[0]!==i.className?(n=Un("graphiql-button-group",i.className),t[0]=i.className,t[1]=n):n=t[1];let o;return t[2]!==i||t[3]!==e||t[4]!==n?(o=(0,pFt.jsx)("div",{...i,ref:e,className:n}),t[2]=i,t[3]=e,t[4]=n,t[5]=o):o=t[5],o});cq.displayName="ButtonGroup";var lw=ae(zi()),IUe=ae(fo()),kFt=ae(ke());var ka=ae(ke(),1);var Pl=ae(zi(),1),nSi=Object.defineProperty,pb=(i,e)=>nSi(i,"name",{value:e,configurable:!0}),kUe="Dialog",[bFt,_Wo]=Eh(kUe),[oSi,Cv]=bFt(kUe),AFt=pb(i=>{let{__scopeDialog:e,children:t,open:n,defaultOpen:o,onOpenChange:r,modal:s=!0}=i,a=ka.useRef(null),l=ka.useRef(null),[c,u]=qC({prop:n,defaultProp:o??!1,onChange:r,caller:kUe}),[d,h]=ka.useState(0),[f,p]=ka.useState(0);return(0,Pl.jsx)(oSi,{scope:e,triggerRef:a,contentRef:l,contentId:E0(),titleId:E0(),descriptionId:E0(),titlePresent:d>0,descriptionPresent:f>0,setTitleCount:h,setDescriptionCount:p,open:c,onOpenChange:u,onOpenToggle:ka.useCallback(()=>u(g=>!g),[u]),modal:s,children:t})},"Dialog"),rSi="DialogTrigger",vFt=ka.forwardRef(pb(function(e,t){let{__scopeDialog:n,...o}=e,r=Cv(rSi,n),s=Fr(t,r.triggerRef);return(0,Pl.jsx)(Ea.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":f0e(r.open),...o,ref:s,onClick:Kn(e.onClick,r.onOpenToggle)})},"DialogTrigger")),yFt="DialogPortal",[sSi,wFt]=bFt(yFt,{forceMount:void 0}),xFt=pb(i=>{let{__scopeDialog:e,forceMount:t,children:n,container:o}=i,r=Cv(yFt,e);return(0,Pl.jsx)(sSi,{scope:e,forceMount:t,children:ka.Children.map(n,s=>(0,Pl.jsx)(ew,{present:t||r.open,children:(0,Pl.jsx)(X4,{asChild:!0,container:o,children:s})}))})},"DialogPortal"),TUe="DialogOverlay",CFt=ka.forwardRef(pb(function(e,t){let n=wFt(TUe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=Cv(TUe,e.__scopeDialog);return s.modal?(0,Pl.jsx)(ew,{present:o||s.open,children:(0,Pl.jsx)(lSi,{...r,ref:t})}):null},"DialogOverlay")),aSi=nb("DialogOverlay.RemoveScroll"),lSi=ka.forwardRef(pb(function(e,t){let{__scopeDialog:n,...o}=e,r=Cv(TUe,n),s=Pze(),a=Fr(t,s);return(0,Pl.jsx)(eG,{as:aSi,allowPinchZoom:!0,shards:[r.contentRef],children:(0,Pl.jsx)(Ea.div,{"data-state":f0e(r.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),uq="DialogContent",_Ft=ka.forwardRef(pb(function(e,t){let n=wFt(uq,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=Cv(uq,e.__scopeDialog);return(0,Pl.jsx)(ew,{present:o||s.open,children:s.modal?(0,Pl.jsx)(cSi,{...r,ref:t}):(0,Pl.jsx)(uSi,{...r,ref:t})})},"DialogContent")),cSi=ka.forwardRef(pb(function(e,t){let n=Cv(uq,e.__scopeDialog),o=ka.useRef(null),r=Fr(t,n.contentRef,o);return ka.useEffect(()=>{let s=o.current;if(s)return Ege(s)},[]),(0,Pl.jsx)(SFt,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Kn(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Kn(e.onPointerDownOutside,s=>{let a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:Kn(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),uSi=ka.forwardRef(pb(function(e,t){let n=Cv(uq,e.__scopeDialog),o=ka.useRef(!1),r=ka.useRef(!1);return(0,Pl.jsx)(SFt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));let a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})},"DialogContentNonModal")),SFt=ka.forwardRef(pb(function(e,t){let{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,l=Cv(uq,n);return j4(),(0,Pl.jsx)(Pl.Fragment,{children:(0,Pl.jsx)(oge,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:(0,Pl.jsx)(W4,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":f0e(l.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),dSi="DialogTitle",EFt=ka.forwardRef(pb(function(e,t){let{__scopeDialog:n,...o}=e,r=Cv(dSi,n),{setTitleCount:s}=r;return al(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),(0,Pl.jsx)(Ea.h2,{id:r.titleId,...o,ref:t})},"DialogTitle")),hSi="DialogDescription",DFt=ka.forwardRef(pb(function(e,t){let{__scopeDialog:n,...o}=e,r=Cv(hSi,n),{setDescriptionCount:s}=r;return al(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),(0,Pl.jsx)(Ea.p,{id:r.descriptionId,...o,ref:t})},"DialogDescription")),fSi="DialogClose",TFt=ka.forwardRef(pb(function(e,t){let{__scopeDialog:n,...o}=e,r=Cv(fSi,n);return(0,Pl.jsx)(Ea.button,{type:"button",...o,ref:t,onClick:Kn(e.onClick,()=>r.onOpenChange(!1))})},"DialogClose"));function f0e(i){return i?"open":"closed"}pb(f0e,"getState");var IFt=(0,kFt.forwardRef)((i,e)=>{let t=(0,IUe.c)(8),n;t[0]!==i.className?(n=Un("graphiql-dialog-close",i.className),t[0]=i.className,t[1]=n):n=t[1];let o,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,lw.jsx)(rT,{children:"Close dialog"}),r=(0,lw.jsx)(fk,{}),t[2]=o,t[3]=r):(o=t[2],r=t[3]);let s;return t[4]!==i||t[5]!==e||t[6]!==n?(s=(0,lw.jsx)(TFt,{asChild:!0,children:(0,lw.jsxs)(Da,{...i,ref:e,type:"button",className:n,children:[o,r]})}),t[4]=i,t[5]=e,t[6]=n,t[7]=s):s=t[7],s});IFt.displayName="Dialog.Close";var mSi=i=>{let e=(0,IUe.c)(9),t,n;e[0]!==i?({children:t,...n}=i,e[0]=i,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,lw.jsx)(CFt,{className:"graphiql-dialog-overlay"}),e[3]=o):o=e[3];let r;e[4]!==t?(r=(0,lw.jsxs)(xFt,{children:[o,(0,lw.jsx)(_Ft,{className:"graphiql-dialog",children:t})]}),e[4]=t,e[5]=r):r=e[5];let s;return e[6]!==n||e[7]!==r?(s=(0,lw.jsx)(AFt,{...n,children:r}),e[6]=n,e[7]=r,e[8]=s):s=e[8],s},cw=Object.assign(mSi,{Close:IFt,Title:EFt,Trigger:vFt,Description:DFt});var LFt=ae(zi()),NFt=ae(fo()),MFt=ae(ke());var Lf=(0,MFt.forwardRef)((i,e)=>{let t=(0,NFt.c)(15),n,o,r,s;if(t[0]!==e||t[1]!==i){let{children:u,onlyShowFirstChild:d,type:h,...f}=i;n=u,o=f,r=e,s=Un(`graphiql-markdown-${h}`,d&&"graphiql-markdown-preview",f.className),t[0]=e,t[1]=i,t[2]=n,t[3]=o,t[4]=r,t[5]=s}else n=t[2],o=t[3],r=t[4],s=t[5];let a;t[6]!==n?(a=bTt.render(n),t[6]=n,t[7]=a):a=t[7];let l;t[8]!==a?(l={__html:a},t[8]=a,t[9]=l):l=t[9];let c;return t[10]!==o||t[11]!==r||t[12]!==s||t[13]!==l?(c=(0,LFt.jsx)("div",{...o,ref:r,className:s,dangerouslySetInnerHTML:l}),t[10]=o,t[11]=r,t[12]=s,t[13]=l,t[14]=c):c=t[14],c});Lf.displayName="MarkdownContent";var RFt=ae(zi()),FFt=ae(fo()),OFt=ae(ke());var CM=(0,OFt.forwardRef)((i,e)=>{let t=(0,FFt.c)(6),n;t[0]!==i.className?(n=Un("graphiql-spinner",i.className),t[0]=i.className,t[1]=n):n=t[1];let o;return t[2]!==i||t[3]!==e||t[4]!==n?(o=(0,RFt.jsx)("div",{...i,ref:e,className:n}),t[2]=i,t[3]=e,t[4]=n,t[5]=o):o=t[5],o});CM.displayName="Spinner";var w5=ae(zi()),oY=ae(fo()),rY=ae(ke());var PFt=ae(ke(),1),p0e=(0,PFt.createContext)({});var BFt=ae(ke(),1);function H0(i){let e=(0,BFt.useRef)(null);return e.current===null&&(e.current=i()),e.current}var m0e=ae(ke(),1);var zFt=typeof window<"u";var g0e=zFt?m0e.useLayoutEffect:m0e.useEffect;var VFt=ae(ke(),1),J8=(0,VFt.createContext)(null);function _M(i,e){i.indexOf(e)===-1&&i.push(e)}function RT(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function LUe([...i],e,t){let n=e<0?i.length+e:e;if(n>=0&&nt>e?e:t{},Qd=()=>{};var Ip={};var dq=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);var hq=i=>typeof i=="object"&&i!==null;var fq=i=>/^0[^.\s]+$/u.test(i);function pq(i){let e;return()=>(e===void 0&&(e=i()),e)}var Bl=i=>i;var _v=(...i)=>i.reduce((e,t)=>n=>t(e(n)));var uw=(i,e,t)=>{let n=e-i;return n?(t-i)/n:1};var x_=class{constructor(){this.subscriptions=[]}add(e){return _M(this.subscriptions,e),()=>RT(this.subscriptions,e)}notify(e,t,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,t,n);else for(let r=0;ri*1e3,Gd=i=>i/1e3;var mq=(i,e)=>e?i*(1e3/e):0;var HFt=(i,e,t)=>(((1-3*t+3*e)*i+(3*t-6*e))*i+3*e)*i,gSi=1e-7,bSi=12;function ASi(i,e,t,n,o){let r,s,a=0;do s=e+(t-e)/2,r=HFt(s,n,o)-i,r>0?t=s:e=s;while(Math.abs(r)>gSi&&++aASi(r,0,1,i,t);return r=>r===0||r===1?r:HFt(o(r),e,n)}var b0e=i=>e=>e<=.5?i(2*e)/2:(2-i(2*(1-e)))/2;var A0e=i=>e=>1-i(1-e);var v0e=FT(.33,1.53,.69,.99),X8=A0e(v0e),gq=b0e(X8);var bq=i=>i>=1?1:(i*=2)<1?.5*X8(i):.5*(2-Math.pow(2,-10*(i-1)));var Aq=i=>1-Math.sin(Math.acos(i)),vq=A0e(Aq),yq=b0e(Aq);var NUe=FT(.42,0,1,1),MUe=FT(0,0,.58,1),wq=FT(.42,0,.58,1);var RUe=i=>Array.isArray(i)&&typeof i[0]!="number";var xq=i=>Array.isArray(i)&&typeof i[0]=="number";var WFt={linear:Bl,easeIn:NUe,easeInOut:wq,easeOut:MUe,circIn:Aq,circInOut:yq,circOut:vq,backIn:X8,backInOut:gq,backOut:v0e,anticipate:bq},vSi=i=>typeof i=="string",y0e=i=>{if(xq(i)){Qd(i.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,t,n,o]=i;return FT(e,t,n,o)}else if(vSi(i))return Qd(WFt[i]!==void 0,`Invalid easing type '${i}'`,"invalid-easing-type"),WFt[i];return i};var Cq=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function UFt(i){let e=new Set,t=new Set,n=!1,o=!1,r=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(c){r.has(c)&&(l.schedule(c),i()),c(s)}let l={schedule:(c,u=!1,d=!1)=>{let f=d&&n?e:t;return u&&r.add(c),f.add(c),c},cancel:c=>{t.delete(c),r.delete(c)},process:c=>{if(s=c,n){o=!0;return}n=!0;let u=e;e=t,t=u,e.forEach(a),e.clear(),n=!1,o&&(o=!1,l.process(c))}};return l}var ySi=40;function w0e(i,e){let t=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,s=Cq.reduce((C,_)=>(C[_]=UFt(r),C),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:p}=s,g=()=>{let C=Ip.useManualTiming,_=C?o.timestamp:performance.now();t=!1,C||(o.delta=n?1e3/60:Math.max(Math.min(_-o.timestamp,ySi),1)),o.timestamp=_,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),f.process(o),p.process(o),o.isProcessing=!1,t&&e&&(n=!1,i(g))},A=()=>{t=!0,n=!0,o.isProcessing||i(g)};return{schedule:Cq.reduce((C,_)=>{let E=s[_];return C[_]=(I,T=!1,N=!1)=>(t||A(),E.schedule(I,T,N)),C},{}),cancel:C=>{for(let _=0;_(x0e===void 0&&zl.set(uc.isProcessing||Ip.useManualTiming?uc.timestamp:performance.now()),x0e),set:i=>{x0e=i,queueMicrotask(wSi)}};var jFt=i=>e=>typeof e=="string"&&e.startsWith(i),C0e=jFt("--"),xSi=jFt("var(--"),Z8=i=>xSi(i)?CSi.test(i.split("/*")[0].trim()):!1,CSi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function FUe(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}var dw={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},C_={...dw,transform:i=>td(0,1,i)},Sq={...dw,default:1};var OT=i=>Math.round(i*1e5)/1e5;var $8=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QFt(i){return i==null}var GFt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var e5=(i,e)=>t=>!!(typeof t=="string"&&GFt.test(t)&&t.startsWith(i)||e&&!QFt(t)&&Object.prototype.hasOwnProperty.call(t,e)),_0e=(i,e,t)=>n=>{if(typeof n!="string")return n;let[o,r,s,a]=n.match($8);return{[i]:parseFloat(o),[e]:parseFloat(r),[t]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}};var _Si=i=>td(0,255,i),OUe={...dw,transform:i=>Math.round(_Si(i))},hw={test:e5("rgb","red"),parse:_0e("red","green","blue"),transform:({red:i,green:e,blue:t,alpha:n=1})=>"rgba("+OUe.transform(i)+", "+OUe.transform(e)+", "+OUe.transform(t)+", "+OT(C_.transform(n))+")"};function SSi(i){let e="",t="",n="",o="";return i.length>5?(e=i.substring(1,3),t=i.substring(3,5),n=i.substring(5,7),o=i.substring(7,9)):(e=i.substring(1,2),t=i.substring(2,3),n=i.substring(3,4),o=i.substring(4,5),e+=e,t+=t,n+=n,o+=o),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var Eq={test:e5("#"),parse:SSi,transform:hw.transform};var Dq=i=>({test:e=>typeof e=="string"&&e.endsWith(i)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${i}`}),W0=Dq("deg"),Mf=Dq("%"),ui=Dq("px"),PUe=Dq("vh"),BUe=Dq("vw"),S0e={...Mf,parse:i=>Mf.parse(i)/100,transform:i=>Mf.transform(i*100)};var PT={test:e5("hsl","hue"),parse:_0e("hue","saturation","lightness"),transform:({hue:i,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(i)+", "+Mf.transform(OT(e))+", "+Mf.transform(OT(t))+", "+OT(C_.transform(n))+")"};var ul={test:i=>hw.test(i)||Eq.test(i)||PT.test(i),parse:i=>hw.test(i)?hw.parse(i):PT.test(i)?PT.parse(i):Eq.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?hw.transform(i):PT.transform(i),getAnimatableNone:i=>{let e=ul.parse(i);return e.alpha=0,ul.transform(e)}};var qFt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ESi(i){return isNaN(i)&&typeof i=="string"&&(i.match($8)?.length||0)+(i.match(qFt)?.length||0)>0}var KFt="number",JFt="color",DSi="var",TSi="var(",YFt="${}",kSi=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function BT(i){let e=i.toString(),t=[],n={color:[],number:[],var:[]},o=[],r=0,a=e.replace(kSi,l=>(ul.test(l)?(n.color.push(r),o.push(JFt),t.push(ul.parse(l))):l.startsWith(TSi)?(n.var.push(r),o.push(DSi),t.push(l)):(n.number.push(r),o.push(KFt),t.push(parseFloat(l))),++r,YFt)).split(YFt);return{values:t,split:a,indexes:n,types:o}}function ISi(i){return BT(i).values}function XFt({split:i,types:e}){let t=i.length;return n=>{let o="";for(let r=0;rtypeof i=="number"?0:ul.test(i)?ul.getAnimatableNone(i):i,MSi=(i,e)=>typeof i=="number"?e?.trim().endsWith("/")?i:0:NSi(i);function RSi(i){let e=BT(i);return XFt(e)(e.values.map((n,o)=>MSi(n,e.split[o])))}var id={test:ESi,parse:ISi,createTransformer:LSi,getAnimatableNone:RSi};function zUe(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function ZFt({hue:i,saturation:e,lightness:t,alpha:n}){i/=360,e/=100,t/=100;let o=0,r=0,s=0;if(!e)o=r=s=t;else{let a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;o=zUe(l,a,i+1/3),r=zUe(l,a,i),s=zUe(l,a,i-1/3)}return{red:Math.round(o*255),green:Math.round(r*255),blue:Math.round(s*255),alpha:n}}function t5(i,e){return t=>t>0?e:i}var ho=(i,e,t)=>i+(e-i)*t;var VUe=(i,e,t)=>{let n=i*i,o=t*(e*e-n)+n;return o<0?0:Math.sqrt(o)},FSi=[Eq,hw,PT],OSi=i=>FSi.find(e=>e.test(i));function $Ft(i){let e=OSi(i);if(w_(!!e,`'${i}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let t=e.parse(i);return e===PT&&(t=ZFt(t)),t}var HUe=(i,e)=>{let t=$Ft(i),n=$Ft(e);if(!t||!n)return t5(i,e);let o={...t};return r=>(o.red=VUe(t.red,n.red,r),o.green=VUe(t.green,n.green,r),o.blue=VUe(t.blue,n.blue,r),o.alpha=ho(t.alpha,n.alpha,r),hw.transform(o))};var E0e=new Set(["none","hidden"]);function eOt(i,e){return E0e.has(i)?t=>t<=0?i:e:t=>t>=1?e:i}function PSi(i,e){return t=>ho(i,e,t)}function D0e(i){return typeof i=="number"?PSi:typeof i=="string"?Z8(i)?t5:ul.test(i)?HUe:VSi:Array.isArray(i)?tOt:typeof i=="object"?ul.test(i)?HUe:BSi:t5}function tOt(i,e){let t=[...i],n=t.length,o=i.map((r,s)=>D0e(r)(r,e[s]));return r=>{for(let s=0;s{for(let r in n)t[r]=n[r](o);return t}}function zSi(i,e){let t=[],n={color:0,var:0,number:0};for(let o=0;o{let t=id.createTransformer(e),n=BT(i),o=BT(e);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?E0e.has(i)&&!o.values.length||E0e.has(e)&&!n.values.length?eOt(i,e):_v(tOt(zSi(n,o),o.values),t):(w_(!0,`Complex values '${i}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),t5(i,e))};function T0e(i,e,t){return typeof i=="number"&&typeof e=="number"&&typeof t=="number"?ho(i,e,t):D0e(i)(i,e)}var iOt=i=>{let e=({timestamp:t})=>i(t);return{start:(t=!0)=>Jn.update(e,t),stop:()=>Nf(e),now:()=>uc.isProcessing?uc.timestamp:zl.now()}};var k0e=(i,e,t=10)=>{let n="",o=Math.max(Math.round(e/t),2);for(let r=0;r=2e4?1/0:e}function nOt(i,e=100,t){let n=t({...i,keyframes:[0,e]}),o=Math.min(i5(n),2e4);return{type:"keyframes",ease:r=>n.next(o*r).value/e,duration:Gd(o)}}var Vl={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function jUe(i,e){return i*Math.sqrt(1-e*e)}var HSi=12;function WSi(i,e,t){let n=t;for(let o=1;o{let u=c*s,d=u*i,h=u-t,f=jUe(c,s),p=Math.exp(-d);return UUe-h/f*p},r=c=>{let d=c*s*i,h=d*t+t,f=Math.pow(s,2)*Math.pow(c,2)*i,p=Math.exp(-d),g=jUe(Math.pow(c,2),s);return(-o(c)+UUe>0?-1:1)*((h-f)*p)/g}):(o=c=>{let u=Math.exp(-c*i),d=(c-t)*i+1;return-UUe+u*d},r=c=>{let u=Math.exp(-c*i),d=(t-c)*(i*i);return u*d});let a=5/i,l=WSi(o,r,a);if(i=zc(i),isNaN(l))return{stiffness:Vl.stiffness,damping:Vl.damping,duration:i};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:s*2*Math.sqrt(n*c),duration:i}}}var jSi=["duration","bounce"],QSi=["stiffness","damping","mass"];function oOt(i,e){return e.some(t=>i[t]!==void 0)}function GSi(i){let e={velocity:Vl.velocity,stiffness:Vl.stiffness,damping:Vl.damping,mass:Vl.mass,isResolvedFromDuration:!1,...i};if(!oOt(i,QSi)&&oOt(i,jSi))if(e.velocity=0,i.visualDuration){let t=i.visualDuration,n=2*Math.PI/(t*1.2),o=n*n,r=2*td(.05,1,1-(i.bounce||0))*Math.sqrt(o);e={...e,mass:Vl.mass,stiffness:o,damping:r}}else{let t=USi({...i,velocity:0});e={...e,...t,mass:Vl.mass},e.isResolvedFromDuration=!0}return e}function n5(i=Vl.visualDuration,e=Vl.bounce){let t=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:e}:i,{restSpeed:n,restDelta:o}=t,r=t.keyframes[0],s=t.keyframes[t.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=GSi({...t,velocity:-Gd(t.velocity||0)}),p=h||0,g=c/(2*Math.sqrt(l*u)),A=s-r,v=Gd(Math.sqrt(l/u)),w=Math.abs(A)<5;n||(n=w?Vl.restSpeed.granular:Vl.restSpeed.default),o||(o=w?Vl.restDelta.granular:Vl.restDelta.default);let C,_,E,I,T,N;if(g<1)E=jUe(v,g),I=(p+g*v*A)/E,C=B=>{let z=Math.exp(-g*v*B);return s-z*(I*Math.sin(E*B)+A*Math.cos(E*B))},T=g*v*I+A*E,N=g*v*A-I*E,_=B=>Math.exp(-g*v*B)*(T*Math.sin(E*B)+N*Math.cos(E*B));else if(g===1){C=z=>s-Math.exp(-v*z)*(A+(p+v*A)*z);let B=p+v*A;_=z=>Math.exp(-v*z)*(v*B*z-p)}else{let B=v*Math.sqrt(g*g-1);C=U=>{let M=Math.exp(-g*v*U),ee=Math.min(B*U,300);return s-M*((p+g*v*A)*Math.sinh(ee)+B*A*Math.cosh(ee))/B};let z=(p+g*v*A)/B,Q=g*v*z-A*B,Z=g*v*A-z*B;_=U=>{let M=Math.exp(-g*v*U),ee=Math.min(B*U,300);return M*(Q*Math.sinh(ee)+Z*Math.cosh(ee))}}let L={calculatedDuration:f&&d||null,velocity:B=>zc(_(B)),next:B=>{if(!f&&g<1){let Q=Math.exp(-g*v*B),Z=Math.sin(E*B),U=Math.cos(E*B),M=s-Q*(I*Z+A*U),ee=zc(Q*(T*Z+N*U));return a.done=Math.abs(ee)<=n&&Math.abs(s-M)<=o,a.value=a.done?s:M,a}let z=C(B);if(f)a.done=B>=d;else{let Q=zc(_(B));a.done=Math.abs(Q)<=n&&Math.abs(s-z)<=o}return a.value=a.done?s:z,a},toString:()=>{let B=Math.min(i5(L),2e4),z=k0e(Q=>L.next(B*Q).value,B,30);return B+"ms "+z},toTransition:()=>{}};return L}n5.applyToOptions=i=>{let e=nOt(i,100,n5);return i.ease=e.ease,i.duration=zc(e.duration),i.type="keyframes",i};var qSi=5;function I0e(i,e,t){let n=Math.max(e-qSi,0);return mq(t-i(n),e-n)}function Tq({keyframes:i,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:r=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){let d=i[0],h={done:!1,value:d},f=N=>a!==void 0&&Nl,p=N=>a===void 0?l:l===void 0||Math.abs(a-N)-g*Math.exp(-N/n),C=N=>v+w(N),_=N=>{let L=w(N),B=C(N);h.done=Math.abs(L)<=c,h.value=h.done?v:B},E,I,T=N=>{f(h.value)&&(E=N,I=n5({keyframes:[h.value,p(h.value)],velocity:I0e(C,N,h.value),damping:o,stiffness:r,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:N=>{let L=!1;return!I&&E===void 0&&(L=!0,_(N),T(N)),E!==void 0&&N>=E?I.next(N-E):(!L&&_(N),h)}}}function YSi(i,e,t){let n=[],o=t||Ip.mix||T0e,r=i.length-1;for(let s=0;se[0];if(r===2&&e[0]===e[1])return()=>e[1];let s=i[0]===i[1];i[0]>i[r-1]&&(i=[...i].reverse(),e=[...e].reverse());let a=YSi(e,n,o),l=a.length,c=u=>{if(s&&u1)for(;dc(td(i[0],i[r-1],u)):c}function rOt(i,e){let t=i[i.length-1];for(let n=1;n<=e;n++){let o=uw(0,e,n);i.push(ho(t,1,o))}}function sOt(i){let e=[0];return rOt(e,i.length-1),e}function aOt(i,e){return i.map(t=>t*e)}function KSi(i,e){return i.map(()=>e||wq).splice(0,i.length-1)}function SM({duration:i=300,keyframes:e,times:t,ease:n="easeInOut"}){let o=RUe(n)?n.map(y0e):y0e(n),r={done:!1,value:e[0]},s=aOt(t&&t.length===e.length?t:sOt(e),i),a=L0e(s,e,{ease:Array.isArray(o)?o:KSi(e,o)});return{calculatedDuration:i,next:l=>(r.value=a(l),r.done=l>=i,r)}}var JSi=i=>i!==null;function zT(i,{repeat:e,repeatType:t="loop"},n,o=1){let r=i.filter(JSi),a=o<0||e&&t!=="loop"&&e%2===1?0:r.length-1;return!a||n===void 0?r[a]:n}var XSi={decay:Tq,inertia:Tq,tween:SM,keyframes:SM,spring:n5};function N0e(i){typeof i.type=="string"&&(i.type=XSi[i.type])}var VT=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};var ZSi=i=>i/100,__=class extends VT{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==zl.now()&&this.tick(zl.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;N0e(e);let{type:t=SM,repeat:n=0,repeatDelay:o=0,repeatType:r,velocity:s=0}=e,{keyframes:a}=e,l=t||SM;l!==SM&&typeof a[0]!="number"&&(this.mixKeyframes=_v(ZSi,T0e(a[0],a[1])),a=[0,100]);let c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=i5(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:n,totalDuration:o,mixKeyframes:r,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:g,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-o/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let C=this.currentTime,_=n;if(d){let N=Math.min(this.currentTime,o)/a,L=Math.floor(N),B=N%1;!B&&N>=1&&(B=1),B===1&&L--,L=Math.min(L,d+1),L%2&&(h==="reverse"?(B=1-B,f&&(B-=f/a)):h==="mirror"&&(_=s)),C=td(0,1,B)*a}let E;w?(this.delayState.value=u[0],E=this.delayState):E=_.next(C),r&&!w&&(E.value=r(E.value));let{done:I}=E;!w&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return T&&p!==Tq&&(E.value=zT(u,this.options,A,this.speed)),g&&g(E.value),T&&this.finish(),E}then(e,t){return this.finished.then(e,t)}get duration(){return Gd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Gd(e)}get time(){return Gd(this.currentTime)}set time(e){e=zc(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return I0e(n=>this.generator.next(n).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(zl.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Gd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=iOt,startTime:t}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(zl.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function lOt(i){for(let e=1;ei*180/Math.PI,QUe=i=>{let e=EM(Math.atan2(i[1],i[0]));return GUe(e)},$Si={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:QUe,rotateZ:QUe,skewX:i=>EM(Math.atan(i[1])),skewY:i=>EM(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},GUe=i=>(i=i%360,i<0&&(i+=360),i),cOt=QUe,uOt=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),dOt=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),eEi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:uOt,scaleY:dOt,scale:i=>(uOt(i)+dOt(i))/2,rotateX:i=>GUe(EM(Math.atan2(i[6],i[5]))),rotateY:i=>GUe(EM(Math.atan2(-i[2],i[0]))),rotateZ:cOt,rotate:cOt,skewX:i=>EM(Math.atan(i[4])),skewY:i=>EM(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function M0e(i){return i.includes("scale")?1:0}function R0e(i,e){if(!i||i==="none")return M0e(e);let t=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(t)n=eEi,o=t;else{let a=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=$Si,o=a}if(!o)return M0e(e);let r=n[e],s=o[1].split(",").map(tEi);return typeof r=="function"?r(s):s[r]}var hOt=(i,e)=>{let{transform:t="none"}=getComputedStyle(i);return R0e(t,e)};function tEi(i){return parseFloat(i.trim())}var fw=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],U0=new Set([...fw,"pathRotation"]);var qUe=i=>i===dw||i===ui,iEi=new Set(["x","y","z"]),nEi=fw.filter(i=>!iEi.has(i));function fOt(i){let e=[];return nEi.forEach(t=>{let n=i.getValue(t);n!==void 0&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}var S_={width:({x:i},{paddingLeft:e="0",paddingRight:t="0",boxSizing:n})=>{let o=i.max-i.min;return n==="border-box"?o:o-parseFloat(e)-parseFloat(t)},height:({y:i},{paddingTop:e="0",paddingBottom:t="0",boxSizing:n})=>{let o=i.max-i.min;return n==="border-box"?o:o-parseFloat(e)-parseFloat(t)},top:(i,{top:e})=>parseFloat(e),left:(i,{left:e})=>parseFloat(e),bottom:({y:i},{top:e})=>parseFloat(e)+(i.max-i.min),right:({x:i},{left:e})=>parseFloat(e)+(i.max-i.min),x:(i,{transform:e})=>R0e(e,"x"),y:(i,{transform:e})=>R0e(e,"y")};S_.translateX=S_.x;S_.translateY=S_.y;var DM=new Set,YUe=!1,KUe=!1,JUe=!1;function pOt(){if(KUe){let i=Array.from(DM).filter(n=>n.needsMeasurement),e=new Set(i.map(n=>n.element)),t=new Map;e.forEach(n=>{let o=fOt(n);o.length&&(t.set(n,o),n.render())}),i.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();let o=t.get(n);o&&o.forEach(([r,s])=>{n.getValue(r)?.set(s)})}),i.forEach(n=>n.measureEndState()),i.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}KUe=!1,YUe=!1,DM.forEach(i=>i.complete(JUe)),DM.clear()}function mOt(){DM.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(KUe=!0)})}function gOt(){JUe=!0,mOt(),pOt(),JUe=!1}var HT=class{constructor(e,t,n,o,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=o,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(DM.add(this),YUe||(YUe=!0,Jn.read(mOt),Jn.resolveKeyframes(pOt))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:o}=this;if(e[0]===null){let r=o?.get(),s=e[e.length-1];if(r!==void 0)e[0]=r;else if(n&&t){let a=n.readValue(t,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),o&&r===void 0&&o.set(e[0])}lOt(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),DM.delete(this)}cancel(){this.state==="scheduled"&&(DM.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var bOt=i=>i.startsWith("--");function F0e(i,e,t){bOt(e)?i.style.setProperty(e,t):i.style[e]=t}var AOt={};function O0e(i,e){let t=pq(i);return()=>AOt[e]??t()}var vOt=O0e(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var P0e=O0e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var TM=([i,e,t,n])=>`cubic-bezier(${i}, ${e}, ${t}, ${n})`;var XUe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:TM([0,.65,.55,1]),circOut:TM([.55,0,1,.45]),backIn:TM([.31,.01,.66,-.59]),backOut:TM([.33,1.53,.69,.99])};function ZUe(i,e){if(i)return typeof i=="function"?P0e()?k0e(i,e):"ease-out":xq(i)?TM(i):Array.isArray(i)?i.map(t=>ZUe(t,e)||XUe.easeOut):XUe[i]}function yOt(i,e,t,{delay:n=0,duration:o=300,repeat:r=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){let u={[e]:t};l&&(u.offset=l);let d=ZUe(a,o);Array.isArray(d)&&(u.easing=d);let h={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:s==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),i.animate(u,h)}function B0e(i){return typeof i=="function"&&"applyToOptions"in i}function wOt({type:i,...e}){return B0e(i)&&P0e()?i.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}var o5=class extends VT{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:o,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=s,this.options=e,Qd(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=wOt(e);this.animation=yOt(t,n,o,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let u=zT(o,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),F0e(t,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Gd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Gd(e)}get time(){return Gd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=zc(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&vOt()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Bl):o(this)}};var xOt={anticipate:bq,backInOut:gq,circInOut:yq};function oEi(i){return i in xOt}function COt(i){typeof i.ease=="string"&&oEi(i.ease)&&(i.ease=xOt[i.ease])}var $Ue=10,z0e=class extends o5{constructor(e){COt(e),N0e(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:o,element:r,...s}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let a=new __({...s,autoplay:!1}),l=Math.max($Ue,zl.now()-this.startTime),c=td(0,$Ue,l-$Ue),u=a.sample(l).value,{name:d}=this.options;r&&d&&F0e(r,d,u),t.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}};var eje=(i,e)=>e==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(id.test(i)||i==="0")&&!i.startsWith("url("));function rEi(i){let e=i[0];if(i.length===1)return!0;for(let t=0;tObject.hasOwnProperty.call(Element.prototype,"animate"));function EOt(i){let{motionValue:e,name:t,repeatDelay:n,repeatType:o,damping:r,type:s,keyframes:a}=i,l=e?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:c,transformTemplate:u}=e.owner.getProps();return lEi()&&t&&(V0e.has(t)||aEi.has(t)&&SOt(a))&&(t!=="transform"||!u)&&!c&&!n&&o!=="mirror"&&r!==0&&s!=="inertia"}var cEi=40,H0e=class extends VT{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=zl.now();let h={autoplay:e,delay:t,type:n,repeat:o,repeatDelay:r,repeatType:s,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||HT;this.keyframeResolver=new f(a,(p,g,A)=>this.onKeyframesResolved(p,g,h,!A),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,o){this.keyframeResolver=void 0;let{name:r,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=zl.now();let d=!0;_Ot(e,r,s,a)||(d=!1,(Ip.instantAnimations||!l)&&u?.(zT(e,n,t)),e[0]=e[e.length-1],kq(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>cEi?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},p=d&&!c&&EOt(f),g=f.motionValue?.owner?.current,A;if(p)try{A=new z0e({...f,element:g})}catch{A=new __(f)}else A=new __(f);A.finished.then(()=>{this.notifyFinished()}).catch(Bl),this.pendingTimeline&&(this.stopTimeline=A.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=A}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),gOt()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function W0e(i,e,t,n=0,o=1){let r=Array.from(i).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),s=i.size,a=(s-1)*n;return typeof t=="function"?t(r,s):o===1?r*n:a-r*n}var DOt=30,uEi=i=>!isNaN(parseFloat(i)),kM={current:void 0},U0e=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=zl.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=zl.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=uEi(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new x_);let n=this.events[e].add(t);return e==="change"?()=>{n(),Jn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return kM.current&&kM.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=zl.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>DOt)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,DOt);return mq(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Um(i,e){return new U0e(i,e)}function j0e(i,e){if(i?.inherit&&e){let{inherit:t,...n}=i;return{...e,...n}}return i}function r5(i,e){let t=i?.[e]??i?.default??i;return t!==i?j0e(t,i):t}var dEi={type:"spring",stiffness:500,damping:25,restSpeed:10},hEi=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),fEi={type:"keyframes",duration:.8},pEi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TOt=(i,{keyframes:e})=>e.length>2?fEi:U0.has(i)?i.startsWith("scale")?hEi(e[1]):dEi:pEi;var mEi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function kOt(i){for(let e in i)if(!mEi.has(e))return!0;return!1}var IM=(i,e,t,n={},o,r)=>s=>{let a=r5(n,i)||{},l=a.delay||n.delay||0,{elapsed:c=0}=n;c=c-zc(l);let u={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:i,motionValue:e,element:r?void 0:o};kOt(a)||Object.assign(u,TOt(i,u)),u.duration&&(u.duration=zc(u.duration)),u.repeatDelay&&(u.repeatDelay=zc(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kq(u),u.delay===0&&(d=!0)),(Ip.instantAnimations||Ip.skipAnimations||o?.shouldSkipAnimations||a.skipAnimations)&&(d=!0,kq(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&e.get()!==void 0){let h=zT(u.keyframes,a);if(h!==void 0){Jn.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new __(u):new H0e(u)};var gEi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bEi(i){let e=gEi.exec(i);if(!e)return[,];let[,t,n,o]=e;return[`--${t??n}`,o]}var AEi=4;function tje(i,e,t=1){Qd(t<=AEi,`Max CSS variable fallback depth detected in property "${i}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=bEi(i);if(!n)return;let r=window.getComputedStyle(e).getPropertyValue(n);if(r){let s=r.trim();return dq(s)?parseFloat(s):s}return Z8(o)?tje(o,e,t+1):o}function IOt(i){let e=[{},{}];return i?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function LM(i,e,t,n){if(typeof e=="function"){let[o,r]=IOt(n);e=e(t!==void 0?t:i.custom,o,r)}if(typeof e=="string"&&(e=i.variants&&i.variants[e]),typeof e=="function"){let[o,r]=IOt(n);e=e(t!==void 0?t:i.custom,o,r)}return e}function mb(i,e,t){let n=i.getProps();return LM(n,e,t!==void 0?t:n.custom,i)}var Q0e=new Set(["width","height","top","left","right","bottom",...fw]);var Iq=i=>Array.isArray(i);function vEi(i,e,t){i.hasValue(e)?i.getValue(e).set(t):i.addValue(e,Um(t))}function yEi(i){return Iq(i)?i[i.length-1]||0:i}function LOt(i,e){let t=mb(i,e),{transitionEnd:n={},transition:o={},...r}=t||{};r={...r,...n};for(let s in r){let a=yEi(r[s]);vEi(i,s,a)}}var rs=i=>!!(i&&i.getVelocity);function NOt(i){return!!(rs(i)&&i.add)}function s5(i,e){let t=i.getValue("willChange");if(NOt(t))return t.add(e);if(!t&&Ip.WillChange){let n=new Ip.WillChange("auto");i.addValue("willChange",n),n.add(e)}}function a5(i){return i.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var MOt="framerAppearId",Lq="data-"+a5(MOt);function G0e(i){return i.props[Lq]}function wEi({protectedKeys:i,needsAnimating:e},t){let n=i.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,n}function q0e(i,e,{delay:t=0,transitionOverride:n,type:o}={}){let{transition:r,transitionEnd:s,...a}=e,l=i.getDefaultTransition();r=r?j0e(r,l):l;let c=r?.reduceMotion,u=r?.skipAnimations;n&&(r=n);let d=[],h=o&&i.animationState&&i.animationState.getState()[o],f=r?.path;f&&f.animateVisualElement(i,a,r,t,d);for(let p in a){let g=i.getValue(p,i.latestValues[p]??null),A=a[p];if(A===void 0||h&&wEi(h,p))continue;let v={delay:t,...r5(r||{},p)};u&&(v.skipAnimations=!0);let w=g.get();if(w!==void 0&&!g.isAnimating()&&!Array.isArray(A)&&A===w&&!v.velocity){Jn.update(()=>g.set(A));continue}let C=!1;if(window.MotionHandoffAnimation){let I=G0e(i);if(I){let T=window.MotionHandoffAnimation(I,p,Jn);T!==null&&(v.startTime=T,C=!0)}}s5(i,p);let _=c??i.shouldReduceMotion;g.start(IM(p,g,A,_&&Q0e.has(p)?{type:!1}:v,i,C));let E=g.animation;E&&d.push(E)}if(s){let p=()=>Jn.update(()=>{s&&LOt(i,s)});d.length?Promise.all(d).then(p):p()}return d}function Y0e(i,e,t={}){let n=mb(i,e,t.type==="exit"?i.presenceContext?.custom:void 0),{transition:o=i.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(o=t.transitionOverride);let r=n?()=>Promise.all(q0e(i,n,t)):()=>Promise.resolve(),s=i.variantChildren&&i.variantChildren.size?(l=0)=>{let{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return xEi(i,e,l,c,u,d,t)}:()=>Promise.resolve(),{when:a}=o;if(a){let[l,c]=a==="beforeChildren"?[r,s]:[s,r];return l().then(()=>c())}else return Promise.all([r(),s(t.delay)])}function xEi(i,e,t=0,n=0,o=0,r=1,s){let a=[];for(let l of i.variantChildren)l.notify("AnimationStart",e),a.push(Y0e(l,e,{...s,delay:t+(typeof n=="function"?0:n)+W0e(i.variantChildren,l,n,o,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ROt(i,e,t={}){i.notify("AnimationStart",e);let n;if(Array.isArray(e)){let o=e.map(r=>Y0e(i,r,t));n=Promise.all(o)}else if(typeof e=="string")n=Y0e(i,e,t);else{let o=typeof e=="function"?mb(i,e,t.custom):e;n=Promise.all(q0e(i,o,t))}return n.then(()=>{i.notify("AnimationComplete",e)})}var FOt={test:i=>i==="auto",parse:i=>i};var K0e=i=>e=>e.test(i);var ije=[dw,ui,Mf,W0,BUe,PUe,FOt],nje=i=>ije.find(K0e(i));function OOt(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||fq(i):!0}var CEi=new Set(["brightness","contrast","saturate","opacity"]);function _Ei(i){let[e,t]=i.slice(0,-1).split("(");if(e==="drop-shadow")return i;let[n]=t.match($8)||[];if(!n)return i;let o=t.replace(n,""),r=CEi.has(e)?1:0;return n!==t&&(r*=100),e+"("+r+o+")"}var SEi=/\b([a-z-]*)\(.*?\)/gu,Nq={...id,getAnimatableNone:i=>{let e=i.match(SEi);return e?e.map(_Ei).join(" "):i}};var Mq={...id,getAnimatableNone:i=>{let e=id.parse(i);return id.createTransformer(i)(e.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}};var oje={...dw,transform:Math.round};var POt={rotate:W0,pathRotation:W0,rotateX:W0,rotateY:W0,rotateZ:W0,scale:Sq,scaleX:Sq,scaleY:Sq,scaleZ:Sq,skew:W0,skewX:W0,skewY:W0,distance:ui,translateX:ui,translateY:ui,translateZ:ui,x:ui,y:ui,z:ui,perspective:ui,transformPerspective:ui,opacity:C_,originX:S0e,originY:S0e,originZ:ui};var NM={borderWidth:ui,borderTopWidth:ui,borderRightWidth:ui,borderBottomWidth:ui,borderLeftWidth:ui,borderRadius:ui,borderTopLeftRadius:ui,borderTopRightRadius:ui,borderBottomRightRadius:ui,borderBottomLeftRadius:ui,width:ui,maxWidth:ui,height:ui,maxHeight:ui,top:ui,right:ui,bottom:ui,left:ui,inset:ui,insetBlock:ui,insetBlockStart:ui,insetBlockEnd:ui,insetInline:ui,insetInlineStart:ui,insetInlineEnd:ui,padding:ui,paddingTop:ui,paddingRight:ui,paddingBottom:ui,paddingLeft:ui,paddingBlock:ui,paddingBlockStart:ui,paddingBlockEnd:ui,paddingInline:ui,paddingInlineStart:ui,paddingInlineEnd:ui,margin:ui,marginTop:ui,marginRight:ui,marginBottom:ui,marginLeft:ui,marginBlock:ui,marginBlockStart:ui,marginBlockEnd:ui,marginInline:ui,marginInlineStart:ui,marginInlineEnd:ui,fontSize:ui,backgroundPositionX:ui,backgroundPositionY:ui,...POt,zIndex:oje,fillOpacity:C_,strokeOpacity:C_,numOctaves:oje};var EEi={...NM,color:ul,backgroundColor:ul,outlineColor:ul,fill:ul,stroke:ul,borderColor:ul,borderTopColor:ul,borderRightColor:ul,borderBottomColor:ul,borderLeftColor:ul,filter:Nq,WebkitFilter:Nq,mask:Mq,WebkitMask:Mq},J0e=i=>EEi[i];var DEi=new Set([Nq,Mq]);function X0e(i,e){let t=J0e(i);return DEi.has(t)||(t=id),t.getAnimatableNone?t.getAnimatableNone(e):void 0}var TEi=new Set(["auto","none","0"]);function BOt(i,e,t){let n=0,o;for(;n{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}};var Rq=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function $0e(i,e,t){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let n=document;e&&(n=e.current);let o=t?.[i]??n.querySelectorAll(i);return o?Array.from(o):[]}return Array.from(i).filter(n=>n!=null)}var Fq=(i,e)=>e&&typeof i=="number"?e.transform(i):i;function zOt(i){return hq(i)&&"offsetHeight"in i&&!("ownerSVGElement"in i)}var{schedule:MM,cancel:kEi}=w0e(queueMicrotask,!1);var j0={x:!1,y:!1};function eAe(){return j0.x||j0.y}function rje(i){return i==="x"||i==="y"?j0[i]?null:(j0[i]=!0,()=>{j0[i]=!1}):j0.x||j0.y?null:(j0.x=j0.y=!0,()=>{j0.x=j0.y=!1})}function tAe(i,e){let t=$0e(i),n=new AbortController,o={passive:!0,...e,signal:n.signal};return[t,o,()=>n.abort()]}function IEi(i){return!(i.pointerType==="touch"||eAe())}function sje(i,e,t={}){let[n,o,r]=tAe(i,t);return n.forEach(s=>{let a=!1,l=!1,c,u=()=>{s.removeEventListener("pointerleave",p)},d=A=>{c&&(c(A),c=void 0),u()},h=A=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(A))},f=()=>{a=!0,window.addEventListener("pointerup",h,o),window.addEventListener("pointercancel",h,o)},p=A=>{if(A.pointerType!=="touch"){if(a){l=!0;return}d(A)}},g=A=>{if(!IEi(A))return;l=!1;let v=e(s,A);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",p,o))};s.addEventListener("pointerenter",g,o),s.addEventListener("pointerdown",f,o)}),r}var aje=(i,e)=>e?i===e?!0:aje(i,e.parentElement):!1;var RM=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1;var LEi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lje(i){return LEi.has(i.tagName)||i.isContentEditable===!0}var NEi=new Set(["INPUT","SELECT","TEXTAREA"]);function cje(i){return NEi.has(i.tagName)||i.isContentEditable===!0}var l5=new WeakSet;function VOt(i){return e=>{e.key==="Enter"&&i(e)}}function uje(i,e){i.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}var HOt=(i,e)=>{let t=i.currentTarget;if(!t)return;let n=VOt(()=>{if(l5.has(t))return;uje(t,"down");let o=VOt(()=>{uje(t,"up")}),r=()=>uje(t,"cancel");t.addEventListener("keyup",o,e),t.addEventListener("blur",r,e)});t.addEventListener("keydown",n,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),e)};function WOt(i){return RM(i)&&!eAe()}var UOt=new WeakSet;function dje(i,e,t={}){let[n,o,r]=tAe(i,t),s=a=>{let l=a.currentTarget;if(!WOt(a)||UOt.has(a))return;l5.add(l),t.stopPropagation&&UOt.add(a);let c=e(l,a),u={...o,capture:!0},d=(p,g)=>{window.removeEventListener("pointerup",h,u),window.removeEventListener("pointercancel",f,u),l5.has(l)&&l5.delete(l),WOt(p)&&typeof c=="function"&&c(p,{success:g})},h=p=>{d(p,l===window||l===document||t.useGlobalTarget||aje(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,u),window.addEventListener("pointercancel",f,u)};return n.forEach(a=>{(t.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),zOt(a)&&(a.addEventListener("focus",c=>HOt(c,o)),!lje(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function c5(i){return hq(i)&&"ownerSVGElement"in i}var iAe=new WeakMap,nAe,jOt=(i,e,t)=>(n,o)=>o&&o[0]?o[0][i+"Size"]:c5(n)&&"getBBox"in n?n.getBBox()[e]:n[t],MEi=jOt("inline","width","offsetWidth"),REi=jOt("block","height","offsetHeight");function FEi({target:i,borderBoxSize:e}){iAe.get(i)?.forEach(t=>{t(i,{get width(){return MEi(i,e)},get height(){return REi(i,e)}})})}function OEi(i){i.forEach(FEi)}function PEi(){typeof ResizeObserver>"u"||(nAe=new ResizeObserver(OEi))}function QOt(i,e){nAe||PEi();let t=$0e(i);return t.forEach(n=>{let o=iAe.get(n);o||(o=new Set,iAe.set(n,o)),o.add(e),nAe?.observe(n)}),()=>{t.forEach(n=>{let o=iAe.get(n);o?.delete(e),o?.size||nAe?.unobserve(n)})}}var oAe=new Set,u5;function BEi(){u5=()=>{let i={get width(){return window.innerWidth},get height(){return window.innerHeight}};oAe.forEach(e=>e(i))},window.addEventListener("resize",u5)}function GOt(i){return oAe.add(i),u5||BEi(),()=>{oAe.delete(i),!oAe.size&&typeof u5=="function"&&(window.removeEventListener("resize",u5),u5=void 0)}}function rAe(i,e){return typeof i=="function"?GOt(i):QOt(i,e)}var FM={value:null,addProjectionMetrics:null};function qOt(i){return c5(i)&&i.tagName==="svg"}function hje(...i){let e=!Array.isArray(i[0]),t=e?0:-1,n=i[0+t],o=i[1+t],r=i[2+t],s=i[3+t],a=L0e(o,r,s);return e?a(n):a}var zEi=[...ije,ul,id],YOt=i=>zEi.find(K0e(i));var fje=()=>({translate:0,scale:1,origin:0,originPoint:0}),WT=()=>({x:fje(),y:fje()}),pje=()=>({min:0,max:0}),dl=()=>({x:pje(),y:pje()});var KOt=new WeakMap;function E_(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function pw(i){return typeof i=="string"||Array.isArray(i)}var sAe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oq=["initial",...sAe];function UT(i){return E_(i.animate)||Oq.some(e=>pw(i[e]))}function Pq(i){return!!(UT(i)||i.variants)}function JOt(i,e,t){for(let n in e){let o=e[n],r=t[n];if(rs(o))i.addValue(n,o);else if(rs(r))i.addValue(n,Um(o,{owner:i}));else if(r!==o)if(i.hasValue(n)){let s=i.getValue(n);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{let s=i.getStaticValue(n);i.addValue(n,Um(s!==void 0?s:o,{owner:i}))}}for(let n in t)e[n]===void 0&&i.removeValue(n);return e}var Bq={current:null},aAe={current:!1};var VEi=typeof window<"u";function XOt(){if(aAe.current=!0,!!VEi)if(window.matchMedia){let i=window.matchMedia("(prefers-reduced-motion)"),e=()=>Bq.current=i.matches;i.addEventListener("change",e),e()}else Bq.current=!1}var ZOt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lAe={};function Vq(i){lAe=i}function mje(){return lAe}var zq=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:o,skipAnimations:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=HT,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=zl.now();this.renderScheduledAtthis.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(aAe.current||XOt(),this.shouldReduceMotion=Bq.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Nf(this.notifyUpdate),Nf(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&V0e.has(e)&&this.current instanceof HTMLElement){let{factory:s,keyframes:a,times:l,ease:c,duration:u}=t.accelerate,d=new o5({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:zc(u)}),h=s(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}let n=U0.has(e);n&&this.onBindTransform&&this.onBindTransform();let o=t.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Jn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{o(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in lAe){let t=lAe[e];if(!t)continue;let{isEnabled:n,Feature:o}=t;if(!this.features[e]&&o&&n(this.props)&&(this.features[e]=new o(this)),this.features[e]){let r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):dl()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;nt.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Um(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(dq(n)||fq(n))?n=parseFloat(n):!YOt(n)&&id.test(t)&&(n=X0e(e,t)),this.setBaseTarget(e,rs(n)?n.get():n)),rs(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t=="string"||typeof t=="object"){let r=LM(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!rs(o)?o:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new x_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){MM.render(this.render)}};var d5=class extends zq{constructor(){super(...arguments),this.KeyframeResolver=Z0e}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;rs(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}};var nd=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Hq({top:i,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:i,max:n}}}function gje({x:i,y:e}){return{top:e.min,right:i.max,bottom:e.max,left:i.min}}function bje(i,e){if(!e)return i;let t=e({x:i.left,y:i.top}),n=e({x:i.right,y:i.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function Aje(i){return i===void 0||i===1}function cAe({scale:i,scaleX:e,scaleY:t}){return!Aje(i)||!Aje(e)||!Aje(t)}function D_(i){return cAe(i)||vje(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function vje(i){return $Ot(i.x)||$Ot(i.y)}function $Ot(i){return i&&i!=="0%"}function Wq(i,e,t){let n=i-t,o=e*n;return t+o}function ePt(i,e,t,n,o){return o!==void 0&&(i=Wq(i,o,n)),Wq(i,t,n)+e}function yje(i,e=0,t=1,n,o){i.min=ePt(i.min,e,t,n,o),i.max=ePt(i.max,e,t,n,o)}function wje(i,{x:e,y:t}){yje(i.x,e.translate,e.scale,e.originPoint),yje(i.y,t.translate,t.scale,t.originPoint)}var tPt=.999999999999,iPt=1.0000000000001;function rPt(i,e,t,n=!1){let o=t.length;if(!o)return;e.x=e.y=1;let r,s;for(let a=0;atPt&&(e.x=1),e.ytPt&&(e.y=1)}function Q0(i,e){i.min+=e,i.max+=e}function nPt(i,e,t,n,o=.5){let r=ho(i.min,i.max,o);yje(i,e,t,r,n)}function oPt(i,e){return typeof i=="string"?parseFloat(i)/100*(e.max-e.min):i}function Uq(i,e,t){let n=t??i;nPt(i.x,oPt(e.x,n.x),e.scaleX,e.scale,e.originX),nPt(i.y,oPt(e.y,n.y),e.scaleY,e.scale,e.originY)}function uAe(i,e){return Hq(bje(i.getBoundingClientRect(),e))}function xje(i,e,t){let n=uAe(i,t),{scroll:o}=e;return o&&(Q0(n.x,o.offset.x),Q0(n.y,o.offset.y)),n}var HEi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WEi=fw.length;function sPt(i,e,t){let n="",o=!0;for(let s=0;s{if(!e.target)return i;if(typeof i=="string")if(ui.test(i))i=parseFloat(i);else return i;let t=aPt(i,e.target.x),n=aPt(i,e.target.y);return`${t}% ${n}%`}};var lPt={correct:(i,{treeScale:e,projectionDelta:t})=>{let n=i,o=id.parse(i);if(o.length>5)return n;let r=id.createTransformer(i),s=typeof o[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;let c=ho(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),r(o)}};var jq={borderRadius:{...h5,applyTo:[...Rq]},borderTopLeftRadius:h5,borderTopRightRadius:h5,borderBottomLeftRadius:h5,borderBottomRightRadius:h5,boxShadow:lPt};function Qq(i,{layout:e,layoutId:t}){return U0.has(i)||i.startsWith("origin")||(e||t!==void 0)&&(!!jq[i]||i==="opacity")}function PM(i,e,t){let n=i.style,o=e?.style,r={};if(!n)return r;for(let s in n)(rs(n[s])||o&&rs(o[s])||Qq(s,i)||t?.getValue(s)?.liveStyle!==void 0)&&(r[s]=n[s]);return r}function UEi(i){return window.getComputedStyle(i)}var Gq=class extends d5{constructor(){super(...arguments),this.type="html",this.renderInstance=dAe}mount(e){Qd(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,t){if(U0.has(t))return this.projection?.isProjecting?M0e(t):hOt(e,t);{let n=UEi(e),o=(C0e(t)?n.getPropertyValue(t):n[t])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:t}){return uAe(e,t)}build(e,t,n){OM(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return PM(e,t,n)}};var jEi={offset:"stroke-dashoffset",array:"stroke-dasharray"},QEi={offset:"strokeDashoffset",array:"strokeDasharray"};function cPt(i,e,t=1,n=0,o=!0){i.pathLength=1;let r=o?jEi:QEi;i[r.offset]=`${-n}`,i[r.array]=`${e} ${t}`}var GEi=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qq(i,{attrX:e,attrY:t,attrScale:n,pathLength:o,pathSpacing:r=1,pathOffset:s=0,...a},l,c,u){if(OM(i,a,c),l){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};let{attrs:d,style:h}=i;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(let f of GEi)d[f]!==void 0&&(h[f]=d[f],delete d[f]);e!==void 0&&(d.x=e),t!==void 0&&(d.y=t),n!==void 0&&(d.scale=n),o!==void 0&&cPt(d,o,r,s,!1)}var hAe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var Yq=i=>typeof i=="string"&&i.toLowerCase()==="svg";function uPt(i,e,t,n){dAe(i,e,void 0,n);for(let o in e.attrs)i.setAttribute(hAe.has(o)?o:a5(o),e.attrs[o])}function Kq(i,e,t){let n=PM(i,e,t);for(let o in i)if(rs(i[o])||rs(e[o])){let r=fw.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[r]=i[o]}return n}var Jq=class extends d5{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=dl}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(U0.has(t)){let n=J0e(t);return n&&n.default||0}return t=hAe.has(t)?t:a5(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Kq(e,t,n)}build(e,t,n){qq(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,o){uPt(e,t,n,o)}mount(e){this.isSVGTag=Yq(e.tagName),super.mount(e)}};var qEi=Oq.length;function Cje(i){if(!i)return;if(!i.isControllingVariants){let t=i.parent?Cje(i.parent)||{}:{};return i.props.initial!==void 0&&(t.initial=i.props.initial),t}let e={};for(let t=0;tPromise.all(e.map(({animation:t,options:n})=>ROt(i,t,n)))}function Sje(i){let e=JEi(i),t=dPt(),n=!0,o=!1,r=c=>(u,d)=>{let h=mb(i,d,c==="exit"?i.presenceContext?.custom:void 0);if(h){let{transition:f,transitionEnd:p,...g}=h;u={...u,...g,...p}}return u};function s(c){e=c(i)}function a(c){let{props:u}=i,d=Cje(i.parent)||{},h=[],f=new Set,p={},g=1/0;for(let v=0;vg&&E,B=!1,z=Array.isArray(_)?_:[_],Q=z.reduce(r(w),{});I===!1&&(Q={});let{prevResolvedValues:Z={}}=C,U={...Z,...Q},M=Y=>{L=!0,f.has(Y)&&(B=!0,f.delete(Y)),C.needsAnimating[Y]=!0;let $=i.getValue(Y);$&&($.liveStyle=!1)};for(let Y in U){let $=Q[Y],re=Z[Y];if(p.hasOwnProperty(Y))continue;let ue=!1;Iq($)&&Iq(re)?ue=!_je($,re)||N:ue=$!==re,ue?$!=null?M(Y):f.add(Y):$!==void 0&&f.has(Y)?M(Y):C.protectedKeys[Y]=!0}C.prevProp=_,C.prevResolvedValues=Q,C.isActive&&(p={...p,...Q}),(n||o)&&i.blockInitialAnimation&&(L=!1);let ee=T&&N;L&&(!ee||B)&&h.push(...z.map(Y=>{let $={type:w};if(typeof Y=="string"&&(n||o)&&!ee&&i.manuallyAnimateOnMount&&i.parent){let{parent:re}=i,ue=mb(re,Y);if(re.enteringChildren&&ue){let{delayChildren:Ie}=ue.transition||{};$.delay=W0e(re.enteringChildren,i,Ie)}}return{animation:Y,options:$}}))}if(f.size){let v={};if(typeof u.initial!="boolean"){let w=mb(i,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(v.transition=w.transition)}f.forEach(w=>{let C=i.getBaseTarget(w),_=i.getValue(w);_&&(_.liveStyle=!0),v[w]=C??null}),h.push({animation:v})}let A=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!i.manuallyAnimateOnMount&&(A=!1),n=!1,o=!1,A?e(h):Promise.resolve()}function l(c,u){if(t[c].isActive===u)return Promise.resolve();i.variantChildren?.forEach(h=>h.animationState?.setActive(c,u)),t[c].isActive=u;let d=a(c);for(let h in t)t[h].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>t,reset:()=>{t=dPt(),o=!0}}}function hPt(i,e){return typeof e=="string"?e!==i:Array.isArray(e)?!_je(e,i):!1}function BM(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dPt(){return{animate:BM(!0),whileInView:BM(),whileHover:BM(),whileTap:BM(),whileDrag:BM(),whileFocus:BM(),exit:BM()}}function fAe(i,e){i.min=e.min,i.max=e.max}function G0(i,e){fAe(i.x,e.x),fAe(i.y,e.y)}function Eje(i,e){i.translate=e.translate,i.scale=e.scale,i.originPoint=e.originPoint,i.origin=e.origin}var fPt=1e-4,XEi=1-fPt,ZEi=1+fPt,pPt=.01,$Ei=0-pPt,eDi=0+pPt;function Nu(i){return i.max-i.min}function Ije(i,e,t){return Math.abs(i-e)<=t}function Dje(i,e,t,n=.5){i.origin=n,i.originPoint=ho(e.min,e.max,i.origin),i.scale=Nu(t)/Nu(e),i.translate=ho(t.min,t.max,i.origin)-i.originPoint,(i.scale>=XEi&&i.scale<=ZEi||isNaN(i.scale))&&(i.scale=1),(i.translate>=$Ei&&i.translate<=eDi||isNaN(i.translate))&&(i.translate=0)}function zM(i,e,t,n){Dje(i.x,e.x,t.x,n?n.originX:void 0),Dje(i.y,e.y,t.y,n?n.originY:void 0)}function Tje(i,e,t,n=0){let o=n?ho(t.min,t.max,n):t.min;i.min=o+e.min,i.max=i.min+Nu(e)}function Lje(i,e,t,n){Tje(i.x,e.x,t.x,n?.x),Tje(i.y,e.y,t.y,n?.y)}function kje(i,e,t,n=0){let o=n?ho(t.min,t.max,n):t.min;i.min=e.min-o,i.max=i.min+Nu(e)}function f5(i,e,t,n){kje(i.x,e.x,t.x,n?.x),kje(i.y,e.y,t.y,n?.y)}function mPt(i,e,t,n,o){return i-=e,i=Wq(i,1/t,n),o!==void 0&&(i=Wq(i,1/o,n)),i}function tDi(i,e=0,t=1,n=.5,o,r=i,s=i){if(Mf.test(e)&&(e=parseFloat(e),e=ho(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=ho(r.min,r.max,n);i===r&&(a-=e),i.min=mPt(i.min,e,t,a,o),i.max=mPt(i.max,e,t,a,o)}function gPt(i,e,[t,n,o],r,s){tDi(i,e[t],e[n],e[o],e.scale,r,s)}var iDi=["x","scaleX","originX"],nDi=["y","scaleY","originY"];function Nje(i,e,t,n){gPt(i.x,e,iDi,t?t.x:void 0,n?n.x:void 0),gPt(i.y,e,nDi,t?t.y:void 0,n?n.y:void 0)}function bPt(i){return i.translate===0&&i.scale===1}function Mje(i){return bPt(i.x)&&bPt(i.y)}function APt(i,e){return i.min===e.min&&i.max===e.max}function yPt(i,e){return APt(i.x,e.x)&&APt(i.y,e.y)}function vPt(i,e){return Math.round(i.min)===Math.round(e.min)&&Math.round(i.max)===Math.round(e.max)}function Rje(i,e){return vPt(i.x,e.x)&&vPt(i.y,e.y)}function Fje(i){return Nu(i.x)/Nu(i.y)}function Oje(i,e){return i.translate===e.translate&&i.scale===e.scale&&i.originPoint===e.originPoint}function gb(i){return[i("x"),i("y")]}function wPt(i,e,t){let n="",o=i.x.translate/e.x,r=i.y.translate/e.y,s=t?.z||0;if((o||r||s)&&(n=`translate3d(${o}px, ${r}px, ${s}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),t){let{transformPerspective:c,rotate:u,pathRotation:d,rotateX:h,rotateY:f,skewX:p,skewY:g}=t;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotate(${d}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),g&&(n+=`skewY(${g}deg) `)}let a=i.x.scale*e.x,l=i.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}var oDi=Rq.length,xPt=i=>typeof i=="string"?parseFloat(i):i,CPt=i=>typeof i=="number"||ui.test(i);function SPt(i,e,t,n,o,r){o?(i.opacity=ho(0,t.opacity??1,rDi(n)),i.opacityExit=ho(e.opacity??1,0,sDi(n))):r&&(i.opacity=ho(e.opacity??1,t.opacity??1,n));for(let s=0;sne?1:t(uw(i,e,n))}function DPt(i,e,t){let n=rs(i)?i:Um(i);return n.start(IM("",n,e,t)),n.animation}function mw(i,e,t,n={passive:!0}){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}var TPt=(i,e)=>i.depth-e.depth;var pAe=class{constructor(){this.children=[],this.isDirty=!1}add(e){_M(this.children,e),this.isDirty=!0}remove(e){RT(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(TPt),this.isDirty=!1,this.children.forEach(e)}};function kPt(i,e){let t=zl.now(),n=({timestamp:o})=>{let r=o-t;r>=e&&(Nf(n),i(r-e))};return Jn.setup(n,!0),()=>Nf(n)}function VM(i){return rs(i)?i.get():i}var mAe=class{constructor(){this.members=[]}add(e){_M(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let o=n.instance;(!o||o.isConnected===!1)&&!n.snapshot&&(RT(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(RT(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:o}=n.options,{layoutDependency:r}=e.options;(o===void 0||o!==r)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};var HM={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var WM={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Pje=["","X","Y","Z"],aDi=1e3,lDi=0;function Bje(i,e,t,n){let{latestValues:o}=e;o[i]&&(t[i]=o[i],e.setStaticValue(i,0),n&&(n[i]=0))}function BPt(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;let{visualElement:e}=i.options;if(!e)return;let t=G0e(e);if(window.MotionHasOptimisedAnimation(t,"transform")){let{layout:o,layoutId:r}=i.options;window.MotionCancelOptimisedAnimation(t,"transform",Jn,!(o||r))}let{parent:n}=i;n&&!n.hasCheckedOptimisedAppear&&BPt(n)}function gAe({attachResizeListener:i,defaultParent:e,measureScroll:t,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(s={},a=e?.()){this.id=lDi++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,FM.value&&(WM.nodes=WM.calculatedTargetDeltas=WM.calculatedProjections=0),this.nodes.forEach(dDi),this.nodes.forEach(bDi),this.nodes.forEach(ADi),this.nodes.forEach(hDi),FM.addProjectionMetrics&&FM.addProjectionMetrics(WM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;Jn.read(()=>{d=window.innerWidth}),i(s,()=>{let f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=kPt(h,250),HM.hasAnimatedSinceResize&&(HM.hasAnimatedSinceResize=!1,this.nodes.forEach(NPt)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||c.getDefaultTransition()||CDi,{onLayoutAnimationStart:g,onLayoutAnimationComplete:A}=c.getProps(),v=!this.targetLayout||!Rje(this.targetLayout,f),w=!d&&h;if(this.options.layoutRoot||this.resumeFrom||w||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let C={...r5(p,"layout"),onPlay:g,onComplete:A};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(u,w,C.path)}else d||NPt(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Nf(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(vDi),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&BPt(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Nu(this.snapshot.measuredBox.x)&&!Nu(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{let T=I/1e3,N=E?.(T);N?(h.x.translate=N.x,h.x.scale=ho(s.x.scale,1,T),h.x.origin=s.x.origin,h.x.originPoint=s.x.originPoint,h.y.translate=N.y,h.y.scale=ho(s.y.scale,1,T),h.y.origin=s.y.origin,h.y.originPoint=s.y.originPoint):(MPt(h.x,s.x,T),MPt(h.y,s.y,T)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(f5(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),wDi(this.relativeTarget,this.relativeTargetOrigin,f,T),_&&yPt(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=dl()),G0(_,this.relativeTarget)),A&&(this.animationValues=d,SPt(d,u,this.latestValues,T,C,w)),N&&N.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=N.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Nf(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Jn.update(()=>{HM.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Um(0)),this.motionValue.jump(0,!1),this.currentAnimation=DPt(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(aDi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&zPt(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||dl();let d=Nu(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let h=Nu(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}G0(a,l),Uq(a,u),zM(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new mAe),this.sharedNodes.get(s).add(a);let c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let a=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;let c={};l.z&&Bje("z",s,c,this.animationValues);for(let u=0;us.currentAnimation?.stop()),this.root.nodes.forEach(IPt),this.root.sharedNodes.clear()}}}function cDi(i){i.updateLayout()}function uDi(i){let e=i.resumeFrom?.snapshot||i.snapshot;if(i.isLead()&&i.layout&&e&&i.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:n}=i.layout,{animationType:o}=i.options,r=e.source!==i.layout.source;if(o==="size")gb(u=>{let d=r?e.measuredBox[u]:e.layoutBox[u],h=Nu(d);d.min=t[u].min,d.max=d.min+h});else if(o==="x"||o==="y"){let u=o==="x"?"y":"x";fAe(r?e.measuredBox[u]:e.layoutBox[u],t[u])}else zPt(o,e.layoutBox,t)&&gb(u=>{let d=r?e.measuredBox[u]:e.layoutBox[u],h=Nu(t[u]);d.max=d.min+h,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[u].max=i.relativeTarget[u].min+h)});let s=WT();zM(s,t,e.layoutBox);let a=WT();r?zM(a,i.applyTransform(n,!0),e.measuredBox):zM(a,t,e.layoutBox);let l=!Mje(s),c=!1;if(!i.resumeFrom){let u=i.getClosestProjectingParent();if(u&&!u.resumeFrom){let{snapshot:d,layout:h}=u;if(d&&h){let f=i.options.layoutAnchor||void 0,p=dl();f5(p,e.layoutBox,d.layoutBox,f);let g=dl();f5(g,t,h.layoutBox,f),Rje(p,g)||(c=!0),u.options.layoutRoot&&(i.relativeTarget=g,i.relativeTargetOrigin=p,i.relativeParent=u)}}}i.notifyListeners("didUpdate",{layout:t,snapshot:e,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(i.isLead()){let{onExitComplete:t}=i.options;t&&t()}i.options.transition=void 0}function dDi(i){FM.value&&WM.nodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function hDi(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function fDi(i){i.clearSnapshot()}function IPt(i){i.clearMeasurements()}function pDi(i){i.isLayoutDirty=!0,i.updateLayout()}function LPt(i){i.isLayoutDirty=!1}function mDi(i){i.isAnimationBlocked&&i.layout&&!i.isLayoutDirty&&(i.snapshot=i.layout,i.isLayoutDirty=!0)}function gDi(i){let{visualElement:e}=i.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),i.resetTransform()}function NPt(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function bDi(i){i.resolveTargetDelta()}function ADi(i){i.calcProjection()}function vDi(i){i.resetSkewAndRotation()}function yDi(i){i.removeLeadSnapshot()}function MPt(i,e,t){i.translate=ho(e.translate,0,t),i.scale=ho(e.scale,1,t),i.origin=e.origin,i.originPoint=e.originPoint}function RPt(i,e,t,n){i.min=ho(e.min,t.min,n),i.max=ho(e.max,t.max,n)}function wDi(i,e,t,n){RPt(i.x,e.x,t.x,n),RPt(i.y,e.y,t.y,n)}function xDi(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}var CDi={duration:.45,ease:[.4,0,.1,1]},FPt=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),OPt=FPt("applewebkit/")&&!FPt("chrome/")?Math.round:Bl;function PPt(i){i.min=OPt(i.min),i.max=OPt(i.max)}function _Di(i){PPt(i.x),PPt(i.y)}function zPt(i,e,t){return i==="position"||i==="preserve-aspect"&&!Ije(Fje(e),Fje(t),.2)}function SDi(i){return i!==i.root&&i.scroll?.wasRoot}var VPt=gAe({attachResizeListener:(i,e)=>mw(i,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0});var bAe={current:void 0},Xq=gAe({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!bAe.current){let i=new VPt({});i.mount(window),i.setOptions({layoutScroll:!0}),bAe.current=i}return bAe.current},resetTransform:(i,e)=>{i.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"});var HPt=ae(ke(),1),p5=(0,HPt.createContext)({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});var jT=ae(ke(),1);function WPt(i=!0){let e=(0,jT.useContext)(J8);if(e===null)return[!0,null];let{isPresent:t,onExitComplete:n,register:o}=e,r=(0,jT.useId)();(0,jT.useEffect)(()=>{if(i)return o(r)},[i]);let s=(0,jT.useCallback)(()=>i&&n&&n(r),[r,n,i]);return!t&&n?[!1,s]:[!0]}var UPt=ae(ke(),1),AAe=(0,UPt.createContext)({strict:!1});var jPt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},QPt=!1;function EDi(){if(QPt)return;let i={};for(let e in jPt)i[e]={isEnabled:t=>jPt[e].some(n=>!!t[n])};Vq(i),QPt=!0}function vAe(){return EDi(),mje()}function GPt(i){let e=vAe();for(let t in i)e[t]={...e[t],...i[t]};Vq(e)}var DDi=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Zq(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||DDi.has(i)}var qPt=i=>!Zq(i);function TDi(i){typeof i=="function"&&(qPt=e=>e.startsWith("on")?!Zq(e):i(e))}try{TDi(require("@emotion/is-prop-valid").default)}catch{}function YPt(i,e,t){let n={};for(let o in i)o==="values"&&typeof i.values=="object"||rs(i[o])||(qPt(o)||t===!0&&Zq(o)||!e&&!Zq(o)||i.draggable&&o.startsWith("onDrag"))&&(n[o]=i[o]);return n}var _Ae=ae(zi(),1);var A5=ae(ke(),1);var KPt=ae(ke(),1),QT=(0,KPt.createContext)({});var yAe=ae(ke(),1);function JPt(i,e){if(UT(i)){let{initial:t,animate:n}=i;return{initial:t===!1||pw(t)?t:void 0,animate:pw(n)?n:void 0}}return i.inherit!==!1?e:{}}function ZPt(i){let{initial:e,animate:t}=JPt(i,(0,yAe.useContext)(QT));return(0,yAe.useMemo)(()=>({initial:e,animate:t}),[XPt(e),XPt(t)])}function XPt(i){return Array.isArray(i)?i.join(" "):i}var b5=ae(ke(),1);var $Pt=ae(ke(),1);var m5=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zje(i,e,t){for(let n in e)!rs(e[n])&&!Qq(n,t)&&(i[n]=e[n])}function kDi({transformTemplate:i},e){return(0,$Pt.useMemo)(()=>{let t=m5();return OM(t,e,i),Object.assign({},t.vars,t.style)},[e])}function IDi(i,e){let t=i.style||{},n={};return zje(n,t,i),Object.assign(n,kDi(i,e)),n}function eBt(i,e){let t={},n=IDi(i,e);return i.drag&&i.dragListener!==!1&&(t.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(t.tabIndex=0),t.style=n,t}var tBt=ae(ke(),1);var wAe=()=>({...m5(),attrs:{}});function iBt(i,e,t,n){let o=(0,tBt.useMemo)(()=>{let r=wAe();return qq(r,e,Yq(n),i.transformTemplate,i.style),{...r.attrs,style:{...r.style}}},[e]);if(i.style){let r={};zje(r,i.style,i),o.style={...r,...o.style}}return o}var nBt=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function g5(i){return typeof i!="string"||i.includes("-")?!1:!!(nBt.indexOf(i)>-1||/[A-Z]/u.test(i))}function oBt(i,e,t,{latestValues:n},o,r=!1,s){let l=(s??g5(i)?iBt:eBt)(e,n,o,i),c=YPt(e,typeof i=="string",r),u=i!==b5.Fragment?{...c,...l,ref:t}:{},{children:d}=e,h=(0,b5.useMemo)(()=>rs(d)?d.get():d,[d]);return(0,b5.createElement)(i,{...u,children:h})}var Vje=ae(ke(),1);function LDi({scrapeMotionValuesFromProps:i,createRenderState:e},t,n,o){return{latestValues:NDi(t,n,o,i),renderState:e()}}function NDi(i,e,t,n){let o={},r=n(i,{});for(let h in r)o[h]=VM(r[h]);let{initial:s,animate:a}=i,l=UT(i),c=Pq(i);e&&c&&!l&&i.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=t?t.initial===!1:!1;u=u||s===!1;let d=u?a:s;if(d&&typeof d!="boolean"&&!E_(d)){let h=Array.isArray(d)?d:[d];for(let f=0;f(e,t)=>{let n=(0,Vje.useContext)(QT),o=(0,Vje.useContext)(J8),r=()=>LDi(i,e,n,o);return t?r():H0(r)};var rBt=xAe({scrapeMotionValuesFromProps:PM,createRenderState:m5});var sBt=xAe({scrapeMotionValuesFromProps:Kq,createRenderState:wAe});var aBt=Symbol.for("motionComponentSymbol");var UM=ae(ke(),1);function lBt(i,e,t){let n=(0,UM.useRef)(t);(0,UM.useInsertionEffect)(()=>{n.current=t});let o=(0,UM.useRef)(null);return(0,UM.useCallback)(r=>{r&&i.onMount?.(r),e&&(r?e.mount(r):e.unmount());let s=n.current;if(typeof s=="function")if(r){let a=s(r);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(r);else s&&(s.current=r)},[e])}var Lp=ae(ke(),1);var cBt=ae(ke(),1),CAe=(0,cBt.createContext)({});function GT(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function uBt(i,e,t,n,o,r){let{visualElement:s}=(0,Lp.useContext)(QT),a=(0,Lp.useContext)(AAe),l=(0,Lp.useContext)(J8),c=(0,Lp.useContext)(p5),u=c.reducedMotion,d=c.skipAnimations,h=(0,Lp.useRef)(null),f=(0,Lp.useRef)(!1);n=n||a.renderer,!h.current&&n&&(h.current=n(i,{visualState:e,parent:s,props:t,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:r}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let p=h.current,g=(0,Lp.useContext)(CAe);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&MDi(h.current,t,o,g);let A=(0,Lp.useRef)(!1);(0,Lp.useInsertionEffect)(()=>{p&&A.current&&p.update(t,l)});let v=t[Lq],w=(0,Lp.useRef)(!!v&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return g0e(()=>{f.current=!0,p&&(A.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),w.current&&p.animationState&&p.animationState.animateChanges())}),(0,Lp.useEffect)(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),w.current=!1),p.enteringChildren=void 0)}),p}function MDi(i,e,t,n){let{layoutId:o,layout:r,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=e;i.projection=new t(i.latestValues,e["data-framer-portal-id"]?void 0:dBt(i.parent)),i.projection.setOptions({layoutId:o,layout:r,alwaysMeasureLayout:!!s||a&>(a),visualElement:i,animationType:typeof r=="string"?r:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function dBt(i){if(i)return i.options.allowProjection!==!1?i.projection:dBt(i.parent)}function SAe(i,{forwardMotionProps:e=!1,type:t}={},n,o){n&&GPt(n);let r=t?t==="svg":g5(i),s=r?sBt:rBt;function a(c,u){let d,h={...(0,A5.useContext)(p5),...c,layoutId:RDi(c)},{isStatic:f}=h,p=ZPt(c),g=s(c,f);if(!f&&typeof window<"u"){FDi(h,n);let A=ODi(h);d=A.MeasureLayout,p.visualElement=uBt(i,g,h,o,A.ProjectionNode,r)}return(0,_Ae.jsxs)(QT.Provider,{value:p,children:[d&&p.visualElement?(0,_Ae.jsx)(d,{visualElement:p.visualElement,...h}):null,oBt(i,c,lBt(g,p.visualElement,u),g,f,e,r)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;let l=(0,A5.forwardRef)(a);return l[aBt]=i,l}function RDi({layoutId:i}){let e=(0,A5.useContext)(p0e).id;return e&&i!==void 0?e+"-"+i:i}function FDi(i,e){let t=(0,A5.useContext)(AAe).strict}function ODi(i){let e=vAe(),{drag:t,layout:n}=e;if(!t&&!n)return{};let o={...t,...n};return{MeasureLayout:t?.isEnabled(i)||n?.isEnabled(i)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function hBt(i,e){if(typeof Proxy>"u")return SAe;let t=new Map,n=(r,s)=>SAe(r,s,i,e),o=(r,s)=>n(r,s);return new Proxy(o,{get:(r,s)=>s==="create"?n:(t.has(s)||t.set(s,SAe(s,void 0,i,e)),t.get(s))})}var fBt=ae(ke(),1);var pBt=(i,e)=>e.isSVG??g5(i)?new Jq(e):new Gq(e,{allowProjection:i!==fBt.Fragment});var EAe=class extends nd{constructor(e){super(e),e.animationState||(e.animationState=Sje(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();E_(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var PDi=0,DAe=class extends nd{constructor(){super(...arguments),this.id=PDi++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:r,custom:s}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){let a=mb(this.node,r,s);if(a){let{transition:l,transitionEnd:c,...u}=a;for(let d in u)this.node.getValue(d)?.jump(u[d])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let o=this.node.animationState.setActive("exit",!e);t&&!e&&o.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var mBt={animation:{Feature:EAe},exit:{Feature:DAe}};function T_(i){return{point:{x:i.pageX,y:i.pageY}}}var gBt=i=>e=>RM(e)&&i(e,T_(e));function qT(i,e,t,n){return mw(i,e,gBt(t),n)}var TAe=({current:i})=>i?i.ownerDocument.defaultView:null;var bBt=(i,e)=>Math.abs(i-e);function ABt(i,e){let t=bBt(i.x,e.x),n=bBt(i.y,e.y);return Math.sqrt(t**2+n**2)}var vBt=new Set(["auto","scroll"]),v5=class{constructor(e,t,{transformPagePoint:n,contextWindow:o=window,dragSnapToOrigin:r=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=kAe(this.lastRawMoveEventInfo,this.transformPagePoint));let p=Hje(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,A=ABt(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!A)return;let{point:v}=p,{timestamp:w}=uc;this.history.push({...v,timestamp:w});let{onStart:C,onMove:_}=this.handlers;g||(C&&C(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=kAe(g,this.transformPagePoint),Jn.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();let{onEnd:A,onSessionEnd:v,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let C=Hje(p.type==="pointercancel"?this.lastMoveEventInfo:kAe(g,this.transformPagePoint),this.history);this.startEvent&&A&&A(p,C),v&&v(p,C)},!RM(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=o||window;let l=T_(e),c=kAe(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=uc;this.history=[{...u,timestamp:d}];let{onSessionStart:h}=t;h&&h(e,Hje(c,this.history));let f={passive:!0,capture:!0};this.removeListeners=_v(qT(this.contextWindow,"pointermove",this.handlePointerMove,f),qT(this.contextWindow,"pointerup",this.handlePointerUp,f),qT(this.contextWindow,"pointercancel",this.handlePointerUp,f)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let n=getComputedStyle(t);(vBt.has(n.overflowX)||vBt.has(n.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,o=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:o.x-t.x,y:o.y-t.y};r.x===0&&r.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,o),Jn.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Nf(this.updatePoint)}};function kAe(i,e){return e?{point:e(i.point)}:i}function yBt(i,e){return{x:i.x-e.x,y:i.y-e.y}}function Hje({point:i},e){return{point:i,delta:yBt(i,wBt(e)),offset:yBt(i,BDi(e)),velocity:zDi(e,.1)}}function BDi(i){return i[0]}function wBt(i){return i[i.length-1]}function zDi(i,e){if(i.length<2)return{x:0,y:0};let t=i.length-1,n=null,o=wBt(i);for(;t>=0&&(n=i[t],!(o.timestamp-n.timestamp>zc(e)));)t--;if(!n)return{x:0,y:0};n===i[0]&&i.length>2&&o.timestamp-n.timestamp>zc(e)*2&&(n=i[1]);let r=Gd(o.timestamp-n.timestamp);if(r===0)return{x:0,y:0};let s={x:(o.x-n.x)/r,y:(o.y-n.y)/r};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function EBt(i,{min:e,max:t},n){return e!==void 0&&it&&(i=n?ho(t,i,n.max):Math.min(i,t)),i}function xBt(i,e,t){return{min:e!==void 0?i.min+e:void 0,max:t!==void 0?i.max+t-(i.max-i.min):void 0}}function DBt(i,{top:e,left:t,bottom:n,right:o}){return{x:xBt(i.x,t,o),y:xBt(i.y,e,n)}}function CBt(i,e){let t=e.min-i.min,n=e.max-i.max;return e.max-e.minn?t=uw(e.min,e.max-n,i.min):n>o&&(t=uw(i.min,i.max-o,e.min)),td(0,1,t)}function IBt(i,e){let t={};return e.min!==void 0&&(t.min=e.min-i.min),e.max!==void 0&&(t.max=e.max-i.min),t}var IAe=.35;function LBt(i=IAe){return i===!1?i=0:i===!0&&(i=IAe),{x:_Bt(i,"left","right"),y:_Bt(i,"top","bottom")}}function _Bt(i,e,t){return{min:SBt(i,e),max:SBt(i,t)}}function SBt(i,e){return typeof i=="number"?i:i[e]||0}var VDi=new WeakMap,NAe=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=dl(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;let r=d=>{t&&this.snapToCursor(T_(d).point),this.stopAnimation()},s=(d,h)=>{let{drag:f,dragPropagation:p,onDragStart:g}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rje(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gb(v=>{let w=this.getAxisMotionValue(v).get()||0;if(Mf.test(w)){let{projection:C}=this.visualElement;if(C&&C.layout){let _=C.layout.layoutBox[v];_&&(w=Nu(_)*(parseFloat(w)/100))}}this.originPoint[v]=w}),g&&Jn.update(()=>g(d,h),!1,!0),s5(this.visualElement,"transform");let{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:g,onDrag:A}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:v}=h;if(p&&this.currentDirection===null){this.currentDirection=WDi(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),A&&Jn.update(()=>A(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new v5(e,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:TAe(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,o=t||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!o||!n)return;let{velocity:s}=o;this.startAnimation(s);let{onDragEnd:a}=this.getProps();a&&Jn.postRender(()=>a(n,o))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:o}=this.getProps();if(!n||!LAe(e,o,this.currentDirection))return;let r=this.getAxisMotionValue(e),s=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(s=EBt(s,this.constraints[e],this.elastic[e])),r.set(s)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;e&>(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=DBt(n.layoutBox,e):this.constraints=!1,this.elastic=LBt(t),o!==this.constraints&&!GT(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&gb(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=IBt(n.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!GT(e))return!1;let n=e.current;Qd(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());let r=xje(n,o.root,this.visualElement.getTransformPagePoint()),s=TBt(o.layout.layoutBox,r);if(t){let a=t(gje(s));this.hasMutatedConstraints=!!a,a&&(s=Hq(a))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:o,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=gb(u=>{if(!LAe(u,t,this.currentDirection))return;let d=l&&l[u]||{};(s===!0||s===u)&&(d={min:0,max:0});let h=o?200:1e6,f=o?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return s5(this.visualElement,e),n.start(IM(e,n,0,t,this.visualElement,!1))}stopAnimation(){gb(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,o=this.visualElement.getProps()[t];return o||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){gb(t=>{let{drag:n}=this.getProps();if(!LAe(t,n,this.currentDirection))return;let{projection:o}=this.visualElement,r=this.getAxisMotionValue(t);if(o&&o.layout){let{min:s,max:a}=o.layout.layoutBox[t],l=r.get()||0;r.set(e[t]-ho(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!GT(t)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};gb(s=>{let a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){let l=a.get();o[s]=kBt({min:l,max:l},this.constraints[s])}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),gb(s=>{if(!LAe(s,e,null))return;let a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(ho(l,c,o[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;VDi.set(this.visualElement,this);let e=this.visualElement.current,t=qT(e,"pointerdown",c=>{let{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,f=h!==e&&cje(h);u&&d&&!f&&this.start(c)}),n,o=()=>{let{dragConstraints:c}=this.getProps();GT(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=HDi(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Jn.read(o);let a=mw(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(gb(d=>{let h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),t(),s(),l&&l(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:r=!1,dragElastic:s=IAe,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:o,dragConstraints:r,dragElastic:s,dragMomentum:a}}};function NBt(i){let e=!0;return()=>{if(e){e=!1;return}i()}}function HDi(i,e,t){let n=rAe(i,NBt(t)),o=rAe(e,NBt(t));return()=>{n(),o()}}function LAe(i,e,t){return(e===!0||e===i)&&(t===null||t===i)}function WDi(i,e=10){let t=null;return Math.abs(i.y)>e?t="y":Math.abs(i.x)>e&&(t="x"),t}var MAe=class extends nd{constructor(e){super(e),this.removeGroupControls=Bl,this.removeListeners=Bl,this.controls=new NAe(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bl}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var Wje=i=>(e,t)=>{i&&Jn.update(()=>i(e,t),!1,!0)},RAe=class extends nd{constructor(){super(...arguments),this.removePointerDownListener=Bl}onPointerDown(e){this.session=new v5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:TAe(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:Wje(e),onStart:Wje(t),onMove:Wje(n),onEnd:(r,s)=>{delete this.session,o&&Jn.postRender(()=>o(r,s))}}}mount(){this.removePointerDownListener=qT(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var MBt=ae(zi(),1);var $q=ae(ke(),1);var Uje=!1,jje=class extends $q.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:o}=this.props,{projection:r}=e;r&&(t.group&&t.group.add(r),n&&n.register&&o&&n.register(r),Uje&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),HM.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:o,isPresent:r}=this.props,{projection:s}=n;return s&&(s.isPresent=r,e.layoutDependency!==t&&s.setOptions({...s.options,layoutDependency:t}),Uje=!0,o||e.layoutDependency!==t||t===void 0||e.isPresent!==r?s.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?s.promote():s.relegate()||Jn.postRender(()=>{let a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),MM.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:o}=e;Uje=!0,o&&(o.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function FAe(i){let[e,t]=WPt(),n=(0,$q.useContext)(p0e);return(0,MBt.jsx)(jje,{...i,layoutGroup:n,switchLayoutGroup:(0,$q.useContext)(CAe),isPresent:e,safeToRemove:t})}var RBt={pan:{Feature:RAe},drag:{Feature:MAe,ProjectionNode:Xq,MeasureLayout:FAe}};function FBt(i,e,t){let{props:n}=i;i.animationState&&n.whileHover&&i.animationState.setActive("whileHover",t==="Start");let o="onHover"+t,r=n[o];r&&Jn.postRender(()=>r(e,T_(e)))}var OAe=class extends nd{mount(){let{current:e}=this.node;e&&(this.unmount=sje(e,(t,n)=>(FBt(this.node,n,"Start"),o=>FBt(this.node,o,"End"))))}unmount(){}};var PAe=class extends nd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_v(mw(this.node.current,"focus",()=>this.onFocus()),mw(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function OBt(i,e,t){let{props:n}=i;if(i.current instanceof HTMLButtonElement&&i.current.disabled)return;i.animationState&&n.whileTap&&i.animationState.setActive("whileTap",t==="Start");let o="onTap"+(t==="End"?"":t),r=n[o];r&&Jn.postRender(()=>r(e,T_(e)))}var BAe=class extends nd{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=dje(e,(o,r)=>(OBt(this.node,r,"Start"),(s,{success:a})=>OBt(this.node,s,a?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}};var Gje=new WeakMap,Qje=new WeakMap,UDi=i=>{let e=Gje.get(i.target);e&&e(i)},jDi=i=>{i.forEach(UDi)};function QDi({root:i,...e}){let t=i||document;Qje.has(t)||Qje.set(t,{});let n=Qje.get(t),o=JSON.stringify(e);return n[o]||(n[o]=new IntersectionObserver(jDi,{root:i,...e})),n[o]}function PBt(i,e,t){let n=QDi(e);return Gje.set(i,t),n.observe(i),()=>{Gje.delete(i),n.unobserve(i)}}var GDi={some:0,all:1},zAe=class extends nd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:o="some",once:r}=e,s={root:t?t.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:GDi[o]},a=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};this.stopObserver=PBt(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(qDi(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function qDi({viewport:i={}},{viewport:e={}}={}){return t=>i[t]!==e[t]}var BBt={inView:{Feature:zAe},tap:{Feature:BAe},focus:{Feature:PAe},hover:{Feature:OAe}};var zBt={layout:{ProjectionNode:Xq,MeasureLayout:FAe}};var VBt={...mBt,...BBt,...RBt,...zBt};var VAe=hBt(VBt,pBt);var y5=ae(ke(),1);function HAe(i){let e=H0(()=>Um(i)),{isStatic:t}=(0,y5.useContext)(p5);if(t){let[,n]=(0,y5.useState)(i);(0,y5.useEffect)(()=>e.on("change",n),[])}return e}function WAe(i,e){let t=HAe(e()),n=()=>t.set(e());return n(),g0e(()=>{let o=()=>Jn.preRender(n,!1,!0),r=i.map(s=>s.on("change",o));return()=>{r.forEach(s=>s()),Nf(n)}}),t}function HBt(i){kM.current=[],i();let e=WAe(kM.current,i);return kM.current=void 0,e}function qje(i,e,t,n){if(typeof i=="function")return HBt(i);if(t!==void 0&&!Array.isArray(t)&&typeof e!="function")return YDi(i,e,t,n);let s=typeof e=="function"?e:hje(e,t,n),a=Array.isArray(i)?WBt(i,s):WBt([i],([c])=>s(c)),l=Array.isArray(i)?void 0:i.accelerate;return l&&!l.isTransformed&&typeof e!="function"&&Array.isArray(t)&&n?.clamp!==!1&&(a.accelerate={...l,times:e,keyframes:t,isTransformed:!0,...n?.ease?{ease:n.ease}:{}}),a}function WBt(i,e){let t=H0(()=>[]);return WAe(i,()=>{t.length=0;let n=i.length;for(let o=0;oObject.keys(t)),r=H0(()=>({}));for(let s of o)r[s]=qje(i,e,t[s],n);return r}var nY={};ad(nY,{Group:()=>QBt,Item:()=>JBt});var Yje=ae(zi(),1);var jM=ae(ke(),1);var UBt=ae(ke(),1),UAe=(0,UBt.createContext)(null);function jBt(i,e,t,n){if(!n)return i;let o=i.findIndex(u=>u.value===e);if(o===-1)return i;let r=n>0?1:-1,s=i[o+r];if(!s)return i;let a=i[o],l=s.layout,c=ho(l.min,l.max,.5);return r===1&&a.layout.max+t>c||r===-1&&a.layout.min+tVAe[e]),l=[],c=(0,jM.useRef)(!1),u=(0,jM.useRef)(null);Qd(!!o,"Reorder.Group must be provided a values prop","reorder-values");let d={axis:t,groupRef:u,registerItem:(p,g)=>{let A=l.findIndex(v=>p===v.value);A!==-1?l[A].layout=g[t]:l.push({value:p,layout:g[t]}),l.sort(JDi)},updateOrder:(p,g,A)=>{if(c.current)return;let v=jBt(l,p,g,A);if(l!==v){c.current=!0;let w=[...o];for(let C=0;C{c.current=!1});let h=p=>{u.current=p,typeof s=="function"?s(p):s&&(s.current=p)},f={overflowAnchor:"none",...r.style};return(0,Yje.jsx)(a,{...r,style:f,ref:h,ignoreStrict:!0,children:(0,Yje.jsx)(UAe.Provider,{value:d,children:i})})}var QBt=(0,jM.forwardRef)(KDi);function JDi(i,e){return i.layout.min-e.layout.min}var KBt=ae(zi(),1);var jAe=ae(ke(),1);var XDi=new Set(["auto","scroll"]),tY=new WeakMap,iY=new WeakMap,eY=null;function GBt(){if(eY){let i=Kje(eY,"y");i&&(iY.delete(i),tY.delete(i));let e=Kje(eY,"x");e&&e!==i&&(iY.delete(e),tY.delete(e)),eY=null}}function ZDi(i,e){let t=getComputedStyle(i),n=e==="x"?t.overflowX:t.overflowY,o=i===document.body||i===document.documentElement;return XDi.has(n)||o}function Kje(i,e){let t=i?.parentElement;for(;t;){if(ZDi(t,e))return t;t=t.parentElement}return null}function $Di(i,e,t){let n=e.getBoundingClientRect(),o=t==="x"?Math.max(0,n.left):Math.max(0,n.top),r=t==="x"?Math.min(window.innerWidth,n.right):Math.min(window.innerHeight,n.bottom),s=i-o,a=r-i;if(s<50){let l=1-s/50;return{amount:-25*l*l,edge:"start"}}else if(a<50){let l=1-a/50;return{amount:25*l*l,edge:"end"}}return{amount:0,edge:null}}function qBt(i,e,t,n){if(!i)return;eY=i;let o=Kje(i,t);if(!o)return;let r=e-(t==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=$Di(r,o,t);if(a===null){iY.delete(o),tY.delete(o);return}let l=iY.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&n<0||a==="end"&&n>0))return;iY.set(o,a);let d=t==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);tY.set(o,d)}if(s>0){let u=tY.get(o);if((t==="x"?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=u)return}t==="x"?c?window.scrollBy({left:s}):o.scrollLeft+=s:c?window.scrollBy({top:s}):o.scrollTop+=s}function YBt(i,e=0){return rs(i)?i:HAe(e)}function eTi({children:i,style:e={},value:t,as:n="li",onDrag:o,onDragEnd:r,layout:s=!0,...a},l){let c=H0(()=>VAe[n]),u=(0,jAe.useContext)(UAe),d={x:YBt(e.x),y:YBt(e.y)},h=qje([d.x,d.y],([v,w])=>v||w?1:"unset");Qd(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");let{axis:f,registerItem:p,updateOrder:g,groupRef:A}=u;return(0,KBt.jsx)(c,{drag:f,...a,dragSnapToOrigin:!0,style:{...e,x:d.x,y:d.y,zIndex:h},layout:s,onDrag:(v,w)=>{let{velocity:C,point:_}=w,E=d[f].get();g(t,E,C[f]),qBt(A.current,_[f],f,C[f]),o&&o(v,w)},onDragEnd:(v,w)=>{GBt(),r&&r(v,w)},onLayoutMeasure:v=>{p(t,v)},ref:l,ignoreStrict:!0,children:i})}var JBt=(0,jAe.forwardRef)(eTi);var XBt=(0,rY.forwardRef)((i,e)=>{let t=(0,oY.c)(16),n,o,r,s,a;t[0]!==i?({isActive:r,value:a,children:n,className:o,...s}=i,t[0]=i,t[1]=n,t[2]=o,t[3]=r,t[4]=s,t[5]=a):(n=t[1],o=t[2],r=t[3],s=t[4],a=t[5]);let l=r&&"graphiql-tab-active",c;t[6]!==o||t[7]!==l?(c=Un("graphiql-tab",l,o),t[6]=o,t[7]=l,t[8]=c):c=t[8];let u;return t[9]!==n||t[10]!==r||t[11]!==s||t[12]!==e||t[13]!==c||t[14]!==a?(u=(0,w5.jsx)(nY.Item,{...s,ref:e,value:a,"aria-selected":r,dragElastic:!1,role:"tab",className:c,children:n}),t[9]=n,t[10]=r,t[11]=s,t[12]=e,t[13]=c,t[14]=a,t[15]=u):u=t[15],u});XBt.displayName="Tab";var ZBt=(0,rY.forwardRef)((i,e)=>{let t=(0,oY.c)(11),n,o,r;t[0]!==i?({children:n,className:o,...r}=i,t[0]=i,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let s;t[4]!==o?(s=Un("graphiql-tab-button",o),t[4]=o,t[5]=s):s=t[5];let a;return t[6]!==n||t[7]!==r||t[8]!==e||t[9]!==s?(a=(0,w5.jsx)(Da,{...r,ref:e,type:"button",className:s,children:n}),t[6]=n,t[7]=r,t[8]=e,t[9]=s,t[10]=a):a=t[10],a});ZBt.displayName="Tab.Button";var $Bt=(0,rY.forwardRef)((i,e)=>{let t=(0,oY.c)(7),n;t[0]!==i.className?(n=Un("graphiql-tab-close",i.className),t[0]=i.className,t[1]=n):n=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,w5.jsx)(fk,{}),t[2]=o):o=t[2];let r;return t[3]!==i||t[4]!==e||t[5]!==n?(r=(0,w5.jsx)(Da,{"aria-label":"Close Tab",...i,ref:e,type:"button",className:n,children:o}),t[3]=i,t[4]=e,t[5]=n,t[6]=r):r=t[6],r});$Bt.displayName="Tab.Close";var sY=Object.assign(XBt,{Button:ZBt,Close:$Bt}),QAe=(0,rY.forwardRef)((i,e)=>{let t=(0,oY.c)(15),n,o,r,s,a;t[0]!==i?({values:a,onReorder:r,children:n,className:o,...s}=i,t[0]=i,t[1]=n,t[2]=o,t[3]=r,t[4]=s,t[5]=a):(n=t[1],o=t[2],r=t[3],s=t[4],a=t[5]);let l;t[6]!==o?(l=Un("graphiql-tabs",o),t[6]=o,t[7]=l):l=t[7];let c;return t[8]!==n||t[9]!==r||t[10]!==s||t[11]!==e||t[12]!==l||t[13]!==a?(c=(0,w5.jsx)(nY.Group,{...s,ref:e,values:a,onReorder:r,axis:"x",role:"tablist",className:l,children:n}),t[8]=n,t[9]=r,t[10]=s,t[11]=e,t[12]=l,t[13]=a,t[14]=c):c=t[14],c});QAe.displayName="Tabs";var m3t=ae(f3t()),g3t=({title:i,titleId:e,...t})=>Rf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:5,height:8,fill:"currentColor",viewBox:"0 0 5 8","aria-labelledby":e,...t},i?Rf.createElement("title",{id:e},i):null,Rf.createElement("path",{d:"m.91 6.87 2.98-2.98a.533.533 0 0 0 0-.754L.91.157A.533.533 0 0 0 0 .534v5.959c0 .475.574.713.91.377"})),STi=({title:i,titleId:e,...t})=>Rf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24","aria-labelledby":e,...t},i?Rf.createElement("title",{id:e},i):null,Rf.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6h2m2 0h-2m0 0V4m0 2v2"}),Rf.createElement("path",{d:"M21.4 20H2.6a.6.6 0 0 1-.6-.6V11h19.4a.6.6 0 0 1 .6.6v7.8a.6.6 0 0 1-.6.6Z"}),Rf.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2 11V4.6a.6.6 0 0 1 .6-.6h6.178a.6.6 0 0 1 .39.144l3.164 2.712a.6.6 0 0 0 .39.144H14"})),ETi=({title:i,titleId:e,...t})=>Rf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,fill:"none",stroke:"currentColor",viewBox:"0 0 15 15","aria-labelledby":e,...t},i?Rf.createElement("title",{id:e},i):null,Rf.createElement("circle",{cx:7.5,cy:7.5,r:6,strokeWidth:2})),DTi=({title:i,titleId:e,...t})=>Rf.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,fill:"currentColor",viewBox:"0 0 15 15","aria-labelledby":e,...t},i?Rf.createElement("title",{id:e},i):null,Rf.createElement("circle",{cx:7.5,cy:7.5,r:7.5}),Rf.createElement("path",{stroke:"#fff",strokeWidth:1.5,d:"M4.646 7.001 6.88 9.233l3.622-3.62"})),TTi={keyword:"hsl(var(--color-primary))",def:"hsl(var(--color-tertiary))",property:"hsl(var(--color-info))",qualifier:"hsl(var(--color-secondary))",attribute:"hsl(var(--color-tertiary))",number:"hsl(var(--color-success))",string:"hsl(var(--color-warning))",builtin:"hsl(var(--color-success))",string2:"hsl(var(--color-secondary))",variable:"hsl(var(--color-secondary))",atom:"hsl(var(--color-tertiary))"},kTi=(0,QM.jsx)(g3t,{style:{width:"var(--px-16)",transform:"rotate(90deg)"}}),ITi=(0,QM.jsx)(g3t,{style:{width:"var(--px-16)"}}),LTi=(0,QM.jsx)(ETi,{style:{marginRight:"var(--px-4)"}}),NTi=(0,QM.jsx)(DTi,{style:{fill:"hsl(var(--color-info))",marginRight:"var(--px-4)"}}),MTi={buttonStyle:{cursor:"pointer",fontSize:"2em",lineHeight:0},explorerActionsStyle:{paddingTop:"var(--px-16)"},actionButtonStyle:{}},RTi=i=>{let{setOperationName:e,run:t}=Oc(),n=Vo(a=>a.schema),o=(0,p3t.useCallback)(a=>{a&&e(a),t()},[t,e]),[r,s]=b7e(g7e());return(0,QM.jsx)(m3t.Explorer,{schema:n,onRunOperation:o,explorerIsOpen:!0,colors:TTi,arrowOpen:kTi,arrowClosed:ITi,checkboxUnchecked:LTi,checkboxChecked:NTi,styles:MTi,query:r,onEdit:s,...i})};function b3t(i){return{title:"GraphiQL Explorer",icon:STi,content:()=>(0,QM.jsx)(RTi,{...i})}}var Xn=ae(zi()),dGe=ae(fo()),R_=ae(ke());var qr=ae(zi()),nQe=ae(fo()),k_=ae(ke());var A3t=ae(fo()),$je=ae(ke());var eQe=nS((i,e)=>({historyStorage:null,actions:{addToHistory(t){let{historyStorage:n}=e();n?.updateHistory(t),i({})},editLabel(t,n){let{historyStorage:o}=e();o?.editLabel(t,n),i({})},toggleFavorite(t){let{historyStorage:n}=e();n?.toggleFavorite(t),i({})},setActive:t=>t,deleteFromHistory(t,n){let{historyStorage:o}=e();o?.deleteHistory(t,n),i({})}}})),tQe=i=>{let e=(0,A3t.c)(11),{maxHistoryLength:t,children:n}=i,o=t===void 0?20:t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Ol("isFetching","tabs","activeTabIndex","storage"),e[0]=r):r=e[0];let{isFetching:s,tabs:a,activeTabIndex:l,storage:c}=Vo(r),u=a[l],d;e[1]!==o||e[2]!==c?(d=new TZ(c,o),e[1]=o,e[2]=c,e[3]=d):d=e[3];let h=d,f,p;e[4]!==h?(f=()=>{eQe.setState({historyStorage:h})},p=[h],e[4]=h,e[5]=f,e[6]=p):(f=e[5],p=e[6]),(0,$je.useEffect)(f,p);let g,A;return e[7]!==u||e[8]!==s?(g=()=>{if(!s)return;let{addToHistory:v}=eQe.getState().actions;v({query:u.query??void 0,variables:u.variables??void 0,headers:u.headers??void 0,operationName:u.operationName??void 0})},A=[s,u],e[7]=u,e[8]=s,e[9]=g,e[10]=A):(g=e[9],A=e[10]),(0,$je.useEffect)(g,A),n},v3t=wI(eQe),FTi=[],iQe=()=>v3t(OTi),JAe=()=>v3t(PTi);function OTi(i){var e;return((e=i.historyStorage)==null?void 0:e.queries)??FTi}function PTi(i){return i.actions}function BTi(i,e){for(let t of i)e(t,!0)}var y3t=()=>{let i=(0,nQe.c)(16),e=iQe(),{deleteFromHistory:t}=JAe(),n=e.slice().map(VTi).reverse(),o=n.filter(HTi);o.length&&(n=n.filter(WTi));let[r,s]=(0,k_.useState)(null),a,l;i[0]!==r?(a=()=>{r&&setTimeout(()=>{s(null)},2e3)},l=[r],i[0]=r,i[1]=a,i[2]=l):(a=i[1],l=i[2]),(0,k_.useEffect)(a,l);let c=()=>{try{BTi(n,t),s("success")}catch{s("error")}},u=!!o.length,d=!!n.length,h="History",f="graphiql-history",p=(r||d)&&(0,qr.jsx)(kf,{type:"button",state:r||void 0,disabled:!n.length,onClick:c,children:{success:"Cleared",error:"Failed to Clear"}[r]||"Clear"}),g;i[3]!==p?(g=(0,qr.jsxs)("div",{className:"graphiql-history-header",children:["History",p]}),i[3]=p,i[4]=g):g=i[4];let A=u&&(0,qr.jsx)("ul",{className:"graphiql-history-items",children:o.map(UTi)}),v;i[5]!==u||i[6]!==d?(v=u&&d&&(0,qr.jsx)("div",{className:"graphiql-history-item-spacer"}),i[5]=u,i[6]=d,i[7]=v):v=i[7];let w;i[8]!==d||i[9]!==n?(w=d&&(0,qr.jsx)("ul",{className:"graphiql-history-items",children:n.map(jTi)}),i[8]=d,i[9]=n,i[10]=w):w=i[10];let C;return i[11]!==g||i[12]!==A||i[13]!==v||i[14]!==w?(C=(0,qr.jsxs)("section",{"aria-label":h,className:f,children:[g,A,v,w]}),i[11]=g,i[12]=A,i[13]=v,i[14]=w,i[15]=C):C=i[15],C},w3t=i=>{let e=(0,nQe.c)(39),{editLabel:t,toggleFavorite:n,deleteFromHistory:o,setActive:r}=JAe(),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Ol("headerEditor","queryEditor","variableEditor"),e[0]=s):s=e[0];let{headerEditor:a,queryEditor:l,variableEditor:c}=Vo(s),u=(0,k_.useRef)(null),d=(0,k_.useRef)(null),[h,f]=(0,k_.useState)(!1),p,g;e[1]!==h?(p=()=>{var Y;h&&((Y=u.current)==null||Y.focus())},g=[h],e[1]=h,e[2]=p,e[3]=g):(p=e[2],g=e[3]),(0,k_.useEffect)(p,g);let A;e[4]!==i.item.label||e[5]!==i.item.operationName||e[6]!==i.item.query?(A=i.item.label||i.item.operationName||zTi(i.item.query),e[4]=i.item.label,e[5]=i.item.operationName,e[6]=i.item.query,e[7]=A):A=e[7];let v=A,w;e[8]!==t||e[9]!==i.item?(w=()=>{var Y;f(!1);let{index:$,...re}=i.item;t({...re,label:(Y=u.current)==null?void 0:Y.value},$)},e[8]=t,e[9]=i.item,e[10]=w):w=e[10];let C=w,_;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{f(!1)},e[11]=_):_=e[11];let E=_,I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=Y=>{Y.stopPropagation(),f(!0)},e[12]=I):I=e[12];let T=I,N;e[13]!==a||e[14]!==i.item||e[15]!==l||e[16]!==r||e[17]!==c?(N=()=>{let{query:Y,variables:$,headers:re}=i.item;l?.setValue(Y??""),c?.setValue($??""),a?.setValue(re??""),r(i.item)},e[13]=a,e[14]=i.item,e[15]=l,e[16]=r,e[17]=c,e[18]=N):N=e[18];let L=N,B;e[19]!==o||e[20]!==i.item?(B=Y=>{Y.stopPropagation(),o(i.item)},e[19]=o,e[20]=i.item,e[21]=B):B=e[21];let z=B,Q;e[22]!==i.item||e[23]!==n?(Q=Y=>{Y.stopPropagation(),n(i.item)},e[22]=i.item,e[23]=n,e[24]=Q):Q=e[24];let Z=Q,U=h&&"editable",M;e[25]!==U?(M=Un("graphiql-history-item",U),e[25]=U,e[26]=M):M=e[26];let ee;e[27]!==v||e[28]!==t||e[29]!==z||e[30]!==L||e[31]!==C||e[32]!==Z||e[33]!==h||e[34]!==i.item?(ee=h?(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)("input",{type:"text",defaultValue:i.item.label,ref:u,onKeyDown:Y=>{Y.key==="Esc"?f(!1):Y.key==="Enter"&&(f(!1),t({...i.item,label:Y.currentTarget.value}))},placeholder:"Type a label"}),(0,qr.jsx)(Da,{type:"button",ref:d,onClick:C,children:"Save"}),(0,qr.jsx)(Da,{type:"button",ref:d,onClick:E,children:(0,qr.jsx)(fk,{})})]}):(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(Du,{label:"Set active",children:(0,qr.jsx)(Da,{type:"button",className:"graphiql-history-item-label",onClick:L,"aria-label":"Set active",children:v})}),(0,qr.jsx)(Du,{label:"Edit label",children:(0,qr.jsx)(Da,{type:"button",className:"graphiql-history-item-action",onClick:T,"aria-label":"Edit label",children:(0,qr.jsx)(i1e,{"aria-hidden":"true"})})}),(0,qr.jsx)(Du,{label:i.item.favorite?"Remove favorite":"Add favorite",children:(0,qr.jsx)(Da,{type:"button",className:"graphiql-history-item-action",onClick:Z,"aria-label":i.item.favorite?"Remove favorite":"Add favorite",children:i.item.favorite?(0,qr.jsx)(c1e,{"aria-hidden":"true"}):(0,qr.jsx)(u1e,{"aria-hidden":"true"})})}),(0,qr.jsx)(Du,{label:"Delete from history",children:(0,qr.jsx)(Da,{type:"button",className:"graphiql-history-item-action",onClick:z,"aria-label":"Delete from history",children:(0,qr.jsx)(h1e,{"aria-hidden":"true"})})})]}),e[27]=v,e[28]=t,e[29]=z,e[30]=L,e[31]=C,e[32]=Z,e[33]=h,e[34]=i.item,e[35]=ee):ee=e[35];let X;return e[36]!==M||e[37]!==ee?(X=(0,qr.jsx)("li",{className:M,children:ee}),e[36]=M,e[37]=ee,e[38]=X):X=e[38],X};function zTi(i){return i?.split(` +`).map(e=>e.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}function VTi(i,e){return{...i,index:e}}function HTi(i){return i.favorite}function WTi(i){return!i.favorite}function UTi(i){return(0,qr.jsx)(w3t,{item:i},i.index)}function jTi(i){return(0,qr.jsx)(w3t,{item:i},i.index)}var oQe={title:"History",icon:Xye,content:y3t};var sGe=ae(zi()),D5t=ae(fo());ua();var Pve=ae(ke());ua();function x3t(i,e){if(i==="Field"&&e.fieldDef||i==="AliasedField"&&e.fieldDef||i==="ObjectField"&&e.fieldDef)return qTi(e,i==="ObjectField");if(i==="Directive"&&e.directiveDef)return GTi(e);if(i==="Argument"&&e.argDef)return QTi(e);if(i==="EnumValue"&&e.enumValue)return KTi(e);if(i==="NamedType"&&e.type)return YTi(e)}function QTi(i){return i.directiveDef?{kind:"Argument",schema:i.schema,argument:i.argDef,directive:i.directiveDef}:{kind:"Argument",schema:i.schema,argument:i.argDef,field:i.fieldDef,type:C3t(i.fieldDef)?null:i.parentType}}function GTi(i){return{kind:"Directive",schema:i.schema,directive:i.directiveDef}}function qTi(i,e=!1){let t=e?i.inputObjectType:i.parentType;return{kind:"Field",schema:i.schema,field:i.fieldDef,type:C3t(i.fieldDef)?null:t}}function YTi(i,e){return{kind:"Type",schema:i.schema,type:e||i.type}}function KTi(i){return{kind:"EnumValue",value:i.enumValue||void 0,type:i.inputType?Vr(i.inputType):void 0}}function C3t(i){return i.name.slice(0,2)==="__"}var Fh=ae(zi()),S5t=ae(fo());ua();var Hc=ae(zi()),$Ae=ae(fo()),M3t=ae(ke());var Tv=ae(zi()),D3t=ae(fo());var C5=ae(zi()),_3t=ae(fo());ua();var JTi=i=>i?Rn(i):"",XAe=i=>{let e=(0,_3t.c)(12),{field:t}=i;if(!("defaultValue"in t)||t.defaultValue===void 0)return null;let n=t.defaultValue,o=t.type,r,s,a,l;if(e[0]!==t.defaultValue||e[1]!==t.type){l=Symbol.for("react.early_return_sentinel");e:{let d=dA(n,o);if(!d){l=null;break e}a=" = ",r="graphiql-doc-explorer-default-value",s=JTi(d)}e[0]=t.defaultValue,e[1]=t.type,e[2]=r,e[3]=s,e[4]=a,e[5]=l}else r=e[2],s=e[3],a=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;e[6]!==r||e[7]!==s?(c=(0,C5.jsx)("span",{className:r,children:s}),e[6]=r,e[7]=s,e[8]=c):c=e[8];let u;return e[9]!==a||e[10]!==c?(u=(0,C5.jsxs)(C5.Fragment,{children:[a,c]}),e[9]=a,e[10]=c,e[11]=u):u=e[11],u};var S3t=ae(zi()),E3t=ae(fo());var _5=ae(zi());ua();function S5(i,e){return Si(i)?(0,_5.jsxs)(_5.Fragment,{children:[S5(i.ofType,e),"!"]}):Cn(i)?(0,_5.jsxs)(_5.Fragment,{children:["[",S5(i.ofType,e),"]"]}):e(i)}var bb=i=>{let e=(0,E3t.c)(5),{type:t}=i,{push:n}=I_(),o;e[0]!==n?(o=s=>(0,S3t.jsx)("a",{className:"graphiql-doc-explorer-type-name",onClick:a=>{a.preventDefault(),n({name:s.name,def:s})},href:"#",children:s.name}),e[0]=n,e[1]=o):o=e[1];let r;return e[2]!==o||e[3]!==t?(r=S5(t,o),e[2]=o,e[3]=t,e[4]=r):r=e[4],r};var E5=i=>{let e=(0,D3t.c)(19),{arg:t,showDefaultValue:n,inline:o}=i,r;e[0]!==t.name?(r=(0,Tv.jsx)("span",{className:"graphiql-doc-explorer-argument-name",children:t.name}),e[0]=t.name,e[1]=r):r=e[1];let s;e[2]!==t.type?(s=(0,Tv.jsx)(bb,{type:t.type}),e[2]=t.type,e[3]=s):s=e[3];let a;e[4]!==t||e[5]!==n?(a=n!==!1&&(0,Tv.jsx)(XAe,{field:t}),e[4]=t,e[5]=n,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==s||e[9]!==a?(l=(0,Tv.jsxs)("span",{children:[r,": ",s,a]}),e[7]=r,e[8]=s,e[9]=a,e[10]=l):l=e[10];let c=l;if(o)return c;let u;e[11]!==t.description?(u=t.description?(0,Tv.jsx)(Lf,{type:"description",children:t.description}):null,e[11]=t.description,e[12]=u):u=e[12];let d;e[13]!==t.deprecationReason?(d=t.deprecationReason?(0,Tv.jsxs)("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[(0,Tv.jsx)("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),(0,Tv.jsx)(Lf,{type:"deprecation",children:t.deprecationReason})]}):null,e[13]=t.deprecationReason,e[14]=d):d=e[14];let h;return e[15]!==c||e[16]!==u||e[17]!==d?(h=(0,Tv.jsxs)("div",{className:"graphiql-doc-explorer-argument",children:[c,u,d]}),e[15]=c,e[16]=u,e[17]=d,e[18]=h):h=e[18],h};var lY=ae(zi()),T3t=ae(fo());var ZAe=i=>{let e=(0,T3t.c)(3),t;return e[0]!==i.children||e[1]!==i.preview?(t=i.children?(0,lY.jsxs)("div",{className:"graphiql-doc-explorer-deprecation",children:[(0,lY.jsx)("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),(0,lY.jsx)(Lf,{type:"deprecation",onlyShowFirstChild:i.preview??!0,children:i.children})]}):null,e[0]=i.children,e[1]=i.preview,e[2]=t):t=e[2],t};var k3t=ae(zi()),I3t=ae(fo()),L3t=i=>{let e=(0,I3t.c)(2),{directive:t}=i,n;return e[0]!==t.name.value?(n=(0,k3t.jsxs)("span",{className:"graphiql-doc-explorer-directive",children:["@",t.name.value]}),e[0]=t.name.value,e[1]=n):n=e[1],n};var D5=ae(zi()),N3t=ae(fo());var Np=i=>{let e=(0,N3t.c)(10),{title:t,children:n}=i,o=XTi[t],r;e[0]!==o?(r=(0,D5.jsx)(o,{}),e[0]=o,e[1]=r):r=e[1];let s;e[2]!==r||e[3]!==t?(s=(0,D5.jsxs)("div",{className:"graphiql-doc-explorer-section-title",children:[r,t]}),e[2]=r,e[3]=t,e[4]=s):s=e[4];let a;e[5]!==n?(a=(0,D5.jsx)("div",{className:"graphiql-doc-explorer-section-content",children:n}),e[5]=n,e[6]=a):a=e[6];let l;return e[7]!==s||e[8]!==a?(l=(0,D5.jsxs)("div",{children:[s,a]}),e[7]=s,e[8]=a,e[9]=l):l=e[9],l},XTi={Arguments:Bye,"Deprecated Arguments":Uye,"Deprecated Enum Values":jye,"Deprecated Fields":Qye,Directives:Gye,"Enum Values":Kye,Fields:Jye,Implements:Zye,Implementations:hR,"Possible Types":hR,"Root Types":a1e,Type:hR,"All Schema Types":hR};var R3t=i=>{let e=(0,$Ae.c)(15),{field:t}=i,n;e[0]!==t.description?(n=t.description?(0,Hc.jsx)(Lf,{type:"description",children:t.description}):null,e[0]=t.description,e[1]=n):n=e[1];let o;e[2]!==t.deprecationReason?(o=(0,Hc.jsx)(ZAe,{preview:!1,children:t.deprecationReason}),e[2]=t.deprecationReason,e[3]=o):o=e[3];let r;e[4]!==t.type?(r=(0,Hc.jsx)(Np,{title:"Type",children:(0,Hc.jsx)(bb,{type:t.type})}),e[4]=t.type,e[5]=r):r=e[5];let s,a;e[6]!==t?(s=(0,Hc.jsx)(ZTi,{field:t}),a=(0,Hc.jsx)($Ti,{field:t}),e[6]=t,e[7]=s,e[8]=a):(s=e[7],a=e[8]);let l;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==s||e[13]!==a?(l=(0,Hc.jsxs)(Hc.Fragment,{children:[n,o,r,s,a]}),e[9]=n,e[10]=o,e[11]=r,e[12]=s,e[13]=a,e[14]=l):l=e[14],l},ZTi=i=>{let e=(0,$Ae.c)(12),{field:t}=i,[n,o]=(0,M3t.useState)(!1),r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{o(!0)},e[0]=r):r=e[0];let s=r;if(!("args"in t))return null;let a,l,c;if(e[1]!==t.args){a=[],l=[];for(let h of t.args)h.deprecationReason?l.push(h):a.push(h);c=a.length>0?(0,Hc.jsx)(Np,{title:"Arguments",children:a.map(eki)}):null,e[1]=t.args,e[2]=a,e[3]=l,e[4]=c}else a=e[2],l=e[3],c=e[4];let u;e[5]!==a.length||e[6]!==l||e[7]!==n?(u=l.length>0?n||a.length===0?(0,Hc.jsx)(Np,{title:"Deprecated Arguments",children:l.map(tki)}):(0,Hc.jsx)(kf,{type:"button",onClick:s,children:"Show Deprecated Arguments"}):null,e[5]=a.length,e[6]=l,e[7]=n,e[8]=u):u=e[8];let d;return e[9]!==c||e[10]!==u?(d=(0,Hc.jsxs)(Hc.Fragment,{children:[c,u]}),e[9]=c,e[10]=u,e[11]=d):d=e[11],d},$Ti=i=>{var e;let t=(0,$Ae.c)(4),{field:n}=i,o=(e=n.astNode)==null?void 0:e.directives;if(!o?.length)return null;let r;t[0]!==o?(r=o.map(iki),t[0]=o,t[1]=r):r=t[1];let s;return t[2]!==r?(s=(0,Hc.jsx)(Np,{title:"Directives",children:r}),t[2]=r,t[3]=s):s=t[3],s};function eki(i){return(0,Hc.jsx)(E5,{arg:i},i.name)}function tki(i){return(0,Hc.jsx)(E5,{arg:i},i.name)}function iki(i){return(0,Hc.jsx)("div",{children:(0,Hc.jsx)(L3t,{directive:i})},i.name.value)}var Mu=ae(zi()),F3t=ae(fo());var O3t=i=>{let e=(0,F3t.c)(35),{schema:t}=i,n;e[0]!==t?(n=t.getQueryType(),e[0]=t,e[1]=n):n=e[1];let o=n,r;e[2]!==t?(r=t.getMutationType(),e[2]=t,e[3]=r):r=e[3];let s=r,a;e[4]!==t?(a=t.getSubscriptionType(),e[4]=t,e[5]=a):a=e[5];let l=a,c,u,d,h,f;if(e[6]!==s||e[7]!==o||e[8]!==t||e[9]!==l){let A=t.getTypeMap(),v=[o?.name,s?.name,l?.name],w=t.description||"A GraphQL schema provides a root type for each kind of operation.";e[15]!==w?(d=(0,Mu.jsx)(Lf,{type:"description",children:w}),e[15]=w,e[16]=d):d=e[16];let C;e[17]!==o?(C=o?(0,Mu.jsxs)("div",{children:[(0,Mu.jsx)("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",(0,Mu.jsx)(bb,{type:o})]}):null,e[17]=o,e[18]=C):C=e[18];let _;e[19]!==s?(_=s&&(0,Mu.jsxs)("div",{children:[(0,Mu.jsx)("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",(0,Mu.jsx)(bb,{type:s})]}),e[19]=s,e[20]=_):_=e[20];let E;e[21]!==l?(E=l&&(0,Mu.jsxs)("div",{children:[(0,Mu.jsx)("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",(0,Mu.jsx)(bb,{type:l})]}),e[21]=l,e[22]=E):E=e[22],e[23]!==_||e[24]!==E||e[25]!==C?(h=(0,Mu.jsxs)(Np,{title:"Root Types",children:[C,_,E]}),e[23]=_,e[24]=E,e[25]=C,e[26]=h):h=e[26],c=Np,u="All Schema Types",f=(0,Mu.jsx)("div",{children:Object.values(A).map(I=>v.includes(I.name)||I.name.startsWith("__")?null:(0,Mu.jsx)("div",{children:(0,Mu.jsx)(bb,{type:I})},I.name))}),e[6]=s,e[7]=o,e[8]=t,e[9]=l,e[10]=c,e[11]=u,e[12]=d,e[13]=h,e[14]=f}else c=e[10],u=e[11],d=e[12],h=e[13],f=e[14];let p;e[27]!==c||e[28]!==u||e[29]!==f?(p=(0,Mu.jsx)(c,{title:u,children:f}),e[27]=c,e[28]=u,e[29]=f,e[30]=p):p=e[30];let g;return e[31]!==d||e[32]!==h||e[33]!==p?(g=(0,Mu.jsxs)(Mu.Fragment,{children:[d,h,p]}),e[31]=d,e[32]=h,e[33]=p,e[34]=g):g=e[34],g};var Ga=ae(zi()),FY=ae(fo());ua();var nk=ae(ke());var jm=i=>nki(i)?i.document:oki(i)?i:i?.ownerDocument??(typeof document<"u"?document:void 0),T5=i=>jm(i)?.defaultView??(typeof window<"u"?window:void 0);function P3t(i){return i!==null&&typeof i=="object"&&"nodeType"in i&&typeof i.nodeType=="number"}function nki(i){return typeof i=="object"&&i!=null&&"window"in i&&i.window===i}function oki(i){return P3t(i)&&i.nodeType===9}function B3t(i){return P3t(i)&&i.nodeType===11&&"host"in i}var rki=!1;function cY(){return rki}function L_(i,e){if(!cY())return e&&i?i.contains(e):!1;if(!i||!e)return!1;let t=e;for(;t!==null;){if(t===i)return!0;typeof t.assignedElements!="function"&&t.assignedSlot?.parentNode?t=t.assignedSlot.parentNode:B3t(t)?t=t.host:t=t.parentNode}return!1}var gw=(i=document)=>{if(!cY())return i.activeElement;let e=i.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function Wc(i){if(cY()&&i.target instanceof Element&&i.target.shadowRoot){if("composedPath"in i)return i.composedPath()[0]??null;if("composedPath"in i.nativeEvent)return i.nativeEvent.composedPath()[0]??null}return i.target}function z3t(i){if(ski())i.focus({preventScroll:!0});else{let e=aki(i);i.focus(),lki(e)}}var eve=null;function ski(){if(eve==null){eve=!1;try{document.createElement("div").focus({get preventScroll(){return eve=!0,!0}})}catch{}}return eve}function aki(i){let e=i.parentNode,t=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight{};var tve=ae(ke(),1);function rQe(i){let e=i;return e.nativeEvent=i,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function W3t(i,e){Object.defineProperty(i,"target",{value:e}),Object.defineProperty(i,"currentTarget",{value:e})}function ive(i){let e=(0,tve.useRef)({isFocused:!1,observer:null});return H3t(()=>{let t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]),(0,tve.useCallback)(t=>{let n=Wc(t);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n,r=s=>{if(e.current.isFocused=!1,o.disabled){let a=rQe(s);i?.(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",r,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){e.current.observer?.disconnect();let s=o===gw()?null:gw();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[i])}var sQe=!1;function nve(i){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(t=>i.test(t.brand))||i.test(window.navigator.userAgent)}function aQe(i){return typeof window<"u"&&window.navigator!=null?i.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function bw(i){let e=null;return()=>(e==null&&(e=i()),e)}var GM=bw(function(){return aQe(/^Mac/i)}),cki=bw(function(){return aQe(/^iPhone/i)}),lQe=bw(function(){return aQe(/^iPad/i)||GM()&&navigator.maxTouchPoints>1}),U3t=bw(function(){return cki()||lQe()}),Msr=bw(function(){return GM()||U3t()}),ove=bw(function(){return nve(/AppleWebKit/i)&&(U3t()||!j3t())}),Rsr=bw(function(){return ove()&&!j3t()&&!cQe()}),j3t=bw(function(){return nve(/Chrome|CriOS|CrMo/i)}),Q3t=bw(function(){return nve(/Android/i)}),cQe=bw(function(){return nve(/(Firefox|FxiOS)/i)});function G3t(i){return i.pointerType===""&&i.isTrusted?!0:Q3t()&&i.pointerType?i.type==="click"&&i.buttons===1:i.detail===0&&!i.pointerType}var rve=ae(ke(),1);function k5(i,e,t=!0){let{metaKey:n,ctrlKey:o,altKey:r,shiftKey:s}=e;!ove()&&cQe()&&window.event?.type?.startsWith("key")&&i.target==="_blank"&&(GM()?n=!0:o=!0);let a=ove()&&GM()&&!lQe()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:r,shiftKey:s}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:r,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});k5.isOpening=t,z3t(i),i.dispatchEvent(a),k5.isOpening=!1}k5.isOpening=!1;var fQe=ae(ke(),1),dY=null,ave="keyboard",uQe=new Set,uY=new Map,qM=!1,dQe=!1,uki={Tab:!0,Escape:!0};function pQe(i,e){for(let t of uQe)t(i,e)}function dki(i){return!(i.metaKey||!GM()&&i.altKey||i.ctrlKey||i.key==="Control"||i.key==="Shift"||i.key==="Meta")}function sve(i){qM=!0,!k5.isOpening&&dki(i)&&(dY="keyboard",ave="keyboard",pQe("keyboard",i))}function I5(i){dY="pointer",ave="pointerType"in i?i.pointerType:"mouse",(i.type==="mousedown"||i.type==="pointerdown")&&(qM=!0,pQe("pointer",i))}function q3t(i){!k5.isOpening&&G3t(i)&&(qM=!0,dY="virtual",ave="virtual")}function Y3t(i){let e=T5(Wc(i)),t=jm(Wc(i));Wc(i)===e||Wc(i)===t||sQe||!i.isTrusted||(!qM&&!dQe&&(dY="virtual",ave="virtual",pQe("virtual",i)),qM=!1,dQe=!1)}function K3t(){sQe||(qM=!1,dQe=!0)}function hQe(i){if(typeof window>"u"||typeof document>"u")return;let e=T5(i),t=jm(i);if(uY.get(e))return;let n=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){qM=!0,n.apply(this,arguments)}}),t.addEventListener("keydown",sve,!0),t.addEventListener("keyup",sve,!0),t.addEventListener("click",q3t,!0),e.addEventListener("focus",Y3t,!0),e.addEventListener("blur",K3t,!1),typeof PointerEvent<"u"&&(t.addEventListener("pointerdown",I5,!0),t.addEventListener("pointermove",I5,!0),t.addEventListener("pointerup",I5,!0)),e.addEventListener("beforeunload",()=>{J3t(i)},{once:!0}),uY.set(e,{focus:n})}var J3t=(i,e)=>{let t=T5(i),n=jm(i);e&&n.removeEventListener("DOMContentLoaded",e),uY.has(t)&&(Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:uY.get(t).focus}),n.removeEventListener("keydown",sve,!0),n.removeEventListener("keyup",sve,!0),n.removeEventListener("click",q3t,!0),t.removeEventListener("focus",Y3t,!0),t.removeEventListener("blur",K3t,!1),typeof PointerEvent<"u"&&(n.removeEventListener("pointerdown",I5,!0),n.removeEventListener("pointermove",I5,!0),n.removeEventListener("pointerup",I5,!0)),uY.delete(t))};function hki(i){let e=jm(i),t;return e.readyState!=="loading"?hQe(i):(t=()=>{hQe(i)},e.addEventListener("DOMContentLoaded",t)),()=>J3t(i,t)}typeof document<"u"&&hki();function lve(){return dY!=="pointer"}var fki=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function pki(i,e,t){let n=t?Wc(t):void 0,o=jm(n),r=T5(n),s=typeof r<"u"?r.HTMLInputElement:HTMLInputElement,a=typeof r<"u"?r.HTMLTextAreaElement:HTMLTextAreaElement,l=typeof r<"u"?r.HTMLElement:HTMLElement,c=typeof r<"u"?r.KeyboardEvent:KeyboardEvent,u=gw(o);return i=i||u instanceof s&&!fki.has(u.type)||u instanceof a||u instanceof l&&u.isContentEditable,!(i&&e==="keyboard"&&t instanceof c&&!uki[t.key])}function X3t(i,e,t){hQe(),(0,fQe.useEffect)(()=>{if(t?.enabled===!1)return;let n=(o,r)=>{pki(!!t?.isTextInput,o,r)&&i(lve())};return uQe.add(n),()=>{uQe.delete(n)}},e)}var mQe=ae(ke(),1);function Z3t(i){let{isDisabled:e,onFocus:t,onBlur:n,onFocusChange:o}=i,r=(0,mQe.useCallback)(l=>{if(Wc(l)===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=ive(r),a=(0,mQe.useCallback)(l=>{let c=Wc(l),u=jm(c),d=u?gw(u):gw();c===l.currentTarget&&c===d&&(t&&t(l),o&&o(!0),s(l))},[o,t,s]);return{focusProps:{onFocus:!e&&(t||o||n)?a:void 0,onBlur:!e&&(n||o)?r:void 0}}}var KT=ae(ke(),1);function cve(){let i=(0,KT.useRef)(new Map),e=(0,KT.useCallback)((o,r,s,a)=>{let l=a?.once?(...c)=>{i.current.delete(s),s(...c)}:s;i.current.set(s,{type:r,eventTarget:o,fn:l,options:a}),o.addEventListener(r,l,a)},[]),t=(0,KT.useCallback)((o,r,s,a)=>{let l=i.current.get(s)?.fn||s;o.removeEventListener(r,l,a),i.current.delete(s)},[]),n=(0,KT.useCallback)(()=>{i.current.forEach((o,r)=>{t(o.eventTarget,o.type,r,o.options)})},[t]);return(0,KT.useEffect)(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:n}}var hY=ae(ke(),1);function $3t(i){let{isDisabled:e,onBlurWithin:t,onFocusWithin:n,onFocusWithinChange:o}=i,r=(0,hY.useRef)({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=cve(),l=(0,hY.useCallback)(d=>{L_(d.currentTarget,Wc(d))&&r.current.isFocusWithin&&!L_(d.currentTarget,d.relatedTarget)&&(r.current.isFocusWithin=!1,a(),t&&t(d),o&&o(!1))},[t,o,r,a]),c=ive(l),u=(0,hY.useCallback)(d=>{if(!L_(d.currentTarget,Wc(d)))return;let h=Wc(d),f=jm(h),p=gw(f);if(!r.current.isFocusWithin&&p===h){n&&n(d),o&&o(!0),r.current.isFocusWithin=!0,c(d);let g=d.currentTarget;s(f,"focus",A=>{let v=Wc(A);if(r.current.isFocusWithin&&!L_(g,v)){let w=new f.defaultView.FocusEvent("blur",{relatedTarget:v});W3t(w,g);let C=rQe(w);l(C)}},{capture:!0})}},[n,o,c,s,l]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}var JT=ae(ke(),1);function fY(i={}){let{autoFocus:e=!1,isTextInput:t,within:n}=i,o=(0,JT.useRef)({isFocused:!1,isFocusVisible:e||lve()}),[r,s]=(0,JT.useState)(!1),[a,l]=(0,JT.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),c=(0,JT.useCallback)(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=(0,JT.useCallback)(f=>{o.current.isFocused=f,o.current.isFocusVisible=lve(),s(f),c()},[c]);X3t(f=>{o.current.isFocusVisible=f,c()},[t,r],{enabled:r,isTextInput:t});let{focusProps:d}=Z3t({isDisabled:n,onFocusChange:u}),{focusWithinProps:h}=$3t({isDisabled:!n,onFocusWithinChange:u});return{isFocused:r,isFocusVisible:a,focusProps:n?h:d}}var N_=ae(ke(),1),gQe=!1,uve=0;function mki(){gQe=!0,setTimeout(()=>{gQe=!1},500)}function e4t(i){i.pointerType==="touch"&&mki()}function gki(){let i=jm(null);if(!(typeof i>"u"))return uve===0&&typeof PointerEvent<"u"&&i.addEventListener("pointerup",e4t),uve++,()=>{uve--,!(uve>0)&&typeof PointerEvent<"u"&&i.removeEventListener("pointerup",e4t)}}function pY(i){let{onHoverStart:e,onHoverChange:t,onHoverEnd:n,isDisabled:o}=i,[r,s]=(0,N_.useState)(!1),a=(0,N_.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,N_.useEffect)(gki,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=cve(),{hoverProps:u,triggerHoverEnd:d}=(0,N_.useMemo)(()=>{let h=(g,A)=>{if(a.pointerType=A,o||A==="touch"||a.isHovered||!L_(g.currentTarget,Wc(g)))return;a.isHovered=!0;let v=g.currentTarget;a.target=v,l(jm(Wc(g)),"pointerover",w=>{a.isHovered&&a.target&&!L_(a.target,Wc(w))&&f(w,w.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:v,pointerType:A}),t&&t(!0),s(!0)},f=(g,A)=>{let v=a.target;a.pointerType="",a.target=null,!(A==="touch"||!a.isHovered||!v)&&(a.isHovered=!1,c(),n&&n({type:"hoverend",target:v,pointerType:A}),t&&t(!1),s(!1))},p={};return typeof PointerEvent<"u"&&(p.onPointerEnter=g=>{gQe&&g.pointerType==="mouse"||h(g,g.pointerType)},p.onPointerLeave=g=>{!o&&L_(g.currentTarget,Wc(g))&&f(g,g.pointerType)}),{hoverProps:p,triggerHoverEnd:f}},[e,t,n,o,a,l,c]);return(0,N_.useEffect)(()=>{o&&d({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:r}}var mve=ae(ke(),1);var bki=Object.defineProperty,Aki=(i,e,t)=>e in i?bki(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,bQe=(i,e,t)=>(Aki(i,typeof e!="symbol"?e+"":e,t),t),AQe=class{constructor(){bQe(this,"current",this.detect()),bQe(this,"handoffState","pending"),bQe(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Mp=new AQe;function Aw(i){var e;return Mp.isServer?null:i==null?document:(e=i?.ownerDocument)!=null?e:document}function vQe(i){var e,t;return Mp.isServer?null:i==null?document:(t=(e=i?.getRootNode)==null?void 0:e.call(i))!=null?t:document}function t4t(i){var e,t;return(t=(e=vQe(i))==null?void 0:e.activeElement)!=null?t:null}function dve(i){return t4t(i)===i}var fve=ae(ke(),1);function hve(i){typeof queueMicrotask=="function"?queueMicrotask(i):Promise.resolve().then(i).catch(e=>setTimeout(()=>{throw e}))}function dc(){let i=[],e={addEventListener(t,n,o,r){return t.addEventListener(n,o,r),e.add(()=>t.removeEventListener(n,o,r))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return hve(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,o){let r=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:r})})},group(t){let n=dc();return t(n),this.add(()=>n.dispose())},add(t){return i.includes(t)||i.push(t),()=>{let n=i.indexOf(t);if(n>=0)for(let o of i.splice(n,1))o()}},dispose(){for(let t of i.splice(0))t()}};return e}function Y0(){let[i]=(0,fve.useState)(dc);return(0,fve.useEffect)(()=>()=>i.dispose(),[i]),i}var n4t=ae(ke(),1);var i4t=ae(ke(),1);var pve=ae(ke(),1);var as=(i,e)=>{Mp.isServer?(0,pve.useEffect)(i,e):(0,pve.useLayoutEffect)(i,e)};function Qm(i){let e=(0,i4t.useRef)(i);return as(()=>{e.current=i},[i]),e}var On=function(i){let e=Qm(i);return n4t.default.useCallback((...t)=>e.current(...t),[e])};function vki(i){let e=i.width/2,t=i.height/2;return{top:i.clientY-t,right:i.clientX+e,bottom:i.clientY+t,left:i.clientX-e}}function yki(i,e){return!(!i||!e||i.righte.right||i.bottome.bottom)}function o4t({disabled:i=!1}={}){let e=(0,mve.useRef)(null),[t,n]=(0,mve.useState)(!1),o=Y0(),r=On(()=>{e.current=null,n(!1),o.dispose()}),s=On(a=>{if(o.dispose(),e.current===null){e.current=a.currentTarget,n(!0);{let l=Aw(a.currentTarget);o.addEventListener(l,"pointerup",r,!1),o.addEventListener(l,"pointermove",c=>{if(e.current){let u=vki(c);n(yki(u,e.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",r,!1)}}});return{pressed:t,pressProps:i?{}:{onPointerDown:s,onPointerUp:r,onClick:r}}}var r4t=ae(ke(),1);function vw(i){return(0,r4t.useMemo)(()=>i,Object.values(i))}var mY=ae(ke(),1),wki=(0,mY.createContext)(void 0);function L5(){return(0,mY.useContext)(wki)}var Rh=ae(ke(),1);function yQe(...i){return Array.from(new Set(i.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Rp(i,e,...t){if(i in e){let o=e[i];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${i}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Rp),n}var Ave=(i=>(i[i.None=0]="None",i[i.RenderStrategy=1]="RenderStrategy",i[i.Static=2]="Static",i))(Ave||{}),xki=(i=>(i[i.Unmount=0]="Unmount",i[i.Hidden=1]="Hidden",i))(xki||{});function Ff(){let i=_ki();return(0,Rh.useCallback)(e=>Cki({mergeRefs:i,...e}),[i])}function Cki({ourProps:i,theirProps:e,slot:t,defaultTag:n,features:o,visible:r=!0,name:s,mergeRefs:a}){a=a??Ski;let l=s4t(e,i);if(r)return gve(l,t,n,s,a);let c=o??0;if(c&2){let{static:u=!1,...d}=l;if(u)return gve(d,t,n,s,a)}if(c&1){let{unmount:u=!0,...d}=l;return Rp(u?0:1,{0(){return null},1(){return gve({...d,hidden:!0,style:{display:"none"}},t,n,s,a)}})}return gve(l,t,n,s,a)}function gve(i,e={},t,n,o){let{as:r=t,children:s,refName:a="ref",...l}=wQe(i,["unmount","static"]),c=i.ref!==void 0?{[a]:i.ref}:{},u=typeof s=="function"?s(e):s;u=a4t(u),"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(e)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(e){let h=!1,f=[];for(let[p,g]of Object.entries(e))typeof g=="boolean"&&(h=!0),g===!0&&f.push(p.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`));if(h){d["data-headlessui-state"]=f.join(" ");for(let p of f)d[`data-${p}`]=""}}if(bve(r)&&(Object.keys(XT(l)).length>0||Object.keys(XT(d)).length>0))if(!(0,Rh.isValidElement)(u)||Array.isArray(u)&&u.length>1||Dki(u)){if(Object.keys(XT(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(XT(l)).concat(Object.keys(XT(d))).map(h=>` - ${h}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(` `)].join(` -`))}else{let h=u.props,f=h?.className,p=typeof f=="function"?(...A)=>Xje(f(...A),l.className):Xje(f,l.className),g=p?{className:p}:{},v=n5t(u.props,DT(Zje(l,["ref"])));for(let A in d)A in v&&delete d[A];return(0,Eh.cloneElement)(u,Object.assign({},v,d,c,{ref:r(NBi(u),c.ref)},g))}return(0,Eh.createElement)(o,Object.assign({},Zje(l,["ref"]),!eve(o)&&c,!eve(o)&&d),u)}function IBi(){let i=(0,Eh.useRef)([]),e=(0,Eh.useCallback)(t=>{for(let n of i.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return i.current=t,e}}function LBi(...i){return i.every(e=>e==null)?void 0:e=>{for(let t of i)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function n5t(...i){var e;if(i.length===0)return{};if(i.length===1)return i[0];let t={},n={};for(let r of i)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?((e=n[o])!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var s;return(s=o?.preventDefault)==null?void 0:s.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...s){let a=n[r];for(let l of a){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;l(o,...s)}}});return t}function ive(...i){var e;if(i.length===0)return{};if(i.length===1)return i[0];let t={},n={};for(let r of i)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?((e=n[o])!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let s=n[r];for(let a of s)a?.(...o)}});return t}function Sf(i){var e;return Object.assign((0,Eh.forwardRef)(i),{displayName:(e=i.displayName)!=null?e:i.name})}function DT(i){let e=Object.assign({},i);for(let t in e)e[t]===void 0&&delete e[t];return e}function Zje(i,e=[]){let t=Object.assign({},i);for(let n of e)n in t&&delete t[n];return t}function NBi(i){return Eh.default.version.split(".")[0]>="19"?i.props.ref:i.ref}function r5t(i){if(i!=null&&i.$$typeof===Symbol.for("react.lazy")){let e=i._payload;if(e!=null&&e.status==="fulfilled")return r5t(e.value)}return i}function eve(i){return i===Eh.Fragment||i===Symbol.for("react.fragment")}function MBi(i){return eve(i.type)}var H8=$(Te(),1),o5t=$(Kv(),1);function s5t(i,e,t){let[n,r]=(0,H8.useState)(t),o=i!==void 0,s=(0,H8.useRef)(o),a=(0,H8.useRef)(!1),l=(0,H8.useRef)(!1);return o&&!s.current&&!a.current?(a.current=!0,s.current=o,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.")):!o&&s.current&&!l.current&&(l.current=!0,s.current=o,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.")),[o?i:n,Rn(c=>(o||(0,o5t.flushSync)(()=>r(c)),e?.(c)))]}var a5t=$(Te(),1);function l5t(i){let[e]=(0,a5t.useState)(i);return e}var cA=$(Te(),1);var Bd=$(Te(),1),h5t=$(Kv(),1);var c5t=$(Te(),1);function $je(i={},e=null,t=[]){for(let[n,r]of Object.entries(i))d5t(t,u5t(e,n),r);return t}function u5t(i,e){return i?i+"["+e+"]":e}function d5t(i,e,t){if(Array.isArray(t))for(let[n,r]of t.entries())d5t(i,u5t(e,n.toString()),r);else t instanceof Date?i.push([e,t.toISOString()]):typeof t=="boolean"?i.push([e,t?"1":"0"]):typeof t=="string"?i.push([e,t]):typeof t=="number"?i.push([e,`${t}`]):t==null?i.push([e,""]):RBi(t)&&!(0,c5t.isValidElement)(t)&&$je(t,e,i)}function RBi(i){if(Object.prototype.toString.call(i)!=="[object Object]")return!1;let e=Object.getPrototypeOf(i);return e===null||Object.getPrototypeOf(e)===null}var FBi="span",nve=(i=>(i[i.None=1]="None",i[i.Focusable=2]="Focusable",i[i.Hidden=4]="Hidden",i))(nve||{});function OBi(i,e){var t;let{features:n=1,...r}=i,o={ref:e,"aria-hidden":(n&2)===2?!0:(t=r["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!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",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return _f()({ourProps:o,theirProps:r,slot:{},defaultTag:FBi,name:"Hidden"})}var eQe=Sf(OBi);var PBi=(0,Bd.createContext)(null);function BBi({children:i}){let e=(0,Bd.useContext)(PBi);if(!e)return Bd.default.createElement(Bd.default.Fragment,null,i);let{target:t}=e;return t?(0,h5t.createPortal)(Bd.default.createElement(Bd.default.Fragment,null,i),t):null}function f5t({data:i,form:e,disabled:t,onReset:n,overrides:r}){let[o,s]=(0,Bd.useState)(null),a=F0();return(0,Bd.useEffect)(()=>{if(n&&o)return a.addEventListener(o,"reset",n)},[o,e,n]),Bd.default.createElement(BBi,null,Bd.default.createElement(zBi,{setForm:s,formId:e}),$je(i).map(([l,c])=>Bd.default.createElement(eQe,{features:nve.Hidden,...DT({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:t,name:l,value:c,...r})})))}function zBi({setForm:i,formId:e}){return(0,Bd.useEffect)(()=>{if(e){let t=document.getElementById(e);t&&i(t)}},[i,e]),e?null:Bd.default.createElement(eQe,{features:nve.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&i(n)}})}var zG=$(Te(),1),VBi=(0,zG.createContext)(void 0);function rve(){return(0,zG.useContext)(VBi)}function tQe(i){return typeof i!="object"||i===null?!1:"nodeType"in i}function ove(i){return tQe(i)&&"tagName"in i}function uA(i){return ove(i)&&"accessKey"in i}function dA(i){return ove(i)&&"tabIndex"in i}function p5t(i){return ove(i)&&"style"in i}function m5t(i){return uA(i)&&i.nodeName==="IFRAME"}function pM(i){return uA(i)&&i.nodeName==="INPUT"}function iQe(i){return uA(i)&&i.nodeName==="LABEL"}function g5t(i){return uA(i)&&i.nodeName==="FIELDSET"}function nQe(i){return uA(i)&&i.nodeName==="LEGEND"}function b5t(i){return ove(i)?i.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function rQe(i){let e=i.parentElement,t=null;for(;e&&!g5t(e);)nQe(e)&&(t=e),e=e.parentElement;let n=e?.getAttribute("disabled")==="";return n&&HBi(t)?!1:n}function HBi(i){if(!i)return!1;let e=i.previousElementSibling;for(;e!==null;){if(nQe(e))return!1;e=e.previousElementSibling}return!0}var TT=$(Te(),1);var sve=$(Te(),1);var v5t=Symbol();function A5t(i,e=!0){return Object.assign(i,{[v5t]:e})}function rb(...i){let e=(0,sve.useRef)(i);(0,sve.useEffect)(()=>{e.current=i},[i]);let t=Rn(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)});return i.every(n=>n==null||n?.[v5t])?void 0:t}var oQe=(0,TT.createContext)(null);oQe.displayName="DescriptionContext";function y5t(){let i=(0,TT.useContext)(oQe);if(i===null){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,y5t),e}return i}function w5t(){var i,e;return(e=(i=(0,TT.useContext)(oQe))==null?void 0:i.value)!=null?e:void 0}var WBi="p";function UBi(i,e){let t=(0,cA.useId)(),n=V8(),{id:r=`headlessui-description-${t}`,...o}=i,s=y5t(),a=rb(e);ls(()=>s.register(r),[r,s.register]);let l=iw({...s.slot,disabled:n||!1}),c={ref:a,...s.props,id:r};return _f()({ourProps:c,theirProps:o,slot:l,defaultTag:WBi,name:s.name||"Description"})}var jBi=Sf(UBi),poo=Object.assign(jBi,{});var Ef=(i=>(i.Space=" ",i.Enter="Enter",i.Escape="Escape",i.Backspace="Backspace",i.Delete="Delete",i.ArrowLeft="ArrowLeft",i.ArrowUp="ArrowUp",i.ArrowRight="ArrowRight",i.ArrowDown="ArrowDown",i.Home="Home",i.End="End",i.PageUp="PageUp",i.PageDown="PageDown",i.Tab="Tab",i))(Ef||{});var O0=$(Te(),1);var ave=(0,O0.createContext)(null);ave.displayName="LabelContext";function x5t(){let i=(0,O0.useContext)(ave);if(i===null){let e=new Error("You used a